From 1f8283786f901df9ae61baba6293473a2f6fbb7a Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Dec 08 2010 10:09:40 +0000 Subject: - update to latest upstream - fixes #660459 - Should be able to set options with /etc/sysconfig/acpi --- diff --git a/.gitignore b/.gitignore index 455eaf0..0ffbf49 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ acpid-2.0.5.tar.gz +/acpid-2.0.7.tar.gz diff --git a/acpid-2.0.5-cloexec.patch b/acpid-2.0.5-cloexec.patch deleted file mode 100644 index d2954b2..0000000 --- a/acpid-2.0.5-cloexec.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up acpid-2.0.5/input_layer.c.cloexec acpid-2.0.5/input_layer.c ---- acpid-2.0.5/input_layer.c.cloexec 2010-11-03 14:53:16.515625864 +0100 -+++ acpid-2.0.5/input_layer.c 2010-11-03 14:53:50.235623005 +0100 -@@ -291,6 +291,7 @@ int open_inputfile(const char *filename) - struct connection c; - - fd = open(filename, O_RDONLY | O_NONBLOCK); -+ fcntl(fd, F_SETFD, FD_CLOEXEC); - - if (fd >= 0) { - /* if this file doesn't have events we need, indicate failure */ diff --git a/acpid-2.0.5-forking.patch b/acpid-2.0.5-forking.patch deleted file mode 100644 index 82f2558..0000000 --- a/acpid-2.0.5-forking.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up acpid-2.0.5/acpid.c.forking acpid-2.0.5/acpid.c ---- acpid-2.0.5/acpid.c.forking 2010-03-28 15:54:23.000000000 +0200 -+++ acpid-2.0.5/acpid.c 2010-09-10 13:38:06.207131183 +0200 -@@ -333,7 +333,7 @@ daemonize(void) - pid_t pid, sid; - - /* already a daemon */ -- if ( getppid() == 1 ) return 0; -+ //if ( getppid() == 1 ) return 0; - - /* fork off the parent process */ - pid = fork(); diff --git a/acpid.init b/acpid.init index b2f30db..0ddab7a 100755 --- a/acpid.init +++ b/acpid.init @@ -21,6 +21,9 @@ # Source function library. . /etc/rc.d/init.d/functions +# Source networking configuration. +. /etc/sysconfig/acpid + RETVAL=0 # @@ -42,7 +45,7 @@ start() { # Check if it is already running if [ ! -f /var/lock/subsys/acpid ]; then echo -n $"Starting acpi daemon: " - daemon /usr/sbin/acpid + daemon /usr/sbin/acpid $OPTIONS RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid echo diff --git a/acpid.service b/acpid.service index 144997a..553b3e2 100644 --- a/acpid.service +++ b/acpid.service @@ -11,7 +11,8 @@ After=syslog.target [Service] Type=forking -ExecStart=/usr/sbin/acpid +EnvironmentFile=/etc/sysconfig/acpid +ExecStart=/usr/sbin/acpid $OPTIONS [Install] WantedBy=multi-user.target diff --git a/acpid.spec b/acpid.spec index d50ea1f..4507abc 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,7 +1,7 @@ Summary: ACPI Event Daemon Name: acpid -Version: 2.0.5 -Release: 5%{?dist} +Version: 2.0.7 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz @@ -10,10 +10,9 @@ Source2: acpid.video.conf Source3: acpid.power.conf Source4: acpid.power.sh Source5: acpid.service +Source6: acpid.sysconfig Patch1: acpid-2.0.2-makefile.patch -Patch2: acpid-2.0.5-forking.patch -Patch3: acpid-2.0.5-cloexec.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: ia64 x86_64 %{ix86} @@ -32,8 +31,6 @@ acpid is a daemon that dispatches ACPI events to user-space programs. %setup -q %patch1 -p1 -b .makefile -%patch2 -p1 -b .forking -%patch3 -p1 -b .cloexec %build make %{?_smp_mflags} @@ -47,11 +44,14 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions mkdir -p $RPM_BUILD_ROOT/lib/systemd/system +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig + chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/videoconf install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/powerconf install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/power.sh install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/lib/systemd/system +install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/acpid mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/acpid @@ -71,6 +71,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/acpi/events/videoconf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/acpi/events/powerconf %config(noreplace) %attr(0755,root,root) %{_sysconfdir}/acpi/actions/power.sh +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/acpid %{_bindir}/acpi_listen %{_sbindir}/acpid %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/acpid @@ -115,6 +116,10 @@ if [ "$1" -ge "1" ]; then fi %changelog +* Wed Dec 08 2010 Jiri Skala - 2.0.7-1 +- update to latest upstream +- fixes #660459 - Should be able to set options with /etc/sysconfig/acpi + * Wed Nov 03 2010 Jiri Skala - 2.0.5-5 - fixes #648221 - SELinux is preventing /sbin/iwconfig access to a leaked /dev/input/event0 file descriptor diff --git a/acpid.sysconfig b/acpid.sysconfig new file mode 100644 index 0000000..f0d2bfb --- /dev/null +++ b/acpid.sysconfig @@ -0,0 +1 @@ +OPTIONS= diff --git a/sources b/sources index b3fffb2..e9810f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -796b99ca935e248c3be1f222a38f5ee1 acpid-2.0.5.tar.gz +84832448304e0b19c8cf566fe5b64be0 acpid-2.0.7.tar.gz