On (22/12/15 16:31), Petr Vobornik wrote:
>Build of 4.3 on Fedora rawhide failed at the end on rpmdiff check. Builds for
>all arches were successful and also works in COPR.
> 0 free 1 open 4 done 0 failed
>12284450 build (rawhide, /freeipa:b2442d51ba3f2a5f907f72e9bd90c5889bd89c0e):
>open (buildppcle-07.phx2.fedoraproject.org) -> FAILED: BuildError: mismatch
>when analyzing python3-ipatests-4.3.0-1.fc24.noarch.rpm, rpmdiff output was:
>error: cannot open Packages index using db5 - Permission denied (13)
>error: cannot open Packages database in /var/lib/rpm
>error: cannot open Packages database in /var/lib/rpm
>removed REQUIRES python3-ipalib(armv7hl-32) = 4.3.0-1.fc24
>added REQUIRES python3-ipalib(x86-64) = 4.3.0-1.fc24
>0 free 0 open 4 done 1 failed
I think that log file is crystal clear.

The noarch package "python3-ipatests-4.3.0-1.fc24.noarch.rpm"
requires packages with strict architecture.

sh$ wget 
https://kojipkgs.fedoraproject.org//work/tasks/4513/12284513/python3-ipatests-4.3.0-1.fc24.noarch.rpm

sh $rpm -qp --requires python3-ipatests-4.3.0-1.fc24.noarch.rpm
/usr/bin/python3
freeipa-client-common = 4.3.0-1.fc24
python(abi) = 3.5
python3-coverage
python3-ipalib(x86-64) = 4.3.0-1.fc24
python3-nose
python3-polib
python3-pytest >= 2.6
python3-pytest-multihost >= 0.5
python3-pytest-sourceorder
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
tar
xz

noarch pacakges are build for each architecture: armv7hl-32, x86-64, i686
But the same package should be built on each platform.

In your case requires, provides are different. This is a reason
why rpmdiff failed for some noarch packages.

Attached are two patches which fix issues with build in koji.
The 1st patch removes usage of %{_isa} in noarch packages.

The second one violates python packaging guidelines
http://fedoraproject.org/wiki/Packaging:Python#Reviewer_checklist
But there seems to be bug (in rpmbuild???) because "rpm --eval" does not
generate provides with architecture.

sh$ wget 
https://kojipkgs.fedoraproject.org//work/tasks/4513/12284513/python2-ipatests-4.3.0-1.fc24.noarch.rpm

sh$ rpm -qp --provides python2-ipatests-4.3.0-1.fc24.noarch.rpm
freeipa-tests(x86-64) = 4.3.0-1.fc24
ipa-tests(x86-64) = 4.3.0
python-ipatests = 4.3.0-1.fc24
python-ipatests(x86-64) = 4.3.0-1.fc24
python2-ipatests = 4.3.0-1.fc24

sh$ rpm --eval "%{?python_provide:%python_provide python2-ipatests}"
Provides: python-ipatests = %{version}-%{release}
Obsoletes: python-ipatests < %{version}-%{release}

So better workaround could be to replace macro "%python_provide"
with manually generated "Provides" and "Obsoletes"
It's up to you and discussion with python experts :-)

LS
>From 0674e1e6aae2423c050be520b9c1b13f8feeb3d8 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Mon, 4 Jan 2016 19:02:24 +0100
Subject: [PATCH 1/2] Remove _isa from requires and provides

---
 freeipa.spec | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/freeipa.spec b/freeipa.spec
index 
9c32876a0faa45dbe6aac49551264c0366777b03..a1de4dc5dd2442899c6a36cb48a732fd49ad7909
 100644
--- a/freeipa.spec
+++ b/freeipa.spec
@@ -365,7 +365,7 @@ BuildArch: noarch
 %{?python_provide:%python_provide python2-ipaclient}
 Requires: %{name}-client-common = %{version}-%{release}
 Requires: %{name}-common = %{version}-%{release}
-Requires: python2-ipalib%{?_isa} = %{version}-%{release}
+Requires: python2-ipalib = %{version}-%{release}
 Requires: python-dns >= 1.11.1
 
 %description -n python2-ipaclient
@@ -402,7 +402,7 @@ Summary: IPA administrative tools
 Group: System Environment/Base
 BuildArch: noarch
 Requires: %{name}-client-common = %{version}-%{release}
-Requires: python2-ipalib%{?_isa} = %{version}-%{release}
+Requires: python2-ipalib = %{version}-%{release}
 Requires: python-ldap
 
 Provides: %{alt_name}-admintools = %{version}
@@ -425,7 +425,7 @@ BuildArch: noarch
 Obsoletes: %{name}-python < 4.2.91
 Provides: %{name}-python = %{version}-%{release}
 Requires: %{name}-common = %{version}-%{release}
-Requires: python2-ipalib%{?_isa} = %{version}-%{release}
+Requires: python2-ipalib = %{version}-%{release}
 
 Provides: %{alt_name}-python-compat = %{version}
 Conflicts: %{alt_name}-python-compat
@@ -561,10 +561,10 @@ If you are using IPA, you need to install this package.
 Summary: IPA tests and test tools
 BuildArch: noarch
 Obsoletes: %{name}-tests < 4.2.91
-Provides: %{name}-tests%{?_isa} = %{version}-%{release}
+Provides: %{name}-tests = %{version}-%{release}
 %{?python_provide:%python_provide python2-ipatests}
 Requires: %{name}-client-common = %{version}-%{release}
-Requires: python2-ipalib%{?_isa} = %{version}-%{release}
+Requires: python2-ipalib = %{version}-%{release}
 Requires: tar
 Requires: xz
 Requires: python-nose
@@ -575,7 +575,7 @@ Requires: python-polib
 Requires: python-pytest-multihost >= 0.5
 Requires: python-pytest-sourceorder
 
-Provides: %{alt_name}-tests%{?_isa} = %{version}
+Provides: %{alt_name}-tests = %{version}
 Conflicts: %{alt_name}-tests
 Obsoletes: %{alt_name}-tests < %{version}
 
@@ -595,7 +595,7 @@ Summary: IPA tests and test tools
 BuildArch: noarch
 %{?python_provide:%python_provide python3-ipatests}
 Requires: %{name}-client-common = %{version}-%{release}
-Requires: python3-ipalib%{?_isa} = %{version}-%{release}
+Requires: python3-ipalib = %{version}-%{release}
 Requires: tar
 Requires: xz
 Requires: python3-nose
-- 
2.5.0

>From 797d5a5d0811dcca1afab7abe8222b2c3c1da494 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Tue, 5 Jan 2016 10:22:18 +0100
Subject: [PATCH 2/2] Disable provides with hardcoded architecture

The macro %python_provide should not generate provides
with hardcoded architecture

The output should be the same as with following eval

sh$ rpm --eval "%{?python_provide:%python_provide python2-ipaclient}"
Provides: python-ipaclient = %{version}-%{release}
Obsoletes: python-ipaclient < %{version}-%{release}
---
 freeipa.spec | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/freeipa.spec b/freeipa.spec
index 
a1de4dc5dd2442899c6a36cb48a732fd49ad7909..f059b257b1b3e3e82c71026e395d9945b9dbb3ea
 100644
--- a/freeipa.spec
+++ b/freeipa.spec
@@ -210,7 +210,6 @@ If you are installing an IPA server, you need to install 
this package.
 Summary: Python libraries used by IPA server
 Group: System Environment/Libraries
 BuildArch: noarch
-%{?python_provide:%python_provide python2-ipaserver}
 Requires: %{name}-server-common = %{version}-%{release}
 Requires: %{name}-common = %{version}-%{release}
 Requires: python2-ipaclient = %{version}-%{release}
@@ -362,7 +361,6 @@ installed on every client machine.
 Summary: Python libraries used by IPA client
 Group: System Environment/Libraries
 BuildArch: noarch
-%{?python_provide:%python_provide python2-ipaclient}
 Requires: %{name}-client-common = %{version}-%{release}
 Requires: %{name}-common = %{version}-%{release}
 Requires: python2-ipalib = %{version}-%{release}
@@ -451,7 +449,6 @@ Summary: Python libraries used by IPA
 Group: System Environment/Libraries
 Conflicts: %{name}-python < %{version}-%{release}
 %{?python_provide:%python_provide python2-ipalib}
-%{?python_provide:%{?_isa:%python_provide python2-ipalib%{_isa}}}
 Provides: python2-ipapython = %{version}-%{release}
 %{?python_provide:%python_provide python2-ipapython}
 Provides: python2-ipaplatform = %{version}-%{release}
@@ -496,7 +493,6 @@ If you are using IPA, you need to install this package.
 Summary: Python3 libraries used by IPA
 Group: System Environment/Libraries
 %{?python_provide:%python_provide python3-ipalib}
-%{?python_provide:%{?_isa:%python_provide python3-ipalib%{_isa}}}
 Provides: python3-ipapython = %{version}-%{release}
 %{?python_provide:%python_provide python3-ipapython}
 Provides: python3-ipaplatform = %{version}-%{release}
@@ -562,7 +558,6 @@ Summary: IPA tests and test tools
 BuildArch: noarch
 Obsoletes: %{name}-tests < 4.2.91
 Provides: %{name}-tests = %{version}-%{release}
-%{?python_provide:%python_provide python2-ipatests}
 Requires: %{name}-client-common = %{version}-%{release}
 Requires: python2-ipalib = %{version}-%{release}
 Requires: tar
@@ -593,7 +588,6 @@ This package contains tests that verify IPA functionality.
 %package -n python3-ipatests
 Summary: IPA tests and test tools
 BuildArch: noarch
-%{?python_provide:%python_provide python3-ipatests}
 Requires: %{name}-client-common = %{version}-%{release}
 Requires: python3-ipalib = %{version}-%{release}
 Requires: tar
-- 
2.5.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to