#997094 debootstrap: 764:debootstrap cp "$0" "$TARGET/ instead of cp "/usr/sbin/$0" "$TARGET/ #997094
- Package:
- debootstrap
- Source:
- debootstrap
- Submitter:
- Veek
- Date:
- 2024-02-14 13:00:02 UTC
- Severity:
- important
Dear Maintainer,
debootstrap line 764 copies debootstrap into the mountpoint/debootsrap but
cp needs the fully-qualified path - not just $0/progname
Also in functions:1520 "$2" can sometimes be set to //path which causes
the subsequent perl line to fail (difficult to reproduce) So ${2#/} worked
for me - it currently works for me with no modification.
I've tested this on Bash, Dash, Zsh and Tcsh on Linux and FreeBSD and
${0} already expands to the fully-qualified path. It never expands to
${0}/progname as that would always fail. Can you give and example of
where this fails?
Can you give an example of where this happens? You could also submit a
patch if you wish.