[arch-commits] Commit in hibernate-script/repos (6 files)

Thomas Baechler thomas at archlinux.org
Fri Aug 29 05:35:55 EDT 2008


    Date: Friday, August 29, 2008 @ 05:35:55
  Author: thomas
Revision: 10563

Merged revisions 2-10562 via svnmerge from 
svn+ssh://archlinux.org/home/svn-packages/hibernate-script/trunk

........
  r356 | aaron | 2008-04-19 00:56:27 +0200 (Sa, 19 Apr 2008) | 1 line
  
  Added svn:keywords to all PKGBUILDs
........
  r10562 | thomas | 2008-08-29 11:35:37 +0200 (Fr, 29 Aug 2008) | 1 line
  
  upgpkg: hibernate-script 1.99-1
........

Added:
  hibernate-script/repos/extra-x86_64/add-freedesktop.org-locking.patch
    (from rev 10562, hibernate-script/trunk/add-freedesktop.org-locking.patch)
  hibernate-script/repos/extra-x86_64/hibernate-script-1.99-arch.patch
    (from rev 10562, hibernate-script/trunk/hibernate-script-1.99-arch.patch)
Modified:
  hibernate-script/repos/extra-x86_64/	(properties)
  hibernate-script/repos/extra-x86_64/PKGBUILD
  hibernate-script/repos/extra-x86_64/hibernate.rc
Deleted:
  hibernate-script/repos/extra-x86_64/hibernate-script-1.96-arch.patch

-----------------------------------+
 PKGBUILD                          |   27 +++++++-----
 add-freedesktop.org-locking.patch |   67 ++++++++++++++++++++++++++++++
 hibernate-script-1.96-arch.patch  |   78 ------------------------------------
 hibernate-script-1.99-arch.patch  |   54 ++++++++++++++++++++++++
 hibernate.rc                      |   12 ++---
 5 files changed, 143 insertions(+), 95 deletions(-)


Property changes on: hibernate-script/repos/extra-x86_64
___________________________________________________________________
Name: svnmerge-integrated
   - /hibernate-script/trunk:1
   + /hibernate-script/trunk:1-10562

Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2008-08-29 09:35:37 UTC (rev 10562)
+++ extra-x86_64/PKGBUILD	2008-08-29 09:35:55 UTC (rev 10563)
@@ -2,30 +2,35 @@
 # Maintainer: Thomas Baechler <thomas at archlinux.org>
 
 pkgname=hibernate-script
-pkgver=1.96
-pkgrel=2
-pkgdesc="Scripts needed for software suspend aka hibernate"
+pkgver=1.99
+pkgrel=1
+pkgdesc="Set of scripts for managing tux on ice, hibernation and suspend to RAM"
+depends=('bash' 'kbd')
 arch=(i686 x86_64)
 options=(!strip)
+license=('GPL')
 backup=('etc/hibernate/hibernate.conf' 'etc/hibernate/suspend2.conf' \
         'etc/hibernate/disk.conf' 'etc/hibernate/ram.conf' \
         'etc/hibernate/common.conf' 'etc/hibernate/blacklisted-modules' \
         'etc/hibernate/ususpend-both.conf' 'etc/hibernate/sysfs-ram.conf' \
         'etc/hibernate/ususpend-ram.conf' 'etc/hibernate/sysfs-disk.conf' \
         'etc/hibernate/ususpend-disk.conf')
-url="http://www.suspend2.net"
-source=(http://www.suspend2.net/downloads/all/hibernate-script-$pkgver.tar.gz \
-        hibernate-script-${pkgver}-arch.patch hibernate.rc)
-md5sums=('1ca5fc5505131c0fa08cfcc1caf39b0f'
-         '92893c780fdf1820c8f9e55294d2ac7f'
-         '7e470bc1f8090c41f57f50b63aba6d29')
-depends=(bash kbd)
+url="http://www.tuxonice.net"
+source=(http://www.tuxonice.net/downloads/all/${pkgname}-${pkgver}.tar.gz
+        hibernate-script-${pkgver}-arch.patch
+        hibernate.rc
+        add-freedesktop.org-locking.patch)
+md5sums=('11832e77edc4a13330aaced8cea52dfb'
+         '2e6dba2c90e90952b8b1f167045c38e6'
+         '5d7e83902a00bf72b1de97a5450a558e'
+         '626f4cf975b0ad4bd51245ca679943fe')
+                  
 
-
 build() {
   cd $startdir/src/hibernate-script-$pkgver
   # Fix scriptlets to work properly with Archlinux
   patch -Np1 -i ../hibernate-script-${pkgver}-arch.patch || return 1
+  patch -Np1 -i ../add-freedesktop.org-locking.patch || return 1
   export BASE_DIR=${startdir}/pkg
   export PREFIX=/usr
   mkdir -p $startdir/pkg/etc/{rc,logrotate}.d

Copied: hibernate-script/repos/extra-x86_64/add-freedesktop.org-locking.patch (from rev 10562, hibernate-script/trunk/add-freedesktop.org-locking.patch)
===================================================================
--- extra-x86_64/add-freedesktop.org-locking.patch	                        (rev 0)
+++ extra-x86_64/add-freedesktop.org-locking.patch	2008-08-29 09:35:55 UTC (rev 10563)
@@ -0,0 +1,67 @@
+diff -Nur hibernate-script-1.99.orig/common.conf hibernate-script-1.99/common.conf
+--- hibernate-script-1.99.orig/common.conf	2008-05-01 13:59:58.000000000 +0200
++++ hibernate-script-1.99/common.conf	2008-08-29 11:31:55.000000000 +0200
+@@ -75,9 +75,11 @@
+ ## For kde you need dcop, kscreensaver available.
+ ## For XAuto you need xautolock available.
+ ## For Xtr you need xtrlock available.
++## For Freedesktop (for example KDE4) you need dbus-send available
+ # LockConsoleAs root
+ # LockXScreenSaver yes
+ # LockGnomeScreenSaver yes
++# LockFreedesktop
+ # LockKDE yes
+ # LockXLock yes
+ # LockXAutoLock yes
+diff -Nur hibernate-script-1.99.orig/scriptlets.d/lock hibernate-script-1.99/scriptlets.d/lock
+--- hibernate-script-1.99.orig/scriptlets.d/lock	2008-05-01 14:00:21.000000000 +0200
++++ hibernate-script-1.99/scriptlets.d/lock	2008-08-29 11:32:43.000000000 +0200
+@@ -3,6 +3,7 @@
+ 
+ AddConfigHandler LockOptions
+ AddConfigHelp "LockKDE <boolean>" "Lock all local KDE sessions before suspending."
++AddConfigHelp "LockFreedesktop <boolean>" "Lock all local sessions compatible with freedesktop.org screensaver interface before suspending."
+ AddConfigHelp "LockXScreenSaver <boolean>" "Lock all local X11 sessions with xscreensaver running before suspending."
+ AddConfigHelp "LockGnomeScreenSaver <boolean>" "Lock all local X11 sessions with gnome-screensaver running before suspending."
+ AddConfigHelp "LockXLock <boolean>" "Lock active X11 session using xlock."
+@@ -14,6 +15,22 @@
+ AddLongOption 'lock-console-as:'
+ AddOptionHelp '--lock-console-as <username>' 'Uses vlock to lock the entire system after resuming, requirng you to enter the password for the given user to unlock it. This overrides any username given in the configuration file. (Requires vlock)'
+ 
++LockFreedesktop() {
++    [ x"$LOCK_FREEDESKTOP" != "x1" ] && return 0
++
++    for userdir in /home/*; do
++        user="$(basename $userdir)"
++        for session in /home/$user/.dbus/session-bus/*; do
++            if [ -e "$session" ]; then
++                . $session
++                su -c "dbus-send --session --dest=org.freedesktop.ScreenSaver --type=method_call /ScreenSaver org.freedesktop.ScreenSaver.Lock" "$user"
++            fi
++        done
++    done
++
++    return 0
++}
++
+ LockKDE() {
+     [ x"$LOCK_KDE" != "x1" ] && return 0
+ 
+@@ -350,6 +367,17 @@
+ 		LOCK_KDE=0
+ 	    fi
+ 	    ;;
++	lockfreedesktop)
++	    if BoolIsOn "$1" "$2" ; then
++		LOCK_FREEDESKTOP=1
++		if [ -z "$FREEDESKTOPLOCK_HOOKED" ] ; then
++		    AddSuspendHook 91 LockFreedesktop
++		    FREEDESKTOPLOCK_HOOKED=1
++		fi
++	    else
++		LOCK_FREEDESKTOP=0
++	    fi
++	    ;;
+ 	lockxscreensaver)
+ 	    if BoolIsOn "$1" "$2" ; then 
+ 		LOCK_XSCREENSAVER=1

Deleted: extra-x86_64/hibernate-script-1.96-arch.patch
===================================================================
--- extra-x86_64/hibernate-script-1.96-arch.patch	2008-08-29 09:35:37 UTC (rev 10562)
+++ extra-x86_64/hibernate-script-1.96-arch.patch	2008-08-29 09:35:55 UTC (rev 10563)
@@ -1,78 +0,0 @@
-diff -Nur hibernate-script-1.96.orig/common.conf hibernate-script-1.96/common.conf
---- hibernate-script-1.96.orig/common.conf	2007-07-16 14:32:41.000000000 +0200
-+++ hibernate-script-1.96/common.conf	2007-08-26 17:44:47.000000000 +0200
-@@ -14,7 +14,7 @@
- # AlwaysForce yes
- # AlwaysKill yes
- # HibernateVT 15
--# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
-+Distribution arch
- # XDisplay :0
- 
- ##############################################################################
-diff -Nur hibernate-script-1.96.orig/scriptlets.d/hardware_tweaks hibernate-script-1.96/scriptlets.d/hardware_tweaks
---- hibernate-script-1.96.orig/scriptlets.d/hardware_tweaks	2007-07-16 14:33:09.000000000 +0200
-+++ hibernate-script-1.96/scriptlets.d/hardware_tweaks	2007-08-26 17:44:47.000000000 +0200
-@@ -86,7 +86,7 @@
-     local action
-     action=start
-     [ "$DISTRIBUTION" = "gentoo" ] && action=restart
--    /etc/init.d/915resolution $action || return 1
-+    /etc/rc.d/915resolution $action || return 1
-     return 0
- }
- 
-diff -Nur hibernate-script-1.96.orig/scriptlets.d/network hibernate-script-1.96/scriptlets.d/network
---- hibernate-script-1.96.orig/scriptlets.d/network	2007-07-16 14:33:09.000000000 +0200
-+++ hibernate-script-1.96/scriptlets.d/network	2007-08-26 17:44:47.000000000 +0200
-@@ -90,6 +90,14 @@
- NetworkDetectDistro() {
-     # Use either a given $DISTRIBUTION or autodetect one.
-     case "$DISTRIBUTION" in
-+	arch)
-+	    network_ifup() {
-+	    	/etc/rc.d/network ifup $1
-+	    }
-+	    network_ifdown() {
-+	    	/etc/rc.d/network ifdown $1
-+	    }
-+	    ;;
- 	gentoo)
- 	    network_ifup() {
- 	    	[ -x "/etc/init.d/net.$1" ] && /etc/init.d/net.$1 start
-diff -Nur hibernate-script-1.96.orig/scriptlets.d/services hibernate-script-1.96/scriptlets.d/services
---- hibernate-script-1.96.orig/scriptlets.d/services	2007-07-16 14:33:09.000000000 +0200
-+++ hibernate-script-1.96/scriptlets.d/services	2007-08-26 17:44:47.000000000 +0200
-@@ -75,7 +75,7 @@
- 	debian|ubuntu|redhat|fedora)
- 	    INITDIR=/etc/init.d
- 	    ;;
--	slackware)
-+	slackware|arch)
- 	    INITDIR=/etc/rc.d
- 	    ;;
-     	*)
-diff -Nur hibernate-script-1.96.orig/scriptlets.d/suspend2 hibernate-script-1.96/scriptlets.d/suspend2
---- hibernate-script-1.96.orig/scriptlets.d/suspend2	2007-07-16 14:33:09.000000000 +0200
-+++ hibernate-script-1.96/scriptlets.d/suspend2	2007-08-26 17:45:49.000000000 +0200
-@@ -107,6 +107,8 @@
-     SWSUSP_DEFAULT_ALL_SETTINGS_FILE="$SWSUSP_D/swsusp2-all-settings.conf"
-     HIBERNATE_FILEWRITER_TRAIL="/var/run/suspend2_filewriter_image_exists"
- 
-+    RESUME_FILE="resume2"
-+
-     if [ -n "$NO_COMPLAIN_UNSUPPORTED" ] ; then
- 	# Just bail silently if we don't detect it.
- 	[ -d "$SWSUSP_ROOT" ] || return 0
-diff -Nur hibernate-script-1.96.orig/suspend2.conf hibernate-script-1.96/suspend2.conf
---- hibernate-script-1.96.orig/suspend2.conf	2007-07-16 14:32:41.000000000 +0200
-+++ hibernate-script-1.96/suspend2.conf	2007-08-26 17:44:47.000000000 +0200
-@@ -37,7 +37,7 @@
- # VerifyFilewriterResume2 yes
- 
- ## Specify a userui like this:
--# ProcSetting userui_program /usr/local/sbin/suspend2ui_text
-+# ProcSetting userui_program /usr/sbin/tuxoniceui_text
- 
- # Scale CPU to full speed to make sure we suspend as fast as possible.
- FullSpeedCPU yes

Copied: hibernate-script/repos/extra-x86_64/hibernate-script-1.99-arch.patch (from rev 10562, hibernate-script/trunk/hibernate-script-1.99-arch.patch)
===================================================================
--- extra-x86_64/hibernate-script-1.99-arch.patch	                        (rev 0)
+++ extra-x86_64/hibernate-script-1.99-arch.patch	2008-08-29 09:35:55 UTC (rev 10563)
@@ -0,0 +1,54 @@
+diff -Nur hibernate-script-1.96.orig/common.conf hibernate-script-1.96/common.conf
+--- hibernate-script-1.96.orig/common.conf	2007-07-16 14:32:41.000000000 +0200
++++ hibernate-script-1.96/common.conf	2007-08-26 17:44:47.000000000 +0200
+@@ -14,7 +14,7 @@
+ # AlwaysForce yes
+ # AlwaysKill yes
+ # HibernateVT 15
+-# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
++Distribution arch
+ # XDisplay :0
+ 
+ ##############################################################################
+diff -Nur hibernate-script-1.96.orig/scriptlets.d/hardware_tweaks hibernate-script-1.96/scriptlets.d/hardware_tweaks
+--- hibernate-script-1.96.orig/scriptlets.d/hardware_tweaks	2007-07-16 14:33:09.000000000 +0200
++++ hibernate-script-1.96/scriptlets.d/hardware_tweaks	2007-08-26 17:44:47.000000000 +0200
+@@ -86,7 +86,7 @@
+     local action
+     action=start
+     [ "$DISTRIBUTION" = "gentoo" ] && action=restart
+-    /etc/init.d/915resolution $action || return 1
++    /etc/rc.d/915resolution $action || return 1
+     return 0
+ }
+ 
+diff -Nur hibernate-script-1.96.orig/scriptlets.d/network hibernate-script-1.96/scriptlets.d/network
+--- hibernate-script-1.96.orig/scriptlets.d/network	2007-07-16 14:33:09.000000000 +0200
++++ hibernate-script-1.96/scriptlets.d/network	2007-08-26 17:44:47.000000000 +0200
+@@ -90,6 +90,14 @@
+ NetworkDetectDistro() {
+     # Use either a given $DISTRIBUTION or autodetect one.
+     case "$DISTRIBUTION" in
++	arch)
++	    network_ifup() {
++	    	/etc/rc.d/network ifup $1
++	    }
++	    network_ifdown() {
++	    	/etc/rc.d/network ifdown $1
++	    }
++	    ;;
+ 	gentoo)
+ 	    network_ifup() {
+ 	    	[ -x "/etc/init.d/net.$1" ] && /etc/init.d/net.$1 start
+diff -Nur hibernate-script-1.96.orig/scriptlets.d/services hibernate-script-1.96/scriptlets.d/services
+--- hibernate-script-1.96.orig/scriptlets.d/services	2007-07-16 14:33:09.000000000 +0200
++++ hibernate-script-1.96/scriptlets.d/services	2007-08-26 17:44:47.000000000 +0200
+@@ -75,7 +75,7 @@
+ 	debian|ubuntu|redhat|fedora)
+ 	    INITDIR=/etc/init.d
+ 	    ;;
+-	slackware)
++	slackware|arch)
+ 	    INITDIR=/etc/rc.d
+ 	    ;;
+     	*)

Modified: extra-x86_64/hibernate.rc
===================================================================
--- extra-x86_64/hibernate.rc	2008-08-29 09:35:37 UTC (rev 10562)
+++ extra-x86_64/hibernate.rc	2008-08-29 09:35:55 UTC (rev 10563)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 . /etc/rc.conf
 . /etc/rc.d/functions
@@ -24,7 +24,7 @@
 	where=$1
 	wason=
 	swapoff $where 2>/dev/null && wason=yes
-	mkswap $where > /dev/null || msg_status " (failed: $?)"
+	mkswap $where > /dev/null || stat_append " (failed: $?)"
 	[ -n "$wason" ] && swapon $where
 }
 
@@ -33,10 +33,10 @@
 	while read  where what type rest ; do
 		test "$type" = "swap" || continue
 		case "$(dd if=$where bs=1 count=6 skip=4086 2>/dev/null)" in
-			S1SUSP|S2SUSP|pmdisk|[zZ]*)
-				msg_status "$where"
+			S1SUSP|S2SUSP|ULSUSP|pmdisk|[zZ]*)
+				stat_append "$where"
 				clear_swap $where
-				msg_status ", "
+				stat_append ", "
 		esac
 	done < /etc/fstab
 }
@@ -49,7 +49,7 @@
 	case "`dd \"if=$target\" bs=8 count=1 2>/dev/null`" in
 		HaveImag)
 			/bin/echo -ne "Suspend2\n\0\0" | dd "of=$target" bs=11 count=1 conv=notrunc 2>/dev/null
-			msg_status -n "$target, "
+			stat_append -n "$target, "
 			rm -f $HIBERNATE_FILEWRITER_TRAIL
 	esac
 }




More information about the arch-commits mailing list