CentOS 8: Upgrade dnsmasq to version 2.79

(1)Release Version Upgrade
(2)Matching code changes with el7 to el8

Change-Id: Ieb451bbfd498d93c3c2f3995b8785807c099499b
Story: 2006729
Task: 37683
Depends-On: https://review.opendev.org/#/c/696481/
Depends-On: https://review.opendev.org/#/c/696050/
Signed-off-by: Long Li <lilong-neu@neusoft.com>
This commit is contained in:
Long Li 2019-11-21 14:39:54 +08:00
parent 61ce84360b
commit ebbb8c6b9c
5 changed files with 40 additions and 39 deletions

View File

@ -4,6 +4,7 @@ Date: Fri, 9 Feb 2018 13:51:24 -0500
Subject: [PATCH] update package patching
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
SPECS/dnsmasq.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@ -15,12 +16,12 @@ index 4d30b0a..689158e 100644
@@ -13,7 +13,7 @@
Name: dnsmasq
Version: 2.76
-Release: 7%{?extraversion}%{?dist}
+Release: 7.el7%{?_tis_dist}.%{tis_patch_ver}
Version: 2.79
-Release: 4%{?extraversion:.%{extraversion}}%{?dist}
+Release: 4.el8%{?_tis_dist}.%{tis_patch_ver}
Summary: A lightweight DHCP/caching DNS server
Group: System Environment/Daemons
License: GPLv2 or GPLv3
--
1.8.3.1
2.7.4

View File

@ -1,44 +1,45 @@
From ecbe3b4e138cb5076b8cbbedf86fea3044449132 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 17:27:13 -0400
Subject: [PATCH 1/5] WRS: spec-include-TiS-patch.patch
Subject: [PATCH 1/2]: spec-include-TiS-patch.patch
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
SPECS/dnsmasq.spec | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
SPECS/dnsmasq.spec | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec
index b312ef3..4d30b0a 100644
--- a/SPECS/dnsmasq.spec
+++ b/SPECS/dnsmasq.spec
@@ -57,6 +57,10 @@ Patch19: dnsmasq-2.76-misc-cleanups.patch
Patch20: dnsmasq-2.76-CVE-2017-14491-2.patch
Patch21: dnsmasq-2.76-inotify.patch
@@ -27,6 +27,9 @@ Patch1: dnsmasq-2.77-underflow.patch
Patch3: dnsmasq-2.78-fips.patch
Patch4: dnsmasq-2.80-dnssec.patch
+# WRS patches
+Patch30: dnsmasq-update-ipv6-leases-from-config.patch
+Patch31: close-tftp-sockets-immediately.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# This is workaround to nettle bug #1549190
# https://bugzilla.redhat.com/show_bug.cgi?id=1549190
Requires: nettle >= 3.4
@@ -64,6 +67,9 @@ server's leases.
%patch3 -p1 -b .fips
%patch4 -p1 -b .dnssec
BuildRequires: dbus-devel
@@ -113,6 +117,10 @@ query/remove a DHCP server's leases.
%patch20 -p1 -b .CVE-2017-14491-2
%patch21 -p1 -b .inotify
+# WRS patches
+%patch30 -p1
+%patch31 -p1
+
# use /var/lib/dnsmasq instead of /var/lib/misc
for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do
sed -i 's|/var/lib/misc/dnsmasq.leases|/var/lib/dnsmasq/dnsmasq.leases|g' "$file"
@@ -168,25 +176,11 @@ rm -rf %{buildroot}%{_initrddir}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -130,23 +136,12 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/dnsmasq.conf
#precreate users so that rpm can install files owned by that user
%sysusers_create_inline %(cat %{SOURCE2})
-%post
-#https://fedoraproject.org/wiki/Changes/SystemdSysusers
-%sysusers_create
-%systemd_post dnsmasq.service
-
-%preun
@ -46,22 +47,18 @@ index b312ef3..4d30b0a 100644
-
-%postun
-%systemd_postun_with_restart dnsmasq.service
-
-%triggerun -- dnsmasq < 2.52-3
-%{_bindir}/systemd-sysv-convert --save dnsmasq >/dev/null 2>&1 ||:
-/sbin/chkconfig --del dnsmasq >/dev/null 2>&1 || :
-/bin/systemctl try-restart dnsmasq.service >/dev/null 2>&1 || :
-
%files
%defattr(-,root,root,-)
%doc CHANGELOG COPYING COPYING-v3 FAQ doc.html setup.html dbus/DBus-interface
-%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dnsmasq.conf
-%dir /etc/dnsmasq.d
%doc CHANGELOG FAQ doc.html setup.html dbus/DBus-interface
%license COPYING COPYING-v3
%defattr(0644,root,dnsmasq,0755)
-%config(noreplace) %{_sysconfdir}/dnsmasq.conf
-%dir %{_sysconfdir}/dnsmasq.d
+%config(noreplace) %attr(640,root,root) %{_sysconfdir}/dnsmasq.conf
+%dir %attr(750,root,root) %{_sysconfdir}/dnsmasq.d
%dir %{_var}/lib/dnsmasq
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
%{_unitdir}/%{name}.service
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
--
1.8.3.1
2.7.4

View File

@ -3,6 +3,7 @@ From: Don Penney <don.penney@windriver.com>
Date: Thu, 15 Sep 2016 13:32:03 -0400
Subject: [PATCH 1/1] Close tftp sockets immediately
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
src/tftp.c | 2 ++
1 file changed, 2 insertions(+)
@ -11,7 +12,7 @@ diff --git a/src/tftp.c b/src/tftp.c
index d7d050f..ecc6ce8 100644
--- a/src/tftp.c
+++ b/src/tftp.c
@@ -768,9 +768,11 @@ int do_tftp_script_run(void)
@@ -807,9 +807,11 @@ int do_tftp_script_run(void)
if ((transfer = daemon->tftp_done_trans))
{
daemon->tftp_done_trans = transfer->next;
@ -24,5 +25,5 @@ index d7d050f..ecc6ce8 100644
return 1;
}
--
1.9.1
2.7.4

View File

@ -1,7 +1,9 @@
From 1a91b72146893dab1cca1354dd3b0a8fa74d6b55 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Tue, 18 Oct 2016 13:07:56 -0400
Subject: WRS: Patch22: dnsmasq-update-ipv6-leases-from-config.patch
Subject: dnsmasq-update-ipv6-leases-from-config.patch
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
src/lease.c | 53 +++++++++++++++++++++++++++++++++++++++++++----------
@ -76,7 +78,7 @@ index 69e698c..bc56c47 100644
+ lease_set_hostname(lease, name, 1, get_domain(lease->addr), NULL); /* updates auth flag only */
+ }
}
static void ourprintf(int *errp, char *format, ...)
--
2.7.4

View File

@ -1 +1 @@
mirror:Source/dnsmasq-2.76-7.el7.src.rpm
mirror:Source/dnsmasq-2.79-4.el8.src.rpm