the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: acct
Version: 6.3.5
Revision: 4
Source: mirror:debian:pool/main/a/%n/%n_%v.orig.tar.gz
Source-MD5: a982333648d68e0eabf87989a1e5427b
SourceDirectory: %n-%v
Depends: daemonic, anacron
Description: GNU Accounting Utilities package
License:GPL
PatchScript: sed 's|@PREFIX@|%p|g' <%a/%n.patch | patch -p1
ConfigureParams: --infodir=%i/share/info --mandir=%i/share/man
InstallScript: <<
make install prefix=%i
mkdir -p %i/etc/cron.daily
install -m 755 5acct %i/etc/cron.daily/
install -m 644 dump-acct.8 %i/share/man/man8/
install -m 644 dump-utmp.8 %i/share/man/man8/
<<
DocFiles: AUTHORS COPYING NEWS README
InfoDocs: accounting.info
DescDetail: <<
This is a set of utilities which reports and summarizes data about
user connect times and process execution statistics under u*x. This
package contains:
ac: summarize login accounting
accton: turn process accounting on or off
last: show the people who have logged in
lastcomm: show which commands have been used
sa: summarizes process accounting
dump-utmp: print a utmp file in a human-readble format
dump-acct: same as above for acct/pacct files
<<
DaemonicName: acct
DaemonicFile: <<
<<
PostInstScript: <<
# check for process accounting files
# and create them if necessary
ACDIR="%p/var/account"
ACFILE="$ACDIR/acct"
echo
if [ ! -f $ACFILE ]; then
if [ ! -d $ACDIR ]; then
mkdir $ACDIR
fi
touch $ACFILE
chmod 666 $ACFILE
echo "A new process accounting file $ACFILE has been created."
else
echo "Existing process accounting file $ACFILE will be used."
fi
echo "Please see 'man accton' how to turn on/off process accounting."
echo
accton $ACFILE
daemonic enable acct
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
daemonic remove acct
accton
rm -rf %p/var/account
echo
echo "Turned off process accounting and removed accounting files"
echo
fi
<<
Maintainer: Mathias Meyer
Homepage: http://www.gnu.org/directory/acct.html
diff -ru acct-6.3.5/5acct acct-6.3.5-3_patched/5acct
--- acct-6.3.5/5acct Wed Mar 19 22:56:55 2003
+++ acct-6.3.5-3_patched/5acct Thu Mar 20 22:15:30 2003
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# acct's cron script
+#
+
+if [ -f @PREFIX@/var/account/acct ] ; then
+ if [ -x /usr/bin/gzip ]; then gzext=".gz"; else gzext=""; fi
+ cd @PREFIX@/var/account
+ if [ -f "acct.2${gzext}" ] ; then mv -f "acct.2${gzext}" "acct.3${gzext}" ; fi
+ if [ -f "acct.1${gzext}" ] ; then mv -f "acct.1${gzext}" "acct.2${gzext}" ; fi
+ if [ -f "acct.0${gzext}" ] ; then mv -f "acct.0${gzext}" "acct.1${gzext}" ; fi
+ accton # stop process accounting
+ which sa > /dev/null && sa -s > /dev/null # summarize acct if sa exists
+ mv -f acct acct.0 # rotate acct
+ touch acct
+ accton acct # start process accounting
+ if [ -x /usr/bin/gzip ]; then gzip -9 acct.0; fi
+fi
diff -ru acct-6.3.5/configure acct-6.3.5-3_patched/configure
--- acct-6.3.5/configure Wed May 27 07:02:44 1998
+++ acct-6.3.5-3_patched/configure Wed Mar 19 22:44:07 2003
@@ -2712,6 +2712,11 @@
#endif
#include
+#define WTMP_FILE "/var/log/wtmp"
+#define ACCT_FILE "@PREFIX@/var/account/acct"
+#define SAVACCT_FILE "@PREFIX@/var/account/savacct"
+#define USRACCT_FILE "@PREFIX@/var/account/usracct"
+
#ifndef WTMP_FILE
# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__)
# define WTMP_FILE "/var/log/wtmp"
diff -ru acct-6.3.5/dump-acct.8 acct-6.3.5-3_patched/dump-acct.8
--- acct-6.3.5/dump-acct.8 Wed Mar 19 18:05:57 2003
+++ acct-6.3.5-3_patched/dump-acct.8 Sun Jan 19 19:58:37 2003
@@ -0,0 +1,90 @@
+.TH DUMP-ACCT 8 "2000 July 19"
+.SH NAME
+dump-acct \- print an acct/pacct file in human-readable format
+.SH SYNOPSIS
+.hy 0
+.na
+.TP
+.B dump-acct
+[
+.B \-r
+|
+.B \-\-reverse
+]
+[
+.B \-R
+|
+.B \-\-raw
+]
+[
+.B \-n
+|
+.B \-\-num
+.I recs
+]
+[
+.B \-h
+|
+.B \-\-help
+]
+[
+.I files
+]
+.SH DESCRIPTION
+.LP
+.B dump-acct
+.I filename
+prints a list of all executed processes. This list is written by the kernel
+which must be compiled with BSD process accounting enabled.
+It must be started with
+.BR accton (5).
+Note that on Debian systems, the is ensured via the init script
+.IR /etc/init.d/acct .
+.LP
+All fields are separated by vertical line. Fields are:
+.IR command ,
+.IR "user time" ,
+.IR "system time" ,
+.IR "effective time" ,
+.IR uid ,
+.IR gid ,
+.IR memory ,
+.IR io ,
+.IR time .
+User, system and effective times are ticks per second. One tick is
+usually 1/50 of a second. The
+.I time
+field shows the start time of the process.
+.SH OPTIONS
+\..PD 0
+.TP
+.TP
+.B \-h, \-\-help
+Prints the usage string and default locations of system files to
+standard output and exits.
+.TP
+.B \-n, \-\-num recs
+Number of lines to print.
+.TP
+.B \-r, \-\-reverse
+Start printing from last records.
+.TP
+.B \-R, \-\-raw
+Print raw records, not human-readable.
+.SH FILES
+.TP
+.I acct
+The system wide process accounting file. See
+.BR acct (5)
+(or
+.BR pacct (5))
+for further details.
+.LP
+.SH AUTHOR
+The GNU accounting utilities were written by Noel Cragg
+
+by Ognyan Kulev
+used by others).
+.SH "SEE ALSO"
+.BR acct (5),
+.BR ac (8)
diff -ru acct-6.3.5/dump-utmp.8 acct-6.3.5-3_patched/dump-utmp.8
--- acct-6.3.5/dump-utmp.8 Wed Mar 19 18:06:04 2003
+++ acct-6.3.5-3_patched/dump-utmp.8 Sun Jan 19 19:58:37 2003
@@ -0,0 +1,79 @@
+.TH DUMP-UTMP 8 "2000 July 19"
+.SH NAME
+dump-utmp \- print an utmp file in human-readable format
+.SH SYNOPSIS
+.hy 0
+.na
+.TP
+.B dump-utmp
+[
+.B \-r
+|
+.B \-\-reverse
+]
+[
+.B \-R
+|
+.B \-\-raw
+]
+[
+.B \-n
+|
+.B \-\-num
+.I recs
+]
+[
+.B \-h
+|
+.B \-\-help
+]
+.I files
+.SH DESCRIPTION
+.LP
+.B dump-acct
+.I file
+prints a list of all logins. This list is usually written in
+.IR /var/log/wtmp .
+.LP
+All fields are separated by vertical line. Fields are:
+.IR "user name" ,
+.IR tty ,
+.IR type ,
+.IR id ,
+.IR pid ,
+.IR hostaddr ,
+.IR host ,
+.IR time .
+.SH OPTIONS
+\..PD 0
+.TP
+.TP
+.B \-h, \-\-help
+Prints the usage string and default locations of system files to
+standard output and exits.
+.TP
+.B \-n, \-\-num recs
+Number of lines to print.
+.TP
+.B \-r, \-\-reverse
+Start printing from last records.
+.TP
+.B \-R, \-\-raw
+Print raw records, not human-readable.
+.SH FILES
+.I wtmp
+.RS
+The system wide login record file. See
+.BR wtmp (5)
+for further details.
+.LP
+.SH AUTHOR
+The GNU accounting utilities were written by Noel Cragg
+
+by Ognyan Kulev
+used by others).
+.SH "SEE ALSO"
+.BR login (1),
+.BR wtmp (5),
+.BR init (8),
+.BR sa (8)
diff -ru acct-6.3.5/lastcomm.c acct-6.3.5-3_patched/lastcomm.c
--- acct-6.3.5/lastcomm.c Thu Apr 9 01:24:49 1998
+++ acct-6.3.5-3_patched/lastcomm.c Wed Mar 5 10:41:37 2003
@@ -22,10 +22,6 @@
#include "config.h"
#include
-#ifdef HAVE_STDLIB_H
-#include
-#endif
-
#include
#ifdef HAVE_STRING_H
Package: acct
Version: 6.3.5
Revision: 6
Source: mirror:debian:pool/main/a/%n/%n_%v.orig.tar.gz
Source-MD5: a982333648d68e0eabf87989a1e5427b
SourceDirectory: %n-%v
Depends: daemonic, anacron
Description: GNU Accounting Utilities package
License:GPL
PatchScript: sed 's|@PREFIX@|%p|g' <%a/%n.patch | patch -p1
ConfigureParams: --infodir=%i/share/info --mandir=%i/share/man
InstallScript: <<
make install prefix=%i
mkdir -p %i/etc/cron.daily
install -m 755 5acct %i/etc/cron.daily/
install -m 644 dump-acct.8 %i/share/man/man8/
install -m 644 dump-utmp.8 %i/share/man/man8/
rm %i/share/info/accounting.info
<<
DocFiles: AUTHORS COPYING NEWS README
#InfoDocs: accounting.info
DescDetail: <<
This is a set of utilities which reports and summarizes data about
user connect times and process execution statistics under u*x. This
package contains:
ac: summarize login accounting
accton: turn process accounting on or off
last: show the people who have logged in
lastcomm: show which commands have been used
sa: summarizes process accounting
dump-utmp: print a utmp file in a human-readble format
dump-acct: same as above for acct/pacct files
<<
DaemonicName: acct
DaemonicFile: <<
<<
PostInstScript: <<
# check for process accounting files
# and create them if necessary
ACDIR="%p/var/account"
ACFILE="$ACDIR/acct"
echo
if [ ! -f $ACFILE ]; then
if [ ! -d $ACDIR ]; then
mkdir $ACDIR
fi
touch $ACFILE
chmod 666 $ACFILE
echo "A new process accounting file $ACFILE has been created."
else
echo "Existing process accounting file $ACFILE will be used."
fi
echo "Please see 'man accton' how to turn on/off process accounting."
echo
accton $ACFILE
daemonic enable acct
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
daemonic remove acct
accton
rm -rf %p/var/account
echo
echo "Turned off process accounting and removed accounting files"
echo
fi
<<
Maintainer: Mathias Meyer
Homepage: http://www.gnu.org/directory/acct.html
DescPackaging: <<
InfoDocs commented out for now, it fails with:
No `START-INFO-DIR-ENTRY' and no `This file documents'.
<<
diff -ru acct-6.3.5/5acct acct-6.3.5-3_patched/5acct
--- acct-6.3.5/5acct Wed Mar 19 22:56:55 2003
+++ acct-6.3.5-3_patched/5acct Thu Mar 20 22:15:30 2003
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# acct's cron script
+#
+
+if [ -f @PREFIX@/var/account/acct ] ; then
+ if [ -x /usr/bin/gzip ]; then gzext=".gz"; else gzext=""; fi
+ cd @PREFIX@/var/account
+ if [ -f "acct.2${gzext}" ] ; then mv -f "acct.2${gzext}" "acct.3${gzext}" ; fi
+ if [ -f "acct.1${gzext}" ] ; then mv -f "acct.1${gzext}" "acct.2${gzext}" ; fi
+ if [ -f "acct.0${gzext}" ] ; then mv -f "acct.0${gzext}" "acct.1${gzext}" ; fi
+ accton # stop process accounting
+ which sa > /dev/null && sa -s > /dev/null # summarize acct if sa exists
+ mv -f acct acct.0 # rotate acct
+ touch acct
+ accton acct # start process accounting
+ if [ -x /usr/bin/gzip ]; then gzip -9 acct.0; fi
+fi
diff -ru acct-6.3.5/configure acct-6.3.5-3_patched/configure
--- acct-6.3.5/configure Wed May 27 07:02:44 1998
+++ acct-6.3.5-3_patched/configure Wed Mar 19 22:44:07 2003
@@ -2712,6 +2712,11 @@
#endif
#include
+#define WTMP_FILE "/var/log/wtmp"
+#define ACCT_FILE "@PREFIX@/var/account/acct"
+#define SAVACCT_FILE "@PREFIX@/var/account/savacct"
+#define USRACCT_FILE "@PREFIX@/var/account/usracct"
+
#ifndef WTMP_FILE
# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__)
# define WTMP_FILE "/var/log/wtmp"
diff -ru acct-6.3.5/dump-acct.8 acct-6.3.5-3_patched/dump-acct.8
--- acct-6.3.5/dump-acct.8 Wed Mar 19 18:05:57 2003
+++ acct-6.3.5-3_patched/dump-acct.8 Sun Jan 19 19:58:37 2003
@@ -0,0 +1,90 @@
+.TH DUMP-ACCT 8 "2000 July 19"
+.SH NAME
+dump-acct \- print an acct/pacct file in human-readable format
+.SH SYNOPSIS
+.hy 0
+.na
+.TP
+.B dump-acct
+[
+.B \-r
+|
+.B \-\-reverse
+]
+[
+.B \-R
+|
+.B \-\-raw
+]
+[
+.B \-n
+|
+.B \-\-num
+.I recs
+]
+[
+.B \-h
+|
+.B \-\-help
+]
+[
+.I files
+]
+.SH DESCRIPTION
+.LP
+.B dump-acct
+.I filename
+prints a list of all executed processes. This list is written by the kernel
+which must be compiled with BSD process accounting enabled.
+It must be started with
+.BR accton (5).
+Note that on Debian systems, the is ensured via the init script
+.IR /etc/init.d/acct .
+.LP
+All fields are separated by vertical line. Fields are:
+.IR command ,
+.IR "user time" ,
+.IR "system time" ,
+.IR "effective time" ,
+.IR uid ,
+.IR gid ,
+.IR memory ,
+.IR io ,
+.IR time .
+User, system and effective times are ticks per second. One tick is
+usually 1/50 of a second. The
+.I time
+field shows the start time of the process.
+.SH OPTIONS
+\..PD 0
+.TP
+.TP
+.B \-h, \-\-help
+Prints the usage string and default locations of system files to
+standard output and exits.
+.TP
+.B \-n, \-\-num recs
+Number of lines to print.
+.TP
+.B \-r, \-\-reverse
+Start printing from last records.
+.TP
+.B \-R, \-\-raw
+Print raw records, not human-readable.
+.SH FILES
+.TP
+.I acct
+The system wide process accounting file. See
+.BR acct (5)
+(or
+.BR pacct (5))
+for further details.
+.LP
+.SH AUTHOR
+The GNU accounting utilities were written by Noel Cragg
+
+by Ognyan Kulev
+used by others).
+.SH "SEE ALSO"
+.BR acct (5),
+.BR ac (8)
diff -ru acct-6.3.5/dump-utmp.8 acct-6.3.5-3_patched/dump-utmp.8
--- acct-6.3.5/dump-utmp.8 Wed Mar 19 18:06:04 2003
+++ acct-6.3.5-3_patched/dump-utmp.8 Sun Jan 19 19:58:37 2003
@@ -0,0 +1,79 @@
+.TH DUMP-UTMP 8 "2000 July 19"
+.SH NAME
+dump-utmp \- print an utmp file in human-readable format
+.SH SYNOPSIS
+.hy 0
+.na
+.TP
+.B dump-utmp
+[
+.B \-r
+|
+.B \-\-reverse
+]
+[
+.B \-R
+|
+.B \-\-raw
+]
+[
+.B \-n
+|
+.B \-\-num
+.I recs
+]
+[
+.B \-h
+|
+.B \-\-help
+]
+.I files
+.SH DESCRIPTION
+.LP
+.B dump-acct
+.I file
+prints a list of all logins. This list is usually written in
+.IR /var/log/wtmp .
+.LP
+All fields are separated by vertical line. Fields are:
+.IR "user name" ,
+.IR tty ,
+.IR type ,
+.IR id ,
+.IR pid ,
+.IR hostaddr ,
+.IR host ,
+.IR time .
+.SH OPTIONS
+\..PD 0
+.TP
+.TP
+.B \-h, \-\-help
+Prints the usage string and default locations of system files to
+standard output and exits.
+.TP
+.B \-n, \-\-num recs
+Number of lines to print.
+.TP
+.B \-r, \-\-reverse
+Start printing from last records.
+.TP
+.B \-R, \-\-raw
+Print raw records, not human-readable.
+.SH FILES
+.I wtmp
+.RS
+The system wide login record file. See
+.BR wtmp (5)
+for further details.
+.LP
+.SH AUTHOR
+The GNU accounting utilities were written by Noel Cragg
+
+by Ognyan Kulev
+used by others).
+.SH "SEE ALSO"
+.BR login (1),
+.BR wtmp (5),
+.BR init (8),
+.BR sa (8)
diff -ru acct-6.3.5/lastcomm.c acct-6.3.5-3_patched/lastcomm.c
--- acct-6.3.5/lastcomm.c Thu Apr 9 01:24:49 1998
+++ acct-6.3.5-3_patched/lastcomm.c Wed Mar 5 10:41:37 2003
@@ -22,10 +22,6 @@
#include "config.h"
#include
-#ifdef HAVE_STDLIB_H
-#include
-#endif
-
#include
#ifdef HAVE_STRING_H