[sysstat] - add the mandir patch - add the possibility to sed sadc cron options

Ivana Varekova varekova at fedoraproject.org
Thu Sep 23 17:16:34 UTC 2010


commit 45b819cfb673fa46f4701c8ecbde57c9b95527e3
Author: Ivana Hutarova Varekova <varekova at redhat.com>
Date:   Thu Sep 23 19:18:40 2010 +0200

    - add the mandir patch
    - add the possibility to sed sadc cron options

 sysstat-9.0.6.1-mandir.patch   |   33 ++++++++
 sysstat-9.0.6.1-sadc_opt.patch |  175 ++++++++++++++++++++++++++++++++++++++++
 sysstat.spec                   |   15 +++-
 3 files changed, 220 insertions(+), 3 deletions(-)
---
diff --git a/sysstat-9.0.6.1-mandir.patch b/sysstat-9.0.6.1-mandir.patch
new file mode 100644
index 0000000..9ea1de5
--- /dev/null
+++ b/sysstat-9.0.6.1-mandir.patch
@@ -0,0 +1,33 @@
+diff -up sysstat-9.0.6.1/configure.in.pom sysstat-9.0.6.1/configure.in
+--- sysstat-9.0.6.1/configure.in.pom	2010-09-23 17:36:43.000000000 +0200
++++ sysstat-9.0.6.1/configure.in	2010-09-23 17:40:54.000000000 +0200
+@@ -483,12 +483,7 @@ AC_MSG_RESULT($AUX_DOC)
+ AC_SUBST(INSTALL_DOC)
+ 
+ # Set directory for installing manual pages (see comment in Makefile)
+-if test $mandir != "\${datarootdir}/man"; then
+-	AuxMandir=$mandir
+-else
+-	AuxMandir=$AuxPrefix/man
+-fi
+-AC_SUBST(AuxMandir)
++AC_SUBST(mandir)
+ 
+ # Create files
+ echo .
+diff -up sysstat-9.0.6.1/Makefile.in.pom sysstat-9.0.6.1/Makefile.in
+--- sysstat-9.0.6.1/Makefile.in.pom	2009-09-12 20:59:04.000000000 +0200
++++ sysstat-9.0.6.1/Makefile.in	2010-09-23 17:38:22.000000000 +0200
+@@ -45,10 +45,7 @@ endif
+ BIN_DIR = @bindir@
+ 
+ ifndef MAN_DIR
+-# With recent versions of autoconf, mandir defaults to ${datarootdir}/man
+-# (i.e. $prefix/share/man) which is not necessarily in man path!
+-# MAN_DIR = @mandir@
+-MAN_DIR = @AuxMandir@
++MAN_DIR = @mandir@
+ endif
+ MAN1_DIR = $(MAN_DIR)/man1
+ MAN8_DIR = $(MAN_DIR)/man8
+diff -up sysstat-9.0.6.1/.pom sysstat-9.0.6.1/
diff --git a/sysstat-9.0.6.1-sadc_opt.patch b/sysstat-9.0.6.1-sadc_opt.patch
new file mode 100644
index 0000000..3995171
--- /dev/null
+++ b/sysstat-9.0.6.1-sadc_opt.patch
@@ -0,0 +1,175 @@
+diff -up sysstat-9.0.6.1/configure.in.opt sysstat-9.0.6.1/configure.in
+--- sysstat-9.0.6.1/configure.in.opt	2010-09-23 18:45:52.000000000 +0200
++++ sysstat-9.0.6.1/configure.in	2010-09-23 18:45:52.000000000 +0200
+@@ -505,6 +505,7 @@ AC_CONFIG_FILES([man/sa2.8:man/sa2.in])	
+ AC_CONFIG_FILES([man/sadc.8:man/sadc.in])	# File must be renamed
+ AC_CONFIG_FILES([man/sadf.1:man/sadf.in])	# File must be renamed
+ AC_CONFIG_FILES([man/sar.1:man/sar.in])		# File must be renamed
++AC_CONFIG_FILES([man/sysstat.5:man/sysstat.in])	# File must be renamed
+ AC_CONFIG_FILES([contrib/isag/isag], [chmod +x contrib/isag/isag]) # Permissions must be changed
+ 
+ AC_OUTPUT(Makefile)
+diff -up sysstat-9.0.6.1/Makefile.in.opt sysstat-9.0.6.1/Makefile.in
+--- sysstat-9.0.6.1/Makefile.in.opt	2010-09-23 18:45:52.000000000 +0200
++++ sysstat-9.0.6.1/Makefile.in	2010-09-23 18:54:52.000000000 +0200
+@@ -48,6 +48,7 @@ ifndef MAN_DIR
+ MAN_DIR = @mandir@
+ endif
+ MAN1_DIR = $(MAN_DIR)/man1
++MAN5_DIR = $(MAN_DIR)/man5
+ MAN8_DIR = $(MAN_DIR)/man8
+ 
+ ifndef DOC_DIR
+@@ -214,10 +215,11 @@ nls/sysstat.pot: $(wildcard *.c)
+ .PHONY: clean distclean install install_base install_all uninstall \
+ 	uninstall_base uninstall_all dist bdist
+ 
+-install_man: man/sadc.8 man/sar.1 man/sadf.1 man/sa1.8 man/sa2.8
++install_man: man/sadc.8 man/sar.1 man/sadf.1 man/sa1.8 man/sa2.8 man/sysstat.5
+ ifeq ($(INSTALL_DOC),y)
+ 	mkdir -p $(DESTDIR)$(MAN1_DIR)
+ 	mkdir -p $(DESTDIR)$(MAN8_DIR)
++	mkdir -p $(DESTDIR)$(MAN5_DIR)
+ 	rm -f $(DESTDIR)$(MAN8_DIR)/sa1.8*
+ 	$(INSTALL_DATA) $(MANGRPARG) man/sa1.8 $(DESTDIR)$(MAN8_DIR)
+ 	rm -f $(DESTDIR)$(MAN8_DIR)/sa2.8*
+@@ -234,6 +236,8 @@ ifeq ($(INSTALL_DOC),y)
+ 	$(INSTALL_DATA) $(MANGRPARG) man/mpstat.1 $(DESTDIR)$(MAN1_DIR)
+ 	rm -f $(DESTDIR)$(MAN1_DIR)/pidstat.1*
+ 	$(INSTALL_DATA) $(MANGRPARG) man/pidstat.1 $(DESTDIR)$(MAN1_DIR)
++	rm -f $(DESTDIR)$(MAN5_DIR)/sysstat.5*
++	$(INSTALL_DATA) $(MANGRPARG) man/sysstat.5 $(DESTDIR)$(MAN5_DIR)
+ ifeq ($(INSTALL_ISAG),y)
+ 	$(INSTALL_DATA) $(MANGRPARG) contrib/isag/isag.1 $(DESTDIR)$(MAN1_DIR)
+ endif
+@@ -246,6 +250,7 @@ ifeq ($(COMPRESS_MANPG),y)
+ 	$(ZIP) $(DESTDIR)$(MAN1_DIR)/iostat.1
+ 	$(ZIP) $(DESTDIR)$(MAN1_DIR)/mpstat.1
+ 	$(ZIP) $(DESTDIR)$(MAN1_DIR)/pidstat.1
++	$(ZIP) $(DESTDIR)$(MAN5_DIR)/sysstat.5
+ ifeq ($(INSTALL_ISAG),y)
+ 	$(ZIP) $(DESTDIR)$(MAN1_DIR)/isag.1
+ endif
+@@ -387,6 +392,7 @@ ifeq ($(INSTALL_DOC),y)
+ 	rm -f $(DESTDIR)$(MAN1_DIR)/iostat.1*
+ 	rm -f $(DESTDIR)$(MAN1_DIR)/mpstat.1*
+ 	rm -f $(DESTDIR)$(MAN1_DIR)/pidstat.1*
++	rm -f $(DESTDIR)$(MAN5_DIR)/sysstat.5*
+ ifeq ($(INSTALL_ISAG),y)
+ 	rm -f $(DESTDIR)$(MAN1_DIR)/isag.1
+ endif
+diff -up sysstat-9.0.6.1/man/sadc.in.opt sysstat-9.0.6.1/man/sadc.in
+--- sysstat-9.0.6.1/man/sadc.in.opt	2010-09-23 18:45:52.000000000 +0200
++++ sysstat-9.0.6.1/man/sadc.in	2010-09-23 18:45:52.000000000 +0200
+@@ -201,6 +201,7 @@ Sebastien Godard (sysstat <at> orange.fr
+ .BR sar (1),
+ .BR sa1 (8),
+ .BR sa2 (8),
+-.BR sadf (1)
++.BR sadf (1),
++.BR sysstat (5)
+ 
+ .I http://pagesperso-orange.fr/sebastien.godard/
+diff -up sysstat-9.0.6.1/man/sysstat.in.opt sysstat-9.0.6.1/man/sysstat.in
+--- sysstat-9.0.6.1/man/sysstat.in.opt	2010-09-23 18:45:52.000000000 +0200
++++ sysstat-9.0.6.1/man/sysstat.in	2010-09-23 18:45:52.000000000 +0200
+@@ -0,0 +1,35 @@
++.TH SYSSTAT 5 "SEPTEMBER 2010" Linux "Linux User's Manual" -*- nroff -*-
++.SH NAME
++sysstat \- sysstat configuration file
++.SH DESCRIPTION
++The
++.B sysstat
++configuration file contains variables which configure sysstat logging.
++It is possible to set these variables:
++.TP
++.B HISTORY
++The number of days the log files will be kept for on the machine,
++then they will be removed.
++The default value is 7.
++
++.TP
++.B COMPRESSAFTER
++The number of log files which should not be compressed,
++older files will be compressed using either gzip of bzip2.
++The default value is 10.
++
++.TP
++.B SADC_OPTIONS
++Options passed to sadc generating regular logs.
++Logging of various additional data can be switched on.  See
++.B sadc
++man page.
++The option is used only when a new log file is created, thus the change does not affect the log file that already exists.
++The default value is "-S DISK".
++
++
++.SH FILES
++.B @SYSCONFIG_DIR@/sysstat
++
++.SH SEE ALSO
++.BR sadc(1)
+\ No newline at end of file
+diff -up sysstat-9.0.6.1/sa1.in.opt sysstat-9.0.6.1/sa1.in
+--- sysstat-9.0.6.1/sa1.in.opt	2009-09-12 20:59:04.000000000 +0200
++++ sysstat-9.0.6.1/sa1.in	2010-09-23 18:45:52.000000000 +0200
+@@ -6,6 +6,7 @@
+ #@(#) sa1: Collect and store binary data in system activity data file.
+ #
+ HISTORY=0
++SADC_OPTIONS="-S DISK"
+ SYSCONFIG_DIR=@SYSCONFIG_DIR@
+ [ -r ${SYSCONFIG_DIR}/sysstat ] && . ${SYSCONFIG_DIR}/sysstat
+ if [ ${HISTORY} -gt 28 ]
+@@ -38,8 +39,8 @@ then
+ # Note: Stats are written at the end of previous file *and* at the
+ # beginning of the new one (when there is a file rotation) only if
+ # outfile has been specified as '-' on the command line...
+-	exec ${ENDIR}/sadc -F -L 1 1 -
++	exec ${ENDIR}/sadc -F -L $SADC_OPTIONS 1 1 -
+ else
+-	exec ${ENDIR}/sadc -F -L $* -
++	exec ${ENDIR}/sadc -F -L $SADC_OPTIONS $* -
+ fi
+ 
+diff -up sysstat-9.0.6.1/sysstat.crond.in.opt sysstat-9.0.6.1/sysstat.crond.in
+--- sysstat-9.0.6.1/sysstat.crond.in.opt	2009-09-12 20:59:04.000000000 +0200
++++ sysstat-9.0.6.1/sysstat.crond.in	2010-09-23 18:45:52.000000000 +0200
+@@ -1,6 +1,6 @@
+ # Run system activity accounting tool every @CRON_INTERVAL@ minutes
+-*/@CRON_INTERVAL@ * * * * @CRON_OWNER@ @SA_LIB_DIR@/sa1 -S DISK 1 1
+-# 0 * * * * @CRON_OWNER@ @SA_LIB_DIR@/sa1 -S DISK @CRON_INTERVAL_SEC@ @CRON_COUNT@ &
++*/@CRON_INTERVAL@ * * * * @CRON_OWNER@ @SA_LIB_DIR@/sa1 1 1
++# 0 * * * * @CRON_OWNER@ @SA_LIB_DIR@/sa1 @CRON_INTERVAL_SEC@ @CRON_COUNT@ &
+ # Generate a daily summary of process accounting at 23:53
+ 53 23 * * * @CRON_OWNER@ @SA_LIB_DIR@/sa2 -A
+ 
+diff -up sysstat-9.0.6.1/sysstat.in.opt sysstat-9.0.6.1/sysstat.in
+--- sysstat-9.0.6.1/sysstat.in.opt	2010-09-23 18:45:52.000000000 +0200
++++ sysstat-9.0.6.1/sysstat.in	2010-09-23 18:45:52.000000000 +0200
+@@ -18,14 +18,13 @@
+ 
+ RETVAL=0
+ SYSCONFIG_DIR=@SYSCONFIG_DIR@
+-SADC_OPTIONS="-S DISK"
+ 
+ # See how we were called.
+ case "$1" in
+   start)
+ 	exitCodeIndicator="$(mktemp /tmp/sysstat-XXXXXX)" || exit 1
+ 	echo -n "Calling the system activity data collector (sadc): "
+-	@SU_C_OWNER@ @QUOTE@ @SA_LIB_DIR@/sa1 --boot ${SADC_OPTIONS} || rm -f ${exitCodeIndicator} @QUOTE@
++	@SU_C_OWNER@ @QUOTE@ @SA_LIB_DIR@/sa1 --boot || rm -f ${exitCodeIndicator} @QUOTE@
+ 
+ 	# Try to guess if sadc was successfully launched. The difficulty
+ 	# here is that the exit code is lost when the above command is
+diff -up sysstat-9.0.6.1/sysstat.sysconfig.in.opt sysstat-9.0.6.1/sysstat.sysconfig.in
+--- sysstat-9.0.6.1/sysstat.sysconfig.in.opt	2009-09-12 20:59:04.000000000 +0200
++++ sysstat-9.0.6.1/sysstat.sysconfig.in	2010-09-23 18:45:52.000000000 +0200
+@@ -8,3 +8,6 @@ HISTORY=@HISTORY@
+ # Compress (using gzip or bzip2) sa and sar files older than (in days):
+ COMPRESSAFTER=@COMPRESSAFTER@
+ 
++# Parameters for system activity collector (see sadc man-page) which
++# are used for the generation of log files
++SADC_OPTIONS="-S DISK"
diff --git a/sysstat.spec b/sysstat.spec
index 3a8fc6e..0eeb2b2 100644
--- a/sysstat.spec
+++ b/sysstat.spec
@@ -1,6 +1,6 @@
 Name: sysstat
 Version: 9.0.6.1
-Release: 8%{?dist}
+Release: 9%{?dist}
 Summary: The sar and iostat system monitoring commands
 License: GPLv2+
 Group: Applications/System
@@ -17,6 +17,8 @@ Patch4: sysstat-9.0.6.1-sec.patch
 Patch5: sysstat-9.0.6.1-mp_isag.patch
 Patch6: sysstat-9.0.6.1-sar-tickless.patch
 Patch7: sysstat-9.0.6.1-config.patch
+Patch8: sysstat-9.0.6.1-mandir.patch
+Patch9: sysstat-9.0.6.1-sadc_opt.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
 
@@ -41,13 +43,15 @@ activity.
 %patch5 -p1 -b .isag
 %patch6 -p1 -b .tl2
 %patch7 -p1 -b .dmg
+%patch8 -p1 -b .mandir
+%patch9 -p1 -b .opt
 iconv -f windows-1252 -t utf8 CREDITS > CREDITS.aux
 mv CREDITS.aux CREDITS
 
 %build
-# neded because of patch7
+# neded because of patch7 and patch8
 autoreconf -fi
-./configure --prefix=%{_prefix}  --disable-man-group --mandir=%{_mandir} sa_lib_dir=%{_libdir}/sa --libdir=%{_libdir}
+./configure --prefix=%{_prefix}  --disable-man-group  sa_lib_dir=%{_libdir}/sa --libdir=%{_libdir}
 CFLAGS="$RPM_OPT_FLAGS -DSADC_PATH=\\\"%{_libdir}/sa/sadc\\\""
 make CFLAGS="$CFLAGS" LFLAGS=""
 
@@ -86,10 +90,15 @@ rm -rf %{buildroot}
 %{_bindir}/*
 %{_libdir}/sa
 %{_mandir}/man1/*
+%{_mandir}/man5/*
 %{_mandir}/man8/*
 %{_localstatedir}/log/sa
 
 %changelog
+* Thu Sep 23 2010 Ivana Hutarova Varekova <varekova at redhat.com> - 9.0.6.1-9
+- add the mandir patch
+- add the possibility to sed sadc cron options
+
 * Tue Sep 21 2010 Ivana Hutarova Varekova <varekova at redhat.com> - 9.0.6.1-8
 - add necessary dependency (autoconf), necessary because of patch7
 


More information about the scm-commits mailing list