Bug#887456: init-system-helpers: deb-systemd-helper does not honor the same package-relevant unit paths as systemd

2018-01-18 Thread Felipe Sateler
On Wed, Jan 17, 2018 at 9:44 PM, Michael Biebl  wrote:
> Am 17.01.2018 um 11:35 schrieb Guillem Jover:
>> --- a/script/deb-systemd-helper
>> +++ b/script/deb-systemd-helper
>> @@ -122,6 +122,8 @@ sub find_unit {
>>  $service_path = "/etc/systemd/system/$scriptname";
>>  } elsif (-f "/lib/systemd/system/$scriptname") {
>>  $service_path = "/lib/systemd/system/$scriptname";
>> +} elsif (-f "/usr/lib/systemd/system/$scriptname") {
>> +$service_path = "/usr/lib/systemd/system/$scriptname";
>>  }
>>  return $service_path;
>>  }
>
> Looks ok to me on a cursory glance.

LGTM too.

> With merged-usr in mind, I wonder though if we should prefer
> /usr/lib/systemd over /lib/systemd. The latter will be a symlink in such
> a case and by prefering /usr/lib/systemd we'd avoid one indirection.
>
> Felipe, wdyt?

I'm indifferent. I don't think there is much impact, but we still
don't enable usrmerge by default...

-- 

Saludos,
Felipe Sateler



Bug#887456: init-system-helpers: deb-systemd-helper does not honor the same package-relevant unit paths as systemd

2018-01-17 Thread Michael Biebl
Am 17.01.2018 um 11:35 schrieb Guillem Jover:
> --- a/script/deb-systemd-helper
> +++ b/script/deb-systemd-helper
> @@ -122,6 +122,8 @@ sub find_unit {
>  $service_path = "/etc/systemd/system/$scriptname";
>  } elsif (-f "/lib/systemd/system/$scriptname") {
>  $service_path = "/lib/systemd/system/$scriptname";
> +} elsif (-f "/usr/lib/systemd/system/$scriptname") {
> +$service_path = "/usr/lib/systemd/system/$scriptname";
>  }
>  return $service_path;
>  }

Looks ok to me on a cursory glance.
With merged-usr in mind, I wonder though if we should prefer
/usr/lib/systemd over /lib/systemd. The latter will be a symlink in such
a case and by prefering /usr/lib/systemd we'd avoid one indirection.

Felipe, wdyt?


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#887456: init-system-helpers: deb-systemd-helper does not honor the same package-relevant unit paths as systemd

2018-01-17 Thread Guillem Jover
On Wed, 2018-01-17 at 03:20:03 +0100, Michael Biebl wrote:
> Am 16.01.2018 um 20:02 schrieb Guillem Jover:
> > Source: init-system-helpers
> > Source-Version: 1.51
> > Severity: normal
> > Tags: patch

> > The current list of paths honored by deb-systemd-helper does not match
> > the one in systemd [L]. That's fine for several of them because they
> > are intended to be for run-time generated content, or local admin
> > content. There is still at least one that can be used by packages
> > depending on the distribution policy that is missing, i.e.
> > “/usr/local/lib/systemd/system”.
> 
> You talk about /usr/local/lib/systemd/system here but the patch is adds
> /usr/lib/systemd/system/
> 
> Can you please clarify

Right, sorry, that was a copy & paste error. Attached the corrected
patch.

Thanks,
Guillem
From 1ce4aae26c2b48b1900238b18d2d5f8fd36fe9f6 Mon Sep 17 00:00:00 2001
From: Guillem Jover 
Date: Tue, 16 Jan 2018 19:07:44 +0100
Subject: [PATCH] Honor the same package-relevant unit paths as systemd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The current list of paths honored by deb-systemd-helper does not match
the one in systemd. That's fine for several of them because they are
intended to be for run-time generated content, or local administrator
content. There is still at least one that can be used by packages
depending on the distribution policy that is missing, i.e.
“/usr/lib/systemd/system”.

Signed-off-by: Guillem Jover 
---
 script/deb-systemd-helper | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/script/deb-systemd-helper b/script/deb-systemd-helper
index 3d40d8d..5e630d5 100755
--- a/script/deb-systemd-helper
+++ b/script/deb-systemd-helper
@@ -122,6 +122,8 @@ sub find_unit {
 $service_path = "/etc/systemd/system/$scriptname";
 } elsif (-f "/lib/systemd/system/$scriptname") {
 $service_path = "/lib/systemd/system/$scriptname";
+} elsif (-f "/usr/lib/systemd/system/$scriptname") {
+$service_path = "/usr/lib/systemd/system/$scriptname";
 }
 return $service_path;
 }
-- 
2.15.1



Bug#887456: init-system-helpers: deb-systemd-helper does not honor the same package-relevant unit paths as systemd

2018-01-16 Thread Michael Biebl
Hi Guillem

Am 16.01.2018 um 20:02 schrieb Guillem Jover:
> Source: init-system-helpers
> Source-Version: 1.51
> Severity: normal
> Tags: patch
> 
> Hi!
> 
> The current list of paths honored by deb-systemd-helper does not match
> the one in systemd [L]. That's fine for several of them because they
> are intended to be for run-time generated content, or local admin
> content. There is still at least one that can be used by packages
> depending on the distribution policy that is missing, i.e.
> “/usr/local/lib/systemd/system”.

You talk about /usr/local/lib/systemd/system here but the patch is adds
/usr/lib/systemd/system/

Can you please clarify


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#887456: init-system-helpers: deb-systemd-helper does not honor the same package-relevant unit paths as systemd

2018-01-16 Thread Guillem Jover
Source: init-system-helpers
Source-Version: 1.51
Severity: normal
Tags: patch

Hi!

The current list of paths honored by deb-systemd-helper does not match
the one in systemd [L]. That's fine for several of them because they
are intended to be for run-time generated content, or local admin
content. There is still at least one that can be used by packages
depending on the distribution policy that is missing, i.e.
“/usr/local/lib/systemd/system”.

 [L] 


Thanks,
Guillem
From 99fb1880ce55a79a135a4dc60aa94fd88d7b362b Mon Sep 17 00:00:00 2001
From: Guillem Jover 
Date: Tue, 16 Jan 2018 19:07:44 +0100
Subject: [PATCH] Honor the same package-relevant unit paths as systemd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The current list of paths honored by deb-systemd-helper does not match
the one in systemd. That's fine for several of them because they are
intended to be for run-time generated content, or local administrator
content. There is still at least one that can be used by packages
depending on the distribution policy that is missing, i.e.
“/usr/local/lib/systemd/system”.

Signed-off-by: Guillem Jover 
---
 script/deb-systemd-helper | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/script/deb-systemd-helper b/script/deb-systemd-helper
index 3d40d8d..5e630d5 100755
--- a/script/deb-systemd-helper
+++ b/script/deb-systemd-helper
@@ -122,6 +122,8 @@ sub find_unit {
 $service_path = "/etc/systemd/system/$scriptname";
 } elsif (-f "/lib/systemd/system/$scriptname") {
 $service_path = "/lib/systemd/system/$scriptname";
+} elsif (-f "/usr/lib/systemd/system/$scriptname") {
+$service_path = "/usr/lib/systemd/system/$scriptname";
 }
 return $service_path;
 }
-- 
2.15.1