Bug 984907 - authconfig Python 3 compatibility
authconfig Python 3 compatibility
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: authconfig (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On: 963839
Blocks: F23PYTHON3 PY3ANACONDA
  Show dependency treegraph
 
Reported: 2013-07-16 06:55 EDT by Bohuslav "Slavek" Kabrda
Modified: 2015-06-01 08:21 EDT (History)
4 users (show)

See Also:
Fixed In Version: authconfig-6.2.10-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-06-01 08:21:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Python 3 compatibility patch for authconfig (46.56 KB, patch)
2015-01-22 08:32 EST, Bohuslav "Slavek" Kabrda
no flags Details | Diff

  None (edit)
Description Bohuslav "Slavek" Kabrda 2013-07-16 06:55:30 EDT
Hi,
is there any plan/estimate of making authconfig compatible with Python 3? I'm currently trying to figure out what it'd take to move Fedora to Python 3 and since authconfig is one of Anaconda's deps, it'd need to be converted as one of the first.
Thanks.
Comment 1 Tomas Mraz 2013-07-16 08:26:13 EDT
There is currently no plan yet. However I don't expect the conversion to be too hard we just need to find the resources. I have no idea whether the dependencies are Python 3 compatible though.
newt-python pygtk2-libglade are the dependencies
Comment 2 Bohuslav "Slavek" Kabrda 2013-07-16 09:10:02 EDT
Looking at your dependencies:
- newt-python does not work on Python 3, bug #963839 requests that
- pygtk2 was never meant to work on Python 3, you'd need to use pygobject instead. There is some info on porting at [1].

[1] https://wiki.gnome.org/PyGObject/IntrospectionPorting
Comment 3 Tomas Mraz 2013-07-16 09:29:36 EDT
Hmm, that makes it a larger project then though - probably together with moving the ui to GTK-3.

I am afraid that I won't find time to work on this in the near future.
Comment 4 Fedora End Of Life 2013-09-16 10:31:58 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Comment 5 Miro Hrončok 2013-10-02 07:33:56 EDT
Hi, we would like to use Python 3 on the default installation instead of Python 2 on Fedora 22.

From that perspective, your package is considered as IMPORTANT - that means, is has to be updated to Python 3, for our intention come true.

The goal here is, that this package uses Python 3 as default in Fedora 22.

Please, help use update to Python 3 flawlessly.

Check if upstream already support Python 3, if yes, use it and add te support to the package.

If upstream doesn't support Python 3 yet, encourage it to do so by sending patches and offering your help.

When upstream is dead or unwilling to support Python 3, you'll need to patch this package on Fedora level. Try to avoid this as much as you can, but use it, if it's the last option.

Chances are, that you ARE the upstream. In that case, everything is easier, just do it yourself.

Once Python 3 is supported, check your package, if it works with it. Don't switch to Python 3 yet as a default (that's still against the guidelines). I recommend to prepare your spec and conditionalize the thing with something like %global default_python 2/3.

There is a table on wiki, that should list your package. Chances are, that you can see an upstream link that covers the problem. Anyway, please update the table with information you know.

https://fedoraproject.org/wiki/User:Churchyard/python3

I offer my help with this task, so if you have no idea, how to work on this, or it is just not your priority, don't hesitate to ask for help.

(As you've already realized, this is a bulk text, so if something is not quite exact about your package, sorry for that, just ask)
Comment 6 Toshio Ernie Kuratomi 2013-10-02 18:01:11 EDT
Note: do not follow this advice as it is against the Packaging Guidelines: "When upstream is dead or unwilling to support Python 3, you'll need to patch this package on Fedora level. Try to avoid this as much as you can, but use it, if it's the last option."

If you are in this situation, you'll essentially be forking upstream in order to produce a python3 port.  In that situation, the proper thing to do is to create a new package with the python3 port.  It would be even better to create the proper upstream infrastructure as well (new upstream scm and issue tracker) but that isn't 100% required by the guidelines.
Comment 7 Tomas Mraz 2013-10-03 04:23:44 EDT
Python 3 support in authconfig must be done upstream which is not a problem as we own it. The problem is with coding work needed to change the authconfig sources to support it - I am currently out of time for such project.
Comment 8 Tomas Mraz 2014-02-12 10:11:53 EST
I've discussed with the SSSD team that the need for having authconfig in the distribution should be minimized and in general it should be replaced with only simple PAM configuration library and some kind of new tools built upon SSSD and realmd.
Comment 9 Bohuslav "Slavek" Kabrda 2014-06-26 09:10:55 EDT
(In reply to Tomas Mraz from comment #8)
> I've discussed with the SSSD team that the need for having authconfig in the
> distribution should be minimized and in general it should be replaced with
> only simple PAM configuration library and some kind of new tools built upon
> SSSD and realmd.

Hi, I'd like to ask what the state of this issue is. Will authconfig be replaced for F22? If not, I can find some spare cycles to help with authconfig porting (although I can't promise to do everything). Thanks!
Comment 10 Tomas Mraz 2014-06-26 09:21:47 EDT
It was not fully decided yet so if you want to look at the authconfig code, please do.
I am not sure whether removal of authconfig can happen for F22 as implementation of the replacement code has not started yet.
Comment 11 Bohuslav "Slavek" Kabrda 2015-01-22 08:32:13 EST
Created attachment 982808 [details]
Python 3 compatibility patch for authconfig

Hi, I'm attaching a patch that makes authconfig compatible and buildable with Python 3. Note that it only deals with the "library" part, the Gtk app was not ported.
We only need the library part on livecd, so it should be possible to create a subpackage python3-authconfig, that would provide the python3 bindings the same way that current "authconfig" package provides bindings for python 2.
Note, that I'm not absolutely sure that I did everything right - there's no test suite. I did some smoke tests and everything seemed fine, but there may still be some bugs...

Thanks for going through this!
Comment 12 Bohuslav "Slavek" Kabrda 2015-02-18 05:02:05 EST
Hi, can you please do this before the deadline for Changes for F22? Otherwise we'd probably have to postpone even https://fedoraproject.org/wiki/Changes/Python_3_Migration_Improvements. Thanks.
Comment 13 Tomas Mraz 2015-02-18 05:40:56 EST
Unfortunately I probably will not be able to do that. I certainly cannot promise it.
Comment 14 Tomas Mraz 2015-02-20 11:04:04 EST
So there is an attempt in both rawhide and F22 to achieve this very partial migration. authconfig depends on python3, authconfig-gtk depends on python2. Whether it works correctly though I am not sure.
Comment 15 Bohuslav "Slavek" Kabrda 2015-02-23 01:16:21 EST
Thanks a lot. I'll try to do some more testing so that we can fix any possible issues during F22 alpha.
Comment 16 Bohuslav "Slavek" Kabrda 2015-02-23 07:29:01 EST
So we'll need to revert this after all for F22 [1]. Thanks for doing this and please leave this change only in F23.
Thanks.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1194577#c4
Comment 17 Jaroslav Reznik 2015-03-03 09:58:23 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Comment 18 Robert Kuska 2015-06-01 08:21:29 EDT
Authconfig is built with python3 in rawhide.

Closing.

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