Debian Bug report logs - #469085
live-helper: md5sum can't handle all filenames

version graph

Package: live-helper; Maintainer for live-helper is Debian Live Project <debian-live@lists.debian.org>;

Reported by: Bas Wijnen <wijnen@debian.org>

Date: Mon, 3 Mar 2008 00:00:02 UTC

Severity: normal

Tags: patch

Found in version live-helper/1.0~a38-1

Fixed in version live-helper/1.0~a41-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 <debian-live-maint@lists.alioth.debian.org>:
Bug#469085; Package live-helper. Full text and rfc822 format available.

Acknowledgement sent to Bas Wijnen <wijnen@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Bas Wijnen <wijnen@debian.org>
To: submit@bugs.debian.org
Subject: live-helper: md5sum can't handle all filenames
Date: Mon, 3 Mar 2008 00:59:53 +0100
[Message part 1 (text/plain, inline)]
Package: live-helper
Version: 1.0~a38-1
Tags: patch

When including files in the binary image which have strange characters
in them (I think even spaces, but certainly quotes), lh_binary_md5sum
chokes due to xargs parsing those characters.  The problematic line is

	find . -type f | sort | grep -v 'isolinux/isolinux.bin' | grep
	-v 'boot/grub/stage2_eltorito' | xargs -I{} md5sum "{}" >
	../md5sum.txt

The error message (when having files with quotes) suggests using the -0
option.  This is a good idea, but needs '\0'-separated fields.  So the
line becomes:

	find . -type f | sort | grep -v 'isolinux/isolinux.bin' | grep
	-v 'boot/grub/stage2_eltorito' | while read file ; do echo -en
	"$file\0" ; done | xargs -0 -I{} md5sum "{}" > ../md5sum.txt

I'm not entirely sure if there're bashisms in there, but I don't think
so.  I tested this (with bash) and it can indeed handle files with
spaces and quotes in their names.

Thanks,
Bas

-- 
I encourage people to send encrypted e-mail (see http://www.gnupg.org).
If you have problems reading my e-mail, use a better reader.
Please send the central message of e-mails as plain text
   in the message body, not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
For more information, see http://pcbcn10.phys.rug.nl/e-mail.html
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live-maint@lists.alioth.debian.org>:
Bug#469085; Package live-helper. Full text and rfc822 format available.

Acknowledgement sent to Julian Andres Klode <jak@jak-linux.org>:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Julian Andres Klode <jak@jak-linux.org>
To: Bas Wijnen <wijnen@debian.org>, 469085@bugs.debian.org
Subject: Re: Bug#469085: live-helper: md5sum can't handle all filenames
Date: Mon, 17 Mar 2008 15:52:23 +0100
[Message part 1 (text/plain, inline)]
Bas Wijnen wrote:
> Package: live-helper
> Version: 1.0~a38-1
> Tags: patch
> 
> When including files in the binary image which have strange characters
> in them (I think even spaces, but certainly quotes), lh_binary_md5sum
> chokes due to xargs parsing those characters.  The problematic line is
> 
> 	find . -type f | sort | grep -v 'isolinux/isolinux.bin' | grep
> 	-v 'boot/grub/stage2_eltorito' | xargs -I{} md5sum "{}" >
> 	../md5sum.txt
> 
> The error message (when having files with quotes) suggests using the -0
> option.  This is a good idea, but needs '\0'-separated fields.  So the
> line becomes:
> 
> 	find . -type f | sort | grep -v 'isolinux/isolinux.bin' | grep
> 	-v 'boot/grub/stage2_eltorito' | while read file ; do echo -en
> 	"$file\0" ; done | xargs -0 -I{} md5sum "{}" > ../md5sum.txt
I would suggest:

find . -type f \! -name 'isolinux/isolinux.bin' \! -name
'boot/grub/stage2_eltorito' -print0 | xargs -0 md5sum > ../md5sum.txt
> 
> I'm not entirely sure if there're bashisms in there, but I don't think
> so.  I tested this (with bash) and it can indeed handle files with
> spaces and quotes in their names.
The option -e of echo is not part of the POSIX standard, but provided by bash's
echo, ksh's echo and /bin/echo.

> 
> Thanks,
> Bas
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> debian-live-devel mailing list
> debian-live-devel@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel


-- 
Julian Andres Klode, Fellow of the Free Software Foundation Europe
                     Debian Maintainer | Developer | Ubuntu Member

try Debian: http://www.debian.org/ | my site: http://jak-linux.org/
        jabber: juliank@jabber.org | IRC: juliank (FreeNode, OFTC)
            languages:     German  | English

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live-maint@lists.alioth.debian.org>:
Bug#469085; Package live-helper. Full text and rfc822 format available.

Acknowledgement sent to "Trent W. Buck" <trentbuck@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: "Trent W. Buck" <trentbuck@gmail.com>
To: 469085@bugs.debian.org
Subject: Re: Bug#469085: live-helper: md5sum can't handle all filenames
Date: Wed, 19 Mar 2008 00:50:51 +1100
[Message part 1 (text/plain, inline)]
On Mon, Mar 17, 2008 at 03:52:23PM +0100, Julian Andres Klode wrote:

> find . -type f \! -name 'isolinux/isolinux.bin' \! -name
> 'boot/grub/stage2_eltorito' -print0 | xargs -0 md5sum >
> ../md5sum.txt

For recent (post-oldstable?) versions of findutils, you can use the
Single Unix Standard switch -exec {} +, for example:

    find >../md5sum.txt \
      -type f \
      -not -name isolinux/isolinux.bin \
      -not -name boot/grub/stage2_eltorito \
      -exec md5sum {} +

Ref. http://www.opengroup.org/onlinepubs/009695399/utilities/find.html

> The option -e of echo is not part of the POSIX standard, but provided by bash's
> echo, ksh's echo and /bin/echo.

IIRC the Debian Policy requires /bin/sh to support echo -n, but not
echo -e.  If you want echo's -e switch, use /bin/echo.

You can use the posh and dash packages to test for sh compliance.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live-maint@lists.alioth.debian.org>:
Bug#469085; Package live-helper. Full text and rfc822 format available.

Acknowledgement sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: "Trent W. Buck" <trentbuck@gmail.com>, 469085@bugs.debian.org
Subject: Re: Bug#469085: live-helper: md5sum can't handle all filenames
Date: Tue, 18 Mar 2008 10:22:08 -0400
On Wed, Mar 19, 2008 at 12:50:51AM +1100, Trent W. Buck wrote:
> On Mon, Mar 17, 2008 at 03:52:23PM +0100, Julian Andres Klode wrote:
> 
> > find . -type f \! -name 'isolinux/isolinux.bin' \! -name
> > 'boot/grub/stage2_eltorito' -print0 | xargs -0 md5sum >
> > ../md5sum.txt
> 
> For recent (post-oldstable?) versions of findutils, you can use the
post-oldstable is correct, see 9.1.4 "Going Back to Exec" from the
info document.  4.2.12 is the earliest version supporting -exec {} +.

Justin




Reply sent to Daniel Baumann <daniel@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Bas Wijnen <wijnen@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #25 received at 469085-close@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: 469085-close@bugs.debian.org
Subject: Bug#469085: fixed in live-helper 1.0~a41-1
Date: Tue, 25 Mar 2008 09:02:21 +0000
Source: live-helper
Source-Version: 1.0~a41-1

We believe that the bug you reported is fixed in the latest version of
live-helper, which is due to be installed in the Debian FTP archive:

live-helper_1.0~a41-1.diff.gz
  to pool/main/l/live-helper/live-helper_1.0~a41-1.diff.gz
live-helper_1.0~a41-1.dsc
  to pool/main/l/live-helper/live-helper_1.0~a41-1.dsc
live-helper_1.0~a41-1_all.deb
  to pool/main/l/live-helper/live-helper_1.0~a41-1_all.deb
live-helper_1.0~a41.orig.tar.gz
  to pool/main/l/live-helper/live-helper_1.0~a41.orig.tar.gz



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 469085@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated live-helper 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 24 Mar 2008 00:00:00 +0100
Source: live-helper
Binary: live-helper
Architecture: source all
Version: 1.0~a41-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Live <debian-live-maint@lists.alioth.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description: 
 live-helper - Debian Live build scripts
Closes: 469085 471873
Changes: 
 live-helper (1.0~a41-1) unstable; urgency=medium
 .
   [ Daniel Baumann ]
   * Fixing md5sum.txt creation to not fail on filenames with
     whitespaces, thanks to Bas Wijnen <wijnen@debian.org> (Closes:
     #469085).
   * Updating copy instructions in example sources to match current
     state.
   * Updating credits.
   * Switching default of LH_APT from aptitude to apt for >= lenny.
   * Correcting wrong logic on handling secure apt.
   * Including 686 kernel flavour on i386 too, but defaulting (still) to
     486 for compatibility reasons.
 .
   [ Chris Lamb ]
   * lh_chroot_hacks: Ensure initrds are group- and world- readable
   * Allow LH_ENCRYPTION="disabled" to disable encryption
   * lh_binary_encryption: Rework and fix broken AES encryption routines
   * lh_binary_rootfs: Remove
   * lh_binary_debian-installer: Preseed by repacking initrd in some
     situations
   * lh_binary_debian-installer: Merge pool/netboot determining logic
   * lh_binary_debian-installer: Remove "local"-oriented bashisms
     (Closes: #471873).
   * lists/gnome-core: Add gnome-themes
   * lh_chroot_linux-image: Install dependencies differently when using
     aptitude
   * lh_binary_debian-installer: Don't use --no-clobber for downloading
     files
   * lh_binary_debian-installer: Only create package pools when necessary
   * lh_binary_debian-installer: Re-enable d-i on netboot images
   * hooks/stripped: Clean Lintian and Linda overrides in 'stripped' hook
 .
   [ Cyril Brulebois ]
   * Fix various typos.
Files: 
 0bef199eb660ad4afb1f65706645e942 854 misc optional live-helper_1.0~a41-1.dsc
 29e15c02912f7363c0585e6256c961c7 1937744 misc optional live-helper_1.0~a41.orig.tar.gz
 3a474efaa875e54a55761d6ba6e0c738 12239 misc optional live-helper_1.0~a41-1.diff.gz
 7e08b57b59d1eb06f9c6e528775b4b96 1883200 misc optional live-helper_1.0~a41-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH6L2p+C5cwEsrK54RAm6RAJ9pGx0LiItlsUofWa7LlL5LJDXxtQCfUJEn
adIDitsmeY7sYdaaHWai4HA=
=O2fu
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 29 Apr 2008 07:41:30 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: Sun Apr 20 16:15:12 2014; Machine Name: buxtehude.debian.org

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