diff mbox series

[meta-arago,master,08/26] systemd: Wrap the bbappend in a compliant manner

Message ID 20250320181047.18035-9-reatmon@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series Wrap bbappends in a compliant manner | expand

Commit Message

Ryan Eatmon March 20, 2025, 6:10 p.m. UTC
Wrap the bbappend in a yocto-check-layer compliant manner so that only
if you are building this recipe under meta-arago-distro with the arago
DISTRO_OVERRIDE would the bbappend apply.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 .../{systemd_%.bbappend => systemd-arago.inc} |  2 +-
 .../recipes-core/systemd/systemd_%.bbappend   | 59 +------------------
 2 files changed, 4 insertions(+), 57 deletions(-)
 copy meta-arago-distro/recipes-core/systemd/{systemd_%.bbappend => systemd-arago.inc} (97%)
diff mbox series

Patch

diff --git a/meta-arago-distro/recipes-core/systemd/systemd_%.bbappend b/meta-arago-distro/recipes-core/systemd/systemd-arago.inc
similarity index 97%
copy from meta-arago-distro/recipes-core/systemd/systemd_%.bbappend
copy to meta-arago-distro/recipes-core/systemd/systemd-arago.inc
index bb57d094..afcf6928 100644
--- a/meta-arago-distro/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-arago-distro/recipes-core/systemd/systemd-arago.inc
@@ -1,6 +1,6 @@ 
 PR:append = ".arago7"
 
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/systemd:"
 
 SRC_URI:append = " \
     file://local.rules \
diff --git a/meta-arago-distro/recipes-core/systemd/systemd_%.bbappend b/meta-arago-distro/recipes-core/systemd/systemd_%.bbappend
index bb57d094..c37a64ad 100644
--- a/meta-arago-distro/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-arago-distro/recipes-core/systemd/systemd_%.bbappend
@@ -1,57 +1,4 @@ 
-PR:append = ".arago7"
+SYSTEMD_ARAGO = ""
+SYSTEMD_ARAGO:arago = "systemd-arago.inc"
 
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-
-SRC_URI:append = " \
-    file://local.rules \
-    file://usb1-rules.sh \
-    file://usb2-rules.sh \
-    file://10-eth.network \
-    file://15-eth.network \
-    file://30-wlan.network \
-    file://60-usb.network \
-    file://timesyncd.conf \
-    file://37-can-j7.rules \
-    file://37-can-am62.rules \
-    file://37-can-dra7.rules \
-    file://37-can-ti33x.rules \
-"
-
-do_install:append() {
-    install -d ${D}${sysconfdir}/udev/rules.d/
-    install -m 0644 ${UNPACKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/
-
-    install -d ${D}${sysconfdir}/udev/scripts/
-    install -m 0755 ${UNPACKDIR}/usb1-rules.sh ${D}${sysconfdir}/udev/scripts/
-    install -m 0755 ${UNPACKDIR}/usb2-rules.sh ${D}${sysconfdir}/udev/scripts/
-
-    install -d ${D}${sysconfdir}/systemd/network/
-    install -m 0644 ${UNPACKDIR}/10-eth.network ${D}${sysconfdir}/systemd/network/
-    install -m 0644 ${UNPACKDIR}/15-eth.network ${D}${sysconfdir}/systemd/network/
-    install -m 0644 ${UNPACKDIR}/30-wlan.network ${D}${sysconfdir}/systemd/network/
-    install -m 0644 ${UNPACKDIR}/60-usb.network ${D}${sysconfdir}/systemd/network/
-
-    # Allow automount from udev
-    install -m 0644 ${D}${systemd_system_unitdir}/systemd-udevd.service ${D}${sysconfdir}/systemd/system/
-    sed -i 's/MountFlags=slave/MountFlags=shared/g' ${D}${sysconfdir}/systemd/system/systemd-udevd.service
-
-    # Need NAMESPACES enabled in the kernel, workaround for now
-    install -m 0644 ${D}${systemd_system_unitdir}/systemd-hostnamed.service ${D}${sysconfdir}/systemd/system/
-    sed -i 's/PrivateNetwork=yes/PrivateNetwork=no/g' ${D}${sysconfdir}/systemd/system/systemd-hostnamed.service
-
-    install -d ${D}${sysconfdir}/systemd/
-    install -m 0644 ${UNPACKDIR}/timesyncd.conf ${D}${sysconfdir}/systemd/
-
-    install -d ${D}${libdir}/udev/rules.d
-    install -m 0644 ${UNPACKDIR}/37-can-j7.rules ${D}${libdir}/udev/rules.d/
-    install -m 0644 ${UNPACKDIR}/37-can-am62.rules ${D}${libdir}/udev/rules.d/
-    install -m 0644 ${UNPACKDIR}/37-can-dra7.rules ${D}${libdir}/udev/rules.d/
-    install -m 0644 ${UNPACKDIR}/37-can-ti33x.rules ${D}${libdir}/udev/rules.d/
-}
-
-FILES:udev += " \
-    ${libdir}/udev/rules.d/37-can-j7.rules \
-    ${libdir}/udev/rules.d/37-can-am62.rules \
-    ${libdir}/udev/rules.d/37-can-dra7.rules \
-    ${libdir}/udev/rules.d/37-can-ti33x.rules \
-"
+require ${SYSTEMD_ARAGO}