Bug 1576792 - Review Request: python-webthing - HTTP Web Thing implementation
Summary: Review Request: python-webthing - HTTP Web Thing implementation
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabian Affolter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: IoT
TreeView+ depends on / blocked
 
Reported: 2018-05-10 12:02 UTC by Peter Robinson
Modified: 2020-05-19 14:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-19 14:30:34 UTC
Type: Bug
Embargoed:
mail: fedora-review+


Attachments (Terms of Use)

Description Peter Robinson 2018-05-10 12:02:44 UTC
SPEC: https://pbrobinson.fedorapeople.org/webthing.spec
SRPM: https://pbrobinson.fedorapeople.org/webthing-0.5.3-1.fc28.src.rpm

Description:
A server implementing the HTTP Web Thing implementation.

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

Comment 2 Robert-André Mauchin 🐧 2018-05-12 19:49:03 UTC
 - Use a more meaningful archive name with:

Source0:        https://github.com/mozilla-iot/webthing-python/archive/v%{version}/%{name}-%{version}.tar.gz

 - If you only plan to support Fedora >= 28, you could use the new "%?python_enable_dependency_generator" instead of specifying the Requires manually. See https://fedoraproject.org/wiki/Changes/EnablingPythonGenerators

 - Generally we start numbering patch at 0

 - I think you should name this package python-webthing and provide a Python 3 subpackage. You could use pyp2rpm to help with that: pyp2rpm -b3 webthing > python-webthing.spec and then adjust the patch, license, description.

Comment 3 Peter Robinson 2018-05-13 08:31:01 UTC
(In reply to Robert-André Mauchin from comment #2)
>  - Use a more meaningful archive name with:
> 
> Source0:       
> https://github.com/mozilla-iot/webthing-python/archive/v%{version}/%{name}-
> %{version}.tar.gz

When I packaged this they weren't there, it was from my request they happened:
https://github.com/mozilla-iot/webthing-python/issues/13

>  - If you only plan to support Fedora >= 28, you could use the new
> "%?python_enable_dependency_generator" instead of specifying the Requires
> manually. See https://fedoraproject.org/wiki/Changes/EnablingPythonGenerators
> 
>  - Generally we start numbering patch at 0

Actually there's no policy about that, it's up to the packager.

>  - I think you should name this package python-webthing and provide a Python
> 3 subpackage. You could use pyp2rpm to help with that: pyp2rpm -b3 webthing
> > python-webthing.spec and then adjust the patch, license, description.

I'm considering that, although I'd use python3-webthing naming because I have no intention of supporting py2

Comment 4 Elliott Sales de Andrade 2018-08-07 00:01:42 UTC
Are there any updates here?

Comment 6 Peter Robinson 2018-08-08 12:08:15 UTC
(In reply to Elliott Sales de Andrade from comment #4)
> Are there any updates here?

are you volunteering to review it, should now be latest upstream with a rename

Comment 7 Robert-André Mauchin 🐧 2018-08-08 12:43:57 UTC
(In reply to Peter Robinson from comment #3)
> (In reply to Robert-André Mauchin from comment #2)
> >  - Use a more meaningful archive name with:
> > 
> > Source0:       
> > https://github.com/mozilla-iot/webthing-python/archive/v%{version}/%{name}-
> > %{version}.tar.gz
> 
> When I packaged this they weren't there, it was from my request they
> happened:
> https://github.com/mozilla-iot/webthing-python/issues/13
> 
You misunderstood me maybe, my advice is to change the Source0 to have an archive name with both name and version instead of only the version:


Source0:        https://github.com/mozilla-iot/webthing-python/archive/v%{version}/%{name}-%{version}.tar.gz

> 
> >  - I think you should name this package python-webthing and provide a Python
> > 3 subpackage. You could use pyp2rpm to help with that: pyp2rpm -b3 webthing
> > > python-webthing.spec and then adjust the patch, license, description.
> 
> I'm considering that, although I'd use python3-webthing naming because I
> have no intention of supporting py2

The policy is still to make a subpackage even if you only make a python3 version. I asked about this a few moths back on IRC.

Comment 8 Peter Robinson 2018-08-08 12:55:38 UTC
> You misunderstood me maybe, my advice is to change the Source0 to have an
> archive name with both name and version instead of only the version:
> 
> Source0:       
> https://github.com/mozilla-iot/webthing-python/archive/v%{version}/%{name}-
> %{version}.tar.gz

Personally I don't overly care about this, I have updated it locally, but AFAICT there's no packaging policy either way about this so it should not block the review.

> The policy is still to make a subpackage even if you only make a python3
> version. I asked about this a few moths back on IRC.

Can you please provide the reference to this in the guidelines.

Comment 9 Robert-André Mauchin 🐧 2018-08-08 13:15:48 UTC
(In reply to Peter Robinson from comment #8)
> > You misunderstood me maybe, my advice is to change the Source0 to have an
> > archive name with both name and version instead of only the version:
> > 
> > Source0:       
> > https://github.com/mozilla-iot/webthing-python/archive/v%{version}/%{name}-
> > %{version}.tar.gz
> 
> Personally I don't overly care about this, I have updated it locally, but
> AFAICT there's no packaging policy either way about this so it should not
> block the review.
> 
> > The policy is still to make a subpackage even if you only make a python3
> > version. I asked about this a few moths back on IRC.
> 
> Can you please provide the reference to this in the guidelines.

If I asked on IRC, it's because I didn't find it in the guidelines:

2018-02-26 18:25:47	eclipseo	If a python package only supports Python 3, should the package be named python-module with a python3-module provide, or should it be named python3-module?
2018-02-26 18:30:07	tibbs	eclipseo: Assuming it's a module and not an application, name the SRPM and git repository python-foo and have that produce the python3-foo subpackage.
2018-02-26 18:30:27	tibbs	If it's an application, just name it "foo".
2018-02-26 18:30:28	eclipseo	ok thx
2018-02-26 18:30:51	tibbs	The only real exception is if python-foo already exists as a python2-only thing and the python3 version is a separate upstream.

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

Comment 11 Elliott Sales de Andrade 2018-12-21 22:24:01 UTC
(In reply to Peter Robinson from comment #8)
> > The policy is still to make a subpackage even if you only make a python3
> > version. I asked about this a few moths back on IRC.
> 
> Can you please provide the reference to this in the guidelines.

It is in the Python naming guidelines:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming

Comment 12 Raphael Groner 2018-12-22 10:52:34 UTC
(In reply to Elliott Sales de Andrade from comment #11)
> (In reply to Peter Robinson from comment #8)
> > > The policy is still to make a subpackage even if you only make a python3
> > > version. I asked about this a few moths back on IRC.
> > 
> > Can you please provide the reference to this in the guidelines.
> 
> It is in the Python naming guidelines:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming

There's an exception for packages in EPEL only [*] with python3 but in RHEL with python2, in such a case the (eventually) later requested Fedora [**] branches need to get retired. But as this request was filed against Fedora in general, I assume there's a wish for a package also in Fedora.
Did you check if there's anything similiar, available already or in RHEL?

[*] https://fedoraproject.org/wiki/User:Bkabrda/EPEL7_Python3#Packaging_Parallel_python3X_stacks
[**] https://fedoraproject.org/wiki/User:Bkabrda/EPEL7_Python3#Guidelines

Comment 13 Fabian Affolter 2019-08-31 19:53:27 UTC
BTW, the latest release is 0.12.0.

Comment 14 Fabian Affolter 2020-01-07 16:21:38 UTC
Peter, do you still want to go on with the review?

I would like to have this package in Fedora.

Comment 15 Peter Robinson 2020-01-08 05:08:35 UTC
(In reply to Fabian Affolter from comment #14)
> Peter, do you still want to go on with the review?
> 
> I would like to have this package in Fedora.

I'm happy to continue if someone will do an official review, also quite happy to have someone take it over or co-maintain it once the review is complete. I'd not done any updates because there was no official reviewer assigned and everything was just drive by comments.

Comment 16 Fabian Affolter 2020-01-08 07:39:35 UTC
I will perform the review.

Comment 18 Fabian Affolter 2020-02-27 20:24:48 UTC
- The package should be called "python-webthing" (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming) and a Python 3 subpackages added
- Source0 could be "https://github.com/mozilla-iot/webthing-python/archive/v%{version}/webthing-python-%{version}.tar.gz"
- "%{python3_sitelib}/webthing-%{version}-py3.?.egg-info" could be replaced with "%{python3_sitelib}/webthing-%{version}-py3.*.egg-info" for Python > 3.9

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

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


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/


===== 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", "*No copyright* Mozilla Public License
     (v2.0)". 20 files have unknown license. Detailed output of
     licensecheck in
     /home/fab/Documents/repos/reviews/1576792-python3-webthing/licensecheck.txt
[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).
[!]: 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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 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]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[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 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 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.
[!]: 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:
[x]: 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).
[x]: 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:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/#_use_rpmlint
[!]: 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)


Installation errors
-------------------
INFO: mock.py version 2.0 starting (python version = 3.7.6)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start: cleaning package manager metadata
Finish: cleaning package manager metadata
INFO: enabled HW Info plugin
Mock Version: 2.0
INFO: Mock Version: 2.0
Finish: chroot init
INFO: installing package(s): /home/fab/Documents/repos/reviews/1576792-python3-webthing/results/python3-webthing-0.12.0-1.fc33.noarch.rpm
ERROR: Command failed: 
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 33 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk install /home/fab/Documents/repos/reviews/1576792-python3-webthing/results/python3-webthing-0.12.0-1.fc33.noarch.rpm --setopt=tsflags=nocontexts



Rpmlint
-------
Checking: python3-webthing-0.12.0-1.fc33.noarch.rpm
          python3-webthing-0.12.0-1.fc33.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.




Source checksums
----------------
https://github.com/mozilla-iot/webthing-python/archive/v0.12.0.tar.gz#/webthing-python-0.12.0.tar.gz :
  CHECKSUM(SHA256) this package     : 0333b96e7500d1c4d56dfdcda1a03d0cf9f59cb583d43e7b7decc22b2a16657c
  CHECKSUM(SHA256) upstream package : 0333b96e7500d1c4d56dfdcda1a03d0cf9f59cb583d43e7b7decc22b2a16657c


Requires
--------
python3-webthing (rpmlib, GLIBC filtered):
    python(abi)
    python3-ee
    python3-jsonschema
    python3-netifaces
    python3-tornado
    python3-zeroconf
    python3.8dist(ifaddr)
    python3.8dist(jsonschema)
    python3.8dist(pyee)
    python3.8dist(tornado)
    python3.8dist(zeroconf)



Provides
--------
python3-webthing:
    python-webthing
    python3-webthing
    python3.8dist(webthing)
    python3dist(webthing)



Diff spec file in url and in SRPM
---------------------------------
--- /home/fab/Documents/repos/reviews/1576792-python3-webthing/srpm/python3-webthing.spec	2020-02-27 18:21:39.250963863 +0100
+++ /home/fab/Documents/repos/reviews/1576792-python3-webthing/srpm-unpacked/python3-webthing.spec	2020-02-01 18:43:36.000000000 +0100
@@ -12,4 +12,10 @@
 BuildRequires:  python3-devel
 BuildRequires:  python3-setuptools
+
+Requires:       python3-ee
+Requires:       python3-jsonschema
+Requires:       python3-netifaces
+Requires:       python3-tornado
+Requires:       python3-zeroconf
 %{?python_provide:%python_provide python3-webthing}
 


Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -b 1576792
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic, Python
Disabled plugins: PHP, C/C++, SugarActivity, Haskell, R, fonts, Ocaml, Perl, Java
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 20 Fabian Affolter 2020-05-19 09:02:27 UTC
Issues were addressed, Package APPROVED.

Comment 21 Gwyn Ciesla 2020-05-19 13:25:19 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-webthing


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