Bug#700798: unblock: live-tools/3.0.18-1

2013-03-01 Thread Daniel Baumann
retitle 700798 live-tools/3.0.19-1
tag 700798 - moreinfo
thanks

see live-tools 3.0.19-1.

-- 
Address:Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:  daniel.baum...@progress-technologies.net
Internet:   http://people.progress-technologies.net/~daniel.baumann/


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51306d7c.9040...@progress-technologies.net



Bug#700798: unblock: live-tools/3.0.18-1

2013-02-25 Thread Ben Armstrong
On 02/24/2013 04:46 PM, Adam D. Barratt wrote:
> Even as a filtered diff, that's still a reasonably large set of
> changes. :-(

Sorry about that.

> A few comments / queries:
> 
> --- live-tools.orig/bin/live-persistence  1970-01-01 01:00:00.0 
> +0100
> +++ live-tools/bin/live-persistence   2013-02-15 10:42:34.619868805 +0100
> [...]
> 
> +Most options correspond to the persistence-* options of live-boot, and will
> +override the corresponging options parsed from the kernel command-line.
> 
> "corresponding"

Fixed in git. Thanks.

> 
> --- live-tools.orig/bin/live-update-initramfs 1970-01-01 01:00:00.0 
> +0100
> +++ live-tools/bin/live-update-initramfs  2013-02-15 09:38:30.324657057 
> +0100
> [...]
> + # FIXME: needs to exclude initrd backup files
> + if [ "$(ls /boot/initrd.img-* | wc -l)" -gt 1 ]
> + then
> + _NUMBER="1"
> +
> + for _INITRD in /boot/initrd.img-*
> 
> "FIXME"s in apparently final(ish) code always make me slightly wary.
> What's the real-world effect of the loop picking up backup files?

It would appear the intent of this code is to ensure when running in a
live system, results of a real update-initramfs are copied to the live
medium safely (i.e. copied first to ensure we have space, then renamed
to a shorter name, presumably because some supported filesystems are
limited in length of filename that is supported). If a backup filename
exists (i.e. initrd.img-* with some additional suffix), then assuming
there is no corresponding vmlinuz-* with the same suffix, the cp of that
kernel will fail and no further kernels will be processed.

Real-world effects:

- any initrd/kernel pairs for kernel versions preceding encountering the
initrd backup will have been successfully copied (at least the first
"real" initrd/kernel will have been copied)
- any initrd/kernel pairs including the backup and following will not be
copied to the live media

Please note that prior to introduction of this code, it was not possible
for users to update their kernel and initrd in a live system with
writable live media. Also, the code will not run except on a live
system. Also, the failure does not leave the system unbootable, just
without second and subsequent kernels actually updated.

Possible user recovery:

- removal of the backup files (I have not seen any of these. Who creates
such files?) should allow live-update-initramfs to operate properly

The other questions are harder. I will investigate further and get back
to you.

Thanks,
Ben


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/512b75cc.1040...@sanctuary.nslug.ns.ca



Processed: Re: Bug#700798: unblock: live-tools/3.0.18-1

2013-02-24 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + moreinfo
Bug #700798 [release.debian.org] unblock: live-tools/3.0.18-1
Added tag(s) moreinfo.

-- 
700798: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700798
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.b700798.136173882628067.transcr...@bugs.debian.org



Bug#700798: unblock: live-tools/3.0.18-1

2013-02-24 Thread Adam D. Barratt
Control: tags -1 + moreinfo

On Sun, 2013-02-17 at 12:17 -0400, Ben Armstrong wrote:
> The version in wheezy had some issues (see #685752 which this request
> supercedes and I will now close) with upgradability that, while not
> typical use cases (live-tools would normally only be installed on a live
> system and subsequently not upgraded) were nevertheless show-stoppers
> for the wheezy release.  Those issues have have since been resolved. We
> consider this release to be the only supportable version for the
> lifetime of wheezy.

Even as a filtered diff, that's still a reasonably large set of
changes. :-( A few comments / queries:

--- live-tools.orig/bin/live-persistence1970-01-01 01:00:00.0 
+0100
+++ live-tools/bin/live-persistence 2013-02-15 10:42:34.619868805 +0100
[...]

+Most options correspond to the persistence-* options of live-boot, and will
+override the corresponging options parsed from the kernel command-line.

"corresponding"

--- live-tools.orig/bin/live-update-initramfs   1970-01-01 01:00:00.0 
+0100
+++ live-tools/bin/live-update-initramfs2013-02-15 09:38:30.324657057 
+0100
[...]
+   # FIXME: needs to exclude initrd backup files
+   if [ "$(ls /boot/initrd.img-* | wc -l)" -gt 1 ]
+   then
+   _NUMBER="1"
+
+   for _INITRD in /boot/initrd.img-*

"FIXME"s in apparently final(ish) code always make me slightly wary.
What's the real-world effect of the loop picking up backup files?

--- live-tools.orig/bin/live-update-initramfs-uuid  1970-01-01 
01:00:00.0 +0100
+++ live-tools/bin/live-update-initramfs-uuid   2013-02-15 09:38:30.324657057 
+0100
[...]
+case "${_INITRD}" in
+   *.gz)

Where does $_INITRD come from? This appears to be the first reference to
it in the script and it's not obviously passed in. (Apologies if I'm
missing something relating to the infrastructure here.)

+if [ -n "${_NEW_UUID}" ]
+then
+   mv "/tmp/$(basename ${_OLD_INITRD})" "${_NEW_INITRD}"
+else
+   mv "/tmp/$(basename ${_OLD_INITRD})" ./
+fi

It looks like it's possible to get to this point with $_NEW_UUID being
set, but not $_NEW_INITRD?

+cd "${_TMPDIR}"
+
+${_COMPRESSION} -c -d "${_OLD_INITRD}" | cpio -id
+
+echo "${_NEW_UUID}" > conf/uuid.conf
+
+
+find . | cpio --quiet -R 0:0 -o -H newc | ${_COMPRESSION} -c > 
"/tmp/$(basename ${_OLD_INITRD})"

Why the hard-coding of /tmp for files (there's some more later on in the
script), when mktemp() is already being used for the location of the
image contents?

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1361738815.20752.58.ca...@jacala.jungle.funky-badger.org



Bug#700798: unblock: live-tools/3.0.18-1

2013-02-17 Thread Ben Armstrong
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock

Please unblock package live-tools

The version in wheezy had some issues (see #685752 which this request
supercedes and I will now close) with upgradability that, while not
typical use cases (live-tools would normally only be installed on a live
system and subsequently not upgraded) were nevertheless show-stoppers
for the wheezy release.  Those issues have have since been resolved. We
consider this release to be the only supportable version for the
lifetime of wheezy.

I have attached a cleaned up diff which lists at the top the specific
cleanups performed to make review easier.

unblock live-tools/3.0.18-1

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.7-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
This is a diff 3.0.3-1..3.0.18-1:
  * without manpage translation changes
  * with filenames adjusted to account for file renames providing a minimal diff

diff -Naurp live-tools.orig/bin/live-persistence live-tools/bin/live-persistence
--- live-tools.orig/bin/live-persistence	1970-01-01 01:00:00.0 +0100
+++ live-tools/bin/live-persistence	2013-02-15 10:42:34.619868805 +0100
@@ -0,0 +1,482 @@
+#!/bin/sh
+
+## live-tools(7) - System Support Scripts
+##
+## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+set -e
+
+# We're gonna mess with stderr's file descriptor below, so we save a
+# reference to it in fd 3 if we want to print to stderr
+exec 3>&2
+
+error ()
+{
+	echo "error: ${@}" >&3
+	exit 1
+}
+
+# Exit if user is unprivileged
+if [ "$(id -u)" -ne 0 ]
+then
+	echo "E: need root privileges" >&3
+
+	exit 1
+fi
+
+# Exit if live-boot is not installed
+if [ ! -e /lib/live/boot ]
+then
+	echo "E: live-boot not installed" >&3
+
+	exit 1
+fi
+
+# import Cmdline_old()
+. /lib/live/boot/9990-cmdline-old || error 'Could not source /lib/live/boot/9990-cmdline-old'
+
+# Set variable names needed by get_custom_mounts() etc.,
+# and now initialized by live-boot in a file that we certainly
+# don't want to source.
+persistence_list="persistence.conf"
+old_persistence_list="live-persistence.conf"
+custom_overlay_label="persistence"
+export persistence_list old_persistence_list custom_overlay_label
+
+# This will import the following functions and variables used below:
+#   activate_custom_mounts()
+#   get_custom_mounts()
+#   open_luks_device()
+#   probe_for_gpt_name()
+#   removable_dev()
+#   removable_usb_dev()
+#   storage_devices()
+#   where_is_mounted()
+. /lib/live/boot/9990-misc-helpers.sh || error 'Could not source /lib/live/boot/9990-misc-helpers.sh'
+
+usage ()
+{
+	echo "Usage: live-persistence [OPTION]... list [LABEL]...
+List (on stdout) all partitions with names among LABEL(s) that are compatible
+with live-boot's overlay persistence, and that are adhering to live-boot's
+persistence filters (e.g. persistence-media). If no LABEL is given the default
+in live-boot is used ('${custom_overlay_label}').
+   or: live-persistence [OPTION]... activate VOLUME...
+Activates persistence on the given VOLUME(s) (specified via block device).
+Successes and failures are written to stdout. There are no checks for whether
+the given volumes adhere to live-boot's options.
+   or: live-persistence [OPTION]... close VOLUME...
+Deactivates persistence on the given VOLUME(s) (specified via block device).
+
+Note: The 'activate' and 'stop' actions only support partition-backed volumes
+(e.g. /dev/sda2), not file-backed persistent volumes.
+
+Kernel command-line options are parsed just like in live-boot and have the same
+effect (see live-boot(7) for more information).
+
+Most options correspond to the persistence-* options of live-boot, and will
+override the corresponging options parsed from the kernel command-line.
+
+General options:
+  -h, --helpdisplay this help and exit
+  -l, --log-file=FILE   log the execution trace to FILE
+
+Options affecting the 'list' action:
+  -e, --encryption=LIST override 'persistence-encryption'
+  -m, --media=VALUE override 'persistence-media'
+  -g, --gpt-onlyonly list GPT partitions
+
+Options affecting the 'activate' action:
+  -r, --read-only   enable 'persistence-read-only'
+  -w, --read-write  disable 'persistence-read-only'
+  -u, --union=VALUE override 'union'"
+}
+
+warning ()
+{
+	echo "warning: ${@}" >&3
+}
+
+dbus_udisks_get_attribute ()
+{
+	dev="${1}"
+	attribute="${2}"
+	re='^[[:space:]]*variant[[:space:]]\+string[[:space:]]\+"\(.*\)"$'
+
+	dbus-send --system --print-reply --dest=org.freedesktop.UDisks \
+		/org/freedesktop/UDisks/devices/$(basename ${