!1 modify spec

Merge pull request !1 from daidai_is_here/dqw_test
This commit is contained in:
openeuler-ci-bot 2020-01-21 16:44:08 +08:00 committed by Gitee
commit e23ebe0647
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 {
compress
delaycompress
notifempty
daily
dateext
rotate 31
create 0600 root root
postrotate
if %{_bindir}/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
if /usr/bin/systemctl --quiet is-active psacct.service ; then
/usr/sbin/accton /var/account/pacct | /usr/bin/grep -v "Turning on process accounting, file set to '/var/account/pacct'." | /usr/bin/cat
fi
endscript
}

View File

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

View File

@ -1,16 +1,13 @@
Name: psacct
Version: 6.6.4
Release: 3
Release: 4
Summary: Utilities for monitoring process activities
License: GPLv3+
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
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
Patch0001: psacct-6.6.1-SEGV-when-record-incomplete.patch
BuildRequires: autoconf systemd gcc
Requires: info coreutils
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 -m644 %{SOURCE1} %{buildroot}%{_unitdir}
install -d -m0755 %{buildroot}%{_libexecdir}/psacct
install -m755 %{SOURCE3} %{buildroot}%{_libexecdir}/psacct/
%post
%systemd_post psacct.service
@ -91,7 +85,6 @@ fi
%{_bindir}/{ac,lastcomm}
%{_unitdir}/psacct.service
%{_infodir}/accounting.info.gz
%{_libexecdir}/psacct/accton-create
%{_sbindir}/{accton,sa,dump-utmp,dump-acct}
%attr(0600,root,root) %ghost %config /var/account/pacct
%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/*
@ -104,6 +97,12 @@ fi
%exclude %{_mandir}/man1/last.1*
%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
- Package init