From adf266d0aded49c1688143b9b97b4c8d9fcb89b6 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Jun 19 2017 21:53:24 +0000 Subject: Add syscontainers_fix_prefix.patch for BZ#1461994 --- diff --git a/atomic.spec b/atomic.spec index 7441da2..ab89893 100644 --- a/atomic.spec +++ b/atomic.spec @@ -22,7 +22,7 @@ Name: atomic Version: 1.18.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Tool for managing ProjectAtomic systems and containers License: LGPLv2+ URL: https://github.com/projectatomic/atomic @@ -33,6 +33,7 @@ ExclusiveArch: x86_64 ppc64le %endif Source0: https://github.com/projectatomic/%{name}/archive/%{commit}.tar.gz Source1: https://github.com/projectatomic/registries/archive/%{commit_atomic_registries}.tar.gz +Patch1: fix_syscontainer_prefix.patch BuildRequires: %{pypkg}-devel BuildRequires: %{pypkg}-requests >= 2.4.3 @@ -122,6 +123,7 @@ Utility that parses a global YAML registry file for container runtimes. %prep %setup -qn %{name}-%{commit} +%patch1 -p1 cd .. tar zxf %{SOURCE1} @@ -218,6 +220,9 @@ make check %{_unitdir}/registries.service %changelog +* Mon Jun 19 2017 bbaude - 1.18.1-5 +- Add fix_syscontainer_prefix.patch for F26 only, fixes BZ# 1461994 + * Tue Jun 06 2017 bbaude - 1.18.1-4 - Add registry.access.redhat.com to configuration file diff --git a/fix_syscontainer_prefix.patch b/fix_syscontainer_prefix.patch new file mode 100644 index 0000000..5b8740f --- /dev/null +++ b/fix_syscontainer_prefix.patch @@ -0,0 +1,29 @@ +From 627e236a6e6554c2c4f95ae2c257a278fbf7c143 Mon Sep 17 00:00:00 2001 +From: Brent Baude +Date: Mon, 19 Jun 2017 14:23:07 -0500 +Subject: [PATCH] Atomic/systemcontainers.py: Set prefix to "/" if None + +In the case of installing a systemcontainer, if using python3 and the +prefix ends up being None, it throws a traceback as reported in +bz #1461994. Using prefix or "/" fixes this issue. +--- + Atomic/syscontainers.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Atomic/syscontainers.py b/Atomic/syscontainers.py +index b3906d51..f0773f50 100644 +--- a/Atomic/syscontainers.py ++++ b/Atomic/syscontainers.py +@@ -814,10 +814,10 @@ def _do_checkout(self, repo, name, img, upgrade, deployment, values, destination + + if has_container_service: + util.write_template(unitfile, systemd_template, values, unitfileout) +- shutil.copyfile(unitfileout, os.path.join(prefix, destination, "%s.service" % name)) ++ shutil.copyfile(unitfileout, os.path.join(prefix or "/", destination, "%s.service" % name)) + if (tmpfiles_template): + util.write_template(unitfile, tmpfiles_template, values, tmpfilesout) +- shutil.copyfile(tmpfilesout, os.path.join(prefix, destination, "tmpfiles-%s.conf" % name)) ++ shutil.copyfile(tmpfilesout, os.path.join(prefix or "/", destination, "tmpfiles-%s.conf" % name)) + + if not prefix: + sym = "%s/%s" % (self._get_system_checkout_path(), name)