diff --git a/acme-challenge.conf.lighttpd.in b/acme-challenge.conf.lighttpd.in index 9cb48fc..dd7c5ad 100644 --- a/acme-challenge.conf.lighttpd.in +++ b/acme-challenge.conf.lighttpd.in @@ -1,4 +1,4 @@ -server.modules += ("alias") +server.modules += ("mod_alias") alias.url += ( - "/.well-known/acme-challenge/" => "@CHALLENGEDIR@", + "/.well-known/acme-challenge/" => "@CHALLENGEDIR@/", ) diff --git a/dehydrated.changes b/dehydrated.changes index 64bbf09..663d49d 100644 --- a/dehydrated.changes +++ b/dehydrated.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 20 00:37:26 UTC 2020 - Daniel Molkentin + +- Fix lighttpd config file (boo#1169834) +- Provide nginx subpackage for SLE 15+ (jsc#11756) + ------------------------------------------------------------------- Mon Feb 3 12:25:00 UTC 2020 - Dominique Leuenberger diff --git a/dehydrated.spec b/dehydrated.spec index 2dee97a..48ba242 100644 --- a/dehydrated.spec +++ b/dehydrated.spec @@ -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