summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/dhcpcd/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/dhcpcd/files')
-rw-r--r--meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch79
-rw-r--r--meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch43
-rw-r--r--meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch13
-rw-r--r--meta/recipes-connectivity/dhcpcd/files/dhcpcd.service2
-rw-r--r--meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service4
5 files changed, 130 insertions, 11 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 @@
1From d1581ce103db0a5db0b1761907fff9ddd6b55a8a 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 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 @@
1From e9b1376c59b15e7b03611429187d9d89167154b5 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 src/dhcpcd.8.in | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/src/dhcpcd.8.in b/src/dhcpcd.8.in
32index 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 @@
1From aa9e3982c1e75ad49945a62f5e262279c7a905a4 Mon Sep 17 00:00:00 2001 1From c2ebc32112e0cd29390b4dc951b65efae36d607b 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
@@ -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
13diff --git a/configure b/configure 13diff --git a/configure b/configure
14index 6c81e0db..32dea2b4 100755 14index 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--
442.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
5Conflicts=connman.service 5Conflicts=connman.service
6 6
7[Service] 7[Service]
8ExecStart=/usr/sbin/dhcpcd -q --nobackground 8ExecStart=/sbin/dhcpcd -q --nobackground
9 9
10[Install] 10[Install]
11WantedBy=multi-user.target 11WantedBy=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]
10Type=forking 10Type=forking
11PIDFile=/run/dhcpcd/%I.pid 11PIDFile=/run/dhcpcd/%I.pid
12ExecStart=/usr/sbin/dhcpcd -q %I 12ExecStart=/sbin/dhcpcd -q %I
13ExecStop=/usr/sbin/dhcpcd -x %I 13ExecStop=/sbin/dhcpcd -x %I
14 14
15[Install] 15[Install]
16WantedBy=multi-user.target 16WantedBy=multi-user.target