Use /var/log/sa for statedir of sysstat, in stead of $out/var/lib/sa. This path cannot be overriden at runtime, so choosing a 'sane' default.

This commit is contained in:
Rob Vermaas 2012-08-14 14:14:55 +02:00
parent 4f7917ac62
commit a19a68e93b
2 changed files with 40 additions and 1 deletions

View file

@ -13,9 +13,11 @@ stdenv.mkDerivation rec {
preConfigure = ''
export PATH_CP=$(type -tp cp)
export PATH_CHKCONFIG=/no-such-program
makeFlagsArray=(SA_DIR=$out/var/log/sa SYSCONFIG_DIR=$out/etc CHOWN=true IGNORE_MAN_GROUP=y)
makeFlagsArray=(SA_DIR=/var/log/sa SYSCONFIG_DIR=$out/etc CHOWN=true IGNORE_MAN_GROUP=y)
'';
patches = [ ./no-install-statedir.patch ];
meta = {
homepage = http://sebastien.godard.pagesperso-orange.fr/;
description = "A collection of performance monitoring tools for Linux (such as sar, iostat and pidstat)";

View file

@ -0,0 +1,37 @@
diff -rc sysstat-10.1.1/Makefile.in sysstat-10.1.1-new/Makefile.in
*** sysstat-10.1.1/Makefile.in 2012-01-02 14:36:00.000000000 +0100
--- sysstat-10.1.1-new/Makefile.in 2012-08-14 14:11:17.676124739 +0200
***************
*** 309,315 ****
install_base: all sa1 sa2 sysstat.sysconfig install_man install_nls \
contrib/isag/isag
mkdir -p $(DESTDIR)$(SA_LIB_DIR)
! mkdir -p $(DESTDIR)$(SA_DIR)
ifeq ($(CLEAN_SA_DIR),y)
find $(DESTDIR)$(SA_DIR) \( -name 'sar??' -o -name 'sa??' -o -name 'sar??.gz' -o -name 'sa??.gz' \) \
-exec rm -f {} \;
--- 309,315 ----
install_base: all sa1 sa2 sysstat.sysconfig install_man install_nls \
contrib/isag/isag
mkdir -p $(DESTDIR)$(SA_LIB_DIR)
! #mkdir -p $(DESTDIR)$(SA_DIR)
ifeq ($(CLEAN_SA_DIR),y)
find $(DESTDIR)$(SA_DIR) \( -name 'sar??' -o -name 'sa??' -o -name 'sar??.gz' -o -name 'sa??.gz' \) \
-exec rm -f {} \;
***************
*** 344,350 ****
install_all: install_base cron/crontab sysstat \
cron/sysstat.crond cron/sysstat.cron.daily cron/sysstat.cron.hourly
! $(CHOWN) $(CRON_OWNER) $(DESTDIR)$(SA_DIR)
if [ -d $(DESTDIR)/etc/cron.d ]; then \
$(INSTALL_DATA) cron/sysstat.crond $(DESTDIR)/etc/cron.d/sysstat; \
elif [ -d $(DESTDIR)/etc/cron.hourly -a -d $(DESTDIR)/etc/cron.daily ]; then \
--- 344,350 ----
install_all: install_base cron/crontab sysstat \
cron/sysstat.crond cron/sysstat.cron.daily cron/sysstat.cron.hourly
! #$(CHOWN) $(CRON_OWNER) $(DESTDIR)$(SA_DIR)
if [ -d $(DESTDIR)/etc/cron.d ]; then \
$(INSTALL_DATA) cron/sysstat.crond $(DESTDIR)/etc/cron.d/sysstat; \
elif [ -d $(DESTDIR)/etc/cron.hourly -a -d $(DESTDIR)/etc/cron.daily ]; then \