Debian Bug report logs - #340058
running debootstrap with zsh fails: function repeat is shell reserved word

version graph

Package: debootstrap; Maintainer for debootstrap is Debian Install System Team <debian-boot@lists.debian.org>; Source for debootstrap is src:debootstrap.

Reported by: Michael Prokop <mika@grml.org>

Date: Sun, 20 Nov 2005 17:33:04 UTC

Severity: important

Found in version debootstrap/0.3.1.7

Fixed in version debootstrap/1.0.11

Done: Colin Watson <cjwatson@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, Anthony Towns <ajt@debian.org>:
Bug#340058; Package debootstrap. Full text and rfc822 format available.

Acknowledgement sent to Michael Prokop <mika@grml.org>:
New Bug report received and forwarded. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

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

From: Michael Prokop <mika@grml.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: running debootstrap with zsh fails: function repeat is shell reserved word
Date: Sun, 20 Nov 2005 18:21:33 +0100
Package: debootstrap
Version: 0.3.1.7
Severity: important


The function 'repeat' in /usr/lib/debootstrap/functions causes a problem
if /bin/sh is not linked to bash but zsh:

mika@grml ~ % debootstrap
/usr/lib/debootstrap/functions:951: parse error near `()'
I: usage: [OPTION]... <suite> <target> [<mirror> [<script>]]
I: Try `debootstrap --help' for more information.
E: You must specify a suite and a target.

,---- [ a short demonstration ]
| % cat ./test_repeat
| function repeat () {
|   echo $*
| }
| repeat foobar
|
| % zsh
| % ./test_repeat foobar
| ./test_repeat:6: parse error near `\n'
| % zsh ./test_repeat
| %
| % sh ./test_repeat foobar
| ./test_repeat:6: parse error near `\n'
| % which sh
| /bin/sh
| % ls -l /bin/sh
| lrwxrwxrwx  1 root root 8 2005-11-20 17:50 /bin/sh -> /bin/zsh
| % bash ./test_repeat foobar
| foobar
| %
`----

AFAICS the problem is that 'repeat' is a shell reserved word in zsh:

% zsh -c 'which repeat'
repeat: shell reserved word

while it's not in bash:

% bash -c 'type repeat'
bash: line 0: type: repeat: not found

A fix would be either to use /bin/bash in the shebang line of
debootstrap (this is my current fix) or to rename function 'repeat' to
something different.

regards,
-mika-



Tags added: pending Request was from Colin Watson <cjwatson@debian.org> to control@bugs.debian.org. (Tue, 13 Jan 2009 19:30:03 GMT) Full text and rfc822 format available.

Reply sent to Colin Watson <cjwatson@debian.org>:
You have taken responsibility. (Thu, 19 Feb 2009 00:15:03 GMT) Full text and rfc822 format available.

Notification sent to Michael Prokop <mika@grml.org>:
Bug acknowledged by developer. (Thu, 19 Feb 2009 00:15:04 GMT) Full text and rfc822 format available.

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

From: Colin Watson <cjwatson@debian.org>
To: 340058-close@bugs.debian.org
Subject: Bug#340058: fixed in debootstrap 1.0.11
Date: Thu, 19 Feb 2009 00:02:03 +0000
Source: debootstrap
Source-Version: 1.0.11

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

debootstrap-udeb_1.0.11_all.udeb
  to pool/main/d/debootstrap/debootstrap-udeb_1.0.11_all.udeb
debootstrap_1.0.11.dsc
  to pool/main/d/debootstrap/debootstrap_1.0.11.dsc
debootstrap_1.0.11.tar.gz
  to pool/main/d/debootstrap/debootstrap_1.0.11.tar.gz
debootstrap_1.0.11_all.deb
  to pool/main/d/debootstrap/debootstrap_1.0.11_all.deb



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

Debian distribution maintenance software
pp.
Colin Watson <cjwatson@debian.org> (supplier of updated debootstrap 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: Wed, 18 Feb 2009 23:46:12 +0000
Source: debootstrap
Binary: debootstrap debootstrap-udeb
Architecture: source all
Version: 1.0.11
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Description: 
 debootstrap - Bootstrap a basic Debian system
 debootstrap-udeb - Bootstrap the Debian system (udeb)
Closes: 340058 350635 410787 467571 484869 500759 503460 513488
Changes: 
 debootstrap (1.0.11) unstable; urgency=low
 .
   * Add (Ubuntu) jaunty as a symlink to gutsy.
   * Clarify that --second-stage is needed to complete the bootstrapping
     process after --foreign.
   * Fix --make-tarball= option (closes: #484869).
   * Fix old Debian scripts and all Ubuntu scripts to cope with Anthony's
     change in 1.0.8 to make --second-stage not bother recalculating required
     and base.
   * Rename 'repeat' to 'repeatn', since 'repeat' is a reserved word in zsh;
     although strictly speaking this seems like an incompatibility in zsh
     when linked to /bin/sh (closes: #340058).
   * Fix --unpack-tarball= option (thanks, Torsten Landschoff; closes:
     #500759).
   * Fix handling of relative DEBOOTSTRAP_DIR (thanks, Mikhail Gusarov;
     closes: #503460).
   * Cope with ancient versions of chroot(8) that don't call chdir() (thanks,
     Patrik Arvhult; closes: #350635).
   * Recommend gnupg for --keyring option (thanks, Robert Millan; closes:
     #467571).
   * Note that you can't --include packages with non-required Pre-Depends
     (see #487908).
   * Mention /sys in EXAMPLE section of manual page, and use "defaults"
     rather than "none" as the mount options for /proc (thanks, Raúl Sánchez
     Siles; closes: #410787).
   * Add /dev/console to devices.tar.gz (after all, MAKEDEV's 'consoleonly'
     was added for boot-floppies in the first place; see
     https://lists.ubuntu.com/archives/ubuntu-devel/2009-January/027230.html).
   * Add support for squeeze (closes: #513488).
Checksums-Sha1: 
 a049a38d481787affadbb54ed822f42909c9d031 1072 debootstrap_1.0.11.dsc
 68d069e4d108c9256f23b9f159e0e3adedd25f19 49367 debootstrap_1.0.11.tar.gz
 2bbf2edc8a231eb0444fc011a459f18447b4b17b 52968 debootstrap_1.0.11_all.deb
 6ced10cd444b50793275810bc7f94350b914b663 17164 debootstrap-udeb_1.0.11_all.udeb
Checksums-Sha256: 
 76ab5dae18fd97ae696c999bf1c03c07d132b58d82ff9be5b16acc6b2c0303c7 1072 debootstrap_1.0.11.dsc
 9a596458c15b5b242385637b8601391d27ee46007b3968f917abb91a47ed1176 49367 debootstrap_1.0.11.tar.gz
 4f1f517c4c1d2103b0d05ca0c8b862685a0c6e5625ea0ead8b8d6c12f20a8133 52968 debootstrap_1.0.11_all.deb
 226ea5fdac35ca47aacbe7d3039d5d7ba09f5762b5b23bbfaf6539ee3da90879 17164 debootstrap-udeb_1.0.11_all.udeb
Files: 
 92bd3af012e0ad39ccc56b80bb70e0dd 1072 admin extra debootstrap_1.0.11.dsc
 6e52cb3a7084d0ed89a8ba0fbd95543b 49367 admin extra debootstrap_1.0.11.tar.gz
 0098912b7e2612df68b52424ad7848fe 52968 admin extra debootstrap_1.0.11_all.deb
 68a32f4fc4b11448cff666e372d50559 17164 debian-installer extra debootstrap-udeb_1.0.11_all.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Colin Watson <cjwatson@debian.org> -- Debian developer

iD8DBQFJnJ7a9t0zAhD6TNERAvveAKCGQ3Bg4ACdkjjbMXd0LSQJZ59eGQCfVkQ5
PDYgQ6y1Aus6Nw3lqzdq1Z8=
=QJ0h
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 19 Mar 2009 07:33:47 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: Wed Apr 16 23:37:11 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.