Your message dated Thu, 25 Jan 2018 10:58:43 +0000
with message-id <[email protected]>
and subject line Bug#888259: fixed in dash 0.5.8-2.10
has caused the Debian Bug report #888259,
regarding dash: Should have an autopkgtest to verify that /bin/sh works
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
888259: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888259
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dash
Version: 0.5.8-2.4
Severity: wishlist
Tags: patch

dash is an Essential package and the default provider of /bin/sh,
which is required by dpkg and specifically documented in Policy. It is
also mostly maintained via NMUs, so its uploaders are not necessarily
familiar with all the subtleties of how /bin/sh is managed. This seems
like an excellent candidate for an autopkgtest that could detect serious
breakage before upload.

In particular, it would be good for uploaders whose systems have
undergone the /usr merge to run the autopkgtest in a non-usrmerge VM
image or container before uploading.

I attach a smoke-test that detects the regressions in revisions -2.6
(missing /bin/dash breaking all non-usrmerge systems) and -2.7 (missing
/bin/sh breaking debootstrap), and passes with -2.5 and -2.9. It doesn't
detect the regression that remains in -2.8 (missing man page), but a
missing man page is orders of magnitude less serious than a missing
/bin/sh.

Running piuparts before upload is also a good idea, of course; that
would have detected the regression in -2.6, but not the one in -2.7.

    smcv
>From 392dcca49a8e462cdf377e45ecf906113d943936 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Wed, 24 Jan 2018 11:54:26 +0000
Subject: [PATCH] Add an autopkgtest to verify that /bin/sh remains usable

Signed-off-by: Simon McVittie <[email protected]>
---
 debian/tests/control |  3 +++
 debian/tests/smoke   | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 debian/tests/control
 create mode 100755 debian/tests/smoke

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..dbed742
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: smoke
+Depends: dash, perl
+Restrictions: allow-stderr
diff --git a/debian/tests/smoke b/debian/tests/smoke
new file mode 100755
index 0000000..74f534e
--- /dev/null
+++ b/debian/tests/smoke
@@ -0,0 +1,53 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Cwd qw(getcwd realpath);
+use File::Temp qw();
+use Test::More;
+
+my $srcdir = getcwd;
+
+ok(-x '/bin/sh', '/bin/sh must be executable');
+ok(-x '/bin/sh.distrib', '/bin/sh.distrib should be executable');
+ok(-x '/bin/dash', '/bin/dash must be executable');
+ok(-x '/bin/bash', '/bin/bash must be executable');
+diag(qx(ls -l /bin/sh));
+diag(qx(ls -l /bin/sh.distrib));
+diag(qx(ls -l /bin/dash));
+diag(qx(ls -l /bin/bash));
+
+like(qx(dpkg -L dash),
+     qr{^/bin/sh$}m,
+     'dash must contain a /bin/sh symlink, for debootstrap');
+
+like(realpath('/bin/sh.distrib'), qr{^(?:/usr)?/bin/[bd]ash},
+     '/bin/sh.distrib must be an Essential shell, for debootstrap');
+
+is(qx(echo hello), "hello\n");
+
+my $diverter = qx(dpkg-divert --listpackage /bin/sh);
+
+if ($diverter eq "dash\n") {
+    like(realpath('/bin/sh'), qr{^(?:/usr)?/bin/dash},
+         '/bin/sh diverted by dash');
+}
+elsif ($diverter eq "bash\n") {
+    like(realpath('/bin/sh'), qr{^(?:/usr)?/bin/dash},
+         '/bin/sh diverted by dash pretending to be bash');
+}
+else {
+    is($diverter, "LOCAL\n", '/bin/sh diverted locally');
+}
+
+my $tmpdir = File::Temp->newdir();
+chdir $tmpdir;
+is(system("apt-get download dash"), 0);
+is(system("dpkg-deb -X *.deb ."), 0);
+diag(qx(find . -ls));
+chdir $srcdir;
+like(readlink("$tmpdir/bin/sh"), qr{^(?:/bin/)?[bd]ash$},
+     'dash_*.deb must contain a /bin/sh symlink for debootstrap');
+
+done_testing;
-- 
2.15.1


--- End Message ---
--- Begin Message ---
Source: dash
Source-Version: 0.5.8-2.10

We believe that the bug you reported is fixed in the latest version of
dash, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrew Shadura <[email protected]> (supplier of updated dash 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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 25 Jan 2018 08:14:33 +0100
Source: dash
Binary: dash ash
Architecture: source
Version: 0.5.8-2.10
Distribution: unstable
Urgency: medium
Maintainer: Gerrit Pape <[email protected]>
Changed-By: Andrew Shadura <[email protected]>
Description:
 ash        - compatibility package for dash
 dash       - POSIX-compliant shell
Closes: 888259
Changes:
 dash (0.5.8-2.10) unstable; urgency=medium
 .
   [ Simon McVittie ]
   * Add an autopkgtest to verify that /bin/sh remains usable
     (Closes: #888259).
 .
   [ Andrew Shadura ]
   * Add dash.preinst and friends to clean.
   * Document where the sources are and how to work with them
     in README.source.
Checksums-Sha1:
 661282b671fde18de5ff43f5a04666109f01acc1 1618 dash_0.5.8-2.10.dsc
 6dbdc7bfa0d6e6c3a2ca4ef2291c9832e231617e 43920 dash_0.5.8-2.10.debian.tar.xz
Checksums-Sha256:
 1e8fdac0880d57d8ed5eb11f9f1750a67c71a7200180cf3ed5aa3e74dab3e4c5 1618 
dash_0.5.8-2.10.dsc
 0d870b0cf9b3ad40e4d4f1e3d4d9097f4d62151693a48f34cb1d49865fd4abdb 43920 
dash_0.5.8-2.10.debian.tar.xz
Files:
 05820762e4b311e1193a4e016098229e 1618 shells optional dash_0.5.8-2.10.dsc
 b2177040c7c8a6c140a3392d043eb274 43920 shells optional 
dash_0.5.8-2.10.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQEcBAEBCAAGBQJaaYWJAAoJEJ1bI/kYT6UUw6kIAJlzi+Mra2pJdfXIVVlvKMSQ
gxpc4MiOC15sPQvsc4GlGzaVFM1k+FkPpdinZkabopBrp+HQ6TveP6FIdPuIg6CH
CIGkCYsiKC0Vwtmrp9x+2dHoMtz5WiXgyKYKAoUM+troZWcKlNBubeTp2lTV/MeS
IFyM9ZtSqHhEEvclOWHemyDNatjGg8IMKjbvW2bb1zVKnhoOMvu2qHaLbJYoNEcI
Quz9m5tMJ9YdllKzOyyd3DxfsR7GOfnVtQOe/LerJCHaNVDpxE/sOpDVRF3b7OM8
6Mz4RlmuczeI+zodcPiwmpgZuzH8MFUvDTRJxSra3IA6Rw2362JKEht/AwPkREE=
=NjTC
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to