From 5ebcaeedb8b489961287231765ecfab0bde43c67 Mon Sep 17 00:00:00 2001 From: slin14 Date: Fri, 28 Sep 2018 08:08:29 +0800 Subject: [PATCH] de-fuzz dhcp patches When do Centos 7.5 upgraded, some patches didn't resolve and cause the fuzzy in the line numbers of the patches. And it may cause .orig file is created when do patch. And this .orig file will lead to rpm packaging failure due to the unexpected and unpackaged .orig file. Please visit below link to get more detail info: https://bugs.launchpad.net/starlingx/+bug/1794611 Solution: Safest solution is to de-fuzz our patches. Story: 2003389 Task: 26755 Change-Id: Ic8dfef3f8c0e2b417b3f979ce7eaeb4bea43a07e Signed-off-by: slin14 --- .../dhclient-dhcp6-set-hostname.patch | 12 ++++++------ .../dhclient-disable-NSUPDATE.patch | 16 ++++++++-------- .../mark-dhclient.conf-as-config.patch | 10 +++++----- ...remove-unecessary-dhcp-exit-hooks-file.patch | 17 +++++++++-------- .../meta_patches/spec-dhcp-enter-hooks.patch | 12 ++++++------ 5 files changed, 34 insertions(+), 33 deletions(-) diff --git a/base/dhcp/centos/meta_patches/dhclient-dhcp6-set-hostname.patch b/base/dhcp/centos/meta_patches/dhclient-dhcp6-set-hostname.patch index 3a9b55039..5e7bf259a 100644 --- a/base/dhcp/centos/meta_patches/dhclient-dhcp6-set-hostname.patch +++ b/base/dhcp/centos/meta_patches/dhclient-dhcp6-set-hostname.patch @@ -1,17 +1,17 @@ -From 93b0c27355df9fd944ad627413135c1da952c0a9 Mon Sep 17 00:00:00 2001 +From 484178cab006e67cc132eec2587e59c5605edac7 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Mon, 2 Oct 2017 15:25:05 -0400 -Subject: [PATCH 4/7] WRS: dhclient-dhcp6-set-hostname.patch +Subject: WRS: dhclient-dhcp6-set-hostname.patch --- SOURCES/dhclient-script | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SOURCES/dhclient-script b/SOURCES/dhclient-script -index 9f725a0..e4dbc20 100644 +index 87bad65..fb51eb5 100644 --- a/SOURCES/dhclient-script +++ b/SOURCES/dhclient-script -@@ -598,6 +598,10 @@ dh6config() { +@@ -653,6 +653,10 @@ dh6config() { add_ipv6_addr_with_DAD make_resolv_conf @@ -22,7 +22,7 @@ index 9f725a0..e4dbc20 100644 ;; RENEW6|REBIND6) -@@ -615,6 +619,10 @@ dh6config() { +@@ -670,6 +674,10 @@ dh6config() { [ ! "${new_dhcp6_domain_search}" = "${old_dhcp6_domain_search}" ]; then make_resolv_conf fi @@ -34,5 +34,5 @@ index 9f725a0..e4dbc20 100644 DEPREF6) -- -1.9.1 +2.7.4 diff --git a/base/dhcp/centos/meta_patches/dhclient-disable-NSUPDATE.patch b/base/dhcp/centos/meta_patches/dhclient-disable-NSUPDATE.patch index 19d81d374..021e0e793 100644 --- a/base/dhcp/centos/meta_patches/dhclient-disable-NSUPDATE.patch +++ b/base/dhcp/centos/meta_patches/dhclient-disable-NSUPDATE.patch @@ -1,17 +1,17 @@ -From 49fde785386db1dd3b13b1a3902c0b63aa7ff673 Mon Sep 17 00:00:00 2001 +From a51920cbcd728da7d867a78daf1dc78e5e3d7598 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Mon, 2 Oct 2017 15:25:05 -0400 -Subject: [PATCH 7/7] WRS: dhclient-disable-NSUPDATE.patch +Subject: WRS: dhclient-disable-NSUPDATE.patch --- SPECS/dhcp.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec -index 7301e63..92e7b30 100644 +index fc17edb..b0a385e 100644 --- a/SPECS/dhcp.spec +++ b/SPECS/dhcp.spec -@@ -110,6 +110,7 @@ Patch103: dhclient-ipv6-bind-to-interface.patch +@@ -122,6 +122,7 @@ Patch103: dhclient-ipv6-bind-to-interface.patch Patch104: dhclient-ipv6-conditionally-set-hostname.patch Patch105: dhclient-handle-wrs-install-uuid.patch Patch106: dhclient-dhcp6-wrs-install-uuid.patch @@ -19,7 +19,7 @@ index 7301e63..92e7b30 100644 BuildRequires: autoconf BuildRequires: automake -@@ -428,6 +429,7 @@ rm -rf includes/isc-dhcp +@@ -458,6 +459,7 @@ rm -rf includes/isc-dhcp %patch104 -p1 %patch105 -p1 %patch106 -p1 @@ -27,7 +27,7 @@ index 7301e63..92e7b30 100644 # Update paths in all man pages for page in client/dhclient.conf.5 client/dhclient.leases.5 \ -@@ -449,6 +451,7 @@ done +@@ -479,6 +481,7 @@ done #libtoolize --copy --force autoreconf --verbose --force --install @@ -35,7 +35,7 @@ index 7301e63..92e7b30 100644 CFLAGS="%{optflags} -fno-strict-aliasing" \ %configure \ --with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \ -@@ -463,6 +466,7 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \ +@@ -493,6 +496,7 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \ --with-ldap \ --with-ldapcrypto \ --with-libbind=%{_includedir} --with-libbind-libs=%{_libdir} \ @@ -44,5 +44,5 @@ index 7301e63..92e7b30 100644 %if %sdt --enable-systemtap \ -- -1.9.1 +2.7.4 diff --git a/base/dhcp/centos/meta_patches/mark-dhclient.conf-as-config.patch b/base/dhcp/centos/meta_patches/mark-dhclient.conf-as-config.patch index 526228ea0..cc2f74bdc 100644 --- a/base/dhcp/centos/meta_patches/mark-dhclient.conf-as-config.patch +++ b/base/dhcp/centos/meta_patches/mark-dhclient.conf-as-config.patch @@ -1,17 +1,17 @@ -From 3fc59f7efbbc18c26261e7fc8b5a4383d874b76c Mon Sep 17 00:00:00 2001 +From fd8de766f09dd6cb836b7f9823eaa0ad17eaf2d3 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Mon, 2 Oct 2017 15:25:05 -0400 -Subject: [PATCH 6/7] WRS: mark-dhclient.conf-as-config.patch +Subject: WRS: mark-dhclient.conf-as-config.patch --- SPECS/dhcp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec -index 29dfbcf..7301e63 100644 +index 70c7a6d..fc17edb 100644 --- a/SPECS/dhcp.spec +++ b/SPECS/dhcp.spec -@@ -692,7 +692,7 @@ done +@@ -722,7 +722,7 @@ done %attr(0644,root,root) %{_mandir}/man8/dhclient-script.8.gz # WRS @@ -21,5 +21,5 @@ index 29dfbcf..7301e63 100644 %files common -- -1.9.1 +2.7.4 diff --git a/base/dhcp/centos/meta_patches/remove-unecessary-dhcp-exit-hooks-file.patch b/base/dhcp/centos/meta_patches/remove-unecessary-dhcp-exit-hooks-file.patch index 9b750692a..0a0cfe8ab 100644 --- a/base/dhcp/centos/meta_patches/remove-unecessary-dhcp-exit-hooks-file.patch +++ b/base/dhcp/centos/meta_patches/remove-unecessary-dhcp-exit-hooks-file.patch @@ -1,28 +1,29 @@ -From 01736403c13648dff7a02366ef994e157ee74970 Mon Sep 17 00:00:00 2001 +From 238c53632f948d293cbcfb4c92fba29096808080 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Mon, 2 Oct 2017 15:25:05 -0400 -Subject: [PATCH 3/7] WRS: remove-unecessary-dhcp-exit-hooks-file.patch +Subject: WRS: remove-unecessary-dhcp-exit-hooks-file.patch --- SPECS/dhcp.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec -index 0150767..edc4113 100644 +index fd66dc4..42409f6 100644 --- a/SPECS/dhcp.spec +++ b/SPECS/dhcp.spec -@@ -40,9 +40,9 @@ Source9: azure-cloud.sh +@@ -40,10 +40,10 @@ Source9: azure-cloud.sh Source10: README.scripts # WRS -Source20: dhclient-exit-hooks Source21: dhclient.conf Source22: dhclient-enter-hooks -+ ++ Patch0: dhcp-4.2.0-errwarn-message.patch Patch1: dhcp-4.2.4-dhclient-options.patch -@@ -573,7 +573,6 @@ EOF + Patch2: dhcp-4.2.0-release-by-ifup.patch +@@ -603,7 +603,6 @@ EOF find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';'; # WRS: Overwrite with our config @@ -30,7 +31,7 @@ index 0150767..edc4113 100644 %{__install} -p -m 0644 %{SOURCE21} %{buildroot}%{dhcpconfdir}/dhclient.conf %{__install} -p -m 0755 %{SOURCE22} %{buildroot}%{dhcpconfdir}/dhclient-enter-hooks -@@ -693,7 +692,6 @@ done +@@ -723,7 +722,6 @@ done %attr(0644,root,root) %{_mandir}/man8/dhclient-script.8.gz # WRS @@ -39,5 +40,5 @@ index 0150767..edc4113 100644 %{dhcpconfdir}/dhclient-enter-hooks -- -1.9.1 +2.7.4 diff --git a/base/dhcp/centos/meta_patches/spec-dhcp-enter-hooks.patch b/base/dhcp/centos/meta_patches/spec-dhcp-enter-hooks.patch index 939c8a409..3b70c7290 100644 --- a/base/dhcp/centos/meta_patches/spec-dhcp-enter-hooks.patch +++ b/base/dhcp/centos/meta_patches/spec-dhcp-enter-hooks.patch @@ -1,14 +1,14 @@ -From 03b852ace37cc26df4462185f51b5eecef808ad2 Mon Sep 17 00:00:00 2001 +From 79b8e2f34a5746e43e64e375c4fbf236de064c63 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Mon, 2 Oct 2017 15:25:05 -0400 -Subject: [PATCH 2/7] WRS: spec-dhcp-enter-hooks.patch +Subject: WRS: spec-dhcp-enter-hooks.patch --- SPECS/dhcp.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec -index 78ee924..0150767 100644 +index 904e3ad..fd66dc4 100644 --- a/SPECS/dhcp.spec +++ b/SPECS/dhcp.spec @@ -42,7 +42,7 @@ Source10: README.scripts @@ -20,7 +20,7 @@ index 78ee924..0150767 100644 Patch0: dhcp-4.2.0-errwarn-message.patch Patch1: dhcp-4.2.4-dhclient-options.patch -@@ -575,6 +575,7 @@ find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';'; +@@ -605,6 +605,7 @@ find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';'; # WRS: Overwrite with our config %{__install} -p -m 0755 %{SOURCE20} %{buildroot}%{dhcpconfdir}/dhclient-exit-hooks %{__install} -p -m 0644 %{SOURCE21} %{buildroot}%{dhcpconfdir}/dhclient.conf @@ -28,7 +28,7 @@ index 78ee924..0150767 100644 %pre # /usr/share/doc/setup/uidgid -@@ -694,6 +696,7 @@ done +@@ -724,6 +725,7 @@ done # WRS %{dhcpconfdir}/dhclient-exit-hooks %{dhcpconfdir}/dhclient.conf @@ -37,5 +37,5 @@ index 78ee924..0150767 100644 %files common %doc LICENSE README RELNOTES doc/References.txt -- -1.9.1 +2.7.4