Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/5] Target permissions
@ 2014-11-17 17:19 Guido Martínez
  2014-11-17 17:19 ` [Buildroot] [PATCH v3 1/5] Makefile: don't depend on the umask Guido Martínez
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Guido Martínez @ 2014-11-17 17:19 UTC (permalink / raw)
  To: buildroot

Hi all,

this patchset fixes the target permissions problem we observed, meaning,
it makes the target permissions not depend on the user's umask and the
current permissions of the source files on the repo. This is a problem,
since the build is not exactly reproducible unless we take all those
modes into account.

The way we accomplish this is by using the --chmod option when using
rsync -a, and by setting a fixed umask in the Makefile (previously done
by wrapping all shell calls, new in this v3 is that it's done with phony
rules only once a top level, I consider it a lot better but I'm open for
discussion, of course)

Another way to not depend on "volatile" modes would be to add a 'chmod
-R' call on the fakeroot script created in fs/common.mk, and just
expect that packages that care about their permissions set them via
$(PKG)_PERMISSIONS. However, some packages (at least: at, ssh [for
ssh-keysign], sudo and ngircd) set the correct permissions they want in
their INSTALL_CMDs, so we'd have to check each one and write the correct
permission set.

By clearing the umask, we remove the variability, while also allowing
packages to do whatever they want.

The last two patches fix two packages that used 'cp -p' from their BR
directory, so the mode on the target would depend on the those files
(for which we don't track nor care about permissions). As such, these
last two patches are independent from the others.

Only difference from v2 is that I removed the shell wrapper script and
used phony Makefile rules to set the umask, which is then inherited by
the whole build process. I believe this is better, since we don't add
any measurable work to the build and it's functionally equivalent.

Guido Mart?nez (5):
  Makefile: don't depend on the umask
  Makefile: don't depend on current skeleton/overlay permissions
  pkg-generic.mk: don't depend on external package permissions
  package: matchbox-keyboard: use install instead of cp
  package: linux-fusion: use install instead of cp

 Makefile                                              | 19 +++++++++++++++++--
 package/linux-fusion/linux-fusion.mk                  |  4 ++--
 .../matchbox/matchbox-keyboard/matchbox-keyboard.mk   |  2 +-
 package/pkg-generic.mk                                |  2 +-
 4 files changed, 21 insertions(+), 6 deletions(-)

-- 
2.1.3

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-11-18 22:59 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 17:19 [Buildroot] [PATCH v3 0/5] Target permissions Guido Martínez
2014-11-17 17:19 ` [Buildroot] [PATCH v3 1/5] Makefile: don't depend on the umask Guido Martínez
2014-11-17 21:11   ` Arnout Vandecappelle
2014-11-18 17:01     ` Guido Martínez
2014-11-18 19:22       ` Arnout Vandecappelle
2014-11-17 21:36   ` Yann E. MORIN
2014-11-17 21:41     ` Arnout Vandecappelle
2014-11-17 21:48       ` Yann E. MORIN
2014-11-17 17:19 ` [Buildroot] [PATCH v3 2/5] Makefile: don't depend on current skeleton/overlay permissions Guido Martínez
2014-11-17 21:39   ` Yann E. MORIN
2014-11-17 17:19 ` [Buildroot] [PATCH v3 3/5] pkg-generic.mk: don't depend on external package permissions Guido Martínez
2014-11-17 21:41   ` Yann E. MORIN
2014-11-18 17:02     ` Guido Martínez
2014-11-17 17:19 ` [Buildroot] [PATCH v3 4/5] package: matchbox-keyboard: use install instead of cp Guido Martínez
2014-11-17 21:44   ` Yann E. MORIN
2014-11-18 17:06     ` Guido Martínez
2014-11-17 17:19 ` [Buildroot] [PATCH v3 5/5] package: linux-fusion: " Guido Martínez
2014-11-17 21:49   ` Yann E. MORIN
2014-11-17 22:06   ` Arnout Vandecappelle
2014-11-18 17:17     ` Guido Martínez
2014-11-18 19:23       ` Arnout Vandecappelle
2014-11-18 19:40         ` Guido Martínez
2014-11-18 20:58           ` Arnout Vandecappelle
2014-11-18 22:59   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox