summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-04 09:21:59 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-04 09:21:59 +0000
commit41b8dbc6d38781cc4d8d2d3ec928968dd5f0e9f7 (patch)
tree43cd2929dc433142975825d85f578e1a85e41457
parenta359eee63055291507cd524ec32efc15cbfc7d70 (diff)
automatic import of python-certbotopeneuler24.03_LTS_SP1openeuler24.03_LTS
-rw-r--r--.gitignore1
-rw-r--r--certbot-cli.ini4
-rw-r--r--certbot-renew-systemd.service7
-rw-r--r--certbot-renew-systemd.timer10
-rw-r--r--certbot-sysconfig-certbot48
-rw-r--r--certbot.logrotate5
-rw-r--r--python-certbot.spec224
-rw-r--r--sources1
8 files changed, 300 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8999ecd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/v3.1.0.tar.gz
diff --git a/certbot-cli.ini b/certbot-cli.ini
new file mode 100644
index 0000000..4378be9
--- /dev/null
+++ b/certbot-cli.ini
@@ -0,0 +1,4 @@
+preconfigured-renewal = True
+# Because we are using logrotate for greater flexibility, disable the
+# internal certbot log rotation.
+max-log-backups = 0
diff --git a/certbot-renew-systemd.service b/certbot-renew-systemd.service
new file mode 100644
index 0000000..acb6b8e
--- /dev/null
+++ b/certbot-renew-systemd.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=This service automatically renews any certbot certificates found
+
+[Service]
+EnvironmentFile=/etc/sysconfig/certbot
+Type=oneshot
+ExecStart=/usr/bin/certbot renew --noninteractive --no-random-sleep-on-renew $PRE_HOOK $POST_HOOK $RENEW_HOOK $DEPLOY_HOOK $CERTBOT_ARGS
diff --git a/certbot-renew-systemd.timer b/certbot-renew-systemd.timer
new file mode 100644
index 0000000..2795bdc
--- /dev/null
+++ b/certbot-renew-systemd.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=This is the timer to set the schedule for automated renewals
+
+[Timer]
+OnCalendar=*-*-* 00/12:00:00
+RandomizedDelaySec=12hours
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/certbot-sysconfig-certbot b/certbot-sysconfig-certbot
new file mode 100644
index 0000000..46fee28
--- /dev/null
+++ b/certbot-sysconfig-certbot
@@ -0,0 +1,48 @@
+## NOTE ##
+# If a hook is set here then it will be used for all
+# certificates and will override any per certificate
+# hook configuration in place.
+
+# Command to be run in a shell before obtaining any
+# certificates. Intended primarily for renewal, where it
+# can be used to temporarily shut down a webserver that
+# might conflict with the standalone plugin. This will
+# only be called if a certificate is actually to be
+# obtained/renewed. When renewing several certificates
+# that have identical pre-hooks, only the first will be
+# executed.
+#
+# An example to stop the MTA before updating certs would be
+# PRE_HOOK="--pre-hook 'systemctl stop postfix'"
+PRE_HOOK=""
+
+# Command to be run in a shell after attempting to
+# obtain/renew certificates. Can be used to deploy
+# renewed certificates, or to restart any servers that
+# were stopped by --pre-hook. This is only run if an
+# attempt was made to obtain/renew a certificate. If
+# multiple renewed certificates have identical post-
+# hooks, only one will be run.
+#
+# An example to restart httpd would be:
+# POST_HOOK="--post-hook 'systemctl restart httpd'"
+POST_HOOK=""
+
+# Command to be run in a shell once for each
+# successfully renewed certificate. For this command,
+# the shell variable $RENEWED_LINEAGE will point to the
+# config live subdirectory containing the new certs and
+# keys; the shell variable $RENEWED_DOMAINS will contain
+# a space-delimited list of renewed cert domains
+#
+# An example to run a script to alert each cert would be:
+# DEPLOY_HOOK="--deploy-hook /usr/local/bin/cert-notifier.sh"
+DEPLOY_HOOK=""
+
+# Any other misc arguments for the renewal
+# See certbot -h renew for full list
+#
+# An example to force renewal for certificates not due yet
+# CERTBOT_ARGS="--force-renewal"
+CERTBOT_ARGS=""
+
diff --git a/certbot.logrotate b/certbot.logrotate
new file mode 100644
index 0000000..fd99a3f
--- /dev/null
+++ b/certbot.logrotate
@@ -0,0 +1,5 @@
+/var/log/letsencrypt/*.log {
+ weekly
+ missingok
+ notifempty
+}
diff --git a/python-certbot.spec b/python-certbot.spec
new file mode 100644
index 0000000..3b9b1e6
--- /dev/null
+++ b/python-certbot.spec
@@ -0,0 +1,224 @@
+Name: python-certbot
+Version: 3.1.0
+Release: 1
+Summary: ACME client
+License: MIT and Apache-2.0
+URL: https://github.com/certbot/certbot
+Source0: https://github.com/certbot/certbot/archive/refs/tags/v%{version}.tar.gz
+Source10: certbot-renew-systemd.service
+Source11: certbot-renew-systemd.timer
+Source12: certbot-sysconfig-certbot
+Source13: certbot-cli.ini
+Source15: certbot.logrotate
+BuildArch: noarch
+
+%description
+The python3 libraries to interface with certbot.
+
+%package -n certbot
+Summary: A free, automated certificate authority client
+Requires: python3-certbot = %{version}-%{release}
+%{?systemd_requires}
+
+%description -n certbot
+certbot is a free, automated certificate authority that aims
+to lower the barriers to entry for encrypting all HTTP traffic on the internet.
+
+%package -n python3-certbot
+Summary: ACME client
+Provides: python-certbot = %{version}-%{release}
+BuildRequires: python3-devel >= 3.9
+BuildRequires: python3-setuptools
+Requires: python3-acme = %{version}-%{release}
+Requires: python3-ConfigArgParse
+Requires: python3-configobj
+Requires: python3-cryptography
+Requires: python3-distro
+Requires: python3-josepy
+Requires: python-parsedatetime
+Requires: python3-pyrfc3339
+Requires: python3-pytz
+Requires: python3-zope-component
+Requires: python3-zope-interface
+
+%description -n python3-certbot
+The python3 libraries to interface with certbot
+
+%package -n python3-acme
+Summary:ACME protocol implementation in Python
+Provides:python-acme = %{version}-%{release}
+BuildRequires: python3-devel >= 3.9
+BuildRequires: python3-setuptools
+%description -n python3-acme
+Python libraries implementing the Automatic Certificate Management Environment (ACME)protocol.it is used by the Let's Encrypt project.
+
+%package -n python3-certbot-apache
+Summary: The apache plugin for certbot
+Requires: mod_ssl
+Requires: python3-acme = %{version}-%{release}
+Requires: python3-certbot = %{version}-%{release}
+Provides: certbot-apache = %{version}-%{release}
+
+%description -n python3-certbot-apache
+Plugin for certbot that allows for automatic configuration of apache
+
+%package -n python3-certbot-nginx
+Summary: The nginx plugin for certbot
+Provides: certbot-nginx = %{version}-%{release}
+Requires: python3-acme = %{version}-%{release}
+Requires: python3-certbot = %{version}-%{release}
+
+%description -n python3-certbot-nginx
+Plugin for certbot that allows for automatic configuration of ngnix
+
+%package help
+Summary: Development documents and examples for certbot
+Provides: python3-certbot-doc = %{version}-%{release}
+%description help
+The python3 libraries to interface with certbot
+
+%prep
+%autosetup -n certbot-%{version} -p1
+
+%build
+for module in acme certbot certbot-apache certbot-nginx
+do
+ pushd $module
+ %py3_build
+ popd
+done
+
+%install
+for module in acme certbot certbot-apache certbot-nginx
+do
+ pushd $module
+ %py3_install
+ popd
+done
+
+mv %{buildroot}%{_bindir}/certbot{,-3}
+ln -s certbot-3 %{buildroot}%{_bindir}/certbot
+
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+cd ./certbot
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}/certbot; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}/certbot; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}/certbot; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}/certbot; fi
+cd ./../acme
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}/acme; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}/acme; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}/acme; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}/acme; fi
+
+install -Dm 0644 --preserve-timestamps %{S:10} %{buildroot}%{_unitdir}/certbot-renew.service
+install -Dm 0644 --preserve-timestamps %{S:11} %{buildroot}%{_unitdir}/certbot-renew.timer
+install -Dm 0644 --preserve-timestamps %{S:12} %{buildroot}%{_sysconfdir}/sysconfig/certbot
+install -Dm 0644 --preserve-timestamps %{S:13} %{buildroot}%{_sysconfdir}/letsencrypt/cli.ini
+install -Dm 0644 --preserve-timestamps %{S:15} %{buildroot}%{_sysconfdir}/logrotate.d/certbot
+# project uses old letsencrypt dir for compatibility
+install -dm 0755 %{buildroot}%{_sysconfdir}/letsencrypt
+install -dm 0755 %{buildroot}%{_sharedstatedir}/letsencrypt
+install -dm 0755 %{buildroot}%{_localstatedir}/log/letsencrypt
+
+%post -n certbot
+%systemd_post certbot-renew.timer
+
+# Remind users to start certbot-renew.timer if they need certbot to automatically renew certs
+if [ "$1" -eq 1 ] ; then
+ echo ""
+ echo "Certbot auto renewal timer is not started by default."
+ echo "Run 'systemctl start certbot-renew.timer' to enable automatic renewals."
+fi
+
+%preun -n certbot
+%systemd_preun certbot-renew.timer
+
+%postun -n certbot
+%systemd_postun certbot-renew.timer
+
+%files -n certbot
+%license LICENSE.txt
+%doc certbot/README.rst
+%{_bindir}/certbot
+%dir %{_sysconfdir}/letsencrypt
+%dir %{_sharedstatedir}/letsencrypt
+%dir %{_localstatedir}/log/letsencrypt
+%config(noreplace) %{_sysconfdir}/letsencrypt/cli.ini
+%config(noreplace) %{_sysconfdir}/sysconfig/certbot
+%config(noreplace) %{_sysconfdir}/logrotate.d/certbot
+%{_unitdir}/certbot-renew.service
+%{_unitdir}/certbot-renew.timer
+
+%files -n python3-certbot
+%license certbot/LICENSE.txt
+%doc certbot/README.rst
+%{python3_sitelib}/certbot
+%{python3_sitelib}/certbot-%{version}-py%{python3_version}.egg-info
+%{_bindir}/certbot-3
+
+%files help
+%{_docdir}/*
+
+%files -n python3-acme
+%license acme/LICENSE.txt
+%doc acme/README.rst
+%{python3_sitelib}/acme
+%{python3_sitelib}/acme-%{version}-py%{python3_version}.egg-info
+
+%files -n python3-certbot-apache
+%license certbot-apache/LICENSE.txt
+%doc certbot-apache/README.rst
+%{python3_sitelib}/certbot_apache/
+%{python3_sitelib}/certbot_apache-%{version}-py%{python3_version}.egg-info
+
+%files -n python3-certbot-nginx
+%license certbot-nginx/LICENSE.txt
+%doc certbot-nginx/README.rst
+%{python3_sitelib}/certbot_nginx/
+%{python3_sitelib}/certbot_nginx-%{version}-py%{python3_version}.egg-info
+
+%changelog
+* Wed Jan 22 2025 Funda Wang <fundawang@yeah.net> - 3.1.0-1
+- update to 3.1.0
+ * Python 3.8 support was removed.
+ * Runtime dependency on setuptools has been dropped from all Certbot components.
+
+* Sat Jan 04 2025 Funda Wang <fundawang@yeah.net> - 3.0.1-1
+- update to 3.0.1
+ * The update_symlinks command was removed.
+ * The `csr_dir` and `key_dir` attributes on
+ `certbot.configuration.NamespaceConfig` were removed.
+ * The `--manual-public-ip-logging-ok` command line flag was removed.
+ * The `--dns-route53-propagation-seconds` command line flag was removed.
+ * The `certbot_dns_route53.authenticator` module has been removed.
+ * Support for Python 3.8 was deprecated
+
+* Tue Oct 01 2024 Funda Wang <fundawang@yeah.net> - 2.11.0-1
+- Update package to version 2.11.0
+- add apache and nginx module
+- add systemd timer and logrotate conf
+
+* Fri Feb 23 2024 chendexi <chendexi@kylinos.cn> - 2.9.0-1
+- Update package to version 2.9.0
+
+* Tue Nov 21 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 2.7.4-1
+- Update package to version 2.7.4
+
+* Wed Jul 05 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 2.6.0-1
+- Update package to version 2.6.0
+
+* Fri Apr 07 2023 wangkai <13474090681@163.com> - 2.5.0-1
+- Update to 2.5.0
+
+* Fri May 20 2022 liukuo <liukuo@kylinos.cn> - 1.16.0-4
+- License compliance rectification
+
+* Fri May 06 2022 yangping <yangping69@h-partners.com> - 1.16.0-3
+- Fix build error caused by py3.10+ wildcard
+
+* Thu Aug 05 2021 xu_ping <xuping33@huawei.com> - 1.16.0-2
+- fix sync code to openEuler-20.03-LTS-SP1 %file error.
+
+* Mon Jun 28 2021 Python_Bot <Python_Bot@openeuler.org> - 1.16.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..119d0d3
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8723265f7da7c830ea22aee6e9608da9 v3.1.0.tar.gz