Refactor patches for dnsmasq package.
Use dnsmasq-config package to add init script to system folder Remove dnsmasq-spec-add-init-script.patch. Merge spec change part in dnsmasq-spec-add-init-script.patch and src patch adding in patch-tftp-to-close-sockets-immediately.patch to spec-include-TiS-patch.patch. Deployment test and script check pass. Story: 2003768 Task: 27583 Change-Id: I4d5b78fed03961056585b8c09dc483fac3b55728 Signed-off-by: zhipengl <zhipengs.liu@intel.com>
This commit is contained in:
parent
c4617d4c4b
commit
992c3dfdf7
2
base/dnsmasq-config/centos/build_srpm.data
Normal file
2
base/dnsmasq-config/centos/build_srpm.data
Normal file
@ -0,0 +1,2 @@
|
||||
SRC_DIR="files"
|
||||
TIS_PATCH_VER=1
|
30
base/dnsmasq-config/centos/dnsmasq-config.spec
Normal file
30
base/dnsmasq-config/centos/dnsmasq-config.spec
Normal file
@ -0,0 +1,30 @@
|
||||
Summary: dnsmasq-config
|
||||
Name: dnsmasq-config
|
||||
Version: 1.0
|
||||
Release: %{tis_patch_ver}%{?_tis_dist}
|
||||
License: Apache-2.0
|
||||
Group: base
|
||||
Packager: StarlingX
|
||||
URL: unknown
|
||||
BuildArch: noarch
|
||||
Source: %name-%version.tar.gz
|
||||
|
||||
Requires: dnsmasq
|
||||
Summary: package StarlingX configuration files of dnsmasq to system folder.
|
||||
|
||||
%description
|
||||
package StarlingX configuration files of dnsmasq to system folder.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
install -m 755 init %{buildroot}%{_sysconfdir}/init.d/dnsmasq
|
||||
|
||||
%post
|
||||
|
||||
%files
|
||||
%{_sysconfdir}/init.d/dnsmasq
|
@ -1,2 +1 @@
|
||||
COPY_LIST="files/*"
|
||||
TIS_PATCH_VER=6
|
||||
TIS_PATCH_VER=7
|
||||
|
@ -3,12 +3,13 @@ From: jmckenna <jason.mckenna@windriver.com>
|
||||
Date: Fri, 9 Feb 2018 13:51:24 -0500
|
||||
Subject: [PATCH] update package patching
|
||||
|
||||
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||
---
|
||||
SPECS/dnsmasq.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec
|
||||
index 5cf440a..dd74293 100644
|
||||
index 4d30b0a..689158e 100644
|
||||
--- a/SPECS/dnsmasq.spec
|
||||
+++ b/SPECS/dnsmasq.spec
|
||||
@@ -13,7 +13,7 @@
|
||||
@ -21,5 +22,5 @@ index 5cf440a..dd74293 100644
|
||||
|
||||
Group: System Environment/Daemons
|
||||
--
|
||||
2.7.4
|
||||
1.8.3.1
|
||||
|
||||
|
@ -1,4 +1,2 @@
|
||||
spec-include-TiS-patch.patch
|
||||
dnsmasq-spec-add-init-script.patch
|
||||
patch-tftp-to-close-sockets-immediately.patch
|
||||
0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
@ -1,69 +0,0 @@
|
||||
From 13714ffa05d7d8a7ca9f9f61bfa75a3f7e8c2503 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 2/5] WRS: dnsmasq-spec-add-init-script.patch
|
||||
|
||||
---
|
||||
SPECS/dnsmasq.spec | 26 ++++++++++++++++----------
|
||||
1 file changed, 16 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec
|
||||
index 7f370d1..0641503 100644
|
||||
--- a/SPECS/dnsmasq.spec
|
||||
+++ b/SPECS/dnsmasq.spec
|
||||
@@ -21,6 +21,7 @@ License: GPLv2 or GPLv3
|
||||
URL: http://www.thekelleys.org.uk/dnsmasq/
|
||||
Source0: http://www.thekelleys.org.uk/dnsmasq/%{?extrapath}%{name}-%{version}%{?extraversion}.tar.gz
|
||||
Source1: %{name}.service
|
||||
+Source2: init
|
||||
# upstream git: git://thekelleys.org.uk/dnsmasq.git
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1367772
|
||||
@@ -168,22 +169,26 @@ mkdir -p %{buildroot}%{_unitdir}
|
||||
install -m644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||
rm -rf %{buildroot}%{_initrddir}
|
||||
|
||||
+# Systemv
|
||||
+mkdir -p %{buildroot}/etc/init.d
|
||||
+install -m 755 %{SOURCE2} %{buildroot}/etc/init.d/dnsmasq
|
||||
+
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
-%post
|
||||
-%systemd_post dnsmasq.service
|
||||
+#%post
|
||||
+#%systemd_post dnsmasq.service
|
||||
|
||||
-%preun
|
||||
-%systemd_preun dnsmasq.service
|
||||
+#%preun
|
||||
+#%systemd_preun dnsmasq.service
|
||||
|
||||
-%postun
|
||||
-%systemd_postun_with_restart dnsmasq.service
|
||||
+#%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 || :
|
||||
+#%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,-)
|
||||
@@ -195,6 +200,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_sbindir}/dnsmasq
|
||||
%{_mandir}/man8/dnsmasq*
|
||||
+/etc/init.d/dnsmasq
|
||||
|
||||
%files utils
|
||||
%{_bindir}/dhcp_*
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,32 +0,0 @@
|
||||
From e257b88db5d62a1e44e94373917dd3f97de12522 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 3/5] WRS: patch-tftp-to-close-sockets-immediately.patch
|
||||
|
||||
---
|
||||
SPECS/dnsmasq.spec | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec
|
||||
index 0641503..5cf440a 100644
|
||||
--- a/SPECS/dnsmasq.spec
|
||||
+++ b/SPECS/dnsmasq.spec
|
||||
@@ -58,6 +58,7 @@ Patch19: dnsmasq-2.76-misc-cleanups.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)
|
||||
@@ -116,6 +117,7 @@ query/remove a DHCP server's leases.
|
||||
|
||||
# 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
|
||||
--
|
||||
2.7.4
|
||||
|
@ -3,12 +3,13 @@ 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
|
||||
|
||||
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||
---
|
||||
SPECS/dnsmasq.spec | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
SPECS/dnsmasq.spec | 26 ++++++++++----------------
|
||||
1 file changed, 10 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec
|
||||
index b312ef3..7f370d1 100644
|
||||
index b312ef3..4d30b0a 100644
|
||||
--- a/SPECS/dnsmasq.spec
|
||||
+++ b/SPECS/dnsmasq.spec
|
||||
@@ -55,6 +55,10 @@ Patch17: dnsmasq-2.76-gita3303e196.patch
|
||||
@ -17,32 +18,50 @@ index b312ef3..7f370d1 100644
|
||||
|
||||
+# 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)
|
||||
|
||||
BuildRequires: dbus-devel
|
||||
@@ -109,6 +113,9 @@ query/remove a DHCP server's leases.
|
||||
@@ -109,6 +113,10 @@ query/remove a DHCP server's leases.
|
||||
%patch18 -p1 -b .underflow
|
||||
%patch19 -p1 -b .misc
|
||||
|
||||
+# 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"
|
||||
@@ -181,8 +188,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
@@ -164,25 +172,11 @@ rm -rf %{buildroot}%{_initrddir}
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
-%post
|
||||
-%systemd_post dnsmasq.service
|
||||
-
|
||||
-%preun
|
||||
-%systemd_preun dnsmasq.service
|
||||
-
|
||||
-%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
|
||||
+%config(noreplace) %attr(640,root,root) %{_sysconfdir}/dnsmasq.conf
|
||||
+%dir %attr(750,root,root) /etc/dnsmasq.d
|
||||
+%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
|
||||
--
|
||||
2.7.4
|
||||
1.8.3.1
|
||||
|
||||
|
@ -312,6 +312,7 @@ python-psycopg2
|
||||
# dnsmasq
|
||||
dnsmasq
|
||||
dnsmasq-utils
|
||||
dnsmasq-config
|
||||
|
||||
# rsync
|
||||
rsync
|
||||
|
@ -136,6 +136,7 @@ networking/iptables
|
||||
database/python-psycopg2
|
||||
base/crontabs
|
||||
base/dnsmasq
|
||||
base/dnsmasq-config
|
||||
base/rsync
|
||||
filesystem/parted
|
||||
security/python-keyring
|
||||
|
Loading…
Reference in New Issue
Block a user