Accepting request 943368 from home:gmbr3:Active
- Change to systemd-sysusers OBS-URL: https://build.opensuse.org/request/show/943368 OBS-URL: https://build.opensuse.org/package/show/server:dns/unbound?expand=0&rev=144
This commit is contained in:
parent
c7307c6222
commit
683e2b02c6
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 31 23:18:09 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||||
|
|
||||||
|
- Change to systemd-sysusers
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 9 11:14:33 UTC 2021 - Michael Ströder <michael@stroeder.com>
|
Thu Dec 9 11:14:33 UTC 2021 - Michael Ströder <michael@stroeder.com>
|
||||||
|
|
||||||
|
17
unbound.spec
17
unbound.spec
@ -42,6 +42,7 @@ Release: 0
|
|||||||
#
|
#
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
|
BuildRequires: sysuser-tools
|
||||||
BuildRequires: ldns-devel >= %{ldns_version}
|
BuildRequires: ldns-devel >= %{ldns_version}
|
||||||
BuildRequires: libevent-devel
|
BuildRequires: libevent-devel
|
||||||
BuildRequires: libexpat-devel
|
BuildRequires: libexpat-devel
|
||||||
@ -93,6 +94,7 @@ Source14: unbound.sysconfig
|
|||||||
Source15: unbound-anchor.timer
|
Source15: unbound-anchor.timer
|
||||||
Source16: unbound-munin.README
|
Source16: unbound-munin.README
|
||||||
Source18: unbound-anchor.service
|
Source18: unbound-anchor.service
|
||||||
|
Source19: unbound.sysusers
|
||||||
|
|
||||||
Summary: Validating, recursive, and caching DNS(SEC) resolver
|
Summary: Validating, recursive, and caching DNS(SEC) resolver
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
@ -155,7 +157,7 @@ This package holds the development files to work with libunbound.
|
|||||||
#
|
#
|
||||||
Summary: Unbound Anchor cert management tools
|
Summary: Unbound Anchor cert management tools
|
||||||
Group: Productivity/Networking/DNS/Servers
|
Group: Productivity/Networking/DNS/Servers
|
||||||
Requires(pre): shadow
|
%sysusers_requires
|
||||||
|
|
||||||
%description anchor
|
%description anchor
|
||||||
Unbound is a validating, recursive, and caching DNS(SEC) resolver.
|
Unbound is a validating, recursive, and caching DNS(SEC) resolver.
|
||||||
@ -197,6 +199,7 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%sysusers_generate_pre %{SOURCE19} anchor unbound.conf
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
export CXXFLAGS="%{optflags}"
|
export CXXFLAGS="%{optflags}"
|
||||||
|
|
||||||
@ -323,18 +326,15 @@ install -m 0640 -p %{SOURCE11} %{buildroot}%{_sysconfdir}/unbound/local.d/
|
|||||||
# Link unbound-control-setup.8 manpage to unbound-control.8
|
# Link unbound-control-setup.8 manpage to unbound-control.8
|
||||||
echo ".so man8/unbound-control.8" > %{buildroot}/%{_mandir}/man8/unbound-control-setup.8
|
echo ".so man8/unbound-control.8" > %{buildroot}/%{_mandir}/man8/unbound-control-setup.8
|
||||||
|
|
||||||
|
# sysusers.d
|
||||||
|
install -Dm0644 %{SOURCE19} %{buildroot}%{_sysusersdir}/unbound.conf
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# it currently fails in the ldns unit test. which is weird as both come from the same project
|
# it currently fails in the ldns unit test. which is weird as both come from the same project
|
||||||
make check ||:
|
make check ||:
|
||||||
|
|
||||||
%pre anchor
|
%pre anchor -f anchor.pre
|
||||||
%if %{with systemd}
|
|
||||||
%service_add_pre unbound-anchor.service unbound-anchor.timer
|
%service_add_pre unbound-anchor.service unbound-anchor.timer
|
||||||
%endif
|
|
||||||
getent group unbound >/dev/null || groupadd -r unbound
|
|
||||||
getent passwd unbound >/dev/null || \
|
|
||||||
useradd -g unbound -s /bin/false -r -c "unbound caching DNS server" \
|
|
||||||
-d /var/lib/unbound unbound
|
|
||||||
|
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
%pre
|
%pre
|
||||||
@ -463,6 +463,7 @@ systemd-tmpfiles --create %{_tmpfilesdir}/unbound.conf || :
|
|||||||
%config %{_sysconfdir}/%{name}/icannbundle.pem
|
%config %{_sysconfdir}/%{name}/icannbundle.pem
|
||||||
%{_unitdir}/unbound-anchor.timer
|
%{_unitdir}/unbound-anchor.timer
|
||||||
%{_unitdir}/unbound-anchor.service
|
%{_unitdir}/unbound-anchor.service
|
||||||
|
%{_sysusersdir}/unbound.conf
|
||||||
%dir %attr(-,unbound,unbound) %{_sharedstatedir}/%{name}
|
%dir %attr(-,unbound,unbound) %{_sharedstatedir}/%{name}
|
||||||
%attr(0644,unbound,unbound) %config(noreplace) %{_sharedstatedir}/%{name}/root.key
|
%attr(0644,unbound,unbound) %config(noreplace) %{_sharedstatedir}/%{name}/root.key
|
||||||
%attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/dlv.isc.org.key
|
%attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/dlv.isc.org.key
|
||||||
|
2
unbound.sysusers
Normal file
2
unbound.sysusers
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#Type Name ID GECOS Home directory Shell
|
||||||
|
u unbound - "unbound caching DNS server" /var/lib/unbound -
|
Loading…
Reference in New Issue
Block a user