From: Sebastien GODARD Date: Mon, 19 Jan 2015 20:40:33 +0000 (+0100) Subject: Rename --disable-man-group option to --disable-file-attr X-Git-Tag: v11.1.3~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fcd4de4080e20705a09f475646dc431d8c9378ef;p=sysstat Rename --disable-man-group option to --disable-file-attr This option was originally intended to prevent the configuration process from setting the group ID for manual pages that were installed. It is now also used to tell the build process to not set the user and group of the /var/log/sa directory when it is created. This option may be useful when creating an RPM package with a non privileged user. Signed-off-by: Sebastien GODARD --- diff --git a/Makefile.in b/Makefile.in index 45bd140..a7c7910 100644 --- a/Makefile.in +++ b/Makefile.in @@ -101,10 +101,10 @@ INSTALL_CRON = @INSTALL_CRON@ CRON_OWNER = @CRON_OWNER@ MAN_GROUP = @MAN_GROUP@ -ifndef IGNORE_MAN_GROUP -IGNORE_MAN_GROUP = @IGNORE_MAN_GROUP@ +ifndef IGNORE_FILE_ATTRIBUTES +IGNORE_FILE_ATTRIBUTES = @IGNORE_FILE_ATTRIBUTES@ endif -ifeq ($(IGNORE_MAN_GROUP),y) +ifeq ($(IGNORE_FILE_ATTRIBUTES),y) MANGRPARG = else MANGRPARG = -g $(MAN_GROUP) @@ -368,7 +368,9 @@ endif install_all: install_base cron/crontab sysstat \ cron/sysstat.crond cron/sysstat.cron.daily cron/sysstat.cron.hourly +ifneq ($(IGNORE_FILE_ATTRIBUTES),y) $(CHOWN) $(CRON_OWNER) $(DESTDIR)$(SA_DIR) +endif if [ ! -d "$(DESTDIR)$(SYSTEMD_UNIT_DIR)" ]; then \ if [ -d $(DESTDIR)/etc/cron.d ]; then \ $(INSTALL_DATA) cron/sysstat.crond $(DESTDIR)/etc/cron.d/sysstat; \ diff --git a/build/ignore-file-attr b/build/ignore-file-attr new file mode 100644 index 0000000..cebe680 --- /dev/null +++ b/build/ignore-file-attr @@ -0,0 +1,9 @@ + +Here again, don't bother too much with that. When set, this parameter prevents +the installation process from setting the attributes (eg. user, group...) of +files being installed. +For example, when this parameter is used, the contents of the man_group variable +won't be taken into account, the installation process won't try to set the +user and group attributes of the /var/log/sa directory... +This parameter is only used by some distros to package sysstat. + diff --git a/build/ignore-man-group b/build/ignore-man-group deleted file mode 100644 index 03dfbbd..0000000 --- a/build/ignore-man-group +++ /dev/null @@ -1,6 +0,0 @@ - -Here again, don't bother too much with that. When set, this parameter tells -the configuration process not to take into account the contents of the -man_group variable. -This parameter is only used by some distros to package sysstat. - diff --git a/configure b/configure index 43ab18a..b3b8ce7 100755 --- a/configure +++ b/configure @@ -640,7 +640,7 @@ INSTALL_CRON CLEAN_SA_DIR INSTALL_ISAG COMPRESS_MANPG -IGNORE_MAN_GROUP +IGNORE_FILE_ATTRIBUTES MAN_GROUP man_group PREALLOC_FACTOR @@ -736,7 +736,7 @@ enable_sensors enable_largefile enable_nls enable_yesterday -enable_man_group +enable_file_attr enable_compress_manpg enable_install_isag enable_clean_sa_dir @@ -1379,7 +1379,7 @@ Optional Features: --disable-largefile omit support for large files --disable-nls disable National Language Support --enable-yesterday tell sa2 to use data file of the day before - --disable-man-group ignore man_group variable value + --disable-file-attr do not set attributes on files being installed --enable-compress-manpg compress sysstat manual pages --enable-install-isag install isag script --enable-clean-sa-dir clean system activity directory @@ -3787,7 +3787,7 @@ $as_echo "no" >&6; } fi -for ac_prog in bzip2 gzip +for ac_prog in xz bzip2 gzip do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -4849,7 +4849,7 @@ echo . # --disable-largefile omit support for large files # --disable-nls disable National Language Support # --enable-yesterday tell sa2 to use "yesterday" data files -# --disable-man-group ignore man_group variable value +# --disable-file-attr don't set attributes on files being installed # --enable-install-cron tell sysstat to install cron scripts # --collect-all tell sadc to collect all possible data # --enable-clean-sa-dir clean system activity directory @@ -5105,21 +5105,21 @@ $as_echo "$MAN_GROUP" >&6; } fi -# Ignore manual pages group? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether man_group variable should be ignored" >&5 -$as_echo_n "checking whether man_group variable should be ignored... " >&6; } -# Check whether --enable-man-group was given. -if test "${enable_man_group+set}" = set; then : - enableval=$enable_man_group; AUX_IMG=$enableval +# Don't set attributes on files being installed? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether attributes should not be set on files being installed" >&5 +$as_echo_n "checking whether attributes should not be set on files being installed... " >&6; } +# Check whether --enable-file-attr was given. +if test "${enable_file_attr+set}" = set; then : + enableval=$enable_file_attr; AUX_IMG=$enableval else AUX_IMG=yes fi if test $AUX_IMG != "no"; then - IGNORE_MAN_GROUP=n + IGNORE_FILE_ATTRIBUTES=n AUX_IMG=no else - IGNORE_MAN_GROUP=y + IGNORE_FILE_ATTRIBUTES=y AUX_IMG=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUX_IMG" >&5 diff --git a/configure.in b/configure.in index b395e9f..78a42bb 100644 --- a/configure.in +++ b/configure.in @@ -129,7 +129,7 @@ echo . # --disable-largefile omit support for large files # --disable-nls disable National Language Support # --enable-yesterday tell sa2 to use "yesterday" data files -# --disable-man-group ignore man_group variable value +# --disable-file-attr don't set attributes on files being installed # --enable-install-cron tell sysstat to install cron scripts # --collect-all tell sadc to collect all possible data # --enable-clean-sa-dir clean system activity directory @@ -356,21 +356,21 @@ else fi AC_SUBST(MAN_GROUP) -# Ignore manual pages group? -AC_MSG_CHECKING(whether man_group variable should be ignored) -AC_ARG_ENABLE(man-group, - AC_HELP_STRING([--disable-man-group], - [ignore man_group variable value]), +# Don't set attributes on files being installed? +AC_MSG_CHECKING(whether attributes should not be set on files being installed) +AC_ARG_ENABLE(file-attr, + AC_HELP_STRING([--disable-file-attr], + [do not set attributes on files being installed]), AUX_IMG=$enableval,AUX_IMG=yes) if test $AUX_IMG != "no"; then - IGNORE_MAN_GROUP=n + IGNORE_FILE_ATTRIBUTES=n AUX_IMG=no else - IGNORE_MAN_GROUP=y + IGNORE_FILE_ATTRIBUTES=y AUX_IMG=yes fi AC_MSG_RESULT($AUX_IMG) -AC_SUBST(IGNORE_MAN_GROUP) +AC_SUBST(IGNORE_FILE_ATTRIBUTES) # Compress manual pages? AC_MSG_CHECKING(whether manual pages should be compressed) diff --git a/iconfig b/iconfig index 59d49c6..52b45c3 100755 --- a/iconfig +++ b/iconfig @@ -100,13 +100,13 @@ if [ "${MAN}" != "" ]; then MAN="man_group=${MAN} " fi -# Ignore man_group variable -IGNORE_MAN=`${ASK} 'Ignore contents of man_group variable? (y/n)' "--disable-man-group" "ignore-man-group"` -if [ "${IGNORE_MAN}" = "y" ]; then - IGNORE_MAN="--disable-man-group " +# Don't set attributes on files being installed +IGNORE_FILE_ATTR=`${ASK} 'Do not set attributes on files being installed? (y/n)' "--disable-file-attr" "ignore-file-attr"` +if [ "${IGNORE_FILE_ATTR}" = "y" ]; then + IGNORE_FILE_ATTR="--disable-file-attr " else - IGNORE_MAN="" - echo "Parameter --disable-man-group is NOT set" + IGNORE_FILE_ATTR="" + echo "Parameter --disable-file-attr is NOT set" fi # Crontab @@ -212,11 +212,11 @@ fi echo echo "./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${CLEAN_SA_DIR}${NLS} \ -${YESTERDAY}${HISTORY}${COMPRESSAFTER}${PREALLOC_ANSWER}${MAN}${IGNORE_MAN}${CRON}${RCDIR} \ +${YESTERDAY}${HISTORY}${COMPRESSAFTER}${PREALLOC_ANSWER}${MAN}${IGNORE_FILE_ATTR}${CRON}${RCDIR} \ ${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS}${STRIP}${COPY_ONLY}" echo ./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${CLEAN_SA_DIR}${NLS} \ -${YESTERDAY}${HISTORY}${COMPRESSAFTER}${PREALLOC_ANSWER}${MAN}${IGNORE_MAN}${CRON}${RCDIR} \ +${YESTERDAY}${HISTORY}${COMPRESSAFTER}${PREALLOC_ANSWER}${MAN}${IGNORE_FILE_ATTR}${CRON}${RCDIR} \ ${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS}${STRIP}${COPY_ONLY}