--- pm-utils-1.2.2.4.orig/debian/changelog +++ pm-utils-1.2.2.4/debian/changelog @@ -0,0 +1,449 @@ +pm-utils (1.2.2.4-0ubuntu5) jaunty-proposed; urgency=low + + * debian/000record: add for the kernel to prevent hibernates if it has + been upgraded. Else we will fail during resume and data may be lost. + LP: #350491. + + -- Andy Whitcroft Fri, 08 May 2009 16:41:05 +0100 + +pm-utils (1.2.2.4-0ubuntu4) jaunty; urgency=low + + * debian/45iwlist: force a rescan of essids on all wireless networks on + resume, to work around the kernel's wrong idea of the age of networks + detected prior to suspend. LP: #336055. + + -- Steve Langasek Fri, 03 Apr 2009 10:10:54 -0700 + +pm-utils (1.2.2.4-0ubuntu3) jaunty; urgency=low + + * debian/patches/90-nm-proper-wakeup.patch,series: fix LP: #291062 - "MASTER + Network Manager sometimes has "enable networking" unchecked/disabled when + resuming from suspend"; problem was that NetworkManager did not get a dbus + signal on wake up; underlying issue is that dbus-send randomly fails if + you dont wait for confirmation of message delivery; using --print-reply + seems to do the trick. + + -- Alexander Sack Wed, 18 Mar 2009 21:27:11 +0100 + +pm-utils (1.2.2.4-0ubuntu2) jaunty; urgency=low + + * debian/95hdparm-apm: apply a default apm policy to all drives on + resume/thaw, based on AC state, for consistency with the settings + applied by acpi-support. LP: #59695. + + [ James Westby ] + * debian/rules: don't install sleep.d/90clock, the kernel now handles + setting the system clock on its own (and much more efficiently) + without needing to call hwclock. Cf. + . LP: #326183. + + -- Steve Langasek Mon, 09 Feb 2009 17:07:28 +0000 + +pm-utils (1.2.2.4-0ubuntu1) jaunty; urgency=low + + * New upstream release. + * Drop 99-ubuntu-acpi-support-vbestate.patch: acpi-support's power + management handling is going away, and pm-utils has been capable + of handling VBE quirks for a long time. + * 80-service.patch: Adapt to new upstream version. + * Tag our patches with descriptions and status. + + -- Martin Pitt Mon, 09 Feb 2009 17:12:50 +0100 + +pm-utils (1.2.2.1-0ubuntu3) jaunty; urgency=low + + * debian/rules: Make 000record script executable, thanks Matt + Zimmerman! (LP: #318267) + + -- Martin Pitt Mon, 19 Jan 2009 09:40:32 +0100 + +pm-utils (1.2.2.1-0ubuntu2) jaunty; urgency=low + + * Add suspend/hibernate in progress tracking to allow better error + reporting on failed suspend/hibernate cycles. apport will detect + the new status file and submit bugs when found. (LP: #316419) + + -- Andy Whitcroft Mon, 12 Jan 2009 16:29:41 +0000 + +pm-utils (1.2.2.1-0ubuntu1) jaunty; urgency=low + + * New upstream release. + * 25-pmu.patch: Rewritten for new upstream code structure. (Patch proposed + upstream, but rejected; they prefer the compiled pm-pmu program instead of + calling perl for doing the ioctl). + * Drop 10-uswsusp-fall-back-on-kernel.patch, upstream does the right thing + now. + + -- Martin Pitt Tue, 25 Nov 2008 18:19:45 +0100 + +pm-utils (1.1.2.4-1ubuntu8) intrepid-proposed; urgency=low + + * debian/patches/10-uswsusp-fall-back-on-kernel.patch: + + Patched pm/module.d/uswsusp to fall back on kernel if s2ram not present + (Closes LP: #287374) + * debian/patches/25-pmu.patch: + + Refreshed to patch cleanly + + -- Chow Loong Jin Fri, 24 Oct 2008 03:45:55 +0800 + +pm-utils (1.1.2.4-1ubuntu7) intrepid; urgency=low + + * Drop debian/patches/10-sleep-module-auto-detection.patch as we don't + want to use uswsusp unless the user explicitly chooses it. (LP: #267141) + * Add an example file /etc/pm/config.d/00sleep_module that shows the user + how to change the sleep module in use, for instance if they want to + enable uswsusp. + + -- James Westby Fri, 26 Sep 2008 12:28:19 +0100 + +pm-utils (1.1.2.4-1ubuntu6) intrepid; urgency=low + + * Drop the Recommends: on uswsusp; it is in fact not recommended at + all. + + -- Steve Langasek Fri, 10 Oct 2008 15:43:10 +0000 + +pm-utils (1.1.2.4-1ubuntu5) intrepid; urgency=low + + * Drop 30-swap-file.patch again. Reportedly, resuming from a swap file works + just fine. (LP: #224697) + + -- Martin Pitt Tue, 07 Oct 2008 19:44:20 +0200 + +pm-utils (1.1.2.4-1ubuntu4) intrepid; urgency=low + + * brown papaerbag upload ... to whoever wrote quilt: yes you are cleverar + than me, no need to prove it all the time ! + + -- Oliver Grawert Mon, 06 Oct 2008 20:01:53 +0200 + +pm-utils (1.1.2.4-1ubuntu3) intrepid; urgency=low + + * make the modprobe on resume respect module blacklists by using modprobe -b + instead of plain modprobe in the script (85-respect-blacklists.patch) + + -- Oliver Grawert Mon, 06 Oct 2008 19:19:41 +0200 + +pm-utils (1.1.2.4-1ubuntu2) intrepid; urgency=low + + * 10-sleep-module-auto-detection.patch: Do not check for s2ram, since + current uswsusp does not build it any more. Just check for s2disk. Thanks + to Thomas Dingermann for the suggestion! + + -- Martin Pitt Tue, 02 Sep 2008 12:48:07 +0200 + +pm-utils (1.1.2.4-1ubuntu1) intrepid; urgency=low + + * Merge from Debian unstable. Remaining Ubuntu changes: + - 30-swap-file.patch: Disable hibernation when swap resides on a file. + (LP #224697) + - 99-ubuntu-acpi-support-vbestate.patch: Change the path of the VBE state + dump to where acpi-support writes it to. (Ubuntu specific) + + -- Martin Pitt Wed, 06 Aug 2008 10:26:53 +0200 + +pm-utils (1.1.2.4-1) unstable; urgency=low + + * New upstream release + - Fix suspend/resume on 2.6.26 and greater Linux kernels using kernel mode + setting for Intel video drivers. (Closes: #488144) + * debian/control + - Update Recommends on uswsusp and vbetool to only list them on + architectures where they are actually available. (Closes: #452368) + + -- Michael Biebl Sun, 03 Aug 2008 11:47:19 +0200 + +pm-utils (1.1.2.3-1) unstable; urgency=low + + * New upstream release. + * debian/patches/01-escape-comparison.patch + - Removed, merged upstream. + + -- Michael Biebl Mon, 23 Jun 2008 17:00:50 +0200 + +pm-utils (1.1.2.2-3) unstable; urgency=low + + * Brown paper bag release. + * debian/patches/series + - Actually apply 01-escape-comparison.patch. (Closes: #485125) + * Bump Standards-Version to 3.8.0. + - Add debian/README.source as recommended by the new policy. + + -- Michael Biebl Sat, 14 Jun 2008 16:01:50 +0200 + +pm-utils (1.1.2.2-2ubuntu1) intrepid; urgency=low + + * Merge from Debian unstable (LP: #238303), remaining changes: + - 30-swap-file.patch: Disable hibernation when swap resides on a file + - 99-ubuntu-acpi-support-vbestate.patch: Change the path of the VBE state + dump to where acpi-support writes it to. (Ubuntu specific; unclear, if + still needed) + * Fix syntax errors in 99-ubuntu-acpi-support-vbestate.patch (LP: #238189) + * Drop 01-fix-vberestore.patch (applied upstream) + + -- Tormod Volden Sun, 08 Jun 2008 10:37:03 +0200 + +pm-utils (1.1.2.2-2) unstable; urgency=low + + * debian/patches/01-escape-comparison.patch + - Escape comparison of the kernel version. (Closes: #485125) + + -- Michael Biebl Sun, 08 Jun 2008 14:40:15 +0200 + +pm-utils (1.1.2.2-1) unstable; urgency=low + + * New upstream release. + * debian/control + - Remove docbook-utils from Build-Depends. All man pages are now generated + from DocBook XML. + * debian/rules + - The man pages are now included upstream, so remove all man page related + build rules. + * debian/pm-utils.manpages + - Removed, no longer required. + * debian/pm-powersave.xml, debian/pm-action.xml, debian/pm-is-supported.xml + - Removed, all merged upstream. + + -- Michael Biebl Thu, 29 May 2008 15:42:54 +0200 + +pm-utils (1.1.1-1) unstable; urgency=low + + * New upstream release. + * Removed patches + - debian/patches/15-hibernate_mode_check.patch (merged upstream) + - debian/patches/20-uswsusp-fixes.patch (merged upstream) + * Refreshed patches + - debian/patches/10-sleep-module-auto-detection.patch + - debian/patches/25-pmu.patch + - debian/patches/80-service.patch + * debian/copyright + - Update download location. + * debian/control + - Add Suggests on cpufrequtils. cpufrequtils allows to automatically load + the correct kernel module to enable cpufreq scaling and set the default + cpufreq governor. + + -- Michael Biebl Tue, 20 May 2008 22:12:23 +0200 + +pm-utils (1.1.0-1ubuntu2) intrepid; urgency=low + + * 30-swap-file.patch: Added to disable hibernation when swap resides on a + file. + + -- Evan Dandrea Wed, 28 May 2008 10:59:14 -0400 + +pm-utils (1.1.0-1ubuntu1) intrepid; urgency=low + + * Merge with Debian unstable. Most of our modifications are upstream/in + Debian now and could be dropped. + * Drop debian/patches/98-unload_network_modules.patch: Unloading all network + modules during suspend is a blunt hack and won't be accepted/supported by + upstream. The few modules which need it should be fixed in the kernel + (only known one is e1000 on some systems on 2.6.24). + * 99-fixup-ubuntu-behaviour.patch: Drop --quirk-reset-brightness backport + (upstream now) and shopt fix (not needed with this upstream version). + Split the remaining bits into: + - 01-fix-vberestore.patch: Fix VBE mode restoration; mode 3 special casing + by Matthew Garrett, copy&paste fix by Martin Pitt; forwarded upstream to + FD#15840. + - 99-ubuntu-acpi-support-vbestate.patch: Change the path of the VBE state + dump to where acpi-support writes it to. (Ubuntu specific; unclear, if + still needed) + + -- Martin Pitt Tue, 06 May 2008 08:22:30 +0200 + +pm-utils (1.1.0-1) unstable; urgency=low + + * New upstream release. + - Fixes the uswsusp module to pass the correct parameters to s2ram when + using the --quirk-s3-* parameters. (Closes: #448137) + - Correctly includes multiple config files from /etc/pm/config.d. + (Closes: #451493, #475565) + - Correctly restores the cpufreq governors on multi-core machines. + (Closes: #452620) + - Fixes filename expansion in current directory. (Closes: #454092) + - Updated and improved README. (Closes: #425282, #453866) + - The uswsusp module uses s2ram --force in do_suspend. (Closes: #457019) + This also means, that the internal whitelist of s2ram is no longer used. + The preferred way is to get the quirks from hal. + * debian/control + - Update the upstream URL and use the new Homepage field. (Closes: #473799) + - The Vcs-* fields are now officially supported, so remove the XS- prefix. + - Bump Standards-Version to 3.7.3. No further changes required. + - Fix a small typo in the long package description. (Closes: #466631) + - Add Build-Depends on quilt. + - Add Depends on kbd | console-tools. The kernel and tuxonice module + require the chvt utility. (Closes: #474637) + * debian/watch + - Updated. Parse the homepage at http://pm-utils.freedesktop.org/wiki/ for + the latest release. + * Removed patches + - debian/patches/10-uswsusp-support.patch (obsolete) + - debian/patches/15-laptop-tools.patch (obsolete) + - debian/patches/20-do-not-unload-button.patch (merged upstream) + - debian/patches/30-comment-defaults-file.patch (obsolete) + - debian/patches/40-performance-gov-on-hibernate.patch (fixed upstream) + - debian/patches/50-no-usleep.patch (merged upstream) + - debian/patches/60-suspend-hybrid.patch (obsolete) + - debian/patches/70-remove-pm-pmu.patch (obsolete) + - debian/patches/75-suspend-support.patch (obsolete) + - debian/patches/85-remove-empty-NEW.patch (obsolete) + - debian/patches/90-support-modules-with-dash.patch (obsolete) + - debian/patches/95-fix-config-file-parsing.patch (merged upstream) + * Updated patches + - debian/patches/80-service.patch + * debian/patches/10-sleep-module-auto-detection.patch + - Try to autodetect which sleep module to use. Check tuxonice first, then + uswsusp and fall back to kernel. + * debian/patches/15-hibernate_mode_check.patch + - Add a safety check before writing the hibernate method to + /sys/power/disk. (Closes: #450515) + * debian/patches/20-uswsusp-fixes.patch + - Disable the 99video hook for the uswsusp module. s2ram has it's own vt + switching functionality. + - Check if s2ram is available. + * debian/patches/25-pmu.patch + - As we don't ship the pm-pmu binary, implement the pmu suspend + functionality with a bit of perl magic. Thanks to Martin Pitt for the + idea and the code. (Closes: #450601, #452367, #452909) + - Prefer the /sys/power/state interface over poking /dev/pmu. This + requires a Linux kernel >= 2.6.25. + * debian/pm-action.xml + - Fix some typos in the pm-action manpage. (Closes: #450414) + - Document new configuration variables. + - Improve explanation of the quirk options. (Closes: #475755) + * debian/copyright + - Update list of authors. + * debian/rules + - The 60sysfont hook is no longer shipped upstream, so we don't have to + remove it anymore. + - Switch patch system to quilt. + + -- Michael Biebl Thu, 24 Apr 2008 06:31:51 +0200 + +pm-utils (0.99.2-3ubuntu9) hardy; urgency=low + + * debian/patches/70-remove-pm-pmu.patch: Check for /dev/pmu before calling + /usr/lib/hal/hal-system-power-pmu. Not doing so causes error messages and + g-p-m error beeps on non-powerpc systems. (LP: #210832) + * debian/patches/98-unload_network_modules.patch: Restart network after + resuming, since this unloads/reloads network modules during suspend. This + unbreaks static network configuration after suspend, and mimics + acpi-support's behaviour of previous releases. (LP: #162654) + + -- Martin Pitt Fri, 11 Apr 2008 08:21:13 -0500 + +pm-utils (0.99.2-3ubuntu8) hardy; urgency=low + + * Fix "!grep" to be "! grep" in last patch. + + -- Ben Collins Thu, 03 Apr 2008 09:02:51 -0400 + +pm-utils (0.99.2-3ubuntu7) hardy; urgency=low + + * Do not "chvt 1" on resume when using fglrx. Work around for corrupted + terminal, suggested and tested by AMD/AGP. + + -- Ben Collins Wed, 02 Apr 2008 11:54:18 -0400 + +pm-utils (0.99.2-3ubuntu6) hardy; urgency=low + + * Add debian/patches/97_fix_ppc_suspend_test.patch: Fix suspend test on + PowerPC, thanks to Matthew Garrett (see patch header for details). + * debian/patches/70-remove-pm-pmu.patch: Change the patch to not entirely + drop pm-pmu, but use hal-system-power-pmu instead. This brings back + suspend to PowerPC. (LP: #189851) + * Add debian/patches/98-unload_network_modules.patch: Unload/reload network + modules during suspend. Thanks to Matthew Garrett! (LP: #162654) + + -- Martin Pitt Thu, 27 Mar 2008 16:26:43 +0100 + +pm-utils (0.99.2-3ubuntu5) hardy; urgency=low + + * Fix typo in 95-fix-config-file-parsing.patch which made loading + configs from /etc/pm/config.d/* break. LP: #190679 + * Add 35-skip-linked-cpus-cpufreq.patch which skips all CPUs whose speed + is shared with other CPUs (or cores) when saving state. LP: #162652. + + -- Tollef Fog Heen Wed, 26 Mar 2008 09:00:25 +0100 + +pm-utils (0.99.2-3ubuntu4) hardy; urgency=low + + * debian/patches/25-functions-modunload-regex.patch: + - in modunload(): Fix literally quoted regular expression to + make SUSPEND_MODULES work (LP: #188261) + + -- John Dong Fri, 01 Feb 2008 23:49:53 -0500 + +pm-utils (0.99.2-3ubuntu3) hardy; urgency=low + + * Drop 96-video-quirk-ignoring.patch again. It is incomplete (since we need + to do the same on the suspend side) and does not really fit here (if + pm-utils gets quirks passed on the command line, they should actually be + used). We'll solve this in the hal suspend script instead. (LP: #198808) + + -- Martin Pitt Mon, 24 Mar 2008 16:32:06 +0100 + +pm-utils (0.99.2-3ubuntu2) hardy; urgency=low + + * Add debian/patches/96-video-quirk-ignoring.patch: Ignore resume video + quirks when using the proprietary nvidia or fglrx drivers, or Intel >= + 915G, since they are not needed on them and actively break resuming. Since + this cannot be expressed as FDI rules with current hal, this hack needs to + suffice for Hardy. See patch tags for links to further information. + (LP: #198808) + * Modify Maintainer value to match the DebianMaintainerField + specification. + + -- Martin Pitt Fri, 21 Mar 2008 13:09:45 +0100 + +pm-utils (0.99.2-3ubuntu1) hardy; urgency=low + + * debian/patches/99-fixup-ubuntu-behaviour.patch + - fix globbing to avoid hooks being run twice + - explicitly reset text mode if it was in use before + - Ubuntu keeps the vbestate file in a separate location and stores + it on boot + - backport the brightness resetting quirk from 0.99.4 + + -- Matthew Garrett Tue, 15 Jan 2008 22:52:23 +0000 + +pm-utils (0.99.2-3) unstable; urgency=low + + * Support modules/services with dashes (closes: #433179) + * Fix config file parser (closes: #427254) + + -- Tim Dijkstra Mon, 16 Jul 2007 22:31:53 +0200 + +pm-utils (0.99.2-2) unstable; urgency=low + + * Make --hibernate test in pm-is-supported less strict so we + can support suspend2 too (closes: #422745) + * pm-action: Fix pm-suspend-hybrid support (closes: 427253) + * Add some more words to the pm-action manpage (closes: #425282) + * Don't install useless NEWS file (closes: #431551) + * Add support for NO_QUIRKS from HAL. Now we can distinguish + between `no quirks' and 'unknown' (closes: #427052) + + -- Tim Dijkstra Sat, 14 Jul 2007 22:41:06 +0200 + +pm-utils (0.99.2-1) unstable; urgency=low + + [ Michael Biebl ] + * Initial release (Closes: #389817). + * Do not install on_ac_power binary. Instead depend on powermgmt-base + package. + + [ Tim Dijkstra ] + * Support for `s2ram' for hal >= 0.5.9 + * First stab at suspend-hybrid support + * Do not install pm-pmu, it is hack for old kernels (older than the one + in etch) which is also present in the s2ram binary if needed. + * Do not install pm-reset-swap, it has bugs and is superflous since + swapon in debian has similar functionality. + * Recommend vbetool and radeontool (not depend on it) else pm-utils + won't be installable on anything but x86_* + * Add manpages. + + -- Tim Dijkstra Wed, 25 Apr 2007 22:48:19 +0200 + --- pm-utils-1.2.2.4.orig/debian/control +++ pm-utils-1.2.2.4/debian/control @@ -0,0 +1,20 @@ +Source: pm-utils +Section: admin +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Tim Dijkstra +Uploaders: Michael Biebl +Build-Depends: cdbs, debhelper (>= 5), xmlto, quilt +Standards-Version: 3.8.0 +Vcs-Svn: svn://svn.debian.org/svn/collab-maint/ext-maint/pm-utils/trunk +Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/ext-maint/pm-utils/trunk +Homepage: http://pm-utils.freedesktop.org/ + +Package: pm-utils +Architecture: all +Depends: ${misc:Depends}, powermgmt-base, kbd | console-tools, hdparm +Recommends: hal (>= 0.5.9), vbetool [amd64 i386], radeontool +Suggests: cpufrequtils +Description: utilities and scripts for power management + This package provides simple shell command line tools to suspend and + hibernate your computer. --- pm-utils-1.2.2.4.orig/debian/compat +++ pm-utils-1.2.2.4/debian/compat @@ -0,0 +1 @@ +5 --- pm-utils-1.2.2.4.orig/debian/watch +++ pm-utils-1.2.2.4/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://pm-utils.freedesktop.org/wiki/ .*pm-utils-(.*)\.tar\.gz --- pm-utils-1.2.2.4.orig/debian/00sleep_module +++ pm-utils-1.2.2.4/debian/00sleep_module @@ -0,0 +1,9 @@ +# The sleep/wake system to use. Valid values are: +# kernel The built-in kernel suspend/resume support. +# Use this if nothing else is supported on your system. +# uswsusp If your system has support for the userspace +# suspend programs (s2ram/s2disk/s2both), then use this. +# tuxonice If your system has support for tuxonice, use this. +# +# The system defaults to "kernel" if this is commented out. +# SLEEP_MODULE="kernel" --- pm-utils-1.2.2.4.orig/debian/000record +++ pm-utils-1.2.2.4/debian/000record @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Record that we have a suspend/hibernate in progress. +# +. "${PM_FUNCTIONS}" + +LOGFILE="/var/lib/pm-utils/status" + +# Check for and abort a hibernate if the kernel indicates it has been +# updated, as we will be completly unable to resume. LP: #350491. +case "$1" in + hibernate) + if [ -f '/var/run/do-not-hibernate' ]; then + echo "kernel update inhibits hibernate (/var/run/do-not-hibernate present)" + exit 1 + fi + ;; +esac + +# Record the current operation to allow failure detection. +case "$1" in + hibernate|suspend) + echo "$1" >"$LOGFILE" + ;; + thaw|resume) + rm -f "$LOGFILE" + ;; +esac --- pm-utils-1.2.2.4.orig/debian/README.source +++ pm-utils-1.2.2.4/debian/README.source @@ -0,0 +1,3 @@ +This package uses the quilt patch management system. + +Please refer to /usr/share/doc/quilt/README.source for further information. --- pm-utils-1.2.2.4.orig/debian/45iwlist +++ pm-utils-1.2.2.4/debian/45iwlist @@ -0,0 +1,25 @@ +#!/bin/sh +# Kludge to force a rescan of available wireless networks on resume, so that +# stale ESSIDs aren't shown as current. +# To be removed when bug #336055 is resolved in the kernel. + +. "${PM_FUNCTIONS}" + +which iwlist || exit $NA + +rescan_wireless() +{ + for iface in /sys/class/net/*; do + [ -d "$iface/wireless" ] || continue + iface="${iface##*/}" + iwlist "$iface" scanning + done +} + +case "$1" in + thaw|resume) + rescan_wireless + ;; + *) exit $NA + ;; +esac --- pm-utils-1.2.2.4.orig/debian/copyright +++ pm-utils-1.2.2.4/debian/copyright @@ -0,0 +1,38 @@ +This package was debianized by Michael Biebl on +Sat, 3 Mar 2007 04:12:26 +0100. + +It was downloaded from http://pm-utils.freedesktop.org/ + +Upstream Author: + Bill Nottingham + Peter Jones + David Zeuthen + Richard Hughes + Victor Lowther + +Copyright: + Copyright 2006 Red Hat, Inc. + Copyright 2007 Peter Jones + Copyright 2006-2007 Richard Hughes + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2007, Michael Biebl and +is licensed under the GPL, see above. + --- pm-utils-1.2.2.4.orig/debian/rules +++ pm-utils-1.2.2.4/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +configure/pm-utils:: + # Hack to not build some stuff + touch src/pm-pmu.o src/pm-reset-swap.o + touch src/pm-pmu src/pm-reset-swap + +binary-install/pm-utils:: + # We depend on powermgmt-base to provide on_ac_power. + # This way we don't have to conflict with this package. + rm -f debian/pm-utils/usr/bin/on_ac_power + rm -f debian/pm-utils/usr/share/man/man1/on_ac_power.1 + # Remove tools/hooks that are not suitable for Debian. + rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/55battery + rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/65alsa + rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/01grub + rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/90clock + rm -f debian/pm-utils/usr/lib/pm-utils/bin/pm-reset-swap + rm -f debian/pm-utils/usr/lib/pm-utils/bin/pm-pmu + rm -f debian/pm-utils/usr/share/man/man8/pm-pmu.8 + + # Install tools/hooks which are ubuntu specific + install -m 755 debian/000record debian/pm-utils/usr/lib/pm-utils/sleep.d/ + cp debian/00sleep_module debian/pm-utils/etc/pm/config.d/ + + install -m 755 debian/95hdparm-apm debian/pm-utils/usr/lib/pm-utils/sleep.d/ + install -m 755 debian/45iwlist debian/pm-utils/usr/lib/pm-utils/sleep.d/ + + chmod -x debian/pm-utils/usr/lib/pm-utils/defaults + + # Ensure our log directory exists. + mkdir -p debian/pm-utils/var/lib/pm-utils --- pm-utils-1.2.2.4.orig/debian/95hdparm-apm +++ pm-utils-1.2.2.4/debian/95hdparm-apm @@ -0,0 +1,50 @@ +#! /bin/sh +# +# This script adjusts hard drive APM settings using hdparm. The hardware +# defaults (usually hdparm -B 128) cause excessive head load/unload cycles +# on many modern hard drives. We therefore set hdparm -B 254 while on AC +# power. On battery we set hdparm -B 128, because the head parking is +# very useful for shock protection. +# +# Refactored from acpi-support's 90-hdparm.sh for pm-utils + +resume_hdparm_apm() +{ + if [ -e /usr/sbin/laptop_mode ] ; then + LMT_CONTROL_HD_POWERMGMT=$(. /etc/laptop-mode/laptop-mode.conf && echo "$CONTROL_HD_POWERMGMT") + if [ "$LMT_CONTROL_HD_POWERMGMT" != 0 ] \ + && [ -e /var/run/laptop-mode-tools/enabled ] + then + # Laptop mode controls hdparm -B settings, we don't. + return + fi + fi + + # Determine the APM policy based on the AC state + level=254 + + if [ "$(get_power_status)" = battery ] + then + level=128 + fi + + for dev in /dev/sd? /dev/hd? ; do + if [ -b $dev ] ; then + # Check for APM support; discard errors since not all + # drives support HDIO_GET_IDENTITY (-i). + if hdparm -i $dev 2> /dev/null | grep -q 'AdvancedPM=yes' + then + hdparm -B $level $dev + fi + fi + done +} + +case "$1" in + thaw|resume) + resume_hdparm_apm + ;; + *) + exit 254 + ;; +esac --- pm-utils-1.2.2.4.orig/debian/patches/series +++ pm-utils-1.2.2.4/debian/patches/series @@ -0,0 +1,4 @@ +25-pmu.patch +80-service.patch +85-respect-blacklists.patch +90-nm-proper-wakeup.patch --- pm-utils-1.2.2.4.orig/debian/patches/25-pmu.patch +++ pm-utils-1.2.2.4/debian/patches/25-pmu.patch @@ -0,0 +1,60 @@ +# Description: Replace the usage of the compiled pm-pmu program with a call to perl, so that pm-utils can stay Architecture: all +# Ubuntu-Specific: Proposed upstream, but rejected +Index: pm-utils-1.2.2.1/pm/pm-functions.in +=================================================================== +--- pm-utils-1.2.2.1.orig/pm/pm-functions.in 2008-11-25 18:12:46.000000000 +0100 ++++ pm-utils-1.2.2.1/pm/pm-functions.in 2008-11-25 18:14:25.000000000 +0100 +@@ -240,6 +240,28 @@ + check_hibernate() { [ -n "$HIBERNATE_MODULE" ]; } + check_suspend_hybrid() { [ -n "$SUSPEND_HYBRID_MODULE" ]; } + ++ ++check_suspend_pmu() ++{ ++ perl << EOF ++sub PMU_IOC_CAN_SLEEP { 0x40044205; } ++open PMU, '/dev/pmu' or die "open /dev/pmu: \$!"; ++\$p = pack 'l', 0; ++ioctl PMU, &PMU_IOC_CAN_SLEEP, \$p or die "ioctl: \$!"; ++(\$v) = unpack 'l', \$p; ++exit (\$v ? 0 : 1); ++EOF ++} ++ ++do_suspend_pmu() ++{ ++ perl << EOF ++sub PMU_IOC_SLEEP { 0x20004200; } ++open PMU, "/dev/pmu" or die "open /dev/pmu: \$!"; ++ioctl PMU, &PMU_IOC_SLEEP, 0; ++EOF ++} ++ + # allow autodetection of sleep methods + if [ "$SLEEP_MODULE" = "auto" ]; then + SLEEP_MODULE="tuxonice uswsusp" +@@ -257,9 +279,9 @@ + if grep -q mem /sys/power/state; then + SUSPEND_MODULE="kernel" + do_suspend() { echo -n "mem" >/sys/power/state; } +- elif [ -c /dev/pmu ] && pm-pmu --check; then ++ elif [ -c /dev/pmu ] && check_suspend_pmu; then + SUSPEND_MODULE="kernel" +- do_suspend() { pm-pmu --suspend; } ++ do_suspend() { do_suspend_pmu; } + fi + fi + +Index: pm-utils-1.2.2.1/pm/module.d/uswsusp +=================================================================== +--- pm-utils-1.2.2.1.orig/pm/module.d/uswsusp 2008-11-25 18:14:36.000000000 +0100 ++++ pm-utils-1.2.2.1/pm/module.d/uswsusp 2008-11-25 18:15:53.000000000 +0100 +@@ -54,7 +54,7 @@ + + if [ -z "$SUSPEND_MODULE" ] && command_exists s2ram && \ + ( grep -q mem /sys/power/state || \ +- ( [ -c /dev/pmu ] && pm-pmu --check; ); ); then ++ ( [ -c /dev/pmu ] && check_suspend_pmu; ); ); then + SUSPEND_MODULE="uswsusp" + do_suspend() + { --- pm-utils-1.2.2.4.orig/debian/patches/85-respect-blacklists.patch +++ pm-utils-1.2.2.4/debian/patches/85-respect-blacklists.patch @@ -0,0 +1,15 @@ +# Description: make the modprobe on resume respect module blacklists by using modprobe -b instead of plain modprobe in the script +# Upstream: TODO +Index: pm-utils-1.1.2.4/pm/functions.in +=================================================================== +--- pm-utils-1.1.2.4.orig/pm/functions.in 2008-10-06 19:18:14.000000000 +0200 ++++ pm-utils-1.1.2.4/pm/functions.in 2008-10-06 19:18:41.000000000 +0200 +@@ -118,7 +118,7 @@ + { + for x in "${STORAGEDIR}"/module:* ; do + [ -O "${x}" ] || continue +- modprobe "${x##*:}" >/dev/null 2>&1 || \ ++ modprobe -b "${x##*:}" >/dev/null 2>&1 || \ + log "Could not reload module ${x##*:}." + + done --- pm-utils-1.2.2.4.orig/debian/patches/80-service.patch +++ pm-utils-1.2.2.4/debian/patches/80-service.patch @@ -0,0 +1,25 @@ +# Description: Use the Debian way of starting init scripts +Index: pm-utils-1.2.2.4/pm/functions.in +=================================================================== +--- pm-utils-1.2.2.4.orig/pm/functions.in 2009-02-09 00:30:25.000000000 +0100 ++++ pm-utils-1.2.2.4/pm/functions.in 2009-02-09 17:12:18.000000000 +0100 +@@ -141,16 +141,16 @@ + + stopservice() + { +- if service "$1" status 2>/dev/null | grep -q -e running -e started ++ if [ -x "/etc/init.d/$1" ] + then + touch "${STORAGEDIR}/service:$1" +- service "$1" stop ++ invoke-rc.d "$1" stop + fi + } + + restartservice() + { +- [ -O "${STORAGEDIR}/service:$1" ] && service "$1" start ++ [ -O "${STORAGEDIR}/service:$1" ] && invoke-rc.d "$1" start + } + + # Disable a hook. --- pm-utils-1.2.2.4.orig/debian/patches/90-nm-proper-wakeup.patch +++ pm-utils-1.2.2.4/debian/patches/90-nm-proper-wakeup.patch @@ -0,0 +1,42 @@ +--- + pm/sleep.d/55NetworkManager | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: pm-utils-1.2.2.4/pm/sleep.d/55NetworkManager +=================================================================== +--- pm-utils-1.2.2.4.orig/pm/sleep.d/55NetworkManager ++++ pm-utils-1.2.2.4/pm/sleep.d/55NetworkManager +@@ -6,29 +6,29 @@ + # not break established connections. Apple can do this, and it is + # rather nifty. + + . "${PM_FUNCTIONS}" + + suspend_nm() + { + # Tell NetworkManager to shut down networking +- dbus_send --system \ ++ dbus_send --print-reply --system \ + --dest=org.freedesktop.NetworkManager \ + /org/freedesktop/NetworkManager \ +- org.freedesktop.NetworkManager.sleep ++ org.freedesktop.NetworkManager.sleep 2>&1 > /dev/null + } + + resume_nm() + { + # Wake up NetworkManager and make it do a new connection +- dbus_send --system \ ++ dbus_send --print-reply --system \ + --dest=org.freedesktop.NetworkManager \ + /org/freedesktop/NetworkManager \ +- org.freedesktop.NetworkManager.wake ++ org.freedesktop.NetworkManager.wake 2>&1 > /dev/null + } + + case "$1" in + hibernate|suspend) + suspend_nm + ;; + thaw|resume) + resume_nm