[winswitch] Packaging mistake for Fedora

Santiago Saavedra santiagosaavedra at gmail.com
Thu Aug 21 12:29:03 BST 2014


Hi!

I'm recently new to the list, although I've been using xpra for a
while already. I've noticed recently though that the Fedora RPM
repository now contains a package called "netifaces", which is
required by xpra/winswitch.

I'm sorry if this has already been brought to attention, but I didn't
find it in the list archives. And please, redirect me to relevant
documents or arguments if you really think I'm wrong, but I'm acting
on good faith here.

I honestly think packaging netifaces (and requiring it from xpra) is a mistake.

The netifaces python package is already available in the Fedora
official repositories with the name python-netifaces, at version 0.5.
Its name is python-netifaces as per the Fedora Packaging
Guidelines/Python [1].

The officially-provided package provides the netifaces python module
in the usual PYTHONLIB directory. Your package does the same, so both
packages (xpra's netifaces and fedora's python-netifaces) cannot be
installed at the same time. Thus, packages expecting the
officially-named module cannot be installed on a Fedora machine along
xpra.

If your xpra/winswitch really need the netifaces module at a higher
version, I would recommend first to comment in fedora's bugzilla [2]
so that an updated netifaces specfile gets used (so that it gets built
upstream by koji and every official package is updated and
dependency-tested against).

If that's not an option, and you would prefer all of us to have the
updated netifaces version, at least you can package it naming it after
the guidelines, and thus, if other packages from other repos may
require that python module (if they don't request a specific version)
can be installed along xpra.

This is not a theoretic problem, the calibre package Requires:
python-netifaces. And I happen to use it, so I noticed :)

For anyone experiencing this problem, my current solution was to
download from xpra's sources the netifaces.spec file, and change:

1. The package Name to be
> Name: python-netifaces

2. Download from PyPI the python-netifaces-0.10.4.tar.gz [3]

3. Accordingly, in the %prep section, change the %setup line to

> %setup -q -n netifaces-%{version}

4. Add a line to provide the netifaces requirement so that I don't
need to rebuild other xpra packages while keeping calibre et al happy

> Provides: netifaces

This 4th line should not be necessary once xpra's packages are updated
to something like

> Require: python-netifaces >= 0.10.4

Warning: I have not checked the Guidelines for this spec file, as I
just took the one created in xpra's repo. I would advise to use the
currently approved package in fedora's repo [4].

If you provide a python-netifaces pacakge in xpra's repository then if
Fedora eventually packages an updated version upstream we users would
be able to upgrade those dependencies in a more independent way, while
keeping all "depended" packages happy.


Thanks for the efforts anyway;
I hope this is useful,
Santiago.

[1]: https://fedoraproject.org/wiki/Packaging:Python
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=856388
[3]: https://pypi.python.org/packages/source/n/netifaces/netifaces-0.10.4.tar.gz#md5=36da76e2cfadd24cc7510c2c0012eb1e
[4]: https://apps.fedoraproject.org/packages/python-netifaces/sources/spec



More information about the shifter-users mailing list