diff options
Diffstat (limited to 'poky/meta/recipes-connectivity')
-rw-r--r-- | poky/meta/recipes-connectivity/dhcp/dhcp.inc | 2 | ||||
-rw-r--r-- | poky/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch | 65 | ||||
-rw-r--r-- | poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb | 1 | ||||
-rw-r--r-- | poky/meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb (renamed from poky/meta/recipes-connectivity/iproute2/iproute2_5.2.0.bb) | 4 |
4 files changed, 69 insertions, 3 deletions
diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp.inc b/poky/meta/recipes-connectivity/dhcp/dhcp.inc index 18bbaf884..c4697beaf 100644 --- a/poky/meta/recipes-connectivity/dhcp/dhcp.inc +++ b/poky/meta/recipes-connectivity/dhcp/dhcp.inc @@ -43,7 +43,7 @@ INITSCRIPT_PACKAGES = "dhcp-server" INITSCRIPT_NAME_dhcp-server = "dhcp-server" INITSCRIPT_PARAMS_dhcp-server = "defaults" -TARGET_CFLAGS += "-D_GNU_SOURCE" +CFLAGS += "-D_GNU_SOURCE" EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \ --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \ --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \ diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch b/poky/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch new file mode 100644 index 000000000..2359381b9 --- /dev/null +++ b/poky/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch @@ -0,0 +1,65 @@ +From eec0503cfc36f63d777f5cb3f2719cecedcb8468 Mon Sep 17 00:00:00 2001 +From: Haris Okanovic <haris.okanovic@ni.com> +Date: Mon, 7 Jan 2019 13:22:09 -0600 +Subject: [PATCH] Workaround busybox limitation in Linux dhclient-script + +Busybox is a lightweight implementation of coreutils commonly used on +space-constrained embedded Linux distributions. It's implementation of +chown and chmod doesn't provide a "--reference" option added to +client/scripts/linux as of commit 9261cb14. This change works around +that limitation by using stat to read ownership and permissions flags +and simple chown/chmod calls supported in both coreutils and busybox. + + modified: client/scripts/linux + +Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> +Upstream-Status: Pending [ISC-Bugs #48771] +--- + client/scripts/linux | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/client/scripts/linux b/client/scripts/linux +index 0c429697..2435a44b 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -32,6 +32,17 @@ + # if your system holds ip tool in a non-standard location. + ip=/sbin/ip + ++chown_chmod_by_reference() { ++ local reference_file="$1" ++ local target_file="$2" ++ ++ local owner=$(stat -c "%u:%g" "$reference_file") ++ local perm=$(stat -c "%a" "$reference_file") ++ ++ chown "$owner" "$target_file" ++ chmod "$perm" "$target_file" ++} ++ + # update /etc/resolv.conf based on received values + # This updated version mostly follows Debian script by Andrew Pollock et al. + make_resolv_conf() { +@@ -74,8 +85,7 @@ make_resolv_conf() { + fi + + if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf ++ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf + fi + mv -f $new_resolv_conf /etc/resolv.conf + # DHCPv6 +@@ -101,8 +111,7 @@ make_resolv_conf() { + fi + + if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf ++ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf + fi + mv -f $new_resolv_conf /etc/resolv.conf + fi +-- +2.20.0 + diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb b/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb index 275961a60..020777b8f 100644 --- a/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb +++ b/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb @@ -11,6 +11,7 @@ SRC_URI += "file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.pat file://0013-fixup_use_libbind.patch \ file://0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch \ file://0001-Fix-a-NSUPDATE-compiling-issue.patch \ + file://0001-workaround-busybox-limitation-in-linux-dhclient-script.patch \ " SRC_URI[md5sum] = "18c7f4dcbb0a63df25098216d47b1ede" diff --git a/poky/meta/recipes-connectivity/iproute2/iproute2_5.2.0.bb b/poky/meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb index 1728cd69a..8a86cbf78 100644 --- a/poky/meta/recipes-connectivity/iproute2/iproute2_5.2.0.bb +++ b/poky/meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb @@ -4,8 +4,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ file://0001-libc-compat.h-add-musl-workaround.patch \ " -SRC_URI[md5sum] = "0cb2736e7bc2f56254a363d3d23703b7" -SRC_URI[sha256sum] = "a5b95dec26353fc71dba9bb403e9343fad2a06bd69fb154a22a2aa2914f74da8" +SRC_URI[md5sum] = "227404413c8d6db649d6188ead1e5a6e" +SRC_URI[sha256sum] = "cb1c1e45993a3bd2438543fd4332d70f1726a6e6ff97dc613a8258c993117b3f" # CFLAGS are computed in Makefile and reference CCOPTS # |