From 50e5964387064d06384c594ac1a5fd0bc4b3e833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 28 Jan 2019 13:28:44 +0100 Subject: [PATCH] Pass buildarch to lorax for ostree installer --- ...ee_installer-Pass-buildarch-to-lorax.patch | 55 +++++++++++++++++++ pungi.spec | 6 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0001-ostree_installer-Pass-buildarch-to-lorax.patch diff --git a/0001-ostree_installer-Pass-buildarch-to-lorax.patch b/0001-ostree_installer-Pass-buildarch-to-lorax.patch new file mode 100644 index 00000000..48ae42fe --- /dev/null +++ b/0001-ostree_installer-Pass-buildarch-to-lorax.patch @@ -0,0 +1,55 @@ +From da1ea83561aed33efe69516983a3dbd1347da0c6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= +Date: Mon, 28 Jan 2019 13:21:31 +0100 +Subject: [PATCH] ostree_installer: Pass --buildarch to lorax +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This should tell lorax what arch to use and avoids fragile detection +based on contents of source repo. + +It uses the same logic buildinstall phase uses to get the buildarch. + +Related: https://pagure.io/teamsilverblue/issue/67 +Signed-off-by: Lubomír Sedlář +--- + pungi/phases/ostree_installer.py | 2 ++ + tests/test_ostree_installer_phase.py | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py +index 587ff2c5..081d23d3 100644 +--- a/pungi/phases/ostree_installer.py ++++ b/pungi/phases/ostree_installer.py +@@ -9,6 +9,7 @@ from kobo import shortcuts + + from .base import ConfigGuardedPhase, PhaseLoggerMixin + from .. import util ++from ..arch import get_valid_arches + from ..util import get_volid, get_repo_urls, version_generator, translate_path + from ..wrappers import kojiwrapper, iso, lorax, scm + +@@ -166,6 +167,7 @@ class OstreeInstallerThread(WorkerThread): + variant=variant.uid, + nomacboot=True, + volid=volid, ++ buildarch=get_valid_arches(arch)[0], + buildinstallpackages=config.get('installpkgs'), + add_template=self._get_templates(config, 'add_template'), + add_arch_template=self._get_templates(config, 'add_arch_template'), +diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py +index 80e68d42..3ab088da 100644 +--- a/tests/test_ostree_installer_phase.py ++++ b/tests/test_ostree_installer_phase.py +@@ -135,6 +135,7 @@ class OstreeThreadTest(helpers.PungiTestCase): + if isfinal: + lorax_cmd.append('--isfinal') + ++ lorax_cmd.append("--buildarch=x86_64") + lorax_cmd.append('--volid=test-Everything-x86_64') + + if extra: +-- +2.17.2 + diff --git a/pungi.spec b/pungi.spec index 0770d41e..ac37e60b 100644 --- a/pungi.spec +++ b/pungi.spec @@ -2,7 +2,7 @@ Name: pungi Version: 4.1.32 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Distribution compose tool Group: Development/Tools @@ -11,6 +11,7 @@ URL: https://pagure.io/pungi Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2 Patch0: 0001-Make-sure-basearch-is-also-replaced-with-config-ostr.patch Patch1: 0001-Only-require-enum34-on-Legacy-Python.patch +Patch2: 0001-ostree_installer-Pass-buildarch-to-lorax.patch BuildRequires: python3-nose BuildRequires: python3-mock @@ -197,6 +198,9 @@ nosetests-3 --exe %{_bindir}/%{name}-wait-for-signed-ostree-handler %changelog +* Mon Jan 28 2019 Lubomír Sedlář - 4.1.32-5 +- Pass buildarch to lorax for ostree installer + * Mon Jan 14 2019 Lubomír Sedlář - 4.1.32-4 - Use python deps generator correctly