Debian Bug report logs - #655562
scripts/build/lb_binary_syslinux is not defensive enough against misconfiguration

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: Martin Quinson <martin.quinson@loria.fr>

Date: Thu, 12 Jan 2012 11:15:02 UTC

Severity: normal

Fixed in version live-build/3.0~a42-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#655562; Package live-build. (Thu, 12 Jan 2012 11:15:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Quinson <martin.quinson@loria.fr>:
New Bug report received and forwarded. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Thu, 12 Jan 2012 11:15:13 GMT) Full text and rfc822 format available.

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

From: Martin Quinson <martin.quinson@loria.fr>
To: submit@bugs.debian.org
Subject: scripts/build/lb_binary_syslinux is not defensive enough against misconfiguration
Date: Thu, 12 Jan 2012 12:10:30 +0100
Package: live-build
Thanks for the fish

(reposting this bug report because the first one seems to be lost in
ether -- sorry for potential dupplicates)

Falling in a recent bug of live-manual that advise the users to pass
usb-hdd as a build type is particularly unfriendly because the code on
its side is not defensive enough. In scripts/build/lb_binary_syslinux,
you have a case statement which objective is to set the _SUFFIX
variable depending on the kind of image that we are building. But if
the image kind is not recognized by the case, then the only error
message that the user get is: "mkdir: missing operand"

There is two needed fixes here IMHO:
- the configuration must be checked at the beginning of the process (to
  ensure that typo such as hhd instead of hdd are detected and reported
  in a timely manned)
- the call to mkdir must be protected: mkdir without argument will
  always fail on the user, so you don't want to do that. I'm not sure
  whether the code should fail if puzzled or if the mkdir should simply
  be avoided, but I'm sure you'll know.

Anyway, thanks for this very nice piece of software, and keep up the
good work.

Bye, Mt.

-- 
La joie d'apprendre est aussi indispensable aux ├ętudes que la
respiration aux coureurs. -- Maria Montessori




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#655562; Package live-build. (Thu, 12 Jan 2012 11:39:36 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel.baumann@progress-technologies.net:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Thu, 12 Jan 2012 11:39:40 GMT) Full text and rfc822 format available.

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

From: Daniel Baumann <daniel.baumann@progress-technologies.net>
To: Martin Quinson <martin.quinson@loria.fr>
Cc: 655562@bugs.debian.org
Subject: Re: Bug#655562: scripts/build/lb_binary_syslinux is not defensive enough against misconfiguration
Date: Thu, 12 Jan 2012 12:36:38 +0100
tag 655562 pending
thanks

On 01/12/2012 12:10 PM, Martin Quinson wrote:
> - the configuration must be checked at the beginning of the process (to
>   ensure that typo such as hhd instead of hdd are detected and reported
>   in a timely manned)

yep, like i said on irc.

also, it should be a warning (with a sleep 5 or so only, not an exit 1,
remember the drop in of custom local formats), patches welcome.

> - the call to mkdir must be protected: mkdir without argument will
>   always fail on the user, so you don't want to do that. I'm not sure
>   whether the code should fail if puzzled or if the mkdir should simply
>   be avoided, but I'm sure you'll know.

falling back to hdd seems to be the right thing to do here, done in git.

> Anyway, thanks for this very nice piece of software, and keep up the
> good work.

thanks :)

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




Added tag(s) pending. Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Thu, 12 Jan 2012 11:39:45 GMT) Full text and rfc822 format available.

Reply sent to Daniel Baumann <daniel@debian.org>:
You have taken responsibility. (Sun, 15 Jan 2012 20:51:18 GMT) Full text and rfc822 format available.

Notification sent to Martin Quinson <martin.quinson@loria.fr>:
Bug acknowledged by developer. (Sun, 15 Jan 2012 20:51:18 GMT) Full text and rfc822 format available.

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

From: Daniel Baumann <daniel@debian.org>
To: 655562-close@bugs.debian.org
Subject: Bug#655562: fixed in live-build 3.0~a42-1
Date: Sun, 15 Jan 2012 20:49:39 +0000
Source: live-build
Source-Version: 3.0~a42-1

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

live-build-cgi_3.0~a42-1_all.deb
  to main/l/live-build/live-build-cgi_3.0~a42-1_all.deb
live-build-cron_3.0~a42-1_all.deb
  to main/l/live-build/live-build-cron_3.0~a42-1_all.deb
live-build_3.0~a42-1.debian.tar.gz
  to main/l/live-build/live-build_3.0~a42-1.debian.tar.gz
live-build_3.0~a42-1.dsc
  to main/l/live-build/live-build_3.0~a42-1.dsc
live-build_3.0~a42-1_all.deb
  to main/l/live-build/live-build_3.0~a42-1_all.deb
live-build_3.0~a42.orig.tar.gz
  to main/l/live-build/live-build_3.0~a42.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 655562@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-build 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.8
Date: Sun, 15 Jan 2012 19:25:42 +0100
Source: live-build
Binary: live-build live-build-cgi live-build-cron
Architecture: source all
Version: 3.0~a42-1
Distribution: unstable
Urgency: low
Maintainer: Debian Live Project <debian-live@lists.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description: 
 live-build - Debian Live - System build scripts
 live-build-cgi - Debian Live - System build scripts (CGI frontend)
 live-build-cron - Debian Live - System build scripts (cron autobuilder)
Closes: 630089 646797 655557 655562
Changes: 
 live-build (3.0~a42-1) unstable; urgency=low
 .
   [ Matthijs Kooijman ]
   * Make lb_chroot_hooks work with dash.
   * Fix pathname for running hooks in lb_chroot_hooks.
   * Make the config available to all hooks.
   * Fix path in 001-update-apt-file-cache.chroot.
   * Use a two-stage mount again for mounting config inside chroot in
     lb_chroot_hooks.
   * Unmount /root/config in case of error.
   * Unmount chroot/root/config when running lb_clean.
 .
   [ Daniel Baumann ]
   * Adding armhf kernel defaults, thanks for Ying-Chun Liu
     <paulliu@debian.org> for bringing it up (Closes: #655557).
   * Correcting wrong and incompatible loop for casper initrds in
     binary_disk.
   * Using syslinux payload as fallback in lb_binary_syslinux if no
     destinct image type could be deduced (Closes: #655562).
   * Switching priorities of mirror defaults (which mirror default is
     used from which previously set mirror default etc.) to the way it
     was intendet to be.
 .
   [ Colin Watson ]
   * Print the current time before starting a command with the lb wrapper
     script (Closes: #630089).
 .
   [ Daniel Baumann ]
   * Adding reference to --parent-archive-areas in lb_config manpage
     (Closes: #646797).
Checksums-Sha1: 
 252b2bceefcf540eaf92994d3d79ba90bdb2235f 1413 live-build_3.0~a42-1.dsc
 c6bf5570dd1b87a2eef544bdf2620a25ec17d46c 1821311 live-build_3.0~a42.orig.tar.gz
 0b10e361917a3a44cd733d28297004a3f9927d6c 59893 live-build_3.0~a42-1.debian.tar.gz
 ce496e96429856fbfcf5188455f963682b59bd54 1140848 live-build_3.0~a42-1_all.deb
 26d8ccfba50f0c77e66648dff7dee24942d3c46f 65024 live-build-cgi_3.0~a42-1_all.deb
 bcc613ccc9c2cd3a85bcd00307ab4eb46ff6c333 70132 live-build-cron_3.0~a42-1_all.deb
Checksums-Sha256: 
 8293f39d4fa8f8c77ed379b3fce5262d526d47054284864c52218e3318c247ae 1413 live-build_3.0~a42-1.dsc
 4b0ea5b5204d91cfbad59c11d090f5c2f62e15eca7d618a978e27c29dd3b8847 1821311 live-build_3.0~a42.orig.tar.gz
 12092a572ff68f8fbd13238beab687382763e7367fe5c2b3c0418d256da078f3 59893 live-build_3.0~a42-1.debian.tar.gz
 3fbc200ecd6bfc1115c3e1c67cd7ba0ae95f3237b60951c2f52edc6388392135 1140848 live-build_3.0~a42-1_all.deb
 0a954c402efea5819c6469ea52c8f4a91b7a3fb61eb8c258810f66ea920f3787 65024 live-build-cgi_3.0~a42-1_all.deb
 8f92d0ab69b395d931f273b32c9a14fbda833ee0cc72d4c0eb680bed1badcdf7 70132 live-build-cron_3.0~a42-1_all.deb
Files: 
 f4b6fea4393dfe977f259248874c5433 1413 misc optional live-build_3.0~a42-1.dsc
 a9a4b81377768d817e220de5a04e64ae 1821311 misc optional live-build_3.0~a42.orig.tar.gz
 83f665d0535c67ebe4b317df3c849027 59893 misc optional live-build_3.0~a42-1.debian.tar.gz
 193c990cd5682db3fb3a16a6ca3c3556 1140848 misc optional live-build_3.0~a42-1_all.deb
 c2abe32cddc27e9c617559b57cb77924 65024 misc optional live-build-cgi_3.0~a42-1_all.deb
 2e7d4f457b631e9951561dc5d38ced5a 70132 misc optional live-build-cron_3.0~a42-1_all.deb

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

iEYEARECAAYFAk8TLacACgkQ+C5cwEsrK55hbACeIsQAEtiJ1Hm+F9lt5I/ToOdd
Ts8AnRZuuDfuRfb5eW1i7Jzb4R8nXjOp
=ETaQ
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 23 Feb 2012 07:40:02 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 14:47:12 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.