New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debootstrap: fix up paths to {chroot,unshare}, small clean up #48754
Conversation
Success on aarch64-linux (full log) Attempted: debootstrap Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: debootstrap Partial log (click to expand)
|
--replace 'CHROOT_CMD="chroot ' 'CHROOT_CMD="${coreutils}/bin/chroot ' \ | ||
--replace 'CHROOT_CMD="unshare ' 'CHROOT_CMD="${utillinux}/bin/unshare ' \ | ||
--replace /usr/bin/dpkg ${dpkg}/bin/dpkg \ | ||
--replace '#!/bin/sh' '#!/bin/bash' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not replace anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interpreter gets patched, yes (if that's what you meant). The issue is that the script relies on some bash-isms which is why I change sh
to bash
here. I left a comment on the upstream commit here that perhaps makes more sense - https://salsa.debian.org/installer-team/debootstrap/commit/15b20e644b407602288402f97fc348b00921cc54#note_48468 LMK If not!
Sorry if I misunderstood the question and thanks for the merge! Would be nice to have some sort of a backport too. The version on the stable branch is a bit behind but not working so perhaps it would be fine to backport the package updates + this commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting because debian also has dash as /bin/sh.
backport: [detached HEAD b76a837] debootstrap: 1.0.107 -> 1.0.108 (#46294) |
Fixes #45915.
Motivation for this change
Not feeling strongly about the various clean ups; the minimal changes to make debootstrap work again are changing the
$CHROOT_CMD
variable and changing the script interpreter fromsh
tobash
. Also the way the previous wrapper was implemented would retain references to gcc and various other build tools provided by stdenv.Would be nice to have this in some form on 18.09 too as debootstrap on the release branch is also not functional ATM.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)Haven't tested very extensively outside of building stable / unstable Debian chroot.