Package: dh-runit
Version: 2.8.15
Severity: normal
Tags: patch

It looks that when the 'presubj' option is set and the package ships it's own
presubj file (using package.bug-presubj), dh-runit completely overwrites the 
presubj
file from the package.
Thanks to Colin Watson for spotting this.
A quick fix can be to turn the presubj option into a noop if a presubj file is 
detected,
see the patch



---
 dh_runit | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/dh_runit b/dh_runit
index 6d778ca..dfc0ecf 100755
--- a/dh_runit
+++ b/dh_runit
@@ -155,9 +155,14 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) {
         }
 
         if ($conf->{presubj}) {
-            template_from_data_directory('presubj', 
"$tmp/usr/share/bug/$pkg/presubj",
-                                         { pkg => $pkg }, 0644);
-        }
+            if ( -e "debian/$pkg.bug-presubj") {
+               warning("presubj for $pkg already exists and takes precedence, 
runit presubj file not installed")
+            }
+           else {
+             template_from_data_directory('presubj', 
"$tmp/usr/share/bug/$pkg/presubj",
+                                          { pkg => $pkg }, 0644);
+           }
+         }
     }
     # runit=2.1.2-20 introduced 'runit-log' user
     # runit=2.1.2-23 introduced /lib/runit/invoke-run
-- 
2.27.0

 


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.7.0-1-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)

Versions of packages dh-runit depends on:
ii  debhelper                    13.1
ii  libfile-copy-recursive-perl  0.45-1
ii  libfile-slurp-perl           9999.30-1
ii  libtext-hogan-perl           2.01-1

dh-runit recommends no packages.

dh-runit suggests no packages.

-- no debconf information

Reply via email to