summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSĂ©bastien Luttringer <seblu@seblu.net>2013-12-10 01:59:24 +0100
committerAllan McRae <allan@archlinux.org>2013-12-15 20:09:37 +1000
commit76a05e94c19922ee27a9c3b751ec3836c13a1bab (patch)
tree41520a11b213fdb83231b7858b522118c5b12254
parent916c7085d829e6fec4f31b7ea3dbbdf571f9cd81 (diff)
downloadpacman-76a05e94c19922ee27a9c3b751ec3836c13a1bab.tar.xz
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 <allan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in6
1 files changed, 3 insertions, 3 deletions
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"