Bug 2009146 - Review Request: python-oslo-metrics - OpenStack Oslo Metrics library
Summary: Review Request: python-oslo-metrics - OpenStack Oslo Metrics library
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2009155
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-30 04:45 UTC by Hirotaka Wakabayashi
Modified: 2022-11-11 00:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-11 00:51:08 UTC
Type: ---
Embargoed:
jkadlcik: fedora-review+


Attachments (Terms of Use)

Description Hirotaka Wakabayashi 2021-09-30 04:45:39 UTC
Spec URL: https://hiwkby.fedorapeople.org/python-oslo-metrics.spec
SRPM URL: https://hiwkby.fedorapeople.org/python-oslo-metrics-0.3.0-1.fc36.src.rpm
Description: The OpenStack Oslo Metrics library.
Oslo metrics API supports collecting metrics data from other Oslo
libraries and exposing the metrics data to monitoring system.
Fedora Account System Username: hiwkby

Koji(success): https://koji.fedoraproject.org/koji/taskinfo?taskID=76498593

Comment 1 Package Review 2022-10-08 00:45:17 UTC
This is an automatic check from review-stats script.

This review request ticket hasn't been updated for some time. We're sorry
it is taking so long. If you're still interested in packaging this software
into Fedora repositories, please respond to this comment clearing the
NEEDINFO flag.

You may want to update the specfile and the src.rpm to the latest version
available and to propose a review swap on Fedora devel mailing list to increase
chances to have your package reviewed. If this is your first package and you
need a sponsor, you may want to post some informal reviews. Read more at
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group.

Without any reply, this request will shortly be considered abandoned
and will be closed.
Thank you for your patience.

Comment 3 Hirotaka Wakabayashi 2022-11-01 00:21:00 UTC
Hello, I fixed issues on the package guidelines.

Spec URL: https://hiwkby.fedorapeople.org/python-oslo-metrics.spec
SRPM URL: https://hiwkby.fedorapeople.org/python-oslo-metrics-0.5.0-1.fc38.src.rpm
Koji(success!): https://koji.fedoraproject.org/koji/taskinfo?taskID=93644841

```
$ diff -c public_html/python-oslo-metrics.spec python-oslo-metrics.spec 
*** public_html/python-oslo-metrics.spec        2022-10-26 09:50:25.498359724 +0000
--- python-oslo-metrics.spec    2022-11-01 00:04:06.875087417 +0000
***************
*** 17,23 ****
  Summary:        OpenStack Oslo Metrics library
  
  License:        ASL 2.0
! URL:            https://launchpad.net/oslo
  Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
  # Required for tarball sources verification
  %if 0%{?sources_gpg} == 1
--- 17,23 ----
  Summary:        OpenStack Oslo Metrics library
  
  License:        ASL 2.0
! URL:            https://opendev.org/openstack/oslo.metrics
  Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
  # Required for tarball sources verification
  %if 0%{?sources_gpg} == 1
```

Comment 4 Jakub Kadlčík 2022-11-07 22:10:10 UTC
Hello Hirotaka,
thank you for the package.

> %{?python_provide:%python_provide python3-%{pkg_name}}

From the Python Packaging Guidelines (201x-era)
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_201x/#_the_py_provides_macro

> Historically, there was %python_provide macro with similar but
> different semantics. It still works for compatibility reasons but it
> is deprecated and SHOULD NOT be used and packagers SHOULD replace is
> with appropriate %py_provides call. 

Should be easy-fix


> Issues:
> =======
> - 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.
>   Note: License file license.png is not marked as %license
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/LicensingGuidelines/#_license_text

I am ignoring this issue because it doesn't make any sense to me

Comment 5 Hirotaka Wakabayashi 2022-11-08 02:33:20 UTC
Hello Jakub, Thank you very much for your review! I fixed the issue on the package guidelines.

Spec URL: https://hiwkby.fedorapeople.org/python-oslo-metrics.spec
SRPM URL: https://hiwkby.fedorapeople.org/python-oslo-metrics-0.5.0-1.fc38.src.rpm
Koji(success!): https://koji.fedoraproject.org/koji/taskinfo?taskID=93927325

```
$ diff -c public_html/python-oslo-metrics.spec python-oslo-metrics.spec 
*** public_html/python-oslo-metrics.spec        2022-11-01 00:04:06.875087417 +0000
--- python-oslo-metrics.spec    2022-11-08 02:11:08.866795247 +0000
***************
*** 33,39 ****
  
  %package -n python3-%{pkg_name}
  Summary:        OpenStack Oslo Metrics library
! %{?python_provide:%python_provide python3-%{pkg_name}}
  
  BuildRequires:  git-core
  BuildRequires:  python3-devel
--- 33,39 ----
  
  %package -n python3-%{pkg_name}
  Summary:        OpenStack Oslo Metrics library
! %py_provides python3-pkg_resources
  
  BuildRequires:  git-core
  BuildRequires:  python3-devel
```
```
$ sudo dnf install -y ~/dev/packages/RPMS/noarch/python3-oslo-metrics-0.5.0-1.fc38.noarch.rpm
$ rpm -q --whatprovides python3-oslo-metrics
python3-oslo-metrics-0.5.0-1.fc38.noarch
```

Thanks in advance,
Hirotaka

Comment 6 Jakub Kadlčík 2022-11-08 23:53:25 UTC
> ! %py_provides python3-pkg_resources

The documentation says

> Instead of:
> 
>     Provides: python3-pkg_resources = %{version}-%{release}
>
> Do:
>
>     %py_provides python3-pkg_resources

The `pkg_resources` is just an example package name.

Your package can be used as `import oslo_metrics`, so the macro should
look like this

    %py_provides python3-oslo-metrics

Even better, using a macro

    %py_provides python3-%{pkg_name}

I've read the documentation section a few times now and I find it
somewhat confusing, so my suggestion might be wrong. But unless
anybody disagrees, I would go with that.

Comment 7 Hirotaka Wakabayashi 2022-11-09 03:04:36 UTC
Hello Jakub, Thanks your for your review! Sorry, I misread the guidelines. (^_^;;;

Spec URL: https://hiwkby.fedorapeople.org/python-oslo-metrics.spec
SRPM URL: https://hiwkby.fedorapeople.org/python-oslo-metrics-0.5.0-1.fc38.src.rpm
Koji(success!): https://koji.fedoraproject.org/koji/taskinfo?taskID=93962719

```
$ diff -c public_html/python-oslo-metrics.spec python-oslo-metrics.spec 
*** public_html/python-oslo-metrics.spec        2022-11-08 02:11:08.866795247 +0000
--- python-oslo-metrics.spec    2022-11-09 02:40:04.948293336 +0000
***************
*** 33,39 ****
  
  %package -n python3-%{pkg_name}
  Summary:        OpenStack Oslo Metrics library
! %py_provides python3-pkg_resources
  
  BuildRequires:  git-core
  BuildRequires:  python3-devel
--- 33,39 ----
  
  %package -n python3-%{pkg_name}
  Summary:        OpenStack Oslo Metrics library
! %py_provides python3-%{pkg_name}
  
  BuildRequires:  git-core
  BuildRequires:  python3-devel

```
```
$ rpmspec -P python-oslo-metrics.spec | grep -B 3 Provides

%package -n python3-oslo-metrics
Summary:        OpenStack Oslo Metrics library
Provides: python3-oslo-metrics = 0.5.0-1.fc38
Provides: python3.11-oslo-metrics = 0.5.0-1.fc38
Provides: python-oslo-metrics = 0.5.0-1.fc38

$ sudo dnf install -y ~/dev/packages/RPMS/noarch/python3-oslo-metrics-0.5.0-1.fc38.noarch.rpm
$ rpm -q python3-oslo-metrics
python3-oslo-metrics-0.5.0-1.fc38.noarch
```

Comment 8 Hirotaka Wakabayashi 2022-11-09 03:13:45 UTC
> Even better, using a macro
> 
>     %py_provides python3-%{pkg_name}

I think your comment is right because the newer guidelines says:
```
%py_provides python3-FOO
```
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_and_requirements

Comment 9 Jakub Kadlčík 2022-11-09 19:12:00 UTC
Perfect, thank you :-)



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

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


Issues:
=======
- 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.
  Note: License file license.png is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text


===== 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* Apache License 2.0",
     "*No copyright* Apache License", "Apache License 2.0". 28 files have
     unknown license. Detailed output of licensecheck in
     /home/jkadlcik/2009146-python-oslo-metrics/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.
[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]: 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: There are rpmlint messages (see attachment).
[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.
[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:
[x]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[-]: 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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-oslo-metrics , python3-oslo-metrics-tests
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[?]: 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]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
[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
-------
Cannot parse rpmlint output:


Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 3

python3-oslo-metrics.noarch: W: no-manual-page-for-binary oslo-metrics
python3-oslo-metrics-tests.noarch: W: no-documentation
python-oslo-metrics-doc.noarch: W: files-duplicate /usr/share/doc/python-oslo-metrics-doc/html/_static/images/openstack-logo-full.png /usr/share/doc/python-oslo-metrics-doc/html/_static/images/logo-full.png
python-oslo-metrics-doc.noarch: W: files-duplicate /usr/share/doc/python-oslo-metrics-doc/html/_static/images/openstack-logo-full.svg /usr/share/doc/python-oslo-metrics-doc/html/_static/images/logo-full.svg
python-oslo-metrics-doc.noarch: W: files-duplicate /usr/share/doc/python-oslo-metrics-doc/html/_static/images/openstack-logo-vert.png /usr/share/doc/python-oslo-metrics-doc/html/_static/images/logo-vert.png
python-oslo-metrics-doc.noarch: W: files-duplicate /usr/share/doc/python-oslo-metrics-doc/html/_static/images/openstack-logo-vert.svg /usr/share/doc/python-oslo-metrics-doc/html/_static/images/logo-vert.svg
python3-oslo-metrics.noarch: W: files-duplicate /usr/lib/python3.11/site-packages/oslo.metrics-0.5.0-py3.11.egg-info/not-zip-safe /usr/lib/python3.11/site-packages/oslo.metrics-0.5.0-py3.11.egg-info/dependency_links.txt
 3 packages and 0 specfiles checked; 0 errors, 7 warnings, 0 badness; has taken 0.1 s



Source checksums
----------------
https://releases.openstack.org/_static/0xa63ea142678138d1bb15f2e303bdfd64dd164087.txt :
  CHECKSUM(SHA256) this package     : 78f850ee4e9c8c1f5447d15856042cd65aa8bdd311f8a52906b18bf97dab4049
  CHECKSUM(SHA256) upstream package : 78f850ee4e9c8c1f5447d15856042cd65aa8bdd311f8a52906b18bf97dab4049
https://tarballs.openstack.org/oslo.metrics/oslo.metrics-0.5.0.tar.gz.asc :
  CHECKSUM(SHA256) this package     : 0b869bc670597ea0ade0abe1681330da9b41a619387a8e76af0f1edc3688c313
  CHECKSUM(SHA256) upstream package : 0b869bc670597ea0ade0abe1681330da9b41a619387a8e76af0f1edc3688c313
https://tarballs.openstack.org/oslo.metrics/oslo.metrics-0.5.0.tar.gz :
  CHECKSUM(SHA256) this package     : db9ae0d7dd3ba1a55f55c25226919ee1f454cfc2535ffa98d5b31ee3cbb67cc5
  CHECKSUM(SHA256) upstream package : db9ae0d7dd3ba1a55f55c25226919ee1f454cfc2535ffa98d5b31ee3cbb67cc5


Requires
--------
python3-oslo-metrics (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3-oslo-config
    python3-oslo-log
    python3-oslo-utils
    python3-pbr
    python3-prometheus_client

python-oslo-metrics-doc (rpmlib, GLIBC filtered):

python3-oslo-metrics-tests (rpmlib, GLIBC filtered):
    python(abi)
    python3-oslo-metrics
    python3-oslotest



Provides
--------
python3-oslo-metrics:
    python-oslo-metrics
    python3-oslo-metrics
    python3.11-oslo-metrics
    python3.11dist(oslo-metrics)
    python3dist(oslo-metrics)

python-oslo-metrics-doc:
    python-oslo-metrics-doc

python3-oslo-metrics-tests:
    python-oslo-metrics-tests
    python3-oslo-metrics-tests
    python3.11-oslo-metrics-tests



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2009146
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, Python
Disabled plugins: PHP, Haskell, Java, Ocaml, fonts, R, C/C++, SugarActivity, Perl
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 10 Hirotaka Wakabayashi 2022-11-09 23:06:53 UTC
Hello Jakub, I really appreciate your review!

Comment 11 Gwyn Ciesla 2022-11-10 15:46:15 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-oslo-metrics

Comment 12 Fedora Update System 2022-11-11 00:49:50 UTC
FEDORA-2022-bc91d79a3f has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-bc91d79a3f

Comment 13 Fedora Update System 2022-11-11 00:51:08 UTC
FEDORA-2022-bc91d79a3f has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


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