rpms/acpid/devel acpid-1.0.8-makefile.patch, NONE, 1.1 acpid.power.sh, NONE, 1.1 .cvsignore, 1.7, 1.8 acpid.init, 1.10, 1.11 acpid.spec, 1.31, 1.32 sources, 1.7, 1.8 acpid-1.0.6-fd.patch, 1.2, NONE acpid-1.0.6-log.patch, 1.1, NONE acpid-1.0.6-makefile.patch, 1.2, NONE acpid-1.0.6-return.patch, 1.1, NONE

Zdenek Prikryl zprikryl at fedoraproject.org
Tue Nov 11 14:37:01 UTC 2008


Author: zprikryl

Update of /cvs/extras/rpms/acpid/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9170

Modified Files:
	.cvsignore acpid.init acpid.spec sources 
Added Files:
	acpid-1.0.8-makefile.patch acpid.power.sh 
Removed Files:
	acpid-1.0.6-fd.patch acpid-1.0.6-log.patch 
	acpid-1.0.6-makefile.patch acpid-1.0.6-return.patch 
Log Message:
Updated to version 1.0.8
power.sh works with ConsoleKit >= 0.3.0 (#470752)
Fixed conditions in power.sh, which look for power-managers (#470752)
Added check to init script


acpid-1.0.8-makefile.patch:

--- NEW FILE acpid-1.0.8-makefile.patch ---
diff -up acpid-1.0.8/Makefile.makefile acpid-1.0.8/Makefile
--- acpid-1.0.8/Makefile.makefile	2008-10-29 04:48:52.000000000 +0100
+++ acpid-1.0.8/Makefile	2008-11-11 15:19:21.000000000 +0100
@@ -23,7 +23,8 @@ all_SRCS = $(acpid_SRCS) $(acpi_listen_S
 MAN8 = acpid.8 acpi_listen.8
 MAN8GZ = $(MAN8:.8=.8.gz)
 
-CFLAGS = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE -O2 -g $(DEFS)
+CFLAGS = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE -O2 -g $(DEFS) $(RPM_OPT_FLAGS) -fPIE
+LDFLAGS = -pie -Wl,-z,relro
 DEFS = -DVERSION="\"$(VERSION)\""
 
 all: $(PROGS)


--- NEW FILE acpid.power.sh ---
#!/bin/sh

PATH=/sbin:/bin:/usr/bin

# Get the ID of the first active X11 session:
uid_session=$(
ck-list-sessions | \
awk '
/^Session[0-9]+:$/ { uid = active = x11 = "" ; next }
{ gsub(/'\''/, "", $3) }
$1 == "unix-user" { uid = $3 }
$1 == "active" { active = $3 }
$1 == "x11-display" { x11 = $3 }
active == "TRUE" && x11 != "" {
	print uid
	exit
}')

# Check that there is a power manager, otherwise shut down.
[ "$uid_session" ] &&
ps axo uid,cmd | \
awk '
    $1 == '$uid_session' &&
	($2 ~ /gnome-power-manager/ || $2 ~ /kpowersave/) \
		{ found = 1; exit }
    END { exit !found }
' ||
  shutdown -h now



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/acpid/devel/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- .cvsignore	23 Jan 2008 14:04:21 -0000	1.7
+++ .cvsignore	11 Nov 2008 14:36:30 -0000	1.8
@@ -1,2 +1 @@
-acpid-1.0.6.tar.gz
-acpid.power.sh
+acpid-1.0.8.tar.gz


Index: acpid.init
===================================================================
RCS file: /cvs/extras/rpms/acpid/devel/acpid.init,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- acpid.init	17 Apr 2008 18:58:13 -0000	1.10
+++ acpid.init	11 Nov 2008 14:36:30 -0000	1.11
@@ -27,12 +27,17 @@
 # See how we were called.
 #
 
-start() {
+check() {
 	# Check that we're a privileged user
 	[ `id -u` = 0 ] || exit 4
 	
 	# Check if acpid is executable
 	test -x /usr/sbin/acpid || exit 5
+}
+
+start() {
+
+	check
 	
 	# Check for kernel support
 	[ -f /proc/acpi/event ] || exit 1
@@ -49,6 +54,9 @@
 }
 
 stop() {
+
+	check
+	
 	echo -n $"Stopping acpi daemon: "
 	killproc /usr/sbin/acpid
 	RETVAL=$?
@@ -64,6 +72,9 @@
 }	
 
 reload() {
+
+	check
+	
 	trap "" SIGHUP
 	action $"Reloading acpi daemon:" killall -HUP acpid
 	RETVAL=$?


Index: acpid.spec
===================================================================
RCS file: /cvs/extras/rpms/acpid/devel/acpid.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- acpid.spec	14 Jul 2008 17:11:19 -0000	1.31
+++ acpid.spec	11 Nov 2008 14:36:30 -0000	1.32
@@ -1,7 +1,7 @@
 Summary: ACPI Event Daemon
 Name: acpid
-Version: 1.0.6
-Release: 8%{?dist}
+Version: 1.0.8
+Release: 1%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 Source: http://prdownloads.sourceforge.net/acpid/acpid-%{version}.tar.gz
@@ -9,10 +9,7 @@
 Source2: acpid.video.conf
 Source3: acpid.power.conf
 Source4: acpid.power.sh
-Patch1: acpid-1.0.6-makefile.patch
-Patch2: acpid-1.0.6-return.patch
-Patch3: acpid-1.0.6-fd.patch
-Patch4: acpid-1.0.6-log.patch
+Patch1: acpid-1.0.8-makefile.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExclusiveArch: ia64 x86_64 %{ix86}
 URL: http://acpid.sourceforge.net/
@@ -28,9 +25,6 @@
 %prep
 %setup -q
 %patch1 -p1 -b .makefile
-%patch2 -p1 -b .return
-%patch3 -p1 -b .fd
-%patch4 -p1 -b .log
 
 %build
 make %{?_smp_mflags}
@@ -87,6 +81,12 @@
 fi
 
 %changelog
+* Tue Nov 11 2008 Zdenek Prikryl <zprikryl at redhat.com> - 1.0.8-1
+- Updated to version 1.0.8
+- power.sh works with ConsoleKit >= 0.3.0 (#470752)
+- Fixed conditions in power.sh, which look for power-managers (#470752)
+- Added check to init script
+
 * Mon Jul 14 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 1.0.6-8
 - fix license tag
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/acpid/devel/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sources	23 Jan 2008 14:04:21 -0000	1.7
+++ sources	11 Nov 2008 14:36:30 -0000	1.8
@@ -1,2 +1 @@
-5c9b705700df51d232be223b6ab6414d  acpid-1.0.6.tar.gz
-581b7998a78b140ca58c428338c734ed  acpid.power.sh
+1d9c52fe2c0b51f8463f357c2a3d3ddb  acpid-1.0.8.tar.gz


--- acpid-1.0.6-fd.patch DELETED ---


--- acpid-1.0.6-log.patch DELETED ---


--- acpid-1.0.6-makefile.patch DELETED ---


--- acpid-1.0.6-return.patch DELETED ---




More information about the fedora-extras-commits mailing list