From f0b50c5af2aa57280a1e650c6fb2c77641fa39e2 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 13:04:33 +0000 Subject: import atomic-1.18.1-3.1.git0705b1b.el7 --- diff --git a/.atomic.metadata b/.atomic.metadata index b0b7409..dc79e1f 100644 --- a/.atomic.metadata +++ b/.atomic.metadata @@ -1 +1,2 @@ -1458906736f85b87b65cf410d286afd7a565e4c3 SOURCES/2760e30296884e9160ff0b8e58c2e5d47791f01d.tar.gz +5114e4ba6e979e06f1e49fbbd8394a1fe32f46b5 SOURCES/0705b1bde7d308988263cd5ef1106ce2901a7e00.tar.gz +a058fffeb6e63281f8a8d44ab263ed3c3c817347 SOURCES/0b260d3eff505bc1ab60842a34cf9f31857658f4.tar.gz diff --git a/.gitignore b/.gitignore index 0cd7448..f1fae0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -SOURCES/2760e30296884e9160ff0b8e58c2e5d47791f01d.tar.gz +SOURCES/0705b1bde7d308988263cd5ef1106ce2901a7e00.tar.gz +SOURCES/0b260d3eff505bc1ab60842a34cf9f31857658f4.tar.gz diff --git a/SOURCES/0001.patch b/SOURCES/0001.patch deleted file mode 100644 index cde5b88..0000000 --- a/SOURCES/0001.patch +++ /dev/null @@ -1,68 +0,0 @@ -From f5e4b38043ce566da472853d48382c5c1f7871f2 Mon Sep 17 00:00:00 2001 -From: Brent Baude -Date: Mon, 22 May 2017 13:41:55 -0500 -Subject: [PATCH] Atomic/util.py: Add logic to install lookup for shortnames - -If a shortname is used to run an image, we need to transform the short -name into the fq-name when doing the lookup in the installed images -data. - -Reported in BZ #1454292 ---- - Atomic/backends/_docker.py | 9 +++++++-- - Atomic/util.py | 13 +++++++++++-- - 2 files changed, 18 insertions(+), 4 deletions(-) - -diff --git a/Atomic/backends/_docker.py b/Atomic/backends/_docker.py -index 53a67adc..04659eed 100644 ---- a/Atomic/backends/_docker.py -+++ b/Atomic/backends/_docker.py -@@ -467,10 +467,15 @@ def uninstall(self, iobject, name=None, **kwargs): - atomic.display(cmd) - if args.display: - return 0 -- if cmd: -- return util.check_call(cmd, env=atomic.cmd_env()) - - install_data = util.InstallData.get_install_data_by_id(iobject.id) -+ -+ if cmd: -+ result = util.check_call(cmd, env=atomic.cmd_env()) -+ if result == 0: -+ util.InstallData.delete_by_id(iobject.id, ignore=ignore) -+ return result -+ - system_package_nvra = install_data.get("system_package_nvra", None) - if system_package_nvra: - RPMHostInstall.uninstall_rpm(system_package_nvra) -diff --git a/Atomic/util.py b/Atomic/util.py -index f6116bb8..5f6590f8 100644 ---- a/Atomic/util.py -+++ b/Atomic/util.py -@@ -857,8 +857,11 @@ def read_install_data(cls): - def write_install_data(cls, new_data): - install_data = cls.read_install_data() - with file_lock(ATOMIC_INSTALL_JSON): -- for x in new_data: -- install_data[x] = new_data[x] -+ if len(new_data) < 1: -+ install_data = {} -+ else: -+ for x in new_data: -+ install_data[x] = new_data[x] - temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False) - json.dump(install_data, temp_file) - temp_file.close() -@@ -908,6 +911,12 @@ def image_installed(cls, img_object): - return True - if install_data.get("{}:{}".format(img_object.input_name, img_object.tag), None): - return True -+ try: -+ from Atomic.discovery import RegistryInspectError -+ if install_data.get(img_object.fq_name, None): -+ return True -+ except RegistryInspectError: -+ pass - return False - - class Decompose(object): diff --git a/SOURCES/no_strip_port.patch b/SOURCES/no_strip_port.patch deleted file mode 100644 index 71d16e3..0000000 --- a/SOURCES/no_strip_port.patch +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index 167956a..0000000 --- a/SOURCES/tar_fix.patch +++ /dev/null @@ -1,56 +0,0 @@ -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 b53c7ac..3b43a15 100644 --- a/SPECS/atomic.spec +++ b/SPECS/atomic.spec @@ -1,4 +1,5 @@ %global debug_package %{nil} + %if 0%{?fedora} <= 22 || (0%{?rhel} != 0 && 0%{?rhel} <= 7) %global pypkg python %global pysitelib %{python_sitelib} @@ -13,20 +14,24 @@ %global pylint python3-pylint %endif -%global commit0 2760e30296884e9160ff0b8e58c2e5d47791f01d +%global commit0 0705b1bde7d308988263cd5ef1106ce2901a7e00 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +# Registries package +%global git_atomic_registries https://github.com/projectatomic/registries +%global commit_atomic_registries 0b260d3eff505bc1ab60842a34cf9f31857658f4 +%global atomic_registries_shortcommit %(c=%{commit_atomic_registries}; echo ${c:0:7}) + + Name: atomic Epoch: 1 -Version: 1.17.2 -Release: 9.git%{shortcommit0}%{?dist} +Version: 1.18.1 +Release: 3.1.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 -Patch1: 0001.patch -Patch2: no_strip_port.patch -Patch3: tar_fix.patch +Source1: https://github.com/projectatomic/registries/archive/%{commit_atomic_registries}.tar.gz BuildRequires: %{pypkg}-dateutil BuildRequires: %{pypkg}-devel @@ -64,6 +69,7 @@ Requires: PyYAML Requires: gomtree Requires: ostree Requires: runc +Requires: container-storage-setup %description The goal of Atomic is to provide a high level, coherent entrypoint to the @@ -71,19 +77,43 @@ system, and fill in gaps. atomic can make it easier to interact with container runtimes for different kinds of containers, such as super-privileged and system containers. - + The atomic host subcommand wraps rpm-ostree providing unified management. -%prep -%autosetup -Sgit -n %{name}-%{commit0} +# Atomic Registries +%package registries +Summary: Parses a global YAML registry file +Requires: glib2 +Requires: libyaml +Requires: json-glib +BuildRequires: libyaml-devel +BuildRequires: json-glib-devel +BuildRequires: glib2-devel +BuildRequires: autoconf +BuildRequires: automake + +%description registries +Utility that parses a global YAML registry file for container runtimes. -if [ %{pypkg} == 'python3' ]; then -sed -i 's/input = raw_input/pass/' Atomic/util.py -fi +%prep +%setup -qn %{name}-%{commit0} +cd ../ +tar zxf %{SOURCE1} %build -make PYTHON=%{__python} python-build docs dockertar-sha256-helper gotar +cd .. +pushd registries-%{commit_atomic_registries} +sh ./autogen.sh +%configure +%make_build +popd +pushd atomic-%{commit0} +if [ %{pypkg} == 'python3' ]; then + sed -i 's/input = raw_input/pass/' Atomic/util.py +fi +make PYTHON=%{__python} PYLINT=true all +popd %install make PYTHON=%{__python} install-only DESTDIR=%{buildroot} @@ -109,7 +139,7 @@ for line in sys.argv[1:]: else: sys.stderr.write('{0} did not match any files\n'.format(line)) EOF -%{pypkg} autofiles.py > files \ +%{pypkg} autofiles.py > atomic.files \ '%{pysitelib}/Atomic' \ '%{pysitelib}/%{name}*.egg-info' \ '%{_sysconfdir}/profile.d/%{name}.sh' \ @@ -124,51 +154,85 @@ EOF #moved to skopeo - should not be present in future tarballs rm -rf %{buildroot}%{_sysconfdir}/containers +cd .. +pushd registries-%{commit_atomic_registries} +%make_install +install -d %{buildroot}%{_sysconfdir}/containers/ + +%if 0%{?rhel} +install -p -m 644 registries.redhat %{buildroot}%{_sysconfdir}/containers/registries.conf +%else +%if 0%{?fedora} + install -p -m 644 registries.fedora %{buildroot}%{_sysconfdir}/containers/registries.conf +%else + install -p -m 644 registries.conf %{buildroot}%{_sysconfdir}/containers/ +%endif +%endif + +install -d %{buildroot}%{_unitdir} +install -p -m 644 registries.service %{buildroot}%{_unitdir} +popd + %check [ ! -w /run/docker.sock ] || make PYTHON=%{__python} test +cd .. +pushd registries-%{commit_atomic_registries} +make check -%files -f files -%doc COPYING README.md +#define license tag if not already defined +%{!?_licensedir:%global license %doc} + +%files -f atomic.files +%license COPYING +%doc README.md %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.%{name}.conf %config(noreplace) %{_sysconfdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/%{name}.d/openscap %dir %{_sysconfdir}/%{name}.d +%files registries +%license ../registries-%{commit_atomic_registries}/COPYING +%doc ../registries-%{commit_atomic_registries}/README.md +%{_libexecdir}/registries +%{_mandir}/man1/registries* +%config(noreplace) %{_sysconfdir}/containers/registries.conf +%{_unitdir}/registries.service + %changelog -* Wed Jun 21 2017 bbaude - 1:1.17.2-9.git2760e30 -- Add tar fix patch for BZ# 1451697. +* Thu Jun 22 2017 bbaude - 1:1.18.1-3.1.git0705b1b +- Fix conditional distro logic for registires.conf +- Fixes Bugzilla #1464029 -* Wed Jun 07 2017 Lokesh Mandvekar - 1:1.17.2-8.git2760e30 -- 7.3.6 candidate +* Mon Jun 05 2017 bbaude - 1:1.18.1-2.1.git0705b1b +- Rework spec file so that %setup can be used with multi-source packages +- Customized registries.conf file based on distro +- Updated autoconf to make distro support easier +- Run make check for atomic-registries -* Mon May 22 2017 bbaude - 1:1.17.2-4.git2760e30 -- Add patch to resolve BZ # 1454292 +* Thu Jun 2 2017 bbaude - 1.18.1 +- 1.18.1 release +- Inclusion of the subpackage for registries -* Wed May 17 2017 bbaude - 1:1.17.2-3.git77ef28f -- requires: runc +* Thu Jun 01 2017 Lokesh Mandvekar - 1:1.17.2-6.1.git2760e30 +- Resolves; #1457540 - require c-s-s at install time -* Tue May 16 2017 bbaude - 1:1.17.2-2.git77ef28f -- Fixes BZ# 1450307 -- Fixes BZ# 1451375 -- Fixes BZ# 1450307 +* Mon May 22 2017 Lokesh Mandvekar - 1:1.17.2-5.1.git2760e30 +- Add patch to resolve BZ # 1454292 (originally fixed in extras 7.3.5) +- bump release tag to stay ahead of extras 7.3 -* Fri May 12 2017 bbaude - 1:1.17.1-2.gitf304570 -- Add integration test for uninstall -- Bugzilla #1430708 -- Bugzilla #1447848 -- Issue #995 -- Issue #993 -- Issue #990 +* Fri May 05 2017 Lokesh Mandvekar - 1:1.17.2-1.1.git2760e30 +- rebase to 1.17.2 +- built commit 2760e30 +- require runc at install time for system containers +* Fri May 05 2017 Lokesh Mandvekar - 1:1.17.1-1.1.gitf304570 +- bump to v1.17.1 +- built commit f304570 -* Thu Apr 20 2017 Brent Baude - 1.17.1-1 -- bump to 1.17.1 -- Use proxy from environment variable or config file -- Allow anonymous push -- Allow for profiling data to be generated -- BZ: 1432543 -- Various bug fixes +* Mon Mar 27 2017 Lokesh Mandvekar - 1.16.5-1.1 +- rebuilt for all arches on extras 7.4 +- enable debuginfo * Tue Mar 21 2017 Dan Walsh - 1.16.5-1 - bump to v1.16.5 @@ -475,9 +539,6 @@ to enforcing >= 1.10.6 * Tue Feb 24 2015 Lokesh Mandvekar - 0-0.5.gita7ff4cb - build commit#a7ff4cb -* Fri Feb 20 2015 Lokesh Mandvekar - 0-0.4.gitf7f6fa8 -- Resolves: rhbz#1194058 - approved version, ready for upload -- change license to LGPLv2+ * Thu Feb 19 2015 Lokesh Mandvekar - 0-0.3.gite4081c9 - manpage installation rules upstreamed