Skip to contentSkip to conversation

dnsmasq: don't expect systemd support to be set

PATCH In review Mark Asselstine 4 participants 5 messages Aug 11, 2013 – Aug 12, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dnsmasq: don't expect systemd support to be set

If you don't have 'systemd' set in your DISTRO_FEATURES 'dnsmasq' will fail to package due to a QA error;

ERROR: QA Issue: dnsmasq: Files/directories were installed but not shipped
/lib

Check for systemd in DISTRO_FEATURES before performing installation instructions related to systemd.

---
 meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +4 -2
index 0f5b273..b9e7ff6 100644
@@ -31,8 +31,10 @@ do_install () {
     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.8.1.2
#1 lore raw

Hi Mark,

Quoted 31 lines · On Saturday 10 August 2013 22:10:25 Mark Asselstine wrote:

If you don't have 'systemd' set in your DISTRO_FEATURES 'dnsmasq' will fail to package due to a QA error;

ERROR: QA Issue: dnsmasq: Files/directories were installed but not shipped
/lib

Check for systemd in DISTRO_FEATURES before performing installation instructions related to systemd.

---
 meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

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

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -2
@@ -31,8 +31,10 @@ do_install () {
     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

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

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

There's already a global fix for this in OE-Core:

http://cgit.openembedded.org/openembedded-core/commit/meta/classes/systemd.bbclass?id=ac5d20f4adac69ea1702694fb50849c9e465b443

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw
Quoted 34 lines · Paul Eggleton

Hi Mark,

Quoted 31 lines · On Saturday 10 August 2013 22:10:25 Mark Asselstine wrote:

If you don't have 'systemd' set in your DISTRO_FEATURES 'dnsmasq' will fail to package due to a QA error;

ERROR: QA Issue: dnsmasq: Files/directories were installed but not shipped
/lib

Check for systemd in DISTRO_FEATURES before performing installation instructions related to systemd.

---
 meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

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

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -2
@@ -31,8 +31,10 @@ do_install () {
     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

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

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

There's already a global fix for this in OE-Core:

http://cgit.openembedded.org/openembedded-core/commit/meta/classes/systemd.bbclass?id=ac5d20f4adac69ea1702694fb50849c9e465b443

I wanted to reply the same, but it doesn't fix empty /lib after /lib/systemd is removed.

We should add this:
rmdir --ignore-fail-on-non-empty ${D}/lib

into that global fix to cover also this case.

(I'm intentionally not using base_libdir, because systemd_unitdir is also defined as bitbake.conf:export systemd_unitdir = "/lib/systemd")

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
Quoted 43 lines · On August 12, 2013 08:59:05 Martin Jansa wrote:
Quoted 42 lines · Paul Eggleton

Hi Mark,

Quoted 39 lines · On Saturday 10 August 2013 22:10:25 Mark Asselstine wrote:

If you don't have 'systemd' set in your DISTRO_FEATURES 'dnsmasq' will fail to package due to a QA error;

ERROR: QA Issue: dnsmasq: Files/directories were installed but not shipped

/lib

Check for systemd in DISTRO_FEATURES before performing installation instructions related to systemd.

---

 meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

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

meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -2
@@ -31,8 +31,10 @@ do_install () {
 
     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)}" !=
     ""
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

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

There's already a global fix for this in OE-Core:

http://cgit.openembedded.org/openembedded-core/commit/meta/classes/systemd
.bbclass?id=ac5d20f4adac69ea1702694fb50849c9e465b443

I wanted to reply the same, but it doesn't fix empty /lib after /lib/systemd is removed.

Correct, /lib hanging around is not corrected by the fix Paul mentions. I am fine with the more global solution trumping my fix and Joe has already indicated that he will wait for this to resolve this issue. Thanks for having a look and getting this fixed for everyone.

Mark

Quoted 11 lines

We should add this:
rmdir --ignore-fail-on-non-empty ${D}/lib

into that global fix to cover also this case.

(I'm intentionally not using base_libdir, because systemd_unitdir is also defined as bitbake.conf:export systemd_unitdir = "/lib/systemd")

--
Martin 'JaMa' Jansa jabber: [email protected]

#4 lore raw
In reply to Mark Asselstine

Hey Mark,

Quoted 21 lines · [[meta-networking][PATCH] dnsmasq: don't expect systemd support to be set] On…

If you don't have 'systemd' set in your DISTRO_FEATURES 'dnsmasq' will fail to package due to a QA error;

ERROR: QA Issue: dnsmasq: Files/directories were installed but not shipped
/lib

Check for systemd in DISTRO_FEATURES before performing installation instructions related to systemd.

---
 meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +0 -0
index 0f5b273..b9e7ff6 100644
@@ -31,8 +31,10 @@ do_install () {
     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 do_install () { · line 40

Quoted 10 lines
meta-networking/recipes-support/dnsmasq/dnsmasq.inc +4 -2
 
-    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

My first reaction to this was we just had it fixed in oe-core quite recently, but Martin identified a condition that's not covered (yet) in the oe-core fix. That said, I'm going to wait for the oe-core fix, since right now I'd rather weed out any systemd on/off handling in meta-networking.

Signature · 2 lines
-Joe MacDonald.
:wq