[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

upload of uswsusp to t-p-u



Hi,

I would want to get permission to upload a new version of uswsusp to t-p-u.

It fixes bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411727
which I tagged grave. 

The problem is that d-i uses a different naming scheme for device nodes
than the default install. This means all entries in /proc/swaps have
names that will have no meaning after the first reboot, hence uswsusp
ends up in a none-functioning state. All users of the laptop-task with
an amd64 or i386 arch can't hibernate with their fresh system. Only
after they realize what is wrong and they've run dpkg-reconfigure
uswsusp they can hibernate again.

Fortunately d-i can 'translate' to the normal naming scheme and writes
out a file with a valid swap partition in /target. The updated package
uses this to write out a valid config file.

Updated packages can be found at 

http://www.famdijkstra.org/~tdykstra/debian/uswsusp/uswsusp_0.3~cvs20060928-7_i386.changes

I can probably find a sponsor quite fast when needed, but if anyone
from the release team could do the upload, that would be great.

BTW, this only involves amd64 and i386. I've tested this in a d-i qemu
instance.

The interdiff with the current version in etch is:

+uswsusp (0.3~cvs20060928-7) testing-proposed-updates; urgency=high
+
+  * Work around the fact that d-i uses devfs style naming for device nodes
+    (closes: #411727)
+
+ -- Tim Dijkstra <tim@famdijkstra.org>  Fri, 16 Mar 2007 22:13:33 +0100
+
 uswsusp (0.3~cvs20060928-6) unstable; urgency=high

   * Make suspend-keygen not fail on large keys (closes: #401102)
diff -u uswsusp-0.3~cvs20060928/debian/uswsusp.config uswsusp-0.3~cvs20060928/debian/uswsusp.config
--- uswsusp-0.3~cvs20060928/debian/uswsusp.config
+++ uswsusp-0.3~cvs20060928/debian/uswsusp.config
@@ -74,7 +74,24 @@
 db_get uswsusp/resume_device
 USERSWAP=$RET

-if [ -n "$USERSWAP" ] && ! echo "$SWAPLIST" | grep -q -e '\(^\|,\)'$USERSWAP'\(,\|$\)'; then
+# The only sane way to get a 'translated' device node name under d-i for
+# etch, is to use the RESUME parameter written to
+# /target/etc/initramfs-tools/conf.d/resume. We will add whatever we find
+# there and set it as the default.
+if [ -z "$USERSWAP" ] && [ -f /etc/initramfs-tools/conf.d/resume ]; then
+    USERSWAP=`sed 's/^[[:space:]]*RESUME[[:space:]]*=[[:space:]]*//' /etc/initramfs-tools/conf.d/resume`
+
+    # This is the only d-i related hack. We add the partition we just
+    # found to the list of valid swaps without checking. This is because
+    # what is in /proc/swaps uses devfs style naming...
+    if [ -n "$USERSWAP" ] && ! echo "$SWAPLIST" | grep -q -e '\(^\|, \)'$USERSWAP'\(,\|$\)'; then
+       SWAPLIST=${SWAPLIST}${KOMMA}${USERSWAP}
+       SWAPDEFAULT=${USERSWAP}
+    fi
+fi
+
+
+if [ -n "$USERSWAP" ] && ! echo "$SWAPLIST" | grep -q -e '\(^\|, \)'$USERSWAP'\(,\|$\)'; then
     db_input critical uswsusp/continue_without_swap || true
     db_get uswsusp/continue_without_swap
     if [ "$RET" = "true" ]; then



Reply to: