Merge "CentOS 8: Upgrade dhcp to version 4.3.6" into f/centos8

This commit is contained in:
Zuul 2019-12-19 15:49:37 +00:00 committed by Gerrit Code Review
commit b8f0644b3b
9 changed files with 75 additions and 69 deletions

View File

@ -1,6 +1,6 @@
Metadata-Version: 1.1 Metadata-Version: 1.1
Name: dhcp Name: dhcp
Version: 4.2.5 Version: 4.3.6
Summary: Dynamic host configuration protocol software Summary: Dynamic host configuration protocol software
Home-page: Home-page:
Author: Author:

View File

@ -1 +1 @@
TIS_PATCH_VER=9 TIS_PATCH_VER=1

View File

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

View File

@ -1,17 +1,17 @@
From 484178cab006e67cc132eec2587e59c5605edac7 Mon Sep 17 00:00:00 2001 From 484178cab006e67cc132eec2587e59c5605edac7 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com> From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:25:05 -0400 Date: Mon, 2 Oct 2017 15:25:05 -0400
Subject: WRS: dhclient-dhcp6-set-hostname.patch Subject: dhclient-dhcp6-set-hostname.patch
--- ---
SOURCES/dhclient-script | 8 ++++++++ SOURCES/dhclient-script | 8 ++++++++
1 file changed, 8 insertions(+) 1 file changed, 8 insertions(+)
diff --git a/SOURCES/dhclient-script b/SOURCES/dhclient-script diff --git a/SOURCES/dhclient-script b/SOURCES/dhclient-script
index 87bad65..fb51eb5 100644 index 5f58112..8d1adf2 100644
--- a/SOURCES/dhclient-script --- a/SOURCES/dhclient-script
+++ b/SOURCES/dhclient-script +++ b/SOURCES/dhclient-script
@@ -653,6 +653,10 @@ dh6config() { @@ -647,6 +647,10 @@ dh6config() {
add_ipv6_addr_with_DAD add_ipv6_addr_with_DAD
make_resolv_conf make_resolv_conf
@ -22,7 +22,7 @@ index 87bad65..fb51eb5 100644
;; ;;
RENEW6|REBIND6) RENEW6|REBIND6)
@@ -670,6 +674,10 @@ dh6config() { @@ -663,6 +667,10 @@ dh6config() {
[ ! "${new_dhcp6_domain_search}" = "${old_dhcp6_domain_search}" ]; then [ ! "${new_dhcp6_domain_search}" = "${old_dhcp6_domain_search}" ]; then
make_resolv_conf make_resolv_conf
fi fi

View File

@ -1,21 +1,20 @@
From 7e7a9f1bce5884da1e57d5bdc4f5215b7231924e Mon Sep 17 00:00:00 2001 From 7e7a9f1bce5884da1e57d5bdc4f5215b7231924e Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com> From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:25:05 -0400 Date: Mon, 2 Oct 2017 15:25:05 -0400
Subject: [PATCH] WRS: spec-include-TiS-patches.patch Subject: [PATCH]: spec-include-TiS-patches.patch
--- ---
SPECS/dhcp.spec | 28 ++++++++++++++++++++++++++++ SPECS/dhcp.spec | 8 ++++++++
1 file changed, 28 insertions(+) 1 file changed, 8 insertions(+)
diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec
index 14da097..904e3ad 100644 index 7bbd360..4bfbf5c 100644
--- a/SPECS/dhcp.spec --- a/SPECS/dhcp.spec
+++ b/SPECS/dhcp.spec +++ b/SPECS/dhcp.spec
@@ -111,6 +115,11 @@ Patch70: dhcp-4.2.5-reference_count_overflow.patch @@ -80,6 +80,10 @@ Patch43: dhcp-4.3.6-reference_count_overflow.patch
Patch71: dhcp-4.2.5-centos-branding.patch Patch44: dhcp-replay_file_limit.patch
Patch45: dhcp-4.2.5-expiry_before_renewal_v2.patch
+# WRS
+Patch101: dhclient-restrict-interfaces-to-command-line.patch +Patch101: dhclient-restrict-interfaces-to-command-line.patch
+Patch102: dhclient-ipv6-bind-to-interface.patch +Patch102: dhclient-ipv6-bind-to-interface.patch
+Patch103: dhclient-ipv6-conditionally-set-hostname.patch +Patch103: dhclient-ipv6-conditionally-set-hostname.patch
@ -23,18 +22,17 @@ index 14da097..904e3ad 100644
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: libtool BuildRequires: libtool
@@ -439,6 +451,11 @@ rm -rf includes/isc-dhcp @@ -344,6 +348,10 @@ rm bind/bind.tar.gz
%patch70 -p1 -b .reference_overflow # https://bugzilla.redhat.com/show_bug.cgi?id=1647786
%patch71 -p1 %patch45 -p1 -b .t2-expirity
+# WRS
+%patch101 -p1 +%patch101 -p1
+%patch102 -p1 +%patch102 -p1
+%patch103 -p1 +%patch103 -p1
+ +
# Update paths in all man pages # DHCLIENT_DEFAULT_PREFIX_LEN 64 -> 128
for page in client/dhclient.conf.5 client/dhclient.leases.5 \ # https://bugzilla.gnome.org/show_bug.cgi?id=656610
client/dhclient-script.8 client/dhclient.8 ; do sed -i -e 's|DHCLIENT_DEFAULT_PREFIX_LEN 64|DHCLIENT_DEFAULT_PREFIX_LEN 128|g' includes/site.h
-- --
2.7.4 2.7.4

View File

@ -1,17 +1,17 @@
From f1df67309b435da1d9e02b77100a793ba0165f04 Mon Sep 17 00:00:00 2001 From f1df67309b435da1d9e02b77100a793ba0165f04 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com> From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:25:18 -0400 Date: Mon, 2 Oct 2017 15:25:18 -0400
Subject: [PATCH 3/7] WRS: Patch103: dhclient-ipv6-bind-to-interface.patch Subject: dhclient-ipv6-bind-to-interface.patch
--- ---
common/socket.c | 18 +++++++++--------- common/socket.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-) 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/common/socket.c b/common/socket.c diff --git a/common/socket.c b/common/socket.c
index f30c171..b236c4a 100644 index 94ce334..17d32e4 100644
--- a/common/socket.c --- a/common/socket.c
+++ b/common/socket.c +++ b/common/socket.c
@@ -236,6 +236,15 @@ if_register_socket(struct interface_info *info, int family, @@ -234,6 +234,15 @@ if_register_socket(struct interface_info *info, int family,
} }
#endif #endif
@ -27,7 +27,7 @@ index f30c171..b236c4a 100644
/* Bind the socket to this interface's IP address. */ /* Bind the socket to this interface's IP address. */
if (bind(sock, (struct sockaddr *)&name, name_len) < 0) { if (bind(sock, (struct sockaddr *)&name, name_len) < 0) {
log_error("Can't bind to dhcp address: %m"); log_error("Can't bind to dhcp address: %m");
@@ -246,15 +255,6 @@ if_register_socket(struct interface_info *info, int family, @@ -244,15 +253,6 @@ if_register_socket(struct interface_info *info, int family,
log_fatal("includes a bootp server."); log_fatal("includes a bootp server.");
} }
@ -44,5 +44,5 @@ index f30c171..b236c4a 100644
* IP packets whose destination address is 255.255.255.255. These * IP packets whose destination address is 255.255.255.255. These
* will be treated as subnet broadcasts on the interface identified * will be treated as subnet broadcasts on the interface identified
-- --
1.9.1 2.7.4

View File

@ -1,37 +1,46 @@
From 04e5bef0d9bb0e1b3c8bbecccf11228ae809dfd2 Mon Sep 17 00:00:00 2001 From 04e5bef0d9bb0e1b3c8bbecccf11228ae809dfd2 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com> From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:25:21 -0400 Date: Mon, 2 Oct 2017 15:25:21 -0400
Subject: [PATCH 4/7] WRS: Patch104: Subject: dhclient-ipv6-conditionally-set-hostname.patch
dhclient-ipv6-conditionally-set-hostname.patch
--- ---
client/scripts/linux | 13 +++++++++++++ client/scripts/linux | 23 ++++++++++++++++++-----
1 file changed, 13 insertions(+) 1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/client/scripts/linux b/client/scripts/linux diff --git a/client/scripts/linux b/client/scripts/linux
index 14655f0..59e764f 100755 index 5fb1612..061e00c 100755
--- a/client/scripts/linux --- a/client/scripts/linux
+++ b/client/scripts/linux +++ b/client/scripts/linux
@@ -254,6 +254,19 @@ if [ x$reason = xPREINIT6 ] ; then @@ -398,11 +398,24 @@ case "$reason" in
exit_with_hooks 0
fi
+if [ x$reason = xBOUND6 ] || [ x$reason = xRENEW6 ] || \ ;;
+ [ x$reason = xREBIND6 ] || [ x$reason = xREBOOT6 ]; then
+ current_hostname=`hostname` - BOUND6|RENEW6|REBIND6)
+ if [ x$current_hostname = x ] || \ - if [ "${new_ip6_address}" ] && [ "${new_ip6_prefixlen}" ]; then
+ [ x$current_hostname = "x(none)" ] || \ - # set leased IP
+ [ x$current_hostname = xlocalhost ] || \ - ${ip} -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
+ [ x$current_hostname = x$old_fqdn_hostname ]; then - dev ${interface} scope global
+ if [ x$new_fqdn_hostname != x$old_fqdn_hostname ]; then + BOUND6|RENEW6|REBIND6|REBOOT6)
+ hostname "$new_fqdn_hostname" + current_hostname=$(hostname)
+ fi + if [ -z "${current_hostname}" ] || \
+ fi + [ "$current_hostname" = '(none)' ] || \
+fi + [ "$current_hostname" = 'localhost' ] || \
+ [ "$current_hostname" = "$old_fqdn_hostname" ]; then
+ if [ "$new_fqdn_hostname" != "$old_fqdn_hostname" ]; then
+ hostname "$new_fqdn_hostname"
+ fi
+ fi
+ +
if [ x${old_ip6_prefix} != x ] || [ x${new_ip6_prefix} != x ] ; then + # set leased IP
echo Prefix ${reason} old=${old_ip6_prefix} new=${new_ip6_prefix} + if [ "${reason}" = BOUND6 ] ||
+ [ "${reason}" = RENEW6 ] || [ "${reason}" = REBIND6 ]; then
+ if [ "${new_ip6_address}" ] && [ "${new_ip6_prefixlen}" ]; then
+ ${ip} -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
+ dev ${interface} scope global
+ fi
fi
# update /etc/resolv.conf
-- --
1.9.1 2.7.4

View File

@ -1,8 +1,7 @@
From 15b7057f9b9f2b232cf2f9f674c63140e903e379 Mon Sep 17 00:00:00 2001 From 15b7057f9b9f2b232cf2f9f674c63140e903e379 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com> From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:25:15 -0400 Date: Mon, 2 Oct 2017 15:25:15 -0400
Subject: [PATCH 2/7] WRS: Patch102: Subject: dhclient-restrict-interfaces-to-command-line.patch
dhclient-restrict-interfaces-to-command-line.patch
--- ---
client/clparse.c | 8 ++++++-- client/clparse.c | 8 ++++++--
@ -11,10 +10,10 @@ Subject: [PATCH 2/7] WRS: Patch102:
3 files changed, 10 insertions(+), 2 deletions(-) 3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/client/clparse.c b/client/clparse.c diff --git a/client/clparse.c b/client/clparse.c
index b609caf..3ae632a 100644 index 076ea6a..983e280 100644
--- a/client/clparse.c --- a/client/clparse.c
+++ b/client/clparse.c +++ b/client/clparse.c
@@ -943,8 +943,12 @@ void parse_interface_declaration (cfile, outer_config, name) @@ -1022,8 +1022,12 @@ void parse_interface_declaration (cfile, outer_config, name)
if (!client -> config) if (!client -> config)
make_client_config (client, outer_config); make_client_config (client, outer_config);
@ -30,10 +29,10 @@ index b609caf..3ae632a 100644
token = next_token (&val, (unsigned *)0, cfile); token = next_token (&val, (unsigned *)0, cfile);
if (token != LBRACE) { if (token != LBRACE) {
diff --git a/client/dhclient.c b/client/dhclient.c diff --git a/client/dhclient.c b/client/dhclient.c
index 0db4703..00b4240 100644 index b61da43..3f78848 100644
--- a/client/dhclient.c --- a/client/dhclient.c
+++ b/client/dhclient.c +++ b/client/dhclient.c
@@ -71,6 +71,7 @@ isc_boolean_t no_pid_file = ISC_FALSE; @@ -67,6 +67,7 @@ isc_boolean_t no_pid_file = ISC_FALSE;
int dhcp_max_agent_option_packet_length = 0; int dhcp_max_agent_option_packet_length = 0;
int interfaces_requested = 0; int interfaces_requested = 0;
@ -41,7 +40,7 @@ index 0db4703..00b4240 100644
struct iaddr iaddr_broadcast = { 4, { 255, 255, 255, 255 } }; struct iaddr iaddr_broadcast = { 4, { 255, 255, 255, 255 } };
struct iaddr iaddr_any = { 4, { 0, 0, 0, 0 } }; struct iaddr iaddr_any = { 4, { 0, 0, 0, 0 } };
@@ -242,6 +243,8 @@ main(int argc, char **argv) { @@ -342,6 +343,8 @@ main(int argc, char **argv) {
no_dhclient_pid = 1; no_dhclient_pid = 1;
} else if (!strcmp(argv[i], "--no-pid")) { } else if (!strcmp(argv[i], "--no-pid")) {
no_pid_file = ISC_TRUE; no_pid_file = ISC_TRUE;
@ -49,19 +48,19 @@ index 0db4703..00b4240 100644
+ restrict_interfaces = ISC_TRUE; + restrict_interfaces = ISC_TRUE;
} else if (!strcmp(argv[i], "-cf")) { } else if (!strcmp(argv[i], "-cf")) {
if (++i == argc) if (++i == argc)
usage(); usage(use_noarg, argv[i-1]);
diff --git a/includes/dhcpd.h b/includes/dhcpd.h diff --git a/includes/dhcpd.h b/includes/dhcpd.h
index 1d2bf2c..b1f16bf 100644 index d534f8c..e5cfb26 100644
--- a/includes/dhcpd.h --- a/includes/dhcpd.h
+++ b/includes/dhcpd.h +++ b/includes/dhcpd.h
@@ -2693,6 +2693,7 @@ extern const char *path_dhclient_db; @@ -2924,6 +2924,7 @@ extern const char *path_dhclient_db;
extern const char *path_dhclient_pid; extern const char *path_dhclient_pid;
extern char *path_dhclient_script; extern char *path_dhclient_script;
extern int interfaces_requested; extern int interfaces_requested;
+extern int restrict_interfaces; +extern int restrict_interfaces;
extern struct data_string default_duid; extern struct data_string default_duid;
extern int duid_type; extern int duid_type;
extern const char *path_dhclient_duid;
-- --
1.9.1 2.7.4

View File

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