Patchwork [meta-oe,v2] 22/22] gpsd: use ${PN}.service instead ${PN}.socket in SYSTEMD_SERVICE to enable service

login
register
mail settings
Submitter Andreas Müller
Date Feb. 16, 2012, 2:03 a.m.
Message ID <1329357796-27398-23-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/21307/
State Superseded, archived
Headers show

Comments

Andreas Müller - Feb. 16, 2012, 2:03 a.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Otavio Salvador - Feb. 16, 2012, 10:10 a.m.
On Thu, Feb 16, 2012 at 00:03, Andreas Müller
<schnitzeltony@googlemail.com>wrote:

>  SYSTEMD_PACKAGES = "${PN}-systemd"
> -SYSTEMD_SERVICE = "${PN}.socket"
> +SYSTEMD_SERVICE = "${PN}.service"
>

Why?
Andreas Müller - Feb. 16, 2012, 10:43 a.m.
On Thu, Feb 16, 2012 at 11:10 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Thu, Feb 16, 2012 at 00:03, Andreas Müller
> <schnitzeltony@googlemail.com>wrote:
>
>>  SYSTEMD_PACKAGES = "${PN}-systemd"
>> -SYSTEMD_SERVICE = "${PN}.socket"
>> +SYSTEMD_SERVICE = "${PN}.service"
>>
>
> Why?
>
As far as I can see there is no link from *.socket to *.service (
*.service requires *.socket) - correct?. Interesting: This was
highlighted by the systemd.bbclass modification: without this patch
*.service is not installed. Is there something I have overseen?

Andreas
Otavio Salvador - Feb. 16, 2012, 11:28 a.m.
On Thu, Feb 16, 2012 at 08:43, Andreas Müller
<schnitzeltony@googlemail.com>wrote:

> As far as I can see there is no link from *.socket to *.service (
> *.service requires *.socket) - correct?. Interesting: This was
> highlighted by the systemd.bbclass modification: without this patch
> *.service is not installed. Is there something I have overseen?


As you can see at
http://www.freedesktop.org/software/systemd/man/systemd.socket.html if
Accept is false, then a <service>.service needs to exist, if Accept is
true, then <service>@.service needs to exist.
Andreas Müller - Feb. 16, 2012, 12:03 p.m.
On Thu, Feb 16, 2012 at 12:28 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Thu, Feb 16, 2012 at 08:43, Andreas Müller
> <schnitzeltony@googlemail.com>wrote:
>
>> As far as I can see there is no link from *.socket to *.service (
>> *.service requires *.socket) - correct?. Interesting: This was
>> highlighted by the systemd.bbclass modification: without this patch
>> *.service is not installed. Is there something I have overseen?
>
>
> As you can see at
> http://www.freedesktop.org/software/systemd/man/systemd.socket.html if
> Accept is false, then a <service>.service needs to exist, if Accept is
> true, then <service>@.service needs to exist.
>
> --
OK - but is it a problem to choose *.service? Will
systemd-sysctl-native do the expected job?

Andreas
Otavio Salvador - Feb. 16, 2012, 12:13 p.m.
On Thu, Feb 16, 2012 at 10:03, Andreas Müller
<schnitzeltony@googlemail.com>wrote:

> OK - but is it a problem to choose *.service? Will
> systemd-sysctl-native do the expected job?


Not really but it is a problem expect people will always choose .service
file instead of .socket.
Andreas Müller - Feb. 16, 2012, 2:04 p.m.
On Thu, Feb 16, 2012 at 1:13 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Thu, Feb 16, 2012 at 10:03, Andreas Müller
> <schnitzeltony@googlemail.com>wrote:
>
>> OK - but is it a problem to choose *.service? Will
>> systemd-sysctl-native do the expected job?
>
>
> Not really but it is a problem expect people will always choose .service
> file instead of .socket.
>
This is not the case for many packets having *.socket files
referencing *.service by 'Also'. But in gpsd.socket is nothing like
that.

One question the other way round: What fallout do you expect by this patch?

Andreas
Otavio Salvador - Feb. 16, 2012, 2:09 p.m.
On Thu, Feb 16, 2012 at 12:04, Andreas Müller
<schnitzeltony@googlemail.com>wrote:

> This is not the case for many packets having *.socket files
> referencing *.service by 'Also'. But in gpsd.socket is nothing like
> that.
>
> One question the other way round: What fallout do you expect by this patch?


No fallout but I think we ought to support the specification to avoid
needing to touch this code soon. As systemd explicitly say's that if a
.socket is provided, a .service or a @.serivce needs to be available, we
might support this case too.
Andreas Müller - Feb. 16, 2012, 2:14 p.m.
On Thu, Feb 16, 2012 at 3:09 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Thu, Feb 16, 2012 at 12:04, Andreas Müller
> <schnitzeltony@googlemail.com>wrote:
>
>> This is not the case for many packets having *.socket files
>> referencing *.service by 'Also'. But in gpsd.socket is nothing like
>> that.
>>
>> One question the other way round: What fallout do you expect by this patch?
>
>
> No fallout but I think we ought to support the specification to avoid
> needing to touch this code soon. As systemd explicitly say's that if a
> .socket is provided, a .service or a @.serivce needs to be available, we
> might support this case too.
>
Agreed (previous mail went out too early): V3 will get it

Andreas

Patch

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb b/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb
index 927107a..2738548 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb
@@ -5,7 +5,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
 DEPENDS = "dbus-glib ncurses python libusb1"
 PROVIDES = "virtual/gpsd"
 
-PR = "r2"
+PR = "r3"
 
 EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \
                 --x-libraries=${STAGING_LIBDIR} \
@@ -28,7 +28,7 @@  INITSCRIPT_NAME = "gpsd"
 INITSCRIPT_PARAMS = "defaults 35"
 
 SYSTEMD_PACKAGES = "${PN}-systemd"
-SYSTEMD_SERVICE = "${PN}.socket"
+SYSTEMD_SERVICE = "${PN}.service"
 
 
 LDFLAGS += "-L${STAGING_LIBDIR} -lm"