From: Michael R Sweet Date: Sat, 17 Jun 2017 00:53:24 +0000 (-0400) Subject: Add configure option to set the installed executable permissions. X-Git-Tag: v2.2.4~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4a895f85604a5205b2c2dfd65c5beffb6863806;p=thirdparty%2Fcups.git Add configure option to set the installed executable permissions. --- diff --git a/Makedefs.in b/Makedefs.in index 7897eafd79..2edb13f46f 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -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... diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4 index e394d6b0cf..0175111985 100644 --- a/config-scripts/cups-defaults.m4 +++ b/config-scripts/cups-defaults.m4 @@ -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", diff --git a/configure b/configure index 74f67a5871..25235abffe 100755 --- 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"