Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 702288

Summary: net-analyzer/nmap USE ndiff and zenmap should support Python 3, USE zenmap depends on dev-python/pygtk
Product: Gentoo Linux Reporter: Ogelpre <gentoo.org>
Component: Current packagesAssignee: Sam James <sam>
Status: RESOLVED FIXED    
Severity: normal CC: anton.bugs, anton.kochkov, bertrand, creideiki+gentoo-bugzilla, dev, dilfridge, gentoo.org, gentoo, mpagano, sam, tgbugs, thomas.bettler, zagazaw2004, zlogene
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/nmap/nmap/issues/1176
https://github.com/nmap/nmap/pull/1807
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 694800, 706462    
Attachments: nmap ebuild patch
debian python3 patch
missing configure python3 patch (written by me)

Description Ogelpre 2019-12-08 15:25:54 UTC
net-analyzer/nmap depends on Python 2.7. Official support for Python 2.7 will end on 2020-01-01.

Reproducible: Always
Comment 1 Laslo Hunhold 2019-12-08 16:58:14 UTC
This[0] is the upstream issue tracker. It seems like they have the common issue of having to port pygtk to GObject Introspection and GTK3, however, not much activity is visible.

The affected modules are Zenmap and ndiff, whereas the latter has already a pull request going on the former seems to have made little progress.

If it gets serious we might want to think about adding a python USE-flag for nmap that strips zenmap (and possibly ndiff, if the PR doesn't get through) so the python2-dependency can be dropped out at least conditionally.

[0]: https://github.com/nmap/nmap/issues/1176
[1]: https://github.com/BryanQuigley/nmap/commit/fe8dc174e20714663926b126f13acacefce1c5c6
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2019-12-08 17:02:46 UTC
(In reply to Laslo Hunhold from comment #1)
> This[0] is the upstream issue tracker.

> [0]: https://github.com/nmap/nmap/issues/1176

I added that URL to the [See also] before you wrote that.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2019-12-08 17:04:52 UTC
(In reply to Laslo Hunhold from comment #1)
> If it gets serious we might want to think about adding a python USE-flag for
> nmap that strips zenmap (and possibly ndiff, if the PR doesn't get through)
> so the python2-dependency can be dropped out at least conditionally.

Or just mask USE=ndiff USE=zenmap along with python2_7. No "stripping" required, whatever that means.
Comment 4 Laslo Hunhold 2019-12-08 17:14:14 UTC
(In reply to Jeroen Roovers from comment #3)
> I added that URL to the [See also] before you wrote that.

My bad, I didn't see that until I posted the response.

> Or just mask USE=ndiff USE=zenmap along with python2_7. No "stripping"
> required, whatever that means.

Yes, that is much more reasonable. Sorry for the noise.
Comment 5 Mike Pagano gentoo-dev 2020-01-16 14:11:15 UTC
Would a potential course of action for the ebuild be to not pull in python2 if -zenmap and -ndiff are set?
Comment 6 Anton Bolshakov 2020-01-17 04:46:34 UTC
Created attachment 603558 [details, diff]
nmap ebuild patch
Comment 7 Anton Bolshakov 2020-01-17 04:47:12 UTC
Created attachment 603560 [details, diff]
debian python3 patch
Comment 8 Anton Bolshakov 2020-01-17 04:47:50 UTC
Created attachment 603562 [details, diff]
missing configure python3 patch (written by me)
Comment 9 Anton Bolshakov 2020-01-17 04:55:47 UTC
Hello, I attached debian patch which ports ndiff only. 
zenmap is dropped completely as a full redesign required and it's better to wait for the upstream.

Alternatively, you can drop both ndiff/zenmap temporary. These are not important packages and not required by majority of users.
Comment 10 Andreas Sturmlechner gentoo-dev 2020-03-22 21:52:52 UTC
Would the netmon herd please step up?
Comment 11 Andreas Sturmlechner gentoo-dev 2020-05-21 21:03:38 UTC
(In reply to Anton Bolshakov from comment #9)
> Hello, I attached debian patch which ports ndiff only.
Thanks, but patch is much too big.

Both Debian and Fedora disable these features. Then we can do too.
Comment 12 Anton Bolshakov 2020-05-22 00:59:05 UTC
(In reply to Andreas Sturmlechner from comment #11)
> (In reply to Anton Bolshakov from comment #9)
> > Hello, I attached debian patch which ports ndiff only.
> Thanks, but patch is much too big.

That's what she said?
The size should not matter. It's about the complexity of the patch.
If you look at the changes, they are trivial. The main change is converting u"String" to just "String" since it is default in Python3.

The changes are trivial.
Comment 13 Andreas Sturmlechner gentoo-dev 2020-05-22 09:58:04 UTC
For a maintainer that is not responding, no I am not going to add that patch.
Comment 14 Larry the Git Cow gentoo-dev 2020-05-22 10:51:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fd149287f841fb4090d59867d66b76d38775b37

commit 9fd149287f841fb4090d59867d66b76d38775b37
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-05-21 21:13:49 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-05-22 10:51:43 +0000

    net-analyzer/nmap: Drop IUSE ndiff, nls, zenmap
    
    Closes: https://bugs.gentoo.org/702288
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 net-analyzer/nmap/nmap-7.80-r1.ebuild | 64 +++++------------------------------
 net-analyzer/nmap/nmap-9999.ebuild    | 62 ++++-----------------------------
 2 files changed, 15 insertions(+), 111 deletions(-)
Comment 15 Tom Gillespie 2022-12-08 02:11:34 UTC
Upstream has merged python3 support https://github.com/nmap/nmap/commit/24b26317c77fb6ea3db64d47f6be177af89eb6ba and the change is listed in https://nmap.org/changelog.html, so it looks like it will be in the next release.
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-09 15:21:06 UTC
(In reply to Tom Gillespie from comment #15)
> Upstream has merged python3 support
> https://github.com/nmap/nmap/commit/24b26317c77fb6ea3db64d47f6be177af89eb6ba
> and the change is listed in https://nmap.org/changelog.html, so it looks
> like it will be in the next release.

Thanks - although I only noticed your comment by accident, as the bug was assigned to its old maintainers (we don't reassign closed bugs).

I appreciate such heads ups, but in future, please file a new bug & reference the old one to make sure I catch it.
Comment 17 Larry the Git Cow gentoo-dev 2022-12-09 16:50:26 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=350458ecda5f78ef834191b50029b1e48548f188

commit 350458ecda5f78ef834191b50029b1e48548f188
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-09 16:04:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-09 16:48:40 +0000

    net-analyzer/nmap: restore ndiff, zenmap (now Python 3) to live
    
    Bug: https://bugs.gentoo.org/702288
    Signed-off-by: Sam James <sam@gentoo.org>

 net-analyzer/nmap/files/nmap-9999-python3.patch | 103 ++++++++++++++++++++++++
 net-analyzer/nmap/metadata.xml                  |   2 +
 net-analyzer/nmap/nmap-9999.ebuild              |  74 ++++++++++++-----
 3 files changed, 157 insertions(+), 22 deletions(-)
Comment 18 jospezial 2022-12-16 04:02:11 UTC
https://github.com/nmap/nmap/commit/87778f769398f2974a95469444d06215a663654a
Please remove the nmap-9999-python3.patch in nmap-9999.ebuild!
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-16 04:02:32 UTC
(In reply to jospezial from comment #18)
> https://github.com/nmap/nmap/commit/87778f769398f2974a95469444d06215a663654a
> Please remove the nmap-9999-python3.patch in nmap-9999.ebuild!

Thanks.
Comment 20 Larry the Git Cow gentoo-dev 2022-12-16 04:03:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=596a1d015f482ba524a8e9ca791841c190df1804

commit 596a1d015f482ba524a8e9ca791841c190df1804
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-16 04:03:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-16 04:03:00 +0000

    net-analyzer/nmap: drop upstreamed python3 patch in live
    
    Bug: https://bugs.gentoo.org/702288
    Signed-off-by: Sam James <sam@gentoo.org>

 net-analyzer/nmap/nmap-9999.ebuild | 1 -
 1 file changed, 1 deletion(-)
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-21 18:34:04 UTC
*** Bug 906881 has been marked as a duplicate of this bug. ***
Comment 22 Larry the Git Cow gentoo-dev 2023-05-21 18:36:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77eba6f506b1f629034647c8b7debcba8d599a6a

commit 77eba6f506b1f629034647c8b7debcba8d599a6a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-21 18:33:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-21 18:35:58 +0000

    net-analyzer/nmap: add 7.94
    
    Bug: https://bugs.gentoo.org/906881
    Closes: https://bugs.gentoo.org/702288
    Signed-off-by: Sam James <sam@gentoo.org>

 net-analyzer/nmap/Manifest         |   3 +
 net-analyzer/nmap/nmap-7.94.ebuild | 184 +++++++++++++++++++++++++++++++++++++
 net-analyzer/nmap/nmap-9999.ebuild |  23 ++---
 3 files changed, 199 insertions(+), 11 deletions(-)