added nginx plugin [release 2.6.0-4mamba;Tue Sep 26 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 21:10:25 +01:00
parent ee233b9faa
commit a5d8152b03
3 changed files with 66 additions and 39 deletions

8
certbot-renew.service Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Renew certificates acquired via Certbot
Documentation=https://eff-certbot.readthedocs.io/en/stable/
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot -q renew
PrivateTmp=true

10
certbot-renew.timer Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=Run Certbot twice daily
[Timer]
OnCalendar=*-*-* 00/12:00:00
RandomizedDelaySec=12h
Persistent=true
[Install]
WantedBy=timers.target

View File

@ -1,6 +1,6 @@
Name: certbot
Version: 2.6.0
Release: 3mamba
Release: 4mamba
Summary: A fully-featured, extensible client for the Let's Encrypt CA
Group: System/Libraries
Vendor: openmamba
@ -8,10 +8,13 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://letsencrypt.org
Source: https://github.com/certbot/certbot.git/v%{version}/certbot-%{version}.tar.bz2
Source1: certbot-renew.service
Source2: certbot-renew.timer
Patch0: python-letsencrypt-0.1.0-use-configargparse.patch
Patch1: letsencrypt-0.1.1-acme-0.1.1.patch
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: (python3.10dist(pyopenssl) < 23.1 or python3.10dist(pyopenssl) > 23.1)
BuildRequires: libpython310-devel
BuildRequires: python3.10dist(acme)
BuildRequires: python3.10dist(configargparse)
@ -20,7 +23,10 @@ BuildRequires: python3.10dist(cryptography)
BuildRequires: python3.10dist(distro)
BuildRequires: python3.10dist(josepy)
BuildRequires: python3.10dist(parsedatetime)
BuildRequires: python3.10dist(pyopenssl)
BuildRequires: python3.10dist(pyparsing)
BuildRequires: python3.10dist(pyrfc3339)
BuildRequires: python3.10dist(python-augeas)
BuildRequires: python3.10dist(pytz)
BuildRequires: python3.10dist(setuptools)
## AUTOBUILDREQ-END
@ -45,17 +51,17 @@ Requires: apache
%description 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.
This package provides the Apache plugin.
%package postfix
%package nginx
Group: System/Libraries
Summary: Postfix plugin for %{name}
Summary: Nginx plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: postfix
Requires: nginx
%description postfix
%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 postfix plugin.
This package provides the Nginx plugin.
%prep
%setup -q
@ -63,40 +69,20 @@ This package provides the postfix plugin.
#%patch1 -p1
%build
cd certbot
CFLAGS="%{optflags}" %{__python310} setup.py build
cd ..
for d in apache; do
cd certbot-$d
CFLAGS="%{optflags}" %{__python310} setup.py build
for d in certbot certbot-{apache,nginx}; do
cd $d
CFLAGS="%{optflags}" %{__python310} -m build --no-isolation --wheel
cd ..
done
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd certbot
%{__python310} setup.py install \
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{_includedir}/python \
--install-lib=%{python310_sitearch} \
--record=%{name}.filelist
cd ..
for d in apache; do
cd certbot-$d
%{__python310} setup.py install \
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{_includedir}/python \
--install-lib=%{python310_sitearch} \
--record=%{name}.filelist
for d in certbot certbot-{apache,nginx}; do
cd $d
%{__python310} -m installer --destdir=%{buildroot} dist/*.whl
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
@ -108,20 +94,43 @@ systemctl -q is-enabled httpd >/dev/null && systemctl reload httpd
systemctl -q is-enabled nginx >/dev/null && systemctl reload nginx
_EOF
%files -f certbot/%{name}.filelist
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/certbot-renew.service
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/certbot-renew.timer
ln -s %{python310_sitelib}/certbot_apache/_
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/letsencrypt
%attr(0755,root,root) %{_sysconfdir}/cron.weekly/certbot
%dir %{_localstatedir}/log/letsencrypt
%dir %{python310_sitearch}/certbot-%{version}-py*.egg-info
%{_bindir}/certbot
%attr(0700,root,root) %dir %{_localstatedir}/log/letsencrypt
%{_unitdir}/certbot-renew.service
%{_unitdir}/certbot-renew.timer
%dir %{python310_sitelib}/certbot-%{version}.dist-info
%{python310_sitelib}/certbot-%{version}.dist-info/*
%dir %{python310_sitelib}/certbot
%{python310_sitelib}/certbot/*
%doc LICENSE.txt
%files apache -f certbot-apache/%{name}.filelist
%files apache
%defattr(-,root,root)
%dir %{python310_sitelib}/certbot_apache-%{version}.dist-info
%{python310_sitelib}/certbot_apache-%{version}.dist-info/*
%dir %{python310_sitelib}/certbot_apache
%{python310_sitelib}/certbot_apache/*
#%files postfix -f certbot-postfix/%{name}.filelist
#%defattr(-,root,root)
%files nginx
%defattr(-,root,root)
%dir %{python310_sitelib}/certbot_nginx-%{version}.dist-info
%{python310_sitelib}/certbot_nginx-%{version}.dist-info/*
%dir %{python310_sitelib}/certbot_nginx
%{python310_sitelib}/certbot_nginx/*
%changelog
* Tue Sep 26 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.0-4mamba
- added nginx plugin
* Tue Aug 15 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.0-3mamba
- update requirements with python 3.10