!113 move files about anchor and pem to separate package

From: @eaglegai 
Reviewed-by: @renmingshuai 
Signed-off-by: @renmingshuai
This commit is contained in:
openeuler-ci-bot 2024-06-25 06:17:39 +00:00 committed by Gitee
commit d8a7bde7ea
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2,7 +2,7 @@
Name: unbound Name: unbound
Version: 1.13.2 Version: 1.13.2
Release: 11 Release: 12
Summary: Unbound is a validating, recursive, caching DNS resolver Summary: Unbound is a validating, recursive, caching DNS resolver
License: BSD License: BSD
Url: https://nlnetlabs.nl/projects/unbound/about/ Url: https://nlnetlabs.nl/projects/unbound/about/
@ -35,6 +35,7 @@ BuildRequires: gcc
%{?systemd_requires} %{?systemd_requires}
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-anchor = %{version}-%{release}
%description %description
Unbound is a validating, recursive, caching DNS resolver. It is designed Unbound is a validating, recursive, caching DNS resolver. It is designed
@ -52,6 +53,13 @@ Requires(pre): shadow-utils
%description libs %description libs
Libraries for %{name}. Libraries for %{name}.
%package anchor
Requires: %{name}-libs = %{version}-%{release}
Summary: DNSSEC trust anchor maintaining tool
%description anchor
Contains tool maintaining trust anchor using RFC 5011 key rollover algorithm.
%package devel %package devel
Summary: Libraries and header files Summary: Libraries and header files
Requires: %{name}-libs = %{version}-%{release} openssl-devel pkgconfig Requires: %{name}-libs = %{version}-%{release} openssl-devel pkgconfig
@ -153,10 +161,11 @@ useradd -r -g unbound -d %{_sysconfdir}/unbound -s /sbin/nologin \
%systemd_post unbound.service %systemd_post unbound.service
%systemd_post unbound-keygen.service %systemd_post unbound-keygen.service
%post libs %post anchor
%{?ldconfig} %systemd_post unbound-anchor.service unbound-anchor.timer
%systemd_post unbound-anchor.timer # start the timer only if installing the package to prevent starting it, if it was stopped on purpose
if [ "$1" -eq 1 ]; then if [ "$1" -eq 1 ]; then
# the Unit is in presets, but would be started after reboot
/bin/systemctl start unbound-anchor.timer >/dev/null 2>&1 || : /bin/systemctl start unbound-anchor.timer >/dev/null 2>&1 || :
fi fi
@ -164,16 +173,15 @@ fi
%systemd_preun unbound.service %systemd_preun unbound.service
%systemd_preun unbound-keygen.service %systemd_preun unbound-keygen.service
%preun libs %preun anchor
%systemd_preun unbound-anchor.timer %systemd_preun unbound-anchor.service unbound-anchor.timer
%postun %postun
%systemd_postun_with_restart unbound.service %systemd_postun_with_restart unbound.service
%systemd_postun unbound-keygen.service %systemd_postun unbound-keygen.service
%postun libs %postun anchor
%{?ldconfig} %systemd_postun_with_restart unbound-anchor.service unbound-anchor.timer
%systemd_postun_with_restart unbound-anchor.timer
%triggerun -- unbound < 1.4.12-4 %triggerun -- unbound < 1.4.12-4
/usr/bin/systemd-sysv-convert --save unbound >/dev/null 2>&1 ||: /usr/bin/systemd-sysv-convert --save unbound >/dev/null 2>&1 ||:
@ -211,22 +219,14 @@ popd
%files libs %files libs
%defattr(-,root,root) %defattr(-,root,root)
%dir %attr(0755,root,root) %{_sysconfdir}/%{name}
%if %{?openEuler:1}0 %if %{?openEuler:1}0
%attr(0644,root,root) %config %{_sysconfdir}/%{name}/root.key
%dir %attr(0755,unbound,unbound) %{_sharedstatedir}/%{name} %dir %attr(0755,unbound,unbound) %{_sharedstatedir}/%{name}
%attr(0644,unbound,unbound) %config %{_sharedstatedir}/%{name}/root.key %attr(0644,unbound,unbound) %config %{_sharedstatedir}/%{name}/root.key
%{_sysconfdir}/%{name}/icannbundle.pem
%else %else
%attr(0600,root,root) %config %{_sysconfdir}/%{name}/root.key
%dir %attr(0755,unbound,unbound) %{_sharedstatedir}/%{name} %dir %attr(0755,unbound,unbound) %{_sharedstatedir}/%{name}
%attr(0600,unbound,unbound) %config %{_sharedstatedir}/%{name}/root.key %attr(0600,unbound,unbound) %config %{_sharedstatedir}/%{name}/root.key
%attr(0600,root,root) %{_sysconfdir}/%{name}/icannbundle.pem
%endif %endif
%{_sbindir}/unbound-anchor
%{_libdir}/libunbound.so.* %{_libdir}/libunbound.so.*
%{_unitdir}/unbound-anchor.timer
%{_unitdir}/unbound-anchor.service
%files -n python3-unbound %files -n python3-unbound
%defattr(-,root,root) %defattr(-,root,root)
@ -239,11 +239,25 @@ popd
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%{_includedir}/* %{_includedir}/*
%files anchor
%dir %attr(0755,root,root) %{_sysconfdir}/%{name}
%{_sbindir}/unbound-anchor
%attr(0644,root,root) %config %{_sysconfdir}/%{name}/root.key
%{_sysconfdir}/%{name}/icannbundle.pem
%{_unitdir}/unbound-anchor.timer
%{_unitdir}/unbound-anchor.service
%files help %files help
%defattr(-,root,root) %defattr(-,root,root)
%{_mandir}/man* %{_mandir}/man*
%changelog %changelog
* Tue Jun 25 2024 gaihuiying <eaglegai@163.com> - 1.13.2-12
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:move files about anchor and pem to separate package
* Tue Mar 05 2024 gaihuiying <eaglegai@163.com> - 1.13.2-11 * Tue Mar 05 2024 gaihuiying <eaglegai@163.com> - 1.13.2-11
- Type:bugfix - Type:bugfix
- CVE:NA - CVE:NA