diff -Nru atsar-1.7/atsadc/Makefile atsar-1.7/atsadc/Makefile --- atsar-1.7/atsadc/Makefile 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/atsadc/Makefile 2004-07-08 09:56:18.000000000 -0300 @@ -7,4 +7,4 @@ fetchdef.o: ../include/atsar.h ../include/includes.h ../include/linuxstat.h clean: - -rm *.o atsadc + rm *.o diff -Nru atsar-1.7/atsar/funcdef.c atsar-1.7/atsar/funcdef.c --- atsar-1.7/atsar/funcdef.c 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/atsar/funcdef.c 2004-07-08 09:56:18.000000000 -0300 @@ -1328,67 +1328,6 @@ } int -dkline_26(time_t deltasec, time_t deltatic, time_t hz, - int ncpu, struct osrel *osr, char *tstamp) -{ - register int i, nr, lines; - double rd, wr, rs, ws; - char lastchar; - unsigned long deltams = deltatic * 1000 / hz; - struct dkstat *cur, *pre; - - - if ( (nr = getcset("partstat", (void **)&cur, (void **)&pre)) == 0) - return 0; - - for (i=0, lines=0; i < nr; i++, cur++, pre++) - { - if ( cur->readblocks == pre->readblocks && - cur->writblocks == pre->writblocks ) - continue; /* no activity on this partition */ - - /* - ** check if a new partition popped up during interval - */ - if ( (cur->major != pre->major || cur->minor != pre->minor) && - (pre->major != 0 || pre->minor != 0 ) ) - continue; - - rd = subtract(cur->readblocks, pre->readblocks); - wr = subtract(cur->writblocks, pre->writblocks); - rs = subtract(cur->readsectors, pre->readsectors); - ws = subtract(cur->writsectors, pre->writsectors); - - lastchar = cur->name[strlen(cur->name)-1]; - - /* - ** print info for entire disk - */ - if ( !isdigit(lastchar) ) - { - if (lines > 0) - printf ("%s ", tstamp); - - printf("disk%03d-%03d %10.2lf %6.2lf %7.2lf %6.2lf" - " %10.2lf\n", - cur->major, cur->minor, - rd * 1000.0 / deltams, - rs * 1000.0 / 2 / deltams, - wr * 1000.0 / deltams, - ws * 1000.0 / 2 / deltams, - (rd + wr) * 1000.0 / deltams); - lines++; - } - } - - if (lines == 0) - printf("\n"); - - return(1); - -} - -int dkline(time_t deltasec, time_t deltatic, time_t hz, int ncpu, struct osrel *osr, char *tstamp) { @@ -1400,8 +1339,10 @@ ** obtain the general statistics */ if (osr->rel >= 2 && osr->vers >= 6) - { - return(dkline_26(deltasec, deltatic, hz, ncpu, osr, tstamp)); + { + printf("counter-values in kernel version %d.%d:", + osr->rel, osr->vers); + return 0; } if ( !getcset("genstat", (void **)&cur, (void **)&pre) ) diff -Nru atsar-1.7/atsar/Makefile atsar-1.7/atsar/Makefile --- atsar-1.7/atsar/Makefile 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/atsar/Makefile 2004-07-08 09:56:18.000000000 -0300 @@ -7,4 +7,4 @@ funcdef.o: ../include/atsar.h ../include/includes.h ../include/linuxstat.h clean: - -rm *.o atsar + rm *.o diff -Nru atsar-1.7/debian/changelog atsar-1.7/debian/changelog --- atsar-1.7/debian/changelog 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/debian/changelog 2015-12-10 21:24:56.000000000 -0200 @@ -1,3 +1,25 @@ +atsar (1.7-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Migrated DH level to 9 to avoid a FTBFS. (Closes: #800264) + * To build twice, this package needed these changes: + - Migrated to DebSrc 3.0 to allow patches using quilt. + - Created a patch to fix all clean targets in all upstream + Makefiles. + - Added the debian/clean to remove binary changed files in + upstream place. + * debian/compat: added. + * debian/conffiles: removed to avoid the duplicate-conffile + error pointed by Lintian. + * debian/control: + - Added the ${misc:Depends} variable to provide the + right install dependencies. + - Bumped Standards-Version to 3.9.6. + * debian/rules: changed the binary-arch target to install + files in right place. + + -- Joao Eriberto Mota Filho Thu, 10 Dec 2015 20:44:44 -0200 + atsar (1.7-2) unstable; urgency=low * correct calculations for 2.6 -d :) diff -Nru atsar-1.7/debian/clean atsar-1.7/debian/clean --- atsar-1.7/debian/clean 1969-12-31 21:00:00.000000000 -0300 +++ atsar-1.7/debian/clean 2015-12-10 21:09:10.000000000 -0200 @@ -0,0 +1,2 @@ +atsadc/atsadc +atsar/atsar diff -Nru atsar-1.7/debian/compat atsar-1.7/debian/compat --- atsar-1.7/debian/compat 1969-12-31 21:00:00.000000000 -0300 +++ atsar-1.7/debian/compat 2015-12-09 23:21:01.000000000 -0200 @@ -0,0 +1 @@ +9 diff -Nru atsar-1.7/debian/conffiles atsar-1.7/debian/conffiles --- atsar-1.7/debian/conffiles 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/debian/conffiles 1969-12-31 21:00:00.000000000 -0300 @@ -1 +0,0 @@ -/etc/cron.d/atsar diff -Nru atsar-1.7/debian/control atsar-1.7/debian/control --- atsar-1.7/debian/control 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/debian/control 2015-12-10 20:40:22.000000000 -0200 @@ -2,12 +2,12 @@ Section: admin Priority: optional Maintainer: Michael Stone -Standards-Version: 3.6.1.0 -Build-Depends: debhelper +Standards-Version: 3.9.6 +Build-Depends: debhelper (>= 9) Package: atsar Architecture: any -Depends: ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Recommends: cron Description: system activity reporter Monitor system resources such as CPU, network, memory & disk I/O, and diff -Nru atsar-1.7/debian/patches/01_fix-makefiles.patch atsar-1.7/debian/patches/01_fix-makefiles.patch --- atsar-1.7/debian/patches/01_fix-makefiles.patch 1969-12-31 21:00:00.000000000 -0300 +++ atsar-1.7/debian/patches/01_fix-makefiles.patch 2015-12-10 21:04:44.000000000 -0200 @@ -0,0 +1,30 @@ +Description: fix all clean targets in all upstream Makefiles. +Author: Joao Eriberto Mota Filho +Last-Update: 2015-12-10 +--- atsar-1.7.orig/Makefile ++++ atsar-1.7/Makefile +@@ -13,7 +13,7 @@ all: + cd atsar; make "CFLAGS=$(CFLAGS)" + + clean: +- rm *.o ++ rm -f *.o + cd atsar; make clean + cd atsadc; make clean + +--- atsar-1.7.orig/atsadc/Makefile ++++ atsar-1.7/atsadc/Makefile +@@ -7,4 +7,4 @@ atsadc.o: ../include/atsar.h + fetchdef.o: ../include/atsar.h ../include/includes.h ../include/linuxstat.h + + clean: +- rm *.o ++ rm -f *.o +--- atsar-1.7.orig/atsar/Makefile ++++ atsar-1.7/atsar/Makefile +@@ -7,4 +7,4 @@ atsar.o: ../include/atsar.h + funcdef.o: ../include/atsar.h ../include/includes.h ../include/linuxstat.h + + clean: +- rm *.o ++ rm -f *.o diff -Nru atsar-1.7/debian/patches/series atsar-1.7/debian/patches/series --- atsar-1.7/debian/patches/series 1969-12-31 21:00:00.000000000 -0300 +++ atsar-1.7/debian/patches/series 2015-12-10 21:04:06.000000000 -0200 @@ -0,0 +1 @@ +01_fix-makefiles.patch diff -Nru atsar-1.7/debian/rules atsar-1.7/debian/rules --- atsar-1.7/debian/rules 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/debian/rules 2015-12-10 20:53:41.000000000 -0200 @@ -39,17 +39,17 @@ dh_testroot dh_clean -k - mkdir -p debian/tmp/usr/bin - cp atsar/atsar debian/tmp/usr/bin - mkdir -p debian/tmp/usr/lib/atsar - cp atsadc/atsadc debian/tmp/usr/lib/atsar - cp scripts/atsa1 debian/tmp/usr/lib/atsar - mkdir -p debian/tmp/usr/share/man/man1 - cp man/atsar.1 debian/tmp/usr/share/man/man1 - mkdir -p debian/tmp/usr/share/man/man8 - cp man/atsadc.1 debian/tmp/usr/share/man/man8/atsadc.8 - ln -s atsadc.8 debian/tmp/usr/share/man/man8/atsa1.8 - mkdir -p debian/tmp/var/log/atsar + mkdir -p debian/atsar/usr/bin + cp atsar/atsar debian/atsar/usr/bin + mkdir -p debian/atsar/usr/lib/atsar + cp atsadc/atsadc debian/atsar/usr/lib/atsar + cp scripts/atsa1 debian/atsar/usr/lib/atsar + mkdir -p debian/atsar/usr/share/man/man1 + cp man/atsar.1 debian/atsar/usr/share/man/man1 + mkdir -p debian/atsar/usr/share/man/man8 + cp man/atsadc.1 debian/atsar/usr/share/man/man8/atsadc.8 + ln -s atsadc.8 debian/atsar/usr/share/man/man8/atsa1.8 + mkdir -p debian/atsar/var/log/atsar dh_installdocs README diff -Nru atsar-1.7/debian/source/format atsar-1.7/debian/source/format --- atsar-1.7/debian/source/format 1969-12-31 21:00:00.000000000 -0300 +++ atsar-1.7/debian/source/format 2015-12-10 21:02:33.000000000 -0200 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru atsar-1.7/include/atsar.h atsar-1.7/include/atsar.h --- atsar-1.7/include/atsar.h 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/include/atsar.h 2004-07-08 09:56:18.000000000 -0300 @@ -19,7 +19,7 @@ #define ATMAGIC 0xfeedbabe #define ATOUTF "/var/log/atsar/atsa%02d" -#define ATEXEC "/usr/lib/atsar/atsadc" +#define ATEXEC "/usr/local/bin/atsadc" #define MAXNET 32 /* must be power of 2 !! */ /* diff -Nru atsar-1.7/Makefile atsar-1.7/Makefile --- atsar-1.7/Makefile 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/Makefile 2004-07-08 09:56:18.000000000 -0300 @@ -5,14 +5,15 @@ # Ports of atsar for other UNIX-versions are available on request. # # -CFLAGS=-I../include -g -Wall -fno-strict-aliasing +CFLAGS=-I../include -DWEBSUPPORT -Wall -all: version.o +all: + cc -c version.c cd atsadc; make "CFLAGS=$(CFLAGS)" cd atsar; make "CFLAGS=$(CFLAGS)" clean: - -rm *.o + rm *.o cd atsar; make clean cd atsadc; make clean diff -Nru atsar-1.7/scripts/atsa1 atsar-1.7/scripts/atsa1 --- atsar-1.7/scripts/atsa1 2015-12-10 21:25:13.000000000 -0200 +++ atsar-1.7/scripts/atsa1 2004-07-08 09:56:18.000000000 -0300 @@ -1,6 +1,6 @@ #!/bin/sh -COMDIR=/usr/lib/atsar +COMDIR=/usr/local/bin LOGDIR=/var/log/atsar CURDAY=`date +%d` @@ -10,11 +10,6 @@ exit 1 fi -# if the file we're about to write to is older than today (e.g., if we've -# gone a month and we're reusing a two digit day) I'll actually build in a -# little slack in case the system's running slow for some reason -find $LOGDIR/atsa$CURDAY -mtime +2 -type f -exec rm {} \; 2> /dev/null - if [ -f /etc/atsar.conf ] then $COMDIR/atsaftp # count ftp-requests added since previous call @@ -28,4 +23,10 @@ $COMDIR/atsadc $* $LOGDIR/atsa$CURDAY 2> /dev/null fi +# delete files older than one week at midnight +if [ `date +%H` -eq 0 ] +then + find $LOGDIR -name 'atsa*' -mtime +7 -exec rm {} \; +fi + exit 0