Bug 1379087

Summary: [RFE] Possible python 3 support in EL7
Product: [Fedora] Fedora EPEL Reporter: Ben Rosser <rosser.bjr>
Component: python-daemonAssignee: Fedora Infrastructure SIG <infra-sig>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: infra-sig, kevin, lewk, mail, rbean, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-06 16:13:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Partial patch to make bcfg2 build on EPEL7 none

Description Ben Rosser 2016-09-24 20:21:35 UTC
I am maintaining hddfancontrol (https://admin.fedoraproject.org/pkgdb/package/rpms/hddfancontrol) in Fedora. This is software written in Python 3 with a dependency on python-daemon. I'd like to make it available in EPEL. In order to do so, though, I'd need a version of python-daemon that supports Python 3.

Unfortunately, Python 3 support was only added in python-daemon 2.0, and the current EPEL version is 1.6. I emailed the python-devel@ list asking for guidance and they suggested I contact the python-daemon epel maintainers for suggestions, which is what I am doing here. :)

There's a fork of python-daemon 1.5 that supports Python 3; https://pypi.python.org/pypi/python-daemon-3K. Perhaps it could be packaged for EPEL7 only as python3-daemon? However, 1.5 and 1.6 are not perfectly compatible: some renaming of classes was done in 1.6 (see https://github.com/wting/python-daemon/blob/master/ChangeLog#L137).

Thoughts?

Comment 1 Kevin Fenzi 2016-09-25 19:28:53 UTC
How's the compatibility between 1.6 and 2.0? I assume by the numbers there it's non trivial?

I see the following things in epel7 requiring python-daemon: 

bcfg2-server-0:1.3.4-1.el7.noarch
python-gear-0:0.5.8-1.el7.noarch
python-moksha-hub-0:1.4.6-1.el7.noarch
python2-fedmsg-consumers-0:0.17.2-1.el7.noarch

The last three we can adjust if needed, but I would be a bit concerned by bcfg2. Can you do a 2.0 test build and see if bcfg2 can work with it?

Comment 2 Ben Rosser 2016-10-10 23:48:21 UTC
Created attachment 1208970 [details]
Partial patch to make bcfg2 build on EPEL7

Comment 3 Ben Rosser 2016-10-10 23:48:32 UTC
I'm not sure how 1.6 -> 2.0 is in terms of API compatibility; the changelog [1] suggests that a lot changed, but unlike the 1.5 -> 1.6 changes where a class was renamed, it's not immediately

I've built python-daemon 2.0.6 for EPEL7 in a Copr [2]. However I can't even get bcfg2 to build in mock at the moment against python-daemon 1.6. I had to patch the spec to change the names of some python dependencies (?) and add a dependency on httpd-devel to use the _httpd_confdir macro. (See attached patch). I'm now getting the following unit test failure:

======================================================================
ERROR: test_set_secontext (Testlib.TestClient.TestTools.TestPOSIX.TestAugeas.TestPOSIXTool)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/builddir/build/BUILD/bcfg2-1.3.6/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py", line 479, in test_set_secontext
    self.assertTrue(ptool._set_secontext(entry))
  File "/builddir/build/BUILD/bcfg2-1.3.6/src/lib/Bcfg2/Client/Tools/POSIX/base.py", line 288, in _set_secontext
    secontext = selinux.lgetfilecon(path)[1].split(":")[2]
OSError: [Errno 2] No such file or directory

[1] https://copr.fedorainfracloud.org/coprs/tc01/python-daemon-epel/

[2] https://copr.fedorainfracloud.org/coprs/tc01/python-daemon-epel/

Comment 4 Ben Rosser 2016-10-10 23:49:06 UTC
Er, sorry, link [1] there should be to https://paste.fedoraproject.org/448316/76143115/ (the changelog).

Anyway, I'll take another look at that unit test failure when I have more time.

Comment 5 Kevin Fenzi 2016-10-11 15:28:38 UTC
Upon looking... bcfg2 is orphaned. 

https://admin.fedoraproject.org/pkgdb/package/rpms/bcfg2/

so, I guess don't spend anymore time on it. ;)

Comment 6 Kevin Fenzi 2017-11-07 20:15:03 UTC
Sorry this has languished. Is it still desired?

Comment 7 Ben Rosser 2019-09-06 16:13:52 UTC
Going through tickets on my bug list... I thought I had replied to this. :(

No, it's no longer necessary (I decided not to use hddfancontrol on my EPEL7 box that would have needed it). I'll close this out.