summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/dhcpcd
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/dhcpcd')
-rw-r--r--meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.6.bb (renamed from meta/recipes-connectivity/dhcpcd/dhcpcd_9.3.2.bb)32
-rw-r--r--meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch82
-rw-r--r--meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch44
-rw-r--r--meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch14
4 files changed, 150 insertions, 22 deletions
diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.3.2.bb b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.6.bb
index cca60ddae2..fd193b2cff 100644
--- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.3.2.bb
+++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.6.bb
@@ -7,21 +7,22 @@ DESCRIPTION = "dhcpcd runs on your machine and silently configures your \
7HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" 7HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
8 8
9LICENSE = "BSD-2-Clause" 9LICENSE = "BSD-2-Clause"
10LIC_FILES_CHKSUM = "file://LICENSE;md5=9674cc803c5d71306941e6e8b5c002f2" 10LIC_FILES_CHKSUM = "file://LICENSE;md5=ba9c7e534853aaf3de76c905b2410ffd"
11 11
12UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/" 12SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \
13
14SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
15 file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \ 13 file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
14 file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \
16 file://dhcpcd.service \ 15 file://dhcpcd.service \
17 file://dhcpcd@.service \ 16 file://dhcpcd@.service \
17 file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \
18 " 18 "
19 19
20SRC_URI[sha256sum] = "6d49af5e766a2515e6366e4f669663df04ecdf90a1a60ddb1d7a2feb4b5d2566" 20SRCREV = "1c8ae59836fa87b4c63c598087f0460ec20ed862"
21S = "${WORKDIR}/git"
21 22
22inherit pkgconfig autotools-brokensep systemd useradd 23inherit pkgconfig autotools-brokensep systemd useradd
23 24
24SYSTEMD_SERVICE_${PN} = "dhcpcd.service" 25SYSTEMD_SERVICE:${PN} = "dhcpcd.service"
25 26
26PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" 27PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
27 28
@@ -32,8 +33,11 @@ PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp"
32PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" 33PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony"
33PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" 34PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt"
34 35
36# add option to override DBDIR location
37DBDIR ?= "${localstatedir}/lib/${BPN}"
38
35EXTRA_OECONF = "--enable-ipv4 \ 39EXTRA_OECONF = "--enable-ipv4 \
36 --dbdir=${localstatedir}/lib/${BPN} \ 40 --dbdir=${DBDIR} \
37 --sbindir=${base_sbindir} \ 41 --sbindir=${base_sbindir} \
38 --runstatedir=/run \ 42 --runstatedir=/run \
39 --enable-privsep \ 43 --enable-privsep \
@@ -43,15 +47,15 @@ EXTRA_OECONF = "--enable-ipv4 \
43 " 47 "
44 48
45USERADD_PACKAGES = "${PN}" 49USERADD_PACKAGES = "${PN}"
46USERADD_PARAM_${PN} = "--system -d ${localstatedir}/lib/${BPN} -M -s /bin/false -U dhcpcd" 50USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd"
47 51
48do_install_append () { 52do_install:append () {
49 # install systemd unit files 53 # install systemd unit files
50 install -d ${D}${systemd_unitdir}/system 54 install -d ${D}${systemd_system_unitdir}
51 install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_unitdir}/system 55 install -m 0644 ${UNPACKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir}
52 56
53 chmod 700 ${D}${localstatedir}/lib/${BPN} 57 chmod 700 ${D}${DBDIR}
54 chown dhcpcd:dhcpcd ${D}${localstatedir}/lib/${BPN} 58 chown dhcpcd:dhcpcd ${D}${DBDIR}
55} 59}
56 60
57FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" 61FILES:${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
new file mode 100644
index 0000000000..8d1ed6671a
--- /dev/null
+++ b/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch
@@ -0,0 +1,82 @@
1From 02acc4d875ee81e6fd19ef66d69c9f55b4b4a7e7 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 9 Nov 2022 16:33:18 +0800
4Subject: [PATCH] 20-resolv.conf: improve the sitation of working with systemd
5
6systemd's resolvconf implementation ignores the protocol part.
7See https://github.com/systemd/systemd/issues/25032.
8
9When using 'dhcp server + dns server + dhcpcd + systemd', we
10get an integration issue, that is dhcpcd runs 'resolvconf -d eth0.ra',
11yet systemd's resolvconf treats it as eth0. This will delete the
12DNS information set by 'resolvconf -a eth0.dhcp'.
13
14Fortunately, 20-resolv.conf has the ability to build the resolv.conf
15file contents itself. We can just pass the generated contents to
16systemd's resolvconf. This way, the DNS information is not incorrectly
17deleted. Also, it does not cause behavior regression for dhcpcd
18in other cases.
19
20Upstream-Status: Inappropriate [OE Specific]
21This patch has been rejected by dhcpcd upstream.
22See details in https://github.com/NetworkConfiguration/dhcpcd/pull/152
23
24Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
25---
26 hooks/20-resolv.conf | 17 +++++++++++++----
27 1 file changed, 13 insertions(+), 4 deletions(-)
28
29diff --git a/hooks/20-resolv.conf b/hooks/20-resolv.conf
30index 7c29e276..becc019f 100644
31--- a/hooks/20-resolv.conf
32+++ b/hooks/20-resolv.conf
33@@ -11,8 +11,12 @@ nocarrier_roaming_dir="$state_dir/roaming"
34 NL="
35 "
36 : ${resolvconf:=resolvconf}
37+resolvconf_from_systemd=false
38 if command -v "$resolvconf" >/dev/null 2>&1; then
39 have_resolvconf=true
40+ if [ $(basename $(readlink -f $(which $resolvconf))) = resolvectl ]; then
41+ resolvconf_from_systemd=true
42+ fi
43 else
44 have_resolvconf=false
45 fi
46@@ -69,8 +73,13 @@ build_resolv_conf()
47 else
48 echo "# /etc/resolv.conf.tail can replace this line" >> "$cf"
49 fi
50- if change_file /etc/resolv.conf "$cf"; then
51- chmod 644 /etc/resolv.conf
52+ if $resolvconf_from_systemd; then
53+ [ -n "$ifmetric" ] && export IF_METRIC="$ifmetric"
54+ "$resolvconf" -a "$ifname" <"$cf"
55+ else
56+ if change_file /etc/resolv.conf "$cf"; then
57+ chmod 644 /etc/resolv.conf
58+ fi
59 fi
60 rm -f "$cf"
61 }
62@@ -170,7 +179,7 @@ add_resolv_conf()
63 for x in ${new_domain_name_servers}; do
64 conf="${conf}nameserver $x$NL"
65 done
66- if $have_resolvconf; then
67+ if $have_resolvconf && ! $resolvconf_from_systemd; then
68 [ -n "$ifmetric" ] && export IF_METRIC="$ifmetric"
69 printf %s "$conf" | "$resolvconf" -a "$ifname"
70 return $?
71@@ -186,7 +195,7 @@ add_resolv_conf()
72
73 remove_resolv_conf()
74 {
75- if $have_resolvconf; then
76+ if $have_resolvconf && ($if_down || ! $resolvconf_from_systemd); then
77 "$resolvconf" -d "$ifname" -f
78 else
79 if [ -e "$resolv_conf_dir/$ifname" ]; then
80--
812.17.1
82
diff --git a/meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch b/meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch
new file mode 100644
index 0000000000..461d04bd1d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch
@@ -0,0 +1,44 @@
1From 5d5ba8a2b8010db6bee68bd712f829cb737c9ac1 Mon Sep 17 00:00:00 2001
2From: Lei Maohui <leimaohui@fujitsu.com>
3Date: Fri, 10 Mar 2023 03:48:46 +0000
4Subject: [PATCH] dhcpcd.8: Fix conflict error when enable multilib.
5
6Error: Transaction test error:
7 file /usr/share/man/man8/dhcpcd.8 conflicts between attempted
8 installs of dhcpcd-doc-9.4.1-r0.cortexa57 and
9 lib32-dhcpcd-doc-9.4.1-r0.armv7ahf_neon
10
11The differences between the two files are as follows:
12@@ -821,7 +821,7 @@
13 If you always use the same options, put them here.
14 .It Pa /usr/libexec/dhcpcd-run-hooks
15 Bourne shell script that is run to configure or de-configure an interface.
16-.It Pa /usr/lib64/dhcpcd/dev
17+.It Pa /usr/lib/dhcpcd/dev
18 Linux
19 .Pa /dev
20 management modules.
21
22It is just a man file, there is no necessary to manage multiple
23versions.
24
25Upstream-Status: Inappropriate [oe specific]
26Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
27
28---
29 src/dhcpcd.8.in | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32diff --git a/src/dhcpcd.8.in b/src/dhcpcd.8.in
33index 93232840..09930a31 100644
34--- a/src/dhcpcd.8.in
35+++ b/src/dhcpcd.8.in
36@@ -824,7 +824,7 @@ Configuration file for dhcpcd.
37 If you always use the same options, put them here.
38 .It Pa @SCRIPT@
39 Bourne shell script that is run to configure or de-configure an interface.
40-.It Pa @LIBDIR@/dhcpcd/dev
41+.It Pa /usr/<libdir>/dhcpcd/dev
42 Linux
43 .Pa /dev
44 management modules.
diff --git a/meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch b/meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch
index 37d2344438..c54942be4b 100644
--- a/meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch
+++ b/meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch
@@ -1,4 +1,4 @@
1From aa9e3982c1e75ad49945a62f5e262279c7a905a4 Mon Sep 17 00:00:00 2001 1From ec9fc4e6086e1dbe0ac2f94a8a088a571596a581 Mon Sep 17 00:00:00 2001
2From: Stefano Cappa <stefano.cappa.ks89@gmail.com> 2From: Stefano Cappa <stefano.cappa.ks89@gmail.com>
3Date: Sun, 13 Jan 2019 01:50:52 +0100 3Date: Sun, 13 Jan 2019 01:50:52 +0100
4Subject: [PATCH] remove INCLUDEDIR to prevent build issues 4Subject: [PATCH] remove INCLUDEDIR to prevent build issues
@@ -6,15 +6,16 @@ Subject: [PATCH] remove INCLUDEDIR to prevent build issues
6Upstream-Status: Pending 6Upstream-Status: Pending
7 7
8Signed-off-by: Stefano Cappa <stefano.cappa.ks89@gmail.com> 8Signed-off-by: Stefano Cappa <stefano.cappa.ks89@gmail.com>
9
9--- 10---
10 configure | 5 ----- 11 configure | 5 -----
11 1 file changed, 5 deletions(-) 12 1 file changed, 5 deletions(-)
12 13
13diff --git a/configure b/configure 14diff --git a/configure b/configure
14index 6c81e0db..32dea2b4 100755 15index 5237b0e2..7220718b 100755
15--- a/configure 16--- a/configure
16+++ b/configure 17+++ b/configure
17@@ -20,7 +20,6 @@ BUILD= 18@@ -26,7 +26,6 @@ BUILD=
18 HOST= 19 HOST=
19 HOSTCC= 20 HOSTCC=
20 TARGET= 21 TARGET=
@@ -22,7 +23,7 @@ index 6c81e0db..32dea2b4 100755
22 DEBUG= 23 DEBUG=
23 FORK= 24 FORK=
24 STATIC= 25 STATIC=
25@@ -72,7 +71,6 @@ for x do 26@@ -86,7 +85,6 @@ for x do
26 --mandir) MANDIR=$var;; 27 --mandir) MANDIR=$var;;
27 --datadir) DATADIR=$var;; 28 --datadir) DATADIR=$var;;
28 --with-ccopts|CFLAGS) CFLAGS=$var;; 29 --with-ccopts|CFLAGS) CFLAGS=$var;;
@@ -30,7 +31,7 @@ index 6c81e0db..32dea2b4 100755
30 CC) CC=$var;; 31 CC) CC=$var;;
31 CPPFLAGS) CPPFLAGS=$var;; 32 CPPFLAGS) CPPFLAGS=$var;;
32 PKG_CONFIG) PKG_CONFIG=$var;; 33 PKG_CONFIG) PKG_CONFIG=$var;;
33@@ -309,9 +307,6 @@ if [ -n "$CPPFLAGS" ]; then 34@@ -343,9 +341,6 @@ if [ -n "$CPPFLAGS" ]; then
34 echo "CPPFLAGS=" >>$CONFIG_MK 35 echo "CPPFLAGS=" >>$CONFIG_MK
35 echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK 36 echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK
36 fi 37 fi
@@ -40,6 +41,3 @@ index 6c81e0db..32dea2b4 100755
40 if [ -n "$LDFLAGS" ]; then 41 if [ -n "$LDFLAGS" ]; then
41 echo "LDFLAGS=" >>$CONFIG_MK 42 echo "LDFLAGS=" >>$CONFIG_MK
42 echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK 43 echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK
43--
442.17.2 (Apple Git-113)
45