#1 Update to 1.6.28
Merged 6 years ago by maxamillion. Opened 6 years ago by vrutkovs.
rpms/ vrutkovs/atomic-reactor master  into  master

file modified
+1
@@ -16,3 +16,4 @@ 

  /atomic-reactor-19330c92eff3f7086a52500207881ab5e4234b2f.tar.gz

  /atomic-reactor-e6fb7422e37dae88d436218c55e89faeb33fd41b.tar.gz

  /atomic-reactor-71ff262252fa4d7937ccf47523f8ffdc55af6841.tar.gz

+ /atomic-reactor-3ea098ef730d18b7b533f1043f58f07bfd9f58ea.tar.gz

@@ -1,331 +0,0 @@ 

- commit 2014a746753e7f4133e1d13516c4cbadbdd424e8

- Author: Tim Waugh <twaugh@redhat.com>

- Date:   Fri Jul 14 10:17:43 2017 +0100

- 

-     Add minimal support for docker-py-2.x module

-     

-     Signed-off-by: Tim Waugh <twaugh@redhat.com>

- 

- diff --git a/atomic_reactor/core.py b/atomic_reactor/core.py

- index ffea392..c3d413d 100644

- --- a/atomic_reactor/core.py

- +++ b/atomic_reactor/core.py

- @@ -31,7 +31,6 @@ import requests

-  

-  import docker

-  from docker.errors import APIError

- -from docker.utils import create_host_config

-  

-  from atomic_reactor.constants import CONTAINER_SHARE_PATH, CONTAINER_SHARE_SOURCE_SUBDIR,\

-          BUILD_JSON, DOCKER_SOCKET_PATH

- @@ -163,11 +162,9 @@ class BuildContainerFactory(object):

-  

-          container_id = self.tasker.run(

-              ImageName.parse(build_image),

- -            create_kwargs={'volumes': [DOCKER_SOCKET_PATH, json_args_path],

- -                           'host_config': create_host_config(

- -                               binds=volume_bindings,

- -                               privileged=True)

- -                           }

- +            create_kwargs={'volumes': [DOCKER_SOCKET_PATH, json_args_path]},

- +            volume_bindings=volume_bindings,

- +            privileged=True,

-          )

-  

-          return container_id

- @@ -206,11 +203,9 @@ class BuildContainerFactory(object):

-  

-          container_id = self.tasker.run(

-              ImageName.parse(build_image),

- -            create_kwargs={'volumes': [json_args_path],

- -                           'host_config': create_host_config(

- -                               binds=volume_bindings,

- -                               privileged=True)

- -                           }

- +            create_kwargs={'volumes': [json_args_path]},

- +            volume_bindings=volume_bindings,

- +            privileged=True,

-          )

-  

-          return container_id

- @@ -226,7 +221,7 @@ class DockerTasker(LastLogger):

-          """

-          super(DockerTasker, self).__init__(**kwargs)

-  

- -        client_kwargs = {}

- +        client_kwargs = {'timeout': timeout}

-          if base_url:

-              client_kwargs['base_url'] = base_url

-          elif os.environ.get('DOCKER_CONNECTION'):

- @@ -235,7 +230,12 @@ class DockerTasker(LastLogger):

-          if hasattr(docker, 'AutoVersionClient'):

-              client_kwargs['version'] = 'auto'

-  

- -        self.d = docker.Client(timeout=timeout, **client_kwargs)

- +        try:

- +            # docker-py 2.x

- +            self.d = docker.APIClient(**client_kwargs)

- +        except AttributeError:

- +            # docker-py 1.x

- +            self.d = docker.Client(**client_kwargs)

-  

-      def build_image_from_path(self, path, image, stream=False, use_cache=False, remove_im=True):

-          """

- @@ -301,7 +301,8 @@ class DockerTasker(LastLogger):

-          logger.info("build finished")

-          return response

-  

- -    def run(self, image, command=None, create_kwargs=None, start_kwargs=None):

- +    def run(self, image, command=None, create_kwargs=None, start_kwargs=None,

- +            volume_bindings=None, privileged=None):

-          """

-          create container from provided image and start it

-  

- @@ -317,6 +318,17 @@ class DockerTasker(LastLogger):

-          """

-          logger.info("creating container from image '%s' and running it", image)

-          create_kwargs = create_kwargs or {}

- +

- +        if 'host_config' not in create_kwargs:

- +            conf = {}

- +            if volume_bindings is not None:

- +                conf['binds'] = volume_bindings

- +

- +            if privileged is not None:

- +                conf['privileged'] = privileged

- +

- +            create_kwargs['host_config'] = self.d.create_host_config(**conf)

- +

-          start_kwargs = start_kwargs or {}

-          logger.debug("image = '%s', command = '%s', create_kwargs = '%s', start_kwargs = '%s'",

-                       image, command, create_kwargs, start_kwargs)

- diff --git a/tests/README b/tests/README

- index f59150b..f9d4a29 100644

- --- a/tests/README

- +++ b/tests/README

- @@ -3,7 +3,7 @@ Requirements: see requirements.txt

-  How to run:

-  $ py.test -v

-  

- -By default all docker.Client methods are mocked, so you don't need docker to run these tests.

- +By default all docker.APIClient methods are mocked, so you don't need docker to run these tests.

-  If you want to run 'integration' tests, i.e. test with running docker instance, you need:

-  $ yum install docker docker-registry

-  $ systemctl start docker docker-registry

- diff --git a/tests/docker_mock.py b/tests/docker_mock.py

- index 367924d..0987bda 100644

- --- a/tests/docker_mock.py

- +++ b/tests/docker_mock.py

- @@ -270,7 +270,7 @@ def mock_docker(build_should_fail=False,

-                  push_should_fail=False,

-                  build_should_fail_generator=False):

-      """

- -    mock all used docker.Client methods

- +    mock all used docker.APIClient methods

-  

-      :param build_should_fail: True == build() log will contain error

-      :param inspect_should_fail: True == inspect_image() will raise docker.errors.NotFound

- @@ -291,11 +291,14 @@ def mock_docker(build_should_fail=False,

-      else:

-          build_result = iter(mock_build_logs)

-  

- -    flexmock(docker.Client, build=lambda **kwargs: build_result)

- -    flexmock(docker.Client, commit=lambda cid, **kwargs: mock_containers[0])

- -    flexmock(docker.Client, containers=lambda **kwargs: mock_containers)

- -    flexmock(docker.Client, create_container=lambda img, **kwargs: mock_containers[0])

- -    flexmock(docker.Client, images=lambda **kwargs: [mock_image])

- +    if not hasattr(docker, 'APIClient'):

- +        setattr(docker, 'APIClient', docker.Client)

- +

- +    flexmock(docker.APIClient, build=lambda **kwargs: build_result)

- +    flexmock(docker.APIClient, commit=lambda cid, **kwargs: mock_containers[0])

- +    flexmock(docker.APIClient, containers=lambda **kwargs: mock_containers)

- +    flexmock(docker.APIClient, create_container=lambda img, **kwargs: mock_containers[0])

- +    flexmock(docker.APIClient, images=lambda **kwargs: [mock_image])

-  

-      def mock_inspect_image(image_id):

-          if inspect_should_fail:

- @@ -303,21 +306,21 @@ def mock_docker(build_should_fail=False,

-          else:

-              return mock_image

-  

- -    flexmock(docker.Client, inspect_image=mock_inspect_image)

- -    flexmock(docker.Client, inspect_container=lambda im_id: mock_inspect_container)

- -    flexmock(docker.Client, logs=lambda cid, **kwargs: iter([mock_logs]) if kwargs.get('stream')

- +    flexmock(docker.APIClient, inspect_image=mock_inspect_image)

- +    flexmock(docker.APIClient, inspect_container=lambda im_id: mock_inspect_container)

- +    flexmock(docker.APIClient, logs=lambda cid, **kwargs: iter([mock_logs]) if kwargs.get('stream')

-               else mock_logs)

- -    flexmock(docker.Client, pull=lambda img, **kwargs: iter(mock_pull_logs))

- -    flexmock(docker.Client, push=lambda iid, **kwargs: iter(push_result))

- -    flexmock(docker.Client, remove_container=lambda cid, **kwargs: None)

- -    flexmock(docker.Client, remove_image=lambda iid, **kwargs: None)

- -    flexmock(docker.Client, start=lambda cid, **kwargs: None)

- -    flexmock(docker.Client, tag=lambda img, rep, **kwargs: True)

- -    flexmock(docker.Client, wait=lambda cid: 1 if wait_should_fail else 0)

- -    flexmock(docker.Client, version=lambda **kwargs: mock_version)

- -    flexmock(docker.Client, info=lambda **kwargs: mock_info)

- -    flexmock(docker.Client, import_image_from_data=lambda url: mock_import_image)

- -    flexmock(docker.Client, import_image_from_stream=lambda url: mock_import_image)

- +    flexmock(docker.APIClient, pull=lambda img, **kwargs: iter(mock_pull_logs))

- +    flexmock(docker.APIClient, push=lambda iid, **kwargs: iter(push_result))

- +    flexmock(docker.APIClient, remove_container=lambda cid, **kwargs: None)

- +    flexmock(docker.APIClient, remove_image=lambda iid, **kwargs: None)

- +    flexmock(docker.APIClient, start=lambda cid, **kwargs: None)

- +    flexmock(docker.APIClient, tag=lambda img, rep, **kwargs: True)

- +    flexmock(docker.APIClient, wait=lambda cid: 1 if wait_should_fail else 0)

- +    flexmock(docker.APIClient, version=lambda **kwargs: mock_version)

- +    flexmock(docker.APIClient, info=lambda **kwargs: mock_info)

- +    flexmock(docker.APIClient, import_image_from_data=lambda url: mock_import_image)

- +    flexmock(docker.APIClient, import_image_from_stream=lambda url: mock_import_image)

-  

-      class GetImageResult(object):

-          data = b''

- @@ -334,7 +337,7 @@ def mock_docker(build_should_fail=False,

-          def __exit__(self, tp, val, tb):

-              self.fp.close()

-  

- -    flexmock(docker.Client, get_image=lambda img, **kwargs: GetImageResult())

- +    flexmock(docker.APIClient, get_image=lambda img, **kwargs: GetImageResult())

-      flexmock(os.path, exists=lambda p: True if p == DOCKER_SOCKET_PATH else old_ope(p))

-  

-      def remove_volume(volume_name):

- @@ -346,24 +349,27 @@ def mock_docker(build_should_fail=False,

-              raise docker.errors.APIError("failed to remove volume %s" % volume_name, response)

-          return None

-  

- -    flexmock(docker.Client, remove_volume=lambda iid, **kwargs: remove_volume(iid))

- +    flexmock(docker.APIClient, remove_volume=lambda iid, **kwargs: remove_volume(iid))

-  

-      for method, args in should_raise_error.items():

-          response = flexmock(content="abc", status_code=123)

-          if args:

- -            flexmock(docker.Client).should_receive(method).with_args(*args).and_raise(

- -                docker.errors.APIError, "xyz", response)

- +            (flexmock(docker.APIClient)

- +             .should_receive(method)

- +             .with_args(*args).and_raise(docker.errors.APIError, "xyz",

- +                                         response))

-          else:

- -            flexmock(docker.Client).should_receive(method).and_raise(docker.errors.APIError, "xyz",

- -                                                                     response)

- +            (flexmock(docker.APIClient)

- +             .should_receive(method)

- +             .and_raise(docker.errors.APIError, "xyz", response))

-  

-      if remember_images:

-          global mock_images

-          mock_images = [mock_image]

-  

- -        flexmock(docker.Client, inspect_image=_mock_inspect)

- -        flexmock(docker.Client, pull=_mock_pull)

- -        flexmock(docker.Client, remove_image=_mock_remove_image)

- -        flexmock(docker.Client, tag=_mock_tag)

- +        flexmock(docker.APIClient, inspect_image=_mock_inspect)

- +        flexmock(docker.APIClient, pull=_mock_pull)

- +        flexmock(docker.APIClient, remove_image=_mock_remove_image)

- +        flexmock(docker.APIClient, tag=_mock_tag)

-  

- -    flexmock(docker.Client, _retrieve_server_version=lambda: '1.20')

- +    flexmock(docker.APIClient, _retrieve_server_version=lambda: '1.20')

- diff --git a/tests/plugins/test_rpmqa.py b/tests/plugins/test_rpmqa.py

- index ba5cbc5..fe7afe8 100644

- --- a/tests/plugins/test_rpmqa.py

- +++ b/tests/plugins/test_rpmqa.py

- @@ -69,7 +69,7 @@ def test_rpmqa_plugin(remove_container_error, ignore_autogenerated):

-      setattr(workflow.builder.source, 'dockerfile_path', "/non/existent")

-      setattr(workflow.builder.source, 'path', "/non/existent")

-  

- -    flexmock(docker.Client, logs=mock_logs)

- +    flexmock(docker.APIClient, logs=mock_logs)

-      runner = PostBuildPluginsRunner(

-          tasker,

-          workflow,

- @@ -95,7 +95,8 @@ def test_rpmqa_plugin_exception(docker_tasker):  # noqa

-      setattr(workflow.builder.source, 'dockerfile_path', "/non/existent")

-      setattr(workflow.builder.source, 'path', "/non/existent")

-  

- -    flexmock(docker.Client, logs=mock_logs_raise)

- +    mock_docker()

- +    flexmock(docker.APIClient, logs=mock_logs_raise)

-      runner = PostBuildPluginsRunner(docker_tasker, workflow,

-                                      [{"name": PostBuildRPMqaPlugin.key,

-                                        "args": {'image_id': TEST_IMAGE}}])

- diff --git a/tests/plugins/test_tag_and_push.py b/tests/plugins/test_tag_and_push.py

- index 2e5b773..9fce57c 100644

- --- a/tests/plugins/test_tag_and_push.py

- +++ b/tests/plugins/test_tag_and_push.py

- @@ -103,7 +103,7 @@ def test_tag_and_push_plugin(

-  

-      if MOCK:

-          mock_docker()

- -        flexmock(docker.Client, push=lambda iid, **kwargs: iter(logs),

- +        flexmock(docker.APIClient, push=lambda iid, **kwargs: iter(logs),

-                   login=lambda username, registry, dockercfg_path: {'Status': 'Login Succeeded'})

-  

-      tasker = DockerTasker()

- diff --git a/tests/test_tasker.py b/tests/test_tasker.py

- index 8978d0c..db0423d 100644

- --- a/tests/test_tasker.py

- +++ b/tests/test_tasker.py

- @@ -327,12 +327,45 @@ def test_get_version():

-      (60, 60),

-  ])

-  def test_timeout(timeout, expected_timeout):

- -    (flexmock(docker.Client)

- +    if not hasattr(docker, 'APIClient'):

- +        setattr(docker, 'APIClient', docker.Client)

- +

- +    expected_kwargs = {

- +        'timeout': expected_timeout,

- +    }

- +    if hasattr(docker, 'AutoVersionClient'):

- +        expected_kwargs['version'] = 'auto'

- +

- +    (flexmock(docker.APIClient)

-          .should_receive('__init__')

- -        .with_args(version=str, timeout=expected_timeout))

- +        .with_args(**expected_kwargs))

-  

-      kwargs = {}

-      if timeout is not None:

-          kwargs['timeout'] = timeout

-  

-      DockerTasker(**kwargs)

- +

- +

- +def test_docker2():

- +    class MockClient(object):

- +        def __init__(self, **kwargs):

- +            pass

- +

- +        def version(self):

- +            return {}

- +

- +    for client in ['APIClient', 'Client']:

- +        if not hasattr(docker, client):

- +            setattr(docker, client, MockClient)

- +

- +    (flexmock(docker)

- +        .should_receive('APIClient')

- +        .once()

- +        .and_raise(AttributeError))

- +

- +    (flexmock(docker)

- +        .should_receive('Client')

- +        .once())

- +

- +    DockerTasker()

- diff --git a/tests/test_util.py b/tests/test_util.py

- index c2ec701..3b4c6c8 100644

- --- a/tests/test_util.py

- +++ b/tests/test_util.py

- @@ -85,7 +85,7 @@ def test_wait_for_command():

-      if MOCK:

-          mock_docker()

-  

- -    d = docker.Client()

- +    d = docker.APIClient()

-      logs_gen = d.pull(INPUT_IMAGE, stream=True)

-      assert wait_for_command(logs_gen) is not None

-  

@@ -1,73 +0,0 @@ 

- diff --git a/tests/plugins/test_koji_upload.py b/tests/plugins/test_koji_upload.py

- index 9c4a420..2157368 100644

- --- a/tests/plugins/test_koji_upload.py

- +++ b/tests/plugins/test_koji_upload.py

- @@ -10,6 +10,8 @@ from __future__ import unicode_literals

-  

-  import json

-  import os

- +import platform

- +import sys

-  

-  try:

-      import koji

- @@ -49,6 +51,11 @@ from six import string_types

-  NAMESPACE = 'mynamespace'

-  BUILD_ID = 'build-1'

-  KOJI_UPLOAD_DIR = 'upload'

- +LOCAL_ARCH = platform.processor()

- +if sys.version_info[0] == 2:

- +    B_LOCAL_ARCH = bytes(LOCAL_ARCH)

- +elif sys.version_info[0] == 3:

- +    B_LOCAL_ARCH = LOCAL_ARCH.encode()

-  

-  

-  def noop(*args, **kwargs): return None

- @@ -168,7 +175,7 @@ class MockedClientSession(object):

-  

-  FAKE_SIGMD5 = b'0' * 32

-  FAKE_RPM_OUTPUT = (

- -    b'name1;1.0;1;x86_64;0;' + FAKE_SIGMD5 + b';(none);'

- +    b'name1;1.0;1;' + B_LOCAL_ARCH + b';0;' + FAKE_SIGMD5 + b';(none);'

-      b'RSA/SHA256, Mon 29 Jun 2015 13:58:22 BST, Key ID abcdef01234567\n'

-  

-      b'gpg-pubkey;01234567;01234567;(none);(none);(none);(none);(none)\n'

- @@ -176,7 +183,7 @@ FAKE_RPM_OUTPUT = (

-      b'gpg-pubkey-doc;01234567;01234567;noarch;(none);' + FAKE_SIGMD5 +

-      b';(none);(none)\n'

-  

- -    b'name2;2.0;2;x86_64;0;' + FAKE_SIGMD5 + b';' +

- +    b'name2;2.0;2;' + B_LOCAL_ARCH + b';0;' + FAKE_SIGMD5 + b';' +

-      b'RSA/SHA256, Mon 29 Jun 2015 13:58:22 BST, Key ID bcdef012345678;(none)\n'

-      b'\n')

-  

- @@ -284,7 +291,7 @@ def mock_environment(tmpdir, session=None, name=None,

-  

-              if has_config:

-                  docker_reg.config = {

- -                    'config': {'architecture': 'x86_64'},

- +                    'config': {'architecture': LOCAL_ARCH},

-                      'container_config': {}

-                  }

-  

- @@ -303,9 +310,9 @@ def mock_environment(tmpdir, session=None, name=None,

-                                              image_id="id1234")

-      workflow.prebuild_plugins_conf = {}

-      workflow.postbuild_results[PostBuildRPMqaPlugin.key] = [

- -        "name1;1.0;1;x86_64;0;2000;" + FAKE_SIGMD5.decode() + ";23000;"

- +        "name1;1.0;1;" + LOCAL_ARCH + ";0;2000;" + FAKE_SIGMD5.decode() + ";23000;"

-          "RSA/SHA256, Tue 30 Aug 2016 00:00:00, Key ID 01234567890abc;(none)",

- -        "name2;2.0;1;x86_64;0;3000;" + FAKE_SIGMD5.decode() + ";24000"

- +        "name2;2.0;1;" + LOCAL_ARCH + ";0;3000;" + FAKE_SIGMD5.decode() + ";24000"

-          "RSA/SHA256, Tue 30 Aug 2016 00:00:00, Key ID 01234567890abd;(none)",

-      ]

-  

- @@ -693,7 +700,7 @@ class TestKojiUpload(object):

-                  'checksum_type',

-                  'type',

-              ])

- -            assert output['arch'] == 'x86_64'

- +            assert output['arch'] == LOCAL_ARCH

-          else:

-              assert set(output.keys()) == set([

-                  'buildroot_id',

@@ -0,0 +1,42 @@ 

+ From 5f93a9ef66f0c343c3b4adaa4fc1d478e7b957dc Mon Sep 17 00:00:00 2001

+ From: Vadim Rutkovsky <vrutkovs@redhat.com>

+ Date: Wed, 8 Nov 2017 12:17:52 +0100

+ Subject: [PATCH] tests: flexmock requests.Sessions functions instead of

+  requests module functions

+ 

+ This fixes tests on Fedora, as these are running with networking

+ disabled and were incorrectly mocked

+ ---

+  tests/plugins/test_add_yum_repo_by_url.py | 2 +-

+  tests/plugins/test_yum_inject.py          | 2 +-

+  2 files changed, 2 insertions(+), 2 deletions(-)

+ 

+ diff --git a/tests/plugins/test_add_yum_repo_by_url.py b/tests/plugins/test_add_yum_repo_by_url.py

+ index 24e9686..6f57182 100644

+ --- a/tests/plugins/test_add_yum_repo_by_url.py

+ +++ b/tests/plugins/test_add_yum_repo_by_url.py

+ @@ -47,7 +47,7 @@ def prepare():

+      (flexmock(requests.Response, content=repocontent)

+          .should_receive('raise_for_status')

+          .and_return(None))

+ -    (flexmock(requests, get=lambda *_: requests.Response()))

+ +    (flexmock(requests.Session, get=lambda *_: requests.Response()))

+      mock_get_retry_session()

+  

+      return tasker, workflow

+ diff --git a/tests/plugins/test_yum_inject.py b/tests/plugins/test_yum_inject.py

+ index eb6e413..730245b 100644

+ --- a/tests/plugins/test_yum_inject.py

+ +++ b/tests/plugins/test_yum_inject.py

+ @@ -56,7 +56,7 @@ def prepare(df_path, inherited_user=''):

+      (flexmock(requests.Response, content=repocontent)

+       .should_receive('raise_for_status')

+       .and_return(None))

+ -    (flexmock(requests, get=lambda *_: requests.Response()))

+ +    (flexmock(requests.Session, get=lambda *_: requests.Response()))

+      return tasker, workflow

+  

+  

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,43 @@ 

+ From 466db30d395024f6bf5bb61c39308555c85ce1cf Mon Sep 17 00:00:00 2001

+ From: Vadim Rutkovsky <vrutkovs@redhat.com>

+ Date: Wed, 8 Nov 2017 14:34:36 +0100

+ Subject: [PATCH] tests: skip tests if dockpulp has no imgutils module

+ 

+ ---

+  tests/plugins/test_pulp_tag.py | 6 +++---

+  1 file changed, 3 insertions(+), 3 deletions(-)

+ 

+ diff --git a/tests/plugins/test_pulp_tag.py b/tests/plugins/test_pulp_tag.py

+ index 65ae6bc..1b211c3 100644

+ --- a/tests/plugins/test_pulp_tag.py

+ +++ b/tests/plugins/test_pulp_tag.py

+ @@ -150,7 +150,7 @@ def prepare(v1_image_ids={}):

+      return tasker, workflow

+  

+  

+ -@pytest.mark.skipif(dockpulp is None,

+ +@pytest.mark.skipif(dockpulp is None or not hasattr(dockpulp, "imgutils"),

+                      reason='dockpulp module not available')

+  @pytest.mark.parametrize(("v1_image_ids", "should_raise"), [

+      ({'x86_64': None, 'ppc64le': None}, False),

+ @@ -194,7 +194,7 @@ def test_pulp_tag_basic(tmpdir, monkeypatch, v1_image_ids, should_raise, caplog)

+      assert results['pulp_tag'] == expected_results

+  

+  

+ -@pytest.mark.skipif(dockpulp is None,

+ +@pytest.mark.skipif(dockpulp is None or not hasattr(dockpulp, "imgutils"),

+                      reason='dockpulp module not available')

+  def test_pulp_tag_source_secret(tmpdir, monkeypatch, caplog):

+      v1_image_ids = {'x86_64': None,

+ @@ -222,7 +222,7 @@ def test_pulp_tag_source_secret(tmpdir, monkeypatch, caplog):

+      assert results['pulp_tag'] == expected_results

+  

+  

+ -@pytest.mark.skipif(dockpulp is None,

+ +@pytest.mark.skipif(dockpulp is None or not hasattr(dockpulp, "imgutils"),

+                      reason='dockpulp module not available')

+  def test_pulp_tag_service_account_secret(tmpdir, monkeypatch, caplog):

+      v1_image_ids = {'x86_64': None,

+ -- 

+ 2.14.3

+ 

file modified
+36 -26
@@ -25,14 +25,14 @@ 

  %global owner projectatomic

  %global project atomic-reactor

  

- %global commit 71ff262252fa4d7937ccf47523f8ffdc55af6841

+ %global commit 3ea098ef730d18b7b533f1043f58f07bfd9f58ea

  %global shortcommit %(c=%{commit}; echo ${c:0:7})

  

  %global dock_obsolete_vr 1.3.7-2

  

  Name:           %{project}

- Version:        1.6.25.1

- Release:        3%{?dist}

+ Version:        1.6.28

+ Release:        1%{?dist}

  

  Summary:        Improved builder for Docker images

  Group:          Development/Tools
@@ -40,30 +40,32 @@ 

  URL:            https://github.com/%{owner}/%{project}

  Source0:        https://github.com/%{owner}/%{project}/archive/%{commit}/%{project}-%{commit}.tar.gz

  

- # This patch is already merged upstream, pulling it in so we don't have to

- # wait for the upstream next release.

- #

- #   https://github.com/projectatomic/atomic-reactor/pull/663

- Patch0:         atomic-reactor-1.6.25.1-docker-py2.patch

- 

- # Fix one of the tests so it will run on non-x86_64 arches since the package

- # is actually noarch. Submitted upstream:

- #

- #   https://github.com/projectatomic/atomic-reactor/pull/813

- Patch1:         atomic-reactor-fix-x86_64-tests.patch

- 

  # Fedora now has two packages that provide the upstream docker-py, the original

  # named one of python-docker-py for the 1.x release and python-docker for the

  # 2.x release as these have incompatible APIs but are both still supported

  # upstream (at the time of this writing). Switching to the 2.x release

- Patch2:         atomic-reactor-fix-docker-py-requires.patch

+ Patch0:         atomic-reactor-fix-docker-py-requires.patch

  

  # Need to fix the unicode vs string handling of some krb values passed in

  #

  # Submitted upstream

  #

  #   https://github.com/projectatomic/atomic-reactor/pull/860

- Patch3:         atomic-reactor-koji-util-krb-str.patch

+ Patch1:         atomic-reactor-koji-util-krb-str.patch

+ 

+ # Several tests incorrectly mock requests and fail with no network access

+ #

+ # Submitted upstream

+ #

+ #   https://github.com/projectatomic/atomic-reactor/pull/878

+ Patch2:         atomic-reactor-mock-requests-session.patch

+ 

+ #Mocked dockpulp seems to sneak in some tests and these tests fail as

+ # the mocked copy don't have imgutils module

+ # Submitted upstream: https://github.com/projectatomic/atomic-reactor/pull/879

+ 

+ Patch3:         atomic-reactor-skip-tests-for-mocked-dockpulp.patch

+ 

  

  BuildArch:      noarch

  
@@ -80,13 +82,15 @@ 

  BuildRequires:  python2-docker

  BuildRequires:  python-flexmock >= 0.10.2

  BuildRequires:  python-six

- BuildRequires:  python-osbs >= 0.15

+ BuildRequires:  python2-osbs-client >= 0.15

  BuildRequires:  python-backports-lzma

  BuildRequires:  python2-responses

  BuildRequires:  python-jsonschema

  BuildRequires:  PyYAML

  BuildRequires:  python-mock

  BuildRequires:  python2-docker-squash >= 1.0.0-0.3

+ # Tests fail without get_orchestrator_logs method

+ BuildConflicts:  python2-osbs-client < 0.44

  %endif # with_check

  

  %if 0%{?with_python3}
@@ -106,12 +110,14 @@ 

  BuildRequires:  python3-docker

  BuildRequires:  python3-flexmock >= 0.10.2

  BuildRequires:  python3-six

- BuildRequires:  python3-osbs >= 0.15

+ BuildRequires:  python3-osbs-client >= 0.15

  BuildRequires:  python3-responses

  BuildRequires:  python3-jsonschema

  BuildRequires:  python3-PyYAML

  BuildRequires:  python3-mock

  BuildRequires:  python3-docker-squash >= 1.0.0-0.3

+ # Tests fail without get_orchestrator_logs method

+ BuildConflicts:  python3-osbs-client < 0.44

  %endif # with_check

  %endif # with_python3

  
@@ -138,8 +144,6 @@ 

  Requires:       python2-docker-squash >= 1.0.0-0.3

  Requires:       python-backports-lzma

  Requires:       python-jsonschema

- # Due to CopyBuiltImageToNFSPlugin, might be moved to subpackage later.

- Requires:       nfs-utils

  Requires:       PyYAML

  Provides:       python-dock = %{version}-%{release}

  Obsoletes:      python-dock < %{dock_obsolete_vr}
@@ -204,8 +208,6 @@ 

  Requires:       python3-dockerfile-parse >= 0.0.5

  Requires:       python3-docker-squash >= 1.0.0-0.3

  Requires:       python3-jsonschema

- # Due to CopyBuiltImageToNFSPlugin, might be moved to subpackage later.

- Requires:       nfs-utils

  Requires:       python3-PyYAML

  Provides:       python3-dock = %{version}-%{release}

  Obsoletes:      python3-dock < %{dock_obsolete_vr}
@@ -257,9 +259,9 @@ 

  %prep

  %setup -qn %{name}-%{commit}

  

- %patch0 -p1

+ %patch0 -p0

  %patch1 -p1

- %patch2 -p0

+ %patch2 -p1

  %patch3 -p1

  

  %build
@@ -327,6 +329,7 @@ 

  %exclude %{python2_sitelib}/atomic_reactor/plugins/pre_bump_release.py*

  %exclude %{python2_sitelib}/atomic_reactor/plugins/pre_koji.py*

  %exclude %{python2_sitelib}/atomic_reactor/plugins/pre_koji_parent.py*

+ %exclude %{python2_sitelib}/atomic_reactor/plugins/pre_inject_parent_image.py*

  %exclude %{python2_sitelib}/atomic_reactor/plugins/pre_stop_autorebuild_if_disabled.py*

  %exclude %{python2_sitelib}/integration-tests

  
@@ -342,6 +345,7 @@ 

  %{python2_sitelib}/atomic_reactor/plugins/pre_bump_release.py*

  %{python2_sitelib}/atomic_reactor/plugins/pre_koji.py*

  %{python2_sitelib}/atomic_reactor/plugins/pre_koji_parent.py*

+ %{python2_sitelib}/atomic_reactor/plugins/pre_inject_parent_image.py*

  %{python2_sitelib}/atomic_reactor/plugins/exit_koji_promote.py*

  %{python2_sitelib}/atomic_reactor/plugins/exit_koji_import.py*

  
@@ -382,6 +386,7 @@ 

  %exclude %{python3_sitelib}/atomic_reactor/plugins/pre_check_and_set_rebuild.py

  %exclude %{python3_sitelib}/atomic_reactor/plugins/pre_koji.py

  %exclude %{python3_sitelib}/atomic_reactor/plugins/pre_koji_parent.py

+ %exclude %{python3_sitelib}/atomic_reactor/plugins/pre_inject_parent_image.py

  %exclude %{python3_sitelib}/atomic_reactor/plugins/pre_stop_autorebuild_if_disabled.py

  %exclude %{python3_sitelib}/atomic_reactor/plugins/__pycache__/exit_koji_promote*.py*

  %exclude %{python3_sitelib}/atomic_reactor/plugins/__pycache__/exit_koji_import*.py*
@@ -393,6 +398,7 @@ 

  %exclude %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_check_and_set_rebuild*.py*

  %exclude %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_koji*.py*

  %exclude %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_koji_parent*.py*

+ %exclude %{python2_sitelib}/atomic_reactor/plugins/__pycache__/pre_inject_parent_image.py*

  %exclude %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_stop_autorebuild_if_disabled*.py*

  %exclude %{python3_sitelib}/integration-tests

  
@@ -413,12 +419,14 @@ 

  %{python3_sitelib}/atomic_reactor/plugins/pre_bump_release.py

  %{python3_sitelib}/atomic_reactor/plugins/pre_koji.py

  %{python3_sitelib}/atomic_reactor/plugins/pre_koji_parent.py

+ %{python3_sitelib}/atomic_reactor/plugins/pre_inject_parent_image.py

  %{python3_sitelib}/atomic_reactor/plugins/exit_koji_promote.py

  %{python3_sitelib}/atomic_reactor/plugins/exit_koji_import.py

  %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_add_filesystem*.py*

  %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_bump_release*.py*

  %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_koji*.py*

  %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_koji_parent*.py*

+ %{python3_sitelib}/atomic_reactor/plugins/__pycache__/pre_inject_parent_image*.py*

  %{python3_sitelib}/atomic_reactor/plugins/__pycache__/exit_koji_promote*.py*

  %{python3_sitelib}/atomic_reactor/plugins/__pycache__/exit_koji_import*.py*

  
@@ -440,6 +448,9 @@ 

  

  

  %changelog

+ * Wed Nov 8 2017 Vadim Rutkovsky <vrutkovs@fedoraproject.org> - 1.6.27-1

+ - Update to latest upstream

+ 

  * Tue Oct 03 2017 Adam Miller <maxamillion@fedoraproject.org> - 1.6.25.1-3

  - Patch to fix unicode handling of krb+koji arguments in koji_util

  
@@ -672,4 +683,3 @@ 

  

  * Sun Nov  2 2014 Jakub Dorňák <jdornak@redhat.com> - 0.0.1-1

  - Initial package

- 

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (atomic-reactor-71ff262252fa4d7937ccf47523f8ffdc55af6841.tar.gz) = 326cdedaf09d150dff80a4cf6994be8824d381808510279db2c6efdd49a87b607619e5789308487a655d255d8877a7acd9f3319372943a7150a3e3f321e46857

+ SHA512 (atomic-reactor-3ea098ef730d18b7b533f1043f58f07bfd9f58ea.tar.gz) = 711290bcfb01ad1f81af858f4f0a437db691411371375eeebcd11b432ceb168ff1630ccd313a22f22984c54114b4380b568cda46f3700cea6ca84f79e8a2e198