]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add configure option to set the installed executable permissions.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Sat, 17 Jun 2017 00:53:24 +0000 (20:53 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Sat, 17 Jun 2017 00:53:24 +0000 (20:53 -0400)
Makedefs.in
config-scripts/cups-defaults.m4
configure

index 7897eafd799c481e80b740f92a222955564e4784..2edb13f46fc222f486fec6b66b1a06fcce758539 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Common makefile definitions for CUPS.
 #
-# Copyright 2007-2014 by Apple Inc.
+# Copyright 2007-2017 by Apple Inc.
 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
 #
 # These coded instructions, statements, and computer programs are the
@@ -38,14 +38,14 @@ SHELL               =       /bin/sh
 # Installation programs...
 #
 
-INSTALL_BIN    =       $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
+INSTALL_BIN    =       $(LIBTOOL) $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
 INSTALL_COMPDATA =     $(INSTALL) -c -m 444 @INSTALL_GZIP@
 INSTALL_CONFIG =       $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
 INSTALL_DATA   =       $(INSTALL) -c -m 444
 INSTALL_DIR    =       $(INSTALL) -d
-INSTALL_LIB    =       $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
+INSTALL_LIB    =       $(LIBTOOL) $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
 INSTALL_MAN    =       $(INSTALL) -c -m 444
-INSTALL_SCRIPT =       $(INSTALL) -c -m 555
+INSTALL_SCRIPT =       $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@
 
 #
 # Default user, group, and system groups for the scheduler...
index e394d6b0cf9c8e6409026de7cf0c08c1d887aab0..01751119857c1036176ea240d6d21bb7cf3902e2 100644 (file)
@@ -37,6 +37,16 @@ if test "x$CUPS_BUNDLEDIR" != x; then
        AC_DEFINE_UNQUOTED(CUPS_BUNDLEDIR, "$CUPS_BUNDLEDIR")
 fi
 
+dnl Default executable file permissions
+AC_ARG_WITH(exe_file_perm, [  --with-exe-file-perm set default exectuable permissions value, default=0555],
+       CUPS_EXE_FILE_PERM="$withval",
+       if test "x$host_os_name" = xlinux; then
+               CUPS_EXE_FILE_PERM="755"
+       else
+               CUPS_EXE_FILE_PERM="555"
+       fi)
+AC_SUBST(CUPS_EXE_FILE_PERM)
+
 dnl Default ConfigFilePerm
 AC_ARG_WITH(config_file_perm, [  --with-config-file-perm set default ConfigFilePerm value, default=0640],
        CUPS_CONFIG_FILE_PERM="$withval",
index 74f67a5871e398d50e9cec65869d2218a2c1c2f1..25235abffed0d2e9cfb091bc843591197af59561 100755 (executable)
--- a/configure
+++ b/configure
@@ -654,6 +654,7 @@ CUPS_FATAL_ERRORS
 CUPS_LOG_FILE_PERM
 CUPS_CUPSD_FILE_PERM
 CUPS_CONFIG_FILE_PERM
+CUPS_EXE_FILE_PERM
 CUPS_BUNDLEDIR
 LANGUAGES
 XINETD
@@ -896,6 +897,7 @@ with_rcstop
 with_xinetd
 with_languages
 with_bundledir
+with_exe_file_perm
 with_config_file_perm
 with_cupsd_file_perm
 with_log_file_perm
@@ -1619,6 +1621,7 @@ Optional Packages:
   --with-xinetd           set path for xinetd config files
   --with-languages        set installed languages, default=all
   --with-bundledir        set macOS localization bundle directory
+  --with-exe-file-perm set default exectuable permissions value, default=0555
   --with-config-file-perm set default ConfigFilePerm value, default=0640
   --with-cupsd-file-perm  set default cupsd permissions, default=0500
   --with-log-file-perm    set default LogFilePerm value, default=0644
@@ -2637,12 +2640,10 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`
 host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}'`
+# Linux often does not yield an OS version we can use...
 if test "x$host_os_version" = x; then
         host_os_version="0"
 fi
-echo "host_os=$host_os"
-echo "host_os_name=$host_os_name"
-echo "host_os_version=$host_os_version"
 
 if test "$host_os_name" = darwin -a $host_os_version -lt 120; then
         as_fn_error $? "Sorry, this version of CUPS requires macOS 10.8 or higher." "$LINENO" 5
@@ -9497,7 +9498,6 @@ fi
 if test "${with_bundledir+set}" = set; then :
   withval=$with_bundledir; CUPS_BUNDLEDIR="$withval"
 else
-  echo "host_os_version=$host_os_version"
   if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100; then
                CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
                LANGUAGES=""
@@ -9516,6 +9516,20 @@ _ACEOF
 fi
 
 
+# Check whether --with-exe_file_perm was given.
+if test "${with_exe_file_perm+set}" = set; then :
+  withval=$with_exe_file_perm; CUPS_EXE_FILE_PERM="$withval"
+else
+  if test "x$host_os_name" = xlinux; then
+               CUPS_EXE_FILE_PERM="755"
+       else
+               CUPS_EXE_FILE_PERM="555"
+       fi
+fi
+
+
+
+
 # Check whether --with-config_file_perm was given.
 if test "${with_config_file_perm+set}" = set; then :
   withval=$with_config_file_perm; CUPS_CONFIG_FILE_PERM="$withval"