Bug 1192111 - Build nfs-utils with Python 3
Summary: Build nfs-utils with Python 3
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F23PYTHON3 1194577
TreeView+ depends on / blocked
 
Reported: 2015-02-12 16:04 UTC by Bohuslav "Slavek" Kabrda
Modified: 2015-07-26 21:52 UTC (History)
6 users (show)

Fixed In Version: nfs-utils-1.3.2-11.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-26 21:52:46 UTC


Attachments (Terms of Use)
Use python 3 explicitly in nfs-utils scripts (602 bytes, patch)
2015-02-18 09:58 UTC, Bohuslav "Slavek" Kabrda
no flags Details | Diff
Patch for specfile to replace all shebangs to Python 3 (1.42 KB, patch)
2015-07-13 15:05 UTC, Miro Hrončok
no flags Details | Diff

Description Bohuslav "Slavek" Kabrda 2015-02-12 16:04:02 UTC
Hi, as per [1], I'd like to ask you to switch to building with Python 3. nfs-utils upstream is Python 3 compatible, so this should be a simple matter of switching from Python 2 to Python 3. Please do this for both F22 and rawhide. Feel free to contact me if you need help.
Note: the only thing causing dependency of Python 2 is the "#!/usr/bin/python" hashbang in several scripts - you should just replace it with "#!/usr/bin/python3".
Thanks.

[1] https://fedoraproject.org/wiki/Changes/Python_3_Migration_Improvements

Comment 1 Steve Dickson 2015-02-12 17:04:49 UTC
(In reply to Bohuslav "Slavek" Kabrda from comment #0)
> Hi, as per [1], I'd like to ask you to switch to building with Python 3.
> nfs-utils upstream is Python 3 compatible, so this should be a simple matter
> of switching from Python 2 to Python 3. Please do this for both F22 and
> rawhide. Feel free to contact me if you need help.
> Note: the only thing causing dependency of Python 2 is the
> "#!/usr/bin/python" hashbang in several scripts - you should just replace it
> with "#!/usr/bin/python3".
> Thanks.
> 
> [1] https://fedoraproject.org/wiki/Changes/Python_3_Migration_Improvements

Could you give me a patch(s) of what you are looking for?

Comment 2 Bohuslav "Slavek" Kabrda 2015-02-18 09:58:51 UTC
Created attachment 993042 [details]
Use python 3 explicitly in nfs-utils scripts

Something like this should do the trick.

Comment 3 Steve Dickson 2015-02-19 15:55:53 UTC
(In reply to Bohuslav "Slavek" Kabrda from comment #2)
> Created attachment 993042 [details]
> Use python 3 explicitly in nfs-utils scripts
> 
> Something like this should do the trick.

From our IRC conversation you are suggesting this change does not 
need to go upstream? I'm not sure diverting from upstream is
a good idea...

Comment 4 Bohuslav "Slavek" Kabrda 2015-02-20 07:32:00 UTC
(In reply to Steve Dickson from comment #3)
> (In reply to Bohuslav "Slavek" Kabrda from comment #2)
> > Created attachment 993042 [details]
> > Use python 3 explicitly in nfs-utils scripts
> > 
> > Something like this should do the trick.
> 
> From our IRC conversation you are suggesting this change does not 
> need to go upstream? I'm not sure diverting from upstream is
> a good idea...

I don't think it needs to go there. There are still distros that don't ship Python 3 and upstream may want to stay compatible with them out of the box. Having Python 3 as default is Fedora's downstream change, so IMO this is ok to keep downstream.

Comment 5 Bohuslav "Slavek" Kabrda 2015-02-23 07:04:22 UTC
Steve, can this be built today, please? I really need to have this finished by tomorrow because of change freeze deadline. I uploaded a srpm with the patch to my fedorapeople space [1], you can just "fedpkg import" it and build on rawhide and F22. Thanks.

[1] https://bkabrda.fedorapeople.org/nfs-utils-1.3.2-0.3.fc23.src.rpm

Comment 6 Bohuslav "Slavek" Kabrda 2015-02-23 12:21:54 UTC
Ok, so it seems that we'll have to revert after all for F22 [1]. Please only build this for F23 (so this doesn't need to be built today). Thanks.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1194577#c4

Comment 7 Steve Dickson 2015-03-06 13:36:57 UTC
(In reply to Bohuslav "Slavek" Kabrda from comment #6)
> Ok, so it seems that we'll have to revert after all for F22 [1]. Please only
> build this for F23 (so this doesn't need to be built today). Thanks.
> 
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1194577#c4

This being the case I will not make this change until f22 is released
because I like to git cherry-pick between rawhide and the pre-released
branch (in this case f22)

Comment 8 Bohuslav "Slavek" Kabrda 2015-03-06 13:45:40 UTC
(In reply to Steve Dickson from comment #7)
> (In reply to Bohuslav "Slavek" Kabrda from comment #6)
> > Ok, so it seems that we'll have to revert after all for F22 [1]. Please only
> > build this for F23 (so this doesn't need to be built today). Thanks.
> > 
> > [1] https://bugzilla.redhat.com/show_bug.cgi?id=1194577#c4
> 
> This being the case I will not make this change until f22 is released
> because I like to git cherry-pick between rawhide and the pre-released
> branch (in this case f22)

Ok, that's fine by me. Thanks!

Comment 9 Robert Kuska 2015-07-03 07:44:35 UTC
Hi Steve,

please switch the shebang of mountstats to /usr/bin/python3. Our system wide change was accepted by FESCO for Fedora23.

Comment 10 Miro Hrončok 2015-07-13 15:05:44 UTC
Created attachment 1051456 [details]
Patch for specfile to replace all shebangs to Python 3

This is a patch for nfs-utils.spec that changes all the shebangs to /usr/bin/python3. I've also made a scratch build here:

http://koji.fedoraproject.org/koji/taskinfo?taskID=10340142

Comment 11 Miro Hrončok 2015-07-17 09:37:11 UTC
Would you mind if I push this to dist git?

Comment 12 Steve Dickson 2015-07-18 14:21:21 UTC
(In reply to Miro Hrončok from comment #11)
> Would you mind if I push this to dist git?

Shouldn't this go through upstream first or is
a fedora only thing (which I hope is not the case)?

Comment 13 Miro Hrončok 2015-07-18 16:39:43 UTC
Upstream now supports both Python 2 and Python 3. It's downstream's choice what version to use and unfortunately, the shebang line has to be set manually.

Comment 14 Miro Hrončok 2015-07-23 08:38:37 UTC
Steve? Alpha freeze is on Tuesday, I'd prefer not to do this the last day possible.

Comment 15 Miro Hrončok 2015-07-26 21:52:46 UTC
OK, since the alpha freeze is coming and I haven't hear a reply, I've built it.

The rawhide build failed, probably because of new rpm, open a bz1246911.


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