Comment 4 for bug 1844504

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote : Re: xenial buildd chroots shouldn't have makedev

Hi Colin,

I've been analyzing another build failure related to openpty().

The same upload on Xenial passed on Sep 3rd and failed on Sep 17th,
due to openpty() failing in tests of util-linux/script.

The strace of the failing test-case shows no permission on /dev/ptmx:

  open("/dev/ptmx", O_RDWR) = -1 EACCES (Permission denied)

That's because /dev/ptmx is a symlink to /dev/pts/ptmx, which has
no permissions for non-root users on the livecd-rootfs chroot [1],
used with sbuild-launchpad-chroot locally.

  $ ls -lR /dev/pt*
  lrwxrwxrwx 1 root root 8 Sep 5 08:13 /dev/ptmx -> pts/ptmx
  ...
  /dev/pts:
  ...
  c--------- 1 root root 5, 2 Sep 17 21:23 ptmx

...

I don't understand enough of the live-build/livecd-rootfs/makedev
relation, but I could still reproduce that problem with -proposed
and https://git.launchpad.net/~cjwatson/livecd-rootfs/commit/?id=6049019a8b7bfe299ae8836a74e8db73042f3d96 (steps below).

I'm not exactly sure how makedev would affect it specifically
(maybe I didnt find/run the right hooks that gate on it, possibly?)

You mentioned you're 'fairly sure' about this, so would sincerely
appreciate a comment about it, if you have the time/chance. :- )

...

Other than that, for further debugging on that other problem..

Is there a way to find the specific chroot_url [1] used in a PPA for a particular build?
(buildlog only mentions 'in-target unpack-chroot' for a /home/buildd/file-cache-default/<hash>)

...

Otherwise, is there a way to find out when/on which release the
livecd-rootfs image was built?

Specifically looking for the deboostrap version used, as there's an
(old) change to deboostrap that changed /dev/ptmx from static node
to this symlink, but it's been a while ago, so not very sure of it.
(Debian bugs 817236 for discussion/issue, and 571136 for change)

Any comments would be really appreciated!

Thanks,
Mauricio

...

[1] https://api.launchpad.net/devel/ubuntu/xenial/amd64

Steps used to build livecd.ubuntu-base.rootfs.tar.gz
(according to python-lpbuildd's build_livefs.py,
then patched sbuild-launchpad-chroot to use that.)

  sudo apt-get install -y livecd-rootfs.

  mkdir auto
  ln -s /usr/share/livecd-rootfs/live-build/auto/{clean,config,build} auto/
  mkdir -p auto/functions
  echo 'set -x' > auto/functions/debug.sh

  lb clean --purge
       PROJECT=ubuntu-base SUBPROJECT=buildd ARCH=amd64 SUITE=xenial IMAGEFORMAT=none MIRROR=http://archive.ubuntu.com/ubuntu lb config
  sudo PROJECT=ubuntu-base SUBPROJECT=buildd ARCH=amd64 SUITE=xenial IMAGEFORMAT=none MIRROR=http://archive.ubuntu.com/ubuntu lb build