Skip to contentSkip to conversation

dnsmasq: install .service only with systemd in DISTRO_FEATURES

PATCH In review Chunrong Guo 4 participants 8 messages Jul 4, 2013 – Jul 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dnsmasq: install .service only with systemd in DISTRO_FEATURES

---
 .../recipes-support/dnsmasq/dnsmasq.inc            |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +5 -3
index 0f5b273..0710893 100644
@@ -30,9 +30,11 @@ do_install () {
     install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d
     install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/
     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/dnsmasq.service ${D}${systemd_unitdir}/system
+    
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/dnsmasq.service ${D}${systemd_unitdir}/system
+    fi
 
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != "" ]; then
         install -d ${D}${sysconfdir}/dbus-1/system.d
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 24 lines · On Thursday 04 July 2013 17:26:23 Chunrong Guo wrote:
---
 .../recipes-support/dnsmasq/dnsmasq.inc            |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 0f5b273..0710893 100644

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -0
@@ -30,9 +30,11 @@ do_install () {
     install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d

${D}${sysconfdir}/dnsmasq.d install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/

     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -3
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/dnsmasq.service

${D}${systemd_unitdir}/system +
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
then + install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dnsmasq.service
${D}${systemd_unitdir}/system + fi

Quoted 2 lines
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != ""

]; then install -d ${D}${sysconfdir}/dbus-1/system.d

I think we should really have a global fix for this issue rather than hacking up every recipe:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=4309

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw
Quoted 25 lines · [Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd…
Quoted 24 lines · On Thursday 04 July 2013 17:26:23 Chunrong Guo wrote:
---
 .../recipes-support/dnsmasq/dnsmasq.inc            |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 0f5b273..0710893 100644

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -0
@@ -30,9 +30,11 @@ do_install () {
     install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d

${D}${sysconfdir}/dnsmasq.d install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/

     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -3
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/dnsmasq.service

${D}${systemd_unitdir}/system +
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
then + install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dnsmasq.service
${D}${systemd_unitdir}/system + fi

Quoted 7 lines
Quoted 2 lines
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != ""

]; then install -d ${D}${sysconfdir}/dbus-1/system.d

I think we should really have a global fix for this issue rather than hacking up every recipe:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=4309

I'm inclined to agree, but looking at the bug it looks like the potential solution was discussed in February and it's on the schedule for Yocto 1.5, but that's October.

So I did a quick survey, here's the meta-networking recipes that'll be impacted, if we adopt the workaround approach:

- net-snmp
- dnsmasq (obviously)
- ypbind-mt
- yp-tools
- ntp
- atftp

I decided I'd have a look at meta-oe for contrast (and guidance) and this is what I found there:

- slim
- tracker
- cloud9
- zram
- gpsd
- gateone

On the other hand, xinput-calibrator and xserver-nodm-init, already have the same fix in it Chunrong is proposing. So the impact of doing either isn't huge, but it's not small either.

Chunrong: Would you be willing to retest and resubmit your patch with the above listed meta-networking recipes as a set? I don't see a lot of sense in doing this piecemeal, I'm okay with taking a workaround until #4309 gets fixed, but I'd rather tear the band-aid off all at once, so to speak.

Signature · 2 lines
-Joe MacDonald.
:wq
#3 lore raw
Quoted 1 line · On Thursday 04 July 2013 07:18:09 Joe MacDonald wrote:

[Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with

Quoted 38 lines · systemd in DISTRO_FEATURES] On 13.07.04 (Thu 11:50) Paul Eggleton wrote:
Quoted 38 lines · On Thursday 04 July 2013 17:26:23 Chunrong Guo wrote:
Quoted 29 lines

---

 .../recipes-support/dnsmasq/dnsmasq.inc            |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 0f5b273..0710893 100644

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -0
@@ -30,9 +30,11 @@ do_install () {
 
     install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d
 

${D}${sysconfdir}/dnsmasq.d install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/

     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -3
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/dnsmasq.service

${D}${systemd_unitdir}/system +
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
then + install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dnsmasq.service
${D}${systemd_unitdir}/system + fi

Quoted 4 lines
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" !=
     ""

]; then install -d ${D}${sysconfdir}/dbus-1/system.d

I think we should really have a global fix for this issue rather than hacking up every recipe:

Quoted 5 lines
Quoted 1 line

https://bugzilla.yoctoproject.org/show_bug.cgi?id=4309

I'm inclined to agree, but looking at the bug it looks like the potential solution was discussed in February and it's on the schedule for Yocto 1.5, but that's October.

The thing is it could be done by anyone at any time - the bug is at status "NEW" which means the assignee hasn't actually accepted it yet, and the solution being suggested is fairly straightforward. Given that I think it would be easier to just fix the class and then we never have to worry about this issue again.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw
Quoted 47 lines · [Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd…
Quoted 1 line · On Thursday 04 July 2013 07:18:09 Joe MacDonald wrote:

[Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with

Quoted 38 lines · systemd in DISTRO_FEATURES] On 13.07.04 (Thu 11:50) Paul Eggleton wrote:
Quoted 38 lines · On Thursday 04 July 2013 17:26:23 Chunrong Guo wrote:
Quoted 29 lines

---

 .../recipes-support/dnsmasq/dnsmasq.inc            |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 0f5b273..0710893 100644

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -0
@@ -30,9 +30,11 @@ do_install () {
 
     install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d
 

${D}${sysconfdir}/dnsmasq.d install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/

     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -3
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/dnsmasq.service

${D}${systemd_unitdir}/system +
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
then + install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dnsmasq.service
${D}${systemd_unitdir}/system + fi

Quoted 4 lines
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" !=
     ""

]; then install -d ${D}${sysconfdir}/dbus-1/system.d

I think we should really have a global fix for this issue rather than hacking up every recipe:

Quoted 5 lines
Quoted 1 line

https://bugzilla.yoctoproject.org/show_bug.cgi?id=4309

I'm inclined to agree, but looking at the bug it looks like the potential solution was discussed in February and it's on the schedule for Yocto 1.5, but that's October.

Quoted 5 lines

The thing is it could be done by anyone at any time - the bug is at status "NEW" which means the assignee hasn't actually accepted it yet, and the solution being suggested is fairly straightforward. Given that I think it would be easier to just fix the class and then we never have to worry about this issue again.

Sure, (thanks for the clarification on the NEW status, I didn't know that meant it wasn't necessarily being actively worked) but I would like to see this solved for anyone building a system with meta-networking and without systemd. Unfortunately I don't think I'm the person to make the updates to systemd.bbclass I know very little about systemd in general and nothing about systemd.bbclass.

I was a little less averse to taking this workaround (I see it purely as a workaround until a solution is implemented) since there's precedent and since the spot that Chunrong is changing for dnsmasq has a very similar construct immediately following for dbus. I would prefer, though, if we do take this kind of workaround, it be done everywhere (at least in meta-networking) in one operation so it's easy to back out afterward.

Chunrong, do you want to propose a solution like the one referenced in the above bug? Or even the one originally suggested by Paul in the bug? Or does someone else on the list have a WIP on this item?

Signature · 2 lines
-Joe MacDonald.
:wq
#5 lore raw
In reply to Joe MacDonald

Hello, Joe MacDonald
New patch was submitted.
I do not modify (atftp/tracker/gateone) recips and slim recipes do not work. SO the code in these recipes add ${systemd_unitdir} to FILES and these recipes work well.

Thanks,
chunrong

-----Original Message-----
From: Joe MacDonald [mailto:[email protected]]
Sent: Thursday, July 04, 2013 7:18 PM
To: [email protected]
Cc: Guo Chunrong-B40290; Yu Zongchun-B40527
Subject: Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd in DISTRO_FEATURES

Quoted 26 lines · [Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd…
Quoted 25 lines · On Thursday 04 July 2013 17:26:23 Chunrong Guo wrote:
---
 .../recipes-support/dnsmasq/dnsmasq.inc            |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 0f5b273..0710893 100644

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -0
@@ -30,9 +30,11 @@ do_install () {
     install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d 

${D}${sysconfdir}/dnsmasq.d install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/

     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -3
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/dnsmasq.service

${D}${systemd_unitdir}/system +
+ if
+ ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
then + install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dnsmasq.service
${D}${systemd_unitdir}/system + fi

Quoted 7 lines
Quoted 2 lines
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != ""

]; then install -d ${D}${sysconfdir}/dbus-1/system.d

I think we should really have a global fix for this issue rather than hacking up every recipe:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=4309

I'm inclined to agree, but looking at the bug it looks like the potential solution was discussed in February and it's on the schedule for Yocto 1.5, but that's October.

So I did a quick survey, here's the meta-networking recipes that'll be impacted, if we adopt the workaround approach:

- net-snmp
- dnsmasq (obviously)
- ypbind-mt
- yp-tools
- ntp
- atftp

I decided I'd have a look at meta-oe for contrast (and guidance) and this is what I found there:

- slim
- tracker
- cloud9
- zram
- gpsd
- gateone

On the other hand, xinput-calibrator and xserver-nodm-init, already have the same fix in it Chunrong is proposing. So the impact of doing either isn't huge, but it's not small either.

Chunrong: Would you be willing to retest and resubmit your patch with the above listed meta-networking recipes as a set? I don't see a lot of sense in doing this piecemeal, I'm okay with taking a workaround until #4309 gets fixed, but I'd rather tear the band-aid off all at once, so to speak.

--
-Joe MacDonald.
:wq

#6 lore raw
Quoted 4 lines · [RE: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd…

Hello, Joe MacDonald
New patch was submitted.
I do not modify (atftp/tracker/gateone) recips and slim recipes do not work. SO the code in these recipes add ${systemd_unitdir} to FILES and these recipes work well.

Just FYI, I saw your patch, I have it in a merge queue, but right now I'm looking at the bug Paul quoted and the mailing list discussion quoted therein to see if we can come up with a better, more general solution.

-J.

Quoted 76 lines

Thanks,
chunrong

-----Original Message-----
From: Joe MacDonald [mailto:[email protected]]
Sent: Thursday, July 04, 2013 7:18 PM
To: [email protected]
Cc: Guo Chunrong-B40290; Yu Zongchun-B40527
Subject: Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd in DISTRO_FEATURES

Quoted 26 lines · [Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd…
Quoted 25 lines · On Thursday 04 July 2013 17:26:23 Chunrong Guo wrote:
---
 .../recipes-support/dnsmasq/dnsmasq.inc            |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 0f5b273..0710893 100644

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -0
@@ -30,9 +30,11 @@ do_install () {
     install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d 

${D}${sysconfdir}/dnsmasq.d install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/

     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -3
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/dnsmasq.service

${D}${systemd_unitdir}/system +
+ if
+ ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
then + install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dnsmasq.service
${D}${systemd_unitdir}/system + fi

Quoted 7 lines
Quoted 2 lines
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != ""

]; then install -d ${D}${sysconfdir}/dbus-1/system.d

I think we should really have a global fix for this issue rather than hacking up every recipe:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=4309

I'm inclined to agree, but looking at the bug it looks like the potential solution was discussed in February and it's on the schedule for Yocto 1.5, but that's October.

So I did a quick survey, here's the meta-networking recipes that'll be impacted, if we adopt the workaround approach:

- net-snmp
- dnsmasq (obviously)
- ypbind-mt
- yp-tools
- ntp
- atftp

I decided I'd have a look at meta-oe for contrast (and guidance) and this is what I found there:

- slim
- tracker
- cloud9
- zram
- gpsd
- gateone

On the other hand, xinput-calibrator and xserver-nodm-init, already have the same fix in it Chunrong is proposing. So the impact of doing either isn't huge, but it's not small either.

Chunrong: Would you be willing to retest and resubmit your patch with the above listed meta-networking recipes as a set? I don't see a lot of sense in doing this piecemeal, I'm okay with taking a workaround until #4309 gets fixed, but I'd rather tear the band-aid off all at once, so to speak.

--
-Joe MacDonald.
:wq

Signature · 2 lines
-Joe MacDonald.
:wq
#7 lore raw
Quoted 11 lines · Joe MacDonald
Quoted 4 lines · [RE: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd…

Hello, Joe MacDonald
New patch was submitted.
I do not modify (atftp/tracker/gateone) recips and slim recipes do not work. SO the code in these recipes add ${systemd_unitdir} to FILES and these recipes work well.

Just FYI, I saw your patch, I have it in a merge queue, but right now I'm looking at the bug Paul quoted and the mailing list discussion quoted therein to see if we can come up with a better, more general solution.

FWIW: When I was moving systemd support from meta-systemd layer I was aware of this issue and I still believe that systemd.bbclass is right place to solve this, instead of adding conditionals in many recipes.

Old systemd.bbclass in meta-systemd worked like this, maybe it wasn't most elegant solution, but it could be improved instead of pushing this issue to every recipes with .service file.

Cheers,

Quoted 83 lines
Quoted 72 lines

-----Original Message-----
From: Joe MacDonald [mailto:[email protected]]
Sent: Thursday, July 04, 2013 7:18 PM
To: [email protected]
Cc: Guo Chunrong-B40290; Yu Zongchun-B40527
Subject: Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd in DISTRO_FEATURES

Quoted 26 lines · [Re: [oe] [meta-networking][PATCH] dnsmasq: install .service only with systemd…
Quoted 25 lines · On Thursday 04 July 2013 17:26:23 Chunrong Guo wrote:
---
 .../recipes-support/dnsmasq/dnsmasq.inc            |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 0f5b273..0710893 100644

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -0
@@ -30,9 +30,11 @@ do_install () {
     install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d 

${D}${sysconfdir}/dnsmasq.d install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/

     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -3
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/dnsmasq.service

${D}${systemd_unitdir}/system +
+ if
+ ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
then + install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dnsmasq.service
${D}${systemd_unitdir}/system + fi

Quoted 7 lines
Quoted 2 lines
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != ""

]; then install -d ${D}${sysconfdir}/dbus-1/system.d

I think we should really have a global fix for this issue rather than hacking up every recipe:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=4309

I'm inclined to agree, but looking at the bug it looks like the potential solution was discussed in February and it's on the schedule for Yocto 1.5, but that's October.

So I did a quick survey, here's the meta-networking recipes that'll be impacted, if we adopt the workaround approach:

- net-snmp
- dnsmasq (obviously)
- ypbind-mt
- yp-tools
- ntp
- atftp

I decided I'd have a look at meta-oe for contrast (and guidance) and this is what I found there:

- slim
- tracker
- cloud9
- zram
- gpsd
- gateone

On the other hand, xinput-calibrator and xserver-nodm-init, already have the same fix in it Chunrong is proposing. So the impact of doing either isn't huge, but it's not small either.

Chunrong: Would you be willing to retest and resubmit your patch with the above listed meta-networking recipes as a set? I don't see a lot of sense in doing this piecemeal, I'm okay with taking a workaround until #4309 gets fixed, but I'd rather tear the band-aid off all at once, so to speak.

--
-Joe MacDonald.
:wq

Signature · 9 lines
-Joe MacDonald.
:wq



_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]