diff --git a/.cvsignore b/.cvsignore index e89ee38..ff126e8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -sysstat-7.0.4.tar.bz2 +sysstat-8.0.1.tar.bz2 diff --git a/sources b/sources index ea96584..bbb8d90 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -46a6af9c5486809c4f1fb4f8fcdf2684 sysstat-7.0.4.tar.bz2 +487ee172b2c029ec52ebfd2b803bf8fe sysstat-8.0.1.tar.bz2 diff --git a/sysstat-4.0.1-config.patch b/sysstat-4.0.1-config.patch deleted file mode 100644 index 689bd41..0000000 --- a/sysstat-4.0.1-config.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- sysstat-6.0.1/build/CONFIG.config 2005-06-25 11:14:21.000000000 +0200 -+++ sysstat-6.0.1/build/CONFIG 2005-10-07 14:33:05.400464184 +0200 -@@ -2,8 +2,8 @@ - # (C) 2000 Sebastien GODARD (sysstat wanadoo.fr) - - # Directories --PREFIX = /usr/local --SA_LIB_DIR = /usr/local/lib/sa -+PREFIX = /usr -+SA_LIB_DIR = /usr/lib/sa - SADC_PATH = ${SA_LIB_DIR}/sadc - SA_DIR = /var/log/sa - MAN_DIR = ${PREFIX}/man -@@ -21,17 +21,19 @@ - endif - - # Uncomment this to enable workaround for Linux kernel SMP race condition --#SAS_DFLAGS += -DSMP_RACE -+SAS_DFLAGS += -DSMP_RACE - - # Man page group - MAN_GROUP = root - -+IGNORE_MAN_GROUP = y -+ - # Crontab owner - CRON_OWNER = adm - - # Run-command directories --RC_DIR = /etc/rc.d --INIT_DIR = /etc/rc.d/init.d -+RC_DIR = /etc -+INIT_DIR = /etc/init.d - INITD_DIR = init.d - - INSTALL_CRON = n diff --git a/sysstat-7.0.3-debuginfo.patch b/sysstat-7.0.3-debuginfo.patch deleted file mode 100644 index c8d364f..0000000 --- a/sysstat-7.0.3-debuginfo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- sysstat-7.0.3/Makefile.pom 2006-10-22 18:27:26.000000000 +0200 -+++ sysstat-7.0.3/Makefile 2007-01-30 14:25:01.000000000 +0100 -@@ -38,7 +38,7 @@ - - # Compiler flags - CFLAGS = -Wall -Wstrict-prototypes -pipe -O2 -fno-strength-reduce --LFLAGS = -s -+LFLAGS = - # SAS_DFLAGS may also contain SMP_RACE definition - SAS_DFLAGS += -DSA_DIR=\"$(SA_DIR)\" -DSADC_PATH=\"$(SADC_PATH)\" - diff --git a/sysstat-7.0.4-cve_2007_3852.patch b/sysstat-7.0.4-cve_2007_3852.patch deleted file mode 100644 index 460f859..0000000 --- a/sysstat-7.0.4-cve_2007_3852.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- sysstat-7.0.4/sysstat.in.cve3852 2007-08-15 15:15:04.000000000 +0200 -+++ sysstat-7.0.4/sysstat.in 2007-08-15 15:17:31.000000000 +0200 -@@ -20,13 +20,11 @@ - - RETVAL=0 - HISTORY=0 --TMPDIR=/var/run/ --# Remove flag indicating that sadc was successfully launched --rm -f ${TMPDIR}sysstat.run - - # See how we were called. - case "$1" in - start) -+ exitCodeIndicator="$(mktemp /tmp/sysstat-XXXXXX)" || exit 1 - [ -r /etc/sysconfig/sysstat ] && . /etc/sysconfig/sysstat - if [ ${HISTORY} -gt 28 ] - then -@@ -43,15 +41,15 @@ case "$1" in - CHOWN ${CURRENTDIR} ${CURRENTFILE} ${CURRENTDIR}/${CURRENTFILE} - fi - echo -n "Calling the system activity data collector (sadc): " -- SU SA_LIB_DIR/sadc -F -L - && touch ${TMPDIR}sysstat.run QUOTE -+ SU SA_LIB_DIR/sadc -F -L - || 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 - # run via "su foo -c ..." -- if [ ! -f ${TMPDIR}sysstat.run ]; then -- RETVAL=1 -+ if [ -f "${exitCodeIndicator}" ]; then -+ rm -f ${exitCodeIndicator} - else -- rm -f ${TMPDIR}sysstat.run -+ RETVAL=1 - fi - echo - ;; diff --git a/sysstat-7.0.4-links.patch b/sysstat-7.0.4-links.patch index 5e7a8b1..e24e258 100644 --- a/sysstat-7.0.4-links.patch +++ b/sysstat-7.0.4-links.patch @@ -1,14 +1,15 @@ ---- sysstat-7.0.4/sa2.in.link 2007-01-25 21:13:10.000000000 +0100 -+++ sysstat-7.0.4/sa2.in 2007-03-23 11:49:50.000000000 +0100 -@@ -37,9 +37,9 @@ - [ -f "$DFILE" ] || exit 0 +diff -up sysstat-8.0.1/sa2.in.pom sysstat-8.0.1/sa2.in +--- sysstat-8.0.1/sa2.in.pom 2007-09-08 14:18:25.000000000 +0200 ++++ sysstat-8.0.1/sa2.in 2007-10-22 18:50:25.000000000 +0200 +@@ -48,9 +48,9 @@ DFILE=${CURRENTDIR}/${CURRENTFILE} cd ${ENDIR} + [ -L ${RPT} ] && rm -f ${RPT} ${ENDIR}/sar $* -f ${DFILE} > ${RPT} -find ${DDIR} \( -name 'sar??' -o -name 'sa??' -o -name 'sar??.gz' -o -name 'sa??.gz' \) \ +find ${DDIR}/ \( -name 'sar??' -o -name 'sa??' -o -name 'sar??.gz' -o -name 'sa??.gz' \) \ -mtime +"${HISTORY}" -exec rm -f {} \; -find ${DDIR} \( -name 'sar??' -o -name 'sa??' \) -type f -mtime +"${COMPRESSAFTER}" \ +find ${DDIR}/ \( -name 'sar??' -o -name 'sa??' \) -type f -mtime +"${COMPRESSAFTER}" \ - -exec gzip {} \; > /dev/null 2>&1 - cd ${DDIR} - rmdir [0-9]????? > /dev/null 2>&1 + -exec gzip -9 {} \; > /dev/null 2>&1 + # Remove broken links + for f in `find ${DDIR} \( -name 'sar??' -o -name 'sa??' \) -type l`; do diff --git a/sysstat-7.0.4-statreset.patch b/sysstat-7.0.4-statreset.patch index 35a66bc..caacc88 100644 --- a/sysstat-7.0.4-statreset.patch +++ b/sysstat-7.0.4-statreset.patch @@ -1,5 +1,6 @@ ---- sysstat-7.0.4/sysstat.in.stat 2007-01-22 14:02:54.000000000 +0100 -+++ sysstat-7.0.4/sysstat.in 2007-02-12 13:45:44.000000000 +0100 +diff -up sysstat-8.0.1/sysstat.in.stat sysstat-8.0.1/sysstat.in +--- sysstat-8.0.1/sysstat.in.stat 2007-09-24 16:13:20.000000000 +0200 ++++ sysstat-8.0.1/sysstat.in 2007-10-22 17:28:14.000000000 +0200 @@ -1,6 +1,9 @@ #!/bin/sh # @@ -7,7 +8,7 @@ +# sysstat Reset the system activity logs +# +# chkconfig: 12345 01 99 -+# description: Reset the system activity logs - # INIT_DIR/sysstat - # 2000/01/22 - Sebastien Godard ++# short-description: Reset the system activity logs + # @INIT_DIR@/sysstat + # (C) 2000-2007 Sebastien Godard (sysstat orange.fr) # diff --git a/sysstat-7.0.4-tmp.patch b/sysstat-7.0.4-tmp.patch deleted file mode 100644 index fecda3c..0000000 --- a/sysstat-7.0.4-tmp.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- sysstat-7.0.4/sysstat.in.tmp 2007-01-22 14:02:54.000000000 +0100 -+++ sysstat-7.0.4/sysstat.in 2007-02-12 13:57:41.000000000 +0100 -@@ -17,8 +17,9 @@ - - RETVAL=0 - HISTORY=0 -+TMPDIR=/var/run/ - # Remove flag indicating that sadc was successfully launched --rm -f /tmp/sysstat.run -+rm -f ${TMPDIR}sysstat.run - - # See how we were called. - case "$1" in -@@ -39,15 +40,15 @@ - CHOWN ${CURRENTDIR} ${CURRENTFILE} ${CURRENTDIR}/${CURRENTFILE} - fi - echo -n "Calling the system activity data collector (sadc): " -- SU SA_LIB_DIR/sadc -F -L - && touch /tmp/sysstat.run QUOTE -+ SU SA_LIB_DIR/sadc -F -L - && touch ${TMPDIR}sysstat.run QUOTE - - # Try to guess if sadc was successfully launched. The difficulty - # here is that the exit code is lost when the above command is - # run via "su foo -c ..." -- if [ ! -f /tmp/sysstat.run ]; then -+ if [ ! -f ${TMPDIR}sysstat.run ]; then - RETVAL=1 - else -- rm -f /tmp/sysstat.run -+ rm -f ${TMPDIR}sysstat.run - fi - echo - ;; diff --git a/sysstat.crondaily b/sysstat.crondaily deleted file mode 100644 index 2a7ba19..0000000 --- a/sysstat.crondaily +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# generate a daily summary of process accounting. -umask 0022 -/usr/lib/sa/sa2 -A diff --git a/sysstat.spec b/sysstat.spec index 8caee54..093c0a1 100644 --- a/sysstat.spec +++ b/sysstat.spec @@ -1,21 +1,16 @@ Name: sysstat -Version: 7.0.4 -Release: 3%{?dist} +Version: 8.0.1 +Release: 1%{?dist} Summary: The sar and iostat system monitoring commands License: GPL Group: Applications/System URL: http://perso.orange.fr/sebastien.godard/ Source: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.bz2 Source1: sysstat.crond -Source2: sysstat.crondaily Source3: sysstat.sysconfig -Patch0: sysstat-4.0.1-config.patch Patch3: sysstat-7.0.4-statreset.patch Patch6: sysstat-5.0.5-append-msg.patch -Patch9: sysstat-7.0.4-tmp.patch -Patch10: sysstat-7.0.3-debuginfo.patch Patch11: sysstat-7.0.4-links.patch -Patch12: sysstat-7.0.4-cve_2007_3852.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -31,19 +26,17 @@ activity. %prep %setup -q -%patch0 -p1 -b .config %patch3 -p1 -b .statreset %patch6 -p1 -b .append-msg -%patch9 -p1 -b .tmp -%patch10 -p1 -b .db %patch11 -p1 -b .link -%patch12 -p1 -b .cve3852 %build # FIXME: I need to fix the upstream Makefile to use LIBDIR et al. properly and # send the upstream maintainer a patch. +# add DOCDIR to the configure part +./configure --disable-man-group --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} CFLAGS="$RPM_OPT_FLAGS -DSADC_PATH=\\\"%{_libdir}/sa/sadc\\\"" -make CFLAGS="$CFLAGS" PREFIX=%{_prefix} LIB_DIR=%{_libdir} SA_LIB_DIR=%{_libdir}/sa MAN_DIR=%{_mandir} DATA_DIR=%{_datadir} DOC_DIR=%{_docdir} %{?_smp_mflags} +make CFLAGS="$CFLAGS" LFLAGS="" DOC_DIR=%{_docdir} %{?_smp_mflags} # Thou shalt not write to source files or patches rm -f sysstat.crond @@ -56,13 +49,10 @@ cat %{SOURCE1} > sysstat.crond %install rm -rf %{buildroot} -%makeinstall PREFIX=%{_prefix} SA_LIB_DIR=%{_libdir}/sa LIB_DIR=%{_libdir} MAN_DIR=%{_mandir} DATA_DIR=%{_datadir} DOC_DIR=%{_docdir} INIT_DIR=%{_initrddir} -#make install MAN_DIR=%{_mandir} +make install IGNORE_MAN_GROUP=y DOC_DIR=%{_docdir} INIT_DIR=%{_initrddir} mkdir -p %{buildroot}/etc/{cron.daily,cron.d,sysconfig} - install -m 0644 sysstat.crond %{buildroot}/etc/cron.d/sysstat -#install %{SOURCE2} %{buildroot}/etc/cron.daily/sysstat install -m 0644 %{SOURCE3} %{buildroot}/etc/sysconfig/sysstat mkdir -p %{buildroot}%{_initrddir} @@ -73,21 +63,6 @@ rm -f %{buildroot}/usr/share/doc/* %find_lang %{name} -#FIXME: Make sure this trigger is actually correct and relevant still. -%triggerpostun -- sysstat <= 3.3.3-1 -# earlier versions of sysstat had crontabs done in a bad way. fix it. -if [ `id -u` = "0" -a "$1" -ge "2" ]; then - if grep -E -v 'sysstat|sa1|sa2' /etc/crontab > /etc/crontab.tmp.$$; then - cp -dpf /etc/crontab /etc/crontab.save.$$ && \ - if mv /etc/crontab.tmp.$$ /etc/crontab; then - chmod --reference=/etc/crontab.save.$$ /etc/crontab && \ - rm -f /etc/crontab.save.$$ - else - mv -f /etc/crontab.save.$$ /etc/crontab - fi - fi -fi - %post /sbin/chkconfig --add sysstat @@ -116,6 +91,11 @@ rm -rf %{buildroot} /var/log/sa %changelog +* Mon Oct 22 2007 Ivana Varekova - 8.0.1-1 +- update to 8.0.1 +- remove useless patches +- spec file cleanup + * Wed Aug 15 2007 Ivana Varekova - 7.0.4-3 - fix cve-2007-3852 - sysstat insecure temporary file usage