modify spec

This commit is contained in:
daidai_is_here 2020-01-21 16:37:02 +08:00
parent 0b00cbe844
commit fbf18b7173
6 changed files with 12 additions and 55 deletions

View File

@ -1,5 +0,0 @@
#!/bin/sh
ACCTFILE=/var/account/pacct
if [ ! -r $ACCTFILE ];then
touch $ACCTFILE && chmod 600 $ACCTFILE
fi

View File

@ -1,21 +0,0 @@
diff -Naur acct-6.6.2.orig/accounting.texi acct-6.6.2/accounting.texi
--- acct-6.6.2.orig/accounting.texi 2014-11-08 05:46:16.000000000 +0100
+++ acct-6.6.2/accounting.texi 2014-11-28 19:08:02.935000000 +0100
@@ -491,7 +491,7 @@
@code{ac} (provided you specify the other flags that will make GNU
@code{ac} behave like the system's).
-@unnumberedsubsubsec The Shutdown/Reboot Problem
+@unnumberedsubsec The Shutdown/Reboot Problem
On Suns, @code{init} is a little screwed up. For some reason, after a
shutdown record is written, a reboot record is written with a time-stamp
@@ -513,7 +513,7 @@
60 second default is that of all of the machines with this problem, the
largest timewarp was 45.
-@unnumberedsubsubsec Stupid System V Machines
+@unnumberedsubsec Stupid System V Machines
Some @code{ac}'s on System V machines (I've tried SGI Indigo & SGI Indy)
forget to pay attention to the @code{ut_type} field in a @code{struct

View File

@ -1,13 +0,0 @@
diff -up ./lastcomm.1.ori ./lastcomm.1
--- ./lastcomm.1.ori 2018-06-19 17:50:43.223211872 +0200
+++ ./lastcomm.1 2018-06-19 17:50:58.211147752 +0200
@@ -125,9 +125,6 @@ format as your current machine, but has
Print paging statistics.
.TP
.B \-\-pid
-Show PID and PPID of the process if acct version 3 format is supported by kernel.
-.TP
-.B \-\-pid
Add pid of the process and pid of the process parent to the output
(pid is the last but one and parent pid the last column).
These values are shown only when they are generated by acct function

View File

@ -1,15 +1,14 @@
# Logrotate file for psacct RPM
/var/account/pacct { /var/account/pacct {
compress compress
delaycompress delaycompress
notifempty notifempty
daily daily
dateext
rotate 31 rotate 31
create 0600 root root create 0600 root root
postrotate postrotate
if %{_bindir}/systemctl --quiet is-active psacct.service ; then if /usr/bin/systemctl --quiet is-active psacct.service ; then
%{_sbindir}/accton /var/account/pacct | %{_bindir}/grep -v "Turning on process accounting, file set to '/var/account/pacct'." | %{_bindir}/cat /usr/sbin/accton /var/account/pacct | /usr/bin/grep -v "Turning on process accounting, file set to '/var/account/pacct'." | /usr/bin/cat
fi fi
endscript endscript
} }

View File

@ -1,11 +1,9 @@
[Unit] [Unit]
Description=Kernel process accounting Description=Process accounting
After=syslog.target After=syslog.target
ConditionPathExists=/var/account
[Service] [Service]
Type=oneshot Type=oneshot
ExecStartPre=/usr/libexec/psacct/accton-create
ExecStart=/usr/sbin/accton /var/account/pacct ExecStart=/usr/sbin/accton /var/account/pacct
ExecStop=/usr/sbin/accton off ExecStop=/usr/sbin/accton off
RemainAfterExit=yes RemainAfterExit=yes

View File

@ -1,16 +1,13 @@
Name: psacct Name: psacct
Version: 6.6.4 Version: 6.6.4
Release: 3 Release: 4
Summary: Utilities for monitoring process activities Summary: Utilities for monitoring process activities
License: GPLv3+ License: GPLv3+
URL: http://www.gnu.org/software/acct/ URL: http://www.gnu.org/software/acct/
Source: ftp://ftp.gnu.org/pub/gnu/acct/acct-%{version}.tar.gz Source: ftp://ftp.gnu.org/pub/gnu/acct/acct-%{version}.tar.gz
Source1: psacct.service Source1: psacct.service
Source2: psacct-logrotate.in Source2: psacct-logrotate.in
Source3: accton-create Patch0001: psacct-6.6.1-SEGV-when-record-incomplete.patch
Patch0001: psacct-6.6.2-unnumberedsubsubsec.patch
Patch0002: psacct-6.6.1-SEGV-when-record-incomplete.patch
Patch0003: psacct-6.6.4-lastcomm-manpage-pid-twice.patch
BuildRequires: autoconf systemd gcc BuildRequires: autoconf systemd gcc
Requires: info coreutils Requires: info coreutils
Requires(post): chkconfig systemd-sysv systemd Requires(post): chkconfig systemd-sysv systemd
@ -61,9 +58,6 @@ sed -e 's|%%{_bindir}|%{_bindir}|g' -e 's|%%{_sbindir}|%{_sbindir}|g' %{SOURCE2}
install -d %{buildroot}%{_unitdir} install -d %{buildroot}%{_unitdir}
install -m644 %{SOURCE1} %{buildroot}%{_unitdir} install -m644 %{SOURCE1} %{buildroot}%{_unitdir}
install -d -m0755 %{buildroot}%{_libexecdir}/psacct
install -m755 %{SOURCE3} %{buildroot}%{_libexecdir}/psacct/
%post %post
%systemd_post psacct.service %systemd_post psacct.service
@ -91,7 +85,6 @@ fi
%{_bindir}/{ac,lastcomm} %{_bindir}/{ac,lastcomm}
%{_unitdir}/psacct.service %{_unitdir}/psacct.service
%{_infodir}/accounting.info.gz %{_infodir}/accounting.info.gz
%{_libexecdir}/psacct/accton-create
%{_sbindir}/{accton,sa,dump-utmp,dump-acct} %{_sbindir}/{accton,sa,dump-utmp,dump-acct}
%attr(0600,root,root) %ghost %config /var/account/pacct %attr(0600,root,root) %ghost %config /var/account/pacct
%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/* %attr(0644,root,root) %config(noreplace) /etc/logrotate.d/*
@ -104,6 +97,12 @@ fi
%exclude %{_mandir}/man1/last.1* %exclude %{_mandir}/man1/last.1*
%changelog %changelog
* Tue Jan 21 2020 daiqianwen <daiqianwen@huawei.com> - 6.6.4-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: modify spec
* Wed Nov 06 2019 yanzhihua <yanzhihua4@huawei.com> - 6.6.4-3 * Wed Nov 06 2019 yanzhihua <yanzhihua4@huawei.com> - 6.6.4-3
- Package init - Package init