Bug 1912914 - Review Request: ksc - kernel source checker
Summary: Review Request: ksc - kernel source checker
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-05 15:15 UTC by Cestmir Kalina
Modified: 2022-02-21 09:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-21 09:55:15 UTC
Type: ---
Embargoed:
ngompa13: fedora-review+


Attachments (Terms of Use)

Description Cestmir Kalina 2021-01-05 15:15:49 UTC
Spec URL: https://raw.githubusercontent.com/RedHatOfficial/ksc/master/ksc.spec
SRPM URL: https://github.com/RedHatOfficial/ksc/blob/master/ksc-1.7-1.gitf3d3ad2.fc32.src.rpm?raw=true
Description: ksc is a python tool for out-of-tree kernel modules, in particular symbol checksums and bugzilla reporting
Fedora Account System Username: ckalina

Comment 1 Neal Gompa 2021-01-05 20:51:14 UTC
Taking this review.

Comment 2 Cestmir Kalina 2021-02-01 08:17:02 UTC
Hello, has there been any development on the package review, please? Can I help in any way? Thanks!

Comment 3 Neal Gompa 2021-02-04 03:46:22 UTC
Your SRPM URL is invalid and causes fedora-review to choke. Please fix it.

Comment 4 Cestmir Kalina 2021-02-04 11:53:26 UTC
(In reply to Neal Gompa from comment #3)
> Your SRPM URL is invalid and causes fedora-review to choke. Please fix it.

It appears that fedora-review ignores the get params:
INFO: Getting .spec and .srpm Urls from : 1912914
INFO:   --> SRPM url: https://github.com/RedHatOfficial/ksc/blob/master/ksc-1.7-1.gitf3d3ad2.fc32.src.rpm

I am not sure whether fedora-review will pickup on a new SRPM URL line, but I digress;

SRPM URL: http://people.redhat.com/~ckalina/fed-ksc-review/ksc-1.7-1.gitf3d3ad2.fc32.src.rpm

If it doesn't, could you please download it manually and run fedora-review -n ksc instead of -b BUGID, please?

Comment 5 Neal Gompa 2021-02-06 23:29:36 UTC
> %doc README COPYING PKG-INFO

Please fix this so the license file is separately marked, like so:

> %license COPYING
> %doc README PKG-INFO

Cf. https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text

Comment 6 Cestmir Kalina 2021-02-08 11:37:50 UTC
(In reply to Neal Gompa from comment #5)
> > %doc README COPYING PKG-INFO
> 
> Please fix this so the license file is separately marked, like so:
> 
> > %license COPYING
> > %doc README PKG-INFO
> 

Fixed in-place (same srpm and spec url).

Comment 7 Cestmir Kalina 2021-02-15 19:30:33 UTC
Hello, has there been any development on the package review, please? Can I help in any way? Thanks!

There seem to be no outstanding issues, going through fedora-review.

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

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

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

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[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]: 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]: License field in the package spec file matches the actual license.
     Note: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[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.
[x]: Packages must not store files under /srv, /opt or /usr/local
     Note: Cannot unpack rpms (using --prebuilt?)
[x]: Package complies to the Packaging Guidelines
[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.

===== SHOULD items =====

Generic:
[x]: Reviewer should test that the package builds in mock.
[-]: 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.
[x]: 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]: 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]: Fully versioned dependency in subpackages if applicable.
[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:
[ ]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[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.

Comment 8 Neal Gompa 2021-02-15 20:21:56 UTC
This package doesn't comply with the Python packaging guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/

Some things I see that's wrong with it:

* Dependency generators are disabled, which is not something we generally permit.
* The usage of %__python is not permitted
* This should use the %py3_build and %py3_install macros instead of calling setup.py manually
* URL does not point to the project home page

Comment 9 Cestmir Kalina 2021-02-16 12:31:16 UTC
Thank you for the reply.

(In reply to Neal Gompa from comment #8)
> This package doesn't comply with the Python packaging guidelines:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> 
> Some things I see that's wrong with it:
> 
> * Dependency generators are disabled, which is not something we generally
> permit.

The guideline states "Packages MAY use the automatic Python dependency generator."
and "This generator is enabled by default in Fedora. If a packager wishes to
explicitly opt out of the generator because the upstream metadata are not
applicable, a packager SHOULD opt out explicitly by adding:

%{?python_disable_dependency_generator}"

This macro is not present in the spec file. Added egg-info. Using py3_dist.

> * The usage of %__python is not permitted

Removed.

> * This should use the %py3_build and %py3_install macros instead of calling
> setup.py manually

Changed.

> * URL does not point to the project home page

Changed to point to github page of the project.

Do you figure there's anything missing? Thanks!

Comment 10 Neal Gompa 2021-02-16 13:27:33 UTC
> %py3_install -- -O1 --root %{buildroot}

"%py3_install" does --skip-build and already passes --root %{buildroot}, so we don't need those extra options.

(The correct build options are done in "%py3_build" already)

Comment 11 Neal Gompa 2021-02-16 13:31:44 UTC
> Requires:	%{py3_dist requests}

Your setup.py has "install_requires=['requests']", so this is not needed, as the dependency will be autogenerated.

If you're building for RHEL 8 (outside of EPEL), you can also have it turned on in your spec file by adding a line to the spec with the following: "%{?python_enable_dependency_generator}"

Comment 12 Cestmir Kalina 2021-02-16 14:39:19 UTC
Changed the py3install and removed the extra requires. Do you figure there's anything else? Thanks!

Comment 13 Neal Gompa 2021-02-17 01:42:18 UTC
> %py3_install -- -O1

This should just be "%py3_install".

Comment 14 Cestmir Kalina 2021-02-17 13:46:09 UTC
(In reply to Neal Gompa from comment #13)
> > %py3_install -- -O1
> 
> This should just be "%py3_install".

Changed.

Comment 15 Neal Gompa 2021-02-17 14:34:35 UTC
Everything looks good to me now.

PACKAGE APPROVED.

Comment 16 Mohan Boddu 2021-02-19 20:38:21 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/ksc

Comment 17 Mattia Verga 2022-02-21 09:55:15 UTC
Package is available in repositories, closing.


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