Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2121114 - Review Request: python-pep440 - A simple package with utils to check whether versions number match Pep 440
Summary: Review Request: python-pep440 - A simple package with utils to check whether ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR fedora-neuro, NeuroFedora
TreeView+ depends on / blocked
 
Reported: 2022-08-24 13:57 UTC by Maíra Canal
Modified: 2022-09-15 13:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-15 13:44:43 UTC
Type: ---
Embargoed:
sanjay.ankur: fedora-review+


Attachments (Terms of Use)

Description Maíra Canal 2022-08-24 13:57:01 UTC
Spec URL: https://raw.githubusercontent.com/mairacanal/python-pep440/main/python-pep440.spec
SRPM URL: https://github.com/mairacanal/python-pep440/raw/main/python-pep440-0.1.1-1.fc38.src.rpm
Description: A simple package with utils to check whether versions number match PEP 440.
Fedora Account System Username: mairacanal

Koji Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=91209451

Hi,

I'm a beginner in packaging, so I still need to get sponsored by the packagers group. I decided to package python-pep440 as it is a dependency to build python-setup-meta. This package is linked to the following issue: https://pagure.io/neuro-sig/NeuroFedora/issue/503

I really appreciate any feedback!

Best Regards,
- Maíra Canal

Comment 1 Ankur Sinha (FranciscoD) 2022-08-24 15:35:16 UTC
Looks very good. A few very minor issues.

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

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


Issues:
=======
- Dist tag is present.
^
Using rpmautospec, so this is fine.

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


It is included in the package automatically, but not marked as a license file somehow:

$ rpm -ql  -p ./python3-pep440-0.1.1-1.fc38.noarch.rpm  | grep -i license
/usr/lib/python3.11/site-packages/pep440-0.1.1.dist-info/LICENSE

$ rpm -ql --licensefiles -p ./python3-pep440-0.1.1-1.fc38.noarch.rpm
# returns nothing

I think it'll be better to add the license to the files section here, even if that means the file is included twice:
%license LICENSE

- I think you should be able to drop this line:
BuildRequires:  python3-flit-core

It should be pulled in by the `pyproject_buildrequire` macro. Worth checking. Only if it isn't pulled in by the macro do you need to manually specify it.

===== 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", "MIT License", "*No copyright* MIT
     License". 5 files have unknown license. Detailed output of
     licensecheck in /home/asinha/dump/fedora-reviews/2121114-python-
     pep440/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).
[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.
[-]: 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]: 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).
[x]: Package functions as described.
^
tests pass, so should be fine.

[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.
[x]: 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)
^
This is fine. The difference is because we're using rpmautospec.

[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Cannot parse rpmlint output:

Ran manually:

$ rpmlint ./python3-pep440-0.1.1-1.fc38.noarch.rpm python-pep440-0.1.1-1.fc38.src.rpm ../srpm-unpacked/python-pep440.spec 
======================================================== rpmlint session starts ========================================================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 3

python-pep440.src: W: strange-permission python-pep440.spec 600
========================= 2 packages and 1 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 1.1 s ========================

^ warning can be ignored, this seems to happen when fedorareview unpacks the srpm.


Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:

^
let's ignore this for the moment.


Source checksums
----------------
https://files.pythonhosted.org/packages/source/p/pep440/pep440-0.1.1.tar.gz :
  CHECKSUM(SHA256) this package     : 13d17898769abd028af0f62745c9ce75f5bb9977012a7d5d4c89c29272de34ee
  CHECKSUM(SHA256) upstream package : 13d17898769abd028af0f62745c9ce75f5bb9977012a7d5d4c89c29272de34ee


Requires
--------
python3-pep440 (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python3-pep440:
    python-pep440
    python3-pep440
    python3.11-pep440
    python3.11dist(pep440)
    python3dist(pep440)



Diff spec file in url and in SRPM
---------------------------------
--- /home/asinha/dump/fedora-reviews/2121114-python-pep440/srpm/python-pep440.spec	2022-08-24 16:12:42.853754194 +0100
+++ /home/asinha/dump/fedora-reviews/2121114-python-pep440/srpm-unpacked/python-pep440.spec	2022-08-24 14:28:32.000000000 +0100
@@ -1,2 +1,11 @@
+## START: Set by rpmautospec
+## (rpmautospec version 0.3.0)
+%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
+    release_number = 1;
+    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
+    print(release_number + base_release_number - 1);
+}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
+## END: Set by rpmautospec
+
 %bcond_without tests
 
@@ -25,5 +34,4 @@
 %description -n python3-pep440 %_description
 
-
 %prep
 %autosetup -n pep440-%{version}
@@ -36,10 +44,8 @@
 %pyproject_wheel
 
-
 %install
 %pyproject_install
 %pyproject_save_files pep440
 
-
 %check
 %if %{with tests}
@@ -52,3 +58,4 @@
 
 %changelog
-%autochangelog
+* Wed Aug 24 2022 Maíra Canal <mairacanal> 0.1.1-1
+- Initial Fedora Package


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

Comment 3 Ankur Sinha (FranciscoD) 2022-08-24 16:33:10 UTC
That looks good now. XXX APPROVED XXX

We now need to get you sponsored. Would you look for a few python (or other language) packages in the current list and review them please? (You can note in your review that you are looking for sponsorship).

https://docs.fedoraproject.org/en-US/fesco/Packager_sponsor_policy/#comment_on_reviews

Tickets currently under review:

https://fedoraproject.org/PackageReviewStatus/in_progress.html

Unassigned tickets:

https://fedoraproject.org/PackageReviewStatus/reviewable.html


You can also submit more packages for review, but reviewing others packages is a great way of learning more about the guidelines and practising their use.
Once you have a few packages reviews approved and/or a few reviews done, I'll be happy to sponsor you to the package maintainers group.

Cheers,

Comment 4 Maíra Canal 2022-08-25 11:27:36 UTC
Packages Reviews
- https://bugzilla.redhat.com/show_bug.cgi?id=2119987

New Package Submissions
- https://bugzilla.redhat.com/show_bug.cgi?id=2120001

Comment 6 Gwyn Ciesla 2022-08-29 20:55:09 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pep440


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