[arch-commits] Commit in pm-utils/repos (22 files)
Florian Pritz
bluewind at archlinux.org
Thu May 24 09:48:16 UTC 2012
Date: Thursday, May 24, 2012 @ 05:48:16
Author: bluewind
Revision: 159434
archrelease: copy trunk to extra-i686, extra-x86_64
Added:
pm-utils/repos/extra-i686/02-logging-append.patch
(from rev 159433, pm-utils/trunk/02-logging-append.patch)
pm-utils/repos/extra-i686/12-fix-intel-audio-powersave-hook.patch
(from rev 159433, pm-utils/trunk/12-fix-intel-audio-powersave-hook.patch)
pm-utils/repos/extra-i686/13-49bluetooth-sync.patch
(from rev 159433, pm-utils/trunk/13-49bluetooth-sync.patch)
pm-utils/repos/extra-i686/14-disable-sata-alpm.patch
(from rev 159433, pm-utils/trunk/14-disable-sata-alpm.patch)
pm-utils/repos/extra-i686/PKGBUILD
(from rev 159433, pm-utils/trunk/PKGBUILD)
pm-utils/repos/extra-x86_64/02-logging-append.patch
(from rev 159433, pm-utils/trunk/02-logging-append.patch)
pm-utils/repos/extra-x86_64/12-fix-intel-audio-powersave-hook.patch
(from rev 159433, pm-utils/trunk/12-fix-intel-audio-powersave-hook.patch)
pm-utils/repos/extra-x86_64/13-49bluetooth-sync.patch
(from rev 159433, pm-utils/trunk/13-49bluetooth-sync.patch)
pm-utils/repos/extra-x86_64/14-disable-sata-alpm.patch
(from rev 159433, pm-utils/trunk/14-disable-sata-alpm.patch)
pm-utils/repos/extra-x86_64/PKGBUILD
(from rev 159433, pm-utils/trunk/PKGBUILD)
Deleted:
pm-utils/repos/extra-i686/02-logging-append.patch
pm-utils/repos/extra-i686/11netcfg
pm-utils/repos/extra-i686/12-fix-intel-audio-powersave-hook.patch
pm-utils/repos/extra-i686/13-49bluetooth-sync.patch
pm-utils/repos/extra-i686/14-disable-sata-alpm.patch
pm-utils/repos/extra-i686/PKGBUILD
pm-utils/repos/extra-x86_64/02-logging-append.patch
pm-utils/repos/extra-x86_64/11netcfg
pm-utils/repos/extra-x86_64/12-fix-intel-audio-powersave-hook.patch
pm-utils/repos/extra-x86_64/13-49bluetooth-sync.patch
pm-utils/repos/extra-x86_64/14-disable-sata-alpm.patch
pm-utils/repos/extra-x86_64/PKGBUILD
------------------------------------------------------+
extra-i686/02-logging-append.patch | 38 +++---
extra-i686/11netcfg | 26 ----
extra-i686/12-fix-intel-audio-powersave-hook.patch | 80 ++++++-------
extra-i686/13-49bluetooth-sync.patch | 86 +++++++-------
extra-i686/14-disable-sata-alpm.patch | 52 ++++----
extra-i686/PKGBUILD | 99 ++++++++---------
extra-x86_64/02-logging-append.patch | 38 +++---
extra-x86_64/11netcfg | 26 ----
extra-x86_64/12-fix-intel-audio-powersave-hook.patch | 80 ++++++-------
extra-x86_64/13-49bluetooth-sync.patch | 86 +++++++-------
extra-x86_64/14-disable-sata-alpm.patch | 52 ++++----
extra-x86_64/PKGBUILD | 99 ++++++++---------
12 files changed, 350 insertions(+), 412 deletions(-)
Deleted: extra-i686/02-logging-append.patch
===================================================================
--- extra-i686/02-logging-append.patch 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-i686/02-logging-append.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,19 +0,0 @@
-Author: James Westby <james.westby at ubuntu.com>
-Description: Do not clear the log file on each operation, but instead append to it.
- This makes debugging of several suspends much easier.
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25255
-Bug-Ubuntu: https://launchpad.net/bugs/410352
-
-Index: pm-utils/pm/pm-functions.in
-===================================================================
---- pm-utils.orig/pm/pm-functions.in 2010-07-05 18:41:21.118322244 +0200
-+++ pm-utils/pm/pm-functions.in 2010-07-05 18:41:24.126325221 +0200
-@@ -271,7 +271,7 @@
- return 1
- fi
- export LOGGING=true
-- exec > "$1" 2>&1
-+ exec >> "$1" 2>&1
- }
-
- check_suspend() { [ -n "$SUSPEND_MODULE" ]; }
Copied: pm-utils/repos/extra-i686/02-logging-append.patch (from rev 159433, pm-utils/trunk/02-logging-append.patch)
===================================================================
--- extra-i686/02-logging-append.patch (rev 0)
+++ extra-i686/02-logging-append.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,19 @@
+Author: James Westby <james.westby at ubuntu.com>
+Description: Do not clear the log file on each operation, but instead append to it.
+ This makes debugging of several suspends much easier.
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25255
+Bug-Ubuntu: https://launchpad.net/bugs/410352
+
+Index: pm-utils/pm/pm-functions.in
+===================================================================
+--- pm-utils.orig/pm/pm-functions.in 2010-07-05 18:41:21.118322244 +0200
++++ pm-utils/pm/pm-functions.in 2010-07-05 18:41:24.126325221 +0200
+@@ -271,7 +271,7 @@
+ return 1
+ fi
+ export LOGGING=true
+- exec > "$1" 2>&1
++ exec >> "$1" 2>&1
+ }
+
+ check_suspend() { [ -n "$SUSPEND_MODULE" ]; }
Deleted: extra-i686/11netcfg
===================================================================
--- extra-i686/11netcfg 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-i686/11netcfg 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-. /usr/lib/pm-utils/functions
-
-suspend_netcfg() {
- netcfg2 all-suspend
-}
-
-resume_netcfg() {
- netcfg2 all-resume
-}
-
-if [ -x /usr/bin/netcfg2 ]; then
- case "$1" in
- hibernate|suspend)
- suspend_netcfg
- ;;
- thaw|resume)
- resume_netcfg
- ;;
- *)
- ;;
- esac
-fi
-
-exit $?
Deleted: extra-i686/12-fix-intel-audio-powersave-hook.patch
===================================================================
--- extra-i686/12-fix-intel-audio-powersave-hook.patch 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-i686/12-fix-intel-audio-powersave-hook.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,40 +0,0 @@
-From: Florian Kriener <florian at kriener.org>
-To: submit at bugs.debian.org
-Subject: [pm-utils] wrong path in intel-audio-powersave (and a small bug)
-Date: Sat, 25 Sep 2010 11:27:30 +0200
-
-In the script intel-audio-powersave is this loop
-
-for dev in /sys/module/snd_*/parameters/power_save; do
- [ -w "$dev/parameters/power_save" ] || continue
- printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
- echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
-done
-
-I think it should be
-
-for dev in /sys/module/snd_*; do
- [ -w "$dev/parameters/power_save" ] || continue
- printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
- echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
-done
-
-
-This fixes the two bugs.
-
-diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave
-index 36675a8..da63e40 100644
---- a/pm/power.d/intel-audio-powersave
-+++ b/pm/power.d/intel-audio-powersave
-@@ -20,9 +20,9 @@ EOF
-
- audio_powersave() {
- [ "$INTEL_AUDIO_POWERSAVE" = "true" ] || exit $NA
-- for dev in /sys/module/snd_*/parameters/power_save; do
-+ for dev in /sys/module/snd_*; do
- [ -w "$dev/parameters/power_save" ] || continue
-- printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
-+ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
- echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
- done
- }
Copied: pm-utils/repos/extra-i686/12-fix-intel-audio-powersave-hook.patch (from rev 159433, pm-utils/trunk/12-fix-intel-audio-powersave-hook.patch)
===================================================================
--- extra-i686/12-fix-intel-audio-powersave-hook.patch (rev 0)
+++ extra-i686/12-fix-intel-audio-powersave-hook.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,40 @@
+From: Florian Kriener <florian at kriener.org>
+To: submit at bugs.debian.org
+Subject: [pm-utils] wrong path in intel-audio-powersave (and a small bug)
+Date: Sat, 25 Sep 2010 11:27:30 +0200
+
+In the script intel-audio-powersave is this loop
+
+for dev in /sys/module/snd_*/parameters/power_save; do
+ [ -w "$dev/parameters/power_save" ] || continue
+ printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
+ echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
+done
+
+I think it should be
+
+for dev in /sys/module/snd_*; do
+ [ -w "$dev/parameters/power_save" ] || continue
+ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
+ echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
+done
+
+
+This fixes the two bugs.
+
+diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave
+index 36675a8..da63e40 100644
+--- a/pm/power.d/intel-audio-powersave
++++ b/pm/power.d/intel-audio-powersave
+@@ -20,9 +20,9 @@ EOF
+
+ audio_powersave() {
+ [ "$INTEL_AUDIO_POWERSAVE" = "true" ] || exit $NA
+- for dev in /sys/module/snd_*/parameters/power_save; do
++ for dev in /sys/module/snd_*; do
+ [ -w "$dev/parameters/power_save" ] || continue
+- printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
++ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
+ echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
+ done
+ }
Deleted: extra-i686/13-49bluetooth-sync.patch
===================================================================
--- extra-i686/13-49bluetooth-sync.patch 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-i686/13-49bluetooth-sync.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,43 +0,0 @@
-From 640b53438c20818b3e344343b58b1f1765606a85 Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martin.pitt at ubuntu.com>
-Date: Mon, 31 Jan 2011 15:30:01 +0100
-Subject: [PATCH] 49bluetooth: Wait for btusb module to get unused
-
-The 49bluetooth hook disables /proc/acpi/ibm/bluetooth but this isn't
-synchronous, i. e. it doesn't wait until the module usage count actually drops
-to 0. Due to that, it's impossible to add btusb to SUSPEND_MODULES (on some
-models/older kernels you need to do that to fix suspend problems), as at that
-point the module is still in use.
-
-On my system (ThinkPad X201) the module takes between 0.3 and 0.5 seconds to
-unload, so use 100 ms wait steps with a timeout of 2 seconds.
-
-Bug: https://bugs.freedesktop.org//show_bug.cgi?id=33759
-Bug-Ubuntu: https://launchpad.net/bugs/698331
----
- pm/sleep.d/49bluetooth | 9 +++++++++
- 1 files changed, 9 insertions(+), 0 deletions(-)
-
-diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth
-index d46ba49..0dc1909 100755
---- a/pm/sleep.d/49bluetooth
-+++ b/pm/sleep.d/49bluetooth
-@@ -12,6 +12,15 @@ suspend_bluetooth()
- if grep -q enabled /proc/acpi/ibm/bluetooth; then
- savestate ibm_bluetooth enable
- echo disable > /proc/acpi/ibm/bluetooth
-+
-+ # wait for up to 2 seconds for the module to actually get
-+ # unused
-+ TIMEOUT=20
-+ while [ $TIMEOUT -ge 0 ]; do
-+ [ `cat /sys/module/btusb/refcnt` = 0 ] && break
-+ TIMEOUT=$((TIMEOUT-1))
-+ sleep 0.1
-+ done
- else
- savestate ibm_bluetooth disable
- fi
---
-1.7.2.3
-
Copied: pm-utils/repos/extra-i686/13-49bluetooth-sync.patch (from rev 159433, pm-utils/trunk/13-49bluetooth-sync.patch)
===================================================================
--- extra-i686/13-49bluetooth-sync.patch (rev 0)
+++ extra-i686/13-49bluetooth-sync.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,43 @@
+From 640b53438c20818b3e344343b58b1f1765606a85 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt at ubuntu.com>
+Date: Mon, 31 Jan 2011 15:30:01 +0100
+Subject: [PATCH] 49bluetooth: Wait for btusb module to get unused
+
+The 49bluetooth hook disables /proc/acpi/ibm/bluetooth but this isn't
+synchronous, i. e. it doesn't wait until the module usage count actually drops
+to 0. Due to that, it's impossible to add btusb to SUSPEND_MODULES (on some
+models/older kernels you need to do that to fix suspend problems), as at that
+point the module is still in use.
+
+On my system (ThinkPad X201) the module takes between 0.3 and 0.5 seconds to
+unload, so use 100 ms wait steps with a timeout of 2 seconds.
+
+Bug: https://bugs.freedesktop.org//show_bug.cgi?id=33759
+Bug-Ubuntu: https://launchpad.net/bugs/698331
+---
+ pm/sleep.d/49bluetooth | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth
+index d46ba49..0dc1909 100755
+--- a/pm/sleep.d/49bluetooth
++++ b/pm/sleep.d/49bluetooth
+@@ -12,6 +12,15 @@ suspend_bluetooth()
+ if grep -q enabled /proc/acpi/ibm/bluetooth; then
+ savestate ibm_bluetooth enable
+ echo disable > /proc/acpi/ibm/bluetooth
++
++ # wait for up to 2 seconds for the module to actually get
++ # unused
++ TIMEOUT=20
++ while [ $TIMEOUT -ge 0 ]; do
++ [ `cat /sys/module/btusb/refcnt` = 0 ] && break
++ TIMEOUT=$((TIMEOUT-1))
++ sleep 0.1
++ done
+ else
+ savestate ibm_bluetooth disable
+ fi
+--
+1.7.2.3
+
Deleted: extra-i686/14-disable-sata-alpm.patch
===================================================================
--- extra-i686/14-disable-sata-alpm.patch 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-i686/14-disable-sata-alpm.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,26 +0,0 @@
-Description: Disable SATA link power management by default, as it still causes disk errors and corruptions on many hardware.
-Author: Martin Pitt <martin.pitt at ubuntu.com>
-Bug-Ubuntu: https://launchpad.net/bugs/539467
-
-Index: pm-utils/pm/power.d/sata_alpm
-===================================================================
---- pm-utils.orig/pm/power.d/sata_alpm 2011-02-01 15:53:09.164867778 +0100
-+++ pm-utils/pm/power.d/sata_alpm 2011-02-01 15:53:28.954867786 +0100
-@@ -2,7 +2,7 @@
-
- . "${PM_FUNCTIONS}"
-
--SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-true}
-+SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-false}
-
- help() {
- cat <<EOF
-@@ -16,7 +16,7 @@
-
- This hook has 1 parameter:
- SATA_ALPM_ENABLE = whether to use SATA ALPM on battery.
--Defaults to "true".
-+Defaults to "false".
-
- EOF
- }
Copied: pm-utils/repos/extra-i686/14-disable-sata-alpm.patch (from rev 159433, pm-utils/trunk/14-disable-sata-alpm.patch)
===================================================================
--- extra-i686/14-disable-sata-alpm.patch (rev 0)
+++ extra-i686/14-disable-sata-alpm.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,26 @@
+Description: Disable SATA link power management by default, as it still causes disk errors and corruptions on many hardware.
+Author: Martin Pitt <martin.pitt at ubuntu.com>
+Bug-Ubuntu: https://launchpad.net/bugs/539467
+
+Index: pm-utils/pm/power.d/sata_alpm
+===================================================================
+--- pm-utils.orig/pm/power.d/sata_alpm 2011-02-01 15:53:09.164867778 +0100
++++ pm-utils/pm/power.d/sata_alpm 2011-02-01 15:53:28.954867786 +0100
+@@ -2,7 +2,7 @@
+
+ . "${PM_FUNCTIONS}"
+
+-SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-true}
++SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-false}
+
+ help() {
+ cat <<EOF
+@@ -16,7 +16,7 @@
+
+ This hook has 1 parameter:
+ SATA_ALPM_ENABLE = whether to use SATA ALPM on battery.
+-Defaults to "true".
++Defaults to "false".
+
+ EOF
+ }
Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-i686/PKGBUILD 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,52 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-# Contributor: Thayer Williams <thayer at archlinux.org>
-# Contributor: Giovanni Scafora <giovanni at archlinux.org>
-
-pkgname=pm-utils
-pkgver=1.4.1
-pkgrel=4
-pkgdesc="Utilities and scripts for suspend and hibernate power management"
-arch=('i686' 'x86_64')
-url="http://pm-utils.freedesktop.org"
-license=('GPL')
-depends=('bash' 'procps' 'pm-quirks')
-makedepends=('xmlto' 'docbook-xml' 'docbook-xsl')
-source=(http://pm-utils.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
- 02-logging-append.patch
- 12-fix-intel-audio-powersave-hook.patch
- 13-49bluetooth-sync.patch
- 14-disable-sata-alpm.patch
- 11netcfg)
-md5sums=('1742a556089c36c3a89eb1b957da5a60'
- 'a45149617bf3eb8dc32e6d9e22ae715d'
- 'edada31a7d722763513fbe705d95d19d'
- '298f78b873c03c025700d5da619ac134'
- 'd0040f7d30b6a0dd195b5401abbbbdb9'
- '9839687c8787d99fd4ff36aa3238c27b')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i "${srcdir}/02-logging-append.patch"
- patch -Np1 -i "${srcdir}/12-fix-intel-audio-powersave-hook.patch"
- patch -Np1 -i "${srcdir}/13-49bluetooth-sync.patch"
- patch -Np1 -i "${srcdir}/14-disable-sata-alpm.patch"
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-
- # install additional hooks
- install -m755 "${srcdir}/11netcfg" "${pkgdir}/usr/lib/pm-utils/sleep.d/"
-
- # nm >=0.8.2 has native udev suspend/resume support
- rm -f "${pkgdir}/usr/lib/pm-utils/sleep.d/55NetworkManager"
-
- # Remove hooks that cause hardware failure or don't make sense at all
- rm -f "${pkgdir}/usr/lib/pm-utils/power.d/"{harddrive,disable_wol}
-}
Copied: pm-utils/repos/extra-i686/PKGBUILD (from rev 159433, pm-utils/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD (rev 0)
+++ extra-i686/PKGBUILD 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,47 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+# Contributor: Thayer Williams <thayer at archlinux.org>
+# Contributor: Giovanni Scafora <giovanni at archlinux.org>
+
+pkgname=pm-utils
+pkgver=1.4.1
+pkgrel=5
+pkgdesc="Utilities and scripts for suspend and hibernate power management"
+arch=('i686' 'x86_64')
+url="http://pm-utils.freedesktop.org"
+license=('GPL')
+depends=('bash' 'procps' 'pm-quirks')
+makedepends=('xmlto' 'docbook-xml' 'docbook-xsl')
+source=(http://pm-utils.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
+ 02-logging-append.patch
+ 12-fix-intel-audio-powersave-hook.patch
+ 13-49bluetooth-sync.patch
+ 14-disable-sata-alpm.patch)
+md5sums=('1742a556089c36c3a89eb1b957da5a60'
+ 'a45149617bf3eb8dc32e6d9e22ae715d'
+ 'edada31a7d722763513fbe705d95d19d'
+ '298f78b873c03c025700d5da619ac134'
+ 'd0040f7d30b6a0dd195b5401abbbbdb9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/02-logging-append.patch"
+ patch -Np1 -i "${srcdir}/12-fix-intel-audio-powersave-hook.patch"
+ patch -Np1 -i "${srcdir}/13-49bluetooth-sync.patch"
+ patch -Np1 -i "${srcdir}/14-disable-sata-alpm.patch"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # nm >=0.8.2 has native udev suspend/resume support
+ rm -f "${pkgdir}/usr/lib/pm-utils/sleep.d/55NetworkManager"
+
+ # Remove hooks that cause hardware failure or don't make sense at all
+ rm -f "${pkgdir}/usr/lib/pm-utils/power.d/"{harddrive,disable_wol}
+}
Deleted: extra-x86_64/02-logging-append.patch
===================================================================
--- extra-x86_64/02-logging-append.patch 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-x86_64/02-logging-append.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,19 +0,0 @@
-Author: James Westby <james.westby at ubuntu.com>
-Description: Do not clear the log file on each operation, but instead append to it.
- This makes debugging of several suspends much easier.
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25255
-Bug-Ubuntu: https://launchpad.net/bugs/410352
-
-Index: pm-utils/pm/pm-functions.in
-===================================================================
---- pm-utils.orig/pm/pm-functions.in 2010-07-05 18:41:21.118322244 +0200
-+++ pm-utils/pm/pm-functions.in 2010-07-05 18:41:24.126325221 +0200
-@@ -271,7 +271,7 @@
- return 1
- fi
- export LOGGING=true
-- exec > "$1" 2>&1
-+ exec >> "$1" 2>&1
- }
-
- check_suspend() { [ -n "$SUSPEND_MODULE" ]; }
Copied: pm-utils/repos/extra-x86_64/02-logging-append.patch (from rev 159433, pm-utils/trunk/02-logging-append.patch)
===================================================================
--- extra-x86_64/02-logging-append.patch (rev 0)
+++ extra-x86_64/02-logging-append.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,19 @@
+Author: James Westby <james.westby at ubuntu.com>
+Description: Do not clear the log file on each operation, but instead append to it.
+ This makes debugging of several suspends much easier.
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25255
+Bug-Ubuntu: https://launchpad.net/bugs/410352
+
+Index: pm-utils/pm/pm-functions.in
+===================================================================
+--- pm-utils.orig/pm/pm-functions.in 2010-07-05 18:41:21.118322244 +0200
++++ pm-utils/pm/pm-functions.in 2010-07-05 18:41:24.126325221 +0200
+@@ -271,7 +271,7 @@
+ return 1
+ fi
+ export LOGGING=true
+- exec > "$1" 2>&1
++ exec >> "$1" 2>&1
+ }
+
+ check_suspend() { [ -n "$SUSPEND_MODULE" ]; }
Deleted: extra-x86_64/11netcfg
===================================================================
--- extra-x86_64/11netcfg 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-x86_64/11netcfg 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-. /usr/lib/pm-utils/functions
-
-suspend_netcfg() {
- netcfg2 all-suspend
-}
-
-resume_netcfg() {
- netcfg2 all-resume
-}
-
-if [ -x /usr/bin/netcfg2 ]; then
- case "$1" in
- hibernate|suspend)
- suspend_netcfg
- ;;
- thaw|resume)
- resume_netcfg
- ;;
- *)
- ;;
- esac
-fi
-
-exit $?
Deleted: extra-x86_64/12-fix-intel-audio-powersave-hook.patch
===================================================================
--- extra-x86_64/12-fix-intel-audio-powersave-hook.patch 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-x86_64/12-fix-intel-audio-powersave-hook.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,40 +0,0 @@
-From: Florian Kriener <florian at kriener.org>
-To: submit at bugs.debian.org
-Subject: [pm-utils] wrong path in intel-audio-powersave (and a small bug)
-Date: Sat, 25 Sep 2010 11:27:30 +0200
-
-In the script intel-audio-powersave is this loop
-
-for dev in /sys/module/snd_*/parameters/power_save; do
- [ -w "$dev/parameters/power_save" ] || continue
- printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
- echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
-done
-
-I think it should be
-
-for dev in /sys/module/snd_*; do
- [ -w "$dev/parameters/power_save" ] || continue
- printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
- echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
-done
-
-
-This fixes the two bugs.
-
-diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave
-index 36675a8..da63e40 100644
---- a/pm/power.d/intel-audio-powersave
-+++ b/pm/power.d/intel-audio-powersave
-@@ -20,9 +20,9 @@ EOF
-
- audio_powersave() {
- [ "$INTEL_AUDIO_POWERSAVE" = "true" ] || exit $NA
-- for dev in /sys/module/snd_*/parameters/power_save; do
-+ for dev in /sys/module/snd_*; do
- [ -w "$dev/parameters/power_save" ] || continue
-- printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
-+ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
- echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
- done
- }
Copied: pm-utils/repos/extra-x86_64/12-fix-intel-audio-powersave-hook.patch (from rev 159433, pm-utils/trunk/12-fix-intel-audio-powersave-hook.patch)
===================================================================
--- extra-x86_64/12-fix-intel-audio-powersave-hook.patch (rev 0)
+++ extra-x86_64/12-fix-intel-audio-powersave-hook.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,40 @@
+From: Florian Kriener <florian at kriener.org>
+To: submit at bugs.debian.org
+Subject: [pm-utils] wrong path in intel-audio-powersave (and a small bug)
+Date: Sat, 25 Sep 2010 11:27:30 +0200
+
+In the script intel-audio-powersave is this loop
+
+for dev in /sys/module/snd_*/parameters/power_save; do
+ [ -w "$dev/parameters/power_save" ] || continue
+ printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
+ echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
+done
+
+I think it should be
+
+for dev in /sys/module/snd_*; do
+ [ -w "$dev/parameters/power_save" ] || continue
+ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
+ echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
+done
+
+
+This fixes the two bugs.
+
+diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave
+index 36675a8..da63e40 100644
+--- a/pm/power.d/intel-audio-powersave
++++ b/pm/power.d/intel-audio-powersave
+@@ -20,9 +20,9 @@ EOF
+
+ audio_powersave() {
+ [ "$INTEL_AUDIO_POWERSAVE" = "true" ] || exit $NA
+- for dev in /sys/module/snd_*/parameters/power_save; do
++ for dev in /sys/module/snd_*; do
+ [ -w "$dev/parameters/power_save" ] || continue
+- printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
++ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
+ echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
+ done
+ }
Deleted: extra-x86_64/13-49bluetooth-sync.patch
===================================================================
--- extra-x86_64/13-49bluetooth-sync.patch 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-x86_64/13-49bluetooth-sync.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,43 +0,0 @@
-From 640b53438c20818b3e344343b58b1f1765606a85 Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martin.pitt at ubuntu.com>
-Date: Mon, 31 Jan 2011 15:30:01 +0100
-Subject: [PATCH] 49bluetooth: Wait for btusb module to get unused
-
-The 49bluetooth hook disables /proc/acpi/ibm/bluetooth but this isn't
-synchronous, i. e. it doesn't wait until the module usage count actually drops
-to 0. Due to that, it's impossible to add btusb to SUSPEND_MODULES (on some
-models/older kernels you need to do that to fix suspend problems), as at that
-point the module is still in use.
-
-On my system (ThinkPad X201) the module takes between 0.3 and 0.5 seconds to
-unload, so use 100 ms wait steps with a timeout of 2 seconds.
-
-Bug: https://bugs.freedesktop.org//show_bug.cgi?id=33759
-Bug-Ubuntu: https://launchpad.net/bugs/698331
----
- pm/sleep.d/49bluetooth | 9 +++++++++
- 1 files changed, 9 insertions(+), 0 deletions(-)
-
-diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth
-index d46ba49..0dc1909 100755
---- a/pm/sleep.d/49bluetooth
-+++ b/pm/sleep.d/49bluetooth
-@@ -12,6 +12,15 @@ suspend_bluetooth()
- if grep -q enabled /proc/acpi/ibm/bluetooth; then
- savestate ibm_bluetooth enable
- echo disable > /proc/acpi/ibm/bluetooth
-+
-+ # wait for up to 2 seconds for the module to actually get
-+ # unused
-+ TIMEOUT=20
-+ while [ $TIMEOUT -ge 0 ]; do
-+ [ `cat /sys/module/btusb/refcnt` = 0 ] && break
-+ TIMEOUT=$((TIMEOUT-1))
-+ sleep 0.1
-+ done
- else
- savestate ibm_bluetooth disable
- fi
---
-1.7.2.3
-
Copied: pm-utils/repos/extra-x86_64/13-49bluetooth-sync.patch (from rev 159433, pm-utils/trunk/13-49bluetooth-sync.patch)
===================================================================
--- extra-x86_64/13-49bluetooth-sync.patch (rev 0)
+++ extra-x86_64/13-49bluetooth-sync.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,43 @@
+From 640b53438c20818b3e344343b58b1f1765606a85 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt at ubuntu.com>
+Date: Mon, 31 Jan 2011 15:30:01 +0100
+Subject: [PATCH] 49bluetooth: Wait for btusb module to get unused
+
+The 49bluetooth hook disables /proc/acpi/ibm/bluetooth but this isn't
+synchronous, i. e. it doesn't wait until the module usage count actually drops
+to 0. Due to that, it's impossible to add btusb to SUSPEND_MODULES (on some
+models/older kernels you need to do that to fix suspend problems), as at that
+point the module is still in use.
+
+On my system (ThinkPad X201) the module takes between 0.3 and 0.5 seconds to
+unload, so use 100 ms wait steps with a timeout of 2 seconds.
+
+Bug: https://bugs.freedesktop.org//show_bug.cgi?id=33759
+Bug-Ubuntu: https://launchpad.net/bugs/698331
+---
+ pm/sleep.d/49bluetooth | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth
+index d46ba49..0dc1909 100755
+--- a/pm/sleep.d/49bluetooth
++++ b/pm/sleep.d/49bluetooth
+@@ -12,6 +12,15 @@ suspend_bluetooth()
+ if grep -q enabled /proc/acpi/ibm/bluetooth; then
+ savestate ibm_bluetooth enable
+ echo disable > /proc/acpi/ibm/bluetooth
++
++ # wait for up to 2 seconds for the module to actually get
++ # unused
++ TIMEOUT=20
++ while [ $TIMEOUT -ge 0 ]; do
++ [ `cat /sys/module/btusb/refcnt` = 0 ] && break
++ TIMEOUT=$((TIMEOUT-1))
++ sleep 0.1
++ done
+ else
+ savestate ibm_bluetooth disable
+ fi
+--
+1.7.2.3
+
Deleted: extra-x86_64/14-disable-sata-alpm.patch
===================================================================
--- extra-x86_64/14-disable-sata-alpm.patch 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-x86_64/14-disable-sata-alpm.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,26 +0,0 @@
-Description: Disable SATA link power management by default, as it still causes disk errors and corruptions on many hardware.
-Author: Martin Pitt <martin.pitt at ubuntu.com>
-Bug-Ubuntu: https://launchpad.net/bugs/539467
-
-Index: pm-utils/pm/power.d/sata_alpm
-===================================================================
---- pm-utils.orig/pm/power.d/sata_alpm 2011-02-01 15:53:09.164867778 +0100
-+++ pm-utils/pm/power.d/sata_alpm 2011-02-01 15:53:28.954867786 +0100
-@@ -2,7 +2,7 @@
-
- . "${PM_FUNCTIONS}"
-
--SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-true}
-+SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-false}
-
- help() {
- cat <<EOF
-@@ -16,7 +16,7 @@
-
- This hook has 1 parameter:
- SATA_ALPM_ENABLE = whether to use SATA ALPM on battery.
--Defaults to "true".
-+Defaults to "false".
-
- EOF
- }
Copied: pm-utils/repos/extra-x86_64/14-disable-sata-alpm.patch (from rev 159433, pm-utils/trunk/14-disable-sata-alpm.patch)
===================================================================
--- extra-x86_64/14-disable-sata-alpm.patch (rev 0)
+++ extra-x86_64/14-disable-sata-alpm.patch 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,26 @@
+Description: Disable SATA link power management by default, as it still causes disk errors and corruptions on many hardware.
+Author: Martin Pitt <martin.pitt at ubuntu.com>
+Bug-Ubuntu: https://launchpad.net/bugs/539467
+
+Index: pm-utils/pm/power.d/sata_alpm
+===================================================================
+--- pm-utils.orig/pm/power.d/sata_alpm 2011-02-01 15:53:09.164867778 +0100
++++ pm-utils/pm/power.d/sata_alpm 2011-02-01 15:53:28.954867786 +0100
+@@ -2,7 +2,7 @@
+
+ . "${PM_FUNCTIONS}"
+
+-SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-true}
++SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-false}
+
+ help() {
+ cat <<EOF
+@@ -16,7 +16,7 @@
+
+ This hook has 1 parameter:
+ SATA_ALPM_ENABLE = whether to use SATA ALPM on battery.
+-Defaults to "true".
++Defaults to "false".
+
+ EOF
+ }
Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2012-05-24 09:47:30 UTC (rev 159433)
+++ extra-x86_64/PKGBUILD 2012-05-24 09:48:16 UTC (rev 159434)
@@ -1,52 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-# Contributor: Thayer Williams <thayer at archlinux.org>
-# Contributor: Giovanni Scafora <giovanni at archlinux.org>
-
-pkgname=pm-utils
-pkgver=1.4.1
-pkgrel=4
-pkgdesc="Utilities and scripts for suspend and hibernate power management"
-arch=('i686' 'x86_64')
-url="http://pm-utils.freedesktop.org"
-license=('GPL')
-depends=('bash' 'procps' 'pm-quirks')
-makedepends=('xmlto' 'docbook-xml' 'docbook-xsl')
-source=(http://pm-utils.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
- 02-logging-append.patch
- 12-fix-intel-audio-powersave-hook.patch
- 13-49bluetooth-sync.patch
- 14-disable-sata-alpm.patch
- 11netcfg)
-md5sums=('1742a556089c36c3a89eb1b957da5a60'
- 'a45149617bf3eb8dc32e6d9e22ae715d'
- 'edada31a7d722763513fbe705d95d19d'
- '298f78b873c03c025700d5da619ac134'
- 'd0040f7d30b6a0dd195b5401abbbbdb9'
- '9839687c8787d99fd4ff36aa3238c27b')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i "${srcdir}/02-logging-append.patch"
- patch -Np1 -i "${srcdir}/12-fix-intel-audio-powersave-hook.patch"
- patch -Np1 -i "${srcdir}/13-49bluetooth-sync.patch"
- patch -Np1 -i "${srcdir}/14-disable-sata-alpm.patch"
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-
- # install additional hooks
- install -m755 "${srcdir}/11netcfg" "${pkgdir}/usr/lib/pm-utils/sleep.d/"
-
- # nm >=0.8.2 has native udev suspend/resume support
- rm -f "${pkgdir}/usr/lib/pm-utils/sleep.d/55NetworkManager"
-
- # Remove hooks that cause hardware failure or don't make sense at all
- rm -f "${pkgdir}/usr/lib/pm-utils/power.d/"{harddrive,disable_wol}
-}
Copied: pm-utils/repos/extra-x86_64/PKGBUILD (from rev 159433, pm-utils/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD (rev 0)
+++ extra-x86_64/PKGBUILD 2012-05-24 09:48:16 UTC (rev 159434)
@@ -0,0 +1,47 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+# Contributor: Thayer Williams <thayer at archlinux.org>
+# Contributor: Giovanni Scafora <giovanni at archlinux.org>
+
+pkgname=pm-utils
+pkgver=1.4.1
+pkgrel=5
+pkgdesc="Utilities and scripts for suspend and hibernate power management"
+arch=('i686' 'x86_64')
+url="http://pm-utils.freedesktop.org"
+license=('GPL')
+depends=('bash' 'procps' 'pm-quirks')
+makedepends=('xmlto' 'docbook-xml' 'docbook-xsl')
+source=(http://pm-utils.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
+ 02-logging-append.patch
+ 12-fix-intel-audio-powersave-hook.patch
+ 13-49bluetooth-sync.patch
+ 14-disable-sata-alpm.patch)
+md5sums=('1742a556089c36c3a89eb1b957da5a60'
+ 'a45149617bf3eb8dc32e6d9e22ae715d'
+ 'edada31a7d722763513fbe705d95d19d'
+ '298f78b873c03c025700d5da619ac134'
+ 'd0040f7d30b6a0dd195b5401abbbbdb9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/02-logging-append.patch"
+ patch -Np1 -i "${srcdir}/12-fix-intel-audio-powersave-hook.patch"
+ patch -Np1 -i "${srcdir}/13-49bluetooth-sync.patch"
+ patch -Np1 -i "${srcdir}/14-disable-sata-alpm.patch"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # nm >=0.8.2 has native udev suspend/resume support
+ rm -f "${pkgdir}/usr/lib/pm-utils/sleep.d/55NetworkManager"
+
+ # Remove hooks that cause hardware failure or don't make sense at all
+ rm -f "${pkgdir}/usr/lib/pm-utils/power.d/"{harddrive,disable_wol}
+}
More information about the arch-commits
mailing list