[buildd-tools-devel] Corrections for schroot profile templates
Roger Leigh
rleigh at codelibre.net
Thu Aug 27 21:32:26 UTC 2015
Hi,
I've been starting to do a bit more work on the schroot master branch
after it being stalled for quite a bit. I've almost completed native
FreeBSD porting which was started over 18 months back but not finished
(as opposed to kFreeBSD, which was already done). While doing this,
I've started to refactor the "profile templates" which are used to
generate the files in /etc/schroot/<profile>/(fstab|copyfiles|nssdatabases).
I've switched from lots of files to the template attached. One thing I
noticed are some discrepancies in the buildd build tree bind mount
between the different platforms, and also the large similarity with the
sbuild template (which was one of the reasons for merging them, so these
differences would be more easily seen). In the future I'd like to
remove the generation step entirely and just use a file with content
similar to this (probably more nicely structured YAML though).
- do we need to retain the "buildd" profile or could buildds just use
the "sbuild" profile? It's already identical on Linux. A symlink could
be retained for backward compatibility if really required.
Could we remove it and make the sbuild profile the same on all
platforms? I think the discrepancies are purely historical.
- are any other changes or additions required here?
Anything missing from the base set of default mounts which we need?
Also, the desktop profile in particular might not be very useful--I
haven't been using it myself, so I don't know exactly what might be
missing or redundant here. If it's unused/untested/unverifiable, I'd
favour of removal over shipping likely broken configurations.
Regards,
Roger
-------------- next part --------------
# fstab template -*- tab-width:32 -*-
# platform profile content
<all> <all> # fstab: static file system information for chroots.
<all> <all> # Note that the mount point will be prefixed by the chroot path
<all> <all> # (CHROOT_PATH)
<all> <all> #
<all> <all> # <file system> <mount point> <type> <options> <dump> <pass>
# procfs; should we be binding or mounting a new copy (does this affect namespace behaviour?)
kfreebsd <all> proc /proc linprocfs rw 0 0
gnu <all> /proc /proc none bind 0 0
linux <all> /proc /proc none rw,bind 0 0
# devices
freebsd|kfreebsd default|sbuild|buildd|desktop dev /dev devfs rw 0 0
freebsd|kfreebsd default|sbuild|buildd|desktop dev /dev/fd fdescfs rw 0 0
gnu <all> /dev /dev none bind 0 0
gnu <all> /servers /servers none bind 0 0
linux default|desktop /dev /dev none rw,bind 0 0
linux default|sbuild|buildd|desktop /dev/pts /dev/pts none rw,bind 0 0
# sysfs
linux <all> /sys /sys none rw,bind 0 0
# homes
freebsd default|desktop /usr/home /usr/home nullfs rw 0 0
kfreebsd default|desktop /home /home nullfs rw 0 0
gnu default|desktop /home /home none bind 0 0
linux default|desktop /home /home none rw,bind 0 0
# tmp
freebsd|kfreebsd default|desktop /tmp /tmp nullfs rw 0 0
gnu default|desktop /tmp /tmp none bind 0 0
linux default|desktop /tmp /tmp none rw,bind 0 0
# Linux and Debian-related binding; note complicated by /run transition and /(dev|run)/shm.
kfreebsd|gnu|linux default|desktop # It may be desirable to have access to /run, especially if you wish
kfreebsd|gnu|linux default|desktop # to run additional services in the chroot. However, note that this
kfreebsd|gnu|linux default|desktop # may potentially cause undesirable behaviour on upgrades, such as
kfreebsd|gnu|linux default|desktop # killing services on the host.
kfreebsd default|desktop #/run /run nullfs rw 0 0
gnu default|desktop #/run /run none bind 0 0
linux default|desktop #/run /run none rw,bind 0 0
kfreebsd default|desktop #/run/lock /run/lock nullfs rw 0 0
gnu default|desktop #/run/lock /run/lock none bind 0 0
linux default|desktop #/run/lock /run/lock none rw,bind 0 0
gnu default|desktop #/dev/shm /dev/shm none bind 0 0
gnu default|desktop #/run/shm /run/shm none bind 0 0
linux default|desktop #/dev/shm /dev/shm none rw,bind 0 0
linux default|desktop #/run/shm /run/shm none rw,bind 0 0
linux sbuild|buildd tmpfs /dev/shm tmpfs defaults 0 0
# building (Debian sbuild/buildd-specific)
kfreebsd|gnu|linux sbuild|buildd # Mount a large scratch space for the build data.
kfreebsd sbuild /var/lib/sbuild/build /build nullfs rw 0 0
kfreebsd buildd /home/buildd/build-trees /build nullfs rw 0 0
gnu sbuild /var/lib/sbuild/build /build none bind 0 0
linux sbuild|buildd /var/lib/sbuild/build /build none rw,bind 0 0
# nasty binding of "desktop" bits; may be outdated?
kfreebsd|gnu|linux desktop # If you use gdm3, uncomment this line to allow Xauth to work
kfreebsd desktop #/var/run/gdm3 /var/run/gdm3 nullfs rw 0 0
gnu desktop #/var/run/gdm3 /var/run/gdm3 none bind 0 0
linux desktop #/var/run/gdm3 /var/run/gdm3 none rw,bind 0 0
kfreebsd|gnu|linux desktop # For PulseAudio and other desktop-related things
kfreebsd desktop /var/lib/dbus /var/lib/dbus nullfs rw 0 0
gnu desktop /var/lib/dbus /var/lib/dbus none bind 0 0
linux desktop /var/lib/dbus /var/lib/dbus none rw,bind 0 0
More information about the Buildd-tools-devel
mailing list