Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide pywinrm RPM in Fedora/EPEL repos #48

Closed
luisfdez opened this issue Jan 19, 2015 · 12 comments
Closed

Provide pywinrm RPM in Fedora/EPEL repos #48

luisfdez opened this issue Jan 19, 2015 · 12 comments

Comments

@luisfdez
Copy link

Hi @diyan,

I find pywinrm an awesome library to interact with Windows, that's why I'm using it as part of a pull request to oz (clalancette/oz#174) to implement the customization phase for Windows guests.

Unfortunately, one of the stoppers for the PR is that pywinrm is not packaged in the Fedora/EPEL repositories, where the oz RPM and its dependencies are available.

Said that, what do you think about adding support to package pywinrm as an RPM make it available in Fedora/EPEL? (more info: https://fedoraproject.org/wiki/Join_the_package_collection_maintainers)

Thanks!

@alexpilotti
Copy link
Contributor

+1 :)

@diyan
Copy link
Owner

diyan commented Jan 20, 2015

@luisfdez @alexpilotti Honestly I don't have any experience in packaging. Moreover, I'm mostly working on Arch Linux at home + Ubuntu at work and not quite familiar with Fedora/RedHat/CentOS family.

It could be a good exercise for me as for developer to work on this feature, so I'm pretty much open to this.

The only thing I need is some good links to best practices in packaging for all major Linux distribution - Fedora/RedHat/CentOS, Ubuntu/Debian, Arch Linux (optional), Gentoo Linux (optional).

I don't want to provide a package only for Fedora because it would be unfair to other users.

Looking forward for your help on this.

@luisfdez
Copy link
Author

luisfdez commented Feb 3, 2015

Ok @diyan, I'm taking a look to the packaging guidelines for python libraries in Fedora first (as it's the one I know better), and then we can take a look to Debian based distros.

Thanks again for your work 👍

@luisfdez
Copy link
Author

Hi @diyan, just to keep you update... I didn't abandon this topic, but I'm just busier than usual.

FYI, I successful build in Fedora tested:
http://koji.fedoraproject.org/koji/taskinfo?taskID=9499147

I need to improve some things as I want to properly ship also packages for both python2/python3.

I'll keep you updated.

Cheers,
Luis

@opoplawski
Copy link

I started looking at packaging as well, but I think issue #57 needs to be addressed first - proper release tags, and LICENSE and README.md including in the tarballs.

@pstrzelczak
Copy link

+1
The environment I work at does not allow non-RPM software.

@bensherman
Copy link

+1 - all of the RPM/EPEL infrastructure is in place where I work, it would be great to get pywinrm into it.

@hogarthj
Copy link

hogarthj commented Oct 25, 2016

Hi guys - I've picked up package maintenance of this in Fedora

It's now in the testing repos for F23+ and EPEL7 ... I'm working on EPEL6 as well but tests are failing there and until I've got to the bottom of why I'm not prepared to push it.

If there's any idea why it's failing it would help :)

https://kojipkgs.fedoraproject.org//work/tasks/7477/16197477/build.log

Note that RHEL/CentOS6 has python-requests 2.6.0-3 and I'm not sure right now what, if anything, RH has backported from later versions. I note that the setup.py specifies a 2.9.1 minimum - is there a specific reason for this?

As python-requests is in the base repositories we cannot have a later version in EPEL and if this is a hard dependency that cannot be worked around then python-winrm can't be packaged for EPEL6 - though users can use a Fedora or EPEL7 control system where it does work.

@diyan
Copy link
Owner

diyan commented Dec 20, 2016

@hogarthj We are going to tag v0.2.2 release. Could you work on packages for EPEL? It would be awesome if you can prepare two packages - one for Python 2 and another for Python 3. Like Debian folks are planning to do. You can track status here - #57

@hogarthj
Copy link

@diyan I'll pick this up in the next day or so for the 0.2.2 release

I can't remember which dependency it was but one of them wasn't being built for python3 in EPEL, just Fedora.

I'll review the requirements again and see what I can do for a python3 EPEL7 build.

Note that in fedora we build both python2 and python3 RPMs from the same python-winrm source

I see you've added credssp support in this - we don't have that packaged yet so that'll be something new to pick up as well and will need to go through our package review process.

@diyan
Copy link
Owner

diyan commented Dec 21, 2016

@hogarthj Thanks. Please note there are two set of dependencies:

  1. Required - https://github.com/diyan/pywinrm/blob/v0.2.2/setup.py#L26
  2. Optional (aka extras) - https://github.com/diyan/pywinrm/blob/v0.2.2/setup.py#L27

So, 'pip install pywinrm==0.2.2' installs basic version of pywinrm in pure Python.
In such way we have maximum portability across OSes, Linux distributions, etc.

At the same time user can install extras that requires gcc, python-devel packages in Fedora plus may require some bindings to the C libraries.

See more info here: https://github.com/diyan/pywinrm#to-use-kerberos-authentication-you-need-these-optional-dependencies

Does Fedora / CentOS / RHEL has alternative to the Debian's suggested/recommended packages?

If not, what is the best way to let Fedora user choose between basic and extras?

@hogarthj
Copy link

We do have the concept of recommends and suggests (the former installed by default when dnf install python-winrm is used and the latter not) ... though that isn't supported in EPEL and is infrequently used as "weak dependencies" were only recently added to Fedora.

The README is also copied over so users can see there if they want kerberos they shoudl install the requests-kerberos python module.

That said, the README you guys have specifies using pip for it which naturally we don't 'support' on Fedora/EPEL as it has a nasty tendency to mess with RPM install stuff.

What I'll probably do in this release is add a README.fedora with fedora/epel specific stuff like I do with the owncloud packages and mention installing python{2,3}-requests-kerberos there for kerberos usage.

Since we ship compiled stuff in the RPMs there's no need for gcc, python-devel etc then on fedora systems to make use of kerberos.

As it stands right now $user does a dnf install python-winrm (for the python2 version or python3-winrm for the py3 one) and then they have that installed ready to use with ansible or whatever.

If they want kerberos rather than the ntlm3 auth then they'll need to install python-requests-kerberos manually and then configure whatever they need to make use of their tokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants