From: Kai Kang <[email protected]>

Upgrade dhcpcd from 9.1.4 to 9.2.0. And add systemd services files
dhcpcd.service and [email protected] from Fedora:

https://src.fedoraproject.org/rpms/dhcpcd/tree/master

Signed-off-by: Kai Kang <[email protected]>
---
 .../{dhcpcd_9.1.4.bb => dhcpcd_9.2.0.bb}      | 19 +++++++++++++++----
 .../dhcpcd/files/dhcpcd.service               | 10 ++++++++++
 .../dhcpcd/files/[email protected]              | 15 +++++++++++++++
 3 files changed, 40 insertions(+), 4 deletions(-)
 rename meta/recipes-connectivity/dhcpcd/{dhcpcd_9.1.4.bb => dhcpcd_9.2.0.bb} 
(61%)
 create mode 100644 meta/recipes-connectivity/dhcpcd/files/dhcpcd.service
 create mode 100644 meta/recipes-connectivity/dhcpcd/files/[email protected]

diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb 
b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
similarity index 61%
rename from meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb
rename to meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
index defd3420f0..292cb5b008 100644
--- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb
+++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
@@ -11,12 +11,17 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=9674cc803c5d71306941e6e8b5c002f2"
 
 UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/";
 
-SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
-           file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch"
+SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
+           file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
+           file://dhcpcd.service \
+           file://[email protected] \
+           "
 
-SRC_URI[sha256sum] = 
"5fe133e5497d8af6d26bd6e6b8dd48ab12d124d6cc4cefe6de6536ff97f76820"
+SRC_URI[sha256sum] = 
"fcb2d19672d445bbfd38678fdee4f556ef967a3ea6bd81092d10545df2cb9666"
 
-inherit pkgconfig autotools-brokensep
+inherit pkgconfig autotools-brokensep systemd
+
+SYSTEMD_SERVICE_${PN} = "dhcpcd.service"
 
 PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 
@@ -25,4 +30,10 @@ PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
 
 EXTRA_OECONF = "--enable-ipv4"
 
+do_install_append () {
+    # install systemd unit files
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_unitdir}/system
+}
+
 FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
diff --git a/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service 
b/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service
new file mode 100644
index 0000000000..86b5a43c37
--- /dev/null
+++ b/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=A minimalistic network configuration daemon with DHCPv4, rdisc and 
DHCPv6 support
+Wants=network.target
+Before=network.target
+
+[Service]
+ExecStart=/usr/sbin/dhcpcd -q --nobackground
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/dhcpcd/files/[email protected] 
b/meta/recipes-connectivity/dhcpcd/files/[email protected]
new file mode 100644
index 0000000000..c81bb05ea5
--- /dev/null
+++ b/meta/recipes-connectivity/dhcpcd/files/[email protected]
@@ -0,0 +1,15 @@
+[Unit]
+Description=dhcpcd on %I
+Wants=network.target
+Before=network.target
+BindsTo=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd-%I.pid
+ExecStart=/usr/sbin/dhcpcd -q %I
+ExecStop=/usr/sbin/dhcpcd -x %I
+
+[Install]
+WantedBy=multi-user.target
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142429): 
https://lists.openembedded.org/g/openembedded-core/message/142429
Mute This Topic: https://lists.openembedded.org/mt/76771148/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to