Initial commit
This commit is contained in:
+82
@@ -0,0 +1,82 @@
|
||||
From 02acc4d875ee81e6fd19ef66d69c9f55b4b4a7e7 Mon Sep 17 00:00:00 2001
|
||||
From: Chen Qi <Qi.Chen@windriver.com>
|
||||
Date: Wed, 9 Nov 2022 16:33:18 +0800
|
||||
Subject: [PATCH] 20-resolv.conf: improve the sitation of working with systemd
|
||||
|
||||
systemd's resolvconf implementation ignores the protocol part.
|
||||
See https://github.com/systemd/systemd/issues/25032.
|
||||
|
||||
When using 'dhcp server + dns server + dhcpcd + systemd', we
|
||||
get an integration issue, that is dhcpcd runs 'resolvconf -d eth0.ra',
|
||||
yet systemd's resolvconf treats it as eth0. This will delete the
|
||||
DNS information set by 'resolvconf -a eth0.dhcp'.
|
||||
|
||||
Fortunately, 20-resolv.conf has the ability to build the resolv.conf
|
||||
file contents itself. We can just pass the generated contents to
|
||||
systemd's resolvconf. This way, the DNS information is not incorrectly
|
||||
deleted. Also, it does not cause behavior regression for dhcpcd
|
||||
in other cases.
|
||||
|
||||
Upstream-Status: Inappropriate [OE Specific]
|
||||
This patch has been rejected by dhcpcd upstream.
|
||||
See details in https://github.com/NetworkConfiguration/dhcpcd/pull/152
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
hooks/20-resolv.conf | 17 +++++++++++++----
|
||||
1 file changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hooks/20-resolv.conf b/hooks/20-resolv.conf
|
||||
index 7c29e276..becc019f 100644
|
||||
--- a/hooks/20-resolv.conf
|
||||
+++ b/hooks/20-resolv.conf
|
||||
@@ -11,8 +11,12 @@ nocarrier_roaming_dir="$state_dir/roaming"
|
||||
NL="
|
||||
"
|
||||
: ${resolvconf:=resolvconf}
|
||||
+resolvconf_from_systemd=false
|
||||
if command -v "$resolvconf" >/dev/null 2>&1; then
|
||||
have_resolvconf=true
|
||||
+ if [ $(basename $(readlink -f $(which $resolvconf))) = resolvectl ]; then
|
||||
+ resolvconf_from_systemd=true
|
||||
+ fi
|
||||
else
|
||||
have_resolvconf=false
|
||||
fi
|
||||
@@ -69,8 +73,13 @@ build_resolv_conf()
|
||||
else
|
||||
echo "# /etc/resolv.conf.tail can replace this line" >> "$cf"
|
||||
fi
|
||||
- if change_file /etc/resolv.conf "$cf"; then
|
||||
- chmod 644 /etc/resolv.conf
|
||||
+ if $resolvconf_from_systemd; then
|
||||
+ [ -n "$ifmetric" ] && export IF_METRIC="$ifmetric"
|
||||
+ "$resolvconf" -a "$ifname" <"$cf"
|
||||
+ else
|
||||
+ if change_file /etc/resolv.conf "$cf"; then
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
rm -f "$cf"
|
||||
}
|
||||
@@ -170,7 +179,7 @@ add_resolv_conf()
|
||||
for x in ${new_domain_name_servers}; do
|
||||
conf="${conf}nameserver $x$NL"
|
||||
done
|
||||
- if $have_resolvconf; then
|
||||
+ if $have_resolvconf && ! $resolvconf_from_systemd; then
|
||||
[ -n "$ifmetric" ] && export IF_METRIC="$ifmetric"
|
||||
printf %s "$conf" | "$resolvconf" -a "$ifname"
|
||||
return $?
|
||||
@@ -186,7 +195,7 @@ add_resolv_conf()
|
||||
|
||||
remove_resolv_conf()
|
||||
{
|
||||
- if $have_resolvconf; then
|
||||
+ if $have_resolvconf && ($if_down || ! $resolvconf_from_systemd); then
|
||||
"$resolvconf" -d "$ifname" -f
|
||||
else
|
||||
if [ -e "$resolv_conf_dir/$ifname" ]; then
|
||||
--
|
||||
2.17.1
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
From 4915a7e52fcea8fe283a842890a1e726b1e26b10 Mon Sep 17 00:00:00 2001
|
||||
From: Lei Maohui <leimaohui@fujitsu.com>
|
||||
Date: Fri, 10 Mar 2023 03:48:46 +0000
|
||||
Subject: [PATCH] dhcpcd.8: Fix conflict error when enable multilib.
|
||||
|
||||
Error: Transaction test error:
|
||||
file /usr/share/man/man8/dhcpcd.8 conflicts between attempted
|
||||
installs of dhcpcd-doc-9.4.1-r0.cortexa57 and
|
||||
lib32-dhcpcd-doc-9.4.1-r0.armv7ahf_neon
|
||||
|
||||
The differences between the two files are as follows:
|
||||
@@ -821,7 +821,7 @@
|
||||
If you always use the same options, put them here.
|
||||
.It Pa /usr/libexec/dhcpcd-run-hooks
|
||||
Bourne shell script that is run to configure or de-configure an interface.
|
||||
-.It Pa /usr/lib64/dhcpcd/dev
|
||||
+.It Pa /usr/lib/dhcpcd/dev
|
||||
Linux
|
||||
.Pa /dev
|
||||
management modules.
|
||||
|
||||
It is just a man file, there is no necessary to manage multiple
|
||||
versions.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
|
||||
---
|
||||
src/dhcpcd.8.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/dhcpcd.8.in b/src/dhcpcd.8.in
|
||||
index bc6b3b5..791f2ba 100644
|
||||
--- a/src/dhcpcd.8.in
|
||||
+++ b/src/dhcpcd.8.in
|
||||
@@ -821,7 +821,7 @@ Configuration file for dhcpcd.
|
||||
If you always use the same options, put them here.
|
||||
.It Pa @SCRIPT@
|
||||
Bourne shell script that is run to configure or de-configure an interface.
|
||||
-.It Pa @LIBDIR@/dhcpcd/dev
|
||||
+.It Pa /usr/<libdir>/dhcpcd/dev
|
||||
Linux
|
||||
.Pa /dev
|
||||
management modules.
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
From aa9e3982c1e75ad49945a62f5e262279c7a905a4 Mon Sep 17 00:00:00 2001
|
||||
From: Stefano Cappa <stefano.cappa.ks89@gmail.com>
|
||||
Date: Sun, 13 Jan 2019 01:50:52 +0100
|
||||
Subject: [PATCH] remove INCLUDEDIR to prevent build issues
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Stefano Cappa <stefano.cappa.ks89@gmail.com>
|
||||
---
|
||||
configure | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6c81e0db..32dea2b4 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -20,7 +20,6 @@ BUILD=
|
||||
HOST=
|
||||
HOSTCC=
|
||||
TARGET=
|
||||
-INCLUDEDIR=
|
||||
DEBUG=
|
||||
FORK=
|
||||
STATIC=
|
||||
@@ -72,7 +71,6 @@ for x do
|
||||
--mandir) MANDIR=$var;;
|
||||
--datadir) DATADIR=$var;;
|
||||
--with-ccopts|CFLAGS) CFLAGS=$var;;
|
||||
- -I|--includedir) INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }-I$var";;
|
||||
CC) CC=$var;;
|
||||
CPPFLAGS) CPPFLAGS=$var;;
|
||||
PKG_CONFIG) PKG_CONFIG=$var;;
|
||||
@@ -309,9 +307,6 @@ if [ -n "$CPPFLAGS" ]; then
|
||||
echo "CPPFLAGS=" >>$CONFIG_MK
|
||||
echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK
|
||||
fi
|
||||
-if [ -n "$INCLUDEDIR" ]; then
|
||||
- echo "CPPFLAGS+= $INCLUDEDIR" >>$CONFIG_MK
|
||||
-fi
|
||||
if [ -n "$LDFLAGS" ]; then
|
||||
echo "LDFLAGS=" >>$CONFIG_MK
|
||||
echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK
|
||||
--
|
||||
2.17.2 (Apple Git-113)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=A minimalistic network configuration daemon with DHCPv4, rdisc and DHCPv6 support
|
||||
Wants=network.target
|
||||
Before=network.target
|
||||
Conflicts=connman.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/sbin/dhcpcd -q --nobackground
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=dhcpcd on %I
|
||||
Wants=network.target
|
||||
Before=network.target
|
||||
BindsTo=sys-subsystem-net-devices-%i.device
|
||||
After=sys-subsystem-net-devices-%i.device
|
||||
Conflicts=connman.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/dhcpcd/%I.pid
|
||||
ExecStart=/sbin/dhcpcd -q %I
|
||||
ExecStop=/sbin/dhcpcd -x %I
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user