Skip to contentSkip to conversation

syslog-ng: fix build without json

PATCH Superseded Joe Slater 4 participants 4 messages Jun 15, 2018 – Jun 19, 2018

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH v2 1/1 syslog-ng: fix build without json

Remove configurations requiring json from target.

---
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 7 +++++++
 1 file changed, 7 insertions(+)
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +7 -0
index cb7ca31..6c5adbd 100644
@@ -85,6 +85,13 @@ do_install_append() {
     install -d ${D}/${localstatedir}/lib/${BPN}
     # Remove /var/run as it is created on startup
     rm -rf ${D}${localstatedir}/run
+
+    # If json is not supported, remove certain conf files.
+    if ${@bb.utils.contains('PACKAGECONFIG','json','false','true',d)} ; then
+        for f in loggly logmatic cim elasticsearch ; do
+            rm -rf ${D}${datadir}/${BPN}/include/scl/$f
+        done
+    fi
 }
 
 FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
Signature · 1 line
2.7.4
#1 lore raw

Hi Joe

For expediency can you rebase on master-next and resend.

Quoted 34 lines · Joe Slater

Remove configurations requiring json from target.

---
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 7 +++++++
 1 file changed, 7 insertions(+)
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +7 -1
index cb7ca31..6c5adbd 100644
@@ -85,6 +85,13 @@ do_install_append() {
     install -d ${D}/${localstatedir}/lib/${BPN}
     # Remove /var/run as it is created on startup
     rm -rf ${D}${localstatedir}/run
+
+    # If json is not supported, remove certain conf files.
+    if ${@bb.utils.contains('PACKAGECONFIG','json','false','true',d)} ; then
+        for f in loggly logmatic cim elasticsearch ; do
+            rm -rf ${D}${datadir}/${BPN}/include/scl/$f
+        done
+    fi
 }
 
 FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
--

2.7.4

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
In reply to Joe Slater
Quoted 12 lines · Joe Slater

Remove configurations requiring json from target.

---
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 7 +++++++
 1 file changed, 7 insertions(+)
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +0 -0
index cb7ca31..6c5adbd 100644

meta-oe/recipes-support/syslog-ng/syslog-ng.inc do_install_append() { · line 90

Quoted 6 lines
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +3 -0
@@ -85,6 +85,13 @@ do_install_append() {
     install -d ${D}/${localstatedir}/lib/${BPN}
     # Remove /var/run as it is created on startup
     rm -rf ${D}${localstatedir}/run
+
+    # If json is not supported, remove certain conf files.
+    if ${@bb.utils.contains('PACKAGECONFIG','json','false','true',d)} ; then

Inverting the result of bb.utils.contains() by swapping true and false makes this a little difficult to read. Perhaps this would be clearer:

  if ! ${@bb.utils.contains('PACKAGECONFIG','json','true','false',d)} ; then

?

Quoted 15 lines
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +4 -1
+        for f in loggly logmatic cim elasticsearch ; do
+            rm -rf ${D}${datadir}/${BPN}/include/scl/$f
+        done
+    fi
 }
 
 FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
--

2.7.4

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 35 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Andre McCurdy
Sent: den 15 juni 2018 21:04
To: Joe Slater <[email protected]>
Cc: openembeded-devel <[email protected]>
Subject: Re: [oe] [meta-oe][PATCH V2 1/1] syslog-ng: fix build without json

meta-

Quoted 8 lines · Joe Slater

Remove configurations requiring json from target.

---
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 7 +++++++
 1 file changed, 7 insertions(+)
meta- renamed from meta-oe/recipes-support/syslog-ng/syslog-ng.inc +0 -0

oe/recipes-support/syslog-ng/syslog-ng.inc

meta-oe/recipes-support/syslog-ng/syslog-ng.inc do_install_append() { · line 90

Quoted 10 lines

index cb7ca31..6c5adbd 100644

meta-oe/recipes-support/syslog-ng/syslog-ng.inc +3 -0
@@ -85,6 +85,13 @@ do_install_append() {
     install -d ${D}/${localstatedir}/lib/${BPN}
     # Remove /var/run as it is created on startup
     rm -rf ${D}${localstatedir}/run
+
+    # If json is not supported, remove certain conf files.
+    if ${@bb.utils.contains('PACKAGECONFIG','json','false','true',d)} ; then

Inverting the result of bb.utils.contains() by swapping true and false makes this a little difficult to read. Perhaps this would be clearer:

Quoted 3 lines
  if ! ${@bb.utils.contains('PACKAGECONFIG','json','true','false',d)} ; then

?

Alternatively you can write:

    if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'json', d)}" ]; then
Quoted 9 lines
Quoted 9 lines
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +4 -1
+        for f in loggly logmatic cim elasticsearch ; do
+            rm -rf ${D}${datadir}/${BPN}/include/scl/$f
+        done
+    fi
 }
 
 FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
--

2.7.4

//Peter