Hello community,
here is the log from the commit of package pm-utils for openSUSE:Factory checked in at 2012-06-26 17:20:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pm-utils (Old)
and /work/SRC/openSUSE:Factory/.pm-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pm-utils", Maintainer is "VDziewiecki@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/pm-utils/pm-utils.changes 2012-04-23 09:16:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.pm-utils.new/pm-utils.changes 2012-06-26 17:20:56.000000000 +0200
@@ -1,0 +2,22 @@
+Thu Jun 21 17:06:30 UTC 2012 - vdziewiecki@suse.com
+
+-Fixed bnc#697379 - Powermanagement snd_hda_intel - Skript /usr/lib/pm-utils/intel-audio-powersave doesnt' work
+
+
+-------------------------------------------------------------------
+Wed Jun 20 14:20:38 UTC 2012 - vdziewiecki@suse.com
+
+-Fixed 06autofs, it now works only if NetworkManager is not
+running, because it has it's own way to start autofs.
+Fix regression caused by fix for bnc#753589-Using a savestate/restorestate scheme instead
+
+-------------------------------------------------------------------
+Fri May 11 09:27:30 UTC 2012 - vdziewiecki@suse.com
+
+-bnc#751621 (again): Test systemd presence (/proc/1/comm) and
+choose either systemctl or /sbin/service when stopping and
+restarting services. This should make the services stop and start properly,
+but avoid dumping binary crap in the log (bnc#75181).
+
+
+-------------------------------------------------------------------
Old:
----
pm-utils-1.4.1-suse-4.tar.bz2
New:
----
pm-utils-1.4.1-suse-8.tar.bz2
rc.cpufreq
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pm-utils.spec ++++++
--- /var/tmp/diff_new_pack.IU6RHE/_old 2012-06-26 17:20:59.000000000 +0200
+++ /var/tmp/diff_new_pack.IU6RHE/_new 2012-06-26 17:20:59.000000000 +0200
@@ -19,7 +19,7 @@
%define pm_libdir %{_prefix}/lib/%{name}/
%define pm_quirkdbdir %{pm_libdir}/video-quirks
%define pm_sysconfdir %{_sysconfdir}/pm/config.d/
-%define gitversion 4
+%define gitversion 8
Name: pm-utils
Version: 1.4.1
@@ -31,6 +31,7 @@
Source0: %{name}-%{version}-suse-%{gitversion}.tar.bz2
# http://gitorious.org/opensuse/pm-utils-suse
Source1: http://pm-utils.freedesktop.org/releases/pm-quirks-20100316.tar.bz2
+Source2: rc.cpufreq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq
@@ -108,15 +109,36 @@
# no arch-specific data, we put it in datadir.
%{__install} -d -m 0755 %{buildroot}%{_datadir}/pkgconfig
mv %{buildroot}%{_prefix}/lib/pkgconfig/%{name}.pc %{buildroot}%{_datadir}/pkgconfig
+# install cpufreq init script
+install -D -m 0755 %{S:2} %{buildroot}%{_sysconfdir}/init.d/cpufreq
+install -d -m 0755 %{buildroot}%{_sbindir}
+ln -sf %{_sysconfdir}/init.d/cpufreq %{buildroot}%{_sbindir}/rccpufreq
%clean
rm -rf %{buildroot}
+%preun
+%stop_on_removal cpufreq
+
+%post
+%fillup_and_insserv -f -y cpufreq
+
+%triggerun -- %{name} < 1.4.1-3
+# Forcefully enable the service on upgrades from versions where the service
+# didn't exist or wasn't necessarily enabled by default. Without this, on
+# upgrades, the service will not be enabled.
+%insserv_force_if_yast cpufreq
+
+%postun
+%restart_on_update cpufreq
+%insserv_cleanup
+
%files
%defattr (-,root,root)
%doc README AUTHORS README.smart-suspend-to-RAM
%attr(0755,root,root) %{_bindir}/*
%{_sbindir}/*
+%config %{_sysconfdir}/init.d/cpufreq
%{_sysconfdir}/pm/
%config(noreplace) %{_sysconfdir}/pm/config.d/rtcwake.config
%{pm_libdir}
++++++ pm-utils-1.4.1-suse-4.tar.bz2 -> pm-utils-1.4.1-suse-8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pm-utils/pm/functions.in new/pm-utils/pm/functions.in
--- old/pm-utils/pm/functions.in 2012-03-27 11:11:35.000000000 +0200
+++ new/pm-utils/pm/functions.in 2012-04-26 13:12:31.000000000 +0200
@@ -143,16 +143,36 @@
stopservice()
{
- if service "$1" status 2>/dev/null | grep -q -e running -e started
+ if test `cat /proc/1/comm` = "systemd"
then
- touch "${STORAGEDIR}/service:$1"
- SYSTEMD_NO_WRAP=yes service "$1" stop
+
+ if systemctl status "$1".service
+ then
+ touch "${STORAGEDIR}/service:$1"
+ systemctl stop "$1".service
+ fi
+
+ else
+ if service "$1" status 2>/dev/null | grep -q -e running -e started
+ then
+ touch "${STORAGEDIR}/service:$1"
+ service "$1" stop
+ fi
fi
}
restartservice()
{
- [ -O "${STORAGEDIR}/service:$1" ] && SYSTEMD_NO_WRAP=yes service "$1" start
+ if [ -O "${STORAGEDIR}/service:$1" ]
+ then
+ if test `cat /proc/1/comm` = "systemd"
+ then
+ systemctl start "$1".service
+ else
+ service "$1" start
+
+ fi
+ fi
}
# Disable a hook.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pm-utils/pm/power.d/intel-audio-powersave new/pm-utils/pm/power.d/intel-audio-powersave
--- old/pm-utils/pm/power.d/intel-audio-powersave 2012-03-26 11:07:53.000000000 +0200
+++ new/pm-utils/pm/power.d/intel-audio-powersave 2012-06-21 18:43:25.000000000 +0200
@@ -20,9 +20,9 @@
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
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pm-utils/pm/power.d/laptop-mode new/pm-utils/pm/power.d/laptop-mode
--- old/pm-utils/pm/power.d/laptop-mode 2012-04-17 14:44:29.000000000 +0200
+++ new/pm-utils/pm/power.d/laptop-mode 2012-06-04 20:18:09.000000000 +0200
@@ -68,15 +68,13 @@
else
write_values 0 10 5 500
fi
- sysctl -e --system
echo "Laptop mode disabled."
}
laptop_mode_battery() {
# enable laptop mode, set vm parameters to buffer as many writes as
# possible.
- state_exists laptop_mode_default || \
- read_values | savestate laptop_mode_default
+ read_values | savestate laptop_mode_default
write_values "$LAPTOP_MODE" "$LAPTOP_DIRTY_RATIO" \
"$LAPTOP_DIRTY_BG_RATIO" "$LAPTOP_DIRTY_WRITEBACK"
echo "Laptop mode enabled."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pm-utils/pm/sleep.d/00powersave new/pm-utils/pm/sleep.d/00powersave
--- old/pm-utils/pm/sleep.d/00powersave 2012-03-26 11:07:53.000000000 +0200
+++ new/pm-utils/pm/sleep.d/00powersave 2012-06-04 20:16:59.000000000 +0200
@@ -5,9 +5,9 @@
command_exists pm-powersave || exit $NA
case $1 in
- suspend|hibernate) pm-powersave false ;;
- resume|thaw) pm-powersave ;;
+ suspend|hibernate) on_ac_power || pm-powersave false ;;
+ resume|thaw) on_ac_power || pm-powersave false ;;
*) exit $NA ;;
esac
exit 0
-
\ No newline at end of file
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pm-utils/pm/sleep.d/06autofs new/pm-utils/pm/sleep.d/06autofs
--- old/pm-utils/pm/sleep.d/06autofs 2012-04-06 15:14:25.000000000 +0200
+++ new/pm-utils/pm/sleep.d/06autofs 2012-06-20 12:30:22.000000000 +0200
@@ -6,18 +6,10 @@
case "$1" in
hibernate|suspend)
- if SYSTEMD_NO_WRAP=yes service autofs status &> /dev/null; then
- savestate autofs running
- SYSTEMD_NO_WRAP=yes service autofs stop
- else
- savestate autofs notrunning
- fi
+ stopservice autofs
;;
thaw|resume)
- _autofs_state=`restorestate autofs`
- if test "$_autofs_state" = "running" ; then
- SYSTEMD_NO_WRAP=yes service autofs start
- fi
+ checkproc NetworkManager || restartservice autofs
;;
*) exit $NA
;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pm-utils/pm/sleep.d/50rcnetwork new/pm-utils/pm/sleep.d/50rcnetwork
--- old/pm-utils/pm/sleep.d/50rcnetwork 2012-03-27 11:11:46.000000000 +0200
+++ new/pm-utils/pm/sleep.d/50rcnetwork 2012-04-26 13:33:49.000000000 +0200
@@ -26,17 +26,19 @@
# function returning a list of interfaces with running dhcp.
command_exists dhcp_interfaces || exit $NA
+test `cat /proc/1/comm` = "systemd" && SYSTEMD_NO_WRAP=yes
+
case "$1" in
hibernate|suspend)
_dhcp_interfaces=`dhcp_interfaces`
if test "x$_dhcp_interfaces" != x ; then
savestate "dhcp_interfaces" "`dhcp_interfaces`"
fi
- SYSTEMD_NO_WRAP=yes service network stop-all-dhcp-clients
+ service network stop-all-dhcp-clients
;;
thaw|resume)
for interface in `restorestate "dhcp_interfaces"`; do
- SYSTEMD_NO_WRAP=yes service network restart ${interface}
+ service network restart ${interface}
done
;;
*) exit $NA
++++++ rc.cpufreq ++++++
#!/bin/sh
# Author: Danny Kukawka