Bug 1459613 - Missing python34 build in repo
Missing python34 build in repo
Status: NEW
Product: ovirt-engine-sdk-python
Classification: oVirt
Component: Packaging.rpm (Show other bugs)
4.1.3
Unspecified Unspecified
unspecified Severity low (vote)
: ---
: ---
Assigned To: Fabrice Bacchella
Pavol Brilla
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-07 11:03 EDT by Fabrice Bacchella
Modified: 2018-01-04 04:48 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-21 05:23:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: External
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+


Attachments (Terms of Use)
A spec file for dual packaging of sdk on Centos 6/7. (1.62 KB, text/x-matlab)
2017-06-07 11:52 EDT, Fabrice Bacchella
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 77982 master ABANDONED Removed 'Requires: python3-enum34' from spec.fc*.in, this package don't exist on python3+ 2017-06-08 12:17 EDT
oVirt gerrit 77987 master ABANDONED Adding a spec files for version 4.1.5 that works on both RHEL 6 and 7. It also build both for native python and python 3... 2017-11-30 11:46 EST
oVirt gerrit 78023 master MERGED Removed 'Requires: python3-enum34' from spec.fc*.in 2017-06-15 04:00 EDT
oVirt gerrit 78204 sdk_4.1 MERGED Removed 'Requires: python3-enum34' from spec.fc*.in 2017-06-15 04:10 EDT
oVirt gerrit 84950 master ABANDONED Applying comments from Juan Herdandez, mainly about automation missing files. Not sure about the format of .repos files.... 2017-11-30 11:46 EST
oVirt gerrit 84951 master ABANDONED Missing a removed file. 2017-11-30 11:47 EST
oVirt gerrit 84965 master ABANDONED Applying comments from Juan Herdandez, mainly about automation missing files. Not sure about the format of .repos files.... 2017-11-30 11:47 EST
oVirt gerrit 84967 master ABANDONED Adding support for both python2 and python3 in EL7 spec file. 2018-05-12 21:56 EDT

  None (edit)
Description Fabrice Bacchella 2017-06-07 11:03:53 EDT
I looked in http://resources.ovirt.org/pub/ovirt-4.1/rpm/el7/x86_64/ and in https://access.redhat.com/downloads/content/package-browser.

There is a python-ovirt-engine-sdk4 package, but no python34-ovirt-engine-sdk4.

Documentation and tools for dual-version packaging is easy to find, look for example at:

http://python-rpm-porting.readthedocs.io/en/latest/tools.html
Comment 1 Juan Hernández 2017-06-07 11:40:11 EDT
We don't build the SDK for Python 3 and CentOS 7 because CentOS 7 doesn't support Python 3 unless you add optional repositories like EPEL. Same applies to RHEL 7.

However we do build the Python 3 RPM for Fedora 24 and 25. Here is the .spec file that we use:

  https://github.com/oVirt/ovirt-engine-sdk/blob/master/packaging/spec.fc24.in

Here is the latest RPM for Fedora 24, for example:

  http://resources.ovirt.org/pub/ovirt-4.1/rpm/fc24/x86_64/python3-ovirt-engine-sdk4-4.1.0-1.fc24.x86_64.rpm

It would be useful to build the RPM for CentOS 7, using EPEL, but we need to check if requiring the EPEL repositories is oVirt projects is acceptable. I think it shuldn't be a problem, and adapting the .spec should be easy.

In the Red Hat package browser you will never find that Python 3 package, because it isn't officially supported by Red Hat.
Comment 2 Juan Hernández 2017-06-07 11:47:50 EDT
Checking the source of the 'ovirt-release' package, I see that we do use EPEL already, but only with a limited set of packages:

  https://github.com/oVirt/ovirt-release/blob/ovirt-4.1/ovirt-el7-x86_64-deps.repo.in#L1-L9

That means that in order to be able to distribute the Python 3 RPM we would have to add to that list all the 'python34*' packages, otherwise installation would fail.

However, if someone is interested in using the Python 3 RPM, then I assume that she/he would have already enabled the EPEL repository explicitly, in order to install the 'python34' package. So maybe we could just build and publish the SDK RPM without modifying the 'ovirt-release' RPM.
Comment 3 Fabrice Bacchella 2017-06-07 11:52:06 EDT
It won't work as is in RHEL/Centos:

It says:

Requires: libxml2
Requires: python3
Requires: python3-enum34
Requires: python3-pycurl
Requires: python3-six

But on a Centos 7, with epel installed:
# yum install python3 python3-enum34 python3-pycurl python3-six
No package python3 available.
No package python3-enum34 available.
No package python3-pycurl available.
No package python3-six available.


And python3-enum34 is useless on a python3 installation as it's a backport of enum from python3 to python2.

I attached a working spec file, tested on Centos7.

I'm not sure about the "supported" thing for any sdk. People would like to use it on various platform, to integrate ovirt with there tools. I need it for example to integrate oVirt with Rundeck jobs. So the sdk should be part of epel, in both versions.
Comment 4 Fabrice Bacchella 2017-06-07 11:52 EDT
Created attachment 1285836 [details]
A spec file for dual packaging of sdk on Centos 6/7.
Comment 5 Fabrice Bacchella 2017-06-07 11:55:02 EDT
(In reply to Juan Hernández from comment #2)
> However, if someone is interested in using the Python 3 RPM, then I assume
> that she/he would have already enabled the EPEL repository explicitly, in
> order to install the 'python34' package. So maybe we could just build and
> publish the SDK RPM without modifying the 'ovirt-release' RPM.

I agree, it's to install it on server installed without the full ovirt stack. Just to use it for custom services.
Comment 6 Juan Hernández 2017-06-07 12:06:07 EDT
We don't expect the Fedora RPM to work in CentOS. I pointed to it just to let you know that we do support Python 3, in the SDK in general, and in its RPM packaging.

As you already did the work to adapt the .spec, would you be so kind so prepare a patch and submit it to gerrit.ovirt.org?

Regarding adding the SDK to EPEL (or Fedora) we don't do it because we just don't have enough resources. Do you have Fedora packager permissions? If you do it will be very welcome if you volunteer to add the SDK to both Fedora and EPEL, so that they will be directly available in the distribution.
Comment 7 Fabrice Bacchella 2017-06-07 12:13:57 EDT
I never used gerrit, but I can do a pull request on github.

I don't have Fedora packager permissions, I'm sorry.
Comment 8 Juan Hernández 2017-06-07 12:17:03 EDT
It has to go via gerrit.orvirt.org, github is only a mirror. Using gerrit isn't difficult if you are familiar with git. It is documented here:

  https://www.ovirt.org/develop/dev-process/working-with-gerrit
Comment 9 Fabrice Bacchella 2017-06-15 04:45:46 EDT
Change 77987 is marked as 'Cannot Merge'. But I don't know where is the problem. What can I do to correct that ?
Comment 10 Ondra Machacek 2017-06-15 04:49:32 EDT
Usually when you see 'Cannot Merge' the problem is that it needs a rebase. There is a 'Rebase' button in gerrit UI. So in most cases it's OK to just hit that button. But you may get error something like "can't rebase, because of conflicts". So in that case you need to rebase the patch on your machine and then push new ammended commit.

The problem that it shows the 'Cannot merge' right now, is because there was some patch merged to 'master' branch, so it needs the rebase, because the parent of that patch is outdated.
Comment 11 Oved Ourfali 2017-07-06 02:08:17 EDT
I think we fix the bug if we publish in the oVirt official repositories RPM packages for CentOS and Python 3.
Comment 12 Oved Ourfali 2017-08-21 05:23:18 EDT
Closing as wontfix.
Fabrice, if you have plans to do otherwise, please re-open.
Comment 13 Fabrice Bacchella 2017-09-20 07:39:40 EDT
I'm working on it again.
Comment 14 Yaniv Kaul 2017-11-28 06:59:51 EST
(In reply to Fabrice Bacchella from comment #13)
> I'm working on it again.

Any ETA? Anything we can help with this?
Comment 15 Fabrice Bacchella 2017-11-28 07:16:06 EST
In https://gerrit.ovirt.org/#/c/77987/, it says 'Cannot Merge', I don't know why. Should I rebase and try to resubmit it ?
Comment 16 Yaniv Kaul 2017-11-30 09:21:33 EST
(In reply to Fabrice Bacchella from comment #15)
> In https://gerrit.ovirt.org/#/c/77987/, it says 'Cannot Merge', I don't know
> why. Should I rebase and try to resubmit it ?

Correct - you'll probably need to fix merge conflicts (otherwise it would have allowed to rebase easily).
Comment 17 Fabrice Bacchella 2017-12-11 07:15:27 EST
spec files updated.

Note You need to log in before you can comment on or make changes to this bug.