[Piuparts-devel] [Git][debian/piuparts][ptmx] 4 commits: fix grammar

Mathieu Parent gitlab at salsa.debian.org
Wed Oct 24 07:30:27 BST 2018


Mathieu Parent pushed to branch ptmx at Debian / piuparts


Commits:
eb31bb0f by Holger Levsen at 2018-10-19T09:04:15Z
fix grammar

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
6390f0a5 by Holger Levsen at 2018-10-21T11:25:03Z
release as 0.93

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
0afdf66f by Holger Levsen at 2018-10-21T12:03:42Z
continue development

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
40ed97ac by Mathieu Parent at 2018-10-24T06:27:46Z
Create /dev/ptmx like debootstrap does (Closes: #911334)

When using piuparts on a chroot without /dev/ptmx [noptmx],
scripts/pre_remove_50_find_bad_permissions fails with:

    ERROR: BAD PERMISSIONS
    crw-rw-rw-. 1 root root 5, 2 Oct 16 03:49 /dev/ptmx

In this case, piuparts does something like this:

    touch /dev/ptmx # if not exists
    mount -o bind /dev/pts/ptmx /dev/ptmx # if dev/ptmx was not a symlink

The kernel doc [devpts.txt] recommends instead:

    mknod /dev/ptmx c 5 2

And this is what debootstrap does [debootstrap].

After this change, piuparts will do:

    mknod /dev/ptmx c 5 2 # if not exists
    mount -o bind /dev/pts/ptmx /dev/ptmx # if dev/ptmx was not a symlink

The behavior of piuparts called after debootstrap will not change.
The only behavior changing is when dev/ptmx doesn't exist at all.

[noptmx]: This is the case when chroot comes from the debian:unstable Docker image
[devpts.txt]: https://www.kernel.org/doc/Documentation/filesystems/devpts.txt
[debootstrap] https://salsa.debian.org/installer-team/debootstrap/blob/6f3f6f8b76e2d1a24ddbf05f065439412c3b81a1/functions#L1263-1268, introduced by https://salsa.debian.org/installer-team/debootstrap/commit/c997b80c064c6c1d36ec69da1850722f795f43e4

- - - - -


3 changed files:

- debian/changelog
- known_problems/logrotate_error_after_removal_error.conf
- piuparts.py


Changes:

=====================================
debian/changelog
=====================================
@@ -1,4 +1,16 @@
-piuparts (0.93) UNRELEASED; urgency=medium
+piuparts (0.94) UNRELEASED; urgency=medium
+
+  [ Mathieu Parent ]
+  * Create /dev/ptmx like debootstrap does (Closes: #911334): When the chroot is
+    created from the Docker image debian:unstable, /dev/ptmx is missing.
+    Piuparts was creating it with a bindmount to ptx/ptmx which leads
+    scripts/pre_remove_50_find_bad_permissions to complain about
+    "BAD PERMISSIONS" on /dev/ptmx. Now created with mknod, failing back to a
+    symlink
+
+ -- Holger Levsen <holger at debian.org>  Sun, 21 Oct 2018 14:03:22 +0200
+
+piuparts (0.93) unstable; urgency=medium
 
   [ Andreas Beckmann ]
   * piuparts.py:
@@ -39,14 +51,14 @@ piuparts (0.93) UNRELEASED; urgency=medium
     - Drop references to "PTS" and use "tracker.d.o" instead.
     - Add link to piuparts source package pages from known problem pages.
     - Minor cleanups.
+  * htdocs/bug_howto.tpl: some improvements, it's been some years.
+  * htdocs/news.tpl: confirm #582630 has been fixed.
   * Use the new debhelper-compat(=11) notation and drop d/compat.
   * CONTRIBUTING: explain never to directly push to the develop nor master
     branch. Explain to always include a debian/changelog entry with patches.
     Explain to always test patches and to explain that testing has happened.
-  * htdocs/bug_howto.tpl: some improvements, it's been some years.
-  * htdocs/news.tpl: confirm #582630 has been fixed.
 
- -- Holger Levsen <holger at debian.org>  Sat, 22 Sep 2018 15:32:55 +0200
+ -- Holger Levsen <holger at debian.org>  Sun, 21 Oct 2018 13:24:09 +0200
 
 piuparts (0.92) unstable; urgency=medium
 


=====================================
known_problems/logrotate_error_after_removal_error.conf
=====================================
@@ -7,6 +7,6 @@ ISSUE=0
 HEADER='Packages with failed logs because a logrotate script has output and/or exits with error after the package has been removed'
 HELPTEXT='
 <p>
-The logrotate configuration cause output and/or exit with error when the package has been removed but not purged.
+The logrotate configuration causes output and/or exits with error when the package has been removed but not purged.
 </p>
 '


=====================================
piuparts.py
=====================================
@@ -1757,8 +1757,7 @@ class Chroot:
         dev_ptmx_rel_path = self.relative("dev/ptmx")
         if not os.path.islink(dev_ptmx_rel_path):
             if not os.path.exists(dev_ptmx_rel_path):
-                with open(dev_ptmx_rel_path, 'w'):
-                    pass
+                os.mknod(dev_ptmx_rel_path, 0666 | stat.S_IFCHR, os.makedev(5, 2))
             self.mount(self.relative("dev/pts/ptmx"), "/dev/ptmx", opts="bind", no_mkdir=True)
         p = subprocess.Popen(["tty"], stdout=subprocess.PIPE)
         stdout, _ = p.communicate()



View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/bd7d6fb7bef3b03ce3e6e609805d1a03bf92b6cf...40ed97ac3efb3c5be7b0a873caabe1d0b396ec39

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/bd7d6fb7bef3b03ce3e6e609805d1a03bf92b6cf...40ed97ac3efb3c5be7b0a873caabe1d0b396ec39
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20181024/be225c51/attachment-0001.html>


More information about the Piuparts-devel mailing list