From 1b00495bcee19050cb2fcc1e5a62959b3fdda4af Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 2 Dec 2009 23:16:01 +0100 Subject: - correct permissions of installed files and add MOZ_XPI_PRESERVE_PERMISSIONS to disable this behaviour (Closes: #556741) - update src/xpi.mk --- src/xpi.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/xpi.mk b/src/xpi.mk index d4f6579..680a56a 100644 --- a/src/xpi.mk +++ b/src/xpi.mk @@ -66,6 +66,12 @@ # stripped prefixes is used. This value is used to determine # xpi:Provides. # +# MOZ_XPI_PRESERVE_PERMISSIONS (OPTIONAL): +# if defined (set to 1), the permission of the installed files +# will not be changed. If not defined or set to $(null), the +# permission of the files will be set to 644 and the permissions +# of scripts (files containing a shebang) will be set to 755. +# # Deprecated variables: # # MOZ_XPI_MOZILLA_DIRS /deprecated/ (OPTIONAL/NODEFAULT - see "Note:"): @@ -183,6 +189,10 @@ else ifeq ($(origin MOZ_XPI_DOCUMENTED_LICENSE_FILES),undefined) cd $(install_dir) && find \( -iname copying -o -iname gpl.txt -o -iname licen[cs]e -o -iname licen[cs]e.txt \) -printf "xpi.mk: deleted %p\n" -delete endif +endif +ifeq (,$(MOZ_XPI_PRESERVE_PERMISSIONS)) + find $(install_dir) -type d -exec chmod 755 {} \; + cd $(install_dir) && find * -type f | while read fn; do head -n1 "$$fn" | grep -q "^\#\!" && echo "xpi.mk: Made $$fn executable." && chmod 755 "$$fn" || chmod 644 "$$fn"; done endif touch $@ -- cgit v1.2.3