Package: debhelper
Version: 9.20130605
Severity: normal
Tags: patch

Please apply the attached patch.

Quote from the commit message:

  While newer systemd versions don’t need the absolute path, this breaks
  with older systemd versions, notably v44, which we currently have in
  wheezy.
  
  Using the absolute paths has no drawbacks and works with both versions.

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: armel
i386

Kernel: Linux 3.8.3 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages debhelper depends on:
ii  binutils    2.22-7.1
ii  dpkg        1.16.9
ii  dpkg-dev    1.16.9
ii  file        5.11-2
ii  man-db      2.6.2-1
ii  perl        5.14.2-18
ii  po-debconf  1.0.16+nmu2

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make  0.61

-- no debconf information
>From f8591163493dc5c08332da1342dee1c07025ab1f Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <mich...@stapelberg.de>
Date: Tue, 18 Jun 2013 22:51:11 +0200
Subject: [PATCH] dh_installinit: use absolute path to tmpfiles
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

While newer systemd versions don’t need the absolute path, this breaks
with older systemd versions, notably v44, which we currently have in
wheezy.

Using the absolute paths has no drawbacks and works with both versions.
---
 dh_installinit |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/dh_installinit b/dh_installinit
index 4b6702d..7ee16ef 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -266,17 +266,19 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 			my @tmpfiles;
 			find({
 				wanted => sub {
-					return unless -f $File::Find::name;
-					if ($File::Find::name =~ m,^$tmpdir/usr/lib/tmpfiles\.d/, ||
-						$File::Find::name =~ m,^$tmpdir/etc/tmpfiles\.d/,) {
-						push @tmpfiles, $File::Find::name;
+					my $name = $File::Find::name;
+					return unless -f $name;
+					$name =~ s/^$tmpdir//g;
+					if ($name =~ m,^/usr/lib/tmpfiles\.d/, ||
+						$name =~ m,^/etc/tmpfiles\.d/,) {
+						push @tmpfiles, $name;
 					}
 				},
 				no_chdir => 1,
 			}, $tmpdir);
 			if (@tmpfiles > 0) {
 				autoscript($package,"postinst", "postinst-init-tmpfiles",
-					"s/#TMPFILES#/" . join(" ", map { basename($_) } @tmpfiles)."/");
+					"s,#TMPFILES#," . join(" ", @tmpfiles).",");
 			}
 
 			if (! $dh{NO_START}) {
-- 
1.7.10.4

Reply via email to