Your message dated Thu, 10 Sep 2026 11:35:16 +0000
with message-id <[email protected]>
and subject line Bug#1143496: fixed in dh-doc-privacy 0.4
has caused the Debian Bug report #1143496,
regarding dh-doc-privacy: dh-sequence-doc-privacy
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.)


-- 
1143496: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1143496
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dh-doc-privacy

Hi,

Here's a preliminary patch that implements dh-sequence-doc-privacy,
allowing more compact usage of dh-doc-privacy when the default behaviour
of cleaning README.* files is enough.

- Add dh-sequence-doc-privacy to Build-Depends.

- Pass "--with doc-privacy" to debhelper, and add dh-doc-privacy to
  Build-Depends.

Debhelper may pass various arguments to the tool, which have to be
ignored. The test case testing for an error on unknown arguments has
been replaced by a test that passes a real debhelper option, and doesn't
produce an error.

This could be extended further by adding an optional configuration file
("debian/doc-privacy" ?) for situations where more files need to be
cleaned.

Comments?

>From af19e5f07050c0b9071fb1de176ad0061dcc5b39 Mon Sep 17 00:00:00 2001
From: Teemu Hukkanen <[email protected]>
Date: Mon, 3 Aug 2026 00:44:57 +0300
Subject: [PATCH] Implement dh-sequence-doc-privacy

Allows adding "dh-sequence-doc-privacy" to package Build-Depends,
without having to add anything to debian/rules, or alternatively
passing "--with doc-privacy" to debhelper.

Requires ignoring unknown debhelper arguments. The corresponding test
case has been rewritten to test such a scenario.
---
 README.md                     | 10 ++++++++--
 debian/control                |  2 ++
 debian/dh-doc-privacy.install |  2 ++
 dh/doc_privacy.pm             | 10 ++++++++++
 dh_doc_privacy                |  3 ---
 tests/test_dh_doc_privacy.py  |  9 ++++-----
 6 files changed, 26 insertions(+), 10 deletions(-)
 create mode 100644 debian/dh-doc-privacy.install
 create mode 100644 dh/doc_privacy.pm

diff --git a/README.md b/README.md
index a960797..340cb85 100644
--- a/README.md
+++ b/README.md
@@ -34,9 +34,15 @@ The tool is packaged for Debian and available in the archive:
 ---
 ## Usage in packages
 
-`dh_doc_privacy` must be invoked manually at an appropriate point in `debian/rules`, before documentation is built or installed.
+There are three ways to use `dh_doc_privacy`:
 
-The most common placement is in an override of `dh_auto_build` (or a hook like `execute_after_dh_auto_build`), before running tools like Sphinx, Doxygen, etc.
+1. Add dh-sequence-doc-privacy to Build-Depends.
+
+2. Pass `--with doc_privacy` to debhelper, and add `dh-doc-privacy` to
+   Build-Depends.
+
+3. Add `dh-doc-privacy` to Build-Depends, and invoke `dh_doc_privacy` at an appropriate point in `debian/rules`, before documentation is built or installed.
+   The most common placement is in an override of `dh_auto_build` (or a hook like `execute_after_dh_auto_build`), before running tools like Sphinx, Doxygen, etc.
 
 ### Examples
 
diff --git a/debian/control b/debian/control
index 6a73210..1f7fe97 100644
--- a/debian/control
+++ b/debian/control
@@ -21,6 +21,8 @@ Depends:
  debhelper,
  python3:any,
  ${misc:Depends},
+Provides:
+ dh-sequence-doc-privacy,
 Description: debhelper addon to remove external web resources from package documentation
  This debhelper addon automatically removes remotely-hosted images (such as
  build status badges, coverage badges, version badges from shields.io, GitHub,
diff --git a/debian/dh-doc-privacy.install b/debian/dh-doc-privacy.install
new file mode 100644
index 0000000..e64efc1
--- /dev/null
+++ b/debian/dh-doc-privacy.install
@@ -0,0 +1,2 @@
+dh/doc_privacy.pm usr/share/perl5/Debian/Debhelper/Sequence/
+build/dh_doc_privacy usr/bin/
diff --git a/dh/doc_privacy.pm b/dh/doc_privacy.pm
new file mode 100644
index 0000000..aed88b8
--- /dev/null
+++ b/dh/doc_privacy.pm
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+# debhelper sequence file for dh_doc_privacy
+
+use warnings;
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+insert_before("dh_update_autotools_config", "dh_doc_privacy");
+
+1;
diff --git a/dh_doc_privacy b/dh_doc_privacy
index 359f8a1..bee1e92 100755
--- a/dh_doc_privacy
+++ b/dh_doc_privacy
@@ -114,9 +114,6 @@ def parse_args(argv: list[str]) -> tuple[Options, list[str]]:
         help="treat DIR as the package source root instead of the current directory",
     )
     parsed, rest = parser.parse_known_args(argv)
-    unknown = [arg for arg in rest if arg.startswith("-")]
-    if unknown:
-        error(f"unknown option(s): {' '.join(unknown)}")
     sourcedir = Path(parsed.sourcedir) if parsed.sourcedir else None
     options = Options(
         excludes=parsed.exclude,
diff --git a/tests/test_dh_doc_privacy.py b/tests/test_dh_doc_privacy.py
index a35087e..225d071 100644
--- a/tests/test_dh_doc_privacy.py
+++ b/tests/test_dh_doc_privacy.py
@@ -515,12 +515,11 @@ def test_no_act_processes_readme() -> None:
     shutil.rmtree(test_root / "debian/tmp", ignore_errors=True)
 
 
-def test_unknown_option_error() -> None:
-    """An unknown option exits with status 1 and an error message."""
+def test_unknown_option_ignore() -> None:
+    """Debhelper options should be ignored."""
     test_root = prepare_test_root()
-    result = run_dh_tool(["dh_doc_privacy", "--no-such-option"], cwd=test_root)
-    assert result.returncode == 1
-    assert "unknown option" in result.stderr
+    result = run_dh_tool(["dh_doc_privacy", "-O--buildsystem=pybuild"], cwd=test_root)
+    assert result.returncode == 0
 
 
 def test_nonexistent_path_error() -> None:
-- 
2.53.0


--- End Message ---
--- Begin Message ---
Source: dh-doc-privacy
Source-Version: 0.4
Done: Edward Betts <[email protected]>

We believe that the bug you reported is fixed in the latest version of
dh-doc-privacy, 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.
Edward Betts <[email protected]> (supplier of updated dh-doc-privacy 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: SHA512

Format: 1.8
Date: Thu, 10 Sep 2026 11:17:59 +0100
Source: dh-doc-privacy
Architecture: source
Version: 0.4
Distribution: unstable
Urgency: medium
Maintainer: Edward Betts <[email protected]>
Changed-By: Edward Betts <[email protected]>
Closes: 1143496
Changes:
 dh-doc-privacy (0.4) unstable; urgency=medium
 .
   * Add dh-sequence-doc-privacy allowing more compact usage of dh-doc-privacy
     when the default behaviour of cleaning README.* files is enough. Written
     by Teemu Hukkanen <[email protected]>. (Closes: #1143496)
   * Preserve hyperlinks and unrelated content when removing remote resources
     from reStructuredText raw HTML blocks.
   * Document sequence activation and customisation, correct cleanup ordering
     in build examples, and clarify the Markdown reference-image limitation.
   * Add regression tests for argument parsing and raw HTML cleanup, and
     integration tests for automatic and explicit sequence activation, custom
     paths, exclusions, and restoration. Cover option boundaries and multiline
     raw HTML resources.
   * Stop the build on test failures with any supported Python interpreter.
   * Generate self-contained test package metadata so dh_clean restoration
     tests work during autopkgtest.
   * Use /usr/share/dpkg/pkg-info.mk and DEB_VERSION in debian/rules instead
     of invoking dpkg-parsechangelog directly.
   * Add dh-sequence-single-binary.
   * Remove debhelper compat 14 auto-applied substvars.
   * Prefix debhelper files with the binary package name.
   * Switch to autopkgtest-pkg-pybuild.
Checksums-Sha1:
 cdf720d4dee44f488dbaa15c12fa9e95a9cbdc75 2045 dh-doc-privacy_0.4.dsc
 c87889ac187993443bd3465b82d56421b17b0c35 14616 dh-doc-privacy_0.4.tar.xz
 3bb968ff60bcb4879b503d9db7678421d4cda3f1 24844 dh-doc-privacy_0.4.git.tar.xz
 1526968cb44c47ef1cdacb3e0bd087c77acf9abb 17680 
dh-doc-privacy_0.4_source.buildinfo
Checksums-Sha256:
 08b9510d0ab7c39036f166b3a41b519e7e5d15a0874d2991ae70b82336b3f283 2045 
dh-doc-privacy_0.4.dsc
 f19b2f99db0df75b5cc60443b1642ccaa2165ea185c538beee6b18f430e4d30f 14616 
dh-doc-privacy_0.4.tar.xz
 891cef346d61db0d46c5a7517b028054c245fb1290dab5645060f6cc8b61fb69 24844 
dh-doc-privacy_0.4.git.tar.xz
 a937f1acf0c26179d101da5c361a25d94b98c352d642326c9ffec4d624a8b132 17680 
dh-doc-privacy_0.4_source.buildinfo
Files:
 40624daee4115a3decb812f60457af10 2045 devel optional dh-doc-privacy_0.4.dsc
 31e405e877d1bc687ac7bac5b939e465 14616 devel optional dh-doc-privacy_0.4.tar.xz
 43a3874feaaf9f0528fdc7c3912f9a35 24844 devel None dh-doc-privacy_0.4.git.tar.xz
 921852933f658a754efc14c179d02e76 17680 devel optional 
dh-doc-privacy_0.4_source.buildinfo
Git-Tag-Info: tag=6042e3d4685c43e535f7fd2d7a26df195160c364 
fp=fb8acfa78c726089c38ad0269605a1098c63b92a
Git-Tag-Tagger: Edward Betts <[email protected]>

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

iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmqij3oACgkQYG0ITkaD
wHkVXxAAnzCmt+UkOtrEPwBGsygGOWPhQZXOBhAFQDPCzZR0aPSRmCNJrCsrSXjz
fHz+aVhDpIwnfV3RD7Giq9cl5+p8Xz8/cQPk0BqpO3b8ugkGlhvKgxaIWNQybBc4
upjBomiwBv6cB8dt1+LGdH6E5P3pfzRZfDmChH/L/gVZtEykW/KX4kjwWrUxrdni
ZVpyTq/SfetTznBhladx7NxkIiHzN8PGFd1A5slMlis/Df2vSWN4DL4IQSEzmp/Q
XKQa2gPu5DHesmesHNWIsSH7BCYCLjSjJrWvoaNrxT/neOpKQWfytXDiU0RZIkHZ
CmP2/4VjRQDDT7e2wQy5zfayI+oK+SsyP4xinRk/rAf7nyinXwO6AmuRwkJFMpSG
Ln1VhU0oTR2S2600MZfEVj+hBp+3awnfVg54dAbYRC5CpjjGRYpX2IZ5NwspeVi1
KWRawGdVxsohV6H24H5TUYfCJmgadKhZE0LBx/rgJVKrmNYR82B6hPEImMNNHtUy
gxulEBKj0THMH30U06fKHx2AQs7nibw2e663/WXWe9Wez5u4KWomnZYppc1Ijb4x
7ZmStylebIowFymwN0s56ljp7aGqUUstmp/PG04AuuNN++vcrkr+IGO8hr/j/eUv
BtzEEOYbUYf6Y67JHXTVn6g0Az+I/YW4zHNZG9qq7b0bUrHkT8Y=
=1MDx
-----END PGP SIGNATURE-----

Attachment: pgpvX51QOp25q.pgp
Description: PGP signature


--- End Message ---

Reply via email to