Bug#926698: cpio: messes with /usr/sbin/rmt in --merged-usr environment
Niels Thykier: > Hi Chris and Ruben, > > Could either of you please have a look at this bug in cpio (you are > listed as Uploaders)? Even if it is just in the form of "ENOTME, NMU > welcome". > > Note that Anibal is MIA (per #925021). > > Thanks, > ~Niels > Hi Chris, Thanks for the fast upload. Just to confirm, did you intend to use "test -L /sbin/rmt" instead of "! test -L /sbin/rmt" as Andreas suggested? I am concerned that we might have missing negation at play and wanted to be sure before I unblocked it. Thanks, ~Niels > On Tue, 9 Apr 2019 18:05:00 +0200 Andreas Beckmann wrote: >> Control: clone -1 -2 >> Control: reassign -2 tar 1.30+dfsg-5 >> Control: retitle -2: tar: prerm deletes /usr/sbin/rmt in --merged-usr >> environment >> Control: retitle -1: cpio: prerm deletes /usr/sbin/rmt in --merged-usr >> environment >> >> On 2019-04-09 11:44, Andreas Beckmann wrote: >>> 0m17.9s ERROR: WARN: Broken symlinks: >>> /etc/rmt -> /usr/sbin/rmt (tar) >>> >>> 0m22.0s ERROR: FAIL: After purging files have disappeared: >>> /usr/sbin/rmt -> /etc/alternatives/rmt not owned >> >> This is caused by the prerm script which contains this not merged-usr >> aware code: >> >> if [ "$1" = remove ]; then >> update-alternatives --remove mt /bin/mt-gnu >> if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then >> rm -f /sbin/rmt >> fi >> fi >> >> Cloning the bug to tar, since its prerm contains a similar construct. >> (And I don't mean the update-alternatives call ...) >> >> remove|deconfigure) >> update-alternatives --remove rmt /usr/sbin/rmt-tar >> if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then >> rm -f /sbin/rmt >> fi >> ;; >> >> Probable use >> >> if ! test -L /sbin && test -L /sbin/rmt && ... >> >> >> Andreas >> >>
Bug#926698: cpio: messes with /usr/sbin/rmt in --merged-usr environment
Hi Niels, > Could either of you please have a look at this bug in cpio (you are > listed as Uploaders)? Even if it is just in the form of "ENOTME, NMU > welcome". Looks like an easy-enough fix... pending upload. Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org chris-lamb.co.uk `-
Bug#926698: cpio: messes with /usr/sbin/rmt in --merged-usr environment
Niels Thykier: > Hi Chris and Ruben, > > Could either of you please have a look at this bug in cpio (you are > listed as Uploaders)? Even if it is just in the form of "ENOTME, NMU > welcome". > > Note that Anibal is MIA (per #925021). > > Thanks, > ~Niels > > [...] Hi Chris, FYI, Ruben's email bounces with "No such user" in the other end. Accordingly, you are currently the only (trivially reachable) maintainer/uploader left of cpio. Thanks, ~Niels
Bug#926698: cpio: messes with /usr/sbin/rmt in --merged-usr environment
Hi Chris and Ruben, Could either of you please have a look at this bug in cpio (you are listed as Uploaders)? Even if it is just in the form of "ENOTME, NMU welcome". Note that Anibal is MIA (per #925021). Thanks, ~Niels On Tue, 9 Apr 2019 18:05:00 +0200 Andreas Beckmann wrote: > Control: clone -1 -2 > Control: reassign -2 tar 1.30+dfsg-5 > Control: retitle -2: tar: prerm deletes /usr/sbin/rmt in --merged-usr > environment > Control: retitle -1: cpio: prerm deletes /usr/sbin/rmt in --merged-usr > environment > > On 2019-04-09 11:44, Andreas Beckmann wrote: > > 0m17.9s ERROR: WARN: Broken symlinks: > > /etc/rmt -> /usr/sbin/rmt (tar) > > > > 0m22.0s ERROR: FAIL: After purging files have disappeared: > > /usr/sbin/rmt -> /etc/alternatives/rmt not owned > > This is caused by the prerm script which contains this not merged-usr > aware code: > > if [ "$1" = remove ]; then > update-alternatives --remove mt /bin/mt-gnu > if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then > rm -f /sbin/rmt > fi > fi > > Cloning the bug to tar, since its prerm contains a similar construct. > (And I don't mean the update-alternatives call ...) > > remove|deconfigure) > update-alternatives --remove rmt /usr/sbin/rmt-tar > if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then > rm -f /sbin/rmt > fi > ;; > > Probable use > > if ! test -L /sbin && test -L /sbin/rmt && ... > > > Andreas > >
Bug#926698: cpio: messes with /usr/sbin/rmt in --merged-usr environment
Hi, On Tue, Apr 09, 2019 at 06:05:00PM +0200, Andreas Beckmann wrote: > On 2019-04-09 11:44, Andreas Beckmann wrote: > > 0m17.9s ERROR: WARN: Broken symlinks: > > /etc/rmt -> /usr/sbin/rmt (tar) > > > > 0m22.0s ERROR: FAIL: After purging files have disappeared: > > /usr/sbin/rmt -> /etc/alternatives/rmt not owned [...] > Cloning the bug to tar, since its prerm contains a similar construct. > (And I don't mean the update-alternatives call ...) > > remove|deconfigure) > update-alternatives --remove rmt /usr/sbin/rmt-tar > if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then > rm -f /sbin/rmt > fi > ;; > > Probable use > > if ! test -L /sbin && test -L /sbin/rmt && ... > I think the code trying to remove the /sbin/rmt symlink should just be removed. tar stopped creating it in 1.15.1-1 (2005). Thanks, Ivo
Bug#926698: cpio: messes with /usr/sbin/rmt in --merged-usr environment
Control: tags -1 patch On Tue, Apr 09, 2019 at 06:05:00PM +0200, Andreas Beckmann wrote: > On 2019-04-09 11:44, Andreas Beckmann wrote: > > 0m17.9s ERROR: WARN: Broken symlinks: > > /etc/rmt -> /usr/sbin/rmt (tar) > > > > 0m22.0s ERROR: FAIL: After purging files have disappeared: > > /usr/sbin/rmt -> /etc/alternatives/rmt not owned > > This is caused by the prerm script which contains this not merged-usr > aware code: > > if [ "$1" = remove ]; then > update-alternatives --remove mt /bin/mt-gnu > if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then > rm -f /sbin/rmt > fi > fi > > Cloning the bug to tar, since its prerm contains a similar construct. > (And I don't mean the update-alternatives call ...) > > remove|deconfigure) > update-alternatives --remove rmt /usr/sbin/rmt-tar > if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then > rm -f /sbin/rmt > fi > ;; > > Probable use > > if ! test -L /sbin && test -L /sbin/rmt && ... The code dealing with rmt should just be removed from cpio. rmt was removed from cpio in 2.4.2-39 (2001) and moved to tar, so cpio shouldn't change anything related to rmt. I'm tagging this bug patch, because I believe it can be fixed by removing those 3 lines from the prerm script: > if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then > rm -f /sbin/rmt > fi Thanks, Ivo
Bug#926698: cpio: messes with /usr/sbin/rmt in --merged-usr environment
Control: clone -1 -2 Control: reassign -2 tar 1.30+dfsg-5 Control: retitle -2: tar: prerm deletes /usr/sbin/rmt in --merged-usr environment Control: retitle -1: cpio: prerm deletes /usr/sbin/rmt in --merged-usr environment On 2019-04-09 11:44, Andreas Beckmann wrote: > 0m17.9s ERROR: WARN: Broken symlinks: > /etc/rmt -> /usr/sbin/rmt (tar) > > 0m22.0s ERROR: FAIL: After purging files have disappeared: > /usr/sbin/rmt -> /etc/alternatives/rmt not owned This is caused by the prerm script which contains this not merged-usr aware code: if [ "$1" = remove ]; then update-alternatives --remove mt /bin/mt-gnu if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then rm -f /sbin/rmt fi fi Cloning the bug to tar, since its prerm contains a similar construct. (And I don't mean the update-alternatives call ...) remove|deconfigure) update-alternatives --remove rmt /usr/sbin/rmt-tar if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then rm -f /sbin/rmt fi ;; Probable use if ! test -L /sbin && test -L /sbin/rmt && ... Andreas
Bug#926698: cpio: messes with /usr/sbin/rmt in --merged-usr environment
Package: cpio Version: 2.12+dfsg-6 Severity: serious User: debian...@lists.debian.org Usertags: piuparts Hi, during a test with piuparts I noticed your package removes files that were installed by another package. The removed files were already present before the package was installed, they may have been shipped or created by a dependency. This could be a violation of policy 10.7.4 ("Sharing configuration files"), see https://www.debian.org/doc/debian-policy/ch-files.html#sharing-configuration-files or policy chapter 6 ("Package maintainer scripts..."), see https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html or policy 7.6 ("Overwriting files..."), see https://www.debian.org/doc/debian-policy/ch-relationships.html#overwriting-files-and-replacing-packages-replaces If a directory is used by several packages, all should ship it as part of the package (possibly empty, using $package.dirs to create it), and no package should mkdir/rmdir it in the maintainer scripts as dpkg will take care of this. >From the attached log (scroll to the bottom...): 0m17.9s ERROR: WARN: Broken symlinks: /etc/rmt -> /usr/sbin/rmt (tar) 0m22.0s ERROR: FAIL: After purging files have disappeared: /usr/sbin/rmt -> /etc/alternatives/rmt not owned cheers, Andreas cpio_2.12+dfsg-6.log.gz Description: application/gzip