Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Andraž Levstik (dfe492c87bd9a4e4145727975a6526ff1e2d014a)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andraž Levstik <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Andraž Levstik (dfe492c87bd9a4e4145727975a6526ff1e2d014a)
  • Date: Fri, 3 Apr 2009 13:17:32 -0500

GIT changes to master grimoire by Andraž Levstik <ruskie AT codemages.net>:

kernels/hibernate-script/DETAILS | 14 +-
kernels/hibernate-script/HISTORY | 11 ++
kernels/hibernate-script/INSTALL | 25 +----
kernels/hibernate-script/PRE_BUILD | 12 +-
kernels/hibernate-script/hibernate.diff | 11 ++
kernels/hibernate-script/install.sh.patch | 78 ++++++++++++++++
kernels/hibernate-script/scriptlets.d.diff | 102
+++++++++++++++++++++
kernels/hibernate-script/sourcemage-config.patch | 12 --
kernels/hibernate-script/sourcemage-help.patch | 11 --
kernels/hibernate-script/sourcemage-services.patch | 34 -------
10 files changed, 220 insertions(+), 90 deletions(-)

New commits:
commit dfe492c87bd9a4e4145727975a6526ff1e2d014a
Author: Andraž Levstik <ruskie AT codemages.net>
Commit: Andraž Levstik <ruskie AT codemages.net>

hibernate-script: update to 2.0, removed and updated patches and sent
them upstream

diff --git a/kernels/hibernate-script/DETAILS
b/kernels/hibernate-script/DETAILS
index 14e17f4..7282757 100755
--- a/kernels/hibernate-script/DETAILS
+++ b/kernels/hibernate-script/DETAILS
@@ -1,19 +1,15 @@
SPELL=hibernate-script
- VERSION=1.99
+ VERSION=2.0
SOURCE=$SPELL-$VERSION.tar.gz
+ SOURCE_URL[0]=http://www.tuxonice.net/downloads/all/${SOURCE}
+
SOURCE_HASH=sha512:625efdf8bd8561dd9ab93c09436f2fb93edef2fbb0fb2d259727bacffab0b7bd4a6c99d445131390883be75658f6dd28f329fdaf4f03a7d218c0021223ac1a1e
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
- SOURCE_URL[0]=http://www.suspend2.net/downloads/all/$SOURCE
- SOURCE_URL[1]=http://au-mirror.suspend2.net/downloads/all/$SOURCE
- SOURCE_URL[2]=http://nl-mirror.suspend2.net/downloads/all/$SOURCE
- SOURCE_URL[3]=http://at-mirror.suspend2.net/downloads/all/$SOURCE
-
SOURCE_HASH[0]=sha512:a8f359e2cd39f8522baafc35d5b0b6944ea8444d44b71651d0d7a1833aa3882191197752498bc2d944b406fbe1e8f080d439c7bde4260dd066a8713593cbbc37
- WEB_SITE=http://www.suspend2.net/
+ WEB_SITE="http://www.tuxonice.net/";
ENTERED=20050720
- PATCHLEVEL=1
LICENSE[0]=GPL
DOCS='CHANGELOG COPYING README SCRIPTLET-API TODO'
KEYWORDS="kernels"
- SHORT='machine suspend scripts'
+ SHORT="Tux On Ice Hibernate script"
cat << EOF
The hibernate-script package offers a utility that performs all the
preparatory
steps to suspending your machine, invoking the desired suspend method (either
diff --git a/kernels/hibernate-script/HISTORY
b/kernels/hibernate-script/HISTORY
index f714521..02be1c3 100644
--- a/kernels/hibernate-script/HISTORY
+++ b/kernels/hibernate-script/HISTORY
@@ -1,3 +1,14 @@
+2009-04-03 Andraž "ruskie" Levstik <ruskie AT mages.ath.cx>
+ * DETAILS: update to 2.00
+ * INSTALL: use modified install.sh
+ * PRE_BUILD: fresh patches that went up
+ * sourcemage-config.patch: removed
+ * sourcemage-help.patch: removed
+ * sourcemage-services.patch: removed
+ * hibernate.diff: Source Mage support upstream reported
+ * scriptlets.d.diff: Source Mage support upstream reported
+ * install.sh.patch: fixed to not install config files
+
2009-01-26 David Kowis <dkowis AT shlrm.org>
* DETAILS: version to 1.99

diff --git a/kernels/hibernate-script/INSTALL
b/kernels/hibernate-script/INSTALL
index 896acd9..8af5347 100755
--- a/kernels/hibernate-script/INSTALL
+++ b/kernels/hibernate-script/INSTALL
@@ -1,19 +1,6 @@
-#
-# Could use ./install.sh, but then we wouldn't get
-# the protection of install_config_file
-#
-mkdir -p $INSTALL_ROOT/usr/share/hibernate &&
-# cd there not always necessary?
-cd $SOURCE_DIRECTORY &&
-install -o root -g root -m 0755 hibernate.sh \
- $INSTALL_ROOT/usr/sbin/hibernate &&
-
-local CONFIG_FILE
-
-for CONFIG_FILE in *.conf; do
- install_config_file $CONFIG_FILE \
- $INSTALL_ROOT/etc/hibernate/$CONFIG_FILE
-done &&
-cp -r hibernate.vim scriptlets.d $INSTALL_ROOT/usr/share/hibernate &&
-cp hibernate.8 $INSTALL_ROOT/usr/share/man/man8 &&
-cp hibernate.conf.5 $INSTALL_ROOT/usr/share/man/man5
+mkdir -vp $INSTALL_ROOT/etc/hibernate &&
+PREFIX=$INSTALL_ROOT/usr MAN_DIR=$INSTALL_ROOT/usr/share/man sh install.sh &&
+local configfile &&
+for configfile in *.conf ; do
+install_config_file $configfile $INSTALL_ROOT/etc/hibernate/$configfile
+done
diff --git a/kernels/hibernate-script/PRE_BUILD
b/kernels/hibernate-script/PRE_BUILD
index 268208e..03e7950 100755
--- a/kernels/hibernate-script/PRE_BUILD
+++ b/kernels/hibernate-script/PRE_BUILD
@@ -1,5 +1,7 @@
-default_pre_build &&
-cd $SOURCE_DIRECTORY &&
-patch -p0 < $SCRIPT_DIRECTORY/sourcemage-config.patch &&
-patch -p0 < $SCRIPT_DIRECTORY/sourcemage-help.patch &&
-patch -p1 < $SCRIPT_DIRECTORY/sourcemage-services.patch
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+patch -p0 < $SPELL_DIRECTORY/install.sh.patch &&
+patch -p0 < $SPELL_DIRECTORY/hibernate.diff &&
+patch -p0 < $SPELL_DIRECTORY/scriptlets.d.diff &&
+sed -i -e "s/^# \\(Distribution\\) .*/\1 sourcemage/" common.conf
+
diff --git a/kernels/hibernate-script/hibernate.diff
b/kernels/hibernate-script/hibernate.diff
new file mode 100644
index 0000000..3cc8b38
--- /dev/null
+++ b/kernels/hibernate-script/hibernate.diff
@@ -0,0 +1,11 @@
+--- hibernate.sh 2009-04-03 19:31:10.000000000 +0200
++++ hibernate.sh 2009-04-03 19:31:21.000000000 +0200
+@@ -753,7 +753,7 @@
+ AddConfigHelp "LogVerbosity N" "Same as Verbosity, but controls what is
written to the logfile."
+ AddConfigHelp "AlwaysForce <boolean>" "If set to yes, the script will
always run as if --force had been passed."
+ AddConfigHelp "AlwaysKill <boolean>" "If set to yes, the script will
always run as if --kill had been passed."
+- AddConfigHelp "Distribution
<debian|fedora|mandrake|redhat|gentoo|suse|slackware>" "If specified, tweaks
some scriptlets to be more integrated with the given distribution."
++ AddConfigHelp "Distribution
<debian|fedora|mandrake|redhat|gentoo|suse|slackware|sourcemage>" "If
specified, tweaks some scriptlets to be more integrated with the given
distribution."
+ AddConfigHelp "Include <filename>" "Immediately include configuration
directives from the given file."
+ AddConfigHelp "XDisplay <display location>" "Specifies where scriptlets
that use the X server should find one. (Default: :0)"
+ }
diff --git a/kernels/hibernate-script/install.sh.patch
b/kernels/hibernate-script/install.sh.patch
new file mode 100644
index 0000000..08bcb16
--- /dev/null
+++ b/kernels/hibernate-script/install.sh.patch
@@ -0,0 +1,78 @@
+--- install.sh.orig 2009-04-02 19:03:31.000000000 +0200
++++ install.sh 2009-04-02 19:05:55.000000000 +0200
+@@ -32,30 +32,30 @@
+ mkdir -p `dirname $SCRIPT_DEST`
+ cp -a hibernate.sh $SCRIPT_DEST
+
+-echo "Installing configuration files to $CONFIG_DIR ..."
+-mkdir -p $CONFIG_DIR
+-# We assume that if hibernate.conf does not exist, no config files do.
+-# Let a package management system figure this one out.
+-if [ -f $CONFIG_FILE ] ; then
+- ext=.dist
+- echo " **"
+- echo " ** You already have a configuration file at $CONFIG_FILE"
+- echo " ** The new version will be installed to ${CONFIG_FILE}${ext}"
+- echo " **"
+- EXISTING_CONFIG=1
+-else
+- ext=
+-fi
+-cp -a hibernate.conf ${CONFIG_FILE}${ext}
+-cp -a ram.conf ${RAM_CONFIG_FILE}${ext}
+-cp -a disk.conf ${DISK_CONFIG_FILE}${ext}
+-cp -a tuxonice.conf ${S2_CONFIG_FILE}${ext}
+-cp -a ususpend-ram.conf ${US_RAM_CONFIG_FILE}${ext}
+-cp -a ususpend-disk.conf ${US_DISK_CONFIG_FILE}${ext}
+-cp -a ususpend-both.conf ${US_BOTH_CONFIG_FILE}${ext}
+-cp -a sysfs-ram.conf ${SYSFS_RAM_CONFIG_FILE}${ext}
+-cp -a sysfs-disk.conf ${SYSFS_DISK_CONFIG_FILE}${ext}
+-cp -a common.conf ${COMMON_CONFIG_FILE}${ext}
++#echo "Installing configuration files to $CONFIG_DIR ..."
++#mkdir -p $CONFIG_DIR
++## We assume that if hibernate.conf does not exist, no config files do.
++## Let a package management system figure this one out.
++#if [ -f $CONFIG_FILE ] ; then
++# ext=.dist
++# echo " **"
++# echo " ** You already have a configuration file at $CONFIG_FILE"
++# echo " ** The new version will be installed to ${CONFIG_FILE}${ext}"
++# echo " **"
++# EXISTING_CONFIG=1
++#else
++# ext=
++#fi
++#cp -a hibernate.conf ${CONFIG_FILE}${ext}
++#cp -a ram.conf ${RAM_CONFIG_FILE}${ext}
++#cp -a disk.conf ${DISK_CONFIG_FILE}${ext}
++#cp -a tuxonice.conf ${S2_CONFIG_FILE}${ext}
++#cp -a ususpend-ram.conf ${US_RAM_CONFIG_FILE}${ext}
++#cp -a ususpend-disk.conf ${US_DISK_CONFIG_FILE}${ext}
++#cp -a ususpend-both.conf ${US_BOTH_CONFIG_FILE}${ext}
++#cp -a sysfs-ram.conf ${SYSFS_RAM_CONFIG_FILE}${ext}
++#cp -a sysfs-disk.conf ${SYSFS_DISK_CONFIG_FILE}${ext}
++#cp -a common.conf ${COMMON_CONFIG_FILE}${ext}
+
+ if [ -n "$DISTRIBUTION" ] ; then
+ sed -i -e "s/^# \\(Distribution\\) .*/\1 $DISTRIBUTION/"
${COMMON_CONFIG_FILE}${ext}
+@@ -105,13 +105,13 @@
+
+ echo "Installed."
+ echo
+-if [ -z "$EXISTING_CONFIG" ] ; then
+- echo "Edit $CONFIG_FILE to taste, and see `basename $SCRIPT_DEST` -h
for help."
+-else
+- echo "You may want to merge $CONFIG_FILE with"
+- echo "$CONFIG_FILE.dist"
+- echo "See `basename $SCRIPT_DEST` -h for help on any extra options."
+-fi
++#if [ -z "$EXISTING_CONFIG" ] ; then
++# echo "Edit $CONFIG_FILE to taste, and see `basename $SCRIPT_DEST` -h
for help."
++#else
++# echo "You may want to merge $CONFIG_FILE with"
++# echo "$CONFIG_FILE.dist"
++# echo "See `basename $SCRIPT_DEST` -h for help on any extra options."
++#fi
+
+
+
diff --git a/kernels/hibernate-script/scriptlets.d.diff
b/kernels/hibernate-script/scriptlets.d.diff
new file mode 100644
index 0000000..231cad0
--- /dev/null
+++ b/kernels/hibernate-script/scriptlets.d.diff
@@ -0,0 +1,102 @@
+diff -Nuar scriptlets.d.orig/clock scriptlets.d/clock
+--- scriptlets.d.orig/clock 2009-04-02 20:58:49.000000000 +0200
++++ scriptlets.d/clock 2009-04-02 21:01:22.000000000 +0200
+@@ -12,6 +12,9 @@
+ gentoo)
+ /etc/init.d/clock.sh stop > /dev/null 2>&1
+ ;;
++ sourcemage)
++ /sbin/telinit run hwclock.sh stop > /dev/null 2>&1
++ ;;
+ *)
+ if ! /sbin/hwclock $DIRECTISA --systohc ; then
+ echo "$EXE: Failed to save system clock - continuing anyway"
+@@ -29,6 +32,9 @@
+ gentoo)
+ /etc/init.d/clock.sh start > /dev/null 2>&1
+ ;;
++ sourcemage)
++ /sbin/telinit run hwclock.sh start > /dev/null 2>&1
++ ;;
+ *)
+ if ! /sbin/hwclock $DIRECTISA --hctosys ; then
+ echo "$EXE: Failed to restore system clock."
+@@ -51,6 +57,10 @@
+ echo "$EXE: Options for hwclock should be set in
/etc/init.d/hwclock.sh"
+ exit 1
+ ;;
++ sourcemage)
++ echo "$EXE: Options for hwclock should be set in
/etc/sysconfig/hwclock"
++ exit 1
++ ;;
+ *)
+ DIRECTISA="--directisa"
+ ;;
+diff -Nuar scriptlets.d.orig/lockfile scriptlets.d/lockfile
+--- scriptlets.d.orig/lockfile 2009-04-02 20:58:49.000000000 +0200
++++ scriptlets.d/lockfile 2009-04-03 19:06:26.000000000 +0200
+@@ -78,7 +78,10 @@
+
+ # CheckRunlevel: Verify we're not shutting down or rebooting mid-suspend.
+ CheckRunlevel() {
+- [ -z "${RUNLEVEL}" ] && RUNLEVEL=$(/sbin/runlevel | awk '{print $2}')
++ case $DISTRIBUTION in
++ sourcemage)[ -z "${RUNLEVEL}" ] && RUNLEVEL=$(telinit runlevel) ;;
++ *)[ -z "${RUNLEVEL}" ] && RUNLEVEL=$(/sbin/runlevel | awk
'{print $2}');;
++ esac
+ case "${RUNLEVEL}" in
+ 0|6) # shutdown ongoing, emergency abort
+ vecho 0 "System ongoing shutdown by runlevel, aborting
hibernation."
+diff -Nuar scriptlets.d.orig/network scriptlets.d/network
+--- scriptlets.d.orig/network 2009-04-02 20:58:49.000000000 +0200
++++ scriptlets.d/network 2009-04-02 21:02:50.000000000 +0200
+@@ -116,7 +116,7 @@
+ /sbin/ifdown $*
+ }
+ ;;
+- mandrake|fedora|redhat)
++ mandrake|fedora|redhat|sourcemage)
+ network_ifup() {
+ /sbin/ifup $*
+ }
+diff -Nuar scriptlets.d.orig/services scriptlets.d/services
+--- scriptlets.d.orig/services 2009-04-02 20:58:49.000000000 +0200
++++ scriptlets.d/services 2009-04-03 19:41:21.000000000 +0200
+@@ -64,6 +64,7 @@
+ }
+
+ ServicesDetectDistro() {
++ set -x
+ # Use either a given $DISTRIBUTION or autodetect one.
+ case "$DISTRIBUTION" in
+ gentoo)
+@@ -75,6 +76,9 @@
+ debian|ubuntu|redhat|fedora)
+ INITDIR=/etc/init.d
+ ;;
++ sourcemage)
++ INITDIR=/sbin/telinit
++ ;;
+ slackware)
+ INITDIR=/etc/rc.d
+ ;;
+@@ -108,7 +112,10 @@
+ service="$1"
+ action="$2"
+ [ -x "$INITDIR/$service" ] || return 100
+- cmd="$INITDIR/$service $action"
++ case $DISTRIBUTION in
++ sourcemage) cmd="$INITDIR run $service $action" ;;
++ *) cmd="$INITDIR/$service $action" ;;
++ esac
+ if [ "$action" = "start" ] ; then
+ tmp=`echo $INITDIR/../rc${SERVICES_RUNLEVEL}.d/K??$service`
+ [ -x "$tmp" ] && return 101
+@@ -117,6 +124,7 @@
+ $cmd
+ }
+ fi
++ set +x
+ return 0
+ }
+
diff --git a/kernels/hibernate-script/sourcemage-config.patch
b/kernels/hibernate-script/sourcemage-config.patch
deleted file mode 100644
index 886dabe..0000000
--- a/kernels/hibernate-script/sourcemage-config.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- common.conf.old 2006-06-28 10:30:42.000000000 +0200
-+++ common.conf 2006-06-28 10:31:05.000000000 +0200
-@@ -14,7 +14,8 @@
- # AlwaysForce yes
- # AlwaysKill yes
- # HibernateVT 15
--# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
-+# Distribution debian (or
fedora/gentoo/mandrake/redhat/slackware/suse/sourcemage)
-+Distribution sourcemage
- # XDisplay :0
-
-
##############################################################################
diff --git a/kernels/hibernate-script/sourcemage-help.patch
b/kernels/hibernate-script/sourcemage-help.patch
deleted file mode 100644
index 0c8edca..0000000
--- a/kernels/hibernate-script/sourcemage-help.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- hibernate.sh.old 2006-06-28 10:37:41.000000000 +0200
-+++ hibernate.sh 2006-06-28 10:38:08.000000000 +0200
-@@ -702,7 +702,7 @@
- AddConfigHelp "LogVerbosity N" "Same as Verbosity, but controls what is
written to the logfile."
- AddConfigHelp "AlwaysForce <boolean>" "If set to yes, the script will
always run as if --force had been passed."
- AddConfigHelp "AlwaysKill <boolean>" "If set to yes, the script will
always run as if --kill had been passed."
-- AddConfigHelp "Distribution
<debian|fedora|mandrake|redhat|gentoo|suse|slackware>" "If specified, tweaks
some scriptlets to be more integrated with the given distribution."
-+ AddConfigHelp "Distribution
<debian|fedora|mandrake|redhat|gentoo|suse|slackware|sourcemage>" "If
specified, tweaks some scriptlets to be more integrated with the given
distribution."
- AddConfigHelp "Include <filename>" "Immediately include configuration
directives from the given file."
- AddConfigHelp "XDisplay <display location>" "Specifies where scriptlets
that use the X server should find one. (Default: :0)"
- }
diff --git a/kernels/hibernate-script/sourcemage-services.patch
b/kernels/hibernate-script/sourcemage-services.patch
deleted file mode 100644
index 3923f99..0000000
--- a/kernels/hibernate-script/sourcemage-services.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naur hibernate-script-1.10.orig/scriptlets.d/services
hibernate-script-1.10/scriptlets.d/services
---- hibernate-script-1.10.orig/scriptlets.d/services 2005-07-20
21:13:14.545868536 -0700
-+++ hibernate-script-1.10/scriptlets.d/services 2005-07-20
21:13:28.677720168 -0700
-@@ -78,6 +78,9 @@
- slackware)
- INITDIR=/etc/rc.d
- ;;
-+ sourcemage)
-+ INITDIR=/etc/init.d/runlevels
-+ ;;
- *)
- # Auto-detect
- if [ -d "/etc/init.d/" ] ; then
-@@ -99,6 +102,20 @@
- vecho 2 "Executing invoke-rc.d $@"
- invoke-rc.d "$@"
- }
-+ # Source Mage GNU/Linux uses simpleinit-msb
-+ elif [ -x /sbin/simpleinit ] ; then
-+ SERVICES_RUNLEVEL=`telinit runlevel`
-+ SERVICES_RUNLEVEL=${SERVICES_RUNLEVEL#* }
-+ InvokeRCD () {
-+ local service action cmd
-+ service="$1"
-+ action="$2"
-+ [ -f "$INITDIR/*/$service" ] || return 100
-+ cmd="telinit run $service $action"
-+ vecho 2 "Executing $cmd"
-+ $cmd
-+ }
-+
- else
- # Otherwise, emulate it.
- SERVICES_RUNLEVEL=`runlevel`



  • [SM-Commit] GIT changes to master grimoire by Andraž Levstik (dfe492c87bd9a4e4145727975a6526ff1e2d014a), Andraž Levstik, 04/03/2009

Archive powered by MHonArc 2.6.24.

Top of Page