diff --git a/acct-6.6.2-hz.patch b/acct-6.6.2-hz.patch new file mode 100644 index 0000000..600b20c --- /dev/null +++ b/acct-6.6.2-hz.patch @@ -0,0 +1,67 @@ +Subject: acct-hz.patch + +--- + lastcomm.c | 14 +++++++++++++- + sa.c | 14 +++++++++++++- + 2 files changed, 26 insertions(+), 2 deletions(-) + +Index: lastcomm.c +=================================================================== +--- lastcomm.c.orig ++++ lastcomm.c +@@ -71,7 +71,7 @@ int debugging_enabled = 0; /* Nonzero me + int strict_match_flag = 0; /* Nonzero if each record has to match + all items on the command line */ + int print_controls = 0; /* don't print control characters */ +-int ahz = AHZ; /* for viewing logs from another system */ ++int ahz = 0; /* for viewing logs from another system */ + + char *program_name; /* name of the program, for usage & errs */ + +@@ -328,6 +328,14 @@ void parse_entries(void) + print_pacct_record (rec, stddebug); + } + ++ if (!ahz) // if this is the first cycle run, ahz is not set yet ++ { ++ if (rec->ac_version == 3) ++ ahz = 100; // value AHZ = 100 is hardcoded in acct.h, but in #ifdef __KERNEL__ block. too bad ++ else ++ ahz = sysconf(_SC_CLK_TCK); ++ } ++ + if (desired_entry (this_uid, this_dev, rec->ac_comm)) + { + double ut = ACUTIME_2_DOUBLE (rec->ac_utime); +Index: sa.c +=================================================================== +--- sa.c.orig ++++ sa.c +@@ -191,7 +191,7 @@ int print_users = 0; + int percentages = 0; /* include percentages in printout */ + int user_summary_flag = 0; /* are we printing a user summary? */ + int group_summary_flag = 0; /* are we printing a group summary? */ +-int ahz = AHZ; /* for viewing logs from another system */ ++int ahz = 0; /* for viewing logs from another system */ + + + #if defined(HAVE_ACUTIME) && defined(HAVE_ACSTIME) +@@ -1180,6 +1180,18 @@ void parse_acct_entries (void) + /* loop while there are entries to be had */ + while ((rec = pacct_get_entry ()) != NULL) + { ++ if (!ahz) // if this is the first cycle run, ahz is not set yet ++ { ++ if (rec->ac_version == 3) ++ ahz = 100; // value AHZ = 100 is hardcoded in acct.h, but in #ifdef __KERNEL__ block. too bad ++ else ++ ahz = sysconf(_SC_CLK_TCK); ++ ++ if (debugging_enabled) ++ { ++ fprintf (stddebug, "AHZ -> %d\n", ahz); ++ } ++ } + #ifdef HAVE_ACUTIME + double ut = comp_t_2_double (rec->ac_utime) / CURR_AHZ; + #endif diff --git a/acct-6.6.4.tar.gz.sig b/acct-6.6.4.tar.gz.sig new file mode 100644 index 0000000..377b0d0 --- /dev/null +++ b/acct-6.6.4.tar.gz.sig @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0 + +iQIVAwUAWVkXX7c8vHcI+owQAQIsvg/+MMzOv38tbMKAhfHKMqz8SveYM1Qr5x5R +f+U9Ln8U17u9MMWqTgvZMVOKbifgaVTIFHxE5cnBloJ82e9w9WqmVu7b18+7SBIB +dEg960kI3i2CoXlJuBJB+7PJ5vx8cAANGqOPv1EygVbaJ5J1/MOy6b1BGdlBf4LM +vut9zYaxJz9gYtWaI8JAmmNAvEHed6ce+ErexWTMAz5K3Eb5RVXbt1AzGoIwcso8 +21vhZTAHOIrgWgzXinSa+aSLJuAnrL+V10lWN90Xd/Yz8GxucMQbFieACW9Vo6CF +ScI6bDL1mO/dmFDmurGLRdavoxosDbAAsEEkHNxZ5nONJRU+J4QhjPkf7tz0S1ih +jKf74O2Ctsl8xucVbQJFEhUuEh/cEasnGvHjKNJoJbJTkwuDuv0RBMZv7dPy0kJ4 +dBSHFk19+CCfVe2WmZ/wxWbELAIM74h5EAYkcY+Fs9pfz1oi3Kt7Y7/UQT4R7+SB +JFCR6RSLL80fNOLDYao21On/XrvSpiR5tA0KK6UdydlosLB1rHXgEWm5clkXvWjj +kfwmX3YdZcp38Zr4tDtZIzQlN7wQYXgmgom36CmgDrkDZiVFNyUWTrz3xAJ/1pPF +rmupc3X3B34j+5Bb3fs09UXBlkglT5xOPHSIFP+GH7zwMCfjDW83L73N+Md0jkEe +PTzW3rh4260= +=eNCc +-----END PGP SIGNATURE----- diff --git a/acct.changes b/acct.changes new file mode 100644 index 0000000..456c2c9 --- /dev/null +++ b/acct.changes @@ -0,0 +1,415 @@ +------------------------------------------------------------------- +Sun Mar 17 10:55:00 UTC 2019 - Jan Engelhardt + +- Reduce %systemd_requires to %systemd_ordering: %service_* + can handle the absence. + +------------------------------------------------------------------- +Tue Sep 19 19:26:56 UTC 2017 - kstreitova@suse.com + +- acct.service: fix chmod command call to use an absolute path + [bsc#1053528] + +------------------------------------------------------------------- +Mon Jul 10 19:13:44 UTC 2017 - astieger@suse.com + +- update to 6.6.4: + * Added --pid to 'lastcomm'. + +------------------------------------------------------------------- +Thu Apr 13 11:59:17 UTC 2017 - kstreitova@suse.com + +- remove acct-info.patch that is no longer needed (fixed upstream + in version 6.6.3) +- note: acct-6.6.2-hz.patch was not accepted upstream as it might + break support for the HP alpha platform + +------------------------------------------------------------------- +Thu Apr 6 11:59:18 UTC 2017 - mpluskal@suse.com + +- Update to version 6.6.3: + * Fixed manuals. +- Refresh patches: + * acct-6.6.2-hz.patch + * acct-info.patch +- Drop no longer needed: + * acct-ac.patch + * acct-timestamp.patch + +------------------------------------------------------------------- +Wed Mar 29 11:22:15 UTC 2017 - kstreitova@suse.com + +- cleanup with spec-cleaner +- get rid of %{name} and %{version} macros from the patch names + +------------------------------------------------------------------- +Wed Jul 13 19:46:53 UTC 2016 - kstreitova@suse.com + +- remove syslog.target from acct.service file [bsc#983938] + +------------------------------------------------------------------- +Fri Mar 4 17:41:25 UTC 2016 - olaf@aepfle.de + +- Remove timestamp from info file + acct-timestamp.patch + +------------------------------------------------------------------- +Thu Jul 2 20:31:14 UTC 2015 - tchvatal@suse.com + +- The previous commit ghosted the log file, but we need it empty + and present to start with, so unghost it + +------------------------------------------------------------------- +Mon Jun 22 12:40:46 UTC 2015 - tchvatal@suse.com + +- Use just /var/log/account/pacct file and remove the tmpfiles creation + completely + +------------------------------------------------------------------- +Mon Jun 22 12:11:02 UTC 2015 - tchvatal@suse.com + +- Use try-restart not restart on logrotate update, otherwise we could + suprisingly start the service for user, which is not desired +- Cleanup with spec-cleaner +- Use tmpfiles creation instead of hand-written shell script + +------------------------------------------------------------------- +Sun May 17 09:09:27 UTC 2015 - meissner@suse.com + +- install deinstall needs to be in preun + +------------------------------------------------------------------- +Sun Mar 1 19:49:50 UTC 2015 - p.drouand@gmail.com + +- Fixthe log path in service and logrotate files; fix bnc#915654 + +------------------------------------------------------------------- +Fri Dec 19 13:01:30 UTC 2014 - p.drouand@gmail.com + +- Add back .keyring and .sig files; OBS verify them too + +------------------------------------------------------------------- +Sat Dec 13 20:57:10 UTC 2014 - p.drouand@gmail.com + +- Update to version 6.6.2 + + Link with -lm. + + Fix texi. + + The rest of fixes from 6.5.5 to 6.6.1. +- Update Url to new project home +- Use download Url +- Remove dependency on gpg-offline and keyring files; let OBS handle + source verification +- Adapt acct-hz.patch to upstream changes + > acct-6.6.2-hz.patch + +------------------------------------------------------------------- +Thu Aug 28 13:18:29 UTC 2014 - vcizek@suse.com + +- fixed libexec path in acct.service (bnc#893980) + +------------------------------------------------------------------- +Mon Mar 17 10:41:47 UTC 2014 - werner@suse.de + +- cleanup of acct + * Add install section in service unit (bnc#867138) + * Add a simple script to create pacct file + +------------------------------------------------------------------- +Sat Dec 21 22:53:20 UTC 2013 - vcizek@suse.com + +- update to 6.6.1 + * Fixed vulnabilities, due to autmake. Thanks to Karl Berry + for pointing this out. + * Update gnulib to latest git. +- dropped acct-stdio.h.patch (upstream) +- add gpg verification + +------------------------------------------------------------------- +Sat Oct 19 14:56:27 UTC 2013 - p.drouand@gmail.com + +- Remove useless %inserv_prereq and fillup_prereq macro; acct package + doesn't contain neither sysvinit script and sysconfig file + +------------------------------------------------------------------- +Thu Jun 6 14:53:49 UTC 2013 - schuetzm@gmx.net + +- Converted rc file to systemd unit file. +- Fixed a bug where the accounting file wasn't reopened after + logrotate, because force-reload isn't implemented. + +------------------------------------------------------------------- +Fri Apr 26 08:06:16 UTC 2013 - mmeister@suse.com + +- Added makeinfo BuildRequire to fix build with new automake + +------------------------------------------------------------------- +Sat Jan 12 07:32:04 UTC 2013 - coolo@suse.com + +- remove suse_update_config + +------------------------------------------------------------------- +Wed Sep 5 09:13:28 UTC 2012 - vcizek@suse.com + +- drop useless acct-axp.patch + +------------------------------------------------------------------- +Sun Jul 22 06:56:58 UTC 2012 - aj@suse.de + +- Fix build with missing gets declaration (glibc 2.16) + +------------------------------------------------------------------- +Mon Jan 23 08:43:45 UTC 2012 - bart.vanassche@gmail.com + +- switch from acct-6.3.5 to acct-6.5.5. From the upstream acct ChangeLog: + * Fix potential buffer-overflows. + * UNIX 98 pty support. + * Add Linux multiformat support. + * lastcomm.c: integrated patch from Paul Jones which adds + paging and swapping support to lastcomm and sa + +------------------------------------------------------------------- +Mon Oct 4 10:37:43 UTC 2011 - uli@suse.com + +- cross-build fix: use %__cc, %__cxx macros + +------------------------------------------------------------------- +Fri Sep 30 20:07:39 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to make the spec file more reliable + +------------------------------------------------------------------- +Sat Sep 17 10:43:53 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile +- Use %_smp_mflags for parallel build + +------------------------------------------------------------------- +Thu Mar 3 14:44:35 UTC 2011 - lchiquitto@novell.com + +- fix initscript's force-reload action to reload the service only + if it is running [bnc#667437] + +------------------------------------------------------------------- +Wed Dec 23 20:22:47 UTC 2009 - coolo@novell.com + +- remove the moblin hack that fixes something not in this package + +------------------------------------------------------------------- + +Fri Nov 6 03:42:04 UTC 2009 - gregkh@suse.de + +- fix mode on /etc/logrotate.d/acct to not be executable. + +------------------------------------------------------------------- + +Wed Nov 4 04:01:04 UTC 2009 - gregkh@suse.de + +- do not enable acct to start automatically on Moblin. We don't + want to access the disk every 15 seconds or so for no reason at + all on laptops. + +------------------------------------------------------------------- +Wed Feb 14 14:46:17 CET 2007 - mkudlvasr@suse.cz + +- fixed ahz value problems [#244186] + +------------------------------------------------------------------- +Tue Sep 5 15:32:51 CEST 2006 - anosek@suse.cz + +- fixed compiler warning: old-style function definition + [#203115] (warning.patch) + +------------------------------------------------------------------- +Tue Aug 22 18:58:08 CEST 2006 - postadal@suse.cz + +- define HZ as sysconf(_SC_CLK_TCK) if undefined + +------------------------------------------------------------------- +Wed Jan 25 21:34:06 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Oct 05 12:37:47 CEST 2004 - postadal@suse.cz + +- fixed 64bit problem in printing time [#42969] + +------------------------------------------------------------------- +Mon Oct 04 17:47:43 CEST 2004 - postadal@suse.cz + +- fixed to work with acct v3 format which the new kernel uses [#46768] + +------------------------------------------------------------------- +Thu Feb 12 14:05:04 CET 2004 - ro@suse.de + +- fix owner/group for var/account/pacct + +------------------------------------------------------------------- +Thu Feb 12 12:45:44 CET 2004 - postadal@suse.cz + +-added norootforbuild flag to the spec file + +------------------------------------------------------------------- +Tue Aug 26 11:06:31 CEST 2003 - postadal@suse.cz + +- use new stop_on_removal/restart_on_upate macros + +------------------------------------------------------------------- +Mon May 26 01:06:49 CEST 2003 - ro@suse.de + +- remove unpackaged files from buildroot + +------------------------------------------------------------------- +Thu Apr 24 14:54:01 CEST 2003 - ro@suse.de + +- merge postuns + +------------------------------------------------------------------- +Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de + +- fix install_info --delete call and move from preun to postun + +------------------------------------------------------------------- +Tue Feb 25 15:21:18 CET 2003 - postadal@suse.cz + +- used install-info macros +- fixed accounting.info (dir entry) + +------------------------------------------------------------------- +Mon Sep 9 15:11:42 CEST 2002 - ro@suse.de + +- added logrotate configuration + +------------------------------------------------------------------- +Fri Aug 16 13:07:34 CEST 2002 - postadal@suse.cz + +- added %insserv_prereq, %fillup_prereq and fileutils + to PreReq [#17787] + +------------------------------------------------------------------- +Wed Aug 14 10:44:15 CEST 2002 - poeml@suse.de + +- fix comment in rc.script + +------------------------------------------------------------------- +Tue Apr 2 15:51:10 CEST 2002 - postadal@suse.cz + +- fixed to compile with autoconf-2.53 + +------------------------------------------------------------------- +Mon Feb 25 16:40:13 CET 2002 - postadal@suse.cz + +- modified copyright in /etc/init.d/acct + +------------------------------------------------------------------- +Tue Jan 15 14:20:58 CET 2002 - egmont@suselinux.hu + +- removed colons from startup/shutdown messages + +------------------------------------------------------------------- +Sun Jan 13 12:05:12 CET 2002 - ro@suse.de + +- removed START_ACCT + +------------------------------------------------------------------- +Wed Nov 14 18:02:46 CET 2001 - ro@suse.de + +- don't call automake for now + +------------------------------------------------------------------- +Wed Aug 8 09:54:31 CEST 2001 - cihlar@suse.cz + +- fixed to compile on axp + +------------------------------------------------------------------- +Tue Aug 7 10:04:09 CEST 2001 - cihlar@suse.cz + +- fixed stop and status part of init script +- moved rc.acct and rc.config.acct from patch + +------------------------------------------------------------------- +Mon Jun 25 14:44:12 CEST 2001 - pblaha@suse.cz + +- rewrite init script to conform LSB + +------------------------------------------------------------------- +Wed Dec 13 16:13:39 CET 2000 - smid@suse.cz + +- rcacct link added + +------------------------------------------------------------------- +Tue Nov 28 01:10:25 CET 2000 - ro@suse.de + +- startscript to etc/init.d + +------------------------------------------------------------------- +Thu Nov 2 13:12:49 CET 2000 - smid@suse.cz + +- fix ugly bug in startup scripts + +------------------------------------------------------------------- +Tue Aug 29 21:07:47 CEST 2000 - smid@suse.cz + +- sources => bzip2 +- spec cleanup + +------------------------------------------------------------------- +Wed Jun 7 13:03:42 MEST 2000 - cihlar@suse.cz + +- Copyright tag fixed + +------------------------------------------------------------------- +Fri Apr 7 12:55:16 CEST 2000 - smid@suse.cz + +- upgrade to 6.3.5 +- buildroot added + +------------------------------------------------------------------- +Mon Feb 21 00:35:46 CET 2000 - garloff@suse.de + +- Create /var/account/pacct in script if non-existing + +------------------------------------------------------------------- +Thu Feb 17 10:53:31 CET 2000 - kukuk@suse.de + +- Fix configure options + +------------------------------------------------------------------- +Tue Feb 15 15:51:51 CET 2000 - kukuk@suse.de + +- Fill in group tag + +------------------------------------------------------------------- +Thu Jan 20 17:45:55 CET 2000 - kukuk@suse.de + +- Move /usr/{man,info} -> /usr/share/{man,info} + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Wed Apr 7 13:49:51 MEST 1999 - kukuk@suse.de + +- With glibc 2, include linux/acct.h, not sys/acct.h + +------------------------------------------------------------------- +Tue Dec 29 13:28:38 MET 1998 - tmg@suse.de + +- fixed several bugs in init script ;) + +------------------------------------------------------------------- +Sat Dec 12 23:58:07 MET 1998 - bs@suse.de + +- made absolute path in %post to relative path + +------------------------------------------------------------------- +Tue Dec 8 17:28:20 MET 1998 - ro@suse.de + +- updated init script + +------------------------------------------------------------------- +Sun Oct 18 15:05:28 MEST 1998 - tmg@suse.de + +- initial revision diff --git a/acct.keyring b/acct.keyring new file mode 100644 index 0000000..1db157b --- /dev/null +++ b/acct.keyring @@ -0,0 +1,58 @@ +ssh-dss AAAAB3NzaC1kc3MAAACBALQxuSZKNSMr/uMsUrxQTNvepUMv/GhsPSlDjAOm8v/sQpMJ8B58F1ERY3tw54XXhnBx31z2ZURxVdjgyonAODks5cqPpFkU+El4Vy2FWplTJ3QRiRhgD8v3Br0TPb57TU7gulATxWGCJLrPhDPcXcuCDzyq0WwLRYKNmgRuPSsfAAAAFQCB/jennpwFBYeD29kuPXNd3vGaqQAAAIBTpyzpkeFPxR7tRJcvjZ+bExszBTltV0q6k1etACWvx2IZgzCvHcb1POLv/U+o3h02GQZ37Ij8TheKpGCXk1fbysI22ANSsmxhCwmbPUCojOHc49hvcvtbbbN1AkYdXxa1q0Or9QbgBORMuiFtxXdBQ6Ckj7f2KCy6nQ7LFNePYQAAAIBx1NKg0eSoFjR2vhr9pATNAymPwjPowKLPvMgt9RBFDr28eLGBPeojV6z+4b7w+xBTm+OaYOi33C9UOJTMtWWs8rkQRByEoppVfdSjaLzUuqu1OzcKBZqYKIGy4xCgWaZJxB0dR/Oq6Sa1InpnKozevL+e3wE2K73kPQsz+CohhQ== ciaran@stier + + +-----BEGIN PGP PUBLIC KEY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aLDqXsht63oFySD +0F8SUzHvbdsiIknlVH8x78PNN9olUSCmWJDX9M4jEwNC98njuaKp55VN7ePlFAER +HuTq9t7NuTQTmD30mYUutvLgLIic3PuBIBJ0u8ttXLcAEQEAAYkCHwQYAQgACQUC +WOodRwIbDAAKCRC3PLx3CPqMEId4D/9WJj5I1uaM2ccEY31uxQTMJPprKw1aDzsL +1m8N2W6hgoyfuhhc/WYsH0ESheUDWxyADj80YBXCVvkAIRrowNHXaOARuGDYgOSQ +dwePCP62zCmnZMx/DtOjijctG1f4eZc0O01Zrj1HJ5E63eWAJPpeIZHqfqFL8kfE +2uC0kzxbqoOp5JCrGPMv5hLkhLbcR8blUXfgE2LDUpdQzDYryo0FSTA/xy5nLPKS +jpAp7K+Nb5cX/rNYMgFpsrAtICflE1AaTEDOpJriSTsFOW5aI/DozK9A7d0jCfhD +sltRqvbfFUkMDkYhR05EJmcRpWgZ4ZVVJmkxukuPsqkNeRRp2lYoo4umdOFyerk6 +K1MQyQLUpMgxBGpHpzFmejREjjpWEdjfvXi99KkKWJhPW2rSrOnyrqCTksakKfYf +FZ9YT/ZgDWR+q/kCqTrALWiym14cy7m2bmPYptn7Cz2YM62tKfm7qUv36HzgD0rp +E+FqKtSSSVZMsVyd0OCm8HmyMG3Zekq+pZxiyXdF9OGW4mb98FvSzqIDyZ244rNx +tH402dQMmmd9Dv73is1WcuKfMcAE+EEcK9hMHsfBYXS7go1aHOCBv0TLm9yMaJKO +Vb2nE0hMDZLkXk86GfrV2ph4wOXzzXyfN7T19vZ2jJF+yBuFG1YKHh+2bRFrhGYA +QFRB6xtQHA== +=iOlR +-----END PGP PUBLIC KEY BLOCK----- + + + diff --git a/acct.service b/acct.service new file mode 100644 index 0000000..3879099 --- /dev/null +++ b/acct.service @@ -0,0 +1,13 @@ +[Unit] +Description=Process accounting +Documentation=man:accton(8) + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStartPre=/usr/bin/chmod 600 /var/log/account/pacct +ExecStart=/usr/sbin/accton /var/log/account/pacct +ExecStop=/usr/sbin/accton off + +[Install] +WantedBy=multi-user.target diff --git a/acct.spec b/acct.spec new file mode 100644 index 0000000..585ce06 --- /dev/null +++ b/acct.spec @@ -0,0 +1,98 @@ +# +# spec file for package acct +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: acct +Version: 6.6.4 +Release: 0 +Summary: User-Specific Process Accounting +License: GPL-2.0-or-later +Group: System/Base +Url: https://www.gnu.org/software/acct/ +Source: https://ftp.gnu.org/gnu/acct/%{name}-%{version}.tar.gz +Source1: acct.service +Source2: logrotate.acct +Source3: https://ftp.gnu.org/gnu/acct/%{name}-%{version}.tar.gz.sig +Source4: http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=acct&download=1#/acct.keyring +Patch0: acct-6.6.2-hz.patch +BuildRequires: makeinfo +BuildRequires: systemd-rpm-macros +Requires: logrotate +Requires(post): %{install_info_prereq} +Requires(postun): %{install_info_prereq} +%{?systemd_ordering} + +%description +This package contains the programs necessary for user-specific process +accounting: sa, accton, and lastcomm. + +%prep +%setup -q +%patch0 + +%build +%configure +make %{?_smp_mflags} + +%install +install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d +install -d -m 755 %{buildroot}/%{_unitdir} +install -d -m 755 %{buildroot}%{_localstatedir}/account/ +install -d -m 755 %{buildroot}%{_libexecdir}/account +install -d -m 755 %{buildroot}%{_sbindir} +install -d -m 755 %{buildroot}%{_bindir} +%make_install + +install -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/acct.service +ln -sf service %{buildroot}%{_sbindir}/rcacct + +install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/acct +mkdir -p %{buildroot}%{_localstatedir}/log/account +touch %{buildroot}%{_localstatedir}/log/account/pacct + +rm -f %{buildroot}%{_bindir}/last +rm -f %{buildroot}/%{_mandir}/man1/last.1* + +%pre +%service_add_pre acct.service + +%post +%install_info --info-dir=%{_infodir} %{_infodir}/accounting.info.gz +%service_add_post acct.service + +%preun +%install_info_delete --info-dir=%{_infodir} %{_infodir}/accounting.info.gz +%service_del_preun acct.service + +%postun +%service_del_postun acct.service + +%files +%doc README NEWS +%{_infodir}/*.info%{ext_info} +%{_mandir}/man1/ac* +%{_mandir}/man1/lastcomm* +%{_mandir}/man8/* +%config %{_sysconfdir}/logrotate.d/acct +%dir %{_localstatedir}/log/account +%{_localstatedir}/log/account/pacct +%{_bindir}/ac +%{_bindir}/lastcomm +%{_sbindir}/* +%{_unitdir}/acct.service + +%changelog diff --git a/logrotate.acct b/logrotate.acct new file mode 100644 index 0000000..0b3a6ac --- /dev/null +++ b/logrotate.acct @@ -0,0 +1,15 @@ +/var/log/account/pacct { + compress + dateext + maxage 365 + rotate 99 + size=+4096k + notifempty + missingok + create 640 root root + postrotate + /usr/bin/systemctl try-restart acct.service + endscript +} + +