Initial commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
SECTION = "console/network"
|
||||
SUMMARY = "dhcpcd - a DHCP client"
|
||||
DESCRIPTION = "dhcpcd runs on your machine and silently configures your \
|
||||
computer to work on the attached networks without trouble \
|
||||
and mostly without configuration."
|
||||
|
||||
HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
|
||||
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=ba9c7e534853aaf3de76c905b2410ffd"
|
||||
|
||||
SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \
|
||||
file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
|
||||
file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \
|
||||
file://dhcpcd.service \
|
||||
file://dhcpcd@.service \
|
||||
file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \
|
||||
"
|
||||
|
||||
SRCREV = "5d9bf80c26b4b7dc9d8aa175d96d5a24e75b4d48"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit pkgconfig autotools-brokensep systemd useradd
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "dhcpcd.service"
|
||||
|
||||
PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
|
||||
|
||||
PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev"
|
||||
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
|
||||
# ntp conflicts with chrony
|
||||
PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp"
|
||||
PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony"
|
||||
PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt"
|
||||
|
||||
# add option to override DBDIR location
|
||||
DBDIR ?= "${localstatedir}/lib/${BPN}"
|
||||
|
||||
EXTRA_OECONF = "--enable-ipv4 \
|
||||
--dbdir=${DBDIR} \
|
||||
--sbindir=${base_sbindir} \
|
||||
--runstatedir=/run \
|
||||
--enable-privsep \
|
||||
--privsepuser=dhcpcd \
|
||||
--with-hooks \
|
||||
--with-eghooks \
|
||||
"
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd"
|
||||
|
||||
do_install:append () {
|
||||
# install systemd unit files
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir}
|
||||
|
||||
chmod 700 ${D}${DBDIR}
|
||||
chown dhcpcd:dhcpcd ${D}${DBDIR}
|
||||
}
|
||||
|
||||
FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
|
||||
+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