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.4.0.bb) | 31 | ||||
-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/0002-src-privsep-linux.c-add-support-for-arc-28.patch | 63 |
5 files changed, 147 insertions, 82 deletions
diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.0.bb b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.2.4.bb index dbad8c8728..bfb24aa58c 100644 --- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.0.bb +++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.2.4.bb | |||
@@ -7,19 +7,19 @@ 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 \ |
16 | file://0002-src-privsep-linux.c-add-support-for-arc-28.patch \ | 14 | file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \ |
17 | file://dhcpcd.service \ | 15 | file://dhcpcd.service \ |
18 | file://dhcpcd@.service \ | 16 | file://dhcpcd@.service \ |
17 | file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \ | ||
19 | " | 18 | " |
20 | 19 | ||
21 | SRC_URI[sha256sum] = "41a69297f380bf15ee8f94f73154f8c2bca7157a087c0d5aca8de000ba1d4513" | 20 | SRCREV = "93df2b254caf9639f9ffb66e0fe2b584eeba6220" |
22 | 21 | ||
22 | # Doesn't use automake so we can't do out-of-tree builds | ||
23 | inherit pkgconfig autotools-brokensep systemd useradd | 23 | inherit pkgconfig autotools-brokensep systemd useradd |
24 | 24 | ||
25 | SYSTEMD_SERVICE:${PN} = "dhcpcd.service" | 25 | SYSTEMD_SERVICE:${PN} = "dhcpcd.service" |
@@ -33,8 +33,11 @@ PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp" | |||
33 | PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" | 33 | PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" |
34 | PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" | 34 | PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" |
35 | 35 | ||
36 | # add option to override DBDIR location | ||
37 | DBDIR ?= "${localstatedir}/lib/${BPN}" | ||
38 | |||
36 | EXTRA_OECONF = "--enable-ipv4 \ | 39 | EXTRA_OECONF = "--enable-ipv4 \ |
37 | --dbdir=${localstatedir}/lib/${BPN} \ | 40 | --dbdir=${DBDIR} \ |
38 | --sbindir=${base_sbindir} \ | 41 | --sbindir=${base_sbindir} \ |
39 | --runstatedir=/run \ | 42 | --runstatedir=/run \ |
40 | --enable-privsep \ | 43 | --enable-privsep \ |
@@ -44,15 +47,21 @@ EXTRA_OECONF = "--enable-ipv4 \ | |||
44 | " | 47 | " |
45 | 48 | ||
46 | USERADD_PACKAGES = "${PN}" | 49 | USERADD_PACKAGES = "${PN}" |
47 | 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 | } | ||
48 | 57 | ||
49 | do_install:append () { | 58 | do_install:append () { |
50 | # install systemd unit files | 59 | # install systemd unit files |
51 | install -d ${D}${systemd_system_unitdir} | 60 | install -d ${D}${systemd_system_unitdir} |
52 | install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir} | 61 | install -m 0644 ${UNPACKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir} |
53 | 62 | ||
54 | chmod 700 ${D}${localstatedir}/lib/${BPN} | 63 | chmod 700 ${D}${DBDIR} |
55 | chown dhcpcd:dhcpcd ${D}${localstatedir}/lib/${BPN} | 64 | chown dhcpcd:dhcpcd ${D}${DBDIR} |
56 | } | 65 | } |
57 | 66 | ||
58 | 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/0002-src-privsep-linux.c-add-support-for-arc-28.patch b/meta/recipes-connectivity/dhcpcd/files/0002-src-privsep-linux.c-add-support-for-arc-28.patch deleted file mode 100644 index 045f06a9aa..0000000000 --- a/meta/recipes-connectivity/dhcpcd/files/0002-src-privsep-linux.c-add-support-for-arc-28.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 82386110e67cf75c224e9817fce55e6b0f143266 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
3 | Date: Mon, 8 Feb 2021 07:23:54 +0100 | ||
4 | Subject: [PATCH] src/privsep-linux.c: add support for arc (#28) | ||
5 | |||
6 | Fix the following build failure: | ||
7 | |||
8 | privsep-linux.c:206:4: error: #error "Platform does not support seccomp filter yet" | ||
9 | # error "Platform does not support seccomp filter yet" | ||
10 | ^~~~~ | ||
11 | In file included from privsep-linux.c:36: | ||
12 | privsep-linux.c:213:38: error: 'SECCOMP_AUDIT_ARCH' undeclared here (not in a function); did you mean 'SECCOMP_ALLOW_ARG'? | ||
13 | BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, SECCOMP_AUDIT_ARCH, 1, 0), | ||
14 | ^~~~~~~~~~~~~~~~~~ | ||
15 | |||
16 | It should be noted that AUDIT_ARCH_{ARCOMPACT,ARCV2} is only defined | ||
17 | since kernel 5.2 and | ||
18 | https://github.com/torvalds/linux/commit/67f2a8a29311841ba6ab9b0e2d1b8f1e9978cd84 | ||
19 | |||
20 | Detection of arc compact and arc v2 have been "copy/pasted" from | ||
21 | https://github.com/wbx-github/uclibc-ng/commit/afab56958f1cbb47b831ee3ebff231dfbae74af2 | ||
22 | |||
23 | Fixes: | ||
24 | - http://autobuild.buildroot.org/results/d29083700a80dd647621eed06faeeae03f0587d3 | ||
25 | |||
26 | Upstream-Status: Backport [https://github.com/NetworkConfiguration/dhcpcd/commit/82386110e67cf75c224e9817fce55e6b0f143266] | ||
27 | |||
28 | Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
29 | Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> | ||
30 | --- | ||
31 | src/privsep-linux.c | 16 ++++++++++++++++ | ||
32 | 1 file changed, 16 insertions(+) | ||
33 | |||
34 | diff --git a/src/privsep-linux.c b/src/privsep-linux.c | ||
35 | index 402667af..21d41a9a 100644 | ||
36 | --- a/src/privsep-linux.c | ||
37 | +++ b/src/privsep-linux.c | ||
38 | @@ -149,6 +149,22 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg) | ||
39 | # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_I386 | ||
40 | #elif defined(__x86_64__) | ||
41 | # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_X86_64 | ||
42 | +#elif defined(__arc__) | ||
43 | +# if defined(__A7__) | ||
44 | +# if (BYTE_ORDER == LITTLE_ENDIAN) | ||
45 | +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARCOMPACT | ||
46 | +# else | ||
47 | +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARCOMPACTBE | ||
48 | +# endif | ||
49 | +# elif defined(__HS__) | ||
50 | +# if (BYTE_ORDER == LITTLE_ENDIAN) | ||
51 | +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARCV2 | ||
52 | +# else | ||
53 | +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARCV2BE | ||
54 | +# endif | ||
55 | +# else | ||
56 | +# error "Platform does not support seccomp filter yet" | ||
57 | +# endif | ||
58 | #elif defined(__arm__) | ||
59 | # ifndef EM_ARM | ||
60 | # define EM_ARM 40 | ||
61 | -- | ||
62 | 2.16.2 | ||
63 | |||