summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-07-17 19:53:50 +0000
committerMike Frysinger <vapier@gentoo.org>2007-07-17 19:53:50 +0000
commit45abfb27350df328c18912f3fa1f6494c3ba20e0 (patch)
treecec3b532ce53d897783be834b3ad95e13edb4d27 /sys-power
parentstable x86, security bug 171884 (diff)
downloadhistorical-45abfb27350df328c18912f3fa1f6494c3ba20e0.tar.gz
historical-45abfb27350df328c18912f3fa1f6494c3ba20e0.tar.bz2
historical-45abfb27350df328c18912f3fa1f6494c3ba20e0.zip
Use Gentoo defaults for /etc/acpi again since they are better than the Debian ones and fix bashism #170213 by Roy Marples. Also make sure we respect env CFLAGS.
Package-Manager: portage-2.1.3_rc8
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/acpid/ChangeLog11
-rw-r--r--sys-power/acpid/Manifest34
-rw-r--r--sys-power/acpid/acpid-1.0.6.ebuild17
-rwxr-xr-xsys-power/acpid/files/acpid-1.0.6-default.sh59
-rw-r--r--sys-power/acpid/files/acpid-1.0.6-examples.diff116
5 files changed, 99 insertions, 138 deletions
diff --git a/sys-power/acpid/ChangeLog b/sys-power/acpid/ChangeLog
index fcb05aad973d..821c03e1ba3c 100644
--- a/sys-power/acpid/ChangeLog
+++ b/sys-power/acpid/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-power/acpid
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.29 2007/07/17 19:42:55 genstef Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.30 2007/07/17 19:53:50 vapier Exp $
+
+ 17 Jul 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/acpid-1.0.6-default.sh, -files/acpid-1.0.6-examples.diff,
+ acpid-1.0.6.ebuild:
+ Use Gentoo defaults for /etc/acpi again since they are better than the
+ Debian ones and fix bashism #170213 by Roy Marples. Also make sure we
+ respect env CFLAGS.
*acpid-1.0.6 (17 Jul 2007)
diff --git a/sys-power/acpid/Manifest b/sys-power/acpid/Manifest
index 2f604bbf5c7c..cbf942e45bce 100644
--- a/sys-power/acpid/Manifest
+++ b/sys-power/acpid/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX acpid-1.0.4-default 663 RMD160 5e40661ec9112c3cc675a0d283e96311d2d159f1 SHA1 e74b2f7388c303fc3d3e33c0500d4b8185474dce SHA256 2b18111978043d68848983a54dfc946dd9b9b15592d0f4dc33491599dbe24b23
MD5 414d143f4c5e83c422f706f671820e6d files/acpid-1.0.4-default 663
RMD160 5e40661ec9112c3cc675a0d283e96311d2d159f1 files/acpid-1.0.4-default 663
@@ -22,10 +25,10 @@ AUX acpid-1.0.6-conf.d 156 RMD160 a7c8822a88b51f185c8740b075c968d0c045791d SHA1
MD5 316fd290809d94eb02c27b46de06ba9f files/acpid-1.0.6-conf.d 156
RMD160 a7c8822a88b51f185c8740b075c968d0c045791d files/acpid-1.0.6-conf.d 156
SHA256 5dfc6dbf687a47e853b0a9f9ed491cb1778b0d99195df5e7a5de849d269ca28c files/acpid-1.0.6-conf.d 156
-AUX acpid-1.0.6-examples.diff 3726 RMD160 d20796ed7dd7eff5360fd63c4ee0fc7bf4893548 SHA1 1d2f8bb630240c7a5315f23e6fdc9ca80c98abeb SHA256 6caddc6f26b42e1489023d0d38ef7b7607b82880acb5142b59d7e8fa6b711bc0
-MD5 be8daccc1eb202d79f12c9914b213f6e files/acpid-1.0.6-examples.diff 3726
-RMD160 d20796ed7dd7eff5360fd63c4ee0fc7bf4893548 files/acpid-1.0.6-examples.diff 3726
-SHA256 6caddc6f26b42e1489023d0d38ef7b7607b82880acb5142b59d7e8fa6b711bc0 files/acpid-1.0.6-examples.diff 3726
+AUX acpid-1.0.6-default.sh 1215 RMD160 188c766bc188b5e91b4d05875f7c6475eef22b70 SHA1 f09a5376351fe6c70d756b05b960cce7bf9b4944 SHA256 35080215d03ce9e21579bdeb17e3e37a27455605bdd0e9bc2ec695d006421ada
+MD5 ca060d240e28f94b442e5a665d27fdbc files/acpid-1.0.6-default.sh 1215
+RMD160 188c766bc188b5e91b4d05875f7c6475eef22b70 files/acpid-1.0.6-default.sh 1215
+SHA256 35080215d03ce9e21579bdeb17e3e37a27455605bdd0e9bc2ec695d006421ada files/acpid-1.0.6-default.sh 1215
AUX acpid-1.0.6-init.d 798 RMD160 4a690d548d1214acaa37c264bc57b32b23c43333 SHA1 fea4f991bfb4a52c0e0fb1c7a54650f7217a27f4 SHA256 9fa634c6aa257db725eb4bcd33ea3eff0f38fc04b41a2215fc6d57afaeb9ad1c
MD5 897b8da9770ec6c5a286d45fd86f484a files/acpid-1.0.6-init.d 798
RMD160 4a690d548d1214acaa37c264bc57b32b23c43333 files/acpid-1.0.6-init.d 798
@@ -45,14 +48,14 @@ EBUILD acpid-1.0.4-r5.ebuild 1758 RMD160 c52a8c3f72f5e013e8dc97f650b119edfa97494
MD5 1466fc402b1999f282944109ae5306ec acpid-1.0.4-r5.ebuild 1758
RMD160 c52a8c3f72f5e013e8dc97f650b119edfa974946 acpid-1.0.4-r5.ebuild 1758
SHA256 9b80728d6cfc31a86a80dd5523d0c0f3a17ed841f9435e763bca373bbf1b8be9 acpid-1.0.4-r5.ebuild 1758
-EBUILD acpid-1.0.6.ebuild 1784 RMD160 fb62dfa55ff1cffa0dd7e328071a4793adc2590a SHA1 ef1caffb000c2f133348521067960a1661d4302d SHA256 7ea64b0764d293584ad6fb27cdbe9956448825232bcbd9d5a21a2b2fea1e2c82
-MD5 0ab12485ac7e089769e2ba4edd9735ca acpid-1.0.6.ebuild 1784
-RMD160 fb62dfa55ff1cffa0dd7e328071a4793adc2590a acpid-1.0.6.ebuild 1784
-SHA256 7ea64b0764d293584ad6fb27cdbe9956448825232bcbd9d5a21a2b2fea1e2c82 acpid-1.0.6.ebuild 1784
-MISC ChangeLog 7344 RMD160 15dca1a4cf0175ae4ff22d3335d3719be65ed443 SHA1 76729ea30a87de15546814c80b465608e3f30dda SHA256 820abc34fd6e16d887bd637aa507129682faa4bdb9cdd50ce95c15f502113abd
-MD5 e2fa7003ad12e6acd9838a8b8ece9b70 ChangeLog 7344
-RMD160 15dca1a4cf0175ae4ff22d3335d3719be65ed443 ChangeLog 7344
-SHA256 820abc34fd6e16d887bd637aa507129682faa4bdb9cdd50ce95c15f502113abd ChangeLog 7344
+EBUILD acpid-1.0.6.ebuild 1860 RMD160 b707f6ed63e36c9bfe24f4dd4072e6aa35faa9b8 SHA1 31eba92a715fe4e980b2a4378542184a8a10f9d8 SHA256 1d6c31d1189eb787163e7f100d21c6fd10716f1ac9920abae8cf1a85ea043441
+MD5 209863de385e310ea5f11c2d373abd8f acpid-1.0.6.ebuild 1860
+RMD160 b707f6ed63e36c9bfe24f4dd4072e6aa35faa9b8 acpid-1.0.6.ebuild 1860
+SHA256 1d6c31d1189eb787163e7f100d21c6fd10716f1ac9920abae8cf1a85ea043441 acpid-1.0.6.ebuild 1860
+MISC ChangeLog 7650 RMD160 0032e0bd5e0c3b5dea5ba9aea8e15e6a7d363fc7 SHA1 5ebcfbed0641a2e9a4d9340af4757fefda192863 SHA256 2a2700da0a970cd2d14fb64f1c8abd9bebe73348a0b64ba456267a396d6761d4
+MD5 051a70349e5cba417ef4ee70ae204aa7 ChangeLog 7650
+RMD160 0032e0bd5e0c3b5dea5ba9aea8e15e6a7d363fc7 ChangeLog 7650
+SHA256 2a2700da0a970cd2d14fb64f1c8abd9bebe73348a0b64ba456267a396d6761d4 ChangeLog 7650
MISC metadata.xml 159 RMD160 54af1e9a61e5ed1b49b2bbbf3ef2278999c66b13 SHA1 bce3da4745192397c9a08bdbcf7e4914eac9b77b SHA256 ed3a0d440cfa5672284f4172ebde0ea6506c1a38e9a3ed9f14f3d2c093aac42f
MD5 19fd766bac8e110b4620363a1ace26dd metadata.xml 159
RMD160 54af1e9a61e5ed1b49b2bbbf3ef2278999c66b13 metadata.xml 159
@@ -66,3 +69,10 @@ SHA256 cf4ac1c52d7ba61781915be0bca9c2c4d3df8bd32910ab9b54846c3984a369f5 files/di
MD5 39dd40af3d51b1a2d9eef856a4ca4e79 files/digest-acpid-1.0.6 232
RMD160 df6ce3ff0bea4d58c2da9a1003df093f5274d343 files/digest-acpid-1.0.6 232
SHA256 f4930c7fa21bff984082ade6bd69b7c3ee65ac99417c0a98655ed3ad2414e701 files/digest-acpid-1.0.6 232
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.5 (GNU/Linux)
+
+iD8DBQFGnR6Np/wUKkr7RBoRAqZvAKCeWEc+ehTiuP0+PWTYo0jvZ0KuBACffs22
+NVM9x+JlOboMo/pGCpG5ZMA=
+=IGOA
+-----END PGP SIGNATURE-----
diff --git a/sys-power/acpid/acpid-1.0.6.ebuild b/sys-power/acpid/acpid-1.0.6.ebuild
index 2fefc12290b6..ef9c9fd1cab2 100644
--- a/sys-power/acpid/acpid-1.0.6.ebuild
+++ b/sys-power/acpid/acpid-1.0.6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/acpid-1.0.6.ebuild,v 1.1 2007/07/17 19:42:55 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/acpid-1.0.6.ebuild,v 1.2 2007/07/17 19:53:50 vapier Exp $
inherit eutils toolchain-funcs
@@ -18,8 +18,10 @@ RDEPEND=""
src_unpack() {
unpack ${A}
-
- epatch ${FILESDIR}/${P}-examples.diff
+ cd "${S}"
+ sed -i \
+ -e '/^CFLAGS /{s:=:+=:;s:-Werror -g::}' \
+ Makefile
}
src_compile() {
@@ -33,18 +35,17 @@ src_install() {
emake INSTPREFIX="${D}" install || die "emake install failed"
exeinto /etc/acpi
- doexe examples/default.sh
+ newexe "${FILESDIR}"/${P}-default.sh default.sh || die
insinto /etc/acpi/events
- doins examples/default
+ newins "${FILESDIR}"/acpid-1.0.4-default default || die
dodoc README Changelog TODO
- newinitd ${FILESDIR}/${P}-init.d acpid
- newconfd ${FILESDIR}/${P}-conf.d acpid
+ newinitd "${FILESDIR}"/${P}-init.d acpid
+ newconfd "${FILESDIR}"/${P}-conf.d acpid
docinto examples
dodoc samples/{acpi_handler.sh,sample.conf}
- dodoc examples/ac{,.sh}
docinto examples/battery
dodoc samples/battery/*
diff --git a/sys-power/acpid/files/acpid-1.0.6-default.sh b/sys-power/acpid/files/acpid-1.0.6-default.sh
new file mode 100755
index 000000000000..6db71b05cd61
--- /dev/null
+++ b/sys-power/acpid/files/acpid-1.0.6-default.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+# /etc/acpi/default.sh
+# Default acpi script that takes an entry for all actions
+
+set $*
+
+group=${1/%%/*}
+action=${1#*/}
+device=$2
+id=$3
+value=$4
+
+log_unhandled() {
+ logger "ACPI event unhandled: $*"
+}
+
+case "$group" in
+ button)
+ case "$action" in
+ power)
+ /sbin/init 0
+ ;;
+
+ # if your laptop doesnt turn on/off the display via hardware
+ # switch and instead just generates an acpi event, you can force
+ # X to turn off the display via dpms. note you will have to run
+ # 'xhost +local:0' so root can access the X DISPLAY.
+ #lid)
+ # xset dpms force off
+ # ;;
+
+ *) log_unhandled $* ;;
+ esac
+ ;;
+
+ ac_adapter)
+ case "$value" in
+ # Add code here to handle when the system is unplugged
+ # (maybe change cpu scaling to powersave mode). For
+ # multicore systems, make sure you set powersave mode
+ # for each core!
+ #*0)
+ # cpufreq-set -g powersave
+ # ;;
+
+ # Add code here to handle when the system is plugged in
+ # (maybe change cpu scaling to performance mode). For
+ # multicore systems, make sure you set performance mode
+ # for each core!
+ #*1)
+ # cpufreq-set -g performance
+ # ;;
+
+ *) log_unhandled $* ;;
+ esac
+ ;;
+
+ *) log_unhandled $* ;;
+esac
diff --git a/sys-power/acpid/files/acpid-1.0.6-examples.diff b/sys-power/acpid/files/acpid-1.0.6-examples.diff
deleted file mode 100644
index 5a8e21ff3603..000000000000
--- a/sys-power/acpid/files/acpid-1.0.6-examples.diff
+++ /dev/null
@@ -1,116 +0,0 @@
-diff -Nur acpid-1.0.6.orig/examples/ac acpid-1.0.6/examples/ac
---- acpid-1.0.6.orig/examples/ac 1970-01-01 01:00:00.000000000 +0100
-+++ acpid-1.0.6/examples/ac 2007-07-16 19:37:35.000000000 +0200
-@@ -0,0 +1,11 @@
-+# /etc/acpid/events/ac
-+# This detects changes to AC power status, and passes them to
-+# /etc/acpi/ac.sh for further processing.
-+
-+# Optionally you can specify the placeholder %e. It will pass
-+# through the whole kernel event message to the program you've
-+# specified.
-+
-+event=ac_adapter
-+action=/etc/acpi/ac.sh
-+
-diff -Nur acpid-1.0.6.orig/examples/ac.sh acpid-1.0.6/examples/ac.sh
---- acpid-1.0.6.orig/examples/ac.sh 1970-01-01 01:00:00.000000000 +0100
-+++ acpid-1.0.6/examples/ac.sh 2007-07-16 19:37:35.000000000 +0200
-@@ -0,0 +1,39 @@
-+#!/bin/sh
-+# /etc/acpid/ac.sh
-+# Detect loss of AC power and regaining of AC power, and take action
-+# appropriatly.
-+
-+# On my laptop anyway, this script doesn't not get different parameters for
-+# loss of power and regained power. So, I have to use a separate program to
-+# tell what the adapter status is.
-+
-+# This uses the spicctrl program for probing the sonypi device.
-+BACKLIGHT=$(spicctrl -B)
-+
-+if on_ac_power; then
-+ # Now on AC power.
-+
-+ # Tell longrun to go crazy.
-+ longrun -f performance
-+ longrun -s 0 100
-+
-+ # Turn up the backlight unless it's up far enough.
-+ if [ "$BACKLIGHT" -lt 108 ]; then
-+ spicctrl -b 108
-+ fi
-+else
-+ # Now off AC power.
-+
-+ # Tell longrun to be a miser.
-+ longrun -f economy
-+ longrun -s 0 50 # adjust to suite..
-+
-+ # Don't allow the screen to be too bright, but don't turn the
-+ # backlight _up_ on removal, and don't turn it all the way down, as
-+ # that is unusable on my laptop in most conditions. Adjust to
-+ # taste.
-+ if [ "$BACKLIGHT" -gt 68 ]; then
-+ spicctrl -b 68
-+ fi
-+fi
-+
-diff -Nur acpid-1.0.6.orig/examples/default acpid-1.0.6/examples/default
---- acpid-1.0.6.orig/examples/default 1970-01-01 01:00:00.000000000 +0100
-+++ acpid-1.0.6/examples/default 2007-07-16 19:37:35.000000000 +0200
-@@ -0,0 +1,18 @@
-+# This is the ACPID default configuration, it takes all
-+# events and passes them to /etc/acpi/default.sh for further
-+# processing.
-+
-+# event keeps a regular expression matching the event. To get
-+# power events only, just use something like "event=button power.*"
-+# to catch it.
-+# action keeps the command to be executed after an event occurs
-+# In case of the power event above, your entry may look this way:
-+#event=button power.*
-+#action=/sbin/init 0
-+
-+# Optionally you can specify the placeholder %e. It will pass
-+# through the whole kernel event message to the program you've
-+# specified.
-+
-+event=.*
-+action=/etc/acpi/default.sh %e
-diff -Nur acpid-1.0.6.orig/examples/default.sh acpid-1.0.6/examples/default.sh
---- acpid-1.0.6.orig/examples/default.sh 1970-01-01 01:00:00.000000000 +0100
-+++ acpid-1.0.6/examples/default.sh 2007-07-16 19:37:35.000000000 +0200
-@@ -0,0 +1,32 @@
-+#!/bin/sh
-+# Default acpi script that takes an entry for all actions
-+
-+set $*
-+
-+# Take care about the way events are reported
-+ev_type=`echo "$1" | cut -d/ -f1`
-+if [ "$ev_type" = "$1" ]; then
-+ event="$2";
-+else
-+ event=`echo "$1" | cut -d/ -f2`
-+fi
-+
-+
-+case "$ev_type" in
-+ button)
-+ case "$event" in
-+ power)
-+ logger "acpid: received a shutdown request"
-+ /sbin/init 0
-+ break
-+ ;;
-+ *)
-+ logger "acpid: action $2 is not defined"
-+ ;;
-+ esac
-+ ;;
-+
-+ *)
-+ logger "ACPI group $1 / action $2 is not defined"
-+ ;;
-+esac