From 0aef2ac2f19d5f27c8dae0207ad620f0a022d2e1 Mon Sep 17 00:00:00 2001 From: Jochen Schmitt Date: Tue, 28 Aug 2012 17:28:35 +0200 Subject: [PATCH 1/3] Fix misprint operator in %post stanza (#852419) --- and.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/and.spec b/and.spec index 15430c5..e5223b6 100644 --- a/and.spec +++ b/and.spec @@ -1,6 +1,6 @@ Name: and Version: 1.2.2 -Release: 15%{?dist} +Release: 17%{?dist} Summary: Auto nice daemon License: GPLv2 @@ -85,7 +85,7 @@ if [ $1 -eq 1 ]; then fi %postun -if [ $0 -en 0 ]; then +if [ $0 -ne 0 ]; then /bin/systemctl try-restart and.service >/dev/null 2>&1 || : fi @@ -100,6 +100,9 @@ fi %{_unitdir}/and.service %changelog +* Tue Aug 28 2012 Jochen Schmitt 1.2.2-17 +- Fix misprint operator in %%post stanza (#852419) + * Thu Jan 12 2012 Fedora Release Engineering - 1.2.2-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 52e436aaa10fb66f6fa3eca14440b35832d5b8b4 Mon Sep 17 00:00:00 2001 From: Jochen Schmitt Date: Fri, 5 Oct 2012 19:14:41 +0200 Subject: [PATCH 2/3] Use of systemd macros instead of scriptlets --- and.spec | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/and.spec b/and.spec index e5223b6..cd64f45 100644 --- a/and.spec +++ b/and.spec @@ -12,8 +12,6 @@ Source1: and.sysconf Source2: and.service Patch1: and-1.2.2-makefile.patch -Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) - Obsoletes: and-sysvinit < %{version}-%{release} Provides: and-sysvinit = %{version}-%{release} @@ -32,9 +30,6 @@ Obsoletes: and-sysvinit < 1.2.2-11 provides: and-units = %{version}-%{release} Obsoletes: and-units < 1.2.2-11 - -Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) - %description The auto nice daemon renices and even kills jobs according to their CPU time, owner, and command name. This is especially useful on production machines with @@ -54,7 +49,6 @@ make %{?_smp_mflags} \ INSTALL_MAN=%{_mandir} %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_mandir}/man8 @@ -70,24 +64,14 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/and mkdir -p %{buildroot}%{_unitdir} install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir} -%clean -rm -rf %{buildroot} - %post -if [ $1 -eq 1 ]; then - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post and.service %preun -if [ $1 -eq 1 ]; then - /bin/systemctl --no-reload disable and.service >/dev/null 2>&1 || : - /bin/systemctl stop and.service >/dev/null 2>&1 || : -fi +%systemd_preun and.service %postun -if [ $0 -ne 0 ]; then - /bin/systemctl try-restart and.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart and.service %files %defattr(-,root,root) @@ -100,6 +84,9 @@ fi %{_unitdir}/and.service %changelog +* Fri Oct 5 2012 Jochen Schmitt 1.2.2-17 +- Use of systemd macros instead of scriptlets + * Tue Aug 28 2012 Jochen Schmitt 1.2.2-17 - Fix misprint operator in %%post stanza (#852419) From 4f4eaf2daf971289d074d40fb6ef2356db0736ba Mon Sep 17 00:00:00 2001 From: Jochen Schmitt Date: Fri, 5 Oct 2012 19:15:26 +0200 Subject: [PATCH 3/3] Revert "Use of systemd macros instead of scriptlets" This reverts commit 52e436aaa10fb66f6fa3eca14440b35832d5b8b4. --- and.spec | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/and.spec b/and.spec index cd64f45..e5223b6 100644 --- a/and.spec +++ b/and.spec @@ -12,6 +12,8 @@ Source1: and.sysconf Source2: and.service Patch1: and-1.2.2-makefile.patch +Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) + Obsoletes: and-sysvinit < %{version}-%{release} Provides: and-sysvinit = %{version}-%{release} @@ -30,6 +32,9 @@ Obsoletes: and-sysvinit < 1.2.2-11 provides: and-units = %{version}-%{release} Obsoletes: and-units < 1.2.2-11 + +Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) + %description The auto nice daemon renices and even kills jobs according to their CPU time, owner, and command name. This is especially useful on production machines with @@ -49,6 +54,7 @@ make %{?_smp_mflags} \ INSTALL_MAN=%{_mandir} %install +rm -rf %{buildroot} mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_mandir}/man8 @@ -64,14 +70,24 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/and mkdir -p %{buildroot}%{_unitdir} install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir} +%clean +rm -rf %{buildroot} + %post -%systemd_post and.service +if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi %preun -%systemd_preun and.service +if [ $1 -eq 1 ]; then + /bin/systemctl --no-reload disable and.service >/dev/null 2>&1 || : + /bin/systemctl stop and.service >/dev/null 2>&1 || : +fi %postun -%systemd_postun_with_restart and.service +if [ $0 -ne 0 ]; then + /bin/systemctl try-restart and.service >/dev/null 2>&1 || : +fi %files %defattr(-,root,root) @@ -84,9 +100,6 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir} %{_unitdir}/and.service %changelog -* Fri Oct 5 2012 Jochen Schmitt 1.2.2-17 -- Use of systemd macros instead of scriptlets - * Tue Aug 28 2012 Jochen Schmitt 1.2.2-17 - Fix misprint operator in %%post stanza (#852419)