- update to latest upstream

- fixes #660459 - Should be able to set options with /etc/sysconfig/acpi
This commit is contained in:
Jiri Skala 2010-12-08 11:09:40 +01:00
parent bd63b74bea
commit 1f8283786f
8 changed files with 20 additions and 32 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
acpid-2.0.5.tar.gz
/acpid-2.0.7.tar.gz

View File

@ -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 */

View File

@ -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();

View File

@ -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

View File

@ -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

View File

@ -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 <jskala@redhat.com> - 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 <jskala@redhat.com> - 2.0.5-5
- fixes #648221 - SELinux is preventing /sbin/iwconfig access to a leaked /dev/input/event0 file descriptor

1
acpid.sysconfig Normal file
View File

@ -0,0 +1 @@
OPTIONS=

View File

@ -1 +1 @@
796b99ca935e248c3be1f222a38f5ee1 acpid-2.0.5.tar.gz
84832448304e0b19c8cf566fe5b64be0 acpid-2.0.7.tar.gz