weekly cron: support for nginx reload; don't fail if httpd or nginx are not installed or enabled [release 1.19.0-2mamba;Mon Nov 01 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 21:10:20 +01:00
parent 4f6692cdd7
commit adf3aae4f3

View File

@ -1,15 +1,13 @@
Name: certbot
Version: 1.19.0
Release: 1mamba
Release: 2mamba
Summary: A fully-featured, extensible client for the Let's Encrypt CA
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://letsencrypt.org
## GITSOURCE https://github.com/letsencrypt/letsencrypt.git v0.1.0
Source: https://github.com/certbot/certbot.git/v%{version}/certbot-%{version}.tar.bz2
#Source: https://github.com/letsencrypt/letsencrypt.git/v%{version}/letsencrypt-%{version}.tar.bz2
Patch0: python-letsencrypt-0.1.0-use-configargparse.patch
Patch1: letsencrypt-0.1.1-acme-0.1.1.patch
License: Apache License 2.0
@ -20,43 +18,27 @@ BuildRequires: python3.7dist(configargparse)
BuildRequires: python3.7dist(configobj)
BuildRequires: python3.7dist(cryptography)
BuildRequires: python3.7dist(distro)
BuildRequires: python3.7dist(dnspython)
BuildRequires: python3.7dist(josepy)
BuildRequires: python3.7dist(parsedatetime)
BuildRequires: python3.7dist(pyopenssl)
BuildRequires: python3.7dist(pyparsing)
BuildRequires: python3.7dist(pyrfc3339)
BuildRequires: python3.7dist(python-augeas)
BuildRequires: python3.7dist(pytz)
BuildRequires: python3.7dist(setuptools)
BuildRequires: python3.7dist(zope.component)
BuildRequires: python3.7dist(zope.interface)
## AUTOBUILDREQ-END
Requires: python3 >= %python3_version
Requires: python-acme-py3 == %{version}
#Requires: python-argparse
Requires: python-augeas-py3
Requires: python-configobj-py3
Requires: python-cryptography-py3
Requires: python-configargparse-py3
Requires: python-distro-py3
#Requires: python-funcsigs >= 1.0
Requires: python-josepy-py3
Requires: python-mock-py3
Requires: python-parsedatetime-py3
Requires: python-pyrfc3339-py3
#Requires: python-pythondialog
Requires: python-psutil-py3
Requires: python-requests-py3
Requires: python-setuptools-py3
Requires: python-six-py3
Requires: python-tz-py3
Requires: python-zope-component-py3
Requires: python-zope-interface-py3
Requires: python-pyrfc3339-py3
Requires: python-parsedatetime-py3
Requires: python-mock-py3
Requires: python-josepy-py3
Requires: python-configobj-py3
Requires: python-configargparse-py3
Provides: letsencrypt
Obsoletes: letsencrypt
Obsoletes: letsencrypt < 1.19.0
%description
The Let's Encrypt Client is a fully-featured, extensible client for the Let's Encrypt CA (or any other CA that speaks the ACME protocol) that can automate the tasks of obtaining certificates and configuring webservers to use them.
@ -71,15 +53,42 @@ Requires: apache
The Let's Encrypt Client is a fully-featured, extensible client for the Let's Encrypt CA (or any other CA that speaks the ACME protocol) that can automate the tasks of obtaining certificates and configuring webservers to use them.
This package provides the apache plugin.
%package postfix
%package ci
Group: System/Libraries
Summary: Postfix plugin for %{name}
Summary: CI plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: postfix
%description postfix
%description ci
The Let's Encrypt Client is a fully-featured, extensible client for the Let's Encrypt CA (or any other CA that speaks the ACME protocol) that can automate the tasks of obtaining certificates and configuring webservers to use them.
This package provides the postfix plugin.
This package provides the nginx plugin.
%package nginx
Group: System/Libraries
Summary: Nginx plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: nginx
%description nginx
The Let's Encrypt Client is a fully-featured, extensible client for the Let's Encrypt CA (or any other CA that speaks the ACME protocol) that can automate the tasks of obtaining certificates and configuring webservers to use them.
This package provides the nginx plugin.
%package dns-cloudflare
Group: System/Libraries
Summary: Cloudflare DNS plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description dns-cloudflare
The Let's Encrypt Client is a fully-featured, extensible client for the Let's Encrypt CA (or any other CA that speaks the ACME protocol) that can automate the tasks of obtaining certificates and configuring webservers to use them.
This package provides the Cloudflare DNS plugin.
%package dns-rfc2136
Group: System/Libraries
Summary: rfc2136 DNS plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description dns-rfc2136
The Let's Encrypt Client is a fully-featured, extensible client for the Let's Encrypt CA (or any other CA that speaks the ACME protocol) that can automate the tasks of obtaining certificates and configuring webservers to use them.
This package provides the rfc2136 DNS plugin.
%prep
%setup -q
@ -91,7 +100,8 @@ cd certbot
CFLAGS="%{optflags}" %{__python3} setup.py build
cd ..
for d in apache; do
# need more deps: ci dns-cloudflare
for d in apache nginx dns-rfc2136; do
cd certbot-$d
CFLAGS="%{optflags}" %{__python3} setup.py build
cd ..
@ -106,9 +116,10 @@ cd certbot
--install-headers=%{_includedir}/python \
--install-lib=%{python3_sitearch} \
--record=%{name}.filelist
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
cd ..
for d in apache; do
for d in apache nginx dns-rfc2136; do
cd certbot-$d
%{__python3} setup.py install \
-O1 --skip-build \
@ -116,10 +127,11 @@ cd certbot-$d
--install-headers=%{_includedir}/python \
--install-lib=%{python3_sitearch} \
--record=%{name}.filelist
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
cd ..
done
#sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
install -d -m0755 %{buildroot}%{_sysconfdir}/letsencrypt
install -d -m0755 %{buildroot}%{_localstatedir}/log/letsencrypt
@ -128,7 +140,8 @@ install -d -m0755 %{buildroot}%{_sysconfdir}/cron.weekly
cat > %{buildroot}%{_sysconfdir}/cron.weekly/certbot << _EOF
#!/bin/bash
certbot renew
systemctl reload httpd
systemctl -q is-enabled httpd 2>/dev/null && systemctl reload httpd
systemctl -q is-enabled nginx 2>/dev/null && systemctl reload nginx
_EOF
%posttrans
@ -144,14 +157,37 @@ done
%attr(0755,root,root) %{_sysconfdir}/cron.weekly/certbot
%dir %{_localstatedir}/log/letsencrypt
%dir %{python3_sitearch}/certbot-%{version}-py*.egg-info
%{python3_sitearch}/certbot-%{version}-py*.egg-info/*
%files apache -f certbot-apache/%{name}.filelist
%defattr(-,root,root)
%dir %{python3_sitearch}/certbot_apache-%{version}-py*.egg-info
%{python3_sitearch}/certbot_apache-%{version}-py*.egg-info/*
#%files postfix -f certbot-postfix/%{name}.filelist
#%files ci -f certbot-ci/%{name}.filelist
#%defattr(-,root,root)
#%dir %{python3_sitearch}/certbot_ci-*-py*.egg-info
#%{python3_sitearch}/certbot_ci-*-py*.egg-info/*
%files nginx -f certbot-nginx/%{name}.filelist
%defattr(-,root,root)
%dir %{python3_sitearch}/certbot_nginx-%{version}-py*.egg-info
%{python3_sitearch}/certbot_nginx-%{version}-py*.egg-info/*
#%files dns-cloudflare -f certbot-dns-cloudflare/%{name}.filelist
#%defattr(-,root,root)
#%dir %{python3_sitearch}/certbot_dns_cloudflare-%{version}-py*.egg-info
#%{python3_sitearch}/certbot_dns_cloudflare-%{version}-py*.egg-info/*
%files dns-rfc2136 -f certbot-dns-rfc2136/%{name}.filelist
%defattr(-,root,root)
%dir %{python3_sitearch}/certbot_dns_rfc2136-%{version}-py*.egg-info
%{python3_sitearch}/certbot_dns_rfc2136-%{version}-py*.egg-info/*
%changelog
* Mon Nov 01 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.19.0-2mamba
- weekly cron: support for nginx reload; don't fail if httpd or nginx are not installed or enabled
* Wed Sep 08 2021 Automatic Build System <autodist@mambasoft.it> 1.19.0-1mamba
- automatic version update by autodist