Your message dated Sun, 16 Nov 2014 09:49:09 +0000
with message-id <e1xpwsd-0003qr...@franck.debian.org>
and subject line Bug#769150: fixed in bilibop 0.4.23
has caused the Debian Bug report #769150,
regarding bilibop-lockfs: mount.lockfs is broken
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
769150: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769150
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: bilibop-lockfs
Version: 0.4.22
Severity: grave
Tags: patch
Justification: renders package unusable

Hi,

After installing bilibop-lockfs on a freshly installed Debian (jessie)
base system onto a USB key, and then reboot, the boot process fall
back in emergency mode (enter root password or type Control-D to
continue); then continue.

The result is the following:
- / is locked (as expected)
- /boot and /home are not mounted, and their corresponding entries in
  the temporary /etc/fstab are inconsistent; they look like:

UUID=5c5019dd-77d8-4857-89cf-9b0e1087857b /boot auto -o 0 0
UUID=abcefb92-fa81-4bd8-90b8-0e76c101ccb6 /home auto -o 0 0

The lockfs_mount_helper script does not parse arguments correctly:
mount provides arguments to the helper programs with this fixed
format:

FILESYSTEM MOUNTPOINT [FLAGS] -o MOUNTOPTIONS

where FLAGS are optional and generic flags (such as -n, -s, or -v).
In the script, FLAGS are not taken into account, so it is unable to
mount the lockfs pseudo-filesystem, and the mount_fallback() function
fails too. The resulting fstab entries show the shift of the arguments
(-o in place of MOUNTOPTIONS) when -n is invoked at boot time.

This is fixed by the attached patch.

quidame

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.16-3-486
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bilibop-lockfs depends on:
ii  bilibop-common   0.4.22
ii  initramfs-tools  0.116
ii  initscripts      2.88dsf-57

Versions of packages bilibop-lockfs recommends:
ii  cryptsetup  2:1.6.6-3

Versions of packages bilibop-lockfs suggests:
pn  bilibop-device-policy  <none>
pn  gnome-icon-theme       <none>
pn  libnotify-bin          <none>
pn  plymouth               <none>

-- no debconf information
diff --git a/lib/bilibop/lockfs_mount_helper b/lib/bilibop/lockfs_mount_helper
index 5605f06..dbe9826 100755
--- a/lib/bilibop/lockfs_mount_helper
+++ b/lib/bilibop/lockfs_mount_helper
@@ -50,7 +50,7 @@ mount_fallback() {
         esac
     done
     sed -i "s;^\s*\([^#][^ ]\+\s\+${2}\s\+\)lockfs\s.*;\1${fstype:-auto} ${options:-defaults} 0 0;" /etc/fstab
-    mount ${1} ${2} ${fstype:+-t ${fstype}} ${options:+-o ${options}}
+    mount ${flags} ${1} ${2} ${fstype:+-t ${fstype}} ${options:+-o ${options}}
 }
 # ===========================================================================}}}
 
@@ -105,9 +105,36 @@ if [ -f "${BILIBOP_RUNDIR}/plocked" ]; then
     . ${BILIBOP_RUNDIR}/plocked
 fi
 
-# the mount command always provides arguments to the helper scripts in this
-# order: FILESYSTEM MOUNTPOINT -o OPTIONS. We take advantage of this fixed
-# format.
+# the mount(8) command, after parsing commandline arguments and/or /etc/fstab,
+# always provides arguments to the helper scripts in this order:
+# FILESYSTEM MOUNTPOINT [FLAGS] -o MOUNTOPTIONS
+# where FLAGS are generic, not filesystem specific: -n, -s, -v for example; -r
+# (or --read-only) and -w (or --rw or --read-write) are translated to -o ro and
+# -o rw respectively by the mount command itself.
+
+while [ "${1}" ]; do
+    if [ -e "${1}" ]; then
+        MNTARGS="${MNTARGS:+${MNTARGS} }${1}"
+        shift
+    else
+        case "${1}" in
+            -o)
+                MNTARGS="${MNTARGS:+${MNTARGS} }${1} ${2}"
+                shift 2
+                ;;
+            *)
+                # Do not skip other options (-n, -s, -v), but take them
+                # apart: we will reuse them for each mount invocation.
+                flags="${flags:+${flags} }${1}"
+                shift
+                ;;
+        esac
+    fi
+done
+
+# Reinitialize script arguments
+eval set -- "${MNTARGS}"
+
 if [ -b "${1}" ]; then
     device="${1}"
     # Check if this device is whitelisted:
@@ -197,7 +224,7 @@ fi
 # Try to mount the readonly branch. In case of failure, undo what has been
 # done before, do a normal mount, rewrite the fstab entry to be consistent
 # with that, and exit:
-if ! mount ${fstype:+-t ${fstype}} -o ${robr_opts:+${robr_opts},}ro ${device:-${LOFILE}} ${robr}; then
+if ! mount ${flags} ${fstype:+-t ${fstype}} -o ${robr_opts:+${robr_opts},}ro ${device:-${LOFILE}} ${robr}; then
     [ "${RO}" = "rr" ] && [ -b "${device}" ] && blockdev --setrw "${device}"
     mount_fallback "${@}"
     exit 3
@@ -223,7 +250,7 @@ fi
 
 # Try to mount the writable branch, and in case of failure, undo what
 # has been done before, etc.
-if ! mount -t tmpfs -o ${rwbr_opts:+${rwbr_opts},}${SIZE:+size=${SIZE},}mode=0755 tmpfs ${rwbr}; then
+if ! mount ${flags} -t tmpfs -o ${rwbr_opts:+${rwbr_opts},}${SIZE:+size=${SIZE},}mode=0755 tmpfs ${rwbr}; then
     umount ${robr}
     [ "${RO}" = "rr" ] && [ -b "${device}" ] && blockdev --setrw "${device}"
     mount_fallback "${@}"
@@ -248,7 +275,7 @@ fi
 
 # Try to mount the aufs now. In case of failure, undo what has been done
 # before, etc.
-if ! mount -t aufs -o br:${rwbr}=rw:${robr}=${RO} none ${mntpnt}; then
+if ! mount ${flags} -t aufs -o br:${rwbr}=rw:${robr}=${RO} none ${mntpnt}; then
     umount ${robr}
     umount ${rwbr}
     [ "${RO}" = "rr" ] && [ -b "${device}" ] && blockdev --setrw "${device}"

--- End Message ---
--- Begin Message ---
Source: bilibop
Source-Version: 0.4.23

We believe that the bug you reported is fixed in the latest version of
bilibop, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 769...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Yann Amar <quid...@poivron.org> (supplier of updated bilibop package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 15 Nov 2014 14:05:44 +0000
Source: bilibop
Binary: bilibop bilibop-common bilibop-lockfs bilibop-rules bilibop-udev
Architecture: source amd64
Version: 0.4.23
Distribution: unstable
Urgency: high
Maintainer: Yann Amar <quid...@poivron.org>
Changed-By: Yann Amar <quid...@poivron.org>
Description:
 bilibop    - run Debian GNU/Linux from external media - metapackage
 bilibop-common - shell functions for bilibop scripts
 bilibop-lockfs - lock filesystems and write changes into RAM
 bilibop-rules - device management rules for OS running from external media
 bilibop-udev - minimal udev rule for Debian GNU/Linux running from external 
medi
Closes: 766647 769150
Changes:
 bilibop (0.4.23) unstable; urgency=high
 .
   * bilibop-lockfs: modify lockfs_mount_helper script: take mount(8) flags
     into account when parsing script arguments provided by parent process;
     this avoids mount failures at boot time or later, when the command is
     invoked with a such flag (closes: #769150).
   * bilibop-rules: add dutch translation for the debconf templates; thanks to
     Frans Spiesschaert <frans.spiesscha...@yucom.be> (closes: #766647).
Checksums-Sha1:
 ace931c9aff99dabbe3dbb3ceb17d88f43ab4758 1751 bilibop_0.4.23.dsc
 5e326c708493da0a90babf9bf7f6d57692f00710 125060 bilibop_0.4.23.tar.xz
 b2402ee6435112d6ad1250c988704448d3868c83 14254 bilibop_0.4.23_amd64.deb
 5fd9061f31f6fa8b26230727705f0f8a51225b31 68560 bilibop-common_0.4.23_amd64.deb
 efd671b5df5d55e33250d3f30641b0b34658c68e 44756 bilibop-lockfs_0.4.23_amd64.deb
 f1feddcaad91eaa86337305c1714ab2f970df4ba 78176 bilibop-rules_0.4.23_amd64.deb
 b23d5130e8434a4088e02c8673b8e08864010e03 16488 bilibop-udev_0.4.23_amd64.deb
Checksums-Sha256:
 64fb43d61542922a0935d253617a6cc3afae15dfc0948905d94c02a19eacf074 1751 
bilibop_0.4.23.dsc
 4e318b94368ae29526098e2c50cb1088f4fc4d9448cb2e2d1b1dd3739ffd59a5 125060 
bilibop_0.4.23.tar.xz
 90c3bbf73e434eaf1960facfed0675e3e13911e9c52807713db16ab38f5cb1df 14254 
bilibop_0.4.23_amd64.deb
 63b896d8f256df14e251456ac7648500e5b79efacdc340226b53a301e5108c18 68560 
bilibop-common_0.4.23_amd64.deb
 525ac3bc891237e286402df6a1b47db211e42f326a92ea9b48585408386a06bb 44756 
bilibop-lockfs_0.4.23_amd64.deb
 d5d242a75e7affe9de03a8015c5a5a74aee79cce9c996b7691d0ec7f6a14adb2 78176 
bilibop-rules_0.4.23_amd64.deb
 ded2846b174eacb1d9898704b91f81567894aa152ac64cf15e273b889508ef82 16488 
bilibop-udev_0.4.23_amd64.deb
Files:
 b23e193e2bd4a3b04b756babbe8805f0 1751 admin optional bilibop_0.4.23.dsc
 69f075c19656f2ca6d7bb918034e0629 125060 admin optional bilibop_0.4.23.tar.xz
 8c0d2d7790814f4ed65dce1637ef6cf9 14254 metapackages extra 
bilibop_0.4.23_amd64.deb
 41e1f9360fb4b14166d79e3308dd3a50 68560 admin optional 
bilibop-common_0.4.23_amd64.deb
 680b17e353bf0517d2361cfcee0e9cfd 44756 admin optional 
bilibop-lockfs_0.4.23_amd64.deb
 930848004cf6ef4862f4ce3c0f115b8c 78176 admin extra 
bilibop-rules_0.4.23_amd64.deb
 a9e204f12ee2ec5d7018ecd0b3cb7e65 16488 admin optional 
bilibop-udev_0.4.23_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJUaHFSAAoJELrOFdKldJj//+0P/1uXtM0EFA4P4XIufVBkDimF
OFcNK1C4MMxNtb0ijEQTlELlnI0pusaqcy3Y16FTbgF1xr0u7o8oCw+ZnvnuexUL
SbmA/b6bAXbZ3WdQRU0/lINKBr9iCWB/+WFbTz906QrOZ6sO9uPuyFdrCUPQPpx0
819EdSMLOgqLkPlBJxLSyRvoWsfVx3croxihPId9dLgYdx7R7GzNTen5AV25SCPb
oc3XnprgByn8ekyR/N24Zypk6RLmxDTaCX/GvR8hLMXlCDd9YLwzv/l12KQN6gWN
U4Uq/OZ7jtNd00sx2K0C3ngbIBwpE2ZjFeN+XEypdqlPSWwE3ylsYHqq2vHc0XnN
6BaQmvX1V6LfTYX3g9k9AxIHLp+Cp1vZTlHJieLIfPvX93hVXQqWBtFTXJXP1brX
oGXB3/lTFeud18bBQ9oMAK5cfR1XDPH0YVkybVHIEnHAEMtHGeuB5IYSZ4onYdix
O0oNJEXIJAlBou5eQepz0OSK04AQQBExj5uTr/B3eYknAN/lLY5QBFSUawOKXg8G
Yh/0hrRRxFfc/LmDTKwxn41FLX5ysiHabH9AEBwHDgE/IH9Cq8kJeN2ClSmLAjrU
MMdSxJxNGQ/GCCH+1P1MAr26KEvuUdM2XmvtPg78NyIpqQ+9ZobCcoJQgx80n4Wm
NdSXT8EdCFBbtaam9ORo
=N7LG
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to