Bug#1026310: vdr-dev: dh_vdrplugin_depends fail with "error: Bug in helper:"

2023-02-12 Thread Rogo
Control: tags -1 patch

Hi,

the problem is that the value of the substvar is read from a file and perl adds 
a newline at the end.
Attached patch removes this added newline using chomp.

Best regards,
Rogo
From ca16a57dfea8964905bce2361fce906df0cc8483 Mon Sep 17 00:00:00 2001
From: Rogo 
Date: Sun, 12 Feb 2023 17:20:48 +0100
Subject: [PATCH] Remove trailing newline from abiversion

---
 debian/dh-addon-vdrplugin/dh_vdrplugin_depends | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/dh-addon-vdrplugin/dh_vdrplugin_depends b/debian/dh-addon-vdrplugin/dh_vdrplugin_depends
index 0ea3bb54..5be50ba6 100755
--- a/debian/dh-addon-vdrplugin/dh_vdrplugin_depends
+++ b/debian/dh-addon-vdrplugin/dh_vdrplugin_depends
@@ -43,6 +43,8 @@ no locale;
 open(my $abiversion_file, ";
 close($abiversion_file);
+# remove trailing newline
+chomp($abiversion[-1]);
 
 verbose_print("Setting vdr:Depends=@abiversion");
 
-- 
2.39.1



Bug#1026310: vdr-dev: dh_vdrplugin_depends fail with "error: Bug in helper:"

2022-12-18 Thread Niels Thykier

Control: severity -1 serious

On Sun, 18 Dec 2022 10:16:52 +0100 Christian Marillat 
 wrote:

Package: vdr-dev
Version: 2.6.0-1+b1
Severity: normal

Dear Maintainer,

I don't know if this is a bug in debhelepr or in  vdr-dev

Feel free to reassign if needed.

,
| dh_vdrplugin_depends: warning: Unescaped newlines in the value of a substvars 
can cause broken substvars files (see #1025714).
| dh_vdrplugin_depends: warning: Hint: If you really need a newline character, provide it 
as "${Newline}".
| dh_vdrplugin_depends: error: Bug in helper: The substvar must not contain a 
raw newline character (vdr:Depends=vdr-abi-2.6.0-debian\n)
`

Christian


[...]


It is a bug in `dh_vdrplugin_depends` / vdr-dev.

The package name is "vdr-abi-2.6.0-debian" without a newline in it. If 
you were to add a version to this dependency then we would have ended 
with the invalid substitution contents:


"""
vdr:Depends=vdr-abi-2.6.0-debian
(>= 2.6.0)
"""

which would have caused a parse error at dpkg-gencontrol time.  Without 
a version, you *often* get away without issues (but there are still 
cases where this could go wrong)


In the concrete case, a version is unlikely to be added (as it is 
embedded in the package name), but the newline could still cause grief 
in other cases.  Therefore, debhelper is now taking a "strict" approach 
to substvars.



Thanks,
~Niels



Bug#1026310: vdr-dev: dh_vdrplugin_depends fail with "error: Bug in helper:"

2022-12-18 Thread Christian Marillat
Package: vdr-dev
Version: 2.6.0-1+b1
Severity: normal

Dear Maintainer,

I don't know if this is a bug in debhelepr or in  vdr-dev

Feel free to reassign if needed.

,
| dh_vdrplugin_depends: warning: Unescaped newlines in the value of a substvars 
can cause broken substvars files (see #1025714).
| dh_vdrplugin_depends: warning: Hint: If you really need a newline character, 
provide it as "${Newline}".
| dh_vdrplugin_depends: error: Bug in helper: The substvar must not contain a 
raw newline character (vdr:Depends=vdr-abi-2.6.0-debian\n)
`

Christian


-- System Information:
Debian Release: bookworm/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.0.13 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vdr-dev depends on:
ii  debhelper   13.11.3
ii  linux-libc-dev  6.0.12-1

vdr-dev recommends no packages.

Versions of packages vdr-dev suggests:
ii  dh-make  2.202204
ii  make 4.3-4.1

-- no debconf information