auto-import changelog data from psacct-6.3.2-18.src.rpm
Tue Mar 26 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-18 - Fixed duh in initscript pointing to wrong accounting file (#61939) Sun Mar 17 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-17 - Removed the files usracct and savacct, which are not used by psacct utilities at all, but by the sa program. Our sa uses files in a different location, and so these files are unused and unnecessary. Sat Mar 16 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-16 - Added chkconfig to post and preun scripts for bug (#61191) Tue Mar 12 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-15 - Added new feature - psacct initscript now controls process accounting so that it is not just forced on if installed as was the previous behaviour - Modified the initscripts package to not force psacct on anymore and made the new psacct-6.3.2-15 conflict with previous initscripts packages. - Fixed logrotate config to set perms/owner of new log files, and closed bug (#54165) Thu Mar 07 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-14 - Fixed 64bit bug in calls to ctime() in lastcomm and dump-utmp (#60712) Wed Mar 06 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-13 - Removed Build_7x flag, added FHS_compliant flag, reworked specfile to use new flag, and fixed bug (#60716) Thu Feb 28 2002 Bill Nottingham <notting@redhat.com> 6.3.2-12 - rebuild in new environment for FHS correctness Thu Jan 31 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-11 - Conditionalized acct-6.3.2-config.patch to only be applied for RHL 7.x builds, as it breaks FHS compliance by putting files in nonstandard locations. Also fixed up other places in specfile for FHS 2.2. - Added acct-6.3.2-I-HATE-GNU-AUTOCONK.patch because I hate GNU autoconk really really badly. - Bumped to -11 to avoid buildsystem stupidness
This commit is contained in:
parent
904c018986
commit
ef51846ea2
46
psacct-6.3.2-64bit-fixes.patch
Normal file
46
psacct-6.3.2-64bit-fixes.patch
Normal file
@ -0,0 +1,46 @@
|
||||
--- ./lastcomm.c.64bit-fixes Mon Oct 13 20:28:36 1997
|
||||
+++ ./lastcomm.c Thu Mar 7 06:56:00 2002
|
||||
@@ -238,6 +238,7 @@
|
||||
parse_entries (void)
|
||||
{
|
||||
struct acct *rec; /* the current record */
|
||||
+ time_t btime; /* Fix for call to ctime for 64bit architectures */
|
||||
|
||||
/* loop while there are entries to be had */
|
||||
|
||||
@@ -313,11 +314,12 @@
|
||||
else
|
||||
#endif
|
||||
putchar (' ');
|
||||
-
|
||||
+
|
||||
+ btime = (time_t) rec->ac_btime;
|
||||
printf (" %-8.8s %-8.8s %6.2f secs %-16.16s\n",
|
||||
this_uid, this_dev,
|
||||
((ut + st) / (double) AHZ),
|
||||
- ctime (&rec->ac_btime));
|
||||
+ ctime (&btime));
|
||||
}
|
||||
}
|
||||
}
|
||||
--- ./pacct_rd.c.64bit-fixes Mon Oct 13 20:28:36 1997
|
||||
+++ ./pacct_rd.c Thu Mar 7 06:54:34 2002
|
||||
@@ -61,6 +61,9 @@
|
||||
void
|
||||
print_pacct_record (struct acct *rec, FILE *out)
|
||||
{
|
||||
+ /* Fix for call to ctime for 64bit architectures */
|
||||
+ time_t btime = (time_t)rec->ac_btime;
|
||||
+
|
||||
fprintf (stddebug, "%-*.*s|", COMM_LEN, COMM_LEN, rec->ac_comm);
|
||||
|
||||
#define NUM_FORMAT "%6.1f"
|
||||
@@ -117,7 +120,7 @@
|
||||
);
|
||||
#endif
|
||||
|
||||
- fprintf (stddebug, "%s", ctime ((time_t *) &(rec->ac_btime)));
|
||||
+ fprintf (stddebug, "%s", ctime (&btime));
|
||||
}
|
||||
|
||||
|
45
psacct.init
Executable file
45
psacct.init
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# psacct Script to control kernel process accounting
|
||||
#
|
||||
# Author: Mike A. Harris <mharris@redhat.com>
|
||||
#
|
||||
# chkconfig: - 90 10
|
||||
# description: Starts and stops process accounting
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
# The location of the accounting file
|
||||
ACCTFILE=/var/account/pacct
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
action $"Starting process accounting: " /sbin/accton $ACCTFILE
|
||||
touch /var/lock/subsys/psacct
|
||||
;;
|
||||
stop)
|
||||
action $"Shutting down process accounting: " /sbin/accton
|
||||
rm -f /var/lock/subsys/psacct
|
||||
;;
|
||||
status)
|
||||
if [ -e /var/lock/subsys/psacct ]; then
|
||||
echo $"Process accounting is enabled."
|
||||
else
|
||||
echo $"Process accounting is disabled."
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
# do not advertise unreasonable commands that there is no reason
|
||||
# to use with this device
|
||||
echo $"Usage: $0 {start|stop|status|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
97
psacct.spec
97
psacct.spec
@ -1,17 +1,38 @@
|
||||
#!/bin/bash
|
||||
# Broken RH Alpha buildsystem is wasting my time
|
||||
Excludearch: alpha
|
||||
|
||||
%define FHS_compliant 1
|
||||
|
||||
%if %{FHS_compliant}
|
||||
%define accounting_logdir /var/account
|
||||
%else
|
||||
%define accounting_logdir /var/log
|
||||
%endif
|
||||
|
||||
Summary: Utilities for monitoring process activities.
|
||||
Name: psacct
|
||||
Version: 6.3.2
|
||||
Release: 9
|
||||
Release: 18
|
||||
License: GPL
|
||||
Group: Applications/System
|
||||
Source: ftp://ftp.gnu.org/pub/gnu/acct-6.3.2.tar.gz
|
||||
Source1: psacct.init
|
||||
# This dumb patch breaks FHS 2.2 compliance, so it is disabled now except
|
||||
# in 7.x builds. Do not use it in new products.
|
||||
Patch0: acct-6.3.2-config.patch
|
||||
Patch1: acct-6.3.2-exit.patch
|
||||
# Fixes some broken calls to ctime() on 64bit arch's <mharris@redhat.com>
|
||||
Patch2: psacct-6.3.2-64bit-fixes.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
Prereq: /sbin/install-info
|
||||
BuildRequires: autoconf
|
||||
|
||||
# This conflict is to avoid psacct being forced on by old initscripts now that
|
||||
# we have a proper initscript in place. initscripts 6.55 and later are fixed.
|
||||
Conflicts: initscripts < 6.55
|
||||
|
||||
%description
|
||||
The psacct package contains several utilities for monitoring process
|
||||
activities, including ac, lastcomm, accton and sa. The ac command
|
||||
@ -23,11 +44,18 @@ commmands.
|
||||
|
||||
%prep
|
||||
%setup -q -n acct-%{version}
|
||||
|
||||
%if ! %{FHS_compliant}
|
||||
%patch0 -p0 -b .config
|
||||
%patch1 -p1
|
||||
%endif
|
||||
%patch1 -p1 -b .psacct-exit
|
||||
%patch2 -p0 -b .64bit-fixes
|
||||
|
||||
%build
|
||||
%if ! %{FHS_compliant}
|
||||
autoconf
|
||||
%endif
|
||||
|
||||
%configure
|
||||
sed -e "s/\/\* #undef HAVE_LINUX_ACCT_H \*\//#define HAVE_LINUX_ACCT_H/" config.h > config.h.new
|
||||
mv -f config.h.new config.h
|
||||
@ -36,7 +64,7 @@ make
|
||||
|
||||
%install
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT{/sbin,%{_bindir},%{_mandir},%{_sbindir},%{_var}/log}
|
||||
mkdir -p $RPM_BUILD_ROOT{/sbin,%{_bindir},%{_mandir},%{_sbindir}}
|
||||
%{makeinstall}
|
||||
|
||||
# move accton to /sbin -- leave historical symlink
|
||||
@ -44,15 +72,15 @@ mv $RPM_BUILD_ROOT%{_sbindir}/accton $RPM_BUILD_ROOT/sbin/accton
|
||||
ln -s ../../sbin/accton $RPM_BUILD_ROOT%{_sbindir}/accton
|
||||
|
||||
gzip -9f $RPM_BUILD_ROOT%{_infodir}/*
|
||||
touch $RPM_BUILD_ROOT%{_var}/log/pacct
|
||||
touch $RPM_BUILD_ROOT%{_var}/log/usracct
|
||||
touch $RPM_BUILD_ROOT%{_var}/log/savacct
|
||||
mkdir -p $RPM_BUILD_ROOT%{accounting_logdir}
|
||||
touch $RPM_BUILD_ROOT%{accounting_logdir}/pacct
|
||||
|
||||
# Create logrotate config file
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
||||
cat > $RPM_BUILD_ROOT/etc/logrotate.d/psacct <<EOF
|
||||
# Logrotate file for psacct RPM
|
||||
|
||||
/var/log/pacct {
|
||||
%{accounting_logdir}/pacct {
|
||||
prerotate
|
||||
%{_sbindir}/accton
|
||||
endscript
|
||||
@ -60,12 +88,17 @@ endscript
|
||||
notifempty
|
||||
daily
|
||||
rotate 31
|
||||
create 0600 root root
|
||||
postrotate
|
||||
%{_sbindir}/accton %{_var}/log/pacct
|
||||
%{_sbindir}/accton %{accounting_logdir}/pacct
|
||||
endscript
|
||||
}
|
||||
EOF
|
||||
|
||||
# Install initscript
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/psacct
|
||||
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
@ -76,18 +109,22 @@ if [ $1 = 0 ]; then
|
||||
grep -v '* accounting: (psacct)' < /etc/info-dir > /etc/info-dir.new
|
||||
mv -f /etc/info-dir.new /etc/info-dir
|
||||
/sbin/install-info %{_infodir}/accounting.info.gz %{_infodir}/dir --entry="* accounting: (accounting). The GNU Process Accounting Suite."
|
||||
/sbin/chkconfig --add psacct
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/install-info --delete %{_infodir}/accounting.info.gz %{_infodir}/dir --entry="* accounting: (accounting). The GNU Process Accounting Suite." 2>/dev/null
|
||||
/sbin/chkconfig --del psacct
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%attr(0600,root,root) %config /var/log/pacct
|
||||
%attr(0600,root,root) %config /var/log/usracct
|
||||
%attr(0600,root,root) %config /var/log/savacct
|
||||
%if %{FHS_compliant}
|
||||
%dir /var/account
|
||||
%endif
|
||||
/etc/rc.d/init.d/psacct
|
||||
%attr(0600,root,root) %config %{accounting_logdir}/pacct
|
||||
%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/*
|
||||
/sbin/accton
|
||||
%{_sbindir}/accton
|
||||
@ -103,6 +140,44 @@ fi
|
||||
%{_infodir}/accounting.info.gz
|
||||
|
||||
%changelog
|
||||
* Mon Mar 26 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-18
|
||||
- Fixed duh in initscript pointing to wrong accounting file (#61939)
|
||||
|
||||
* Sun Mar 17 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-17
|
||||
- Removed the files usracct and savacct, which are not used by psacct
|
||||
utilities at all, but by the sa program. Our sa uses files in a different
|
||||
location, and so these files are unused and unnecessary.
|
||||
|
||||
* Sat Mar 16 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-16
|
||||
- Added chkconfig to post and preun scripts for bug (#61191)
|
||||
|
||||
* Tue Mar 12 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-15
|
||||
- Added new feature - psacct initscript now controls process accounting so
|
||||
that it is not just forced on if installed as was the previous behaviour
|
||||
- Modified the initscripts package to not force psacct on anymore and made
|
||||
the new psacct-6.3.2-15 conflict with previous initscripts packages.
|
||||
- Fixed logrotate config to set perms/owner of new log files, and closed
|
||||
bug (#54165)
|
||||
|
||||
* Thu Mar 7 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-14
|
||||
- Fixed 64bit bug in calls to ctime() in lastcomm and dump-utmp (#60712)
|
||||
|
||||
* Wed Mar 6 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-13
|
||||
- Removed Build_7x flag, added FHS_compliant flag, reworked specfile to use new
|
||||
flag, and fixed bug (#60716)
|
||||
|
||||
* Thu Feb 28 2002 Bill Nottingham <notting@redhat.com> 6.3.2-12
|
||||
- rebuild in new environment for FHS correctness
|
||||
|
||||
* Thu Jan 31 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-11
|
||||
- Conditionalized acct-6.3.2-config.patch to only be applied for RHL 7.x
|
||||
builds, as it breaks FHS compliance by putting files in nonstandard
|
||||
locations. Also fixed up other places in specfile for FHS 2.2.
|
||||
- Added acct-6.3.2-I-HATE-GNU-AUTOCONK.patch because I hate GNU autoconk
|
||||
really really badly.
|
||||
|
||||
- Bumped to -11 to avoid buildsystem stupidness
|
||||
|
||||
* Thu Sep 06 2001 Mike A. Harris <mharris@redhat.com> 6.3.2-9
|
||||
- Fixed bug (#53307) psacct is enabled by default, and the log files
|
||||
are huge, and will fill the disk up very quickly. logrotate will
|
||||
|
Loading…
Reference in New Issue
Block a user