Debian Bug report logs - #594968
Support mksquashfs -e by prepending (not appending) to MKSQUASHFS_OPTIONS.

version graph

Package: live-build; Maintainer for live-build is Live Systems Maintainers <debian-live@lists.debian.org>; Source for live-build is src:live-build.

Reported by: "Trent W. Buck" <trentbuck@gmail.com>

Date: Tue, 31 Aug 2010 07:40:48 UTC

Severity: wishlist

Found in version live-build/2.0~a23-1

Done: Daniel Baumann <daniel@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#594968; Package live-build. (Tue, 31 Aug 2010 07:40:51 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Trent W. Buck" <trentbuck@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Tue, 31 Aug 2010 07:40:51 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Trent W. Buck" <trentbuck@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Support mksquashfs -e by prepending (not appending) to MKSQUASHFS_OPTIONS.
Date: Tue, 31 Aug 2010 17:29:02 +1000
Package: live-build
Version: 2.0~a23-1
Severity: minor
File: /usr/share/live/build/scripts/build/binary_rootfs

Images based on Emdebian Grip are smaller than images based on Squeeze
because the packages exclude directories like /usr/share/man/.

I found that I can achieve equally small images with Squeeze by
excluding those directories at the mksquashfs step:

    # Using -regex below simply means that -e foo/ excludes everything
    # below foo, but NOT foo/ itself.  This is important for /tmp &c.
    mksquashfs $t $t/boot/filesystem.squashfs -root-becomes ... \
        -regex -e \
        tmp/ \
        usr/share/info/ \
        usr/share/locale/ \
        usr/share/man/ \
        [...]

I want to duplicate these exclusions in images built by live-build.
It *looks* like I can simply add a line to config/binary like this:

    MKSQUASHFS_OPTIONS='-regex -e boot/ tmp/ [...]'

Unfortunately, this results in a mksquashfs call where -no-progress,
-info and -sort squashfs.sort are supplied *after* -e, causing
mksquashfs to treat them as exclusions -- effectively ignoring them.

I believe the simplest way to work around this is to have
binary_rootfs prepend (instead of appending) arguments to
MKSQUASHFS_OPTIONS (below, untested).  Another option might be to say
"live-build doesn't allow -e, you must use -ef" (also untested).

diff -ud /usr/share/live/build/scripts/build/binary_rootfs /tmp/buffer-content-1378JMi
--- /usr/share/live/build/scripts/build/binary_rootfs	2010-08-15 04:56:37.000000000 +1000
+++ /tmp/buffer-content-1378JMi	2010-08-31 17:23:12.685375975 +1000
@@ -296,16 +296,16 @@
 		# Remove stale squashfs image
 		rm -f chroot/filesystem.squashfs
 
-		MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -no-progress"
+		MKSQUASHFS_OPTIONS="-no-progress ${MKSQUASHFS_OPTIONS}"
 
 		if [ "${_VERBOSE}" = "true" ]
 		then
-			MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -info"
+			MKSQUASHFS_OPTIONS="-info ${MKSQUASHFS_OPTIONS}"
 		fi
 
 		if [ -f config/binary_rootfs/squashfs.sort ]
 		then
-			MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -sort squashfs.sort"
+			MKSQUASHFS_OPTIONS="-sort squashfs.sort ${MKSQUASHFS_OPTIONS}"
 			cp config/binary_rootfs/squashfs.sort chroot #FIXME
 		fi
 

Diff finished.  Tue Aug 31 17:23:12 2010

-- Package-specific info:

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35 (SMP w/2 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-build depends on:
ii  debootstrap                   1.0.23     Bootstrap a basic Debian system

Versions of packages live-build recommends:
ii  cpio                          2.11-4     GNU cpio -- a program to manage ar
ii  gettext-base                  0.18.1.1-1 GNU Internationalization utilities
ii  gnu-fdisk                     1.2.4-3+b1 Linux fdisk replacement based on l

Versions of packages live-build suggests:
pn  dosfstools                    <none>     (no description available)
ii  fakeroot                      1.14.4-1   Gives a fake root environment
pn  genisoimage                   <none>     (no description available)
pn  memtest86+ | memtest86        <none>     (no description available)
pn  mtools                        <none>     (no description available)
ii  parted                        2.3-2      The GNU Parted disk partition resi
ii  squashfs-tools                1:4.0-8    Tool to create and append to squas
ii  sudo                          1.7.2p7-1  Provide limited super user privile
pn  syslinux | grub               <none>     (no description available)
pn  uuid-runtime                  <none>     (no description available)
pn  win32-loader                  <none>     (no description available)

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/live/build/functions/defaults.sh (from live-build package)
debsums: changed file /usr/share/live/build/scripts/build/bootstrap (from live-build package)
debsums: changed file /usr/share/live/build/scripts/build/chroot_sources (from live-build package)




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#594968; Package live-build. (Tue, 31 Aug 2010 07:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to trentbuck@gmail.com:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Tue, 31 Aug 2010 07:54:03 GMT) Full text and rfc822 format available.

Message #10 received at 594968@bugs.debian.org (full text, mbox):

From: trentbuck@gmail.com
To: 594968@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: Bug#594968: Acknowledgement (Support mksquashfs -e by prepending (not appending) to MKSQUASHFS_OPTIONS.)
Date: Tue, 31 Aug 2010 17:51:41 +1000
package live-build
severity 594968 wishlist
thank you

Just after posting this, I found config/binary_rootfs/excludes support
coded in binary_chroot, which basically calls rm -rf on a bunch of
globs prior to the mksquashfs run.

It's not my preferred way of doing it (rm -r is O(1), though obviously
it also works for squashfs-less builds), but it DOES work, so I've
downgraded this ticket to "wishlist".




Severity set to 'wishlist' from 'minor' Request was from trentbuck@gmail.com to control@bugs.debian.org. (Tue, 31 Aug 2010 07:54:05 GMT) Full text and rfc822 format available.

Reply sent to daniel@debian.org:
You have taken responsibility. (Tue, 31 Aug 2010 19:24:08 GMT) Full text and rfc822 format available.

Notification sent to "Trent W. Buck" <trentbuck@gmail.com>:
Bug acknowledged by developer. (Tue, 31 Aug 2010 19:24:08 GMT) Full text and rfc822 format available.

Message #17 received at 594968-done@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: "Trent W. Buck" <trentbuck@gmail.com>, 594968-done@bugs.debian.org
Subject: Re: Bug#594968: Support mksquashfs -e by prepending (not appending) to MKSQUASHFS_OPTIONS.
Date: Tue, 31 Aug 2010 21:21:10 +0200
On 08/31/2010 09:29 AM, Trent W. Buck wrote:
> I want to duplicate these exclusions in images built by live-build.
> It *looks* like I can simply add a line to config/binary like this:
> 
>     MKSQUASHFS_OPTIONS='-regex -e boot/ tmp/ [...]'

variables not prefixed with LH_ are strictly internal and shall *not* be
used at all and are subject to change without notice. if you use them,
you do at your own risk and may get unpredictable changes. we wont
support that.

> I believe the simplest way to work around this is to have
> binary_rootfs prepend (instead of appending) arguments to
> MKSQUASHFS_OPTIONS (below, untested).  Another option might be to say
> "live-build doesn't allow -e, you must use -ef" (also untested).

no, please use config/binary_rootfs/excludes for exclude handlings.

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 29 Sep 2010 07:34:54 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 10:29:53 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.