Debian Bug report logs - #788580
pbuilder: No more mounts /dev/pts inside the chroot if host is running systemd 220, causing packages to FTBFS

version graph

Package: pbuilder; Maintainer for pbuilder is Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>; Source for pbuilder is src:pbuilder (PTS, buildd, popcon).

Affects: src:zsh, src:gpgme1.0

Reported by: Axel Beckert <abe@debian.org>

Date: Fri, 12 Jun 2015 22:09:02 UTC

Severity: important

Tags: patch, sid, stretch

Merged with 788581

Found in version pbuilder/0.215+nmu3

Fixed in version pbuilder/0.215+nmu4

Done: Mattia Rizzolo <mattia@mapreri.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, abe@debian.org, pkg-zsh-devel@lists.alioth.debian.org, pkg-systemd-maintainers@lists.alioth.debian.org, Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>:
Bug#788580; Package pbuilder. (Fri, 12 Jun 2015 22:09:05 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <abe@debian.org>:
New Bug report received and forwarded. Copy sent to abe@debian.org, pkg-zsh-devel@lists.alioth.debian.org, pkg-systemd-maintainers@lists.alioth.debian.org, Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>. (Fri, 12 Jun 2015 22:09:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Axel Beckert <abe@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: pbuilder: No more mounts /dev/pts inside the chroot if host is running systemd 220, causing packages to FTBFS
Date: Fri, 12 Jun 2015 23:47:03 +0200
Package: pbuilder
Version: 0.215+nmu3
Severity: important
Tags: sid stretch
Control: affects -1 src:zsh

Dear Maintainer,

if pbuilder is running on a host which uses systemd >= 220 as init
system (i.e. on Sid with systemd), it no more mounts /dev/pts inside the
chroot which makes some packages (e.g. zsh) FTBFS.

Even explicitly setting USEDEVPTS=yes in /etc/pbuilderrc does _not_
help and /dev/pts is not mounted in the chroot.

Interestingly it still tries to unmount /dev/pts inside the chroot after
the failed build:

dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Failed autobuilding of package
W: no hooks of type C found -- ignoring
I: unmounting dev/pts filesystem
W: Could not unmount dev/pts: umount: /var/cache/pbuilder/build//28745/dev/pts: not mounted
W: Ignored error in unmount
I: unmounting run/shm filesystem
I: unmounting proc filesystem
I: cleaning the build env

The issue can be workarounded by any of the following actions:

* booting the host system with sysvinit instead of systemd
* downgrading systemd on the host system to 215-18 as currently in
  testing.
* Using pbuilder login and calling "mount -t devpts none /dev/pts".

I've stumbled upon this when packaging a new zsh upstream which builds
fine if

* built outside the chroot,
* built with the very same pbuilder version but on Jessie (systemd 215),
* built with the very same pbuilder version on Sid but running sysvinit,

but FTBFS due to pty related test suite failures if built with pbuilder
on Sid with systemd (220). Example failing test (there are several tests
failing):

../../Test/V08zpty.ztst: starting.
Running test: zpty with a process that does not set up the terminal: internal write
Test ../../Test/V08zpty.ztst failed: bad status 1, expected 0 from:
  zpty cat cat
  zpty -w cat a line of text
  var=
  zpty -r cat var && print -r -- ${var%%$'\r\n'}
  zpty -d cat
Error output:
(zpty):zpty:1: can't open pseudo terminal: no such file or directory
(eval):zpty:2: no such pty command: cat
(eval):zpty:4: no such pty command: cat
(eval):zpty:5: no such pty command: cat
Was testing: zpty with a process that does not set up the terminal: internal write
../../Test/V08zpty.ztst: test failed.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (111, 'buildd-unstable'), (111, 'buildd-experimental'), (110, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages pbuilder depends on:
ii  coreutils              8.23-4
ii  debconf [debconf-2.0]  1.5.56
ii  debianutils            4.5.1
ii  debootstrap            1.0.70
ii  dpkg-dev               1.18.1
ii  wget                   1.16.3-2+b2

Versions of packages pbuilder recommends:
ii  devscripts  2.15.5
ii  fakeroot    1.20.2-1
ii  iproute2    3.16.0-2
ii  net-tools   1.60-26+b1
ii  sudo        1.8.12-1

Versions of packages pbuilder suggests:
ii  cowdancer     0.73
ii  gdebi-core    0.9.5.5+nmu1
pn  pbuilder-uml  <none>

-- debconf information:
  pbuilder/mirrorsite: http://ftp.ch.debian.org/debian/
  pbuilder/rewrite: false
  pbuilder/nomirror:



Added indication that 788580 affects src:zsh Request was from Axel Beckert <abe@debian.org> to submit@bugs.debian.org. (Fri, 12 Jun 2015 22:09:05 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>:
Bug#788580; Package pbuilder. (Sat, 13 Jun 2015 12:57:07 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <abe@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>. (Sat, 13 Jun 2015 12:57:07 GMT) (full text, mbox, link).


Message #12 received at 788580@bugs.debian.org (full text, mbox, reply):

From: Axel Beckert <abe@debian.org>
To: 788580@bugs.debian.org
Subject: Re: Bug#788580: pbuilder: No more mounts /dev/pts inside the chroot if host is running systemd 220, causing packages to FTBFS
Date: Sat, 13 Jun 2015 14:53:12 +0200
Control: tag -1 + patch

Hi,

Axel Beckert wrote:
> if pbuilder is running on a host which uses systemd >= 220 as init
> system (i.e. on Sid with systemd), it no more mounts /dev/pts inside the
> chroot which makes some packages (e.g. zsh) FTBFS.

This can be patched by just using "none" (or likely anything else
non-existing) instead of "/dev/pts" as device in the mount call:

diff -Nru pbuilder-0.215+nmu3/debian/changelog pbuilder-0.215+nmu4/debian/changelog
--- pbuilder-0.215+nmu3/debian/changelog	2014-07-11 19:57:49.000000000 +0200
+++ pbuilder-0.215+nmu4/debian/changelog	2015-06-13 14:19:08.000000000 +0200
@@ -1,3 +1,11 @@
+pbuilder (0.215+nmu4) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use "none" instead of "/dev/pts" as device for the /dev/pts mount
+    inside the chroot. (Closes: #788580)
+
+ -- Axel Beckert <abe@debian.org>  Sat, 13 Jun 2015 14:19:00 +0200
+
 pbuilder (0.215+nmu3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru pbuilder-0.215+nmu3/pbuilder-modules pbuilder-0.215+nmu4/pbuilder-modules
--- pbuilder-0.215+nmu3/pbuilder-modules	2013-03-26 09:49:36.000000000 +0100
+++ pbuilder-0.215+nmu4/pbuilder-modules	2015-06-13 14:21:19.000000000 +0200
@@ -270,7 +270,7 @@
 	TTYGRP=5
 	TTYMODE=620
 	[ -f /etc/default/devpts ] && . /etc/default/devpts
-	mount -t devpts /dev/pts "$BUILDPLACE/dev/pts" -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
+	mount -t devpts none "$BUILDPLACE/dev/pts" -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
 	mounted[${#mounted[@]}]="$BUILDPLACE/dev/pts"
     fi
     if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then


		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Added tag(s) patch. Request was from Axel Beckert <abe@debian.org> to 788580-submit@bugs.debian.org. (Sat, 13 Jun 2015 12:57:07 GMT) (full text, mbox, link).


Message sent on to Axel Beckert <abe@debian.org>:
Bug#788580. (Mon, 22 Jun 2015 17:03:39 GMT) (full text, mbox, link).


Message #17 received at 788580-submitter@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@mapreri.org>
To: 677666-submitter@bugs.debian.org, 788580-submitter@bugs.debian.org, 752545-submitter@bugs.debian.org, 757505-submitter@bugs.debian.org
Cc: Andreas Henriksson <andreas@fatal.se>
Subject: Fix committed
Date: Mon, 22 Jun 2015 16:58:48 +0000
[Message part 1 (text/plain, inline)]
Control: tags -1 pending

Dear all,

This is to notify you that a package fixing these bugs has just been uploaded
to DELAYED/10.

You can see the debdiff of this change at [0], though that's a bit bloated.
I suggest you look instead at the repository used for this upload at [1]

If you notice something wrong there please speak up now before the package gets
into the archive.

I'd like to thanks anybody who submitted patches (and Andreas for sponsoring
the upload)!


[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=pb-nmu.debdiff;att=1;msg=80;bug=740577
[1] http://anonscm.debian.org/cgit/collab-maint/pbuilder.git/

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540         .''`.
more about me:  http://mapreri.org                                 : :'  :
Launchpad user: https://launchpad.net/~mapreri                     `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia     `-
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending. Request was from Mattia Rizzolo <mattia@mapreri.org> to 788580-submitter@bugs.debian.org. (Mon, 22 Jun 2015 17:03:39 GMT) (full text, mbox, link).


Reply sent to Mattia Rizzolo <mattia@mapreri.org>:
You have taken responsibility. (Thu, 02 Jul 2015 16:51:24 GMT) (full text, mbox, link).


Notification sent to Axel Beckert <abe@debian.org>:
Bug acknowledged by developer. (Thu, 02 Jul 2015 16:51:24 GMT) (full text, mbox, link).


Message #24 received at 788580-close@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@mapreri.org>
To: 788580-close@bugs.debian.org
Subject: Bug#788580: fixed in pbuilder 0.215+nmu4
Date: Thu, 02 Jul 2015 16:50:04 +0000
Source: pbuilder
Source-Version: 0.215+nmu4

We believe that the bug you reported is fixed in the latest version of
pbuilder, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 788580@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mattia Rizzolo <mattia@mapreri.org> (supplier of updated pbuilder package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 22 Jun 2015 15:58:41 +0000
Source: pbuilder
Binary: pbuilder pbuilder-uml
Architecture: source amd64 all
Version: 0.215+nmu4
Distribution: unstable
Urgency: low
Maintainer: Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>
Changed-By: Mattia Rizzolo <mattia@mapreri.org>
Description:
 pbuilder   - personal package builder for Debian packages
 pbuilder-uml - user-mode-linux version of pbuilder
Closes: 677666 740577 752545 757505 788580
Changes:
 pbuilder (0.215+nmu4) unstable; urgency=low
 .
   * Non-maintainer upload.
 .
   [ Mattia Rizzolo ]
   * debian/source/format: 3.0 (native).
   * Do real cleanup, don't hide temporary files under .gitignore, rather
     teach makefiles' clean targets how to deal with them properly.
   * set the USER env variable to BUILDUSERNAME, to fix FTBFS of some package
     which check for not being run as root using that variable.
     Thanks to Tim Landscheidt <tim@tim-landscheidt.de> for the initial patch.
     Closes: #677666
 .
   [ Johannes Schauer ]
   * move filter_arch_deps to pbuilder-satisfydepends-funcs and add tests
   * build profile parsing support (Closes: #740577)
 .
   [ Andreas Henriksson ]
   * Fix DEB_BUILD_PROFILES quoting.
     Thanks to Michael Stapelberg for spotting this
   * Support build-profiles in classic satisfydeps
   * Force dpkg-architecture to use arguments over env
   * Fix up License paragraph in debian/copyright
     - fixes lintian warnings:
       missing-license-paragraph-in-dep5-copyright
       copyright-should-refer-to-common-license-file-for-gpl
   * Install bash-completion under /usr/share/ instead of /etc
     - fixes lintian warning package-install-into-obsolete-dir
   * Use dpkg-maintscript-helper rm_conffile to clean up
     old /etc/bash_completion.d/pbuilder
   * Minor syntax updates to pbuilder bash-completion to make it
     function properly under its new location.
     - drop "have" check and add "&&" before complete.
 .
   [ Axel Beckert ]
   * Use "none" instead of "/dev/pts" as device for the /dev/pts mount
     inside the chroot (Closes: #788580)
 .
   [ Frédéric Brière ]
   * Mark pbuilder as "Multi-Arch: foreign" (Closes: #752545)
 .
   [ Mert Dirik ]
   * Add Turkish debconf template translation (Closes: #757505)
Checksums-Sha1:
 ff2dfc0299501baec5491455aeacbd887119075f 1868 pbuilder_0.215+nmu4.dsc
 bfb08177d3edfac29e3cca10fca980637e7a7bc3 290824 pbuilder_0.215+nmu4.tar.xz
 2bfecd356aa9d2b3821da76bd07bdb70021023b5 44420 pbuilder-uml_0.215+nmu4_amd64.deb
 11ea83e839ac7dfeaceef1a4bd659e326f06ba44 340382 pbuilder_0.215+nmu4_all.deb
Checksums-Sha256:
 3bcdf693d34714f4b9d5167fdc31b0dd7c222c8adf4fbad7cb147be1fcb6ffec 1868 pbuilder_0.215+nmu4.dsc
 35d80cd2201d7e2c723b2308087e726ad177bf6e157373602bf6414173ac1312 290824 pbuilder_0.215+nmu4.tar.xz
 d84c82b27f1b4608b015f094f896458d0abf6c7edf8d8b12516948af7a3774c8 44420 pbuilder-uml_0.215+nmu4_amd64.deb
 99f3e28be297da808a68a62eb4bc25a422f1d8682df9218ff9882d667605edf6 340382 pbuilder_0.215+nmu4_all.deb
Files:
 03cfacbf10e0dc9f07dafb9e0a59c607 1868 devel extra pbuilder_0.215+nmu4.dsc
 df89e3e10a971380d972790b2a341b14 290824 devel extra pbuilder_0.215+nmu4.tar.xz
 6fffb63c2b068f7374beac5b9dbf4141 44420 devel extra pbuilder-uml_0.215+nmu4_amd64.deb
 6a421c8c62844ab1460554d96d1ce00e 340382 devel extra pbuilder_0.215+nmu4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJViDLXAAoJEAvEfcZNE1MGHtgP/j2lUXB+xt1KC0CWzkMmQ/By
n6vgbQiL9AJigeZnuSQnqe1nQn0uVSxB5zbCt4DKIh6N10WiuLWnTkKvtZspkxOz
DJZYWc/ryj5wFRmK8fC6PjbEz9V5nzMEb1R8FckBMLwzs2hkL/mdtm4zTmisCRek
//lJmfIfLZlt9vVmrua1mCkPCq2FBzYL3lyGs3xhGsH4CRZv4Mnob9Pj4saYNMcs
mVGJrhOTpOWTbKujorN+pApHdl0HaiBp9q6D3iMJJfzeAgus7B7z5ip8JNn0AAuU
B3JEz4zZcxJxdL1tZDMXcWjQeeDzhB7QR9JKn38R9UzzE/XRXjmb1aoSX2APnjyI
dkeM4ABbYdUmO/7zs+VJE3EW9TEtf6OSFW/Dso6GoIodmbOHTpC0yvu43f6V9qUy
3Xab6b/rmBX6N1i6/KBtW8VBPRFcHkeBmRlUWYR93pG7wjkCRoLuKPPp3/oHrfxF
WxqAar6Y1Xbqmw2WtjddrSZZaoZ6WIoiSVPlvHxBVc3pUSaUZLgNG3g9eJT2Tml+
5Yv2VHUssvYqugAL2ij/v49ZqDczTsI6xN1VaDIDHcdjZzLWLMGqHLWFG2ciNkgR
afjLgkjXcTjWE9NMO2lv7mU6s/Owp3Hestr/qvBGKOqAYgforng5pZyyVYo6/AAW
GiHOXYBZCB1k63FsVG1T
=tyi7
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>:
Bug#788580; Package pbuilder. (Sun, 05 Jul 2015 04:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to Diane Trout <diane@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>. (Sun, 05 Jul 2015 04:27:03 GMT) (full text, mbox, link).


Message #29 received at 788580@bugs.debian.org (full text, mbox, reply):

From: Diane Trout <diane@debian.org>
To: 788580@bugs.debian.org
Subject: /dev/pts workaround
Date: Sat, 04 Jul 2015 21:25:09 -0700
Hi,

I had one a hook script that tried to start screen when my build's failed, and 
that also failed with the no pts problem.

Instead of doing the cowbuilder login as suggested by Axel Beckert I wrote a D 
hook :

-- D01pty---
#!/bin/sh
mount -t devpts none /dev/pts
---end---

which at least solved my problems with launching my screen hook.

Given the sequencing of hooks it should also help with building.

But a built in solution would be nice.

Diane



Information forwarded to debian-bugs-dist@lists.debian.org, Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>:
Bug#788580; Package pbuilder. (Sun, 05 Jul 2015 08:42:03 GMT) (full text, mbox, link).


Acknowledgement sent to Mattia Rizzolo <mattia@mapreri.org>:
Extra info received and forwarded to list. Copy sent to Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org>. (Sun, 05 Jul 2015 08:42:03 GMT) (full text, mbox, link).


Message #34 received at 788580@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@mapreri.org>
To: Diane Trout <diane@debian.org>, 788580@bugs.debian.org
Subject: Re: Bug#788580: /dev/pts workaround
Date: Sun, 5 Jul 2015 08:38:02 +0000
[Message part 1 (text/plain, inline)]
On Sat, Jul 04, 2015 at 09:25:09PM -0700, Diane Trout wrote:
> Hi,
> 
> I had one a hook script that tried to start screen when my build's failed, and 
> that also failed with the no pts problem.
> 
> Instead of doing the cowbuilder login as suggested by Axel Beckert I wrote a D 
> hook :
> 
> -- D01pty---
> #!/bin/sh
> mount -t devpts none /dev/pts
> ---end---
> 
> which at least solved my problems with launching my screen hook.
> 
> Given the sequencing of hooks it should also help with building.
> 
> But a built in solution would be nice.

There already is: the USEDEVPTS conf option.

Please see `man 5 pbuilderrc` for a complete reference.

This bug *has been* (since it's now fixed) about the inability of USEDEVPTS to
actually mount /dev/pts in system with systemd >= 220.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540         .''`.
more about me:  http://mapreri.org                                 : :'  :
Launchpad user: https://launchpad.net/~mapreri                     `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia     `-
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 10 Aug 2015 07:33:38 GMT) (full text, mbox, link).


Bug unarchived. Request was from James Clarke <jrtc27@jrtc27.com> to control@bugs.debian.org. (Mon, 21 Mar 2016 17:33:08 GMT) (full text, mbox, link).


Merged 788580 788581 Request was from James Clarke <jrtc27@jrtc27.com> to control@bugs.debian.org. (Mon, 21 Mar 2016 17:33:14 GMT) (full text, mbox, link).


Added indication that 788580 affects pbuilder and gpgme1.0 Request was from James Clarke <jrtc27@jrtc27.com> to control@bugs.debian.org. (Mon, 21 Mar 2016 17:39:04 GMT) (full text, mbox, link).


Removed indication that 788580 affects pbuilder and gpgme1.0 Request was from James Clarke <jrtc27@jrtc27.com> to control@bugs.debian.org. (Mon, 21 Mar 2016 17:39:08 GMT) (full text, mbox, link).


Added indication that 788580 affects src:gpgme1.0 Request was from James Clarke <jrtc27@jrtc27.com> to control@bugs.debian.org. (Mon, 21 Mar 2016 17:39:10 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 19 Apr 2016 07:29:00 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Jan 4 04:20:24 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.