# Being honest here. See below for work arounds
# and solutions
tags 1128017 wontfix
retitle 1128017 debhelper: config files are always split
thanks

Jonas Smedegaard:
Package: debhelper
Version: 13.29
Severity: normal

The package src:icc-profiles 2.4 contains this file:

"IDEAlliance/Introducing PrintWide - Idealliance.pdf"

I then provide debian/docs with this content:

IDEAlliance

The resulting binary package contains this file:

"CONTENTS/usr/share/doc/icc-profiles/IDEAlliance/Introducing PrintWide -"

I did not expect dh_installdocs to strip " Idealliance.pdf" from the
filename.

  - Jonas

[...]

This is a deeply rooted "feature" of how debhelper parses it "simple" configuration files via `filearray` and `filedoublearray` that I do not expect to be fixed.

To be honest, I am a bit surprised that any spaces survived and the code splits on all white spaces (it uses the `split` function from Perl with no arguments).

I can offer the following work around/solutions:

 * Using a substitution variable such as ${Space} and ${Tab}. These are
   expanded after the `split` and therefore do not count as separators.
   Assumes compat 13+. Relevant docs are in `man 7 debhelper` though, it
   should literally just `s/ /${Space}/` for the spaces you want to
   keep.

   It is one of the reasons the substitution feature was added and
   applied after the split (and before the glob). It is the "official
   solution" (read work around).

 * Using an executable `debian/pkg.docs`, since debhelper does not split
   the output (nor glob) the output of those. It is a pain, since you
   have to provide your own glob plus never emit comments, etc. On the
   "plus" side it works since compat 9. Still, I do not recommend it,
   because it will be a pain to maintain.

 * Given the simplicity of the package involved, you should be able to
   migrate it to `debputy`, which does not have this issue[1]. It is
   an entirely different packaging stack, and I do not know whether it
   is fits your style.

   - I ended up writing a patch for it, because the instructions would
     be incomplete. I have no expectations that you consider this patch.
     I wrote it because if you happened to find it interesting, I wanted
     the transition to be a smooth process and my tooling was not
     adequate at time of writing.

PS: While testing my own instructions, I noted that `debputy lint` flags the `Comments` fields in `debian/copyright` as being a typo of `Comment`. This is based on the official documentation (https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#comment-field) uses `Comment` (without an `s`) as well with no reference to `Comments` being an alias. In fact `Comments` are not used at all in that page.

I hope this response was useful.

Best regards,
Niels


[1]: The full part is in the attached patch. It is based on the following:

root$ apt install debputy debputy-lsp  # unstable or stable-backports
$ cd path/to/icc-profiles
$ debputy migrate-from-dh
   --acceptable-migration-issues=min-compat-level,dh-hook-targets
   --migration-target full

# Normally, fix up the manual bits. But I have attached a full patch
# because the migration code is still lacking for the `full` target.

$ git commit -a

From 797bc96e870505a48f3c7fa900525b0703cf9b31 Mon Sep 17 00:00:00 2001
From: Niels Thykier <[email protected]>
Date: Sun, 15 Feb 2026 09:24:50 +0000
Subject: [PATCH] migrate packaging to `debputy` and its `full` integration
 mode

For the reviewer:

 * The installation rules are stateful (order matters). This is why
   the `-X` for `dh_installdocs` are unnecessary.

   [Docs behind the rationale for stateful parsing]

 * In the full integration mode, `debian/rules` is not used for
   packging. For the purpose of #1128017, the `dh-sequence-zz-debputy`
   integration mode could also have worked. However, given no
   upstream build system is involved, there is practically no difference.

 * The version constraint in `Build-Depends` are satisfied in stable
   but not oldstable. These are mostly here to serve as a hint of this
   limitation in case oldstable was important.

 * The `debputy` tool comes with its own features for checking its
   files. These include `debputy lint`, `debputy check-manifest`,
   and in-editor supprt via LSP. All these features works *before*
   the build unlike `lintian`, which is a "post build" tool.

Relevant documentation:

 * [Reference documentation for th manifest format]
 * [Getting started with linting and editor features]

[Docs behind the rationale for stateful parsing]: https://salsa.debian.org/debian/debputy/-/blob/main/docs/IMPLEMENTATION-DECISIONS.md?ref_type=heads#stateless-vs-stateful-installation-rules

[Reference documentation for th manifest format]: https://salsa.debian.org/debian/debputy/-/blob/main/MANIFEST-FORMAT.md?ref_type=heads

[Getting started with linting and editor features]: https://salsa.debian.org/debian/debputy/-/blob/main/GETTING-STARTED-WITH-LINT-AND-LSP-FEATURES.md?ref_type=headsk
---
 debian/control          |  4 +++-
 debian/debputy.manifest | 14 ++++++++++++++
 debian/docs             |  5 -----
 debian/install          |  1 -
 debian/rules            |  7 -------
 5 files changed, 17 insertions(+), 14 deletions(-)
 create mode 100644 debian/debputy.manifest
 delete mode 100644 debian/docs
 delete mode 100644 debian/install
 delete mode 100755 debian/rules

diff --git a/debian/control b/debian/control
index 6216ca3..51c20db 100644
--- a/debian/control
+++ b/debian/control
@@ -1,8 +1,10 @@
 Source: icc-profiles
 Section: non-free/graphics
 Maintainer: Jonas Smedegaard <[email protected]>
+Build-Driver: debputy
 Build-Depends:
- debhelper-compat (= 13),
+ debputy (>= 0.1.45~),
+ dpkg-dev (>= 1.22.7~),
 Standards-Version: 4.7.3
 Vcs-Git: https://salsa.debian.org/debian/icc-profiles.git
 Vcs-Browser: https://salsa.debian.org/debian/icc-profiles
diff --git a/debian/debputy.manifest b/debian/debputy.manifest
new file mode 100644
index 0000000..cd66763
--- /dev/null
+++ b/debian/debputy.manifest
@@ -0,0 +1,14 @@
+manifest-version: '0.1'
+installations:
+- install:
+    sources:
+    - '*/*.icc'
+    - '*/*.icm'
+    dest-dir: usr/share/color/icc
+- install-docs:
+    sources:
+    - ECI
+    - HP
+    - IDEAlliance
+    - JPMA
+    - color.org
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index e6172d3..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,5 +0,0 @@
-ECI
-HP
-IDEAlliance
-JPMA
-color.org
diff --git a/debian/install b/debian/install
deleted file mode 100644
index f10da7a..0000000
--- a/debian/install
+++ /dev/null
@@ -1 +0,0 @@
-*/*.icc */*.icm usr/share/color/icc
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index ecd1c26..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/make -f
-
-%:
-	dh $@
-
-override_dh_installdocs:
-	dh_installdocs -X.icc -X.icm
-- 
2.51.0

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to