Debian Bug report logs - #706679
Missing Depends: file

version graph

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

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

Date: Fri, 3 May 2013 10:03:02 UTC

Severity: minor

Found in version live-config/3.0.23-1

Fixed in version 4.0~a20-1

Done: Daniel Baumann <daniel.baumann@progress-technologies.net>

Reply or subscribe to this bug.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Live Systems Maintainers <debian-live@lists.debian.org>:
Bug#706679; Package live-config. (Fri, 03 May 2013 10:03:06 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 Live Systems Maintainers <debian-live@lists.debian.org>. (Fri, 03 May 2013 10:03:06 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: Missing Depends: file
Date: Fri, 03 May 2013 19:58:37 +1000
Package: live-config
Version: 3.0.23-1
Severity: minor

During reboot of a minimal live image, I get

    live-boot: caching reboot files...
    /lib/live/boot-init.sh: 38: /lib/live/boot-init.sh: file: not found
    /lib/live/boot-init.sh: 38: /lib/live/boot-init.sh: file: not found
    /lib/live/boot-init.sh: 38: /lib/live/boot-init.sh: file: not found
    expr: syntax error


    Please remove the disc, close the tray (if any) and press ENTER to continue:

This is because file is not installed.

AFAICT, there are no hard depends anywhere in live-config's dependency
chain, so it should either add one or check for file's presence before
using it.



Information forwarded to debian-bugs-dist@lists.debian.org, Live Systems Maintainers <debian-live@lists.debian.org>:
Bug#706679; Package live-config. (Fri, 03 May 2013 10:42:04 GMT) 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 Live Systems Maintainers <debian-live@lists.debian.org>. (Fri, 03 May 2013 10:42:04 GMT) Full text and rfc822 format available.

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

From: "Trent W. Buck" <trentbuck@gmail.com>
To: 706679@bugs.debian.org
Subject: Re: Missing Depends: file
Date: Fri, 3 May 2013 20:38:33 +1000
Trent W. Buck wrote:
> Package: live-config
> Version: 3.0.23-1
> Severity: minor
>
> During reboot of a minimal live image, I get
>
>     live-boot: caching reboot files...
>     /lib/live/boot-init.sh: 38: /lib/live/boot-init.sh: file: not found
>     /lib/live/boot-init.sh: 38: /lib/live/boot-init.sh: file: not found
>     /lib/live/boot-init.sh: 38: /lib/live/boot-init.sh: file: not found
>     expr: syntax error
>
>
>     Please remove the disc, close the tray (if any) and press ENTER to continue:
>
> This is because file is not installed.

The expr line is an unrelated bug; if I install file, the expr line
remains.



Marked as fixed in versions 4.0~a20-1. Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Mon, 06 May 2013 19:03:15 GMT) Full text and rfc822 format available.

Marked Bug as done Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Mon, 06 May 2013 19:03:16 GMT) Full text and rfc822 format available.

Notification sent to "Trent W. Buck" <trentbuck@gmail.com>:
Bug acknowledged by developer. (Mon, 06 May 2013 19:03:17 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Live Systems Maintainers <debian-live@lists.debian.org>:
Bug#706679; Package live-config. (Thu, 02 Jan 2014 18:21:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stuart Pook <slp184732@pook.it>:
Extra info received and forwarded to list. Copy sent to Live Systems Maintainers <debian-live@lists.debian.org>. (Thu, 02 Jan 2014 18:21:10 GMT) Full text and rfc822 format available.

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

From: Stuart Pook <slp184732@pook.it>
To: 706679@bugs.debian.org
Cc: "Trent W. Buck" <trentbuck@gmail.com>
Subject: Re: Missing Depends: file
Date: Thu, 02 Jan 2014 19:19:12 +0100
I have the "expr: syntax error" as well

my BOOT_DEVICE is "ram" so "device_is_USB_flash_drive" is called with
the argument "ram". device_is_USB_flash_drive does "expr substr ram 6 3"
which sets DEVICE to an empty string and the following "expr substr
$DEVICE 1 2" is a syntax error for expr(1)

this is the end of what I see if I run "sh -x /lib/live/boot-init.sh"

+ read DEVICE MOUNT REST
+ read DEVICE MOUNT REST
+ read DEVICE MOUNT REST
+ echo ram
+ exit 0
+ BOOT_DEVICE=ram
+ device_is_USB_flash_drive ram
+ expr substr ram 6 3
+ DEVICE=
+ expr substr 1 2
expr: syntax error
+ [  != sd ]
+ return 1
+ MESSAGE=Please remove the disc, close the tray (if any)
+ [ -x /usr/bin/eject ]
+ [ 1 ]
+ [ -x /bin/plymouth ]
+ stty sane
+ printf \n\nPlease remove the disc, close the tray (if any) and press
ENTER to continue:

Please remove the disc, close the tray (if any) and press ENTER to
continue:+ read x

root@52-54-00-12-34-56:~# cat /proc/mounts
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=10240k,nr_inodes=385233,mode=755 0 0
devpts /dev/pts devpts
rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=309556k,mode=755 0 0
ram /lib/live/mount/medium ramfs rw,relatime 0 0
/dev/loop0 /lib/live/mount/rootfs/filesystem.squashfs squashfs
ro,noatime 0 0
tmpfs /lib/live/mount/overlay tmpfs ro,noatime,size=524288k 0 0
tmpfs /lib/live/mount/overlay tmpfs rw,noatime,size=524288k,mode=755 0 0
aufs / aufs rw,relatime,si=6f4f16ea97e63263,noxino 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=619100k 0 0
root@52-54-00-12-34-56:~# cat /proc/cmdline
quickreboot criteo_conf=tftp://10.251.0.10/hpc/setup.sh
ramdisk-size=550m fetch=tftp://10.0.2.2/filesystem.squashfs boot=live
initrd=/live/initrd.img BOOT_IMAGE=/live/vmlinuz



Information forwarded to debian-bugs-dist@lists.debian.org, Live Systems Maintainers <debian-live@lists.debian.org>:
Bug#706679; Package live-config. (Thu, 02 Jan 2014 23:42:04 GMT) 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 Live Systems Maintainers <debian-live@lists.debian.org>. (Thu, 02 Jan 2014 23:42:04 GMT) Full text and rfc822 format available.

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

From: "Trent W. Buck" <trentbuck@gmail.com>
To: Stuart Pook <slp184732@pook.it>
Cc: 706679@bugs.debian.org
Subject: Re: Missing Depends: file
Date: Fri, 3 Jan 2014 10:38:21 +1100
[Message part 1 (text/plain, inline)]
Stuart Pook wrote:
> I have the "expr: syntax error" as well

expr doesn't appear in the codebase as at debian/4.0_alpha30-1.
This appears to be the commit that fixes it.

The new version could probably use SUS parameter expansion:

    $ busybox ash


    BusyBox v1.18.4 (Ubuntu 1:1.18.4-2ubuntu2) built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    $ DEVICE=/dev/sda1p1
    $ DEVICE=${DEVICE#/dev/} DEVICE=${DEVICE%%[0-9]*}
    $ echo "$DEVICE"
    sda


commit 3ce6f9e8fe33cfdda99b0bffbb3fa69063014047
Author: Daniel Baumann <mail@daniel-baumann.ch>
Date:   Mon May 6 20:42:55 2013 +0200

    Replacing expr usage in initscript for eject boot media with something less error prone.

diff --git a/bin/boot-init.sh b/bin/boot-init.sh
index 83f37bc..3027d28 100755
--- a/bin/boot-init.sh
+++ b/bin/boot-init.sh
@@ -80,10 +80,17 @@ get_boot_device()
 device_is_USB_flash_drive()
 {
        # remove leading "/dev/" and all trailing numbers from input
-       DEVICE=$(expr substr ${1} 6 3)
+       DEVICE=$(echo ${1} | sed -e 's|/dev/||' -e 's|[0-9].*$||')

        # check that device starts with "sd"
-       [ "$(expr substr ${DEVICE} 1 2)" != "sd" ] && return 1
+       case "${DEVICE}" in
+               sd*)
+                       ;;
+
+               *)
+                       return 1
+                       ;;
+       esac

        # check that the device is an USB device
        if readlink /sys/block/${DEVICE} | grep -q usb
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 07:27:38 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.