Hello community,

here is the log from the commit of package acct for openSUSE:Factory checked in 
at 2013-06-09 16:32:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/acct (Old)
 and      /work/SRC/openSUSE:Factory/.acct.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "acct"

Changes:
--------
--- /work/SRC/openSUSE:Factory/acct/acct.changes        2013-04-26 
15:35:12.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.acct.new/acct.changes   2013-06-09 
16:32:22.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Jun  6 14:53:49 UTC 2013 - [email protected]
+
+- 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.
+
+-------------------------------------------------------------------

Old:
----
  rc.acct

New:
----
  acct.service

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ acct.spec ++++++
--- /var/tmp/diff_new_pack.1kKKjo/_old  2013-06-09 16:32:23.000000000 +0200
+++ /var/tmp/diff_new_pack.1kKKjo/_new  2013-06-09 16:32:23.000000000 +0200
@@ -21,12 +21,15 @@
 Version:        6.5.5
 Release:        0
 Source:         %{name}-%{version}.tar.gz
-Source1:        rc.acct
+Source1:        acct.service
 Source2:        logrotate.acct
 BuildRequires:  libtool
+BuildRequires:  systemd
+%{?systemd_requires}
 %if %suse_version >= 1230
 BuildRequires:  makeinfo
 %endif
+Requires:       logrotate
 Patch:          %{name}-hz.patch
 Patch2:         %{name}-info.patch
 Patch3:         %{name}-ac.patch
@@ -61,31 +64,34 @@
 
 %install
 make DESTDIR=$RPM_BUILD_ROOT install CC="%{__cc}" CXX="%{__cxx}"
-install -d -m 755 $RPM_BUILD_ROOT/etc/{init.d,logrotate.d}
-install -m 755 %{S:1}  $RPM_BUILD_ROOT/etc/init.d/acct
+install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d
+install -d -m 755 $RPM_BUILD_ROOT/%{_unitdir}
+install -m 644 %{S:1} $RPM_BUILD_ROOT/%{_unitdir}/acct.service
 install -m 644 %{S:2}  $RPM_BUILD_ROOT/etc/logrotate.d/acct
 install -d -m 755 $RPM_BUILD_ROOT/var/account/
 touch $RPM_BUILD_ROOT/var/account/pacct
 chmod 600 $RPM_BUILD_ROOT/var/account/pacct
 cd $RPM_BUILD_ROOT/usr/sbin/
-ln -sf ../../etc/init.d/acct rcacct
+ln -sf service rcacct
 rm -f $RPM_BUILD_ROOT/usr/bin/last
 rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/last.1*
 
+%pre
+%service_add_pre acct.service
+
 %post
-%{fillup_and_insserv acct}
 echo "Creating /var/account/pacct"
 touch var/account/pacct
 chmod 600 var/account/pacct
 %install_info --info-dir=%{_infodir} %{_infodir}/accounting.info.gz
+%service_add_post acct.service
 
 %preun
-%stop_on_removal acct
+%service_del_preun acct.service
 
 %postun
 %install_info_delete --info-dir=%{_infodir} %{_infodir}/accounting.info.gz
-%restart_on_update acct
-%{insserv_cleanup}
+%service_del_postun acct.service
 
 %files
 %defattr(-, root, root)
@@ -97,9 +103,9 @@
 %dir /var/account
 %attr(600, root, root) %ghost /var/account/pacct
 %config /etc/logrotate.d/acct
-%config /etc/init.d/acct
 /usr/bin/ac
 /usr/bin/lastcomm
 /usr/sbin/*
+%{_unitdir}/acct.service
 
 %changelog

++++++ acct.service ++++++
[Unit]
Description=Process accounting
Documentation=man:accton(8)

[Service]
Type=oneshot
RemainAfterExit=true
ExecStartPre=/bin/sh -c 'test -e /var/account/pacct || touch /var/account/pacct'
ExecStart=/usr/sbin/accton /var/account/pacct
ExecStop=/usr/sbin/accton off

++++++ logrotate.acct ++++++
--- /var/tmp/diff_new_pack.1kKKjo/_old  2013-06-09 16:32:23.000000000 +0200
+++ /var/tmp/diff_new_pack.1kKKjo/_new  2013-06-09 16:32:23.000000000 +0200
@@ -8,7 +8,7 @@
     missingok
     create 640 root root
     postrotate
-     /etc/init.d/acct force-reload
+     /usr/bin/systemctl restart acct.service
     endscript
 }
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to