From 2c63c1c83f869027d98093e3719954fabf659e91 Mon Sep 17 00:00:00 2001 From: slin14 Date: Wed, 15 Aug 2018 04:32:30 +0800 Subject: [PATCH] rebase dhcp patch to CentOS7.5 delete 1 unused patch Story: 2003389 Task: 24493 Change-Id: I22c522945380f4d2d956208d64cdd232b0f2739f Signed-off-by: slin14 --- ...andle-default-classless-static-route.patch | 63 ------------------- ...te-package-versioning-for-TIS-format.patch | 12 ++-- .../spec-include-TiS-patches.patch | 24 +++---- base/dhcp/centos/srpm_path | 2 +- 4 files changed, 19 insertions(+), 82 deletions(-) delete mode 100644 base/dhcp/centos/files/dhcp-handle-default-classless-static-route.patch diff --git a/base/dhcp/centos/files/dhcp-handle-default-classless-static-route.patch b/base/dhcp/centos/files/dhcp-handle-default-classless-static-route.patch deleted file mode 100644 index 6e8258c7d..000000000 --- a/base/dhcp/centos/files/dhcp-handle-default-classless-static-route.patch +++ /dev/null @@ -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 - } - diff --git a/base/dhcp/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/dhcp/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch index 0c7e019e7..fd0b4941a 100644 --- a/base/dhcp/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ b/base/dhcp/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch @@ -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 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 diff --git a/base/dhcp/centos/meta_patches/spec-include-TiS-patches.patch b/base/dhcp/centos/meta_patches/spec-include-TiS-patches.patch index 1b725d650..1c7f41e71 100644 --- a/base/dhcp/centos/meta_patches/spec-include-TiS-patches.patch +++ b/base/dhcp/centos/meta_patches/spec-include-TiS-patches.patch @@ -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 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 diff --git a/base/dhcp/centos/srpm_path b/base/dhcp/centos/srpm_path index 46f6ca503..d40f94d20 100644 --- a/base/dhcp/centos/srpm_path +++ b/base/dhcp/centos/srpm_path @@ -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