Bug 1672052 - python-impacket: Readd (sub)packages to Fedora 30+: python2-impacket
Summary: python-impacket: Readd (sub)packages to Fedora 30+: python2-impacket
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-impacket
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PY2REMOVAL
TreeView+ depends on / blocked
 
Reported: 2019-02-03 12:16 UTC by Miro Hrončok
Modified: 2019-04-13 00:04 UTC (History)
3 users (show)

Fixed In Version: python-impacket-0.9.19-1.fc30
Clone Of:
Environment:
Last Closed: 2019-04-13 00:04:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2019-02-03 12:16:41 UTC
In line with the Mass Python 2 Package Removal [0], the following (sub)packages of python-impacket were marked for removal:

 * python2-impacket

According to our query, those (sub)packages only provide a Python 2 importable module. If this is not true, please tell us why, so we can fix our query.

Please remove them from your package.

As said in the change document, if there is no objection in a week, we will remove the package(s) as soon as we get to it. This change might not match your packaging style, so we'd prefer if you did the change. If you need more time, please let us know here.

If you do the change yourself, it would help us a lot by reducing the amount of packages we need to mass change.

We hope this doesn't come to you as a surprise. If you want to know our motivation for this, please read the change document [0].

[0] https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

Comment 1 Miro Hrončok 2019-02-11 11:24:42 UTC
That's the only package. Retired.

Comment 2 Miro Hrončok 2019-04-04 16:01:03 UTC
There were same executables and the package should have not been removed. Sorry about that.

Comment 3 Miro Hrončok 2019-04-04 16:06:45 UTC
Unretirement request https://pagure.io/releng/issue/8260

Comment 4 Fedora Update System 2019-04-08 20:21:53 UTC
python-impacket-0.9.18-4.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-0762303419

Comment 5 Fedora Update System 2019-04-09 01:48:06 UTC
python-impacket-0.9.18-4.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-0762303419

Comment 6 Michal Ambroz 2019-04-09 09:35:42 UTC
The package python2-ldap which was required by python2-impacket package was unfortunately also removed from Fedora.
This will break communication with MS Active Directory of some of the tools.
Please can we roll-back python2-ldap as well?

Thank you
Michal Ambroz

Comment 7 Miro Hrončok 2019-04-09 10:08:40 UTC
python2-ldap was not removed from Fedora.

$ LANG=C.utf-8 dnf repoquery --repo=rawhide -i python2-ldap
Name         : python2-ldap
Version      : 3.1.0
Release      : 4.fc30
Architecture : x86_64
Size         : 215 k
Source       : python-ldap-3.1.0-4.fc30.src.rpm
Repository   : rawhide
Summary      : An object-oriented API to access LDAP directory servers
URL          : http://python-ldap.org/
License      : Python
Description  : python-ldap provides an object-oriented API for working with LDAP within
             : Python programs.  It allows access to LDAP directory servers by wrapping the
             : OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks
             : (including processing LDIF, LDAPURLs, LDAPv3 schema, etc.).

https://fedora.portingdb.xyz/pkg/python-ldap/
https://koji.fedoraproject.org/koji/buildinfo?buildID=1200260

Comment 8 Miro Hrončok 2019-04-09 10:10:21 UTC
So the real issue is:

 Problem: conflicting requests
  - nothing provides python2-ldap3 needed by python2-impacket-0.9.18-4.fc31.noarch
  - nothing provides python2.7dist(ldapdomaindump) needed by python2-impacket-0.9.18-4.fc31.noarch
  - nothing provides python2.7dist(pycryptodomex) needed by python2-impacket-0.9.18-4.fc31.noarch
  - nothing provides python2.7dist(ldap3) >= 2.5.0 needed by python2-impacket-0.9.18-4.fc31.noarch

Comment 9 Miro Hrončok 2019-04-09 10:13:42 UTC
python2-ldap3 / python2.7dist(ldap3) was removed and can be readded.

python2.7dist(ldapdomaindump) never existed in Fedora 28 or 29

python2.7dist(pycryptodomex) was removed and hopefully can be readded.

Comment 11 Miro Hrončok 2019-04-09 10:57:39 UTC
Michal, please let em know what is the ldapdomaindump plan before I merge the PRs and add unnecessary cruft to the poor packages.

Note that master branch of impacket support Python 3 (al least 3.6), so switching is still an option.

Comment 12 Miro Hrončok 2019-04-09 10:57:52 UTC
s/em/me/

Comment 13 Michal Ambroz 2019-04-09 12:16:43 UTC
Hello Miro,
Thanks for additional info. 

> before I merge the PRs and add unnecessary cruft to the poor packages.
Yes you are right - that was the python2-ldap3 and not python2-ldap what the dist.rpmdeplint found:
https://taskotron.fedoraproject.org/artifacts/all/b672c544-5a3c-11e9-bc64-525400fc9f92/tests.yml/itemlogs/python-impacket-0.9.18-4.fc30.armhfp.log
It is used in ntlmrealay.py to relay to LDAP ... functionality probably mostly used only by penetration testers like me. 

Yes it would be nice to get the python2-pycryptodomex restored as well.
That one is much more important to impacket core functionality to work. 

> Michal, please let em know what is the ldapdomaindump plan
This feature can be avoided with the "--no-dump" option to ntlmrelayx.py, but yes you are right, it should be available.
I can prepare the ldapdomaindump package generating both python3 and 2 for f30.
It should probably make even current stable f29 more complete.

The ldapdomaindump will require:
dnspython - https://src.fedoraproject.org/rpms/python-dns/tree/master - still in master
ldap3 - in discussion
pyasn1 - https://src.fedoraproject.org/rpms/python-pyasn1/tree/master - still in master



Best regards
Michal Ambroz

Comment 14 Michal Ambroz 2019-04-09 12:22:14 UTC
> Note that master branch of impacket support Python 3 (al least 3.6), so switching is still an option.
Yes I know (https://github.com/SecureAuthCorp/impacket/issues/600). They just started merging python3 changes to a master
branch week ago, after release of the 0.3.19. 
As it seems they head for python3 for next release, hopefully for F30 we could have support for both python27 and python3,
hopefully fully switch to python3 by F31.

Comment 15 Miro Hrončok 2019-04-09 12:28:22 UTC
> hopefully for F30 we could have support for both python27 and python3

What is the benefit of having both python27 and python3 support in impacket? I genuinely don't know. The scripts will either run on Python 2 or Python 3.

> I can prepare the ldapdomaindump package generating both python3 and 2 for f30.

Technically, you would need a FESCo or FPC exception to do this. But I guess if we do it for F30 only and make it Python 3 only on rawhide, we should be good. How does that sound?

Comment 16 Michal Ambroz 2019-04-09 13:13:02 UTC
> What is the benefit of having both python27 and python3 support in impacket? I genuinely don't know. 
Python2 is known to work.
Python3 is so far best effort, but it is worth to start testing it and report issues back.

>The scripts will either run on Python 2 or Python 3.
We can easily prepare both 2 and 3 versions of the scripts and have a chance to run both.
There could be wmiexec.py linked to wmiexec3.py, and if not working users could revert back to wmiexec2.py

The impacket project in the past heavily relied on how string and bytes worked in python27.
It is expected that the things might not go smothly on the first attempt with python3.

See this is the response from the @asolino on status of python3 support:
https://github.com/SecureAuthCorp/impacket/issues/424

Best regards
Michal Ambroz

Comment 17 Miro Hrončok 2019-04-09 13:54:40 UTC
I see. That I suppose is your call. What do you want me to do here?

I will merge and build the 2 linked PRs when I see it has a point. As long as ldapdomaindump is not packaged or patched out of impacket, it makes no difference.

I realize I've created the "retired by mistake" problem and I am willing to correct my mistake, but this goes way beyond, I haven't removed ldapdomaindump.

Note that adding python2-ldapdomaindump will need an exception, so patching it out might be a better solution given that it was not usable either way before I retired this.

Comment 18 Miro Hrončok 2019-04-09 13:58:23 UTC
See for example this approach https://src.fedoraproject.org/rpms/python-impacket/pull-request/1

Comment 19 Michal Ambroz 2019-04-09 14:09:09 UTC
Yes it does make sense ... the python-impacket was/is now working even without ldapdomaindump.
The ldapdomaindump was needed only for certain command and can be avoided by commandline option.

I will merge it and rebuild with the new upstream release 0.3.19

Comment 20 Miro Hrončok 2019-04-09 14:13:23 UTC
Let me know once you have a build ready for f30, so I can create a joined update.

Comment 21 Michal Ambroz 2019-04-09 23:15:14 UTC
Hello Miro,
I merged your proposal and bumped to 0.9.19, you can progress with the update request
https://koji.fedoraproject.org/koji/taskinfo?taskID=34086071

Thank you
Michal Ambroz

Comment 22 Fedora Update System 2019-04-10 07:14:58 UTC
python-impacket-0.9.19-1.fc30 python-ldap3-2.5.1-7.fc30 python-pycryptodomex-3.8.1-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-0762303419

Comment 23 Fedora Update System 2019-04-12 02:46:39 UTC
python-impacket-0.9.19-1.fc30, python-ldap3-2.5.1-7.fc30, python-pycryptodomex-3.8.1-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-0762303419

Comment 24 Fedora Update System 2019-04-13 00:04:48 UTC
python-impacket-0.9.19-1.fc30, python-ldap3-2.5.1-7.fc30, python-pycryptodomex-3.8.1-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


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