Bug 2242449 - Review Request: rust-vhost-device-scmi - Vhost-user SCMI backend device
Summary: Review Request: rust-vhost-device-scmi - Vhost-user SCMI backend device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Sandro Bonazzola
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/vhost-device...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-06 09:08 UTC by Milan Zamazal
Modified: 2023-10-16 11:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-10-16 11:10:11 UTC
Type: ---
Embargoed:
sbonazzo: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 6495820 to 6499555 (1.11 KB, patch)
2023-10-06 12:11 UTC, Fedora Review Service
no flags Details | Diff

Description Milan Zamazal 2023-10-06 09:08:16 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/mzamazal/vhost-device-scmi/fedora-rawhide-x86_64/06495775-rust-vhost-device-scmi/rust-vhost-device-scmi.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/mzamazal/vhost-device-scmi/fedora-rawhide-x86_64/06495775-rust-vhost-device-scmi/rust-vhost-device-scmi-0.1.0-1.fc40.src.rpm
Description: Vhost-user SCMI backend device.
Fedora Account System Username: mzamazal

This is my first Fedora package. I'm the upstream author of the given Rust crate.

rpmlint output:

rpmlint rust-vhost-device-scmi.spec rust-vhost-device-scmi-0.1.0-1.fc40.src.rpm  vhost-device-scmi-0.1.0-1.fc40.x86_64.rpm vhost-device-scmi-0.1.0-1.fc40.aarch64.rpm 
======================================== rpmlint session starts ========================================rpmlint: 2.4.0
configuration:
    /usr/lib/python3.12/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: 4

========= 3 packages and 1 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.5 s =========

Comment 1 Fedora Review Service 2023-10-06 09:19:57 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6495820
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2242449-rust-vhost-device-scmi/fedora-rawhide-x86_64/06495820-rust-vhost-device-scmi/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Fabio Valentini 2023-10-06 09:45:17 UTC
I see three issues immediately:

1. You "addressed" one FIXME item, but not the other. The outputof %cargo_license_summary is missing, and the resulting license tag must be updated to match.

2. Missing / broken debug package generation:

> %global debug_package %{nil}
> strip %{buildroot}/%{_bindir}/*

I don't know how you came up with this, but it is both unnecessary and breaks the debuginfo stripping that automatically happens during RPM builds. Remove both lines.

3. Mangled %changelog:

Looks like tito does not support rpmautospec.

Remove these two lines, otherwise you will get a broken package:

> * Fri Oct 06 2023 Milan Zamazal <mzamazal> 0.1.0-1
> - new package built with tito

Comment 3 Milan Zamazal 2023-10-06 10:45:04 UTC
(In reply to Fabio Valentini from comment #2)
> I see three issues immediately:

Thank you for looking!
 
> 1. You "addressed" one FIXME item, but not the other. The outputof
> %cargo_license_summary is missing, and the resulting license tag must be
> updated to match.

OK, will do.
 
> 2. Missing / broken debug package generation:
> 
> > %global debug_package %{nil}
> > strip %{buildroot}/%{_bindir}/*
> 
> I don't know how you came up with this, but it is both unnecessary and
> breaks the debuginfo stripping that automatically happens during RPM builds.
> Remove both lines.

Without the first line, I get the following error from rpmbuild:

  Processing files: rust-vhost-device-scmi-debugsource-0.1.0-1.fc40.x86_64
  error: Empty %files file /root/rpmbuild/BUILD/vhost-device-scmi-0.1.0/debugsourcefiles.list
  RPM build errors:
      Empty %files file /root/rpmbuild/BUILD/vhost-device-scmi-0.1.0/debugsourcefiles.list

The package doesn't contain any library, just a binary to run. Would you advise me how to deal with this error properly?

> 3. Mangled %changelog:

OK.

Comment 4 Fabio Valentini 2023-10-06 10:50:08 UTC
(In reply to Milan Zamazal from comment #3)
> > 2. Missing / broken debug package generation:
> > 
> > > %global debug_package %{nil}
> > > strip %{buildroot}/%{_bindir}/*
> > 
> > I don't know how you came up with this, but it is both unnecessary and
> > breaks the debuginfo stripping that automatically happens during RPM builds.
> > Remove both lines.
> 
> Without the first line, I get the following error from rpmbuild:
> 
>   Processing files: rust-vhost-device-scmi-debugsource-0.1.0-1.fc40.x86_64
>   error: Empty %files file
> /root/rpmbuild/BUILD/vhost-device-scmi-0.1.0/debugsourcefiles.list
>   RPM build errors:
>       Empty %files file
> /root/rpmbuild/BUILD/vhost-device-scmi-0.1.0/debugsourcefiles.list
> 
> The package doesn't contain any library, just a binary to run. Would you
> advise me how to deal with this error properly?

It doesn't matter whether library or binary. All packages are supposed to have valid debug information. You need to remove both the manual stripping and the "%debuginfo_package %{nil}". The error you get means that rpm cannot find any debuginfo to strip - if you strip it manually, of course it can't find any. If you still get the error after removing the manual call to "strip", then something is going wrong during the build process that causes the binary to end up without valid debug information.

Comment 5 Milan Zamazal 2023-10-06 12:01:55 UTC
(In reply to Fabio Valentini from comment #4)

> If you still get the error after removing the manual call to
> "strip", then something is going wrong during the build process that causes
> the binary to end up without valid debug information.

Indeed, it must be something in my local environment, it builds in Copr. Thanks for help.

Here is the fixed package:

Spec URL: https://download.copr.fedorainfracloud.org/results/mzamazal/vhost-device-scmi/fedora-rawhide-x86_64/06499467-rust-vhost-device-scmi/rust-vhost-device-scmi.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/mzamazal/vhost-device-scmi/fedora-rawhide-x86_64/06499467-rust-vhost-device-scmi/rust-vhost-device-scmi-0.1.0-1.fc40.src.rpm

Comment 6 Fedora Review Service 2023-10-06 12:11:12 UTC
Created attachment 1992513 [details]
The .spec file difference from Copr build 6495820 to 6499555

Comment 7 Fedora Review Service 2023-10-06 12:11:15 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6499555
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2242449-rust-vhost-device-scmi/fedora-rawhide-x86_64/06499555-rust-vhost-device-scmi/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 8 Sandro Bonazzola 2023-10-11 09:56:13 UTC
Package Review
==============

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


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

C/C++:
[-]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[x]: Package does not contain kernel modules.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[x]: Rpath absent or only used for internal libs.

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.
[?]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. No licenses found. Please check the source files for licenses manually.
     Manual inspection note: The spec lists "Apache-2.0 OR BSD-3-Clause" but there are also a few files licensed under GPL-2.0 and GPL-2.0-only in the cargo package.
     The binary coming form the source under GPL license is not being shipped within RPMs but the sources are, so I think these licenses should be listed as well.
     Comments from some Rust package maintainer and/or opensource-legal would be appreciated.
     
[x]: License file installed when any subpackage combination is installed.
[?]: If the package is under multiple licenses, the licensing breakdown must be documented in the spec.
     Note: marking as not evaluated for above comments
[x]: %build honors applicable compiler flags or justifies otherwise.
[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]: Useful -debuginfo package or justification otherwise.
[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: Test run failed
[x]: Package complies to the Packaging Guidelines
[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]: The License field must be a valid SPDX expression.
[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

===== 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).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in vhost-
     device-scmi
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[!]: Patches link to upstream bugs/comments/lists or are otherwise justified.
     Note: I would recommend either open an inssue or send a pr to https://github.com/rust-vmm/vhost-device
     pushing the man page 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]: 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: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: vhost-device-scmi-0.1.0-1.fc40.x86_64.rpm
          rust-vhost-device-scmi-debugsource-0.1.0-1.fc40.x86_64.rpm
          rust-vhost-device-scmi-0.1.0-1.fc40.src.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
rpmlintrc: [PosixPath('/tmp/tmpzphpkulw')]
checks: 31, packages: 3

 3 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.2 s 




Rpmlint (installed packages)
----------------------------
(none): E: there is no installed rpm "vhost-device-scmi".
(none): E: there is no installed rpm "rust-vhost-device-scmi-debugsource".
There are no files to process nor additional arguments.
Nothing to do, aborting.
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.12/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

 0 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.0 s 



Source checksums
----------------
https://crates.io/api/v1/crates/vhost-device-scmi/0.1.0/download#/vhost-device-scmi-0.1.0.crate :
  CHECKSUM(SHA256) this package     : 091897d33fa1dc0485fa427823258f3040713768f13b507fb750b368d3249b21
  CHECKSUM(SHA256) upstream package : 091897d33fa1dc0485fa427823258f3040713768f13b507fb750b368d3249b21


Requires
--------
vhost-device-scmi (rpmlib, GLIBC filtered):
    ld-linux-x86-64.so.2()(64bit)
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3)(64bit)
    libgcc_s.so.1(GCC_4.2.0)(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)

rust-vhost-device-scmi-debugsource (rpmlib, GLIBC filtered):



Provides
--------
vhost-device-scmi:
    vhost-device-scmi
    vhost-device-scmi(x86-64)

rust-vhost-device-scmi-debugsource:
    rust-vhost-device-scmi-debugsource
    rust-vhost-device-scmi-debugsource(x86-64)



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review --no-colors --prebuilt --rpm-spec --name rust-vhost-device-scmi --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic, C/C++
Disabled plugins: PHP, SugarActivity, Python, Haskell, Java, Perl, R, fonts, Ocaml
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 9 Sandro Bonazzola 2023-10-11 09:57:11 UTC
Bottom line, I have some doubts about the license field in the spec file due to the GPL-2 sources included in the crate. Other than that, looks good to me.

Comment 10 Milan Zamazal 2023-10-11 10:28:46 UTC
(In reply to Sandro Bonazzola from comment #9)
> Bottom line, I have some doubts about the license field in the spec file due
> to the GPL-2 sources included in the crate.

Those are example files not related to regular runs of vhost-device-scmi (see https://github.com/rust-vmm/vhost-device/tree/main/crates/vhost-device-scmi/kernel/iio-dummy). They are included only in the source package and as I understand https://docs.fedoraproject.org/en-US/legal/license-field/#_basic_policy, they shouldn't be listed in License tag.

Comment 11 Sandro Bonazzola 2023-10-11 11:18:14 UTC
(In reply to Milan Zamazal from comment #10)
> (In reply to Sandro Bonazzola from comment #9)
> > Bottom line, I have some doubts about the license field in the spec file due
> > to the GPL-2 sources included in the crate.
> 
> Those are example files not related to regular runs of vhost-device-scmi
> (see
> https://github.com/rust-vmm/vhost-device/tree/main/crates/vhost-device-scmi/
> kernel/iio-dummy). They are included only in the source package and as I
> understand
> https://docs.fedoraproject.org/en-US/legal/license-field/#_basic_policy,
> they shouldn't be listed in License tag.

Right. So, looks good to me. Approving.

Comment 12 Neal Gompa 2023-10-13 09:33:51 UTC
I've sponsored you as a packager. Welcome to Fedora and I hope you enjoy contributing. :)

Comment 13 Neal Gompa 2023-10-13 09:34:53 UTC
Or... actually not. It looks like you haven't signed the FPCA. Please do that and I'll take care of it.

Comment 14 Milan Zamazal 2023-10-13 10:12:36 UTC
(In reply to Neal Gompa from comment #13)
> It looks like you haven't signed the FPCA.

Fixed.

> Please do that and I'll take care of it.

Thank you!

Comment 15 Neal Gompa 2023-10-13 10:34:09 UTC
This is now done for real this time. Welcome to Fedora. :)

Comment 16 Fedora Admin user for bugzilla script actions 2023-10-13 11:48:00 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-vhost-device-scmi

Comment 17 Fedora Update System 2023-10-16 11:08:55 UTC
FEDORA-2023-058e2c966b has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-058e2c966b

Comment 18 Fedora Update System 2023-10-16 11:10:11 UTC
FEDORA-2023-058e2c966b has been pushed to the Fedora 40 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.