Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37044780
en ru br
ALT Linux repos
S:6.6.4-alt1
5.0: 6.4-alt0.5
4.1: 6.4-alt0.5
4.0: 6.4-alt0.4
3.0: 6.3.5-alt5

Other repositories
Upstream:6.3.2

Group :: Monitoring
RPM: acct

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: acct
Version: 6.3.5
Release: alt5

Summary: Utilities for monitoring process activities.
License: GPL
Group: Monitoring
Url: http://www.gnu.org/software/acct/

# ftp://ftp.red-bean.com/pub/noel/

Source: ftp://ftp.gnu.org/gnu/acct/acct-%version.tar.bz2
Source1: %name.init
Source2: %name.log
Source3: dump-acct.8
Source4: dump-utmp.8

Patch0: %name-6.3.5-owl-fixes.patch
Patch1: %name-6.3.2-alt-texinfo.patch
Patch2: %name-6.3.2-alt-progname.patch
Patch3: %name-6.3.5-owl-devpts.patch
Patch4: %name-6.3.5-alt-ctime.patch

Obsoletes: psacct
Provides: psacct = %version-%release
PreReq: service, coreutils, grep
Requires(post): %install_info
Requires(preun): %uninstall_info

%description
The acct package contains several utilities for monitoring process
activities, including ac, lastcomm, accton and sa.  The ac command
displays statistics about how long users have been logged on.  The
lastcomm command displays information about previous executed
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
%__rm -f *.info getopt.h
%__ln_s /usr/include/getopt.h .
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
find -type f -name \*.orig -delete -print

%build
%configure
%__subst "s|/\* #undef HAVE_LINUX_ACCT_H \*/|#define HAVE_LINUX_ACCT_H|" config.h
%make_build

%install
%__mkdir_p $RPM_BUILD_ROOT{/sbin,%prefix,/var/account}
%makeinstall

%__install -p -m644 %SOURCE3 %SOURCE4 $RPM_BUILD_ROOT%_man8dir/

# These come from SysVinit.

%__mv $RPM_BUILD_ROOT%_bindir/last $RPM_BUILD_ROOT%_bindir/last-%name
%__mv $RPM_BUILD_ROOT%_man1dir/last.1 $RPM_BUILD_ROOT%_man1dir/last-%name.1

# Move accton to /sbin, leaving historical symlink

%__mv $RPM_BUILD_ROOT%_sbindir/accton $RPM_BUILD_ROOT/sbin/accton
%__ln_s ../../sbin/accton $RPM_BUILD_ROOT%_sbindir/accton
%__ln_s accton $RPM_BUILD_ROOT/sbin/acctoff

touch $RPM_BUILD_ROOT/var/account/{p,usr,sav}acct
%__install -pD -m755 %SOURCE1 $RPM_BUILD_ROOT%_initdir/%name
%__install -pD -m640 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/%name

%post
f=/etc/info-dir
if %__grep -Fqs '* accounting: (psacct)' "$f"; then
# We need this hack to get rid of an old, incorrect accounting
# info entry when installing over older versions of Red Hat Linux.
%__cp -p "$f" "$f".new &&
%__grep -v '* accounting: (psacct)' < "$f" > "$f".new &&
%__mv -f "$f".new "$f"
fi
%install_info accounting.info

umask 177
for f in /var/account/{p,usr,sav}acct; do
test -e "$f" && continue ||:
       touch "$f" &&
chown 0:0 "$f" &&
chmod 600 "$f"
done
%post_service %name

%preun
%uninstall_info accounting.info
%preun_service %name

%files
%config(noreplace) %_initdir/%name
%config(noreplace) %_sysconfdir/logrotate.d/%name
/sbin/*
%_bindir/*
%_sbindir/*
%_infodir/*.info*
%_mandir/man?/*
%attr(700,root,root) %dir /var/account
%attr(600,root,root) %ghost /var/account/*
%doc AUTHORS README NEWS ChangeLog ToDo

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin