From 2348eb7d7e5fa6a98ebce38d2431d32e941b69c3518eb908d677b0d562666f26 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Wed, 24 Aug 2011 12:28:37 +0000 Subject: [PATCH 1/3] Updating link to change in openSUSE:Factory/acpid revision 44.0 OBS-URL: https://build.opensuse.org/package/show/Base:System/acpid?expand=0&rev=ab2a43651b3637e79d733bb5e8f8911d --- acpid.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acpid.spec b/acpid.spec index 062014d..e4561b7 100644 --- a/acpid.spec +++ b/acpid.spec @@ -21,7 +21,7 @@ Name: acpid Url: http://tedfelix.com/linux/acpid-netlink.html Version: 2.0.10 -Release: 1 +Release: 3 License: GPLv2+ Group: System/Daemons AutoReqProv: on From 18544358eac46d8f17c07ead06cb8d91c2626f90ddfdc9feb31b2798bdd7bb8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Wed, 24 Aug 2011 20:35:10 +0000 Subject: [PATCH 2/3] Accepting request 79683 from home:fcrozat:systemd - Use systemd macros to enable acpid service. OBS-URL: https://build.opensuse.org/request/show/79683 OBS-URL: https://build.opensuse.org/package/show/Base:System/acpid?expand=0&rev=30 --- acpid.changes | 5 +++++ acpid.spec | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/acpid.changes b/acpid.changes index de05f96..acedb94 100644 --- a/acpid.changes +++ b/acpid.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Aug 24 16:30:58 UTC 2011 - fcrozat@suse.com + +- Use systemd macros to enable acpid service. + ------------------------------------------------------------------- Tue Aug 23 12:07:59 UTC 2011 - aj@suse.de diff --git a/acpid.spec b/acpid.spec index e4561b7..b22b0b8 100644 --- a/acpid.spec +++ b/acpid.spec @@ -26,6 +26,7 @@ License: GPLv2+ Group: System/Daemons AutoReqProv: on PreReq: %insserv_prereq %fillup_prereq +%systemd_requires Summary: Executes Actions at ACPI Events Source: http://tedfelix.com//linux/%{name}-%{version}.tar.gz Source2: rcacpid @@ -38,6 +39,7 @@ Source7: power_button Source8: acpid.service Patch1: acpid-makefile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: systemd ExclusiveArch: %ix86 x86_64 ia64 %description @@ -76,8 +78,8 @@ mkdir -p %{buildroot}/usr/sbin ln -sf ../../etc/init.d/acpid %{buildroot}/usr/sbin/rcacpid install -Dm 644 events.power_button %{buildroot}/etc/acpi/events/power_button install -Dm 644 events.thinkpad %{buildroot}/etc/acpi/events/thinkpad -mkdir -p $RPM_BUILD_ROOT/lib/systemd/system -install -m 644 %{SOURCE8} $RPM_BUILD_ROOT/lib/systemd/system +mkdir -p $RPM_BUILD_ROOT/%{_unitdir} +install -m 644 %{SOURCE8} $RPM_BUILD_ROOT/%{_unitdir} # for the rpmlint fascists mv samples examples @@ -88,15 +90,23 @@ touch %buildroot%_var/log/acpid %clean rm -rf %{buildroot} +%pre +%service_migrate_to_systemd_pre acpid + %post %{fillup_and_insserv -y -f acpid} +%service_migrate_to_systemd_post acpid +%service_add acpid.service %postun %restart_on_update acpid %{insserv_cleanup} +%service_migrate_to_systemd_postun acpid +%service_del_postun acpid.service -%preun +%preun %stop_on_removal acpid +%service_del_preun acpid.service %files %defattr(-,root,root) @@ -108,7 +118,7 @@ rm -rf %{buildroot} /usr/lib/acpid /etc/init.d/acpid /etc/modprobe.d/50-thinkpad_acpi.conf -/lib/systemd/system/%{name}.service +%_unitdir/%{name}.service /usr/sbin/rcacpid /sbin/acpid /usr/bin/acpi_listen From 213b3873622fba7398bfe2991d564c331056526f50d22f07bb27e37f7d608771 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 25 Aug 2011 05:22:02 +0000 Subject: [PATCH 3/3] put macros last OBS-URL: https://build.opensuse.org/package/show/Base:System/acpid?expand=0&rev=31 --- acpid.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acpid.spec b/acpid.spec index b22b0b8..1e84e04 100644 --- a/acpid.spec +++ b/acpid.spec @@ -26,7 +26,6 @@ License: GPLv2+ Group: System/Daemons AutoReqProv: on PreReq: %insserv_prereq %fillup_prereq -%systemd_requires Summary: Executes Actions at ACPI Events Source: http://tedfelix.com//linux/%{name}-%{version}.tar.gz Source2: rcacpid @@ -41,6 +40,7 @@ Patch1: acpid-makefile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: systemd ExclusiveArch: %ix86 x86_64 ia64 +%systemd_requires %description ACPID is a completely flexible, totally extensible daemon for