Bug 1776669 - Review Request: python-pycdio - A Python interface to the CD Input and Control library
Summary: Review Request: python-pycdio - A Python interface to the CD Input and Contro...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-26 06:32 UTC by Kevin Fenzi
Modified: 2020-05-19 11:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-19 11:03:23 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Description Kevin Fenzi 2019-11-26 06:32:54 UTC
Spec URL: https://www.scrye.com/~kevin/fedora/review/python-pycdio/python-pycdio.spec
SRPM URL: https://www.scrye.com/~kevin/fedora/review/python-pycdio/python-pycdio-2.0.0-6.fc32.src.rpm
Description:

The pycdio (and libcdio) libraries encapsulate CD-ROM reading and
control. Python programs wishing to be oblivious of the OS- and
device-dependent properties of a CD-ROM can use this library.

Fedora Account System Username: kevin

This is a rename of the orphaned (for 4 weeks) pycdio package. 

I've renamed it python-pycdio and enabled tests and cleaned up the spec. 

rpmlint says: 

python-pycdio.src: W: spelling-error %description -l en_US libcdio -> libido

can be ignored. 

scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=39351137

Comment 1 Miro Hrončok 2019-11-26 09:15:02 UTC
Quick eyes only check:


1. please add %python_provide: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_python_provide_macro

2. you can use %pypi_source in Source0: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_source_files_from_pypi

3. Obsoletes:	pycdio < 2.0.0-5   -- maybe it should be < 2.0.0-6? I see  2.0.0-5.fc31 in Fedora 31

4. Requires:	python3 is redundant

5. %{python3_sitearch}/* should not be used  https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_files_to_include



Will run automated checks on the next spec iteration.

Comment 2 Neal Gompa 2019-11-26 12:28:16 UTC
If we want this in EPEL, you'll probably want to replace "python3-" with "python%{python3_pkgversion}-" so that it'll seamlessly work across EPEL releases.

Comment 3 Neal Gompa 2019-11-26 12:29:41 UTC
Also, use either the %python3 or %__python3 macros for calling the interpreter directly, because we don't always have a /usr/bin/python3 for Python 3 across EPEL releases...

Comment 4 Kevin Fenzi 2019-11-26 21:40:41 UTC
(In reply to Miro Hrončok from comment #1)
> Quick eyes only check:
> 
> 
> 1. please add %python_provide:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> #_the_python_provide_macro

Done.

> 2. you can use %pypi_source in Source0:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> #_source_files_from_pypi

Done.
 
> 3. Obsoletes:	pycdio < 2.0.0-5   -- maybe it should be < 2.0.0-6? I see 
> 2.0.0-5.fc31 in Fedora 31

Done.
 
> 4. Requires:	python3 is redundant

Removed.
 
> 5. %{python3_sitearch}/* should not be used 
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> #_files_to_include

Fixed. 
> 
> 
> Will run automated checks on the next spec iteration.

ok

(In reply to Neal Gompa from comment #2)
> If we want this in EPEL, you'll probably want to replace "python3-" with
> "python%{python3_pkgversion}-" so that it'll seamlessly work across EPEL
> releases.

The epel7 version is likely to be very different as it needs to support python2 (at least until koji moves to python3 there, which will likely not be a while). 
This spec works fine for epel8. I have no plans for epel6 support.

(In reply to Neal Gompa from comment #3)
> Also, use either the %python3 or %__python3 macros for calling the
> interpreter directly, because we don't always have a /usr/bin/python3 for
> Python 3 across EPEL releases...

Done.

New spec/src.rpm:

Spec URL: https://www.scrye.com/~kevin/fedora/review/python-pycdio/python-pycdio.spec
SRPM URL: https://www.scrye.com/~kevin/fedora/review/python-pycdio/python-pycdio-2.0.0-7.fc32.src.rpm

Comment 5 Miro Hrončok 2019-11-26 22:01:45 UTC
Package Review
==============

Package APPROVED (version in spec).

Consider listing the egg-info with trailing slash to avoid it becoming a file some day.




Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated



===== MUST items =====

C/C++:
[-]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Python libraries.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "GPL (v3 or later)", "GPL (v2 or
     later)".
[x]: License file installed when any subpackage combination is installed.
[x]: Package does not own files or directories owned by other packages.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[x]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 40960 bytes in 5 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
[?]: Package functions as described.
[?]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: python3-pycdio-2.0.0-7.fc32.x86_64.rpm
          python-pycdio-debugsource-2.0.0-7.fc32.x86_64.rpm
          python-pycdio-2.0.0-7.fc32.src.rpm
python3-pycdio.x86_64: W: spelling-error %description -l en_US libcdio -> libido
python-pycdio.src: W: spelling-error %description -l en_US libcdio -> libido
python-pycdio.src:8: W: mixed-use-of-spaces-and-tabs (spaces: line 8, tab: line 1)
3 packages and 0 specfiles checked; 0 errors, 3 warnings.

mixed-use-of-spaces-and-tabs fixed in spec.


Rpmlint (installed packages)
----------------------------
python3-pycdio.x86_64: W: spelling-error %description -l en_US libcdio -> libido
python3-pycdio.x86_64: W: invalid-url URL: http://www.gnu.org/software/libcdio/ <urlopen error [Errno -2] Name or service not known>
python-pycdio-debugsource.x86_64: W: invalid-url URL: http://www.gnu.org/software/libcdio/ <urlopen error [Errno -2] Name or service not known>
2 packages and 0 specfiles checked; 0 errors, 3 warnings.


Source checksums
----------------
https://files.pythonhosted.org/packages/source/p/pycdio/pycdio-2.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : 128e9ae12233f7e5a9a2be6d03d2d836a04d99b44c41dc9312ca14ea2a0530a8
  CHECKSUM(SHA256) upstream package : 128e9ae12233f7e5a9a2be6d03d2d836a04d99b44c41dc9312ca14ea2a0530a8


Requires
--------
python3-pycdio (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libcdio.so.18()(64bit)
    libcdio.so.18(CDIO_18)(64bit)
    libiso9660.so.11()(64bit)
    libiso9660.so.11(ISO9660_11)(64bit)
    libpthread.so.0()(64bit)
    python(abi)
    rtld(GNU_HASH)

python-pycdio-debugsource (rpmlib, GLIBC filtered):



Provides
--------
python3-pycdio:
    pycdio
    python-pycdio
    python3-pycdio
    python3-pycdio(x86-64)
    python3.8dist(pycdio)
    python3dist(pycdio)

python-pycdio-debugsource:
    python-pycdio-debugsource
    python-pycdio-debugsource(x86-64)



Diff spec file in url and in SRPM
---------------------------------
--- /home/churchyard/rpmbuild/FedoraReview/1776669-python-pycdio/srpm/python-pycdio.spec	2019-11-26 22:43:57.595911560 +0100
+++ /home/churchyard/rpmbuild/FedoraReview/1776669-python-pycdio/srpm-unpacked/python-pycdio.spec	2019-11-26 22:23:18.000000000 +0100
@@ -6,5 +6,5 @@
 License:	GPLv3+
 URL:		http://www.gnu.org/software/libcdio/
-Source0:	%pypi_source pycdio
+Source0:        %pypi_source pycdio
 # https://git.savannah.gnu.org/cgit/libcdio/pycdio.git/commit/?id=4c68c5a44f98a7cf3fa388ca66c7d312e44e78df
 # https://savannah.gnu.org/bugs/?56739
@@ -47,5 +47,5 @@
 
 %check
-%python3 setup.py nosetests
+python3 setup.py nosetests
 
 %files -n python3-pycdio

Comment 6 Kevin Fenzi 2019-11-26 22:19:47 UTC
Thanks for the speedy review. Will add the / on import. 

Repo and branches requested.

Comment 7 Gwyn Ciesla 2019-11-26 22:45:56 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pycdio


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