Your message dated Sun, 14 Aug 2016 09:49:49 +0000 with message-id <[email protected]> and subject line Bug#831465: fixed in debhelper 9.20160814 has caused the Debian Bug report #831465, regarding debhelper: tests for dh_installdocs 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.) -- 831465: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831465 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Source: debhelper Version: 9.20160709 Severity: wishlist Tags: patch On 2016-07-09 11:54 +0000, Niels Thykier wrote: > Sven Joachim: > >> It seems to me that dh_installdocs really needs a testsuite >> for all the possible cases though. >> >> Cheers, >> Sven >> > > Indeed, I have been missing that for several debhelper tools. It would > need some infrastructure in place and probably have to be optional to > keep build-depends minimal. Here is a patch which adds a few build-time tests for dh_installdocs. It catches the problems observed in #830309, but does not do much more. Still, at least it's a start. Cheers, Sven>From 096142e8db595389d7ec1ff4da26448d3453fa77 Mon Sep 17 00:00:00 2001 From: Sven Joachim <[email protected]> Date: Mon, 11 Jul 2016 18:12:54 +0200 Subject: [PATCH] Add some tests for for dh_installdocs This is a small test suite for dh_installdocs, motivated by the problems found in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830309. It catches both the bug introduced in commit 71007f72da682dd9d7f932d81ca and the regression caused by commit 863ef397c939340e863be1e96c822934a. The tests verify that the correct /usr/share/doc symlinks and directories are set up with and without the --link-doc option, in both compat level 9 and 11. Since dh_installdocs runs chown(1), the tests are skipped if run by an ordinary user and fakeroot is unavailable. --- Makefile | 2 +- t/dh_installdocs/debian/changelog | 5 +++ t/dh_installdocs/debian/compat | 1 + t/dh_installdocs/debian/control | 20 ++++++++++ t/dh_installdocs/debian/docfile | 1 + t/dh_installdocs/dh_installdocs.t | 78 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 t/dh_installdocs/debian/changelog create mode 100644 t/dh_installdocs/debian/compat create mode 100644 t/dh_installdocs/debian/control create mode 100644 t/dh_installdocs/debian/docfile create mode 100755 t/dh_installdocs/dh_installdocs.t diff --git a/Makefile b/Makefile index 9c2e9f9..e27779b 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,6 @@ install: install -m 0644 Debian/Debhelper/Buildsystem/*.pm $(DESTDIR)$(PERLLIBDIR)/Buildsystem test: version - ./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ && -f && -x } @ARGV' t/* t/buildsystems/* + ./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ && -f && -x } @ARGV' t/* t/*/* # clean up log etc ./run dh_clean diff --git a/t/dh_installdocs/debian/changelog b/t/dh_installdocs/debian/changelog new file mode 100644 index 0000000..5850f0e --- /dev/null +++ b/t/dh_installdocs/debian/changelog @@ -0,0 +1,5 @@ +foo (1.0-1) unstable; urgency=low + + * Initial release. (Closes: #XXXXXX) + + -- Test <testing@nowhere> Mon, 11 Jul 2016 18:10:59 +0200 diff --git a/t/dh_installdocs/debian/compat b/t/dh_installdocs/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/t/dh_installdocs/debian/compat @@ -0,0 +1 @@ +9 diff --git a/t/dh_installdocs/debian/control b/t/dh_installdocs/debian/control new file mode 100644 index 0000000..48d4de2 --- /dev/null +++ b/t/dh_installdocs/debian/control @@ -0,0 +1,20 @@ +Source: foo +Section: misc +Priority: optional +Maintainer: Test <testing@nowhere> +Standards-Version: 3.9.8 + +Package: foo +Architecture: all +Description: package foo + Package foo + +Package: bar +Architecture: all +Description: package bar + Package bar + +Package: baz +Architecture: all +Description: package baz + Package baz diff --git a/t/dh_installdocs/debian/docfile b/t/dh_installdocs/debian/docfile new file mode 100644 index 0000000..2719eec --- /dev/null +++ b/t/dh_installdocs/debian/docfile @@ -0,0 +1 @@ +This file must not be empty, or dh_installdocs won't install it. diff --git a/t/dh_installdocs/dh_installdocs.t b/t/dh_installdocs/dh_installdocs.t new file mode 100755 index 0000000..2c7b381 --- /dev/null +++ b/t/dh_installdocs/dh_installdocs.t @@ -0,0 +1,78 @@ +#!/usr/bin/perl +use strict; +use Test::More; +use File::Basename (); + +# Let the tests be run from anywhere, but current directory +# is expected to be the one where this test lives in. +chdir File::Basename::dirname($0) or die "Unable to chdir to ".File::Basename::dirname($0); + +my $TOPDIR = "../.."; +my $rootcmd; + +if ($< == 0) { + $rootcmd = ''; +} +else { + system("fakeroot true 2>/dev/null"); + $rootcmd = $? ? undef : 'fakeroot'; +} + +if (not defined($rootcmd)) { + plan skip_all => 'fakeroot required'; +} +else { + plan(tests => 17); +} + +system("rm -rf debian/foo debian/bar debian/baz"); + +my $doc = "debian/docfile"; + +system("$rootcmd $TOPDIR/dh_installdocs -pbar $doc"); +ok(-e "debian/bar/usr/share/doc/bar/docfile"); +system("rm -rf debian/foo debian/bar debian/baz"); + +#regression in debhelper 9.20160709 (#830309) +system("DH_COMPAT=11 $rootcmd $TOPDIR/dh_installdocs -pbar $doc"); +ok(-e "debian/bar/usr/share/doc/foo/docfile"); +system("rm -rf debian/foo debian/bar debian/baz"); + +#regression in debhelper 9.20160702 (#830309) +system("$rootcmd $TOPDIR/dh_installdocs -pbaz --link-doc=foo $doc"); +ok(-l "debian/baz/usr/share/doc/baz"); +ok(readlink("debian/baz/usr/share/doc/baz") eq 'foo'); +ok(-e "debian/baz/usr/share/doc/foo/docfile"); +system("rm -rf debian/foo debian/bar debian/baz"); + +system("DH_COMPAT=11 $rootcmd $TOPDIR/dh_installdocs -pbaz --link-doc=foo $doc"); +ok(-l "debian/baz/usr/share/doc/baz"); +ok(readlink("debian/baz/usr/share/doc/baz") eq 'foo'); +ok(-e "debian/baz/usr/share/doc/foo/docfile"); +system("rm -rf debian/foo debian/bar debian/baz"); + +system("DH_COMPAT=11 $rootcmd $TOPDIR/dh_installdocs -pbaz --link-doc=bar $doc"); +ok(-l "debian/baz/usr/share/doc/baz"); +ok(readlink("debian/baz/usr/share/doc/baz") eq 'bar'); +ok(-e "debian/baz/usr/share/doc/foo/docfile"); +system("rm -rf debian/foo debian/bar debian/baz"); + +system("$rootcmd $TOPDIR/dh_installdocs -pfoo --link-doc=bar $doc"); +ok(-l "debian/foo/usr/share/doc/foo"); +ok(readlink("debian/foo/usr/share/doc/foo") eq 'bar'); +ok(-e "debian/foo/usr/share/doc/bar/docfile"); +system("rm -rf debian/foo debian/bar debian/baz"); + +system("DH_COMPAT=11 $rootcmd $TOPDIR/dh_installdocs -pfoo --link-doc=bar $doc"); +ok(-l "debian/foo/usr/share/doc/foo"); +ok(readlink("debian/foo/usr/share/doc/foo") eq 'bar'); +ok(-e "debian/foo/usr/share/doc/bar/docfile"); +system("rm -rf debian/foo debian/bar debian/baz"); + +system("$TOPDIR/dh_clean"); + +# Local Variables: +# indent-tabs-mode: t +# tab-width: 4 +# cperl-indent-level: 4 +# End: -- 2.8.1
--- End Message ---
--- Begin Message ---Source: debhelper Source-Version: 9.20160814 We believe that the bug you reported is fixed in the latest version of debhelper, 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. Niels Thykier <[email protected]> (supplier of updated debhelper 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: Sun, 14 Aug 2016 09:19:35 +0000 Source: debhelper Binary: debhelper Architecture: source Version: 9.20160814 Distribution: unstable Urgency: medium Maintainer: Debhelper Maintainers <[email protected]> Changed-By: Niels Thykier <[email protected]> Description: debhelper - helper programs for debian/rules Closes: 801732 815506 831465 832436 Changes: debhelper (9.20160814) unstable; urgency=medium . * dh_installdocs: Apply patch from Sven Joachim to make --link-doc work again in compat 11 (See: #830309) * t: Apply patch from Sven Joachim to add some test cases to dh_installdocs's --link-doc behaviour. (Closes: #831465) * dh_installinit,dh_systemd_start: Apply patches from Peter Pentchev to make -R default in compat 10 (as documented, but not as implemented). * perl_{build,makemaker}.pm: Apply patch from Dominic Hargreaves to explicitly pass -I. to perl. This is to assist with the fix for CVE-2016-1238. (Closes: #832436) * dh_install: Clarify that "debian/not-installed" is not related to the --exclude parameter. * dh_install: Apply patch from Sven Joachim to support the "debian/tmp" prefix being optional in "debian/not-installed". (Closes: #815506) * Dh_Lib.pm: Apply patch from Dominic Hargreaves to set PERL_USE_UNSAFE_INC to fix a further set of packages which fail to build with . removed from @INC. (Closes: #832436) * Dh_Buildsystems.pm: Enable auto-detection of the maven and gradle buildsystems (provided they are installed). Thanks to Emmanuel Bourg for the suggestion. (Closes: #801732) Checksums-Sha1: 1bd3903f0368106d4dfcd360b0f1fc4c27f1da84 1666 debhelper_9.20160814.dsc 61d9d78c30d50c5f0b0f4cd25e845434f4fe536d 344328 debhelper_9.20160814.tar.xz Checksums-Sha256: 90cc852f9c81d6ddaab26d4b1bf63d3a12e17be72158e806001a35c5984b7da9 1666 debhelper_9.20160814.dsc 2834a7c1dbeafd9402ea68948c815dab19d903503c45fd70e676269fccd359c0 344328 debhelper_9.20160814.tar.xz Files: 34e0eb619484113f33b14e18b417ec57 1666 devel optional debhelper_9.20160814.dsc 2e6a77d0f969d2421260f3f75a2cf1ff 344328 devel optional debhelper_9.20160814.tar.xz -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJXsDiDAAoJEAVLu599gGRC1K0P/3cRLVc9QgNvJTZaqFOJ8f0Y 319Zcyu53U9SoF+jn6XwgNCqBi0KgJ9q+7PvkimIJ3rvHbCxPBOBKOOyQz5vdbkm RRFypiUO995CDqKZiuMzdWy0uD5XBoQWtdXPpy3SJTI0DEgZZNv3qBuH7LyOSXDn L0/wmdKBLnDANRPUBTVtGz/87c9y79xNT1uA+d93im7iv40nBdlXSTf34aLq/jnv rifnSij9DNnfEGnnxIX6DcfhNWBB+zPdGfDDzaobO9+nIBksBdTowus60FWuUqxn xKekk3txWO9YS4nngeWwKw/UZh2sBcbWzLxyTUIoEzYhGDDCckn+TXfgVJNQ/HJW l6ncKEHSt5Ia/AjUpa3NWK123JOJM0jXYhlki014fL6XoPaWZGy7iNfY8RAAwQQE WFEyQKR3MCcahZkJq2j+0Aq0faSHgQhDjddixyYTz0MkP79gHSJaqg+ZPjwCQwQ5 +JziZOeIjScoeLJpxwNmQPl6T4mMGPWCCToR93HKQZPm6jjzloC437ribThK54JJ b+1sH6Aqaw1VxSQWz1BfosjQ9e7VguddykublXjxdWM66gwCwVwyd7lFCT9r0Xa+ +uoUF6Zezb6SSMAdCc9bF8tAAgLiV+7ndalpM5querRajCGwij6NA8GZ+/M4Jk5b mtv3uFG4bIvtuMuPaKsQ =F03n -----END PGP SIGNATURE-----
--- End Message ---

