Bug#773765: pbuilder issue which is related to systemd

Martin Pitt mpitt at debian.org
Thu Dec 25 10:39:16 UTC 2014


Hey Thorsten,

Thorsten Glaser [2014-12-24 15:24 +0000]:
> It’s not strictly necessary for throwaway chroots to actually
> have CHROOT/run a tmpfs, plus there are setup costs involved
> that are tricky to get right in a generic way

Agreed. The main property is that it must be transient, i. e. exist
and empty on the start of the chroot and cleaned up at the end (but
that's what pbuilder and friends already do.

> >or we stick to the weird
> >debianism of /run/shm and then initscripts sets up /dev/shm b /run/shm
> 					    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> eh what?

That was an unicode arrow like -> but it apparently got damaged in
your MUA. I meant it sets up a /dev/shm -> /run/shm symlink.

> The release goal page mentions that /dev/shm is going to eventually

That's not possible. The upstream glibc location is /dev/shm, so we'll
always need at least a symlink.

> Thanks for digging in deeper. I did not know that initscripts
> broke this setup

Well, I think the old postinst in wheezy covered up pretty much every
corner case (and it was hundreds of lines long). Apparently the
cleanup was a bit overzealous to get all the corner cases right.

> I wonder *why* there is a different setup for chroots vs. the
> main system in the first place?

It's not explicit in initscripts, it just needs to take into account
that chroots are not "booted" -- i. e. there is no init system to set
up /run or /dev/ for you, these directories are often only used
exactly as they are in the tarball/image/original dir.

> A system could just have the
> chroot setup, with early userspace mounting a tmpfs “over” it,
> so we have the same thing everywhere. Less code paths.

Agreed; if schroot, pbuilder etc. would all mount /dev/, /dev/pts,
/run etc., they would behave very similar to booting. But e. g.
schroot makes this configurable (i. e. it's not guaranteed to happen
everywhere) and there's also the issue of using/upgrading old chroots
which have these funny symlinks in place.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



More information about the Pbuilder-maint mailing list