Accepting request 796008 from security:dehydrated

- Fix lighttpd config file (boo#1169834)
- Provide nginx subpackage for SLE 15+ (jsc#11756)

OBS-URL: https://build.opensuse.org/request/show/796008
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dehydrated?expand=0&rev=14
This commit is contained in:
Dominique Leuenberger 2020-04-21 11:13:48 +00:00 committed by Git OBS Bridge
commit 2489e026cf
3 changed files with 26 additions and 8 deletions

View File

@ -1,4 +1,4 @@
server.modules += ("alias")
server.modules += ("mod_alias")
alias.url += (
"/.well-known/acme-challenge/" => "@CHALLENGEDIR@",
"/.well-known/acme-challenge/" => "@CHALLENGEDIR@/",
)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Apr 20 00:37:26 UTC 2020 - Daniel Molkentin <daniel.molkentin@suse.com>
- Fix lighttpd config file (boo#1169834)
- Provide nginx subpackage for SLE 15+ (jsc#11756)
-------------------------------------------------------------------
Mon Feb 3 12:25:00 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -29,13 +29,18 @@
%bcond_with systemd
%endif
%if 0%{?is_opensuse} || %{defined fedora}
%if 0%{?sle_version} >= 150000 || 0%{?is_opensuse} || %{defined fedora}
%bcond_without nginx
%else
%bcond_with nginx
%endif
%if 0%{?is_opensuse} || %{defined fedora}
%bcond_without lighttpd
%else
%bcond_with nginx
%bcond_with lighttpd
%bcond_with lighttpd
%endif
%{!?_tmpfilesdir: %global _tmpfilesdir %{_prefix}/lib/tmpfiles.d }
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
@ -215,8 +220,8 @@ install -m 0644 acme-challenge %{buildroot}%{_sysconfdir}/nginx
%if %{with lighttpd}
install -m 0755 -d %{buildroot}%{_sysconfdir}/lighttpd/conf.d
sed "s,@CHALLENGEDIR@,%{_challengedir},g" %{SOURCE3} > acme-challenge
install -m 0644 acme-challenge %{buildroot}%{_sysconfdir}/lighttpd/conf.d
sed "s,@CHALLENGEDIR@,%{_challengedir},g" %{SOURCE3} > acme-challenge.conf
install -m 0644 acme-challenge.conf %{buildroot}%{_sysconfdir}/lighttpd/conf.d
%endif #with lighttpd
%if %{with systemd}
@ -248,6 +253,13 @@ perl -p -i -e 's|#DEHYDRATED_GROUP=|DEHYDRATED_GROUP="%{_user}"|' %{buildroot}%{
diff -urN docs/examples/config %{buildroot}%{_home}/config ||:
# Rename existing config file config files fror nginx and lighttpd
%if %{with nginx}
%pre nginx
[ -f %{_sysconfdir}/nginx/conf.d/acme-challenge ] && \
mv %{_sysconfdir}/nginx/conf.d/acme-challenge %{_sysconfdir}/nginx/conf.d/acme-challenge.conf || :
%endif
%files
%defattr(-,root,root)
%attr(750,root,%{_user}) %dir %{_sysconfdir}/dehydrated
@ -294,7 +306,7 @@ diff -urN docs/examples/config %{buildroot}%{_home}/config ||:
%if %{with lighttpd}
%files lighttpd
%defattr(-,root,root)
%config %attr(640,root,lighttpd) %{_sysconfdir}/lighttpd/conf.d/acme-challenge
%config %attr(640,root,lighttpd) %{_sysconfdir}/lighttpd/conf.d/acme-challenge.conf
%endif #with lighttpd
%changelog