Bug 2211987 - Review Request: rocm-cmake - CMake modules for common build and dev tasks within the ROCm project
Summary: Review Request: rocm-cmake - CMake modules for common build and dev tasks wit...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Newton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-02 21:41 UTC by Tim Flink
Modified: 2023-06-07 20:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-07 20:48:00 UTC
Type: ---
Embargoed:
alexjnewt: fedora-review+


Attachments (Terms of Use)

Description Tim Flink 2023-06-02 21:41:32 UTC
Spec URL: https://tflink.fedorapeople.org/packages/rocm-cmake/rocm-cmake.spec
SRPM URL: https://tflink.fedorapeople.org/packages/rocm-cmake/rocm-cmake-5.5.1-1.fc38.src.rpm
COPR Build: https://copr.fedorainfracloud.org/coprs/tflink/rocm-packaging/build/5999442/
Description: rocm-cmake is a collection of CMake modules for common build and development tasks within the ROCm project. It is therefore a build dependency for many of the libraries that comprise the ROCm platform.

Fedora Account System Username: tflink

Comment 1 Jeremy Newton 2023-06-02 22:40:22 UTC
CC-ing myself. I'll take it in a few days if someone doesn't beat me to it.

Is there any rpmlint output? Does your copr have fedora-review enabled? Or is the plugin buggy again? Please enable and rebuild if it's not enabled.

> %{_docdir}/rocm-cmake/LICENSE

This can be excluded as it's duplicated by the license macro.

Comment 2 Tim Flink 2023-06-03 00:02:07 UTC
(In reply to Jeremy Newton from comment #1)

> Is there any rpmlint output? Does your copr have fedora-review enabled? Or
> is the plugin buggy again? Please enable and rebuild if it's not enabled.

The copr is supposed to have fedora-review enabled and there's a link to review.txt but I don't see the output. rpmlint run on my local machine is as follows:

:$ rpmlint rocm-cmake-5.5.1-2.fc38.src.rpm results_rocm-cmake/5.5.1/2.fc38/rocm-cmake-
5.5.1-2.fc38.noarch.rpm 
=============================== 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: 2

rocm-cmake.src: W: strange-permission rocm-cmake.spec 600
 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.1 s 

I cannot figure out how to change the permissions on the spec file in the srpm. Any tips here are certainly welcome.

> > %{_docdir}/rocm-cmake/LICENSE
> 
> This can be excluded as it's duplicated by the license macro.

This should be fixed now

Spec URL: https://tflink.fedorapeople.org/packages/rocm-cmake/rocm-cmake.spec
SRPM URL: https://tflink.fedorapeople.org/packages/rocm-cmake/rocm-cmake-5.5.1-2.fc38.src.rpm
COPR Build: https://copr.fedorainfracloud.org/coprs/tflink/rocm-packaging/build/5999550/

Comment 3 Tim Flink 2023-06-03 00:22:54 UTC
I found a typo in the specfile's source URL, COPR is showing the review now since fedora-review can actually run.

Spec URL: https://tflink.fedorapeople.org/packages/rocm-cmake/rocm-cmake.spec
SRPM URL: https://tflink.fedorapeople.org/packages/rocm-cmake/rocm-cmake-5.5.1-3.fc38.src.rpm
COPR Build: https://copr.fedorainfracloud.org/coprs/tflink/rocm-packaging/build/5999590/

Comment 4 Jeremy Newton 2023-06-06 15:54:36 UTC
>  cannot figure out how to change the permissions on the spec file in the srpm. Any tips here are certainly welcome.

The spec file you've written just has odd permissions.

Do:
chmod 644 rocm-cmake.spec

Then regenerate the srpm and the file will be good.

I suggest to also run rpmlint on the spec file itself locally before you generate the srpm to find obvious issues.

Let me do a quick review.

Comment 5 Jeremy Newton 2023-06-06 16:20:31 UTC
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]: 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". 112 files have unknown
     license. Detailed output of licensecheck in /var/lib/copr-
     rpmbuild/results/rocm-cmake/licensecheck.txt
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/rocm
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/rocm

> See NOTES at bottom

[-]: 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

> I don't think this is applicable, since it's just cmake modules, just like "extra-cmake-modules" or similiar

[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 20480 bytes in 1 files.
[!]: Package complies to the Packaging Guidelines

> /usr/share/rocm is orphaned, see NOTES at bottom

[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 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

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

Generic:
[x]: Reviewer should test that the package builds in mock.
[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).
[?]: 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.
[-]: 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]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define autorelease(e:s:pb:n)
     %{?-p:0.}%{lua:

> This is probably a bug in autorelease

[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.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.

> It looks like the permission issue was already fixed

===== NOTES =====

The only issue is that there's no owner of %{_datadir}/rocm
I suggest either:
- if it will be used by other future ROCm packages: make a sub-package called "rocm-filesystem" to own this 
OR
- if it will be the only user of this directory: just change "%{_datadir}/rocm/cmake" in %files to "%{_datadir}/rocm"

Comment 6 Tim Flink 2023-06-07 18:46:04 UTC
(In reply to Jeremy Newton from comment #5)

<snip>

> 
> Generic:
> [x]: Rpmlint is run on all installed packages.
>      Note: No rpmlint messages.
> 
> > It looks like the permission issue was already fixed

Yeah, it was an artifact of rpmautospec being run on my local system. I posted more details on devel list if you're interested in the details

> ===== NOTES =====
> 
> The only issue is that there's no owner of %{_datadir}/rocm
> I suggest either:
> - if it will be used by other future ROCm packages: make a sub-package
> called "rocm-filesystem" to own this 
> OR
> - if it will be the only user of this directory: just change
> "%{_datadir}/rocm/cmake" in %files to "%{_datadir}/rocm"

I assumed that something else was using %{_datadir}/rocm and purposely didn't claim it in this package but didn't think about leaving the parent unowned.

I installed AMD's packages on a VM and the only thing that showed up in /opt/rocm/share/rocm is cmake. From this, I infer that nothing else in the stack uses %{_datadir}/rocm

I've changed the %files section so that %{_datadir}/rocm is claimed. If it turns out that something else really does use that dir, we can revisit and change the package at that time.

Spec URL: https://tflink.fedorapeople.org/packages/rocm-cmake/rocm-cmake.spec
SRPM URL: https://tflink.fedorapeople.org/packages/rocm-cmake/rocm-cmake-5.5.1-4.fc39.src.rpm
COPR Build: https://copr.fedorainfracloud.org/coprs/tflink/rocm-packaging/build/6018432/

Comment 7 Jeremy Newton 2023-06-07 19:17:36 UTC
> Yeah, it was an artifact of rpmautospec being run on my local system

Yeah I haven't had time to investigate how to use that yet. Call me old fashioned :)

> I've changed the %files section so that %{_datadir}/rocm is claimed. If it turns out that something else really does use that dir, we can revisit and change the package at that time.

Sounds good! Feel free to loop me in on any future ROCm package reviews.

Approved.

Comment 8 Fedora Admin user for bugzilla script actions 2023-06-07 19:53:39 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rocm-cmake

Comment 9 Tim Flink 2023-06-07 20:48:00 UTC
rocm-cmake built successfully in rawhide, closing

https://koji.fedoraproject.org/koji/buildinfo?buildID=2210624


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