From 2ba13ff759ab06ae2037599e5c091be25c990065 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 28 2017 15:14:20 +0000 Subject: import atomic-1.17.2-9.git2760e30.el7 --- diff --git a/SOURCES/no_strip_port.patch b/SOURCES/no_strip_port.patch new file mode 100644 index 0000000..71d16e3 --- /dev/null +++ b/SOURCES/no_strip_port.patch @@ -0,0 +1,38 @@ +From ef9fb1b1d1b7abeb4eacde237ea55d042331c6e6 Mon Sep 17 00:00:00 2001 +From: Brent Baude +Date: Tue, 23 May 2017 09:45:20 -0500 +Subject: [PATCH] Do not strip port for insecure check + +When checking if a registry is insecure, we should not be stripping +the port from the registry name. +--- + Atomic/backends/_docker.py | 2 +- + Atomic/push.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Atomic/backends/_docker.py b/Atomic/backends/_docker.py +index 04659eed..bb00ad08 100644 +--- a/Atomic/backends/_docker.py ++++ b/Atomic/backends/_docker.py +@@ -336,7 +336,7 @@ def pull_image(self, image, remote_image_obj, **kwargs): + if '@sha256:' in image: + image = image.replace("@sha256:", ":") + +- insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], util.strip_port(registry)) else False ++ insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], registry) else False + trust = Trust() + trust.discover_sigstore(fq_name) + util.write_out("Pulling {} ...".format(fq_name)) +diff --git a/Atomic/push.py b/Atomic/push.py +index 368fe090..726011b8 100644 +--- a/Atomic/push.py ++++ b/Atomic/push.py +@@ -189,7 +189,7 @@ def prompt(): + if self.args.insecure: + insecure = True + else: +- insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], util.strip_port(reg)) else False ++ insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], reg) else False + # We must push the file to the registry first prior to performing a + # local signature because the manifest file must be on the registry + return_code = util.skopeo_copy(local_image, remote_image, debug=self.args.debug, diff --git a/SOURCES/tar_fix.patch b/SOURCES/tar_fix.patch new file mode 100644 index 0000000..167956a --- /dev/null +++ b/SOURCES/tar_fix.patch @@ -0,0 +1,56 @@ +From bebe2df6c36fc8ab896fdf90b2e7a976c1f8bc9b Mon Sep 17 00:00:00 2001 +From: Steve Milner +Date: Wed, 17 May 2017 17:06:11 -0400 +Subject: [PATCH 1/2] Replace tarfile with tar on ostree import case + +A bug exists where tarfile.extractall raises a unicode error on some +tars. This change replaces the extractall causing BZ#1451697 with +the system tar command. + +References: +- https://bugzilla.redhat.com/show_bug.cgi?id=1194473 +- https://bugzilla.redhat.com/show_bug.cgi?id=1451697 +--- + Atomic/syscontainers.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Atomic/syscontainers.py b/Atomic/syscontainers.py +index 6a70a6ce..2cdbc170 100644 +--- a/Atomic/syscontainers.py ++++ b/Atomic/syscontainers.py +@@ -1498,8 +1498,10 @@ def filter_func(*args): + destdir = checkout if os.path.exists(checkout) else None + try: + temp_dir = tempfile.mkdtemp(prefix=".", dir=destdir) +- with tarfile.open(tar, 'r') as t: +- t.extractall(temp_dir) ++ # NOTE: tarfile has an issue with utf8. This works around the problem ++ # by using the systems tar command. ++ # Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1194473 ++ subprocess.check_call(['tar', '-xf', tar, '-C', temp_dir]) + repo.write_directory_to_mtree(Gio.File.new_for_path(temp_dir), mtree, modifier) + root = repo.write_mtree(mtree)[1] + csum = repo.write_commit(None, "", None, metav, root)[1] + +From 49dfdc178e0f2f529f409b35d9f7f4d1eb6b6df2 Mon Sep 17 00:00:00 2001 +From: Steve Milner +Date: Thu, 18 May 2017 14:14:16 -0400 +Subject: [PATCH 2/2] test: Disable test_storage.sh + +test_storage.sh is erroring on centos_atomic with the following: + + error: /dev/vdb: probing initialization failed: Device or resource + busy + +A few quick attempts to fix it were made, but ended up failing. +Disabling (by appending an underscore) the test until it can be +investigate further. +--- + tests/integration/{test_storage.sh => _test_storage.sh} | 0 + 1 file changed, 0 insertions(+), 0 deletions(-) + rename tests/integration/{test_storage.sh => _test_storage.sh} (100%) + +diff --git a/tests/integration/test_storage.sh b/tests/integration/_test_storage.sh +similarity index 100% +rename from tests/integration/test_storage.sh +rename to tests/integration/_test_storage.sh diff --git a/SPECS/atomic.spec b/SPECS/atomic.spec index 7ff500c..b53c7ac 100644 --- a/SPECS/atomic.spec +++ b/SPECS/atomic.spec @@ -19,12 +19,14 @@ Name: atomic Epoch: 1 Version: 1.17.2 -Release: 4.git%{shortcommit0}%{?dist} +Release: 9.git%{shortcommit0}%{?dist} Summary: Tool for managing ProjectAtomic systems and containers License: LGPLv2+ URL: https://github.com/projectatomic/%{name} Source0: https://github.com/projectatomic/%{name}/archive/%{commit0}.tar.gz -Patch0001: 0001.patch +Patch1: 0001.patch +Patch2: no_strip_port.patch +Patch3: tar_fix.patch BuildRequires: %{pypkg}-dateutil BuildRequires: %{pypkg}-devel @@ -74,6 +76,7 @@ The atomic host subcommand wraps rpm-ostree providing unified management. %prep %autosetup -Sgit -n %{name}-%{commit0} + if [ %{pypkg} == 'python3' ]; then sed -i 's/input = raw_input/pass/' Atomic/util.py fi @@ -133,6 +136,12 @@ rm -rf %{buildroot}%{_sysconfdir}/containers %dir %{_sysconfdir}/%{name}.d %changelog +* Wed Jun 21 2017 bbaude - 1:1.17.2-9.git2760e30 +- Add tar fix patch for BZ# 1451697. + +* Wed Jun 07 2017 Lokesh Mandvekar - 1:1.17.2-8.git2760e30 +- 7.3.6 candidate + * Mon May 22 2017 bbaude - 1:1.17.2-4.git2760e30 - Add patch to resolve BZ # 1454292