- Unifying the default file paths (#985150)

This commit is contained in:
Jaromir Capik 2013-08-21 18:48:23 +02:00
parent 563b98aab8
commit 04b8019952

View File

@ -4,14 +4,16 @@
Summary: Utilities for monitoring process activities
Name: psacct
Version: 6.6.1
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv3+
Group: Applications/System
URL: ftp://ftp.gnu.org/pub/gnu/acct/
URL: http://www.gnu.org/software/acct/
Source: ftp://ftp.gnu.org/pub/gnu/acct/acct-%{version}.tar.gz
Source1: psacct.service
Source2: psacct-logrotate.in
Source3: accton-create
Patch1: psacct-6.3.2-lastcomm_man.patch
Patch2: acct-6.3.2-sa_manpage.patch
# The upstream man page is more correct than the usage
@ -45,6 +47,7 @@ commands. The accton command turns process accounting on or off. The
sa command summarizes information about previously executed
commands.
%prep
%setup -q -n acct-%{version}
@ -58,11 +61,18 @@ commands.
# fixing 'gets' undeclared
sed -i 's|.*(gets,.*||g' lib/stdio.in.h
# workaround for broken autotools stuff
sed -i 's|@ACCT_FILE_LOC@|/var/account/pacct|g' files.h.in
sed -i 's|@SAVACCT_FILE_LOC@|/var/account/savacct|g' files.h.in
sed -i 's|@USRACCT_FILE_LOC@|/var/account/usracct|g' files.h.in
%build
%configure --enable-linux-multiformat
make
%install
mkdir -p %{buildroot}{/sbin,%{_bindir},%{_mandir},%{_sbindir}}
make install prefix=%{buildroot}%{_prefix} \
@ -92,12 +102,14 @@ install -m 755 %{SOURCE3} %{buildroot}%{_libexecdir}/psacct/
rm -f %{buildroot}%{_bindir}/last %{buildroot}%{_mandir}/man1/last.1*
%endif
%post
%systemd_post psacct.service
/sbin/install-info %{_infodir}/accounting.info %{_infodir}/dir || :
touch /var/account/pacct
%preun
%systemd_preun psacct.service
@ -106,6 +118,7 @@ if [ $1 -eq 0 ]; then
/sbin/install-info --delete %{_infodir}/accounting.info %{_infodir}/dir || :
fi
%postun
%systemd_postun_with_restart psacct.service
@ -119,6 +132,7 @@ fi
/sbin/chkconfig --del psacct >/dev/null 2>&1 || :
/bin/systemctl try-restart psacct.service >/dev/null 2>&1 || :
%files
%doc README COPYING
%dir /var/account
@ -146,7 +160,11 @@ fi
%{_mandir}/man8/dump-utmp.8*
%{_infodir}/accounting.info.gz
%changelog
* Wed Aug 21 2013 Jaromir Capik <jcapik@redhat.com> - 6.6.1-6
- Unifying the default file paths (#985150)
* Wed Jul 31 2013 Jaromir Capik <jcapik@redhat.com> - 6.6.1-5
- Dropping psacct-6.3.2-man-pages.patch
- (Re)introducing modified dump-acct man page