Updated to version 1.0.6

This commit is contained in:
Zdenek Prikryl 2007-08-10 06:47:27 +00:00
parent 20aacf09f1
commit e7f517db69
9 changed files with 35 additions and 85 deletions

View File

@ -1 +1 @@
acpid-1.0.4.tar.gz
acpid-1.0.6.tar.gz

View File

@ -1,10 +0,0 @@
diff -urN acpid/samples/sample.conf acpid-1.0.3/samples/sample.conf
--- acpid/samples/sample.conf 2001-08-16 23:50:27.000000000 +0200
+++ acpid-1.0.3/samples/sample.conf 2004-08-09 01:15:09.879605992 +0200
@@ -1,4 +1,4 @@
# This is a sample ACPID configuration
-# event=button power.*
-# action=/usr/local/bin/power.sh "%e"
+event=button/power.*
+action=/sbin/shutdown -h now

View File

@ -1,20 +0,0 @@
diff -u acpid-1.0.3/Makefile acpid-1.0.3/Makefile
--- acpid-1.0.3/Makefile 2004-08-09 01:27:12.415763800 +0200
+++ acpid-1.0.3/Makefile 2004-08-09 01:29:42.110006816 +0200
@@ -21,7 +21,7 @@
MAN8 = acpid.8 acpi_listen.8
MAN8GZ = $(MAN8:.8=.8.gz)
-CFLAGS = -Wall -Werror -g $(DEFS)
+CFLAGS = -Wall -Werror -g $(DEFS) $(RPM_OPT_FLAGS)
DEFS = -DVERSION="\"$(VERSION)\""
all: $(PROGS)
@@ -36,6 +36,7 @@
install: $(PROGS) man
mkdir -p $(SBINDIR)
install -m 750 acpid $(SBINDIR)
+ mkdir -p $(BINDIR)
install -m 755 acpi_listen $(BINDIR)
mkdir -p $(MAN8DIR)
install -m 644 $(MAN8GZ) $(MAN8DIR)

View File

@ -1,13 +0,0 @@
diff -ur acpid-1.0.4.orig/Makefile acpid-1.0.4/Makefile
--- acpid-1.0.4.orig/Makefile 2006-10-08 09:48:31.000000000 -0400
+++ acpid-1.0.4/Makefile 2006-10-08 09:55:47.000000000 -0400
@@ -21,7 +21,8 @@
MAN8 = acpid.8 acpi_listen.8
MAN8GZ = $(MAN8:.8=.8.gz)
-CFLAGS = -Wall -Werror -g $(DEFS) $(RPM_OPT_FLAGS)
+CFLAGS = -Wall -Werror -g $(DEFS) $(RPM_OPT_FLAGS) -fPIE
+LDFLAGS = -pie -Wl,-z,relro
DEFS = -DVERSION="\"$(VERSION)\""
all: $(PROGS)

View File

@ -1,33 +0,0 @@
--- acpid-1.0.4/ud_socket.c.warning 2003-11-17 16:24:58.000000000 -0500
+++ acpid-1.0.4/ud_socket.c 2005-03-16 17:51:40.000000000 -0500
@@ -58,7 +58,7 @@
while (1) {
int newsock = 0;
struct sockaddr_un cliaddr;
- int len = sizeof(struct sockaddr_un);
+ socklen_t len = sizeof(struct sockaddr_un);
newsock = accept(listenfd, (struct sockaddr *)&cliaddr, &len);
if (newsock < 0) {
--- acpid-1.0.4/acpid.c.warning 2004-10-17 18:33:51.000000000 -0400
+++ acpid-1.0.4/acpid.c 2005-03-16 17:52:23.000000000 -0500
@@ -61,7 +61,7 @@
main(int argc, char **argv)
{
int event_fd;
- int sock_fd;
+ int sock_fd = -1;
/* learn who we really are */
progname = (const char *)strrchr(argv[0], '/');
@@ -386,9 +386,7 @@
umask(0);
/* get outta the way */
- chdir("/");
-
- return 0;
+ return chdir("/");
}
static int

View File

@ -0,0 +1,12 @@
--- acpid-1.0.6/Makefile.flags 2007-06-30 21:15:45.000000000 +0200
+++ acpid-1.0.6/Makefile 2007-08-07 10:29:18.000000000 +0200
@@ -21,7 +21,8 @@ acpi_listen_OBJS = $(acpi_listen_SRCS:.c
MAN8 = acpid.8 acpi_listen.8
MAN8GZ = $(MAN8:.8=.8.gz)
-CFLAGS = -Wall -Werror -g $(DEFS)
+CFLAGS = -Wall -Werror -g $(DEFS) $(RPM_OPT_FLAGS) -fPIE
+LDFLAGS = -pie -Wl,-z,relro
DEFS = -DVERSION="\"$(VERSION)\""
all: $(PROGS)

13
acpid-1.0.6-return.patch Normal file
View File

@ -0,0 +1,13 @@
--- acpid-1.0.6/acpid.c.return 2007-05-25 06:19:23.000000000 +0200
+++ acpid-1.0.6/acpid.c 2007-08-07 10:30:35.000000000 +0200
@@ -387,9 +387,7 @@ daemonize(void)
umask(0);
/* get outta the way */
- chdir("/");
-
- return 0;
+ return chdir("/");
}
static int

View File

@ -1,7 +1,7 @@
Summary: ACPI Event Daemon
Name: acpid
Version: 1.0.4
Release: 8%{?dist}
Version: 1.0.6
Release: 1%{?dist}
License: GPL
Group: System Environment/Daemons
Source: http://prdownloads.sourceforge.net/acpid/acpid-%{version}.tar.gz
@ -9,9 +9,8 @@ Source1: acpid.logrotate
Source2: acpid.init
Source3: acpid.video.conf
Source4: acpid.power.conf
Patch1: acpid-1.0.3-makefile.patch
Patch2: acpid-1.0.4-warning.patch
Patch3: acpid-1.0.4-pie.patch
Patch1: acpid-1.0.6-makefile.patch
Patch2: acpid-1.0.6-return.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: ia64 x86_64 %{ix86}
URL: http://acpid.sourceforge.net/
@ -27,8 +26,7 @@ acpid is a daemon that dispatches ACPI events to user-space programs.
%prep
%setup -q
%patch1 -p1 -b .makefile
%patch2 -p1 -b .warning
%patch3 -p1 -b .pie
%patch2 -p1 -b .return
%build
make %{?_smp_mflags}
@ -87,6 +85,9 @@ if [ "$1" -ge "1" ]; then
fi
%changelog
* Tue Aug 07 2007 Zdenek Prikryl <zdprikryl@redhat.com> - 1.0.6-1.fc8
- Updated to version 1.0.6
* Wed Jul 25 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.4-8.fc8
- Fixed init script to comply with LSB standard
- Resolves: #237754

View File

@ -1 +1 @@
3aff94e92186e99ed5fd6dcee2db7c74 acpid-1.0.4.tar.gz
5c9b705700df51d232be223b6ab6414d acpid-1.0.6.tar.gz