From 27ce825ab45821b06b36d81b35f16488e6f9147f Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Jun 25 2018 13:19:28 +0000 Subject: New upstream release 0.6.0 --- diff --git a/.gitignore b/.gitignore index bfd1135..d8b3c1a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /custodia-0.3.1.tar.gz /custodia-0.3.1.tar.gz.sha512sum.txt /custodia-0.5.0.tar.gz +/custodia-0.6.0.tar.gz diff --git a/custodia.spec b/custodia.spec index 8d2ef14..475b0ef 100644 --- a/custodia.spec +++ b/custodia.spec @@ -1,26 +1,22 @@ -%if 0%{?fedora} -%global with_python3 1 -%endif - -# Workaround for python-etcd issue on PPC64. Although it's a noarch package -# it depends on etcd for testing. Go does not support PPC64 yet. -%ifarch ppc64 -%global with_etcd 0 +%if 0%{?fedora} || 0%{?rhel} > 7 +# Enable python3 build by default +%bcond_without python3 %else -%global with_etcd 1 +%bcond_with python3 %endif -# FreeIPA up to 4.4.4 are not compatible with custodia because the custodia -# script now runs under Python 3. FreeIPA 4.4.5 and 4.4.4-2 on F26 are fixed. -%if 0%{?fedora} >= 26 -%global ipa_conflict 4.4.4-2 +%if 0%{?rhel} > 7 +# Disable python2 build by default +%bcond_with python2 %else -%global ipa_conflict 4.4.5 +%bcond_without python2 %endif +%{!?python3_pkgversion:%global python3_pkgversion 3} + Name: custodia -Version: 0.5.0 -Release: 13%{?dist} +Version: 0.6.0 +Release: 1%{?dist} Summary: A service to manage, retrieve and store secrets for other processes License: GPLv3+ @@ -34,19 +30,19 @@ Source5: custodia.tmpfiles.conf BuildArch: noarch BuildRequires: systemd + +%if %{?with_python2} BuildRequires: python2-devel BuildRequires: python2-jwcrypto >= 0.4.2 BuildRequires: python2-requests BuildRequires: python2-setuptools >= 18 BuildRequires: python2-coverage BuildRequires: python2-pytest -%if %{?with_etcd} -BuildRequires: python2-python-etcd -%endif BuildRequires: python2-docutils BuildRequires: python2-configparser BuildRequires: python2-systemd BuildRequires: tox >= 2.3.1 +%endif %if 0%{?with_python3} BuildRequires: python%{python3_pkgversion}-devel @@ -55,9 +51,6 @@ BuildRequires: python%{python3_pkgversion}-requests BuildRequires: python%{python3_pkgversion}-setuptools > 18 BuildRequires: python%{python3_pkgversion}-coverage BuildRequires: python%{python3_pkgversion}-pytest -%if %{?with_etcd} -BuildRequires: python%{python3_pkgversion}-python-etcd -%endif BuildRequires: python%{python3_pkgversion}-docutils BuildRequires: python%{python3_pkgversion}-systemd %endif @@ -72,9 +65,6 @@ Requires(preun): systemd-units Requires(postun): systemd-units Requires(post): systemd-units -Conflicts: freeipa-server-common < %{ipa_conflict} -Conflicts: ipa-server-common < %{ipa_conflict} - %global overview \ Custodia is a Secrets Service Provider, it stores or proxies access to \ @@ -93,6 +83,7 @@ A service to manage, retrieve and store secrets for other processes %{overview} +%if 0%{?with_python2} %package -n python2-custodia Summary: Sub-package with python2 custodia modules %{?python_provide:%python_provide python2-%{name}} @@ -101,25 +92,13 @@ Requires: python2-jwcrypto >= 0.4.2 Requires: python2-requests Requires: python2-setuptools Requires: python2-systemd -Conflicts: python2-ipalib < %{ipa_conflict} +Conflicts: python2-custodia-extra < %{version} %description -n python2-custodia Sub-package with python custodia modules %{overview} - -%if %{?with_etcd} -%package -n python2-custodia-extra -Summary: Sub-package with python2 custodia extra modules -Requires: python2-python-etcd -Requires: python2-custodia = %{version}-%{release} - -%description -n python2-custodia-extra -Sub-package with python2 custodia extra modules (etcdstore) - -%{overview} - -%endif # with_etcd +%endif %if 0%{?with_python3} %package -n python%{python3_pkgversion}-custodia @@ -129,25 +108,13 @@ Requires: python%{python3_pkgversion}-jwcrypto >= 0.4.2 Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-setuptools Requires: python%{python3_pkgversion}-systemd -Conflicts: python%{python3_pkgversion}-ipalib < %{ipa_conflict} +Conflicts: python%{python3_pkgversion}-custodia-extra < %{version} %description -n python%{python3_pkgversion}-custodia Sub-package with python custodia modules %{overview} -%if %{?with_etcd} -%package -n python%{python3_pkgversion}-custodia-extra -Summary: Sub-package with python3 custodia extra modules -Requires: python%{python3_pkgversion}-python-etcd -Requires: python%{python3_pkgversion}-custodia = %{version}-%{release} - -%description -n python%{python3_pkgversion}-custodia-extra -Sub-package with python3 custodia extra modules (etcdstore) - -%{overview} - -%endif # with_etcd %endif # with_python3 @@ -156,7 +123,9 @@ Sub-package with python3 custodia extra modules (etcdstore) %build +%if 0%{?with_python2} %py2_build +%endif %if 0%{?with_python3} %py3_build %endif @@ -171,9 +140,15 @@ export PIP_NO_DEPS=yes # may pick up this package from global site-packages instead of source dist. export PIP_IGNORE_INSTALLED=yes +%if 0%{?with_python2} tox --sitepackages -e py%{python2_version_nodots} -- --skip-servertests +%endif + %if 0%{?with_python3} -tox --sitepackages -e py%{python3_version_nodots} -- --skip-servertests +# Test custodia in a virtual environment +%{__python3} -m venv --system-site-packages testenv +testenv/bin/pip install . +testenv/bin/python -m pytest --capture=no --strict --skip-servertests %endif @@ -189,17 +164,12 @@ mkdir -p %{buildroot}/%{_localstatedir}/lib/custodia mkdir -p %{buildroot}/%{_localstatedir}/log/custodia mkdir -p %{buildroot}/%{_localstatedir}/run/custodia +%if 0%{?with_python2} %py2_install mv %{buildroot}/%{_bindir}/custodia %{buildroot}/%{_sbindir}/custodia cp %{buildroot}/%{_sbindir}/custodia %{buildroot}/%{_sbindir}/custodia-2 cp %{buildroot}/%{_bindir}/custodia-cli %{buildroot}/%{_bindir}/custodia-cli-2 -install -m 644 -t "%{buildroot}/%{_mandir}/man7" man/custodia.7 -install -m 644 -t "%{buildroot}/%{_defaultdocdir}/custodia" README API.md -install -m 644 -t "%{buildroot}/%{_defaultdocdir}/custodia/examples" custodia.conf -install -m 600 %{SOURCE2} %{buildroot}%{_sysconfdir}/custodia -install -m 644 %{SOURCE3} %{buildroot}%{_unitdir} -install -m 644 %{SOURCE4} %{buildroot}%{_unitdir} -install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/custodia.conf +%endif %if 0%{?with_python3} # overrides /usr/bin/custodia-cli and /usr/sbin/custodia with Python 3 shebang @@ -209,6 +179,15 @@ cp %{buildroot}/%{_sbindir}/custodia %{buildroot}/%{_sbindir}/custodia-3 cp %{buildroot}/%{_bindir}/custodia-cli %{buildroot}/%{_bindir}/custodia-cli-3 %endif +install -m 644 -t "%{buildroot}/%{_mandir}/man7" man/custodia.7 +install -m 644 -t "%{buildroot}/%{_defaultdocdir}/custodia" README API.md +install -m 644 -t "%{buildroot}/%{_defaultdocdir}/custodia/examples" custodia.conf +install -m 600 %{SOURCE2} %{buildroot}%{_sysconfdir}/custodia +install -m 644 %{SOURCE3} %{buildroot}%{_unitdir} +install -m 644 %{SOURCE4} %{buildroot}%{_unitdir} +install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/custodia.conf + + %pre getent group custodia >/dev/null || groupadd -r custodia @@ -249,42 +228,35 @@ exit 0 %dir %attr(0755,custodia,custodia) %{_localstatedir}/run/custodia %{_tmpfilesdir}/custodia.conf +%if 0%{?with_python2} %files -n python2-custodia %license LICENSE -%exclude %{python2_sitelib}/custodia/store/etcdstore.py* %{python2_sitelib}/%{name} %{python2_sitelib}/%{name}-%{version}-py%{python2_version}.egg-info %{python2_sitelib}/%{name}-%{version}-py%{python2_version}-nspkg.pth %{_sbindir}/custodia-2 %{_bindir}/custodia-cli-2 - -%if %{?with_etcd} -%files -n python2-custodia-extra -%license LICENSE -%{python2_sitelib}/custodia/store/etcdstore.py* -%endif # with_etcd +%endif %if 0%{?with_python3} %files -n python%{python3_pkgversion}-custodia %license LICENSE -%exclude %{python3_sitelib}/custodia/store/etcdstore.py -%exclude %{python3_sitelib}/custodia/store/__pycache__/etcdstore.* %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/%{name}-%{version}-py%{python3_version}-nspkg.pth %{_sbindir}/custodia-3 %{_bindir}/custodia-cli-3 -%if %{?with_etcd} -%files -n python%{python3_pkgversion}-custodia-extra -%license LICENSE -%{python3_sitelib}/custodia/store/etcdstore.py -%{python3_sitelib}/custodia/store/__pycache__/etcdstore.* -%endif # with_etcd %endif # with_python3 %changelog +* Mon Jun 25 2018 Christian Heimes - 0.6.0-1 +- New upstream release 0.6.0 +- Remove etcd support +- Remove unnecesary conflict with old FreeIPA +- Make Python 2 optional + * Tue Jun 19 2018 Miro HronĨok - 0.5.0-13 - Rebuilt for Python 3.7 diff --git a/sources b/sources index 4ac683d..6ed26a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (custodia-0.5.0.tar.gz) = 7e92bf30d9e09fb45efb85c2133adb608b3b992d20c58488e8ae2679d34c1dc3225935471bd7e5c03a7afcad8329cfa840c6d5cc7448684c77cb80758c6681d0 +SHA512 (custodia-0.6.0.tar.gz) = 1938f4020240a759963b888bc45fa67969da712675e20360d9ad6e2e420da40a95d49e93a72e2278a21154a910eb702b5c45c184879c472e32fbf79a3f88ca21