summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2016-07-21 20:11:04 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-26 08:56:30 +0100
commitb261791d69b2fc977819103c0685eaf440c5dfd0 (patch)
tree0e8a08770aeb745a80d23464c5791b5c3b7b57f5 /meta
parent21916fe5b62ab4dbae22a43161c883c820738683 (diff)
downloadpoky-b261791d69b2fc977819103c0685eaf440c5dfd0.tar.gz
dhcp: remove dhclient-script bash dependency
Take the dash compatible IPv6 link-local address test from the Debian version of dhclient-script. Note that although "echo -e" in the OE version of dhclient-script is technically bash specific too, it is supported by Busybox echo when Busybox is configured with CONFIG_FEATURE_FANCY_ECHO enabled (which is the default in the OE Busybox defconfig) therefore leave as-is. (From OE-Core rev: acd7b33d136fac52e1da7ce1bb3edd2a938b1b6f) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp.inc1
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch55
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb1
3 files changed, 56 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
index d237d5824f..421221f388 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -95,7 +95,6 @@ FILES_${PN}-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhc
95FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay" 95FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
96 96
97FILES_${PN}-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf" 97FILES_${PN}-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
98RDEPENDS_${PN}-client = "bash"
99 98
100FILES_${PN}-omshell = "${bindir}/omshell" 99FILES_${PN}-omshell = "${bindir}/omshell"
101 100
diff --git a/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch b/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch
new file mode 100644
index 0000000000..997b9f6ba9
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch
@@ -0,0 +1,55 @@
1From 8aed2a9ff09cb0d584ad0a7340fe3a596879d9b1 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Thu, 21 Jul 2016 19:07:02 -0700
4Subject: [PATCH] remove dhclient-script bash dependency
5
6Take the dash compatible IPv6 link-local address test from the Debian
7version of dhclient-script.
8
9Note that although "echo -e" in the OE version of dhclient-script is
10technically bash specific too, it is supported by Busybox echo when
11Busybox is configured with CONFIG_FEATURE_FANCY_ECHO enabled (which
12is the default in the OE Busybox defconfig) therefore leave as-is.
13
14Upstream-Status: Inappropriate [OE specific]
15
16Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
17---
18 client/scripts/linux | 7 +++----
19 1 file changed, 3 insertions(+), 4 deletions(-)
20
21diff --git a/client/scripts/linux b/client/scripts/linux
22index 232a0aa..1383f46 100755
23--- a/client/scripts/linux
24+++ b/client/scripts/linux
25@@ -1,4 +1,4 @@
26-#!/bin/bash
27+#!/bin/sh
28 # dhclient-script for Linux. Dan Halbert, March, 1997.
29 # Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
30 # No guarantees about this. I'm a novice at the details of Linux
31@@ -47,11 +47,11 @@ make_resolv_conf() {
32 if [ "x${new_dhcp6_domain_search}" != x ] ; then
33 resolv_conf="search ${new_dhcp6_domain_search}\n"
34 fi
35- shopt -s nocasematch
36 for nameserver in ${new_dhcp6_name_servers} ; do
37 # If the nameserver has a link-local address
38 # add a <zone_id> (interface name) to it.
39- if [[ "$nameserver" =~ ^fe80:: ]]
40+ if [ "${nameserver##fe80::}" != "$nameserver" ] ||
41+ [ "${nameserver##FE80::}" != "$nameserver" ]
42 then
43 zone_id="%$interface"
44 else
45@@ -59,7 +59,6 @@ make_resolv_conf() {
46 fi
47 resolv_conf="${resolv_conf}nameserver ${nameserver}$zone_id\n"
48 done
49- shopt -u nocasematch
50
51 echo -e "${resolv_conf}" > /etc/resolv.conf
52 fi
53--
541.9.1
55
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb b/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
index 9e082911bd..4151eb1836 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
@@ -8,6 +8,7 @@ SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
8 file://0001-site.h-enable-gentle-shutdown.patch \ 8 file://0001-site.h-enable-gentle-shutdown.patch \
9 file://libxml2-configure-argument.patch \ 9 file://libxml2-configure-argument.patch \
10 file://tweak-to-support-external-bind.patch \ 10 file://tweak-to-support-external-bind.patch \
11 file://remove-dhclient-script-bash-dependency.patch \
11 " 12 "
12 13
13SRC_URI[md5sum] = "0138319fe2b788cf4bdf34fbeaf9ff54" 14SRC_URI[md5sum] = "0138319fe2b788cf4bdf34fbeaf9ff54"