From 7fa76d01df55470ed2b80dcd28e3d77852d1544a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 18 Jan 2017 14:29:23 -0600 Subject: [PATCH] add patch to replace ${basearch} in the ostree ref Signed-off-by: Dennis Gilmore --- ...place-basearch-when-updating-the-ref.patch | 37 +++++++++++++++++++ pungi.spec | 9 ++++- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 0001-replace-basearch-when-updating-the-ref.patch diff --git a/0001-replace-basearch-when-updating-the-ref.patch b/0001-replace-basearch-when-updating-the-ref.patch new file mode 100644 index 00000000..758af040 --- /dev/null +++ b/0001-replace-basearch-when-updating-the-ref.patch @@ -0,0 +1,37 @@ +From 575fd872661f288c90d2fc8498e4db9ffddc4a9e Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Wed, 18 Jan 2017 14:22:43 -0600 +Subject: [PATCH] replace ${basearch} when updating the ref + +pungi-make-ostree has to run on the target arch so that rpm +scriptlets can be ran.as a reult we can ask rpm what the +basearch is for the running environment + +Signed-off-by: Dennis Gilmore +--- + pungi/ostree/tree.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/pungi/ostree/tree.py b/pungi/ostree/tree.py +index 68b6d70..2b97af4 100644 +--- a/pungi/ostree/tree.py ++++ b/pungi/ostree/tree.py +@@ -16,6 +16,7 @@ + + import os + import json ++import rpmUtils.arch + from kobo import shortcuts + + from pungi.util import makedirs +@@ -67,6 +68,7 @@ class Tree(OSTree): + return + ref = get_ref_from_treefile(self.treefile) + commitid = get_commitid_from_commitid_file(self.commitid_file) ++ ref = ref.replace('${basearch}', rpmUtils.arch.getBaseArch()) + print('Ref: %r, Commit ID: %r' % (ref, commitid)) + if ref and commitid: + print('Updating ref') +-- +2.11.0 + diff --git a/pungi.spec b/pungi.spec index 9cc4d81c..6562ae0c 100644 --- a/pungi.spec +++ b/pungi.spec @@ -1,6 +1,6 @@ Name: pungi Version: 4.1.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Distribution compose tool Group: Development/Tools @@ -9,11 +9,12 @@ URL: https://pagure.io/pungi Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2 # from https://pagure.io/fork/puiterwijk/pungi/c/63aa7db5aad4690b72898d01fa82270c1f503241 Patch0: 63aa7db5aad4690b72898d01fa82270c1f503241.patch +Patch1: 0001-replace-basearch-when-updating-the-ref.patch BuildRequires: python-nose, python-mock BuildRequires: python-devel, python-setuptools, python2-productmd >= 1.3 BuildRequires: python-lockfile, kobo, kobo-rpmlib, python-kickstart, createrepo_c -BuildRequires: python-lxml, libselinux-python, yum-utils, lorax +BuildRequires: python-lxml, libselinux-python, yum-utils, lorax, python-rpm BuildRequires: yum => 3.4.3-28, createrepo >= 0.4.11 BuildRequires: gettext, git-core, cvs BuildRequires: python-jsonschema @@ -71,6 +72,7 @@ notification to Fedora Message Bus. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %{__python} setup.py build @@ -112,6 +114,9 @@ cd tests && ./test_compose.sh %{_bindir}/%{name}-fedmsg-notification %changelog +* Tue Jan 17 2017 Dennis Gilmore - 4.1.12-3 +- add patch to replace ${basearch} in the ostree ref + * Tue Jan 17 2017 Dennis Gilmore - 4.1.12-2 - add patch from Patrick to give us some ostree debuging