diff options
Diffstat (limited to 'meta/recipes-connectivity/dhcpcd/files')
4 files changed, 127 insertions, 71 deletions
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 | |||