diff --git a/base/dnsmasq-config/centos/build_srpm.data b/base/dnsmasq-config/centos/build_srpm.data new file mode 100644 index 000000000..2c3b2cb8b --- /dev/null +++ b/base/dnsmasq-config/centos/build_srpm.data @@ -0,0 +1,2 @@ +SRC_DIR="files" +TIS_PATCH_VER=1 diff --git a/base/dnsmasq-config/centos/dnsmasq-config.spec b/base/dnsmasq-config/centos/dnsmasq-config.spec new file mode 100644 index 000000000..fde260cf1 --- /dev/null +++ b/base/dnsmasq-config/centos/dnsmasq-config.spec @@ -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 diff --git a/base/dnsmasq/files/init b/base/dnsmasq-config/files/init similarity index 100% rename from base/dnsmasq/files/init rename to base/dnsmasq-config/files/init diff --git a/base/dnsmasq/centos/build_srpm.data b/base/dnsmasq/centos/build_srpm.data index 3a9f62926..c66bf348c 100644 --- a/base/dnsmasq/centos/build_srpm.data +++ b/base/dnsmasq/centos/build_srpm.data @@ -1,2 +1 @@ -COPY_LIST="files/*" -TIS_PATCH_VER=6 +TIS_PATCH_VER=7 diff --git a/base/dnsmasq/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/dnsmasq/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch index d6d5e1701..7629011cd 100644 --- a/base/dnsmasq/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ b/base/dnsmasq/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch @@ -3,12 +3,13 @@ From: jmckenna Date: Fri, 9 Feb 2018 13:51:24 -0500 Subject: [PATCH] update package patching +Signed-off-by: zhipengl --- 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 diff --git a/base/dnsmasq/centos/meta_patches/PATCH_ORDER b/base/dnsmasq/centos/meta_patches/PATCH_ORDER index 8dc707716..44da2f427 100644 --- a/base/dnsmasq/centos/meta_patches/PATCH_ORDER +++ b/base/dnsmasq/centos/meta_patches/PATCH_ORDER @@ -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 diff --git a/base/dnsmasq/centos/meta_patches/dnsmasq-spec-add-init-script.patch b/base/dnsmasq/centos/meta_patches/dnsmasq-spec-add-init-script.patch deleted file mode 100644 index 4e8da7663..000000000 --- a/base/dnsmasq/centos/meta_patches/dnsmasq-spec-add-init-script.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 13714ffa05d7d8a7ca9f9f61bfa75a3f7e8c2503 Mon Sep 17 00:00:00 2001 -From: Scott Little -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 - diff --git a/base/dnsmasq/centos/meta_patches/patch-tftp-to-close-sockets-immediately.patch b/base/dnsmasq/centos/meta_patches/patch-tftp-to-close-sockets-immediately.patch deleted file mode 100644 index 3f3524bb4..000000000 --- a/base/dnsmasq/centos/meta_patches/patch-tftp-to-close-sockets-immediately.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e257b88db5d62a1e44e94373917dd3f97de12522 Mon Sep 17 00:00:00 2001 -From: Scott Little -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 - diff --git a/base/dnsmasq/centos/meta_patches/spec-include-TiS-patch.patch b/base/dnsmasq/centos/meta_patches/spec-include-TiS-patch.patch index 678fc8efb..a13ace5bd 100644 --- a/base/dnsmasq/centos/meta_patches/spec-include-TiS-patch.patch +++ b/base/dnsmasq/centos/meta_patches/spec-include-TiS-patch.patch @@ -3,12 +3,13 @@ From: Scott Little Date: Mon, 2 Oct 2017 17:27:13 -0400 Subject: [PATCH 1/5] WRS: spec-include-TiS-patch.patch +Signed-off-by: zhipengl --- - 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 diff --git a/centos_iso_image.inc b/centos_iso_image.inc index 015d6b268..7b46a5b87 100644 --- a/centos_iso_image.inc +++ b/centos_iso_image.inc @@ -312,6 +312,7 @@ python-psycopg2 # dnsmasq dnsmasq dnsmasq-utils +dnsmasq-config # rsync rsync diff --git a/centos_pkg_dirs b/centos_pkg_dirs index 463e86362..c98cceaa4 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -136,6 +136,7 @@ networking/iptables database/python-psycopg2 base/crontabs base/dnsmasq +base/dnsmasq-config base/rsync filesystem/parted security/python-keyring