rpms/pm-utils/devel pm-utils-correct-filename-in-help.patch, NONE, 1.1 pm-utils-missing-uniq.patch, NONE, 1.1 pm-utils-nullglob.patch, NONE, 1.1 pm-utils.spec, 1.83, 1.84
Till Maas (till)
fedora-extras-commits at redhat.com
Sun Dec 30 21:25:22 UTC 2007
Author: till
Update of /cvs/pkgs/rpms/pm-utils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8905
Modified Files:
pm-utils.spec
Added Files:
pm-utils-correct-filename-in-help.patch
pm-utils-missing-uniq.patch pm-utils-nullglob.patch
Log Message:
* Sun Dec 30 2007 Till Maas <opensource till name> - 0.99.4-7
- fix some bugs (RH #302401)
pm-utils-correct-filename-in-help.patch:
--- NEW FILE pm-utils-correct-filename-in-help.patch ---
This patch makes pm-action show the filename in help, that was used
to invoke it, e.g. pm-suspend
Index: src/pm-action
===================================================================
RCS file: /cvs/pm-utils/pm-utils/src/pm-action,v
retrieving revision 1.12
diff -u -r1.12 pm-action
--- src/pm-action 18 Jun 2007 20:42:36 -0000 1.12
+++ src/pm-action 24 Dec 2007 12:30:38 -0000
@@ -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
pm-utils-missing-uniq.patch:
--- NEW FILE pm-utils-missing-uniq.patch ---
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.
Index: pm/functions
===================================================================
RCS file: /cvs/pm-utils/pm-utils/pm/functions,v
retrieving revision 1.47
diff -u -r1.47 functions
--- pm/functions 23 Dec 2007 23:01:46 -0000 1.47
+++ pm/functions 24 Dec 2007 12:24:25 -0000
@@ -1,4 +1,5 @@
#!/bin/bash
+# vim:noexpandtab
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/pm-utils/bin
@@ -58,12 +59,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
Index: src/pm-powersave
===================================================================
RCS file: /cvs/pm-utils/pm-utils/src/pm-powersave,v
retrieving revision 1.7
diff -u -r1.7 pm-powersave
--- src/pm-powersave 6 Mar 2007 19:08:06 -0000 1.7
+++ src/pm-powersave 24 Dec 2007 12:24:25 -0000
@@ -1,5 +1,5 @@
#!/bin/bash
-#
+# vim:noexpandtab
# Simple powersave script
#
# Copyright 2006 Red Hat, Inc.
@@ -27,12 +27,10 @@
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-nullglob.patch:
--- NEW FILE pm-utils-nullglob.patch ---
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.
Index: pm/functions
===================================================================
RCS file: /cvs/pm-utils/pm-utils/pm/functions,v
retrieving revision 1.47
diff -u -r1.47 functions
--- pm/functions 23 Dec 2007 23:01:46 -0000 1.47
+++ pm/functions 24 Dec 2007 12:37:00 -0000
@@ -18,6 +18,10 @@
[ -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/*[^~]"
Index: src/pm-powersave
===================================================================
RCS file: /cvs/pm-utils/pm-utils/src/pm-powersave,v
retrieving revision 1.7
diff -u -r1.7 pm-powersave
--- src/pm-powersave 6 Mar 2007 19:08:06 -0000 1.7
+++ src/pm-powersave 24 Dec 2007 12:37:00 -0000
@@ -24,6 +24,10 @@
# 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/*[^~]"
Index: pm-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pm-utils/devel/pm-utils.spec,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- pm-utils.spec 28 Nov 2007 02:50:10 -0000 1.83
+++ pm-utils.spec 30 Dec 2007 21:24:45 -0000 1.84
@@ -2,7 +2,7 @@
Summary: Power management utilities and scripts for Fedora
License: GPLv2
Version: 0.99.4
-Release: 6%{?dist}
+Release: 7%{?dist}
Group: System Environment/Base
URL: http://pm-utils.freedesktop.org
ExclusiveArch: i386 x86_64 ia64 ppc ppc64 %{?arm} sparc sparcv9 sparc64
@@ -33,6 +33,9 @@
Patch1: pm-utils-0.99.4-manpage-typo.patch
Patch2: pm-utils-0.99.3-cfg.patch
Patch3: pm-utils-0.99.4-logfile.patch
+Patch4: pm-utils-correct-filename-in-help.patch
+Patch5: pm-utils-missing-uniq.patch
+Patch6: pm-utils-nullglob.patch
%description
@@ -46,6 +49,9 @@
%patch1 -p1 -b .manpage-typo
%patch2 -p1 -b .cfg
%patch3 -p1 -b .logfile
+%patch4 -p0 -b .correct-filename-in-help
+%patch5 -p0 -b .missing-uniq
+%patch6 -p0 -b .nullglob
%build
@@ -119,6 +125,9 @@
%ghost %verify(not md5 size mtime) %{_localstatedir}/log/pm-suspend.log
%changelog
+* Sun Dec 30 2007 Till Maas <opensource till name> - 0.99.4-7
+- fix some bugs (RH #302401)
+
* Tue Nov 27 2007 Dennis Gilmore <dennis at ausil.us> - 0.99.4-6
- add sparc archs to ExclusiveArch list
More information about the fedora-extras-commits
mailing list