Lionel Elie Mamane
2011-Nov-08 11:58 UTC
[Pkg-xen-devel] Bug#648029: xen-utils-common: /usr/lib/xen-common/bin/xen-toolstack (and thus /usr/sbin/xm) works with bash, but not dash
Package: xen-utils-common Version: 4.1.2-1 Severity: grave Justification: renders package unusable (Grave because dash is the default /bin/sh) With dash 0.5.5.1-7.4 as /bin/sh, /usr/sbin/xm enters an infinite loop of reexcuting itself. When run with bash, it works correctly. I traced that to /usr/lib/xen-common/bin/xen-toolstack; here's the diff between "/bin/sh -x /usr/sbin/xm" and "/bin/bash -x /usr/sbin/xm"; the output of "/bin/bash -x /usr/sbin/xm" has been post-processed to remove spurious differences, such as multiple "+" at start of line (that in bash show recursion/inclusion level), "'['" vs "[", etc. + [ -z ] + check xm + [ xm = xm ] -+ PATH=/usr/lib/xen-4.1/bin command -v xm -+ cmd_xm=/usr/sbin/xm ++ PATH=/usr/lib/xen-4.1/bin ++ command -v xm ++ cmd_xm=/usr/lib/xen-4.1/bin/xm + check xl + [ xl = xm ] + [ xl = xl ] -+ PATH=/usr/lib/xen-4.1/bin command -v xl -+ cmd_xl=/usr/sbin/xl -+ [ /usr/sbin/xm ] -+ echo /usr/sbin/xm -+ TOOLSTACK=/usr/sbin/xm ++ PATH=/usr/lib/xen-4.1/bin ++ command -v xl ++ cmd_xl=/usr/lib/xen-4.1/bin/xl ++ [ /usr/lib/xen-4.1/bin/xm ] ++ echo /usr/lib/xen-4.1/bin/xm ++ TOOLSTACK=/usr/lib/xen-4.1/bin/xm + RET=0 + [ 0 -eq 0 ] -+ basename /usr/sbin/xm ++ basename /usr/lib/xen-4.1/bin/xm + [ xm != xm ] -+ exec /usr/sbin/xm ++ exec /usr/lib/xen-4.1/bin/xm Plainly, the idiom "PATH=FOO command -v bar" does not work with dash. This seems to work: local PATH_old PATH_old="${PATH}" PATH=FOO command -v bar PATH="${PATH_old}" Or maybe more devious (but untested): local PATH PATH=FOO command -v bar -- System Information: Debian Release: 6.0.3 APT prefers stable APT policy: (500, 'stable'), (400, 'testing'), (300, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages xen-utils-common depends on: ii gawk 1:3.1.7.dfsg-5 GNU awk, a pattern scanning and pr ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip ii udev 164-3 /dev/ and hotplug management daemo ii xenstore-utils 4.0.1-4 Xenstore utilities for Xen xen-utils-common recommends no packages. xen-utils-common suggests no packages. -- Configuration Files: /etc/xen/xend-config.sxp changed: (network-script 'network-camp netdev=eth0 bridge=xenbr0') (vif-script 'vif-bridge bridge=xenbr0') (dom0-min-mem 196) (enable-dom0-ballooning yes) (total_available_memory 0) (dom0-cpus 0) (vncpasswd '') (keymap 'fr-be') -- no debconf information
debian-bugs at henrik.synth.no
2011-Nov-16 08:09 UTC
[Pkg-xen-devel] Bug#648029: xen-utils-common: /usr/lib/xen-common/bin/xen-toolstack (and thus /usr/sbin/xm) works with bash, but not dash
I can confirm that 648029.patch fixes this issue. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20111116/27aa6b56/attachment.html>
Olivier Hanesse
2011-Nov-21 15:00 UTC
[Pkg-xen-devel] Bug#648029: xen-utils-common: /usr/lib/xen-common/bin/xen-toolstack (and thus /usr/sbin/xm) works with bash, but not dash
How about changing the shebang of the xen-toolstack-wrapper by bash directly to avoid further issues ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20111121/471e607f/attachment.html>
Debian Bug Tracking System
2012-Apr-16 09:21 UTC
[Pkg-xen-devel] Bug#648029: marked as done (xen-utils-common: /usr/lib/xen-common/bin/xen-toolstack (and thus /usr/sbin/xm) works with bash, but not dash)
Your message dated Mon, 16 Apr 2012 09:18:49 +0000 with message-id <E1SJi5B-0002lP-Aw at franck.debian.org> and subject line Bug#648029: fixed in xen 4.1.2-4 has caused the Debian Bug report #648029, regarding xen-utils-common: /usr/lib/xen-common/bin/xen-toolstack (and thus /usr/sbin/xm) works with bash, but not dash to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 648029: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648029 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Lionel Elie Mamane <lionel at mamane.lu> Subject: xen-utils-common: /usr/lib/xen-common/bin/xen-toolstack (and thus /usr/sbin/xm) works with bash, but not dash Date: Tue, 8 Nov 2011 12:58:32 +0100 Size: 4526 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120416/cb29afc8/attachment-0002.mht> -------------- next part -------------- An embedded message was scrubbed... From: Bastian Blank <waldi at debian.org> Subject: Bug#648029: fixed in xen 4.1.2-4 Date: Mon, 16 Apr 2012 09:18:49 +0000 Size: 8387 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120416/cb29afc8/attachment-0003.mht>
Maybe Matching Threads
- Bug#648029: patch for Bug#648029 xen-toolstack (and thus xm) works with bash, but not dash
- Bug#584804: xen-utils-common: xen-version does not include "extra" component; breaks xen 3.2-1 from lenny
- Processed: Retitle and reassign "xcp-xapi fails to start" to xen-utils-common as "xend shouldn't start if TOOLSTACK is not xm"
- Bug#677244: xen-utils-common: xen-toolstack fails if either `xm` or `xl` is not found in xen-dir
- Bug#532603: xen-utils-3.2-1: incorrectly calls network-script