From 1edd7e2357dba2dbb8306d2693efc8dfb2d23ebb Mon Sep 17 00:00:00 2001 From: Kamil Páral Date: Dec 04 2018 14:06:43 +0000 Subject: Merge branch 'develop' --- diff --git a/libtaskotron.spec b/libtaskotron.spec index 23069ff..69e0d60 100644 --- a/libtaskotron.spec +++ b/libtaskotron.spec @@ -1,6 +1,6 @@ Name: libtaskotron # NOTE: if you update version, *make sure* to also update `libtaskotron/__init__.py` -Version: 0.9.3 +Version: 0.9.4 Release: 1%{?dist} Summary: Taskotron Support Library @@ -13,7 +13,9 @@ BuildArch: noarch %description Libtaskotron is a support library for running taskotron tasks. + # ********* python2-libtaskotron ********* + %if 0%{?fedora} <= 29 %package -n python2-libtaskotron Summary: libtaskotron python2 libraries @@ -21,8 +23,8 @@ Summary: libtaskotron python2 libraries Requires: ansible Requires: createrepo_c Requires: dnf -Requires: python2-bodhi-client Requires: python2-configparser +Requires: python2-fedora Requires: python2-hawkey Requires: python2-jinja2 Requires: python2-koji @@ -37,9 +39,9 @@ Requires: python2-xunitparser # used by 'synchronize' task in ansible Requires: rsync -BuildRequires: python2-bodhi-client BuildRequires: python2-configparser BuildRequires: python2-devel +BuildRequires: python2-fedora BuildRequires: python2-hawkey BuildRequires: python2-koji BuildRequires: python2-mock @@ -56,12 +58,16 @@ BuildRequires: python2-sphinx_rtd_theme BuildRequires: python2-testcloud BuildRequires: python2-xunitparser - %description -n python2-libtaskotron Libtaskotron libraries built for Python 2. + +%pre -n python2-libtaskotron +getent group taskotron >/dev/null || groupadd taskotron %endif + # ********* python3-libtaskotron ********* + %package -n python3-libtaskotron Summary: libtaskotron python3 libraries @@ -72,8 +78,8 @@ Obsoletes: python2-libtaskotron <= %{version}-%{release} Requires: ansible Requires: createrepo_c Requires: dnf -Requires: python3-bodhi-client Requires: python3-configparser +Requires: python3-fedora Requires: python3-hawkey Requires: python3-jinja2 Requires: python3-koji @@ -93,9 +99,9 @@ Requires: python3-PyYAML Requires: python3-pyyaml %endif -BuildRequires: python3-bodhi-client BuildRequires: python3-configparser BuildRequires: python3-devel +BuildRequires: python3-fedora BuildRequires: python3-hawkey BuildRequires: python3-koji BuildRequires: python3-mock @@ -120,6 +126,10 @@ BuildRequires: python3-pyyaml %description -n python3-libtaskotron Libtaskotron libraries built for Python 3. +%pre -n python3-libtaskotron +getent group taskotron >/dev/null || groupadd taskotron + + # ****** taskotron-runner ****** %package -n taskotron-runner @@ -156,10 +166,8 @@ Requires: python3-testcloud %description -n taskotron-runner libtaskotron's runtask binary which is used to execute taskotron tasks. -# ************************************* -%pre -getent group taskotron >/dev/null || groupadd taskotron +# ************************************* %prep %setup -q @@ -264,6 +272,13 @@ cp -a data/* %{buildroot}%{_datarootdir}/libtaskotron %license LICENSE %changelog +* Tue Dec 04 2018 Kamil Páral - 0.9.4-1 +- revert to old bodhi library +- fix group creation during rpm install + +* Tue Dec 04 2018 Kamil Páral - 0.9.3-2 +- add 'pre' section to libraries, the generic one is not executed for them + * Sun Dec 02 2018 Frantisek Zatloukal - 0.9.3-1 - yumrepoinfo.conf: Fedora 27 is EOL - spec: replace python-fedora with python-bodhi-client diff --git a/libtaskotron/__init__.py b/libtaskotron/__init__.py index 3ccd1f9..778fd67 100644 --- a/libtaskotron/__init__.py +++ b/libtaskotron/__init__.py @@ -4,4 +4,4 @@ # See the LICENSE file for more details on Licensing from __future__ import absolute_import -__version__ = '0.9.3' +__version__ = '0.9.4' diff --git a/libtaskotron/ext/fedora/bodhi_utils.py b/libtaskotron/ext/fedora/bodhi_utils.py index 4272604..9df8ff9 100644 --- a/libtaskotron/ext/fedora/bodhi_utils.py +++ b/libtaskotron/ext/fedora/bodhi_utils.py @@ -6,7 +6,7 @@ '''Utility functions for dealing with Bodhi''' from __future__ import absolute_import -import bodhi.client.bindings +import fedora.client from libtaskotron import config from libtaskotron import exceptions as exc @@ -20,7 +20,7 @@ from . import rpm_utils class BodhiUtils(object): '''Helper Bodhi methods. - :ivar bodhi.client.bindings.BodhiClient client: Bodhi client instance + :ivar fedora.client.Bodhi2Client client: Bodhi2 client instance ''' #: How many requests to make in a single call. The maximum page limit is @@ -38,7 +38,7 @@ class BodhiUtils(object): self.config = config.get_config() if not client: - self.client = bodhi.client.bindings.BodhiClient(staging=self.config.bodhi_staging) + self.client = fedora.client.bodhi.Bodhi2Client(staging=self.config.bodhi_staging) log.debug('Created Bodhi client to: %s', self.client.base_url) # automatically retry failed requests (HTTP 5xx and similar) self.client.retries = 10 diff --git a/requirements.txt b/requirements.txt index 3772c04..009caa6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ # libtaskotron ansible >= 2.3 -bodhi-client >= 3.10 +python-fedora >= 0.8.0 configparser >= 3.5.0b2 Jinja2 >= 2.8 munch >= 2.0.2 diff --git a/testing/test_bodhi_utils.py b/testing/test_bodhi_utils.py index c713c47..219eb33 100644 --- a/testing/test_bodhi_utils.py +++ b/testing/test_bodhi_utils.py @@ -9,7 +9,7 @@ import pytest import mock from munch import Munch -import bodhi.client.bindings +import fedora.client.bodhi from libtaskotron.ext.fedora import bodhi_utils from libtaskotron import exceptions as exc @@ -32,8 +32,8 @@ class TestBodhiUtils(): stg_url = bu_stg.client.base_url assert prod_url != stg_url - assert prod_url == bodhi.client.bindings.BASE_URL - assert stg_url == bodhi.client.bindings.STG_BASE_URL + assert prod_url == fedora.client.bodhi.BODHI2_BASE_URL + assert stg_url == fedora.client.bodhi.BODHI2_STG_BASE_URL class TestGetUpdate():