Debian Bug report logs - #488672
live-helper: Buggy variable interpolation in functions/defaults.sh (LH_BOOTAPPEND_*)

version graph

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

Reported by: Cyril Brulebois <cyril.brulebois@kerlabs.com>

Date: Mon, 30 Jun 2008 14:57:01 UTC

Severity: normal

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

Fixed in version live-helper/1.0~a48-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#488672; Package live-helper. Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <cyril.brulebois@kerlabs.com>:
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: Cyril Brulebois <cyril.brulebois@kerlabs.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: live-helper: Buggy variable interpolation in functions/defaults.sh (LH_BOOTAPPEND_*)
Date: Mon, 30 Jun 2008 16:52:36 +0200
Package: live-helper
Version: 1.0~a47-1
Severity: normal

Hi,

I've started storing my config/ directory into git, and I've noticed the
following, after several calls to the lh_config command (note that it's
achieved even with no parameters, so reproducibility should be trivial):
| $ git log -p HEAD~5..HEAD~ config/binary |filterdiff 
| --- a/config/binary
| +++ b/config/binary
| @@ -18,7 +18,7 @@ LH_BOOTAPPEND_LIVE=""
|  
|  # $LH_BOOTAPPEND_INSTALL: set boot parameters
|  # (Default: empty)
| -LH_BOOTAPPEND_INSTALL="-- }}}"
| +LH_BOOTAPPEND_INSTALL="-- }}}}}"
|  
|  # $LH_BOOTLOADER: set bootloader
|  # (Default: syslinux)
| --- a/config/binary
| +++ b/config/binary
| @@ -18,7 +18,7 @@ LH_BOOTAPPEND_LIVE=""
|  
|  # $LH_BOOTAPPEND_INSTALL: set boot parameters
|  # (Default: empty)
| -LH_BOOTAPPEND_INSTALL="-- }}"
| +LH_BOOTAPPEND_INSTALL="-- }}}"
|  
|  # $LH_BOOTLOADER: set bootloader
|  # (Default: syslinux)
| --- a/config/binary
| +++ b/config/binary
| @@ -18,7 +18,7 @@ LH_BOOTAPPEND_LIVE=""
|  
|  # $LH_BOOTAPPEND_INSTALL: set boot parameters
|  # (Default: empty)
| -LH_BOOTAPPEND_INSTALL="-- }"
| +LH_BOOTAPPEND_INSTALL="-- }}"
|  
|  # $LH_BOOTLOADER: set bootloader
|  # (Default: syslinux)
| --- a/config/binary
| +++ b/config/binary
| @@ -18,7 +18,7 @@ LH_BOOTAPPEND_LIVE=""
|  
|  # $LH_BOOTAPPEND_INSTALL: set boot parameters
|  # (Default: empty)
| -LH_BOOTAPPEND_INSTALL="-- ${LH_BOOTAPPEND_LIVE}"
| +LH_BOOTAPPEND_INSTALL="-- }"
|  
|  # $LH_BOOTLOADER: set bootloader
|  # (Default: syslinux)

I traced it down to functions/defaults.sh, especially the following
line:
|         LH_BOOTAPPEND_INSTALL="${LH_BOOTAPPEND_INSTALL:--- \${LH_BOOTAPPEND_LIVE}}"

Demo:
| cyril@exoticus:~$ unset A B
| cyril@exoticus:~$ B=${B:- \${A}}
| cyril@exoticus:~$ echo $B
| ${A}
| cyril@exoticus:~$ B=${B:- \${A}}
| cyril@exoticus:~$ echo $B
| ${A}}

And since A (LH_BOOTAPPEND_LIVE in my case) is empty, the behaviour
shown in my git log history. I'm not sure what the best course of action
is the best here to solve that.

Cheers,

-- 
Cyril Brulebois

-- System Information:
Shell: /bin/sh linked to /bin/bash

Versions of packages live-helper depends on:
ii  debootstrap                   1.0.9      Bootstrap a basic Debian system




Tags added: pending Request was from Chris Lamb <chris@chris-lamb.co.uk> to control@bugs.debian.org. (Fri, 04 Jul 2008 23:57:02 GMT) Full text and rfc822 format available.

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

Notification sent to Cyril Brulebois <cyril.brulebois@kerlabs.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

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

From: Daniel Baumann <daniel@debian.org>
To: 488672-close@bugs.debian.org
Subject: Bug#488672: fixed in live-helper 1.0~a48-1
Date: Mon, 14 Jul 2008 18:32:09 +0000
Source: live-helper
Source-Version: 1.0~a48-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~a48-1.diff.gz
  to pool/main/l/live-helper/live-helper_1.0~a48-1.diff.gz
live-helper_1.0~a48-1.dsc
  to pool/main/l/live-helper/live-helper_1.0~a48-1.dsc
live-helper_1.0~a48-1_all.deb
  to pool/main/l/live-helper/live-helper_1.0~a48-1_all.deb
live-helper_1.0~a48.orig.tar.gz
  to pool/main/l/live-helper/live-helper_1.0~a48.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 488672@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.8
Date: Mon, 14 Jul 2008 00:00:00 +0200
Source: live-helper
Binary: live-helper
Architecture: source all
Version: 1.0~a48-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: 478744 488257 488672 490114 490245
Changes: 
 live-helper (1.0~a48-1) unstable; urgency=medium
 .
   [ Chris Lamb ]
   * Additionally clean md5sum.txt temporary file.
   * Remove pointless whitespace.
   * Temporarily replace /dev/urandom with /dev/random when creating local
     packages key.
   * Correct d-i kernel and initrd locations in grub entries. Thanks to Jun
     NOGATA <nogajun@gmail.com> for the patch. (Closes: #490245)
   * Fix a bug where a /etc/apt/preferences supplied in chroot_local-includes was
     always being deleted when used in conjunction with
     config/chroot_apt/preferences.
   * Abort build if working directory contains spaces - not supported by (at
     least) debootstrap and cdebootstrap.
   * Replace spaces in LH_BOOTSTRAP_{IN,EX}CLUDE variables with commas on use.
     Thanks to Cyril Brulebois <cyril.brulebois@kerlabs.com>. (Closes: #490114)
   * Fix syntax error in --ignore-system-defaults handling.
   * Ensure ~/.gnupg exists (required for gnupg >= ~1.4.9)
   * Fix bug where command-line argument --ignore-system-default was not seen
     before it was required.
   * Fix formatting error with --ignore-system-defaults in "lh_config --help"
   * Add --ignore-system-defaults option to not source /etc/default/live-helper.
   * Correct location of /etc/default/live-helper in lh_config(1) manpage.
   * Perform in LH_BOOTAPPEND_INSTALL conditional expansion manually to avoid
     expansion bug/feature on repetitive calls to lh_config (Closes: #488672)
   * Use a temporary apt key when installing local packages (Closes: #488257)
   * Fix caching of APT indices (Closes: #478744)
   * Refactor d-i GTK image selection, ensuring the GTK installer is only chosen
     on the netboot variant when building on powerpc.
   * Only consider linux-image-2.6-prep powerpc kernel image on Etch.
   * Refactor remote d-i location handling and ensure correct locations for
     powerpc.
   * Print a friendlier message if debootstrap or cdebootstrap cannot be found.
   * Re-order a case statement for consistency.
   * Fix incorrect test for sparc architecture in binary include handling.
   * Add support for generation of sparc netboot images.
   * Add support for sparc "tar" binary image type.
   * Add support for sparc install includes.
   * Refactor destination setting in lh_binary_silo to check arguments at
     beginning of the script.
   * Abort build if building from the root directory (/) as this causes misc
     build failures.
   * Emit a warning when running lh_build without a config/ directory.
   * Migrate a In_list candidate to grep -E.
   * Migrate a few uses of grep to In_list.
   * Add In_list function to extract various bits of code that did (or should
     have done) the same job.
   * Remove a useless space
   * Consolidate grep text searching predicates to use "grep -qs"
   * Revert aborting live d-i installation if minimal/stripped is selected and
     instead attempt to not break the chroot too much in this case
   * Replace another unweildy "if P1 || P2" statement with its "case" equivalent.
   * Remove more imported whitespaces.
   * Adjust "lh_config --help" and lh_config(1) so that the -m option corresponds
     with --mirror-bootstrap isntead of --mirror-binary-security.
   * Only deference symlinks on usb-hdd filesystems that do not support symlinks.
   * Add support for ext2 and ext3 to lh_source_usb-hdd.
   * Add support for usb-hdd on sparc (requires parted 1.8 from experimental).
   * Refactor mkfs handling.
   * Refactor partition table type handling.
   * Refactor partition type handling.
   * Prefix mount and unmount in lh_binary_debian-installer with LH_ROOT_COMMAND.
   * Add support for sparc to lh_binary_debian-installer.
   * Add support for the sparc architecture.
   * Add lh_binary_silo and associated templates to support the SILO bootloader.
   * Ensure apt-utils is installed in the helpers it is required.
   * Abort if "live" d-i installation is attempted with minimal or stripped
     LH_PACKAGES_LISTS
   * Fix truncated Echo_breakage messages.
   * Fix d-i locations in yaboot entries.
   * Fix trivial typographic error ("flavor" => "flavour")
   * Only deference symlinks on FAT{16,32} partitions on usb-hdd.
   * Replace install.amd/install -> install.386/install symlink with a real copy.
   * Revert always deferencing symlinks when installing some binary includes.
   * Add Echo_breakage for messages preceeding often-breaking stages and use
     before {c,}debootstrap calls
   * Replace a few unweildy "if" statements with their "case" equivalents
   * Move Etch syslinux workaround closer to the original definitions
   * Use correct location of powerpc d-i images.
   * Set correct d-i image type on usb-hdd and tar image types
   * Remove pointless "echo" statements pre- and post- cdebootstrap
   * Allow LH_APT_SECURE to disable package cdebootstrap package authentication
   * Rename USE_NETBOOT_DI to DI_IMAGE_TYPE
   * Always deference symlinks when installing some binary includes to fix
     breakage on amd64.
   * Ensure "Using system defaults" message appears when calling lh_config
     without --verbose
   * Don't skip single dot-files in the root directory of binary and chroot local
     includes
   * Don't exclude live-installer when LH_DEBIAN_INSTALLER=live
   * Fix a few bogus guards in lh_binary_debian-installer
   * Show contents of /etc/default/live-helper in bug info collection script
 .
   [ Daniel Baumann ]
   * Removing imported whitespaces.
   * Parsing local arguments to lh_config last.
   * Correcting order where system-wide lh_config defaults file is read, thanks
     to Juergen Fiedler <juergen.fiedler@gmail.com>.
   * Only saving source indices to indices cache if source indices are actually
     existing, thanks to Thanatermesis <thanatermesis.ecvs@elivecd.net>.
   * Correcting path for system-wide lh_config defaults file.
 .
   [ Marco Amadori ]
   * Added support for /etc/live-helper.
   * Removed a useless space.
Checksums-Sha1: 
 2d2c7b6dd4f31c97cf5e83043a452f3ad340bfad 1240 live-helper_1.0~a48-1.dsc
 4f1832200804012adba1a60f66083b0e96be8ad5 1949695 live-helper_1.0~a48.orig.tar.gz
 84d0f603af301c89d7c198b18f41d92a9b10011a 16173 live-helper_1.0~a48-1.diff.gz
 9cb470a82934e53f63dad63798697c9559982827 1904156 live-helper_1.0~a48-1_all.deb
Checksums-Sha256: 
 fce158b6243110a6ad75caca65f37a0d1073bd20278bf0d36df9efc7a9b4988f 1240 live-helper_1.0~a48-1.dsc
 fb6b065059bd1ee63af62733c29b06e0d8c1fdecff36ae227de173def97e9986 1949695 live-helper_1.0~a48.orig.tar.gz
 58fae4746938b98ebc4061e291132ace1983607896522efd4a0910437f153aa3 16173 live-helper_1.0~a48-1.diff.gz
 86bd794f957b3cc8e7d9f0eaa06d8fa768ac2010abe01266faef964f25684de4 1904156 live-helper_1.0~a48-1_all.deb
Files: 
 f19288225367d6070c31f796bf0b6f62 1240 misc optional live-helper_1.0~a48-1.dsc
 629fd7e656d6919f31d253ff9cc859d8 1949695 misc optional live-helper_1.0~a48.orig.tar.gz
 f19524342fa09248973344fed192be9b 16173 misc optional live-helper_1.0~a48-1.diff.gz
 823747b0e45805d5c38060c03461be9a 1904156 misc optional live-helper_1.0~a48-1_all.deb

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

iEYEARECAAYFAkh7l2EACgkQ+C5cwEsrK54s4wCfRSjznTj5ZGQ+YybsDmv4JA3J
hAkAn18z+MXstxfvDUQEMwuH5cZzquNk
=W/vd
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 18 Aug 2008 07:34:38 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: Fri Apr 18 09:07:49 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.