Bug 1663668

Summary: Review Request: python-k2hr3-osnl - K2hR3 OpenStack Notification Listener
Product: [Fedora] Fedora Reporter: Hirotaka Wakabayashi <hiwkby>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <zebob.m>
Status: POST --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: hiwkby, mattia.verga, package-review, zbyszek, zebob.m
Target Milestone: ---Flags: zebob.m: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2009155, 1991145, 1992629    
Bug Blocks:    

Description Hirotaka Wakabayashi 2019-01-06 09:21:33 UTC
Spec URL: https://github.com/hiwakaba/k2hr3_osnl/blob/master/python-k2hr3-osnl.spec
SRPM URL: https://github.com/hiwakaba/k2hr3_osnl/blob/master/python-k2hr3-osnl-0.0.11-1.fc29.src.rpm

Description:
k2hr3_osnl is an OpenStack Notification Listener that listens to notifications
from OpenStack services. OpenStack services emit notifications to the message
bus, which is provided by oslo.messaging. oslo.messaging transports them to a 
message broker server. The default broker server is RabbitMQ. When k2hr3_osnl
catches a notification message from RabbitMQ, it sends the payload to K2hR3 that
is a role-based ACL system that provides access control for Openstack virtual
machine instances.

Fedora Account System Username: hiwkby

Here is a successful koji build.
https://koji.fedoraproject.org/koji/taskinfo?taskID=31848495

Thanks in advance.

Comment 1 Robert-André Mauchin 🐧 2019-02-08 15:21:51 UTC
 - The configuration file %{_sysconfdir}/k2hr3/k2hr3-osnl.conf should be inrtalled with %config(noreplace)

%config(noreplace) %{_sysconfdir}/k2hr3/k2hr3-osnl.conf

 - The last %changelog entry is not matching the Version-Release in the header, it should be 0.0.14-1

 - The package can't build:

DEBUG util.py:490:  BUILDSTDERR: Error: 
DEBUG util.py:490:  BUILDSTDERR:  Problem: package python3-oslo-messaging-8.0.0-1.fc29.noarch requires python3-pika_pool, but none of the providers can be installed
DEBUG util.py:490:  BUILDSTDERR:   - conflicting requests
DEBUG util.py:490:  BUILDSTDERR:   - nothing provides python3.7dist(pika) < 0.11 needed by python3-pika-pool-0.1.3-14.fc30.noarch

You should ask the maintainer of pika-pool to relax the dependency on pika (which is constrained to pika < 0.11 while the rawhide version is 0.12)

Comment 2 Zbigniew Jędrzejewski-Szmek 2019-03-11 07:02:27 UTC
The spec file is gone (the repository has been removed). Can you post it again?

Comment 3 Hirotaka Wakabayashi 2019-03-18 21:37:56 UTC
Hello, Robert and Zbigniew

I am very sorry for my late reply. I will update the stuff soon.

Thanks in advance,
Hirotaka Wakabayashi

Comment 4 Hirotaka Wakabayashi 2019-03-19 13:05:11 UTC
Hello Robert and Zbigniew,

I have fixed the problems other than the python3-pika-pool dependency problem. I will ask the maintainer of pika-pool to relax the dependency on pika tomorrow. 
Here is the fixed spec file and source rpm package. Please review it again.

Spec URL: https://hiwkby.fedorapeople.org/python-k2hr3-osnl.spec
SRPM URL: https://hiwkby.fedorapeople.org/python-k2hr3-osnl-0.9.1-1.fc29.src.rpm
Koji scratch build URL: https://koji.fedoraproject.org/koji/taskinfo?taskID=33630951
Local rpmlit result:
```
$ rpmlint python-k2hr3-osnl.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.
$ rpmlint  /home/vagrant/rpmbuild/SRPMS/python-k2hr3-osnl-0.9.1-1.fc29.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
$ rpmlint /home/vagrant/rpmbuild/RPMS/noarch/python3-k2hr3-osnl-0.9.1-1.fc29.noarch.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
```

Thanks in advance,
Hirotaka Wakabayashi

Comment 5 Robert-André Mauchin 🐧 2019-03-19 15:32:19 UTC
 - %{buildroot}/usr/bin/k2hr3-osnl → %{buildroot}%{_bindir}/k2hr3-osnl

 - %attr(0755,root,root) and %attr(0644,root,root) shouldn't be needed.

 - You have this twice: %{_sysconfdir}/k2hr3

 - I don't understand what you're doing here:

%if 0%{?fedora} >= 30
%{_unitdir}/k2hr3-osnl.service
%else
%{_unitdir}/k2hr3-osnl.service
%endif


 Both branches of the condition contain the same thing? And there's nothing specific to Fedora >= 30 regarding unit files.

Comment 6 Hirotaka Wakabayashi 2019-03-20 06:20:10 UTC
(In reply to Robert-André Mauchin from comment #1)
>  - The configuration file %{_sysconfdir}/k2hr3/k2hr3-osnl.conf should be
> inrtalled with %config(noreplace)
> 
> %config(noreplace) %{_sysconfdir}/k2hr3/k2hr3-osnl.conf
> 
>  - The last %changelog entry is not matching the Version-Release in the
> header, it should be 0.0.14-1
> 
>  - The package can't build:
> 
> DEBUG util.py:490:  BUILDSTDERR: Error: 
> DEBUG util.py:490:  BUILDSTDERR:  Problem: package
> python3-oslo-messaging-8.0.0-1.fc29.noarch requires python3-pika_pool, but
> none of the providers can be installed
> DEBUG util.py:490:  BUILDSTDERR:   - conflicting requests
> DEBUG util.py:490:  BUILDSTDERR:   - nothing provides python3.7dist(pika) <
> 0.11 needed by python3-pika-pool-0.1.3-14.fc30.noarch
> 
> You should ask the maintainer of pika-pool to relax the dependency on pika
> (which is constrained to pika < 0.11 while the rawhide version is 0.12)

Hello Robert,

Could you confirm the same problem still happens? Because the packager of 
pika-pool seems to fixed the problem 21 days ago [1] and python3-pika was 
removed from the python3-oslo-messaging's dependency and python3-pika-pool
was also removed from python3-oslo-messaging's build dependency in 
python3-oslo-messaging-8.1.2 [2].

I confirmed that I could successfully build my package on Fedora30 nightly
build(Fedora-30-20190316.n.1) in my environment [3].

Thanks in advance,
Hirotaka Wakabayashi

--
[1] https://src.fedoraproject.org/rpms/python-pika-pool/c/8b7c12d4f9ad67b7b8a67639096ae986e31dc8c5?branch=master
[2] https://src.fedoraproject.org/rpms/python-oslo-messaging/c/0bee85748423bc05566a3d0f9956474ef7f642aa?branch=master
[3] This is my environment provisioning. https://hiwkby.fedorapeople.org/Vagrantfile_python-k2hr3-osnl

Comment 7 Hirotaka Wakabayashi 2019-03-26 02:35:31 UTC
(In reply to Robert-André Mauchin from comment #5)
>  - %{buildroot}/usr/bin/k2hr3-osnl → %{buildroot}%{_bindir}/k2hr3-osnl
> 
>  - %attr(0755,root,root) and %attr(0644,root,root) shouldn't be needed.
> 
>  - You have this twice: %{_sysconfdir}/k2hr3
> 
>  - I don't understand what you're doing here:
> 
> %if 0%{?fedora} >= 30
> %{_unitdir}/k2hr3-osnl.service
> %else
> %{_unitdir}/k2hr3-osnl.service
> %endif
> 
> 
>  Both branches of the condition contain the same thing? And there's nothing
> specific to Fedora >= 30 regarding unit files.
Hello Robert-André,

Thank you very much for your comment. I have fixed the above.

1. SRPM
https://hiwkby.fedorapeople.org/python-k2hr3-osnl-0.9.2-1.fc29.src.rpm

2. SPEC
https://hiwkby.fedorapeople.org/python-k2hr3-osnl.spec

3. Successful Koji scratch build
https://koji.fedoraproject.org/koji/taskinfo?taskID=33771656

Thanks in advance,
Hirotaka Wakabayashi

Comment 8 Robert-André Mauchin 🐧 2019-03-26 03:26:30 UTC
Package approved.


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", "Expat License". 53 files have unknown
     license. Detailed output of licensecheck in
     /home/bob/packaging/review/python-k2hr3-osnl/review-
     python-k2hr3-osnl/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[%]: 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.
[x]: 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]: Package installs properly.
[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 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]: %config files are marked noreplace or the reason is justified.
[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]: No %config files under /usr.
[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).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: 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: python3-k2hr3-osnl-0.9.2-1.fc31.noarch.rpm
          python-k2hr3-osnl-0.9.2-1.fc31.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.

Comment 9 Hirotaka Wakabayashi 2019-03-26 08:28:43 UTC
Hello Robert-André,

Thank you very much for your concise and quick reply.

Best Regards,
Hirotaka Wakabayashi

Comment 10 Gwyn Ciesla 2019-03-28 13:32:47 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-k2hr3-osnl

Comment 11 Mattia Verga 2021-07-04 15:11:57 UTC
Package was never imported, Hirotaka are you still interested in this?

Comment 12 Hirotaka Wakabayashi 2021-07-13 17:46:08 UTC
Hello Mattia, Thank you for your notice. Yes, I will import the content soon.

Hirotaka Wakabayashi

Comment 13 Hirotaka Wakabayashi 2021-07-18 03:01:52 UTC
Hello Mattia, 

Before importing the package, I will submit review requests of the following three
packages that are required by my package. I will do them this week.

python-oslo-messaging https://src.fedoraproject.org/rpms/python-oslo-messaging
	Upstream is alive. https://opendev.org/openstack/oslo.messaging

python-oslo-middleware https://src.fedoraproject.org/rpms/python-oslo-middleware
	Upstream is alive. https://opendev.org/openstack/oslo.middleware

python-oslo-service https://src.fedoraproject.org/rpms/python-oslo-service
	Upstream is alive. https://opendev.org/openstack/oslo.service

Thanks in advance,
Hirotaka Wakabayashi