diff options
Diffstat (limited to 'meta/recipes-connectivity/dhcpcd')
-rw-r--r-- | meta/recipes-connectivity/dhcpcd/dhcpcd_10.2.4.bb (renamed from meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb) | 39 | ||||
-rw-r--r-- | meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch | 79 | ||||
-rw-r--r-- | meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch | 43 | ||||
-rw-r--r-- | meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch | 13 | ||||
-rw-r--r-- | meta/recipes-connectivity/dhcpcd/files/dhcpcd.service | 2 | ||||
-rw-r--r-- | meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service | 4 |
6 files changed, 155 insertions, 25 deletions
diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.2.4.bb index 13467189b4..bfb24aa58c 100644 --- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb +++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.2.4.bb | |||
@@ -7,21 +7,22 @@ DESCRIPTION = "dhcpcd runs on your machine and silently configures your \ | |||
7 | HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" | 7 | HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" |
8 | 8 | ||
9 | LICENSE = "BSD-2-Clause" | 9 | LICENSE = "BSD-2-Clause" |
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9674cc803c5d71306941e6e8b5c002f2" | 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4dda5beb433a809f2e0aeffbf9da3d91" |
11 | 11 | ||
12 | UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/" | 12 | SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \ |
13 | |||
14 | SRC_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 | ||
20 | SRC_URI[sha256sum] = "fcb2d19672d445bbfd38678fdee4f556ef967a3ea6bd81092d10545df2cb9666" | 20 | SRCREV = "93df2b254caf9639f9ffb66e0fe2b584eeba6220" |
21 | 21 | ||
22 | # Doesn't use automake so we can't do out-of-tree builds | ||
22 | inherit pkgconfig autotools-brokensep systemd useradd | 23 | inherit pkgconfig autotools-brokensep systemd useradd |
23 | 24 | ||
24 | SYSTEMD_SERVICE_${PN} = "dhcpcd.service" | 25 | SYSTEMD_SERVICE:${PN} = "dhcpcd.service" |
25 | 26 | ||
26 | PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | 27 | PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
27 | 28 | ||
@@ -32,8 +33,12 @@ PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp" | |||
32 | PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" | 33 | PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" |
33 | PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" | 34 | PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" |
34 | 35 | ||
36 | # add option to override DBDIR location | ||
37 | DBDIR ?= "${localstatedir}/lib/${BPN}" | ||
38 | |||
35 | EXTRA_OECONF = "--enable-ipv4 \ | 39 | EXTRA_OECONF = "--enable-ipv4 \ |
36 | --dbdir=${localstatedir}/lib/${BPN} \ | 40 | --dbdir=${DBDIR} \ |
41 | --sbindir=${base_sbindir} \ | ||
37 | --runstatedir=/run \ | 42 | --runstatedir=/run \ |
38 | --enable-privsep \ | 43 | --enable-privsep \ |
39 | --privsepuser=dhcpcd \ | 44 | --privsepuser=dhcpcd \ |
@@ -42,15 +47,21 @@ EXTRA_OECONF = "--enable-ipv4 \ | |||
42 | " | 47 | " |
43 | 48 | ||
44 | USERADD_PACKAGES = "${PN}" | 49 | USERADD_PACKAGES = "${PN}" |
45 | USERADD_PARAM_${PN} = "--system -d ${localstatedir}/lib/${BPN} -M -s /bin/false -U dhcpcd" | 50 | USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd" |
51 | |||
52 | # This isn't autoconf but is instead a configure script that tries to look like | ||
53 | # autoconf, so just run it directly. | ||
54 | do_configure() { | ||
55 | oe_runconf | ||
56 | } | ||
46 | 57 | ||
47 | do_install_append () { | 58 | do_install:append () { |
48 | # install systemd unit files | 59 | # install systemd unit files |
49 | install -d ${D}${systemd_unitdir}/system | 60 | install -d ${D}${systemd_system_unitdir} |
50 | install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_unitdir}/system | 61 | install -m 0644 ${UNPACKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir} |
51 | 62 | ||
52 | chmod 700 ${D}${localstatedir}/lib/${BPN} | 63 | chmod 700 ${D}${DBDIR} |
53 | chown dhcpcd:dhcpcd ${D}${localstatedir}/lib/${BPN} | 64 | chown dhcpcd:dhcpcd ${D}${DBDIR} |
54 | } | 65 | } |
55 | 66 | ||
56 | FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" | 67 | 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 new file mode 100644 index 0000000000..512e33aebf --- /dev/null +++ b/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From d1581ce103db0a5db0b1761907fff9ddd6b55a8a Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Wed, 9 Nov 2022 16:33:18 +0800 | ||
4 | Subject: [PATCH] 20-resolv.conf: improve the sitation of working with systemd | ||
5 | |||
6 | systemd's resolvconf implementation ignores the protocol part. | ||
7 | See https://github.com/systemd/systemd/issues/25032. | ||
8 | |||
9 | When using 'dhcp server + dns server + dhcpcd + systemd', we | ||
10 | get an integration issue, that is dhcpcd runs 'resolvconf -d eth0.ra', | ||
11 | yet systemd's resolvconf treats it as eth0. This will delete the | ||
12 | DNS information set by 'resolvconf -a eth0.dhcp'. | ||
13 | |||
14 | Fortunately, 20-resolv.conf has the ability to build the resolv.conf | ||
15 | file contents itself. We can just pass the generated contents to | ||
16 | systemd's resolvconf. This way, the DNS information is not incorrectly | ||
17 | deleted. Also, it does not cause behavior regression for dhcpcd | ||
18 | in other cases. | ||
19 | |||
20 | Upstream-Status: Inappropriate [OE Specific] | ||
21 | This patch has been rejected by dhcpcd upstream. | ||
22 | See details in https://github.com/NetworkConfiguration/dhcpcd/pull/152 | ||
23 | |||
24 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
25 | --- | ||
26 | hooks/20-resolv.conf | 17 +++++++++++++---- | ||
27 | 1 file changed, 13 insertions(+), 4 deletions(-) | ||
28 | |||
29 | diff --git a/hooks/20-resolv.conf b/hooks/20-resolv.conf | ||
30 | index bd0b0df5..9c7721de 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 | @@ -179,7 +188,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 | @@ -195,7 +204,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 | ||
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..484b84f94a --- /dev/null +++ b/meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From e9b1376c59b15e7b03611429187d9d89167154b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lei Maohui <leimaohui@fujitsu.com> | ||
3 | Date: Fri, 10 Mar 2023 03:48:46 +0000 | ||
4 | Subject: [PATCH] dhcpcd.8: Fix conflict error when enable multilib. | ||
5 | |||
6 | Error: 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 | |||
11 | The 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 | |||
22 | It is just a man file, there is no necessary to manage multiple | ||
23 | versions. | ||
24 | |||
25 | Upstream-Status: Inappropriate [oe specific] | ||
26 | Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> | ||
27 | --- | ||
28 | src/dhcpcd.8.in | 2 +- | ||
29 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/src/dhcpcd.8.in b/src/dhcpcd.8.in | ||
32 | index 91fdde2c..b467dc3b 100644 | ||
33 | --- a/src/dhcpcd.8.in | ||
34 | +++ b/src/dhcpcd.8.in | ||
35 | @@ -826,7 +826,7 @@ Configuration file for dhcpcd. | ||
36 | If you always use the same options, put them here. | ||
37 | .It Pa @SCRIPT@ | ||
38 | Bourne shell script that is run to configure or de-configure an interface. | ||
39 | -.It Pa @LIBDIR@/dhcpcd/dev | ||
40 | +.It Pa /usr/<libdir>/dhcpcd/dev | ||
41 | Linux | ||
42 | .Pa /dev | ||
43 | 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..fd3fae7e7e 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 @@ | |||
1 | From aa9e3982c1e75ad49945a62f5e262279c7a905a4 Mon Sep 17 00:00:00 2001 | 1 | From c2ebc32112e0cd29390b4dc951b65efae36d607b Mon Sep 17 00:00:00 2001 |
2 | From: Stefano Cappa <stefano.cappa.ks89@gmail.com> | 2 | From: Stefano Cappa <stefano.cappa.ks89@gmail.com> |
3 | Date: Sun, 13 Jan 2019 01:50:52 +0100 | 3 | Date: Sun, 13 Jan 2019 01:50:52 +0100 |
4 | Subject: [PATCH] remove INCLUDEDIR to prevent build issues | 4 | Subject: [PATCH] remove INCLUDEDIR to prevent build issues |
@@ -11,10 +11,10 @@ Signed-off-by: Stefano Cappa <stefano.cappa.ks89@gmail.com> | |||
11 | 1 file changed, 5 deletions(-) | 11 | 1 file changed, 5 deletions(-) |
12 | 12 | ||
13 | diff --git a/configure b/configure | 13 | diff --git a/configure b/configure |
14 | index 6c81e0db..32dea2b4 100755 | 14 | index a60da137..3673de8b 100755 |
15 | --- a/configure | 15 | --- a/configure |
16 | +++ b/configure | 16 | +++ b/configure |
17 | @@ -20,7 +20,6 @@ BUILD= | 17 | @@ -26,7 +26,6 @@ BUILD= |
18 | HOST= | 18 | HOST= |
19 | HOSTCC= | 19 | HOSTCC= |
20 | TARGET= | 20 | TARGET= |
@@ -22,7 +22,7 @@ index 6c81e0db..32dea2b4 100755 | |||
22 | DEBUG= | 22 | DEBUG= |
23 | FORK= | 23 | FORK= |
24 | STATIC= | 24 | STATIC= |
25 | @@ -72,7 +71,6 @@ for x do | 25 | @@ -89,7 +88,6 @@ for x do |
26 | --mandir) MANDIR=$var;; | 26 | --mandir) MANDIR=$var;; |
27 | --datadir) DATADIR=$var;; | 27 | --datadir) DATADIR=$var;; |
28 | --with-ccopts|CFLAGS) CFLAGS=$var;; | 28 | --with-ccopts|CFLAGS) CFLAGS=$var;; |
@@ -30,7 +30,7 @@ index 6c81e0db..32dea2b4 100755 | |||
30 | CC) CC=$var;; | 30 | CC) CC=$var;; |
31 | CPPFLAGS) CPPFLAGS=$var;; | 31 | CPPFLAGS) CPPFLAGS=$var;; |
32 | PKG_CONFIG) PKG_CONFIG=$var;; | 32 | PKG_CONFIG) PKG_CONFIG=$var;; |
33 | @@ -309,9 +307,6 @@ if [ -n "$CPPFLAGS" ]; then | 33 | @@ -346,9 +344,6 @@ if [ -n "$CPPFLAGS" ]; then |
34 | echo "CPPFLAGS=" >>$CONFIG_MK | 34 | echo "CPPFLAGS=" >>$CONFIG_MK |
35 | echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK | 35 | echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK |
36 | fi | 36 | fi |
@@ -40,6 +40,3 @@ index 6c81e0db..32dea2b4 100755 | |||
40 | if [ -n "$LDFLAGS" ]; then | 40 | if [ -n "$LDFLAGS" ]; then |
41 | echo "LDFLAGS=" >>$CONFIG_MK | 41 | echo "LDFLAGS=" >>$CONFIG_MK |
42 | echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK | 42 | echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK |
43 | -- | ||
44 | 2.17.2 (Apple Git-113) | ||
45 | |||
diff --git a/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service b/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service index bbed6d85c4..6c967ddaf0 100644 --- a/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service +++ b/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service | |||
@@ -5,7 +5,7 @@ Before=network.target | |||
5 | Conflicts=connman.service | 5 | Conflicts=connman.service |
6 | 6 | ||
7 | [Service] | 7 | [Service] |
8 | ExecStart=/usr/sbin/dhcpcd -q --nobackground | 8 | ExecStart=/sbin/dhcpcd -q --nobackground |
9 | 9 | ||
10 | [Install] | 10 | [Install] |
11 | WantedBy=multi-user.target | 11 | WantedBy=multi-user.target |
diff --git a/meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service b/meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service index 389b076c38..845b83b9e5 100644 --- a/meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service +++ b/meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service | |||
@@ -9,8 +9,8 @@ Conflicts=connman.service | |||
9 | [Service] | 9 | [Service] |
10 | Type=forking | 10 | Type=forking |
11 | PIDFile=/run/dhcpcd/%I.pid | 11 | PIDFile=/run/dhcpcd/%I.pid |
12 | ExecStart=/usr/sbin/dhcpcd -q %I | 12 | ExecStart=/sbin/dhcpcd -q %I |
13 | ExecStop=/usr/sbin/dhcpcd -x %I | 13 | ExecStop=/sbin/dhcpcd -x %I |
14 | 14 | ||
15 | [Install] | 15 | [Install] |
16 | WantedBy=multi-user.target | 16 | WantedBy=multi-user.target |