On 15.12.2015 16:01, Jan Cholasta wrote:
On 15.12.2015 15:53, Petr Viktorin wrote:
On 12/14/2015 08:18 AM, Jan Cholasta wrote:
On 4.12.2015 14:29, Jan Cholasta wrote:

On 3.12.2015 17:32, Petr Viktorin wrote:
This specfile patch makes python-ipalib noarch, by splitting out the
arch-dependent stuff.

I'm not sure if this should be done at all. Both py_default_encoding
(especially) _ipap11helper are internal submodules of ipapython and I
don't think they should be packaged separately.

Technically they aren't – it's "import _ipap11helper", not "import
ipapython._ipap11helper". Their source is in the ipapython directory,
but they're built as independent modules.

This is an implementation detail rather than an architectural decision.
For _ipap11helper, we haven't figured out how to properly put it inside
ipapython, so it's build separately, but it actually is a part of

If this is just about packaging arch-specific code separately from
noarch code, I'm not sure either - all other packages with both Python
and C modules I have seen (e.g. python-ldap, PyYAML) simply do not care
and put everything in a single arch-specific package. IMHO we should

This would mean putting everything into the architecture-specific
prefix. Currently the python files in python2-ipalib are installed into
the architecture-agnostic prefix, which is wrong, because you can't
install both python2-ipalib.i686 and python2-ipalib.x86_64 at the same

Putting everything into arch-specific prefix would mean that if you do
install both arches simultaneously, you'd get two identical copies of
ipalib, ipapython, and ipaplatform. So if having both installed is a
concern, I think the noarch bits should be split out.

I'm aware this means two identical copies of the modules, but the same
thing works for python-ldap and PyYAML (as I pointed out above), so why
shouldn't it work for us?

We got rid of both default_encoding_utf8 and _ipap11helper, so python-ipalib can be packaged as noarch. See the attached patch.

Jan Cholasta
From 08ba41eca7d690fd8a0644e7d962999b2f5a1967 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Thu, 21 Jan 2016 12:59:11 +0100
Subject: [PATCH] spec file: package python-ipalib as noarch

 freeipa.spec.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 899af6c..6d7daa4 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -441,9 +441,9 @@ python2-ipalib and %{name}-common. Packages still depending on
 %package -n python2-ipalib
 Summary: Python libraries used by IPA
 Group: System Environment/Libraries
+BuildArch: noarch
 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}
@@ -487,8 +487,8 @@ If you are using IPA, you need to install this package.
 %package -n python3-ipalib
 Summary: Python3 libraries used by IPA
 Group: System Environment/Libraries
+BuildArch: noarch
 %{?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}

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

Reply via email to