From 76a05e94c19922ee27a9c3b751ec3836c13a1bab Mon Sep 17 00:00:00 2001 From: Sébastien Luttringer Date: Tue, 10 Dec 2013 01:59:24 +0100 Subject: makepkg: fix consistency of downloaded sources permissions Running 'makepkg -g' or 'makepkg' to download source files results in different permissions on the files if the user has a non-default umask. Put the umask definition at the "beginning" of the makepkg script to ensure all files generated by makepkg have a 0022 umask. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 28e8e7a4..81354dfe 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2544,6 +2544,9 @@ There is NO WARRANTY, to the extent permitted by law.\n")" # PROGRAM START +# ensure we have a sane umask set +umask 0022 + # determine whether we have gettext; make it a no-op if we do not if ! type -p gettext >/dev/null; then gettext() { @@ -2979,9 +2982,6 @@ else fi fi -# ensure we have a sane umask set -umask 0022 - # get back to our src directory so we can begin with sources mkdir -p "$srcdir" chmod a-s "$srcdir" -- cgit v1.2.3-24-g4f1b