Sisyphus repository
Last update: 6 april 2020 | SRPMs: 17564 | Visits: 17839836
en ru br
ALT Linux repos

Group :: Networking/Other
RPM: certbot

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# TODO: switch to python3
# TODO: botocore

%def_with plugins

Name: certbot
Version: 1.3.0
Release: alt1

Summary: A free, automated certificate authority client

License: ASL 2.0
Group: Networking/Other

Packager: Vitaly Lipatov <lav at>

# #Source-url:

# Source-url:
Source: %name-%version.tar

BuildArch: noarch
BuildRequires: python3-devel python3-module-setuptools
BuildRequires(pre): rpm-build-python3 rpm-build-intro

%define acme_version %version

Requires: python3-module-zope.component
Requires: python3-module-zope.interface >= 4.1.0
Requires: python3-module-pyasn1 >= 0.1.8
Requires: python3-module-cffi >= 1.4.2
# missed by autoreq
Requires: python3-module-future

#Provides: python-module-%name = %EVR

#Obsoletes: python-module-%name < %EVR

# Due Prior to Python 2.7.9 the stdlib SSL module did not allow a user to configure

# See /usr/lib/python2.7/site-packages/acme/
#Requires: python-base >= 2.7.9

# Required for documentation

#BuildRequires: python-sphinx
#BuildRequires: python-sphinx_rtd_theme
#BuildRequires: python-repoze-sphinx-autointerface
#BuildRequires: python-sphinxcontrib-programoutput

%py3_use acme >= %acme_version
%py3_use cryptography >= 1.2.3
%py3_use distro >= 1.0.1
%py3_use josepy >= 1.1.0
%py3_use parsedatetime >= 1.3

Provides: letsencrypt = %version
Obsoletes: letsencrypt

%define certbotdir %_datadir/%name
#add_python_req_skip certbot
%py3_provides certbot


%add_python3_path %certbotdir
%allow_python3_import_path %certbotdir

#add_python3_lib_path %certbotdir/certbot_nginx

#add_python3_lib_path %certbotdir/certbot_apache
#add_python3_lib_path %certbotdir/certbot_dns-rfc2136
#add_python3_lib_path %certbotdir/certbot_dns-route53
#add_python3_lib_path %certbotdir/certbot_postfix

Let's Encrypt is a free, automated certificate authority that aims
to lower the barriers to entry for encrypting all HTTP traffic on the internet.

# TODO: move to /usr/share/%name

%package -n python3-module-%name
Group: Networking/Other
Requires: python3-module-configargparse >= 0.10.0
# already in core python
#Requires: python-module-argparse
Requires: python3-module-psutil >= 2.1.0
Requires: python3-module-acme >= %acme_version
#Recommends: letsencrypt-doc
Summary: Python 3 libraries used by %name

Provides: python3-module-letsencrypt = %version
#Obsoletes: python-module-letsencrypt

%description -n python3-module-%name
The python2 libraries to interface with %name.


%if_with plugins
%package apache
Group: Networking/Other
Summary: Certbot Apache plugin
AutoProv: no
Requires: %name = %EVR
# ALT bug 37004
Requires: python3-module-augeas

%description apache
Certbot Apache plugin.

%package nginx
Group: Networking/Other
Summary: Certbot nginx plugin
AutoProv: no
Requires: %name = %EVR

%description nginx
Certbot nginx plugin.

%package postfix
Group: Networking/Other
Summary: Certbot postfix plugin
AutoProv: no
Requires: %name = %EVR

%description postfix
Certbot postfix plugin.

%package dns_rfc2136
Group: Networking/Other
Summary: Certbot dns_rfc2136 plugin
AutoProv: no
Requires: %name = %EVR

%description dns_rfc2136
Certbot dns-rfc2136 plugin.

%package dns_route53
Group: Networking/Other
Summary: Certbot dns_route53 plugin
AutoProv: no
Requires: %name = %EVR

%description dns_route53
Certbot dns_route53 plugin.



cd certbot

cd ../certbot-apache
cd ../certbot-nginx
#cd ../certbot-postfix
cd ../certbot-dns-route53
cd ../certbot-dns-rfc2136

cd certbot
%python3_install --install-purelib=%certbotdir

cd ../certbot-apache
%python3_install --install-purelib=%certbotdir
cd ../certbot-nginx
%python3_install --install-purelib=%certbotdir
#cd ../certbot-postfix
#python_install --install-purelib=%certbotdir
cd ../certbot-dns-route53
%python3_install --install-purelib=%certbotdir
cd ../certbot-dns-rfc2136
%python3_install --install-purelib=%certbotdir
cd -

# TODO: remove compat dirs

mkdir -p %buildroot%_sysconfdir/letsencrypt
ln -s letsencrypt %buildroot%_sysconfdir/%name
mkdir -p %buildroot%_sharedstatedir/letsencrypt
ln -s letsencrypt %buildroot%_sharedstatedir/%name
mkdir -p %buildroot%_logdir/letsencrypt
ln -s letsencrypt %buildroot%_logdir/%name

ln -s %name %buildroot%_bindir/letsencrypt

rm -rfv %buildroot%certbotdir/certbot*/tests/
rm -rfv %buildroot%certbotdir/certbot/*/*_test*
rm -rfv %buildroot%certbotdir/certbot/*_test*
rm -rfv %buildroot%certbotdir/*/*_test*
rm -rfv %buildroot%certbotdir/certbot/certbot_compatibility_test/

#  it is better do not require argparse on python >= 2.7.

#__subst "s|^argparse$||" %buildroot%python_sitelibdir/%name-%{version}*.egg-info/requires.txt

%__subst 's|^__requires__.*|\
# ALT: use own package dir\
import site\
site.addsitedir("%certbotdir")|' %buildroot%_bindir/%name


%doc LICENSE.txt
%doc README.rst
#%doc %attr(0644,root,root) %_man1dir/%{name}*
%dir %_sysconfdir/%name/
%dir %_sharedstatedir/%name/
%dir %_logdir/%name/
# compats
%dir %_sysconfdir/letsencrypt/
%dir %_sharedstatedir/letsencrypt/
%dir %_logdir/letsencrypt/

#files -n python-module-%name

#doc LICENSE.txt
%dir %certbotdir/

%if_with plugins
%files nginx
%doc LICENSE.txt

%files apache
%doc LICENSE.txt

#files postfix

#doc LICENSE.txt

%files dns_rfc2136
%doc LICENSE.txt

%files dns_route53
%doc LICENSE.txt


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin