Hello community,
here is the log from the commit of package pm-utils
checked in at Thu Sep 25 01:03:14 CEST 2008.
--------
--- pm-utils/pm-utils.changes 2008-09-12 14:52:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/pm-utils/pm-utils.changes 2008-09-24 21:12:05.000000000 +0200
@@ -1,0 +2,13 @@
+Wed Sep 24 21:03:04 CEST 2008 - seife@suse.de
+
+- update the tarball to the latest 0.99.4 upstream CVS which
+ includes:
+ - manpage fixes
+ - fix for config file reading (patch dropped)
+ - removal of dangerous laptop-tools hook
+ - fixes for hooks running twice in some circumstances
+- add support for hybrid suspend (write image to disk, then s2ram,
+ FATE#6368)
+- workaround broken dbus-send (bnc#427829)
+
+-------------------------------------------------------------------
Old:
----
pm-utils-0.99.3.20070618.tar.bz2
pm-utils-0.99.3-fix-config-loading.diff
pm-utils-0.99.3-uswsusp-support.diff
pm-utils-suse-20080912.tar.bz2
New:
----
pm-utils-0.99.4.20071229.tar.bz2
pm-utils-0.99.4-fix-broken-dbus-send.diff
pm-utils-0.99.4-on_ac_power-no-dbus-fallback.diff
pm-utils-0.99.4-uswsusp-support.diff
pm-utils-suse-20080924.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pm-utils.spec ++++++
--- /var/tmp/diff_new_pack.j20840/_old 2008-09-25 01:02:45.000000000 +0200
+++ /var/tmp/diff_new_pack.j20840/_new 2008-09-25 01:02:45.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package pm-utils (Version 0.99.3.20070618)
+# spec file for package pm-utils (Version 0.99.4.20071229)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,18 +20,19 @@
Name: pm-utils
Url: http://webcvs.freedesktop.org/pm-utils/
-Version: 0.99.3.20070618
-Release: 86
-%define pm_utils_suse_version 20080912
+Version: 0.99.4.20071229
+Release: 1
+%define pm_utils_suse_version 20080924
Summary: Tools to suspend and hibernate computers
License: GPL v2 or later
Group: System/Base
Source: %{name}-%{version}.tar.bz2
-Patch1: pm-utils-0.99.3-fix-config-loading.diff
-Patch2: pm-utils-0.99.3-uswsusp-support.diff
+Patch1: pm-utils-0.99.4-on_ac_power-no-dbus-fallback.diff
+Patch2: pm-utils-0.99.4-uswsusp-support.diff
Patch3: pm-utils-0.99.3-comment-configfile.diff
Patch4: pm-utils-0.99.3-README-fix.diff
Patch5: pm-utils-0.99.3-add-pm-hooks.diff
+Patch6: pm-utils-0.99.4-fix-broken-dbus-send.diff
Patch99: pm-utils-0.99.3-suse.diff
Source1: pm-utils-suse-%{pm_utils_suse_version}.tar.bz2
Source2: README.upstream-hooks
@@ -57,11 +58,12 @@
%prep
%setup -b 1
-%patch1 -p0
-%patch2 -p0
+%patch1 -p1
+%patch2 -p1
%patch3 -p0
%patch4 -p0
%patch5 -p0
+%patch6 -p1
%patch99 -p0
%build
@@ -75,7 +77,6 @@
for i in 01grub 20video 49bluetooth 60sysfont 65alsa 90clock 99video; do
mv $RPM_BUILD_ROOT/usr/lib/pm-utils/sleep.d/$i examples/hooks
done
-mv $RPM_BUILD_ROOT/usr/lib/pm-utils/power.d/laptop-tools examples/hooks
cp %{S:2} hooks
cp %{S:3} $RPM_BUILD_ROOT/etc/pm/
cp %{S:4} $RPM_BUILD_ROOT/etc/pm/config.d/
@@ -105,6 +106,16 @@
%ghost %verify(not md5 size mtime) /var/log/pm-suspend.log
%changelog
+* Wed Sep 24 2008 seife@suse.de
+- update the tarball to the latest 0.99.4 upstream CVS which
+ includes:
+ - manpage fixes
+ - fix for config file reading (patch dropped)
+ - removal of dangerous laptop-tools hook
+ - fixes for hooks running twice in some circumstances
+- add support for hybrid suspend (write image to disk, then s2ram,
+ FATE#6368)
+- workaround broken dbus-send (bnc#427829)
* Fri Sep 12 2008 seife@suse.de
- Add a config file and hook for calling out to rtcwake, letting
the user wake the computer up after N seconds of sleep or
++++++ pm-utils-0.99.3.20070618.tar.bz2 -> pm-utils-0.99.4.20071229.tar.bz2 ++++++
++++ 4956 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/ChangeLog new/pm-utils-0.99.4.20071229/ChangeLog
--- old/pm-utils-0.99.3.20070618/ChangeLog 2007-07-24 20:18:05.000000000 +0200
+++ new/pm-utils-0.99.4.20071229/ChangeLog 2008-09-24 19:34:39.000000000 +0200
@@ -1,3 +1,68 @@
+2007-12-29 Richard Hughes
+
+ * pm/functions:
+ * src/pm-powersave:
+ Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=302401
+ (Issue 2 in the bug report)
+
+ Without the uniq files in the sleep.d or power.d directory may run twice.
+ Also this patch removes a uneccessary "-e" test in the if statements, the
+ "-x" test already includes a "-e" test.
+
+ Also this patch adds a modeline for vim no to expand tabs, because tabs are
+ used in the files for indentation.
+ From Till Maas , many thanks.
+
+2007-12-29 Richard Hughes
+
+ * pm/functions:
+ * src/pm-powersave:
+ Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=302401
+ (Issue 1 in the bug report)
+ This patch makes sure that the nullglob option is set. This makes
+ sure that the result of a filename expansion is empty, when the
+ pattern does not match.
+ From Till Maas , many thanks.
+
+2007-12-29 Richard Hughes
+
+ * src/pm-action:
+ This patch makes pm-action show the filename in help, that was used
+ to invoke it, e.g. pm-suspend
+ From Till Maas , many thanks.
+
+2007-12-23 Richard Hughes
+
+ * man/pm-pmu.1:
+ * man/pm-pmu.sgml:
+ Fix a typo in the pm-pmu manpage.
+ RedHat Bugzilla report: https://bugzilla.redhat.com/show_bug.cgi?id=286201
+
+2007-12-23 Richard Hughes
+
+ * pm/functions:
+ There is no need to remove the logfile, because the ">" after exec in
+ the next line already truncates the logfile to zero length.
+ Also removing is wrong, because it destroys the selinux context of the
+ logfile. Bugzilla Reports:
+ https://bugzilla.redhat.com/show_bug.cgi?id=237840
+ https://bugzilla.redhat.com/show_bug.cgi?id=238068
+
+2007-12-23 Richard Hughes
+
+ * pm/functions:
+ - Check for the individual config file, not the list.
+
+2007-09-10 Peter Jones
+
+ * configure.in:
+ - bump minor rev
+
+2007-08-13 Peter Jones
+
+ * pm/power.d/laptop-tools:
+ - remove this entirely, it doesn't make any sense.
+
2007-06-18 Peter Jones
* pm/hooks/99video src/pm-action:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/configure.in new/pm-utils-0.99.4.20071229/configure.in
--- old/pm-utils-0.99.3.20070618/configure.in 2007-07-24 20:18:55.000000000 +0200
+++ new/pm-utils-0.99.4.20071229/configure.in 2008-09-24 19:42:43.000000000 +0200
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(pm-utils, 0.99.3.20070618)
+AC_INIT(pm-utils, 0.99.4.20071229)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/INSTALL new/pm-utils-0.99.4.20071229/INSTALL
--- old/pm-utils-0.99.3.20070618/INSTALL 2007-03-14 19:16:21.000000000 +0100
+++ new/pm-utils-0.99.4.20071229/INSTALL 2008-09-24 19:36:26.000000000 +0200
@@ -1,8 +1,8 @@
Installation Instructions
*************************
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
@@ -10,7 +10,10 @@
Basic Installation
==================
-These are generic installation instructions.
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -23,9 +26,9 @@
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. (Caching is
+the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
+ `./configure' to configure the package for your system.
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
2. Type `make' to compile the package.
@@ -67,6 +67,9 @@
all sorts of other programs in order to regenerate files that came
with the distribution.
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
Compilers and Options
=====================
@@ -78,7 +81,7 @@
by setting variables in the command line or in the environment. Here
is an example:
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
@@ -87,17 +90,15 @@
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
+own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
- If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory. After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
Installation Names
==================
@@ -190,12 +191,12 @@
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script). Here is a another example:
+overridden in the site shell script).
- /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/intltool-extract.in new/pm-utils-0.99.4.20071229/intltool-extract.in
--- old/pm-utils-0.99.3.20070618/intltool-extract.in 2006-10-10 19:37:12.000000000 +0200
+++ new/pm-utils-0.99.4.20071229/intltool-extract.in 2006-10-05 16:01:10.000000000 +0200
@@ -32,7 +32,7 @@
## Release information
my $PROGRAM = "intltool-extract";
my $PACKAGE = "intltool";
-my $VERSION = "0.34.1";
+my $VERSION = "0.35.0";
## Loaded modules
use strict;
@@ -485,10 +485,12 @@
sub intltool_tree_comment
{
my $expat = shift;
- my $data = shift;
+ my $data = $expat->original_string();
my $clist = $expat->{Curlist};
my $pos = $#$clist;
+ $data =~ s/^<!--//s;
+ $data =~ s/-->$//s;
push @$clist, 1 => $data;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/intltool-merge.in new/pm-utils-0.99.4.20071229/intltool-merge.in
--- old/pm-utils-0.99.3.20070618/intltool-merge.in 2006-10-10 19:37:12.000000000 +0200
+++ new/pm-utils-0.99.4.20071229/intltool-merge.in 2006-10-05 16:01:11.000000000 +0200
@@ -35,7 +35,7 @@
## Release information
my $PROGRAM = "intltool-merge";
my $PACKAGE = "intltool";
-my $VERSION = "0.34.1";
+my $VERSION = "0.35.0";
## Loaded modules
use strict;
@@ -91,7 +91,7 @@
my %po_files_by_lang = ();
my %translations = ();
-my $iconv = $ENV{"ICONV"} || $ENV{"INTLTOOL_ICONV"} || "/usr/bin/iconv";
+my $iconv = $ENV{"ICONV"} || $ENV{"INTLTOOL_ICONV"} || "@INTLTOOL_ICONV@";
my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
# Use this instead of \w for XML files to handle more possible characters.
@@ -257,7 +257,7 @@
sub get_local_charset
{
my ($encoding) = @_;
- my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "/usr/lib/charset.alias";
+ my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias";
# seek character encoding aliases in charset.alias (glib)
@@ -395,7 +395,7 @@
}
else
{
- print STDERR "WARNING: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
+ print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/intltool-update.in new/pm-utils-0.99.4.20071229/intltool-update.in
--- old/pm-utils-0.99.3.20070618/intltool-update.in 2006-10-10 19:37:12.000000000 +0200
+++ new/pm-utils-0.99.4.20071229/intltool-update.in 2006-10-05 16:01:11.000000000 +0200
@@ -30,7 +30,7 @@
## Release information
my $PROGRAM = "intltool-update";
-my $VERSION = "0.34.1";
+my $VERSION = "0.35.0";
my $PACKAGE = "intltool";
## Loaded modules
@@ -80,7 +80,8 @@
"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
"soundlist(?:\\.in)+|". # GNOME specific
"keys(?:\\.in)+|". # GNOME Mime database specific
-"theme(?:\\.in)+"; # http://www.freedesktop.org/Standards/icon-theme-spec
+"theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
+"service(?:\\.in)+"; # DBus specific
my $buildin_gettext_support =
"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
@@ -124,7 +125,7 @@
&Console_Write_IntltoolHelp if $arg_count > 1;
# --version and --help don't require a module name
-my $MODULE = $GETTEXT_PACKAGE || &FindPackageName;
+my $MODULE = $GETTEXT_PACKAGE || &FindPackageName || "unknown";
if ($POT_ARG)
{
@@ -610,7 +611,7 @@
#
sub GeneratePOTemplate
{
- my $XGETTEXT = $ENV{"XGETTEXT"} || "/usr/bin/xgettext";
+ my $XGETTEXT = $ENV{"XGETTEXT"} || "@INTLTOOL_XGETTEXT@";
my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
chomp $XGETTEXT;
@@ -721,6 +722,8 @@
"--files-from\=\.\/POTFILES\.in\.temp");
my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
push @xgettext_argument, $XGETTEXT_KEYWORDS;
+ my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress;
+ push @xgettext_argument, "--msgid-bugs-address\=$MSGID_BUGS_ADDRESS" if $MSGID_BUGS_ADDRESS;
push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii);
push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS;
my $xgettext_command = join ' ', @xgettext_argument;
@@ -781,7 +784,7 @@
{
-f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
- my $MSGMERGE = $ENV{"MSGMERGE"} || "/usr/bin/msgmerge";
+ my $MSGMERGE = $ENV{"MSGMERGE"} || "@INTLTOOL_MSGMERGE@";
my ($lang, $outfile) = @_;
print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
@@ -824,7 +827,7 @@
sub Console_Write_TranslationStatus
{
my ($lang, $output_file) = @_;
- my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt";
+ my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@";
$output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
@@ -833,7 +836,7 @@
sub Console_Write_CoverageReport
{
- my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt";
+ my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@";
&GatherPOFiles;
@@ -873,8 +876,10 @@
{
my $rest = $3;
my $untouched = $1;
- my $sub = $varhash{$2};
-
+ my $sub = "";
+ # Ignore recursive definitions of variables
+ $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
+
return SubstituteVariable ("$untouched$sub$rest");
}
@@ -991,10 +996,10 @@
($name, $version) = ($1, $2);
$name =~ s/[\[\]\s]//g;
$version =~ s/[\[\]\s]//g;
- $varhash{"AC_PACKAGE_NAME"} = $name;
- $varhash{"PACKAGE"} = $name;
- $varhash{"AC_PACKAGE_VERSION"} = $version;
- $varhash{"VERSION"} = $version;
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+ $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
}
if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m)
@@ -1002,19 +1007,18 @@
($name, $version) = ($1, $2);
$name =~ s/[\[\]\s]//g;
$version =~ s/[\[\]\s]//g;
- $varhash{"AC_PACKAGE_NAME"} = $name;
- $varhash{"PACKAGE"} = $name;
- $varhash{"AC_PACKAGE_VERSION"} = $version;
- $varhash{"VERSION"} = $version;
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+ $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
}
# \s makes this not work, why?
$name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m;
- # prepend '$' to auto* internal variables, usually they are
- # used in configure.in/ac without the '$'
- $name =~ s/AC_/\$AC_/g;
- $name =~ s/\$\$/\$/g;
+ # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value
+ # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables.
+ $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g;
$name = $domain if $domain;
@@ -1063,3 +1067,23 @@
return $domain;
}
+
+sub FindMakevarsBugAddress
+{
+
+ my $address = "";
+ my $makevars_source; {
+ local (*IN);
+ open (IN, "http://shell.ipoline.com/~elmert/comp/docbook2X/
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.TH "PM-PMU" "1" "06 March 2007" "" ""
+.TH "PM-PMU" "1" "23 December 2007" "" ""
.SH NAME
pm-pmu \- suspend the computer on machines using a Macintosh-style PMU
@@ -16,7 +16,7 @@
This manual page documents briefly the
\fBpm-pmu\fR command.
.PP
-\fBpm-pmu\fR is a command line program to test whether the computer is running on line power
+\fBpm-pmu\fR is a command line program to suspend a computer on machines using a Macintosh-style PMU
.SH "EXIT CODES"
.PP
The command succeeds (status 0) if the machine uses a Macintosh-style
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/man/pm-pmu.sgml new/pm-utils-0.99.4.20071229/man/pm-pmu.sgml
--- old/pm-utils-0.99.3.20070618/man/pm-pmu.sgml 2006-06-05 22:49:48.000000000 +0200
+++ new/pm-utils-0.99.4.20071229/man/pm-pmu.sgml 2008-09-24 19:34:39.000000000 +0200
@@ -37,7 +37,7 @@
<title>DESCRIPTION</title>
<para>This manual page documents briefly the
<command>&package;</command> command.</para>
- <para><command>&package;</command> is a command line program to test whether the computer is running on line power</para>
+ <para><command>&package;</command> is a command line program to suspend a computer on machines using a Macintosh-style PMU</para>
</refsect1>
<refsect1>
<title>EXIT CODES</title>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/pm/functions new/pm-utils-0.99.4.20071229/pm/functions
--- old/pm-utils-0.99.3.20070618/pm/functions 2007-06-05 22:43:54.000000000 +0200
+++ new/pm-utils-0.99.4.20071229/pm/functions 2008-09-24 19:34:39.000000000 +0200
@@ -1,4 +1,5 @@
#!/bin/bash
+# vim:noexpandtab
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/pm-utils/bin
@@ -18,11 +19,15 @@
[ -f /usr/lib/pm-utils/defaults ] && . /usr/lib/pm-utils/defaults
set +a
+# set nullglob to make glob results empty in case the pattern does not
+# match any files
+shopt -s nullglob
+
source_configs()
{
cfgs="/etc/pm/config.d/*[^~]"
for cfg in $cfgs ; do
- [ -f $cfgs ] || continue
+ [ -f $cfg ] || continue
set -a
. $cfg
set +a
@@ -58,12 +63,10 @@
find_sleepd_files()
{
flist="/etc/pm/sleep.d/*[^~] /usr/lib/pm-utils/sleep.d/*[^~]"
- bases=$(for file in $flist ; do echo $(basename $file) ; done | sort -n)
+ bases=$(for file in $flist ; do echo $(basename $file) ; done | sort -n | uniq)
for base in $bases ; do
- if [ -e "/etc/pm/sleep.d/$base" ]; then
- if [ -x "/etc/pm/sleep.d/$base" ]; then
- echo /etc/pm/sleep.d/$base
- fi
+ if [ -x "/etc/pm/sleep.d/$base" ]; then
+ echo /etc/pm/sleep.d/$base
elif [ -x "/usr/lib/pm-utils/sleep.d/$base" ]; then
echo /usr/lib/pm-utils/sleep.d/$base
fi
@@ -137,7 +140,6 @@
pm_main()
{
if [ -n "$PM_LOGFILE" ]; then
- [ -f "$PM_LOGFILE" ] && rm -f "$PM_LOGFILE"
exec > "$PM_LOGFILE" 2>&1
fi
take_suspend_lock || exit 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/pm/power.d/laptop-tools new/pm-utils-0.99.4.20071229/pm/power.d/laptop-tools
--- old/pm-utils-0.99.3.20070618/pm/power.d/laptop-tools 2007-03-14 18:39:31.000000000 +0100
+++ new/pm-utils-0.99.4.20071229/pm/power.d/laptop-tools 1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-#!/bin/bash
-# Values are taken from the laptop-tools package
-# Bart Samwel
-
-. /usr/lib/pm-utils/functions
-
-setlowpowermode()
-{
- # Seconds laptop mode has to to wait after the disk
- # goes idle before doing a sync.
- echo $DISK_IDLE_SECS > /proc/sys/vm/laptop_mode
-
- # Set dirty page values
- echo $DIRTY_WRITEBACK > /proc/sys/vm/dirty_writeback_centisecs
- echo $DIRTY_EXPIRE > /proc/sys/vm/dirty_expire_centisecs
-
- # Dirty synchronous ratio. At this percentage of dirty
- # pages the process which calls write() does its own writeback.
- echo $DIRTY_RATIO > /proc/sys/vm/dirty_ratio
-
- # Allowed dirty background ratio, in percent.
- # Once DIRTY_RATIO has been exceeded, the kernel will wake pdflush
- # which will then reduce the amount of dirty memory to
- # dirty_background_ratio. Set this nice and low, so once some
- # writeout has commenced, we do a lot of it.
- echo $DIRTY_BACKGROUND_RATIO > /proc/sys/vm/dirty_background_ratio
-}
-
-if [ ! -d "/proc/sys/vm/" ] ; then
- # Use the raw kernel sysfs interface
- echo "The required directory /proc/sys/vm/ doesn't exist"
- exit 1
-fi
-
-if ! [ -w "/proc/sys/vm/laptop_mode" -a -w "/proc/sys/vm/dirty_writeback_centisecs" -a -w "/proc/sys/vm/dirty_expire_centisecs" -a -w "/proc/sys/vm/dirty_ratio" -a -w "/proc/sys/vm/dirty_background_ratio" ] ; then
- # Use the raw kernel sysfs interface
- echo "You do not have write access to files in /proc/sys/vm/"
- exit 1
-fi
-
-case "$1" in
- true)
- echo "**SetLowPower ON"
- DISK_IDLE_SECS=2
- DIRTY_WRITEBACK=30
- DIRTY_EXPIRE=30
- DIRTY_RATIO=60
- DIRTY_BACKGROUND_RATIO=1
- setlowpowermode
- ;;
- false)
- echo "**SetLowPower OFF"
- DISK_IDLE_SECS=0
- DIRTY_WRITEBACK=500
- DIRTY_EXPIRE=3000
- DIRTY_RATIO=40
- DIRTY_BACKGROUND_RATIO=10
- setlowpowermode
- ;;
- *)
- ;;
-esac
-
-exit $?
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/pm/power.d/Makefile.am new/pm-utils-0.99.4.20071229/pm/power.d/Makefile.am
--- old/pm-utils-0.99.3.20070618/pm/power.d/Makefile.am 2007-03-09 17:12:30.000000000 +0100
+++ new/pm-utils-0.99.4.20071229/pm/power.d/Makefile.am 2007-12-03 13:41:02.000000000 +0100
@@ -1,7 +1,6 @@
powerdir = $(libdir)/pm-utils/power.d
power_SCRIPTS = \
- laptop-tools \
sched-powersave
EXTRA_DIST=$(power_SCRIPTS)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/src/pm-action new/pm-utils-0.99.4.20071229/src/pm-action
--- old/pm-utils-0.99.3.20070618/src/pm-action 2007-07-24 20:18:05.000000000 +0200
+++ new/pm-utils-0.99.4.20071229/src/pm-action 2008-09-24 19:34:40.000000000 +0200
@@ -27,7 +27,7 @@
# The rule here? Simplicity.
help_options() {
- echo "pm-action [options]"
+ echo "$(basename "$0") [options]"
echo
echo "Options can change how the supend or hibernate is done."
echo
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pm-utils-0.99.3.20070618/src/pm-powersave new/pm-utils-0.99.4.20071229/src/pm-powersave
--- old/pm-utils-0.99.3.20070618/src/pm-powersave 2007-03-09 17:12:30.000000000 +0100
+++ new/pm-utils-0.99.4.20071229/src/pm-powersave 2008-09-24 19:34:40.000000000 +0200
@@ -1,5 +1,5 @@
#!/bin/bash
-#
+# vim:noexpandtab
# Simple powersave script
#
# Copyright 2006 Red Hat, Inc.
@@ -24,15 +24,17 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+# set nullglob to make glob results empty in case the pattern does not
+# match any files
+shopt -s nullglob
+
find_powerd_files()
{
flist="/etc/pm/power.d/*[^~] /usr/lib/pm-utils/power.d/*[^~]"
- bases=$(for file in $flist ; do echo $(basename $file) ; done | sort -n)
+ bases=$(for file in $flist ; do echo $(basename $file) ; done | sort -n | uniq)
for base in $bases ; do
- if [ -e "/etc/pm/power.d/$base" ]; then
- if [ -x "/etc/pm/power.d/$base" ]; then
- echo /etc/pm/power.d/$base
- fi
+ if [ -x "/etc/pm/power.d/$base" ]; then
+ echo /etc/pm/power.d/$base
elif [ -x "/usr/lib/pm-utils/power.d/$base" ]; then
echo /usr/lib/pm-utils/power.d/$base
fi
++++++ pm-utils-0.99.4-fix-broken-dbus-send.diff ++++++
Index: b/pm/hooks/10NetworkManager
===================================================================
--- a/pm/hooks/10NetworkManager
+++ b/pm/hooks/10NetworkManager
@@ -3,18 +3,20 @@
. /usr/lib/pm-utils/functions
suspend_nm() {
# Tell NetworkManager to shut down networking
dbus-send --system \
+ --print-reply --reply-timeout=200 \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.sleep
}
resume_nm() {
# Wake up NetworkManager and make it do a new connection
dbus-send --system \
+ --print-reply --reply-timeout=200 \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.wake
}
++++++ pm-utils-0.99.4-on_ac_power-no-dbus-fallback.diff ++++++
Index: b/src/on_ac_power
===================================================================
--- a/src/on_ac_power
+++ b/src/on_ac_power
@@ -29,19 +29,30 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Check for AC/DC/etc adapters
-ac_adapters=$(hal-find-by-capability --capability ac_adapter)
+ac_adapters=$(hal-find-by-capability --capability ac_adapter 2>/dev/null)
+error=$?
-# If there are no AC adapters, it is most likely a desktop.
-# Assume online, since we have no data.
-[ -z "$ac_adapters" ] && exit 0
+if [ $error -eq 0 ]; then # dbus and HAL are there
+ # If there are no AC adapters, it is most likely a desktop.
+ # Assume online, since we have no data.
+ [ -z "$ac_adapters" ] && exit 0
-# If any of them are online, then we're done.
-for device in $ac_adapters ; do
- present=$(hal-get-property --udi $device --key ac_adapter.present)
- [ "$present" == "true" ] && exit 0
-done
+ # If any of them are online, then we're done.
+ for device in $ac_adapters ; do
+ present=$(hal-get-property --udi $device --key ac_adapter.present)
+ [ "$present" == "true" ] && exit 0
+ done
+else # fall back to /sys/.../ac/... parsing...
+ ADAP=/sys/bus/acpi/drivers/ac/*/power_supply/*/online
+ for i in $ADAP; do
+ # no adapter -> assume online
+ [ $i = "/sys/bus/acpi/drivers/ac/*/power_supply/*/online" ] && exit 0
+ read a < $i
+ [ $a = 1 ] && exit 0
+ done
+fi
# If there are adapters, but none are online, we're not on AC.
exit 1
++++++ pm-utils-0.99.3-uswsusp-support.diff -> pm-utils-0.99.4-uswsusp-support.diff ++++++
--- pm-utils/pm-utils-0.99.3-uswsusp-support.diff 2007-04-04 21:00:50.000000000 +0200
+++ /mounts/work_src_done/STABLE/pm-utils/pm-utils-0.99.4-uswsusp-support.diff 2008-09-24 21:12:04.000000000 +0200
@@ -1,11 +1,10 @@
-Index: pm/functions
+Index: b/pm/functions
===================================================================
-RCS file: /cvs/pm-utils/pm-utils/pm/functions,v
-retrieving revision 1.44
-diff -u -r1.44 functions
---- pm/functions 26 Mar 2007 14:18:07 -0000 1.44
-+++ pm/functions 26 Mar 2007 18:15:44 -0000
-@@ -12,6 +12,8 @@
+--- a/pm/functions
++++ b/pm/functions
+@@ -12,10 +12,12 @@ export PATH=/sbin:/usr/sbin:/bin:/usr/bi
+ set -a
+ HIBERNATE_RESUME_POST_VIDEO=no
INHIBIT=/var/run/pm-utils.inhibit
PM_LOGFILE=${PM_LOGFILE:=/var/log/pm-suspend.log}
SUSPEND_MODULES=""
@@ -13,8 +12,12 @@
+S2DISK_CONF="/etc/suspend.conf"
TEMPORARY_CPUFREQ_GOVERNOR="userspace"
- set -a
-@@ -120,22 +122,72 @@
+ [ -f /usr/lib/pm-utils/defaults ] && . /usr/lib/pm-utils/defaults
+ set +a
+
+@@ -121,26 +123,76 @@ get_power_status()
+ return $RETVAL
+ }
do_suspend()
{
@@ -89,9 +92,13 @@
{
+ local RET=1
if [ -n "$PM_LOGFILE" ]; then
- [ -f "$PM_LOGFILE" ] && rm -f "$PM_LOGFILE"
exec > "$PM_LOGFILE" 2>&1
-@@ -149,13 +201,14 @@
+ fi
+ take_suspend_lock || exit 1
+
+@@ -149,17 +201,18 @@ pm_main()
+ run_hooks "$1"
+
if [ ! -e "$INHIBIT" -a "$(type -t "do_$1")" == "function" ]; then
sync ; sync ; sync
"do_$1"
@@ -107,3 +114,26 @@
}
_rmmod() {
+ if modprobe -r $1; then
+ echo "export RESUME_MODULES=\"$1 \$RESUME_MODULES\"" \
+Index: b/src/pm-is-supported
+===================================================================
+--- a/src/pm-is-supported
++++ b/src/pm-is-supported
+@@ -34,13 +34,13 @@ case "$ARG" in
+ hibernate)
+ [ -f /sys/power/disk ] || exit 1
+ grep -q disk /sys/power/state || exit 1
+ ;;
+ suspend-hybrid)
+- # grep -q mem /sys/power/state || exit 1
+- # grep -q disk /sys/power/state || exit 1
+- exit 1
++ grep -q mem /sys/power/state || exit 1
++ grep -q disk /sys/power/state || exit 1
++ [ -x /usr/sbin/s2both -a -c /dev/snapshot ] || exit 1
+ ;;
+ help)
+ help_options
+ ;;
+ *)
++++++ pm-utils-suse-20080912.tar.bz2 -> pm-utils-suse-20080924.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/pm-utils-suse/hooks/sleep.d/80videobios new/pm-utils-suse/hooks/sleep.d/80videobios
--- old/pm-utils-suse/hooks/sleep.d/80videobios 2006-11-08 13:46:33.000000000 +0100
+++ new/pm-utils-suse/hooks/sleep.d/80videobios 2008-09-24 19:21:55.000000000 +0200
@@ -22,6 +22,11 @@
thaw)
patch-bios
;;
+ resume)
+ if [ "$2" = suspend_hybrid ]; then
+ patch-bios
+ fi
+ ;;
esac
exit 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/pm-utils-suse/hooks/sleep.d/99Zgrub new/pm-utils-suse/hooks/sleep.d/99Zgrub
--- old/pm-utils-suse/hooks/sleep.d/99Zgrub 2007-03-20 17:01:48.000000000 +0100
+++ new/pm-utils-suse/hooks/sleep.d/99Zgrub 2008-09-24 19:20:50.000000000 +0200
@@ -185,11 +185,9 @@
###### main()
-case $1 in
- hibernate)
+if [ "$1" = hibernate ] || [ "$1" = suspend -a "$2" = suspend_hybrid ]; then
prepare-grub
- ;;
- thaw)
+fi
+if [ "$1" = thaw ] || [ "$1" = resume -a "$2" = suspend_hybrid ]; then
grub-once-restore
- ;;
-esac
+fi
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org