Mailinglist Archive: opensuse-commit (817 mails)
| < Previous | Next > |
commit nut for openSUSE:Factory
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Thu, 18 Dec 2008 15:17:46 +0100
- Message-id: <20081218141746.D28E367815D@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package nut for openSUSE:Factory
checked in at Thu Dec 18 15:17:46 CET 2008.
--------
--- nut/nut.changes 2008-12-09 12:27:22.000000000 +0100
+++ /mounts/work_src_done/STABLE/nut/nut.changes 2008-12-17
18:51:53.000000000 +0100
@@ -1,0 +2,11 @@
+Wed Dec 17 18:51:44 CET 2008 - sbrabec@xxxxxxx
+
+- Fixed Suspend to Disc documentation (bnc#449861).
+- Support Suspend to Disc in scriptlets.
+- Turn UPS down during emergency Suspend to Disc (bnc#449862).
+- Fixed locations of pm-utils stuff (bnc#449866).
+- upssched-cmd moved to /bin (bnc#449828).
+- Fixed incorrect path to upssched-cmd (bnc#449869).
+- Fixed files listed twice.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nut.spec ++++++
--- /var/tmp/diff_new_pack.zD8478/_old 2008-12-18 15:16:58.000000000 +0100
+++ /var/tmp/diff_new_pack.zD8478/_new 2008-12-18 15:16:58.000000000 +0100
@@ -28,7 +28,7 @@
Conflicts: apcupsd
Summary: Network UPS Tools Core (Unbreakable Power Supply Monitoring)
Version: 2.2.2
-Release: 64
+Release: 65
Url: http://www.networkupstools.org/
Source: %{name}-%{version}.tar.bz2
Source1: upsd.init
@@ -119,7 +119,7 @@
Requires: %{name}-classic = %{version}
Enhances: %{name}-classic
# for update from openSUSE <= 10.3, SLE <= 10
-Provides: nut:%{_prefix}/lib/ups/driver/snmp-ups
+Provides: nut:%{MODELPATH}/snmp-ups
%description drivers-net
Networking drivers for the Network UPS Tools. You will need them
@@ -474,7 +474,9 @@
mv upsd-early-powerdown.init upsd-early-powerdown
%patch
%patch3
+%if %suse_version < 1110
%patch4
+%endif
%if %suse_version < 1030
%patch6 -R
%endif
@@ -484,6 +486,10 @@
%if %suse_version > 1030
%patch12
%endif
+%if %suse_version < 1030
+sed -i 's:/usr/lib/pm-utils/functions:/etc/pm/functions:' nut.sleep
+%endif
+sed -i s:/usr/local/ups/bin:/bin: conf/upssched.conf.sample.in
%build
autoreconf -f -i
@@ -524,8 +530,15 @@
%endif
mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
install -m 644 20-nut-disable-hal-hid-ups.fdi
$RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty/
+%if %suse_version >= 1030
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/pm-utils/sleep.d
+install nut.sleep $RPM_BUILD_ROOT%{_prefix}/lib/pm-utils/sleep.d/99nut
+%else
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pm/sleep.d
-install nut.sleep $RPM_BUILD_ROOT%{_sysconfdir}/pm/sleep.d/80nut
+install nut.sleep $RPM_BUILD_ROOT%{_sysconfdir}/pm/sleep.d/99nut
+%endif
+mkdir $RPM_BUILD_ROOT/bin
+mv $RPM_BUILD_ROOT%{_bindir}/upssched-cmd $RPM_BUILD_ROOT/bin/upssched-cmd
# Rename web pages to not conflict with apache2-example-pages or user home
page:
mkdir $RPM_BUILD_ROOT%{HTMLPATH}/nut $RPM_BUILD_ROOT%{CGIPATH}/nut
mv $RPM_BUILD_ROOT%{HTMLPATH}/*.{html,png} $RPM_BUILD_ROOT%{HTMLPATH}/nut/
@@ -541,6 +554,8 @@
%post -n libupsclient1 -p /sbin/ldconfig
+%postun -n libupsclient1 -p /sbin/ldconfig
+
%pre classic
usr/sbin/useradd -r -o -g %{GROUP} -s /bin/false \
-c "UPS daemon" -d /sbin %{USER} 2>/dev/null || :
@@ -563,9 +578,20 @@
if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/upsd
try-powerdown\|\)"' etc/sysconfig/shutdown ; then
usr/bin/sed -i
's:^\(HALT_POWERDOWN_INSERT="\).*"[[:space:]]*:\1%{_sysconfdir}/init.d/upsd
try-powerdown":' etc/sysconfig/shutdown
else
+ # User configured Suspend-to-disc. Keep it unchanged and be silent.
+ if ! usr/bin/grep -q '^HALT_POWERDOWN_INSERT="/usr/bin/powersave -U'
etc/sysconfig/shutdown ; then
echo >&2 "nut: WARNING: Unknown value of HALT_POWERDOWN_INSERT in
%{_sysconfdir}/sysconfig/shutdown."
echo >&2 " Keeping unchanged. Should be:"
echo >&2 "HALT_POWERDOWN_INSERT=\"%{_sysconfdir}/init.d/upsd try-powerdown\""
+ echo >&2 "or"
+ echo >&2 "HALT_POWERDOWN_INSERT=\"/usr/bin/powersave -U\""
+ fi
+fi
+# Migrate Suspend to Disc to the new convention (bnc#449861):
+# It was never on by default, but documentation up to 11.0 recommends
+# "shutdown -z +0" for suspend to disc. It was discontinued before 11.0.
+if fgrep "shutdown -z +0" /etc/ups/upsmon.conf ; then
+sed -i 's:/sbin/shutdown -z +0:/usr/bin/powersave -U:;s:shutdown -z
+0:/usr/bin/powersave -U:' /etc/ups/upsmon.conf
fi
# Silently remove %{_sysconfdir}/sysconfig/smartups. File is now obsolete and
# values are copied to not replaced config files.
@@ -575,14 +601,12 @@
%preun classic
%{stop_on_removal upsd}
-%postun -n libupsclient1 -p /sbin/ldconfig
-
%postun classic
%{restart_on_update upsd}
# Remove HALT_POWERDOWN_INSERT
if test $1 -eq 0 -a ! -f %{_sysconfdir}/init.d/upsd ; then
- if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="%{_sysconfdir}/init\.d/upsd
try-powerdown"' etc/sysconfig/shutdown ; then
- usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\)%{_sysconfdir}/init\.d/upsd
try-powerdown":\1":' etc/sysconfig/shutdown
+ if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/upsd
try-powerdown\|/usr/bin/powersave -U\)"' etc/sysconfig/shutdown ; then
+ usr/bin/sed -i
's:^\(HALT_POWERDOWN_INSERT="\)\(%{_sysconfdir}/init\.d/upsd
try-powerdown\|/usr/bin/powersave -U\)":\1":' etc/sysconfig/shutdown
else
echo >&2 "nut: WARNING: Unknown value of HALT_POWERDOWN_INSERT in
%{_sysconfdir}/sysconfig/shutdown."
echo >&2 " Keeping unchanged. Should be:"
@@ -601,23 +625,22 @@
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README README.SUSE UPGRADING
upsd-early-powerdown docs/FAQ docs/*.txt docs/cables
%dir %{_prefix}/lib/ups
-%dir %{_prefix}/lib/ups/driver
-%{_prefix}/lib/ups/*
-%exclude %{_prefix}/lib/ups/driver/snmp-ups
-%exclude %{_prefix}/lib/ups/driver/netxml-ups
%{_datadir}/nut
%{_datadir}/hal/fdi/policy/20thirdparty/20-nut-disable-hal-hid-ups.fdi
%doc %{_mandir}/man8/*.*
%exclude %doc %{_mandir}/man8/ups*.*
%exclude %doc %{_mandir}/man8/netxml-ups*.*
%exclude %doc %{_mandir}/man8/snmp-ups*.*
-%{MODELPATH}
%attr(700,%{USER},%{GROUP}) %{STATEPATH}
+%dir %{MODELPATH}
+%{MODELPATH}/*
+%exclude %{MODELPATH}/snmp-ups
+%exclude %{MODELPATH}/netxml-ups
%files drivers-net
%defattr(-,root,root)
-%{_prefix}/lib/ups/driver/snmp-ups
-%{_prefix}/lib/ups/driver/netxml-ups
+%{MODELPATH}/snmp-ups
+%{MODELPATH}/netxml-ups
%doc %{_mandir}/man8/netxml-ups*.*
%doc %{_mandir}/man8/snmp-ups*.*
@@ -636,15 +659,20 @@
%config(noreplace) %{CONFPATH}/upsset.conf
%config(noreplace) %{CONFPATH}/upssched.conf
%{_bindir}/*
+/bin/*
%doc %{_mandir}/man5/*.*
%doc %{_mandir}/man8/ups*.*
+%if %suse_version >= 1030
+%{_prefix}/lib/pm-utils/sleep.d/99nut
+%else
+%{_sysconfdir}/pm/sleep.d/99nut
+%endif
%{_sbindir}/*
%{_sysconfdir}/dbus-1/system.d/upsd.conf
%if %suse_version >= 1030
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/nut
%endif
%{_sysconfdir}/init.d/upsd
-%{_sysconfdir}/pm/sleep.d/80nut
%{_sysconfdir}/udev/rules.d/*.rules
%files cgi
@@ -668,6 +696,14 @@
%doc %{_mandir}/man3/*.*
%changelog
+* Wed Dec 17 2008 sbrabec@xxxxxxx
+- Fixed Suspend to Disc documentation (bnc#449861).
+- Support Suspend to Disc in scriptlets.
+- Turn UPS down during emergency Suspend to Disc (bnc#449862).
+- Fixed locations of pm-utils stuff (bnc#449866).
+- upssched-cmd moved to /bin (bnc#449828).
+- Fixed incorrect path to upssched-cmd (bnc#449869).
+- Fixed files listed twice.
* Tue Dec 09 2008 ro@xxxxxxx
- add pre script for classic package to add the user also
before this package is installed
++++++ nut.sleep ++++++
--- /var/tmp/diff_new_pack.zD8478/_old 2008-12-18 15:16:59.000000000 +0100
+++ /var/tmp/diff_new_pack.zD8478/_new 2008-12-18 15:16:59.000000000 +0100
@@ -1,9 +1,16 @@
#!/bin/bash
-. /etc/pm/functions
+. /usr/lib/pm-utils/functions
case "$1" in
- hibernate|suspend)
+ hibernate)
+ if test -n "$POWERDOWNFLAG" -a -f "$POWERDOWNFLAG" ; then
+ export UPSD_POWERDOWN_CONDITION=1
+ /etc/init.d/upsd try-powerdown
+ fi
+ stopservice upsd
+ ;;
+ suspend)
stopservice upsd
;;
thaw|resume)
++++++ README.SUSE ++++++
--- /var/tmp/diff_new_pack.zD8478/_old 2008-12-18 15:16:59.000000000 +0100
+++ /var/tmp/diff_new_pack.zD8478/_new 2008-12-18 15:16:59.000000000 +0100
@@ -10,7 +10,7 @@
- nut-classic - Uses dedicated UPS daemon, which works with all types of
connection, features UPS monitoring and network UPS management.
- It is not integraded with desktop power management nad you need
+ It is not integrated with desktop power management and you need
dedicated tool for monitoring your UPSes.
And two additional packages:
@@ -30,7 +30,7 @@
nut-classic Configuration
-NUT is preconfigured to use a local or remote UPS as far as possible.
+NUT is pre-configured to use a local or remote UPS as far as possible.
But it still requires a minimal manual configuration before the first
use.
@@ -140,11 +140,11 @@
you should:
- Verify, that suspend to disk works correctly with your desktop:
- shutdown -z +0
+ powersave -U
(You can lose your unsaved data, if your computer does not support
suspend.)
- Change SHUTDOWNCMD in /etc/ups/upsmon.conf to:
-SHUTDOWNCMD "/sbin/shutdown -z +0"
+SHUTDOWNCMD "/usr/bin/powersave -U"
- Verify, that your UPS provides reasonable grant period to complete
suspend in all situations.
++++++ upsd.init ++++++
--- /var/tmp/diff_new_pack.zD8478/_old 2008-12-18 15:16:59.000000000 +0100
+++ /var/tmp/diff_new_pack.zD8478/_new 2008-12-18 15:16:59.000000000 +0100
@@ -351,9 +351,13 @@
;;
try-powerdown)
## Special command: Instruct UPS to shutdown, if halt is running
- ## and power is failing. Otherwise silently quit.
- if test "$RUNLEVEL" = "0" -a -n "$POWERDOWNFLAG" -a -f "$POWERDOWNFLAG"
; then
- exec $0 powerdown
+ ## or variable UPSD_POWERDOWN_CONDITION is set and power is failing.
+ ## Otherwise silently quit.
+ ##
+ if test "$RUNLEVEL" = "0" -o -n "$UPSD_POWERDOWN_CONDITION" ; then
+ if test -n "$POWERDOWNFLAG" -a -f "$POWERDOWNFLAG" ; then
+ exec $0 powerdown
+ fi
fi
;;
*)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |