Ticket #1403 (new defect)
make-chroot needs to create policy-rc.d first
Reported by: | jdreed | Owned by: | jdreed |
---|---|---|---|
Priority: | high | Milestone: | Current Semester |
Component: | -- | Keywords: | |
Cc: | Fixed in version: | ||
Upstream bug: |
Description
Creating policy-rc.d after debootstrap is pointless, because then everything in debootstrap has ignored it. In Saucy, this means udev has started with the chroot's /run as its cwd, and so the umount fails. I have this in a local commit and need to push it.
Change History
comment:2 Changed 10 years ago by jdreed
Hrm, apparently my local checkout is also completely out of skew, so I'll fix it up and push it, but basically, the patch is:
--- a/build-server/make-chroot +++ b/build-server/make-chroot @@ -121,8 +121,9 @@ if [ "$TYPE" = "overlayfs" ]; then else TARGET="$TMPDIR/root" fi -debootstrap --variant=buildd --include=apt,apt-utils,gnupg,build-essential,fakeroot --arch "$ARCH" "$SUITE" "$TARGET" "$MIRROR" +mkdir -p "$TARGET/usr/sbin" install -m a=rx,u+w "$DATA/policy-rc.d" "$TARGET/usr/sbin/" +debootstrap --variant=buildd --include=apt,apt-utils,gnupg,build-essential,fakeroot --arch "$ARCH" "$SUITE" "$TARGET" "$MIRROR" mkdir -p "$TARGET/dev/pts" # /dev/shm is a symlink to /run/shm on modern distros # So if it's not a symlink, then mkdir (and fail if it's something
comment:3 Changed 10 years ago by jdreed
Adam notes that sbuild-createchroot appears to DTRT so maybe we should look into tweaking make-chroot to use more standard utilities. In particular, I bet someone else has already solved the problem of "The chroot uses /run and the host uses /var/run" or vice-versa, and I'd love for that not to be our problem. (Though the last of the /var/run distros are dying anyway.)
Can you post your patch for this? I think I'm running into something similar using mk-sbuild, and it'd be good to land a fix there.