diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2010-05-19 08:58:23 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:43:05 +0200 |
commit | b76270bf9e6dd375e495fec92140a79a79415d27 (patch) | |
tree | 3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/ap/sysstat | |
parent | 5a12e7c134274dba706667107d10d231517d3e05 (diff) | |
download | current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz |
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010
Slackware 13.1 x86_64 stable is released!
Lots of thanks are due -- see the RELEASE_NOTES and the rest of the
ChangeLog for credits. The ISOs are on their way to replication,
a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We are taking pre-orders now at store.slackware.com, and offering
a discount if you sign up for a subscription. Consider picking up
a copy to help support the project. Thanks again to the Slackware
community for testing, contributing, and generally holding us to a
high level of quality. :-)
Enjoy!
Diffstat (limited to 'source/ap/sysstat')
-rw-r--r-- | source/ap/sysstat/doinst.sh | 34 | ||||
-rw-r--r-- | source/ap/sysstat/slack-desc | 10 | ||||
-rwxr-xr-x | source/ap/sysstat/sysstat.SlackBuild | 111 | ||||
-rw-r--r-- | source/ap/sysstat/sysstat.etc.sysstat.diff | 46 | ||||
-rw-r--r-- | source/ap/sysstat/sysstat.prefix.usr.diff | 42 | ||||
-rw-r--r-- | source/ap/sysstat/sysstat.var.run.diff | 28 |
6 files changed, 120 insertions, 151 deletions
diff --git a/source/ap/sysstat/doinst.sh b/source/ap/sysstat/doinst.sh new file mode 100644 index 00000000..b0f71a91 --- /dev/null +++ b/source/ap/sysstat/doinst.sh @@ -0,0 +1,34 @@ + +# Since /etc/sysstat/sysstat used to be the init script and now it is +# a config file, if we find an init script here, we have to move it +# out of the way: +if grep -wq "sadc was successfully launched" etc/sysstat/sysstat 1> /dev/null 2> /dev/null ; then + mv etc/sysstat/sysstat etc/sysstat/sysstat.obsolete.use.etc.rc.d.rc.sysstat +fi + +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/sysstat/sysstat.new + +# Keep same perms on rc.sysstat.new: +if [ -e etc/rc.d/rc.sysstat ]; then + cp -a etc/rc.d/rc.sysstat etc/rc.d/rc.sysstat.new.incoming + cat etc/rc.d/rc.sysstat.new > etc/rc.d/rc.sysstat.new.incoming + mv etc/rc.d/rc.sysstat.new.incoming etc/rc.d/rc.sysstat.new +fi + +# There's no reason for a user to edit rc.sysstat, so overwrite it: +if [ -r etc/rc.d/rc.sysstat.new ]; then + mv etc/rc.d/rc.sysstat.new etc/rc.d/rc.sysstat +fi + diff --git a/source/ap/sysstat/slack-desc b/source/ap/sysstat/slack-desc index e36d25ff..059836bf 100644 --- a/source/ap/sysstat/slack-desc +++ b/source/ap/sysstat/slack-desc @@ -6,14 +6,14 @@ # leave one space after the ':'. |-----handy-ruler------------------------------------------------------| -sysstat: sysstat (system performance monitoring tools) +sysstat: sysstat (System performance monitoring tools) sysstat: sysstat: The sysstat utilities are a collection of performance monitoring -sysstat: tools for Linux. These include sar, sadf, mpstat, iostat and sa -sysstat: tools. +sysstat: tools for Linux. These include the iostat, mpstat, pidstat, sadf, +sysstat: and sar tools. sysstat: sysstat: The sysstat utilities were written by Sebastien Godard. sysstat: -sysstat: -sysstat: +sysstat: For more information, see the sysstat web site: +sysstat: http://pagesperso-orange.fr/sebastien.godard/ sysstat: diff --git a/source/ap/sysstat/sysstat.SlackBuild b/source/ap/sysstat/sysstat.SlackBuild index 399bb4bd..5f5c0cfb 100755 --- a/source/ap/sysstat/sysstat.SlackBuild +++ b/source/ap/sysstat/sysstat.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2006, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,13 +22,42 @@ PKGNAM=sysstat -VERSION=${VERSION:-7.0.0} -ARCH=${ARCH:-x86_64} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-1} -if [ "$ARCH" = "x86_64" ]; then +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" + ARCHQUADLET="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" + ARCHQUADLET="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" + ARCHQUADLET="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + ARCHQUADLET="" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "arm" ]; then + SLKCFLAGS="-O2 -march=armv4t" + LIBDIRSUFFIX="" + ARCHQUADLET="-gnueabi" else + SLKCFLAGS="-O2" + ARCHQUADLET="" LIBDIRSUFFIX="" fi @@ -40,8 +69,8 @@ mkdir -p $TMP $PKG cd $TMP rm -rf ${PKGNAM}-${VERSION} -tar xjvf $CWD/${PKGNAM}-$VERSION.tar.bz2 -cd ${PKGNAM}-$VERSION +tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1 +cd ${PKGNAM}-$VERSION || exit 1 # Make sure ownerships and permissions are sane: chown -R root:root . @@ -51,25 +80,31 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Put the config file in /etc/sysstat, not /etc/sysconfig (a Red Hat thing): -zcat $CWD/sysstat.etc.sysstat.diff.gz | patch -p1 --verbose || exit 1 - -# PREFIX is hardcoded in some places, so this is just easier: -zcat $CWD/sysstat.prefix.usr.diff.gz | patch -p1 --verbose || exit 1 - -# Don't use /tmp in a script root will probably run... that's not good. -zcat $CWD/sysstat.var.run.diff.gz | patch -p1 --verbose || exit 1 - -make SA_LIB_DIR=/usr/lib${LIBDIRSUFFIX}/sa DESTDIR=$PKG || exit 1 -make install SA_LIB_DIR=/usr/lib${LIBDIRSUFFIX}/sa DESTDIR=$PKG || exit 1 - -# Yeah, technically this is an init script that could go in /etc/rc.d/, but -# I'd rather not put too many things in there. If you need this, I'm sure -# you will find it here: -mkdir -p $PKG/etc/sysstat -cp -a sysstat $PKG/etc/sysstat/sysstat -chown root:root $PKG/etc/sysstat/sysstat -chmod 755 $PKG/etc/sysstat/sysstat +# Configure: +CFLAGS="$SLKCFLAGS -DSADC_PATH=/usr/lib$LIBDIRSUFFIX/sa/sadc" \ +./configure \ + --disable-man-group \ + --prefix=/usr \ + --sysconfdir=/etc \ + conf_dir=/etc/sysstat \ + sa_lib_dir=/usr/lib$LIBDIRSUFFIX/sa \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --infodir=/usr/info \ + --docdir=/usr/doc/sysstat-$VERSION \ + --mandir=/usr/man \ + --disable-static \ + --build=$ARCH-slackware-linux$ARCHQUADLET || exit 1 + +# Build and install: +make $NUMJOBS || make || exit 1 +make install IGNORE_MAN_GROUP=y DESTDIR=$PKG || exit 1 + +mv $PKG/etc/sysstat/sysstat $PKG/etc/sysstat/sysstat.new + +mkdir -p $PKG/etc/rc.d +# Cosmetic touches: +sed -i 's?/etc/rc.d/init.d/sysstat?/etc/rc.d/rc.sysstat?g' sysstat +install -o0 -g0 -vpm644 sysstat $PKG/etc/rc.d/rc.sysstat.new # Strip binaries: ( cd $PKG @@ -92,14 +127,30 @@ if [ -d $PKG/usr/man ]; then ) fi -# Fix the documentation directory to preserve timestamps: -mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION -rm -f $PKG/usr/doc/${PKGNAM}-$VERSION/* +# Adjust the docs so that they are Slackware-locationised: +# We ignore the 'CHANGES' since they aren't relevant to the running of the system. +sed -i 's?/etc/sysconfig?/etc/sysstat?g' $PKG/usr/doc/$PKGNAM-$VERSION/{README,FAQ} +# "make install" installs the docs but doesn't preserve the time stamps: +for docfile in $( cd $PKG/usr/doc/$PKGNAM-$VERSION ; ls -1 ) ; do + touch -d "$( find $docfile -printf "%t\n" )" $PKG/usr/doc/$PKGNAM-$VERSION/$docfile +done +# Add crontab example scripts: +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION/cron-examples cp -a \ - COPYING CREDITS FAQ README TODO sysstat-7.0.0.lsm \ - $PKG/usr/doc/${PKGNAM}-$VERSION + crontab sysstat.cron.daily sysstat.cron.hourly sysstat.crond \ + sysstat.crond.sample \ + $PKG/usr/doc/${PKGNAM}-$VERSION/cron-examples + +# If there's a CHANGES file, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r CHANGES ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES + touch -r CHANGES $DOCSDIR/CHANGES +fi mkdir -p $PKG/install +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc cd $TMP/package-${PKGNAM} diff --git a/source/ap/sysstat/sysstat.etc.sysstat.diff b/source/ap/sysstat/sysstat.etc.sysstat.diff deleted file mode 100644 index f5cf1521..00000000 --- a/source/ap/sysstat/sysstat.etc.sysstat.diff +++ /dev/null @@ -1,46 +0,0 @@ ---- ./Makefile.orig 2006-07-05 10:46:04.000000000 -0500 -+++ ./Makefile 2006-08-14 21:40:38.000000000 -0500 -@@ -34,7 +34,7 @@ - MAN8_DIR = $(MAN_DIR)/man8 - DOC_DIR = $(PREFIX)/doc/sysstat-$(VERSION) - NLS_DIR = $(PREFIX)/share/locale --SYSCONFIG_DIR = /etc/sysconfig -+SYSCONFIG_DIR = /etc/sysstat - - # Compiler flags - CFLAGS = -Wall -Wstrict-prototypes -pipe -O2 -fno-strength-reduce ---- ./sa2.in.orig 2006-06-09 03:17:26.000000000 -0500 -+++ ./sa2.in 2006-08-14 21:38:35.000000000 -0500 -@@ -7,7 +7,7 @@ - # make history configurable - # - HISTORY=7 --[ -r /etc/sysconfig/sysstat ] && . /etc/sysconfig/sysstat -+[ -r /etc/sysstat/sysstat ] && . /etc/sysstat/sysstat - [ ${HISTORY} -gt 28 ] && HISTORY=28 - S_TIME_FORMAT=ISO ; export S_TIME_FORMAT - umask 0022 ---- ./README.orig 2006-07-05 10:51:54.000000000 -0500 -+++ ./README 2006-08-14 21:39:27.000000000 -0500 -@@ -91,8 +91,8 @@ - ${PREFIX}/doc/sysstat-x.y.z/* - /var/log/sa - ${INIT_DIR}/sysstat --/etc/sysconfig/sysstat --/etc/sysconfig/sysstat.ioconf -+/etc/sysstat/sysstat -+/etc/sysstat/sysstat.ioconf - /etc/cron.d/sysstat - /etc/rc.d/rc.sysstat for [SLACKWARE] - ${RC_DIR}/rc2.d/S03sysstat ---- ./ioconf.h.orig 2006-07-09 03:19:06.000000000 -0500 -+++ ./ioconf.h 2006-08-14 21:36:48.000000000 -0500 -@@ -20,7 +20,7 @@ - #define MAX_BLKDEV 255 - #endif - --#define IOCONF "/etc/sysconfig/sysstat.ioconf" -+#define IOCONF "/etc/sysstat/sysstat.ioconf" - - #define K_NODEV "nodev" - diff --git a/source/ap/sysstat/sysstat.prefix.usr.diff b/source/ap/sysstat/sysstat.prefix.usr.diff deleted file mode 100644 index c7c526b4..00000000 --- a/source/ap/sysstat/sysstat.prefix.usr.diff +++ /dev/null @@ -1,42 +0,0 @@ ---- ./build/Configure.sh.orig 2006-06-09 03:21:27.000000000 -0500 -+++ ./build/Configure.sh 2006-08-14 21:54:37.000000000 -0500 -@@ -10,10 +10,10 @@ - - # Installation directory - --PREFIX=`${ASK} 'Installation directory:' "/usr/local" "prefix"` -+PREFIX=`${ASK} 'Installation directory:' "/usr" "prefix"` - if [ ! -d ${PREFIX} ]; then -- echo "WARNING: Directory ${PREFIX} not found: Using default (/usr/local)." -- PREFIX=/usr/local -+ echo "WARNING: Directory ${PREFIX} not found: Using default (/usr)." -+ PREFIX=/usr - fi - - # sadc directory ---- ./build/CONFIG.def.orig 2006-06-09 03:20:56.000000000 -0500 -+++ ./build/CONFIG.def 2006-08-14 21:54:19.000000000 -0500 -@@ -2,8 +2,8 @@ - # (C) 2000-2006 Sebastien GODARD (sysstat <at> 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 - # Do not use ${PREFIX}/share/man by default: not necessarily in man path! ---- ./build/CONFIG.orig 2006-07-09 04:47:17.000000000 -0500 -+++ ./build/CONFIG 2006-08-14 21:54:10.000000000 -0500 -@@ -2,8 +2,8 @@ - # (C) 2000-2006 Sebastien GODARD (sysstat <at> 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 - # Do not use ${PREFIX}/share/man by default: not necessarily in man path! diff --git a/source/ap/sysstat/sysstat.var.run.diff b/source/ap/sysstat/sysstat.var.run.diff deleted file mode 100644 index 3b54f37e..00000000 --- a/source/ap/sysstat/sysstat.var.run.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- ./sysstat.in.orig 2006-07-05 10:58:00.000000000 -0500 -+++ ./sysstat.in 2006-08-14 22:03:13.000000000 -0500 -@@ -22,21 +22,21 @@ - - RETVAL=0 - # Remove flag indicating that sadc was successfully launched --rm -f /tmp/sysstat.run -+rm -f /var/run/sysstat.run - - # See how we were called. - case "$1" in - start) - 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 /var/run/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 /var/run/sysstat.run ]; then - RETVAL=1 - else -- rm -f /tmp/sysstat.run -+ rm -f /var/run/sysstat.run - fi - echo - ;; |