From 9212b12af45333e3c9556b39d212925c6cd5d288 Mon Sep 17 00:00:00 2001 From: h00465007 Date: Wed, 19 Feb 2020 10:31:26 +0800 Subject: [PATCH] unpack libs subpackage --- unbound.spec | 56 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/unbound.spec b/unbound.spec index 90035c0..621c90b 100644 --- a/unbound.spec +++ b/unbound.spec @@ -1,9 +1,8 @@ %{!?delete_la: %global delete_la find $RPM_BUILD_ROOT -type f -name "*.la" -delete} - Name: unbound Version: 1.7.3 -Release: 13 +Release: 14 Summary: Unbound is a validating, recursive, caching DNS resolver License: BSD Url: https://nlnetlabs.nl/projects/unbound/about/ @@ -32,9 +31,7 @@ BuildRequires: make flex swig pkgconfig systemd python-unversioned-command BuildRequires: libevent-devel expat-devel openssl-devel python3-devel %{?systemd_requires} -Requires: shadow-utils -Provides: %{name}-libs = %{version}-%{release} -Obsoletes: %{name}-libs < %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %description Unbound is a validating, recursive, caching DNS resolver. It is designed @@ -45,17 +42,24 @@ such as FreeBSD, OpenBSD, NetBSD, MacOS, Linux and Microsoft Windows. Unbound is a totally free, open source software under the BSD license. It doesn't make custom builds or provide specific features to paying customers only. +%package libs +Summary: Libraries for %{name} +%{?systemd_requires} +Requires: shadow-utils + +%description libs +Libraries for %{name}. %package devel -Summary: Libraries and header files -Requires: %{name}%{?_isa} = %{version}-%{release} openssl-devel pkgconfig +Summary: Libraries and header files +Requires: %{name}-libs = %{version}-%{release} openssl-devel pkgconfig %description devel Package devel includes libraries and header files for development with unbound. %package -n python3-%{name} -Summary: The python3 module of unbound DNS resolver -Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: The python3 module of unbound DNS resolver +Requires: %{name}-libs = %{version}-%{release} %description -n python3-unbound The python3 module of unbound DNS resolver. @@ -136,7 +140,7 @@ install -p %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/unbound/local.d/ echo ".so man8/unbound-control.8" > $RPM_BUILD_ROOT/%{_mandir}/man8/unbound-control-setup.8 -%pre +%pre libs getent group unbound >/dev/null || groupadd -r unbound getent passwd unbound >/dev/null || \ useradd -r -g unbound -d %{_sysconfdir}/unbound -s /sbin/nologin \ @@ -145,6 +149,8 @@ useradd -r -g unbound -d %{_sysconfdir}/unbound -s /sbin/nologin \ %post %systemd_post unbound.service %systemd_post unbound-keygen.service + +%post libs %{?ldconfig} %systemd_post unbound-anchor.timer if [ "$1" -eq 1 ]; then @@ -154,11 +160,15 @@ fi %preun %systemd_preun unbound.service %systemd_preun unbound-keygen.service + +%preun libs %systemd_preun unbound-anchor.timer %postun %systemd_postun_with_restart unbound.service %systemd_postun unbound-keygen.service + +%postun libs %{?ldconfig} %systemd_postun_with_restart unbound-anchor.timer @@ -180,22 +190,32 @@ popd %attr(0644,root,root) %{_tmpfilesdir}/unbound.conf %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%attr(0644,root,root) %config %{_sysconfdir}/%{name}/root.key %dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/keys.d %attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/keys.d/*.key %dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/conf.d %attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/conf.d/*.conf %dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/local.d %attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/local.d/*.conf -%attr(0644,unbound,unbound) %config %{_sharedstatedir}/%{name}/root.key -%{_sysconfdir}/%{name}/icannbundle.pem -%{_unitdir}/* +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}-keygen.service %ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_control.pem %ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_control.key %ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_server.pem %ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_server.key -%{_libdir}/libunbound.so.* %{_sbindir}/* +%exclude %{_sbindir}/unbound-anchor + +%files libs +%defattr(-,root,root) +%dir %attr(0755,root,root) %{_sysconfdir}/%{name} +%attr(0644,root,root) %config %{_sysconfdir}/%{name}/root.key +%dir %attr(0755,unbound,unbound) %{_sharedstatedir}/%{name} +%attr(0644,unbound,unbound) %config %{_sharedstatedir}/%{name}/root.key +%{_sysconfdir}/%{name}/icannbundle.pem +%{_sbindir}/unbound-anchor +%{_libdir}/libunbound.so.* +%{_unitdir}/unbound-anchor.timer +%{_unitdir}/unbound-anchor.service %files -n python3-unbound %defattr(-,root,root) @@ -213,6 +233,12 @@ popd %{_mandir}/man* %changelog +* Wed Feb 19 2020 hexiujun - 1.7.3-14 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:unpack libs subpackage + * Sat Jan 11 2020 zhangrui - 1.7.3-13 - Type:cves - ID:CVE-2019-18934 -- Gitee