All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd
@ 2021-11-02 18:51 Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 2/8] corosync: Do not install the /var/log/cluster directory Peter Kjellerstedt
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2021-11-02 18:51 UTC (permalink / raw)
  To: openembedded-devel

These features were removed in commit 5c051f84 (corosync: Update to
3.0.3), but some code still remained.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 .../corosync/corosync_3.0.3.bb                 | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb b/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
index 909296197..016441be5 100644
--- a/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
+++ b/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://corosync.github.io/corosync/"
 
 SECTION = "base"
 
-inherit autotools pkgconfig systemd useradd
+inherit autotools pkgconfig systemd
 
 SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
            file://corosync.conf \
@@ -18,10 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d"
 
 DEPENDS = "groff-native nss libqb kronosnet"
 
-SYSTEMD_SERVICE:${PN} = "corosync.service corosync-notifyd.service \
-                         ${@bb.utils.contains('PACKAGECONFIG', 'qdevice', 'corosync-qdevice.service', '', d)} \
-                         ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'corosync-qnetd.service', '', d)} \
-"
+SYSTEMD_SERVICE:${PN} = "corosync.service corosync-notifyd.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 INITSCRIPT_NAME = "corosync-daemon"
@@ -43,7 +40,7 @@ EXTRA_OEMAKE = "tmpfilesdir_DATA="
 #}
 
 do_install:append() {
-    install -D -m 0644 ${WORKDIR}/corosync.conf ${D}/${sysconfdir}/corosync/corosync.conf.example
+    install -D -m 0644 ${WORKDIR}/corosync.conf ${D}${sysconfdir}/corosync/corosync.conf.example
     install -d ${D}${sysconfdir}/sysconfig/
     install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync
     install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd
@@ -53,11 +50,6 @@ do_install:append() {
     install -d ${D}${sysconfdir}/default/volatiles
     echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync
 
-    if [ ${@bb.utils.filter('PACKAGECONFIG', 'qnetd', d)} ]; then
-        chown -R coroqnetd:coroqnetd ${D}${sysconfdir}/${BPN}/qnetd
-        echo "d coroqnetd coroqnetd 0770 /var/run/corosync-qnetd none" >> ${D}${sysconfdir}/default/volatiles/05_corosync
-    fi
-
     if [ ${@bb.utils.filter('DISTRO_FEATURES','systemd',d)} ]; then
         install -d ${D}${sysconfdir}/tmpfiles.d
         echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf
@@ -68,7 +60,3 @@ RDEPENDS:${PN} += "bash ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sys
 
 FILES:${PN}-dbg += "${libexecdir}/lcrso/.debug"
 FILES:${PN}-doc += "${datadir}/snmp/mibs/COROSYNC-MIB.txt"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM:${PN} = "--system coroqnetd"
-USERADD_PARAM:${PN} = "--system -d / -M -s /bin/nologin -c 'User for corosync-qnetd' -g coroqnetd coroqnetd"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe,meta-networking][PATCH 2/8] corosync: Do not install the /var/log/cluster directory
  2021-11-02 18:51 [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd Peter Kjellerstedt
@ 2021-11-02 18:51 ` Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 3/8] collectd: Do not install /var/log Peter Kjellerstedt
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2021-11-02 18:51 UTC (permalink / raw)
  To: openembedded-devel

/var/log is normally a link to /var/volatile/log and /var/volatile is a
tmpfs mount. So anything created in /var/log will not be available when
the tmpfs is mounted.

/var/log/cluster will be created in runtime.

This also drops the removal of the /var/run directory as it is no
longer created in the first place.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-networking/recipes-extended/corosync/corosync_3.0.3.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb b/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
index 016441be5..ec2a78527 100644
--- a/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
+++ b/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
@@ -45,7 +45,8 @@ do_install:append() {
     install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync
     install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd
 
-    rm -rf "${D}${localstatedir}/run"
+    rmdir ${D}${localstatedir}/log/cluster ${D}${localstatedir}/log
+    rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
 
     install -d ${D}${sysconfdir}/default/volatiles
     echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe,meta-networking][PATCH 3/8] collectd: Do not install /var/log
  2021-11-02 18:51 [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 2/8] corosync: Do not install the /var/log/cluster directory Peter Kjellerstedt
@ 2021-11-02 18:51 ` Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 4/8] atop: Do not install the /var/log/atop directory Peter Kjellerstedt
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2021-11-02 18:51 UTC (permalink / raw)
  To: openembedded-devel

Previously it installed an empty /var/log without anything in it.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-extended/collectd/collectd_5.12.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-extended/collectd/collectd_5.12.0.bb b/meta-oe/recipes-extended/collectd/collectd_5.12.0.bb
index b443afdb1..1c613b097 100644
--- a/meta-oe/recipes-extended/collectd/collectd_5.12.0.bb
+++ b/meta-oe/recipes-extended/collectd/collectd_5.12.0.bb
@@ -70,8 +70,8 @@ do_install:append() {
     # Fix configuration file to allow collectd to start up
     sed -i 's!^#FQDNLookup[ \t]*true!FQDNLookup   false!g' ${D}${sysconfdir}/collectd.conf
 
-    rmdir "${D}${localstatedir}/run"
-    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+    rmdir ${D}${localstatedir}/run ${D}${localstatedir}/log
+    rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
 
     # Install systemd unit files
     install -d ${D}${systemd_unitdir}/system


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe,meta-networking][PATCH 4/8] atop: Do not install the /var/log/atop directory
  2021-11-02 18:51 [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 2/8] corosync: Do not install the /var/log/cluster directory Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 3/8] collectd: Do not install /var/log Peter Kjellerstedt
@ 2021-11-02 18:51 ` Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 5/8] openflow: Create /var/log/openflow in runtime Peter Kjellerstedt
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2021-11-02 18:51 UTC (permalink / raw)
  To: openembedded-devel

/var/log is normally a link to /var/volatile/log and /var/volatile is a
tmpfs mount. So anything created in /var/log will not be available when
the tmpfs is mounted.

/var/log/atop will be created in runtime.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/atop/atop_2.4.0.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta-oe/recipes-support/atop/atop_2.4.0.bb b/meta-oe/recipes-support/atop/atop_2.4.0.bb
index c91d86610..819303c57 100644
--- a/meta-oe/recipes-support/atop/atop_2.4.0.bb
+++ b/meta-oe/recipes-support/atop/atop_2.4.0.bb
@@ -42,6 +42,10 @@ do_install() {
         rm -f ${D}${sysconfdir}/init.d/atopacct
     fi
 
+    # /var/log/atop will be created in runtime
+    rm -rf ${D}${localstatedir}/log
+    rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
+
     # remove atopacct related files
     rm -rf ${D}${sbindir} ${D}${mandir}/man8
 }


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe,meta-networking][PATCH 5/8] openflow: Create /var/log/openflow in runtime
  2021-11-02 18:51 [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd Peter Kjellerstedt
                   ` (2 preceding siblings ...)
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 4/8] atop: Do not install the /var/log/atop directory Peter Kjellerstedt
@ 2021-11-02 18:51 ` Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 6/8] mongodb: A little clean up Peter Kjellerstedt
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2021-11-02 18:51 UTC (permalink / raw)
  To: openembedded-devel

/var/log is normally a link to /var/volatile/log and /var/volatile is a
tmpfs mount. So anything created in /var/log will not be available when
the tmpfs is mounted.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 .../recipes-protocols/openflow/openflow.inc    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/meta-networking/recipes-protocols/openflow/openflow.inc b/meta-networking/recipes-protocols/openflow/openflow.inc
index 94d9553e1..c4e69b58e 100644
--- a/meta-networking/recipes-protocols/openflow/openflow.inc
+++ b/meta-networking/recipes-protocols/openflow/openflow.inc
@@ -34,4 +34,22 @@ do_configure:prepend() {
 do_install:append() {
     # Remove /var/run as it is created on startup
     rm -rf ${D}${localstatedir}/run
+
+    # /var/log/openflow needs to be created in runtime. Use rmdir to catch if
+    # upstream stops creating /var/log/openflow, or adds something else in
+    # /var/log.
+    rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log
+    rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
+
+    # Create /var/log/openflow in runtime.
+    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
+        install -d ${D}${nonarch_libdir}/tmpfiles.d
+        echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
+    fi
+    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
+        install -d ${D}${sysconfdir}/default/volatiles
+        echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
+    fi
 }
+
+FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe,meta-networking][PATCH 6/8] mongodb: A little clean up
  2021-11-02 18:51 [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd Peter Kjellerstedt
                   ` (3 preceding siblings ...)
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 5/8] openflow: Create /var/log/openflow in runtime Peter Kjellerstedt
@ 2021-11-02 18:51 ` Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 7/8] mongodb: Create /var/log/mongodb in runtime Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 8/8] opensaf: Create /var/log/opensaf/saflog " Peter Kjellerstedt
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2021-11-02 18:51 UTC (permalink / raw)
  To: openembedded-devel

This cleans up whitespace, and avoids using ${...} for shell
variables.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 .../recipes-dbs/mongodb/mongodb_git.bb        | 57 +++++++++----------
 1 file changed, 26 insertions(+), 31 deletions(-)

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
index eff014a4c..461a1d007 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
@@ -43,7 +43,6 @@ SRC_URI:append:toolchain-clang = "\
            file://0001-asio-Dont-use-experimental-with-clang.patch \
            "
 
-
 S = "${WORKDIR}/git"
 
 COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux'
@@ -83,44 +82,40 @@ EXTRA_OESCONS = "PREFIX=${prefix} \
                  --separate-debug \
                  ${PACKAGECONFIG_CONFARGS}"
 
-
 USERADD_PACKAGES = "${PN}"
 USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}"
 
-
 scons_do_compile() {
-        ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} install-core || \
+    ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} install-core ||
         die "scons build execution failed."
 }
 
 scons_do_install() {
-        # install binaries
-        install -d ${D}${bindir}
-        for i in mongod mongos mongo
-        do
-            if [ -f ${B}/build/opt/mongo/${i} ]
-            then
-                install -m 0755 ${B}/build/opt/mongo/${i} ${D}${bindir}/${i}
-            else
-                bbnote "${i} does not exist"
-            fi
-        done
-
-        # install config
-        install -d ${D}${sysconfdir}
-        install -m 0644 ${S}/debian/mongod.conf ${D}${sysconfdir}/
-
-        # install systemd service
-        install -d ${D}${systemd_system_unitdir}
-        install -m 0644 ${S}/debian/mongod.service ${D}${systemd_system_unitdir}
-
-        # install mongo data folder
-        install -m 755 -d ${D}${localstatedir}/lib/${BPN}
-        chown ${PN}:${PN} ${D}${localstatedir}/lib/${BPN}
-
-        # Log files
-        install -m 755 -d ${D}${localstatedir}/log/${BPN}
-        chown ${PN}:${PN} ${D}${localstatedir}/log/${BPN}
+    # install binaries
+    install -d ${D}${bindir}
+    for i in mongod mongos mongo; do
+        if [ -f ${B}/build/opt/mongo/$i ]; then
+            install -m 0755 ${B}/build/opt/mongo/$i ${D}${bindir}
+        else
+            bbnote "$i does not exist"
+        fi
+    done
+
+    # install config
+    install -d ${D}${sysconfdir}
+    install -m 0644 ${S}/debian/mongod.conf ${D}${sysconfdir}
+
+    # install systemd service
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 ${S}/debian/mongod.service ${D}${systemd_system_unitdir}
+
+    # install mongo data folder
+    install -m 755 -d ${D}${localstatedir}/lib/${BPN}
+    chown ${PN}:${PN} ${D}${localstatedir}/lib/${BPN}
+
+    # Log files
+    install -m 755 -d ${D}${localstatedir}/log/${BPN}
+    chown ${PN}:${PN} ${D}${localstatedir}/log/${BPN}
 }
 
 CONFFILES:${PN} = "${sysconfdir}/mongod.conf"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe,meta-networking][PATCH 7/8] mongodb: Create /var/log/mongodb in runtime
  2021-11-02 18:51 [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd Peter Kjellerstedt
                   ` (4 preceding siblings ...)
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 6/8] mongodb: A little clean up Peter Kjellerstedt
@ 2021-11-02 18:51 ` Peter Kjellerstedt
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 8/8] opensaf: Create /var/log/opensaf/saflog " Peter Kjellerstedt
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2021-11-02 18:51 UTC (permalink / raw)
  To: openembedded-devel

/var/log is normally a link to /var/volatile/log and /var/volatile is a
tmpfs mount. So anything created in /var/log will not be available when
the tmpfs is mounted.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 .../meta-python/recipes-dbs/mongodb/mongodb_git.bb | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
index 461a1d007..1b11bd4dc 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
@@ -113,11 +113,19 @@ scons_do_install() {
     install -m 755 -d ${D}${localstatedir}/lib/${BPN}
     chown ${PN}:${PN} ${D}${localstatedir}/lib/${BPN}
 
-    # Log files
-    install -m 755 -d ${D}${localstatedir}/log/${BPN}
-    chown ${PN}:${PN} ${D}${localstatedir}/log/${BPN}
+    # Create /var/log/mongodb in runtime.
+    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
+        install -d ${D}${nonarch_libdir}/tmpfiles.d
+        echo "d ${localstatedir}/log/${BPN} 0755 ${BPN} ${BPN} -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
+    fi
+    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
+        install -d ${D}${sysconfdir}/default/volatiles
+        echo "d ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
+    fi
 }
 
 CONFFILES:${PN} = "${sysconfdir}/mongod.conf"
 
 SYSTEMD_SERVICE:${PN} = "mongod.service"
+
+FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe,meta-networking][PATCH 8/8] opensaf: Create /var/log/opensaf/saflog in runtime
  2021-11-02 18:51 [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd Peter Kjellerstedt
                   ` (5 preceding siblings ...)
  2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 7/8] mongodb: Create /var/log/mongodb in runtime Peter Kjellerstedt
@ 2021-11-02 18:51 ` Peter Kjellerstedt
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2021-11-02 18:51 UTC (permalink / raw)
  To: openembedded-devel

/var/log is normally a link to /var/volatile/log and /var/volatile is a
tmpfs mount. So anything created in /var/log will not be available when
the tmpfs is mounted.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 .../recipes-daemons/opensaf/opensaf_5.21.09.bb     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
index 6c8a48179..1aacae9a6 100644
--- a/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
+++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
@@ -55,15 +55,29 @@ LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
 do_install:append() {
     rm -fr "${D}${localstatedir}/lock"
     rm -fr "${D}${localstatedir}/run"
+    rmdir "${D}${localstatedir}/log/${BPN}/saflog"
+    rmdir "${D}${localstatedir}/log/${BPN}"
+    rmdir "${D}${localstatedir}/log"
     rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
     rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
     if [ ! -d "${D}${sysconfdir}/init.d" ]; then
         install -d ${D}${sysconfdir}/init.d
         install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
     fi
+
+    # Create /var/log/opensaf/saflog in runtime.
+    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
+        install -d ${D}${nonarch_libdir}/tmpfiles.d
+        echo "d ${localstatedir}/log/${BPN}/saflog - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
+    fi
+    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
+        install -d ${D}${sysconfdir}/default/volatiles
+        echo "d root root 0755 ${localstatedir}/log/${BPN}/saflog none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
+    fi
 }
 
 FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service"
+FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
 FILES:${PN}-dev += "${libdir}/libopensaf_core.so"
 FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a"
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-02 18:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 18:51 [meta-oe,meta-networking][PATCH 1/8] corosync: Clean up leftover support for qdevice and qnetd Peter Kjellerstedt
2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 2/8] corosync: Do not install the /var/log/cluster directory Peter Kjellerstedt
2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 3/8] collectd: Do not install /var/log Peter Kjellerstedt
2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 4/8] atop: Do not install the /var/log/atop directory Peter Kjellerstedt
2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 5/8] openflow: Create /var/log/openflow in runtime Peter Kjellerstedt
2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 6/8] mongodb: A little clean up Peter Kjellerstedt
2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 7/8] mongodb: Create /var/log/mongodb in runtime Peter Kjellerstedt
2021-11-02 18:51 ` [meta-oe,meta-networking][PATCH 8/8] opensaf: Create /var/log/opensaf/saflog " Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.