Bug 1643764 - Review Request: intelhex - A python library for manipulating Intel HEX file format
Summary: Review Request: intelhex - A python library for manipulating Intel HEX file f...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: IoT 1643778
TreeView+ depends on / blocked
 
Reported: 2018-10-28 14:17 UTC by Peter Robinson
Modified: 2020-06-19 17:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-19 17:32:59 UTC
Type: Bug
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Peter Robinson 2018-10-28 14:17:05 UTC
SPEC: https://pbrobinson.fedorapeople.org/intelhex.spec
SRPM: https://pbrobinson.fedorapeople.org/intelhex-2.2.1-1.fc29.src.rpm

Description:
The Intel HEX file format is widely used in microprocessors and microcontrollers
area (embedded systems etc) as the de facto standard for representation of code
to be programmed into microelectronic devices.

This work implements an intelhex Python library to read, write, create from
scratch and manipulate data from Intel HEX file format.

The distribution package also includes several convenience Python scripts,
including "classic" hex2bin and bin2hex converters and more, those based on the
library itself. Check the docs to know more.

koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=30520795

Comment 1 Henrik Boeving 2018-10-28 19:48:18 UTC
Doing a non official review

A few things i noticed:

1. The Fedora packaging guidelines say that "the source package for a Python library MUST be named with the python- prefix."

2. Not a must have but as the library appears to be available on PyPi you could replace your Source0 line with Source0: %pypi_source

3. The intelhex/bench.py and the files in /scripts file use /usr/bin/python which isn't allowed according to the guidelines. You can fix that in %build by using sed -i '1{/^#!\//d}' /path/to/file.py

4. You might want to correct the spelling mistake of Manual you made in your Summary in line 42.

Comment 2 Artur Frenszek-Iwicki 2018-11-03 15:09:53 UTC
>Source0: https://github.com/bialix/intelhex/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
You can use "%{URL}/archive/%{version}/%{name}-%{version}.tar.gz" instead.

Comment 3 Robert-André Mauchin 🐧 2018-11-08 14:45:05 UTC
 - As Henrek said this should be named python-intelhex with a python3 subpackage.

 - It is now forbidden to glob %{python3_sitelib}/*, see https://fedoraproject.org/wiki/Packaging:Python#Files_to_include
Be more specific instead.

 - You should add AUTHORS.rst NEWS.rst Readme.rst to %doc

Comment 4 Peter Robinson 2018-11-08 15:02:32 UTC
(In reply to Robert-André Mauchin from comment #3)
>  - As Henrek said this should be named python-intelhex with a python3
> subpackage.

Why? I really don't see the point and traditionally the package source name has been the upstream project name.

>  - It is now forbidden to glob %{python3_sitelib}/*, see
> https://fedoraproject.org/wiki/Packaging:Python#Files_to_include
> Be more specific instead.

Updated.

>  - You should add AUTHORS.rst NEWS.rst Readme.rst to %doc

The first two make sense, the readme doesn't as all the information is either covered in the %description, the %license or irrelevant like download/install/python versions supported.

Comment 6 Robert-André Mauchin 🐧 2018-11-08 15:49:38 UTC
(In reply to Peter Robinson from comment #4)
> (In reply to Robert-André Mauchin from comment #3)
> >  - As Henrek said this should be named python-intelhex with a python3
> > subpackage.
> 
> Why? I really don't see the point and traditionally the package source name
> has been the upstream project name.
> 
This is the guideline:

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming

Comment 7 Robert-André Mauchin 🐧 2018-11-08 19:30:52 UTC
Also you didn't take into account other issues mentioned by Henrik, please do.

Comment 8 Raphael Groner 2018-12-16 07:43:28 UTC
Are you interested in a review swap? Maybe take a look into bug #1659759.

Comment 10 Raphael Groner 2019-07-30 10:59:07 UTC
The package name should be python-intelhex to let the suffix emphasize it's a python package.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming

... See comment #6.

Comment 11 Peter Robinson 2019-07-30 11:05:02 UTC
(In reply to Raphael Groner from comment #10)
> The package name should be python-intelhex to let the suffix emphasize it's
> a python package.
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming
> 
> ... See comment #6.

but it has separate applications in it too.

Comment 13 Robert-André Mauchin 🐧 2020-02-10 23:09:58 UTC
 - Fix line encoding:

intelhex.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/intelhex/AUTHORS.rst
intelhex.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/intelhex/NEWS.rst

 - Remove the shebang in %prep:

python3-intelhex.noarch: E: non-executable-script /usr/lib/python3.8/site-packages/intelhex/bench.py 644 /usr/bin/python 

 - Build the manual in docs/manual with Sphinx instead of distributing the source files


Package Review
==============

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



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

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", "BSD 3-clause "New" or "Revised"
     License". 40 files have unknown license. Detailed output of
     licensecheck in /home/bob/packaging/review/intelhex/review-
     intelhex/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[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.
[-]: 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]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 102400 bytes in 30 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 does not own files or directories owned by other packages.
[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 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.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-intelhex , intelhex-docs
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %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:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: intelhex-2.2.1-3.fc32.noarch.rpm
          python3-intelhex-2.2.1-3.fc32.noarch.rpm
          intelhex-docs-2.2.1-3.fc32.noarch.rpm
          intelhex-2.2.1-3.fc32.src.rpm
intelhex.noarch: W: spelling-error %description -l en_US microcontrollers -> micro controllers, micro-controllers, microelectronics
intelhex.noarch: W: spelling-error %description -l en_US de -> DE, ed, d
intelhex.noarch: W: spelling-error %description -l en_US facto -> fact, factor, facts
intelhex.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/intelhex/AUTHORS.rst
intelhex.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/intelhex/NEWS.rst
intelhex.noarch: W: no-manual-page-for-binary bin2hex.py
intelhex.noarch: W: no-manual-page-for-binary hex2bin.py
intelhex.noarch: W: no-manual-page-for-binary hex2dump.py
intelhex.noarch: W: no-manual-page-for-binary hexdiff.py
intelhex.noarch: W: no-manual-page-for-binary hexinfo.py
intelhex.noarch: W: no-manual-page-for-binary hexmerge.py
python3-intelhex.noarch: W: spelling-error %description -l en_US microcontrollers -> micro controllers, micro-controllers, microelectronics
python3-intelhex.noarch: W: spelling-error %description -l en_US de -> DE, ed, d
python3-intelhex.noarch: W: spelling-error %description -l en_US facto -> fact, factor, facts
python3-intelhex.noarch: W: no-documentation
python3-intelhex.noarch: E: non-executable-script /usr/lib/python3.8/site-packages/intelhex/bench.py 644 /usr/bin/python 
intelhex-docs.noarch: W: spelling-error Summary(en_US) Manuak -> Manual
intelhex-docs.noarch: W: description-shorter-than-summary
intelhex-docs.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/intelhex-docs/docs/manual/Makefile
intelhex-docs.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/intelhex-docs/docs/manual/appendix-a.txt
intelhex-docs.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/intelhex-docs/docs/manual/conf.py
intelhex-docs.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/intelhex-docs/docs/manual/index.txt
intelhex.src: W: spelling-error %description -l en_US microcontrollers -> micro controllers, micro-controllers, microelectronics
intelhex.src: W: spelling-error %description -l en_US de -> DE, ed, d
intelhex.src: W: spelling-error %description -l en_US facto -> fact, factor, facts
4 packages and 0 specfiles checked; 1 errors, 24 warnings.

Comment 15 Robert-André Mauchin 🐧 2020-06-19 11:50:18 UTC
Package approved.
Needinfo you cause it's been a while, sorry I missed the notification.

Comment 16 Gwyn Ciesla 2020-06-19 17:30:32 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/intelhex

Comment 17 Peter Robinson 2020-06-19 17:32:59 UTC
Thanks, and pushed to rawhide.


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