From: Michael Tremer Date: Mon, 30 Apr 2012 21:20:18 +0000 (+0200) Subject: acpid: Update to 2.0.16 (among other changes). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4121e158baacff470c2ee8dd5bec852f22e9b1a0;p=ipfire-3.x.git acpid: Update to 2.0.16 (among other changes). The package is from now on only built for x86 architectures and will be enabled by default when installed. --- diff --git a/acpid/acpid.nm b/acpid/acpid.nm index b0baa161a..0973b036b 100644 --- a/acpid/acpid.nm +++ b/acpid/acpid.nm @@ -4,8 +4,11 @@ ############################################################################### name = acpid -version = 2.0.9 -release = 5 +version = 2.0.16 +release = 1 + +# ACPI is only available on x86 architectures. +sup_arches = x86_64 i686 groups = System/Daemons url = http://tedfelix.com/linux/acpid-netlink.html @@ -17,26 +20,40 @@ description end source_dl = http://tedfelix.com/linux/ +sources = %{thisapp}.tar.xz build - build - sed -e "s/-Werror//g" -i Makefile - make CC=gcc RPM_OPT_FLAGS="%{CFLAGS}" %{PARALLLEISMFLAGS} - end - install_cmds mkdir -pv %{BUILDROOT}/etc/acpi/{actions,events} cp -vf %{DIR_SOURCE}/power %{BUILDROOT}/etc/acpi/events/ cp -vf %{DIR_SOURCE}/power.sh %{BUILDROOT}/etc/acpi/actions/ - - mkdir -pv %{BUILDROOT}/etc/sysconfig - cp -vf %{DIR_SOURCE}/acpid.sysconfig %{BUILDROOT}/etc/sysconfig/acpid end end packages package %{name} groups += Base + + script postin + /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : + + # ACPI is enabled by default. + /usr/bin/systemctl --no-reload enable acpid.service >/dev/null 2>&1 || : + end + + script preun + /usr/bin/systemctl --no-reload disable acpid.service >/dev/null 2>&1 || : + /usr/bin/systemctl stop acpid.service >/dev/null 2>&1 || : + end + + script postun + /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postup + /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : + /usr/bin/systemctl try-restart acpid.service >/dev/null 2>&1 || : + end end package %{name}-debuginfo diff --git a/acpid/acpid.sysconfig b/acpid/acpid.sysconfig deleted file mode 100644 index f0d2bfb76..000000000 --- a/acpid/acpid.sysconfig +++ /dev/null @@ -1 +0,0 @@ -OPTIONS= diff --git a/acpid/patches/acpid-2.0.15-makefile.patch b/acpid/patches/acpid-2.0.15-makefile.patch new file mode 100644 index 000000000..0168986a6 --- /dev/null +++ b/acpid/patches/acpid-2.0.15-makefile.patch @@ -0,0 +1,24 @@ +diff -up acpid-2.0.15/Makefile.am.mk acpid-2.0.15/Makefile.am +--- acpid-2.0.15/Makefile.am.mk 2012-02-17 04:37:12.109907134 +0100 ++++ acpid-2.0.15/Makefile.am 2012-03-16 11:27:15.127573044 +0100 +@@ -20,7 +20,7 @@ acpi_listen_SOURCES = acpi_listen.c log. + + dist_man8_MANS = acpid.8 acpi_listen.8 + +-dist_doc_DATA = COPYING Changelog README TESTPLAN TODO ++dist_doc_DATA = + + # Just docs to add to the dist. + # One problem with this is that it includes all files in the samples dir +diff -up acpid-2.0.15/Makefile.in.mk acpid-2.0.15/Makefile.in +--- acpid-2.0.15/Makefile.in.mk 2012-03-16 11:28:53.568421905 +0100 ++++ acpid-2.0.15/Makefile.in 2012-03-16 11:29:21.679378750 +0100 +@@ -276,7 +276,7 @@ acpid_SOURCES = acpid.c acpi_ids.c conne + + acpi_listen_SOURCES = acpi_listen.c log.c ud_socket.c + dist_man8_MANS = acpid.8 acpi_listen.8 +-dist_doc_DATA = COPYING Changelog README TESTPLAN TODO ++dist_doc_DATA = + + # Just docs to add to the dist. + # One problem with this is that it includes all files in the samples dir diff --git a/acpid/patches/acpid-2.0.2-makefile.patch b/acpid/patches/acpid-2.0.2-makefile.patch deleted file mode 100644 index 0ba9e7960..000000000 --- a/acpid/patches/acpid-2.0.2-makefile.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile -diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile -diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile -diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile -diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile ---- acpid-2.0.2/Makefile.makefile 2010-01-27 00:36:23.000000000 +0100 -+++ acpid-2.0.2/Makefile 2010-02-25 16:01:39.641024017 +0100 -@@ -31,8 +31,9 @@ MAN8GZ = $(MAN8:.8=.8.gz) - - DOCS = COPYING Changelog README TESTPLAN TODO - --CFLAGS = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE $(OPT) \ -- -fno-strict-aliasing -g $(DEFS) -+CFLAGS = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE -O2 $(OPT) \ -+ -fno-strict-aliasing -g $(DEFS) $(RPM_OPT_FLAGS) -fPIE -+LDFLAGS = -pie -Wl,-z,relro - DEFS = -DVERSION="\"$(VERSION)\"" - - all: $(PROGS) -@@ -46,8 +47,8 @@ man: $(MAN8) - - install_docs: - mkdir -p $(DESTDIR)/$(DOCDIR) -- for a in $(DOCS); do install -m 0644 $$a $(DESTDIR)/$(DOCDIR) ; done -- cp -a samples $(DESTDIR)/$(DOCDIR) -+ #for a in $(DOCS); do install -m 0644 $$a $(DESTDIR)/$(DOCDIR) ; done -+ #cp -a samples $(DESTDIR)/$(DOCDIR) - - install: $(PROGS) man install_docs - mkdir -p $(DESTDIR)/$(SBINDIR) diff --git a/acpid/systemd/acpid.service b/acpid/systemd/acpid.service index 553b3e2ff..0826d86e1 100644 --- a/acpid/systemd/acpid.service +++ b/acpid/systemd/acpid.service @@ -2,17 +2,9 @@ Description=ACPI Event Daemon After=syslog.target -# This could probably benefit from socket activation, but honestly I think it -# is time for acpid to go away, and hence I am not planning to spend the time -# to add socket activation here. We use Type=forking to ensure that the -# communication sockets are in place before boot proceeds with any service -# needing this service. Would acpid support socket activation we could use -# Type=simple here. - [Service] Type=forking -EnvironmentFile=/etc/sysconfig/acpid -ExecStart=/usr/sbin/acpid $OPTIONS +ExecStart=/usr/sbin/acpid [Install] WantedBy=multi-user.target