From 2c60b8119d8ddd47225eacb1f0db80d7953e2006 Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Wed, 17 May 2023 21:01:00 +0100 Subject: dhcpcd: upgrade to v10.0.1 Changes: Update license checksum: change in copyright year. Rebase patches for upstream changes. Remove upstream applied patches. (From OE-Core rev: d6e1f0d5eb22c94ad1ec5eef719db00deb1fb263) Signed-off-by: Sudip Mukherjee Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.1.bb | 61 +++++++++++++++++++++ meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb | 64 ---------------------- ...onf-improve-the-sitation-of-working-with-.patch | 4 +- ...ep-Allow-getrandom-sysctl-for-newer-glibc.patch | 30 ---------- ...ux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch | 34 ------------ ...-privsep-Allow-newfstatat-syscall-as-well.patch | 31 ----------- 6 files changed, 63 insertions(+), 161 deletions(-) create mode 100644 meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.1.bb delete mode 100644 meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb delete mode 100644 meta/recipes-connectivity/dhcpcd/files/0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch delete mode 100644 meta/recipes-connectivity/dhcpcd/files/0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch delete mode 100644 meta/recipes-connectivity/dhcpcd/files/0002-privsep-Allow-newfstatat-syscall-as-well.patch diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.1.bb b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.1.bb new file mode 100644 index 0000000000..de007a6e6c --- /dev/null +++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.1.bb @@ -0,0 +1,61 @@ +SECTION = "console/network" +SUMMARY = "dhcpcd - a DHCP client" +DESCRIPTION = "dhcpcd runs on your machine and silently configures your \ + computer to work on the attached networks without trouble \ + and mostly without configuration." + +HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" + +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ba9c7e534853aaf3de76c905b2410ffd" + +SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \ + file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \ + file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \ + file://dhcpcd.service \ + file://dhcpcd@.service \ + file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \ + " + +SRCREV = "5d9bf80c26b4b7dc9d8aa175d96d5a24e75b4d48" +S = "${WORKDIR}/git" + +inherit pkgconfig autotools-brokensep systemd useradd + +SYSTEMD_SERVICE:${PN} = "dhcpcd.service" + +PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" + +PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" +# ntp conflicts with chrony +PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp" +PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" +PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" + +# add option to override DBDIR location +DBDIR ?= "${localstatedir}/lib/${BPN}" + +EXTRA_OECONF = "--enable-ipv4 \ + --dbdir=${DBDIR} \ + --sbindir=${base_sbindir} \ + --runstatedir=/run \ + --enable-privsep \ + --privsepuser=dhcpcd \ + --with-hooks \ + --with-eghooks \ + " + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd" + +do_install:append () { + # install systemd unit files + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir} + + chmod 700 ${D}${DBDIR} + chown dhcpcd:dhcpcd ${D}${DBDIR} +} + +FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb deleted file mode 100644 index 21b2eebbd8..0000000000 --- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb +++ /dev/null @@ -1,64 +0,0 @@ -SECTION = "console/network" -SUMMARY = "dhcpcd - a DHCP client" -DESCRIPTION = "dhcpcd runs on your machine and silently configures your \ - computer to work on the attached networks without trouble \ - and mostly without configuration." - -HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" - -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d148485768fe85b9f1072b186a7e9b4d" - -SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=dhcpcd-9 \ - file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \ - file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \ - file://0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch \ - file://0002-privsep-Allow-newfstatat-syscall-as-well.patch \ - file://0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch \ - file://dhcpcd.service \ - file://dhcpcd@.service \ - file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \ - " - -SRCREV = "3c458fc7fa4146029a1e4f9e98cd7e7adf03081a" -S = "${WORKDIR}/git" - -inherit pkgconfig autotools-brokensep systemd useradd - -SYSTEMD_SERVICE:${PN} = "dhcpcd.service" - -PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" - -PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" -# ntp conflicts with chrony -PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp" -PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" -PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" - -# add option to override DBDIR location -DBDIR ?= "${localstatedir}/lib/${BPN}" - -EXTRA_OECONF = "--enable-ipv4 \ - --dbdir=${DBDIR} \ - --sbindir=${base_sbindir} \ - --runstatedir=/run \ - --enable-privsep \ - --privsepuser=dhcpcd \ - --with-hooks \ - --with-eghooks \ - " - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd" - -do_install:append () { - # install systemd unit files - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir} - - chmod 700 ${D}${DBDIR} - chown dhcpcd:dhcpcd ${D}${DBDIR} -} - -FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" diff --git a/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch b/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch index 6f90c88249..8d1ed6671a 100644 --- a/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch +++ b/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch @@ -27,7 +27,7 @@ Signed-off-by: Chen Qi 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/hooks/20-resolv.conf b/hooks/20-resolv.conf -index 504a6c53..eb6e5845 100644 +index 7c29e276..becc019f 100644 --- a/hooks/20-resolv.conf +++ b/hooks/20-resolv.conf @@ -11,8 +11,12 @@ nocarrier_roaming_dir="$state_dir/roaming" @@ -35,7 +35,7 @@ index 504a6c53..eb6e5845 100644 " : ${resolvconf:=resolvconf} +resolvconf_from_systemd=false - if type "$resolvconf" >/dev/null 2>&1; then + if command -v "$resolvconf" >/dev/null 2>&1; then have_resolvconf=true + if [ $(basename $(readlink -f $(which $resolvconf))) = resolvectl ]; then + resolvconf_from_systemd=true diff --git a/meta/recipes-connectivity/dhcpcd/files/0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch b/meta/recipes-connectivity/dhcpcd/files/0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch deleted file mode 100644 index 68ab93416a..0000000000 --- a/meta/recipes-connectivity/dhcpcd/files/0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From c6cdf0aee71ab4126d36b045f02428ee3c6ec50b Mon Sep 17 00:00:00 2001 -From: Roy Marples -Date: Fri, 26 Aug 2022 09:08:36 +0100 -Subject: [PATCH 1/2] privsep: Allow getrandom sysctl for newer glibc - -Fixes #120 - -Upstream-Status: Backport [c6cdf0aee71ab4126d36b045f02428ee3c6ec50b] -Signed-off-by: Chen Qi ---- - src/privsep-linux.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/privsep-linux.c b/src/privsep-linux.c -index b238644b..479a1d82 100644 ---- a/src/privsep-linux.c -+++ b/src/privsep-linux.c -@@ -300,6 +300,9 @@ static struct sock_filter ps_seccomp_filter[] = { - #ifdef __NR_getpid - SECCOMP_ALLOW(__NR_getpid), - #endif -+#ifdef __NR_getrandom -+ SECCOMP_ALLOW(__NR_getrandom), -+#endif - #ifdef __NR_getsockopt - /* For route socket overflow */ - SECCOMP_ALLOW_ARG(__NR_getsockopt, 1, SOL_SOCKET), --- -2.17.1 - diff --git a/meta/recipes-connectivity/dhcpcd/files/0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch b/meta/recipes-connectivity/dhcpcd/files/0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch deleted file mode 100644 index 1c514f9b8c..0000000000 --- a/meta/recipes-connectivity/dhcpcd/files/0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 7a2d9767585ed2c407d4985bd2d81552034fb90a Mon Sep 17 00:00:00 2001 -From: CHEN Xiangyu -Date: Thu, 9 Feb 2023 18:41:52 +0800 -Subject: [PATCH] privsep-linux: fix SECCOMP_AUDIT_ARCH missing ppc64le (#181) - -when dhcpcd running on ppc64le platform, it would be killed by SIGSYS. - -Upstream-Status: Backport [7a2d9767585ed2c407d4985bd2d81552034fb90a] - -Signed-off-by: Xiangyu Chen ---- - src/privsep-linux.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/privsep-linux.c b/src/privsep-linux.c -index 7372d26b..6a301950 100644 ---- a/src/privsep-linux.c -+++ b/src/privsep-linux.c -@@ -232,7 +232,11 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg) - #elif defined(__or1k__) - # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_OPENRISC - #elif defined(__powerpc64__) --# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64 -+# if (BYTE_ORDER == LITTLE_ENDIAN) -+# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64LE -+# else -+# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64 -+# endif - #elif defined(__powerpc__) - # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC - #elif defined(__riscv) --- -2.34.1 - diff --git a/meta/recipes-connectivity/dhcpcd/files/0002-privsep-Allow-newfstatat-syscall-as-well.patch b/meta/recipes-connectivity/dhcpcd/files/0002-privsep-Allow-newfstatat-syscall-as-well.patch deleted file mode 100644 index c5d2cba305..0000000000 --- a/meta/recipes-connectivity/dhcpcd/files/0002-privsep-Allow-newfstatat-syscall-as-well.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7625a555797f587a89dc2447fd9d621024d5165c Mon Sep 17 00:00:00 2001 -From: Roy Marples -Date: Fri, 26 Aug 2022 09:24:50 +0100 -Subject: [PATCH 2/2] privsep: Allow newfstatat syscall as well - -Allows newer glibc variants to work apparently. -As reported in #84 and #89. - -Upstream-Status: Backport [7625a555797f587a89dc2447fd9d621024d5165c] -Signed-off-by: Chen Qi ---- - src/privsep-linux.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/privsep-linux.c b/src/privsep-linux.c -index 479a1d82..6327b1bc 100644 ---- a/src/privsep-linux.c -+++ b/src/privsep-linux.c -@@ -328,6 +328,9 @@ static struct sock_filter ps_seccomp_filter[] = { - #ifdef __NR_nanosleep - SECCOMP_ALLOW(__NR_nanosleep), /* XXX should use ppoll instead */ - #endif -+#ifdef __NR_newfstatat -+ SECCOMP_ALLOW(__NR_newfstatat), -+#endif - #ifdef __NR_ppoll - SECCOMP_ALLOW(__NR_ppoll), - #endif --- -2.17.1 - -- cgit v1.2.3-54-g00ecf