Description of problem: "debootstrap --second-stage" cannot start because deboostrap shebang "#!/bin/sh" has been changed to "#!/usr/bin/sh" and this path is not valid inside the chroot previously installed by "debootstrap --foreign". Version-Release number of selected component (if applicable): debootstrap-1.0.109-2.fc29.noarch How reproducible: 100% Steps to Reproduce: 1. sudo debootstrap --arch=i386 --foreign --variant=minbase --no-check-gpg \ stretch i386-base 2. sudo chroot i386-base debootstrap/debootstrap --second-stage Actual results: chroot: failed to run command 'debootstrap/debootstrap': No such file or directory Expected results: I: Installing core packages... I: Unpacking required packages... I: Unpacking libacl1:i386... I: Unpacking libattr1:i386... I: Unpacking libaudit-common... I: Unpacking libaudit1:i386... I: Unpacking base-files... I: Unpacking base-passwd... I: Unpacking bash... I: Unpacking libbz2-1.0:i386... I: Unpacking libdebconfclient0:i386... ... I: Configuring the base system... I: Configuring gpgv... I: Configuring debian-archive-keyring... I: Configuring libstdc++6:i386... I: Configuring adduser... I: Configuring libapt-pkg5.0:i386... I: Configuring apt... I: Configuring libc-bin... I: Base system installed successfully. Additional info: if I edit i386-base/debootstrap/debootstrap to replace "#!/usr/bin/sh" by "#!/bin/sh" it works. I've checked the content of debootstrap_1.0.109.tar.gz and debootstrap uses the good shebang. The path is changed during the rpmbuild install phase: Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.OcJ9Al ... + /usr/lib/rpm/redhat/brp-mangle-shebangs mangling shebang in /usr/sbin/debootstrap from /bin/sh to #!/usr/bin/sh Processing files: debootstrap-1.0.109-2.fc29.noarch
This patch fixes the problem: diff --git a/debootstrap.spec b/debootstrap.spec index 3b5ebfd..324a327 100644 --- a/debootstrap.spec +++ b/debootstrap.spec @@ -23,6 +23,8 @@ Recommends: ubu-keyring Recommends: debian-keyring %endif +%global __brp_mangle_shebangs_exclude /bin/sh + %description debootstrap is used to create a Debian base system from scratch, without requiring the availability of dpkg or apt. It does this by downloading
(In reply to Laurent Vivier from comment #1) > This patch fixes the problem: > > diff --git a/debootstrap.spec b/debootstrap.spec > index 3b5ebfd..324a327 100644 > --- a/debootstrap.spec > +++ b/debootstrap.spec > @@ -23,6 +23,8 @@ Recommends: ubu-keyring > Recommends: debian-keyring > %endif > > +%global __brp_mangle_shebangs_exclude /bin/sh > + > %description > debootstrap is used to create a Debian base system from scratch, without > requiring the availability of dpkg or apt. It does this by downloading Thanks for the patch , that is what I need . I will apply it soon as possible (maybe this weekend) Thanks for the report also :)
debootstrap-1.0.109-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2dee2f3447
debootstrap-1.0.109-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-6906464d45
debootstrap-1.0.109-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-6906464d45
debootstrap-1.0.109-3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2dee2f3447
I've tested the package from koji and it works fine for me. https://koji.fedoraproject.org/koji/buildinfo?buildID=1168303
debootstrap-1.0.109-3.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.
debootstrap-1.0.109-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
This was fixed in Fedora 31, but happens again in Fedora 32 (1.0.119-1.fc32)
FEDORA-2020-1afb7f4ed5 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-1afb7f4ed5
FEDORA-2020-1afb7f4ed5 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-1afb7f4ed5` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-1afb7f4ed5 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-1afb7f4ed5 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.