Bug 1493738 - Review Request: python-xappy - The "xappy" python module is an easy-to-use interface to the Xapian search engine
Summary: Review Request: python-xappy - The "xappy" python module is an easy-to-use in...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-20 19:25 UTC by Clement Verna
Modified: 2017-11-16 20:35 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-11-16 20:35:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Clement Verna 2017-09-20 19:25:21 UTC
Spec URL: https://cverna.fedorapeople.org/python-xappy.spec
SRPM URL: https://cverna.fedorapeople.org/python-xappy-0.6.0-0.11.src.rpm
Description: The "xappy" python module is an easy-to-use interface to the Xapian
search engine. Xapian provides a low level interface, dealing with terms
and documents, but not really worrying about where terms come from, or
how to build searches to match the way in which data has been indexed. In
contrast, "xappy" allows you to design a field structure, specifying what
kind of information is held in particular fields, and then uses this
field structure to index data appropriately, and to build and perform
searches.
Fedora Account System Username: cverna

I would like to unretire python-xappy as it is needed to run the fedora-packages application (https://apps.fedoraproject.org/packages/). I ll be looking after fedora-packages and therefore python-xappy.

This is my first package and I need a sponsor :)

Comment 1 Clement Verna 2017-09-20 19:28:22 UTC
I did a scrath build in koji for both f26 and epel7

https://koji.fedoraproject.org/koji/tasks?state=all&owner=cverna&view=tree&method=all&order=-id

Comment 2 Clement Verna 2017-09-20 19:41:39 UTC
Original review https://bugzilla.redhat.com/show_bug.cgi?id=785416

Comment 3 Athos Ribeiro 2017-09-20 23:35:32 UTC
Hi Clement,

- Why did you move upstream to pagure? Are you forking the project?

- Check the python packaging guidelines [1], you are supposed to specify the python version your package is packaged for in the name of the binary packages. If this is a python2 only package, you should only build python2-xappy (in this case, you can rename the package).

- Use the macros that support versions.

- Use the build and install macros
  %pyX_build
  %pyX_install

- If that sed command in %prep is removing shebangs from those files, it would be nice to have a comment there saying so, since all the command says is that it is removing the first line of each file.

- The license file should be under %license, not %doc

- You want to use the %{?dist} tag after the release

- It seems that version 0.6 used to be a pre-release (under development), any comments here? Check the version guidelines [3] for pre-releases and make sure your new release is greater than the last one released before this package was retired.

- You may remove the Group tag, this is not used in Fedora

Checking the example common spec in the python packaging guidelines will help you rewriting this spec file [2].

During this package review, it would be nice if you performed a few informal package reviews (you can post links for them here in this thread) to show us that you can read, understand and apply our packaging guidelines.

[1] https://fedoraproject.org/wiki/Packaging:Python
[2] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file
[3] https://fedoraproject.org/wiki/Packaging:Versioning

Comment 4 Athos Ribeiro 2017-09-20 23:53:45 UTC
Also, note that the provided package fails to build, you have:

%setup -q -n %{modname}-%{version}dev-r%{svnrev}

where %{svnrev} is not defined.

Comment 5 Clement Verna 2017-09-21 17:19:58 UTC
Updated Spec and SRPM
Spec URL: https://cverna.fedorapeople.org/python-xappy.spec
SRPM URL: https://cverna.fedorapeople.org/python2-xappy-0.6.0-0.11.fc26.src.rpm

-Why did you move upstream to pagure? Are you forking the project?
The upstream used to be on google code, since google decided to retire this service is not possible to get the release from it anymore. That why I move the source to pagure.

- It seems that version 0.6 used to be a pre-release (under development), any comments here? Check the version guidelines [3] for pre-releases and make sure your new release is greater than the last one released before this package was retired.

I believe it still should be 0.6 since it is the version of the upstream and I indeed raise the release version so that is it greater than the last release of this package.

Comment 6 Athos Ribeiro 2017-09-21 19:19:53 UTC
Hi Clement, thanks for the quick response. Since you I am sponsoring you, this reply is a little long so I can explain some parts of the packaging guidelines.

I did not get to comment about this, but note that this package was retired because it is dead upstream. We usually avoid packaging dead projects in Fedora and when the ones we have die, we retire them. It may be a bad idea to put this back in Fedora, and since you are working directly on the package that requires python-xappy, it would be a great opportunity to remove/replace this dependency.

Now, to the package:

- All your package Requires and BRs should be versioned. For example,

BuildRequires:  python-setuptools
should be
BuildRequires:  python2-setuptools

After 2020, python-setuptools will point to python3-setuptools and your package will not build.

- You can also run your tests with nosetests-2 for the same reasons above.

> The upstream used to be on google code, since google decided to retire this
> service is not possible to get the release from it anymore. That why I move
> the source to pagure.

It would be nice to add a comment about that on the specfile. Also, use upstream url for the URL tag (which is google code).

I am not sure if this is the best approach here. I will check if there is a better option than just importing the project to pagure in a single commit and then give you some feedback as soon as I get an answer for that.

> I believe it still should be 0.6 since it is the version of the upstream and
> I indeed raise the release version so that is it greater than the last
> release of this package.

According to the commits in upstream SVN, they never really released version 0.6.0. The 0.6.0 version variable was set in __setup__.py in SVN commit 565. Check the author's note:

"Bump version to 0.6.0 - release won't be for a little while yet, but this allows me to test the version for backward compatibility"

0.6.0-0.1.svn624 was the first Fedora package, the release tag reads 0.1.svn624.

It reads 0.1 because the packager wanted to show that this was a pre-release, meaning that the author had not had released this version of the package yet, and it was being shipped anyway. When we ship a pre-release like that, we must show which revision of the VCS we are shipping, that is where the svn624 part enters: it is the number of the SVN commit being packaged for Fedora.

The package was updated a few times:

0.6.0-0.2.svn624
[...]
0.6.0-0.10.svn624
0.6.0-0.11 <===== Why is it missing now?

You are still packaging a pre-release, so it would be nice to keep the same '.svn624' suffix there, showing whoever uses this package that they are actually using a specific revision of the package, not version 0.6.0 (nor 0.5.0) itself. Read the versioning guidelines if you have any doubts [1].

[1] https://fedoraproject.org/wiki/Packaging:Versioning

Comment 7 Clement Verna 2017-09-21 20:01:21 UTC
 
> I did not get to comment about this, but note that this package was retired
> because it is dead upstream. We usually avoid packaging dead projects in
> Fedora and when the ones we have die, we retire them. It may be a bad idea
> to put this back in Fedora, and since you are working directly on the
> package that requires python-xappy, it would be a great opportunity to
> remove/replace this dependency.
 
I do agree, it is not ideal unfortunately, this package provides the backbone of  fedora-packages (search engine). I could not see any easy way to replace it. There are talks about a rewrite of packages, but I don't see this happening soon. So it will be useful to have this package until we manage to remove this dependency from fedora-packages.


> Now, to the package:
> 
> - All your package Requires and BRs should be versioned. For example,
> 
> BuildRequires:  python-setuptools
> should be
> BuildRequires:  python2-setuptools
> 

I thought I had changed that. I will update the spec file. 
 
> According to the commits in upstream SVN, they never really released version
> 0.6.0. The 0.6.0 version variable was set in __setup__.py in SVN commit 565.
> Check the author's note:
> 
> "Bump version to 0.6.0 - release won't be for a little while yet, but this
> allows me to test the version for backward compatibility"
> 
> 0.6.0-0.1.svn624 was the first Fedora package, the release tag reads
> 0.1.svn624.
> 
> It reads 0.1 because the packager wanted to show that this was a
> pre-release, meaning that the author had not had released this version of
> the package yet, and it was being shipped anyway. When we ship a pre-release
> like that, we must show which revision of the VCS we are shipping, that is
> where the svn624 part enters: it is the number of the SVN commit being
> packaged for Fedora.
> 
> The package was updated a few times:
> 
> 0.6.0-0.2.svn624
> [...]
> 0.6.0-0.10.svn624
> 0.6.0-0.11 <===== Why is it missing now?
> 
Thanks for the explanations, it makes much more sense now. I went through the version guideline one more time and it is clearer for me.

Comment 8 Clement Verna 2017-09-25 19:03:09 UTC
Hi

> I did not get to comment about this, but note that this package was retired
> because it is dead upstream. We usually avoid packaging dead projects in
> Fedora and when the ones we have die, we retire them. It may be a bad idea
> to put this back in Fedora, and since you are working directly on the
> package that requires python-xappy, it would be a great opportunity to
> remove/replace this dependency.

I did some thinking about this during the weekend and I think you are right. It does not seems like a good idea to unretire this package since the upstream is dead. I am looking at replacing xapian this might take a little bit more time but it should pay off at the end.

Thanks
Clement

Comment 9 Athos Ribeiro 2017-09-25 19:21:03 UTC
Hi Clement,

Let me know if you need any help with that, and do not hesitate to add a needinfo for me if you need to package something while you work on it. I am still willing to sponsor you in the packagers group. Also let me know whenever you perform those informal package reviews.


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