From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from [2001:67c:670:100:1d::c0] (helo=ptx.hi.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k9vUG-0007CS-57 for ptxdist@pengutronix.de; Sun, 23 Aug 2020 21:17:04 +0200 Received: from rhi by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1k9vUF-0004Ga-SN for ptxdist@pengutronix.de; Sun, 23 Aug 2020 21:17:03 +0200 Date: Sun, 23 Aug 2020 21:17:03 +0200 From: Roland Hieber Message-ID: <20200823191703.jkhipjuoaz4nqhdx@pengutronix.de> References: <20200819105118.16294-1-rhi@pengutronix.de> <9927035.nfPmpIUHfi@ada> <20200821075229.GI8684@pengutronix.de> <42055247.HxDYg44eEe@ada> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <42055247.HxDYg44eEe@ada> Subject: Re: [ptxdist] [PATCH v2 1/2] doc: ref_make_macros: make clear that permission should be four digits List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de On Fri, Aug 21, 2020 at 02:06:32PM +0200, Alexander Dahl wrote: > Hello Michael, > > Am Freitag, 21. August 2020, 09:52:29 CEST schrieb Michael Olbrich: > > Hello Roland hand Alexander, > > > > On Wed, Aug 19, 2020 at 01:04:31PM +0200, Alexander Dahl wrote: > > > Am Mittwoch, 19. August 2020, 12:59:08 CEST schrieb Roland Hieber: > > > > Three octal digits are not enough, we must also respect the > > > > sticky/setuid/setgid bits. Even if these are mostly implied to be 0, we > > > > should be explicit here. This should also help to prevent permission > > > > clashes when more than one packages install the same directory. > > > > > > > > Signed-off-by: Roland Hieber > > > > > > Acked-by: Alexander Dahl > > > > Thanks for sorting this out. I'll apply the patches because I think this is > > better for consistency. But we should probably accept the versions without > > leading zeros as well. The final result is the same after all. > > No objection on the concept. If 3 digits is accepted in general and e.g. 755 > always means 0755, that additional script magic would mean less friction on > user side, which is a good thing. No objections from my side too. - Roland > > > Probably something like this: > > > > > > diff --git a/scripts/lib/ptxd_lib_check_dir_permissions.awk > > b/scripts/lib/ptxd_lib_check_dir_permissions.awk index > > faa0c64373f0..e6eb99f1937e 100644 > > --- a/scripts/lib/ptxd_lib_check_dir_permissions.awk > > +++ b/scripts/lib/ptxd_lib_check_dir_permissions.awk > > @@ -35,7 +35,7 @@ function check_parents(base) { > > > > $1 ~ "d" { > > path = gensub(/\/$/,"",1,$2) > > - perm = $3 "." $4 " " $5 > > + perm = $3 "." $4 " 0" sprintf("%o", strtonum("0" $5)) > > check(path, perm, "") > > check_parents(path) > > } > > > > What do you think? > > I can't review awk. Sorry. > > Have a nice weekend everyone > Alex > > > > > --- > > > > > > > > * v2: unchanged > > > > > > > > doc/ref_make_macros.rst | 6 +++--- > > > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/doc/ref_make_macros.rst b/doc/ref_make_macros.rst > > > > index 6f056adf3e7d..ae65cb9408cf 100644 > > > > --- a/doc/ref_make_macros.rst > > > > +++ b/doc/ref_make_macros.rst > > > > > > > > @@ -173,7 +173,7 @@ Some of the parameters have fixed meanings: > > > > **** > > > > > > > > Group ID the file should use in the target's root filesystem > > > > > > > > **** > > > > > > > > - Permission (in an octal value) the file should use in the target's > > > > root > > > > filesystem + Permission (as a four-digit octal value) the file should > > > > use > > > > in the target's root filesystem > > > > > > > > The remaining parameters vary with the use case: > > > > @@ -384,7 +384,7 @@ The base parameters and their meanings: > > > > **** > > > > > > > > Group ID the file should use in the target's root filesystem > > > > > > > > **** > > > > > > > > - Permission (in an octal value) the file should use in the target's > > > > root > > > > filesystem + Permission (as a four-digit octal value) the file should > > > > use > > > > in the target's root filesystem > > > > > > > > The parameter is meant as an absolute path > > > > and filename in target's root filesystem. PTXdist searches for the > > > > source > > > > > > > > @@ -581,7 +581,7 @@ The parameters and their meanings: > > > > **** > > > > > > > > Group ID the directories and files should use in the target's root > > > > > > > > filesystem **** > > > > - Permission (as an octal value) the library should use in the target's > > > > root + Permission (as a four-digit octal value) the library should use > > > > in > > > > the target's root filesystem (mostly 0644) > > > > > > > > **** > > > > > > > > Basename of the library without any extension and path > > > > > > _______________________________________________ > > > ptxdist mailing list > > > ptxdist@pengutronix.de > > > To unsubscribe, send a mail with subject "unsubscribe" to > > > ptxdist-request@pengutronix.de > > > > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de