rebase dhcp patch to CentOS7.5

delete 1 unused patch

Story: 2003389
Task: 24493

Change-Id: I22c522945380f4d2d956208d64cdd232b0f2739f
Signed-off-by: slin14 <shuicheng.lin@intel.com>
This commit is contained in:
slin14 2018-08-15 04:32:30 +08:00 committed by chenyan
parent ebb9d8cdd1
commit 2c63c1c83f
4 changed files with 19 additions and 82 deletions

View File

@ -1,63 +0,0 @@
Index: 4.2.5-P1-r3/dhclient-exit-hooks
===================================================================
--- 4.2.5-P1-r3.orig/dhclient-exit-hooks
+++ 4.2.5-P1-r3/dhclient-exit-hooks
@@ -4,7 +4,7 @@
#
# This file is sourced by /sbin/dhclient-script.
#
-# dhcp option 121 is defined in RFC3442. The following is the link.
+# dhcp option 121 is defined in RFC3442. The following is the link.
# http://www.ietf.org/rfc/rfc3442.txt
#
# The code for this option is 121, and its minimum length is 5 bytes.
@@ -52,7 +52,7 @@ function add_routes() {
while [ $# -ne 0 ]; do
mask=$1
shift
-
+
# Parse the arguments into a CIDR net/mask string
if [ $mask -eq 32 ]; then
destination="-host $1.$2.$3.$4"
@@ -66,22 +66,31 @@ while [ $# -ne 0 ]; do
elif [ $mask -gt 8 ]; then
destination="-net $1.$2.0.0/$mask"
shift; shift
+ elif [ $mask -gt 0 ]; then
+ destination="-net $1.0.0.0/$mask"
+ shift
else
- destination="-net $1.0.0.0/$mask"
- shift
+ destination="default"
fi
-
+
# Read the gateway
gateway="$1.$2.$3.$4"
shift; shift; shift; shift
- # Add route into routing table
- route add $destination gw $gateway
-
- # Print it out if the route is added successfully
- if [ $? = 0 ]; then
- echo "Added route \"$destination gw $gateway\""
+ if [ $gateway != "0.0.0.0" ]; then
+ # Add route into routing table
+ route add $destination gw $gateway
+ if [ $? = 0 ]; then
+ echo "Added route \"$destination gw $gateway\""
+ fi
+ else
+ # Add onlink route into routing table
+ route add $destination $interface
+ if [ $? = 0 ]; then
+ echo "Added route \"$destination on $interface\""
+ fi
fi
+
done
}

View File

@ -1,7 +1,7 @@
From 80ec3fbb502373b48c54dc075d75b1d13894093e Mon Sep 17 00:00:00 2001
From 1eeae27ddc87dc61928b96baa63fe2ff767e35b0 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:25:05 -0400
Subject: [PATCH 5/7] WRS: 0001-Update-package-versioning-for-TIS-format.patch
Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch
Conflicts:
SPECS/dhcp.spec
@ -10,18 +10,18 @@ Conflicts:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec
index edc4113..29dfbcf 100644
index 42409f6..70c7a6d 100644
--- a/SPECS/dhcp.spec
+++ b/SPECS/dhcp.spec
@@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.2.5
-Release: 58%{?dist}
+Release: 58.el7.centos%{?_tis_dist}.%{tis_patch_ver}
-Release: 68%{?dist}.1
+Release: 68.el7.centos.1%{?_tis_dist}.%{tis_patch_ver}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and
# that's why it is at 12 now. It should have never been used, but it was.
--
1.9.1
2.7.4

View File

@ -1,14 +1,14 @@
From 68081498cde44d9b5320e795229865e46a1552ac Mon Sep 17 00:00:00 2001
From 7e7a9f1bce5884da1e57d5bdc4f5215b7231924e Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:25:05 -0400
Subject: [PATCH 1/7] WRS: spec-include-TiS-patches.patch
Subject: [PATCH] WRS: spec-include-TiS-patches.patch
---
SPECS/dhcp.spec | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec
index 9647a5a..78ee924 100644
index 14da097..904e3ad 100644
--- a/SPECS/dhcp.spec
+++ b/SPECS/dhcp.spec
@@ -39,6 +39,10 @@ Source8: dhcrelay.service
@ -22,9 +22,9 @@ index 9647a5a..78ee924 100644
Patch0: dhcp-4.2.0-errwarn-message.patch
Patch1: dhcp-4.2.4-dhclient-options.patch
@@ -99,6 +103,14 @@ Patch62: dhcp-max-fd-value.patch
Patch63: dhcp-4.2.5-rh1355827.patch
Patch64: dhcp-4.2.5-centos-branding.patch
@@ -111,6 +115,14 @@ Patch70: dhcp-4.2.5-reference_count_overflow.patch
Patch71: dhcp-4.2.5-centos-branding.patch
+# WRS
+Patch101: support-disable-nsupdate.patch
@ -37,9 +37,9 @@ index 9647a5a..78ee924 100644
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
@@ -409,6 +421,14 @@ rm -rf includes/isc-dhcp
%patch63 -p1
%patch64 -p1
@@ -439,6 +451,14 @@ rm -rf includes/isc-dhcp
%patch70 -p1 -b .reference_overflow
%patch71 -p1
+# WRS
+%patch101 -p1
@ -52,7 +52,7 @@ index 9647a5a..78ee924 100644
# Update paths in all man pages
for page in client/dhclient.conf.5 client/dhclient.leases.5 \
client/dhclient-script.8 client/dhclient.8 ; do
@@ -552,6 +572,10 @@ EOF
@@ -582,6 +602,10 @@ EOF
# Don't package libtool *.la files
find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
@ -63,7 +63,7 @@ index 9647a5a..78ee924 100644
%pre
# /usr/share/doc/setup/uidgid
%global gid_uid 177
@@ -667,6 +691,10 @@ done
@@ -697,6 +721,10 @@ done
%attr(0644,root,root) %{_mandir}/man8/dhclient.8.gz
%attr(0644,root,root) %{_mandir}/man8/dhclient-script.8.gz
@ -75,5 +75,5 @@ index 9647a5a..78ee924 100644
%doc LICENSE README RELNOTES doc/References.txt
%attr(0644,root,root) %{_mandir}/man5/dhcp-options.5.gz
--
1.9.1
2.7.4

View File

@ -1 +1 @@
mirror:Source/dhcp-4.2.5-58.el7.centos.src.rpm
mirror:Source/dhcp-4.2.5-68.el7.centos.1.src.rpm