https://bugzilla.redhat.com/show_bug.cgi?id=2392155 --- Comment #2 from Ben Beasley <code@xxxxxxxxxxxxxxxxxx> --- This package looks pretty good, overall! There are a few things I think you should consider before I approve it. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated The spec file is generated by rust2rpm, simplifying the review. There is a cargo metadata package, which is reasonable and properly documented, and the License expression is constructed from %cargo_license_summary output. This part doesn’t look quite right; see Issues, below. Issues: ======= - Package does not contain duplicates in %files. Note: warning: File listed twice: /usr/share/cargo/registry/wiremix-0.7.0/LICENSE-APACHE See: https://docs.fedoraproject.org/en-US/packaging- guidelines/#_duplicate_files This is not a serious defect, and is due to reasonable design decisions in rust2rpm. - The output of %cargo_license_summary is correctly pasted into the spec file: # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 # Unlicense OR MIT # Zlib However, the license expression isn’t correctly constructed. Output of the form # A OR B # C OR D corresponds to an SPDX expression of the form (A OR B) AND (C OR D) and cannot be smashed together without parentheses. You also *don’t* need parentheses around a license with an exception: # E WITH F-exception # G is E WITH F-exception AND G not (E WITH F-exception) AND G which is still technically correct, but has unnecessary parentheses. For more details, see https://docs.fedoraproject.org/en-US/legal/license-field/. Note that there is a rule that allows you to simplify "(A OR B) AND A AND B" to just "A AND B"; I don’t like this rule because I think it adds unnecessary complexity and reduces clarity, and you are not required to do the simplification, but I do have to note that it is permitted. While it isn’t explicitly stated above, you can simplify "(A OR B) AND (B OR A)" into "A OR B" (order isn’t important). So, instead of this: License: MIT AND Apache-2.0 AND Unicode-DFS-2016 AND Apache-2.0 OR BSL-1.0 AND (Apache-2.0 WITH LLVM-exception) AND Unlicense AND Zlib try something like this: # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 # Unlicense OR MIT # Zlib License: %{shrink: (MIT OR Apache-2.0) AND MIT AND Unicode-DFS-2016 AND Zlib AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT) } There is no particular prescribed order of the terms in the License field; I am following Fabio Valentini’s usual convention of putting the crate’s own license first, then terms consisting of single licenses in alphabetical order, then disjunctive subexpressions (… OR …) in alphabetical order without sorting the terms within the disjunctionve subexpressions. Other conventions are possible and reasonable. Having some sort of consistent convention makes it easier for you to audit the expression when the %cargo_license_summary output changes. Similarly, using the %{shrink:…} macro to write one term per line makes it much easier to edit and audit the License expression. - Since the wiremix crate is not currently designed to be usable as a library, https://github.com/tsowell/wiremix/issues/13, https://crates.io/crates/wiremix/reverse_dependencies, you might consider omitting the Rust crate library subpackages since they are unnecessary. You can handle this via a simple configuration option in rust2rpm.toml: [package] cargo-toml-patch-comments = [ "Missing dependency crossterm 0.29.0 but works with 0.28.0.", "Build-only depencency not needed ro run wiremix.", ] cargo-install-lib = false - It would make sense to include the sample user configuraton file wiremix.toml as documentation. You can also do this in rust2rpm.toml, by adding the following to the [package] section: doc-files.include = [ "wiremix.toml", ] - While a man page is not required, it is always desired for a CLI/TUI tool. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages wiremix.aarch64: W: no-manual-page-for-binary wiremix If you like, you could try working with upstream to supply a man page. The https://github.com/oxipng/oxipng project is a pretty good example of how a man page can be automatically generated using clap_mangen, https://crates.io/crates/clap_mangen, via an xtask. You could also generate a man page downstream using help2man, which produces a pretty good result for this particular tool. You can add the following sections to rust2rpm.toml: [requires] build = ["help2man"] [scripts.build] post = ["help2man --no-info --output=wiremix.1 target/rpm/wiremix"] [scripts.install] post = ["install -t %{buildroot}%{_mandir}/man1 -D -p -m 0644 wiremix.1"] and then add to the [package] section: extra-files = ["%{_mandir}/man1/wiremix.1*"] Neither approach is required for approval, but either would be helpful to users. ===== 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. [!]: 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* MIT License". 49 files have unknown license. Detailed output of licensecheck in /home/ben/fedora/review/2392155-rust- wiremix/licensecheck.txt The License expression is not correctly constructed from the %cargo_license_summary output. See Issues, above. [x]: License file installed when any subpackage combination is installed. $ rpm -qL -p results/rust-wiremix-devel-0.7.0-1.fc44.noarch.rpm /usr/share/cargo/registry/wiremix-0.7.0/LICENSE-APACHE /usr/share/cargo/registry/wiremix-0.7.0/LICENSE-MIT $ rpm -qL -p results/wiremix-0.7.0-1.fc44.aarch64.rpm /usr/share/licenses/wiremix/LICENSE-APACHE /usr/share/licenses/wiremix/LICENSE-MIT /usr/share/licenses/wiremix/LICENSE.dependencies [-]: If the package is under multiple licenses, the licensing breakdown must be documented in the spec. [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. [x]: 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. [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]: 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]: 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]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 9824 bytes in 1 files. [x]: Packages must not store files under /srv, /opt or /usr/local ===== 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). [-]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in wiremix , rust-wiremix-devel , rust-wiremix+default-devel , rust- wiremix+trace-devel [x]: Package functions as described. (Tests pass; I did not attempt to test this interactively.) [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [x]: Patches link to upstream bugs/comments/lists or are otherwise justified. [-]: 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. https://koji.fedoraproject.org/koji/taskinfo?taskID=136646831 [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: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Large data in /usr/share should live in a noarch subpackage if package is arched. [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: wiremix-0.7.0-1.fc44.aarch64.rpm rust-wiremix-devel-0.7.0-1.fc44.noarch.rpm rust-wiremix+default-devel-0.7.0-1.fc44.noarch.rpm rust-wiremix+trace-devel-0.7.0-1.fc44.noarch.rpm rust-wiremix-0.7.0-1.fc44.src.rpm ============================ rpmlint session starts ============================ rpmlint: 2.7.0 configuration: /usr/lib/python3.13/site-packages/rpmlint/configdefaults.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/tmp1dbpkie6')] checks: 32, packages: 5 wiremix.aarch64: W: no-manual-page-for-binary wiremix 5 packages and 0 specfiles checked; 0 errors, 1 warnings, 22 filtered, 0 badness; has taken 0.3 s Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.7.0 configuration: /usr/lib/python3.14/site-packages/rpmlint/configdefaults.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: 32, packages: 4 wiremix.aarch64: W: no-manual-page-for-binary wiremix 4 packages and 0 specfiles checked; 0 errors, 1 warnings, 18 filtered, 0 badness; has taken 0.1 s Source checksums ---------------- https://crates.io/api/v1/crates/wiremix/0.7.0/download#/wiremix-0.7.0.crate : CHECKSUM(SHA256) this package : 08478e81752c93e2b5a691e7a50fded44cb247e98bb319ea04db1f9cf899e724 CHECKSUM(SHA256) upstream package : 08478e81752c93e2b5a691e7a50fded44cb247e98bb319ea04db1f9cf899e724 Requires -------- wiremix (rpmlib, GLIBC filtered): ld-linux-aarch64.so.1()(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) libpipewire-0.3.so.0()(64bit) rtld(GNU_HASH) rust-wiremix-devel (rpmlib, GLIBC filtered): (crate(anyhow/default) >= 1.0.95 with crate(anyhow/default) < 2.0.0~) (crate(clap/default) >= 4.5.26 with crate(clap/default) < 5.0.0~) (crate(clap/derive) >= 4.5.26 with crate(clap/derive) < 5.0.0~) (crate(clap/wrap_help) >= 4.5.26 with crate(clap/wrap_help) < 5.0.0~) (crate(crossterm/default) >= 0.28.0 with crate(crossterm/default) < 0.29.0~) (crate(crossterm/event-stream) >= 0.28.0 with crate(crossterm/event-stream) < 0.29.0~) (crate(crossterm/serde) >= 0.28.0 with crate(crossterm/serde) < 0.29.0~) (crate(futures-timer/default) >= 3.0.3 with crate(futures-timer/default) < 4.0.0~) (crate(futures/default) >= 0.3.31 with crate(futures/default) < 0.4.0~) (crate(itertools/default) >= 0.14.0 with crate(itertools/default) < 0.15.0~) (crate(libspa-sys/default) >= 0.8.0 with crate(libspa-sys/default) < 0.9.0~) (crate(libspa/default) >= 0.8.0 with crate(libspa/default) < 0.9.0~) (crate(log/default) >= 0.4.24 with crate(log/default) < 0.5.0~) (crate(nix/default) >= 0.29.0 with crate(nix/default) < 0.30.0~) (crate(nix/event) >= 0.29.0 with crate(nix/event) < 0.30.0~) (crate(nix/term) >= 0.29.0 with crate(nix/term) < 0.30.0~) (crate(pipewire/default) >= 0.8.0 with crate(pipewire/default) < 0.9.0~) (crate(pipewire/v0_3_44) >= 0.8.0 with crate(pipewire/v0_3_44) < 0.9.0~) (crate(ratatui/default) >= 0.29.0 with crate(ratatui/default) < 0.30.0~) (crate(ratatui/serde) >= 0.29.0 with crate(ratatui/serde) < 0.30.0~) (crate(regex/default) >= 1.11.1 with crate(regex/default) < 2.0.0~) (crate(scopeguard/default) >= 1.2.0 with crate(scopeguard/default) < 2.0.0~) (crate(serde/default) >= 1.0.218 with crate(serde/default) < 2.0.0~) (crate(serde/derive) >= 1.0.218 with crate(serde/derive) < 2.0.0~) (crate(serde_json/default) >= 1.0.137 with crate(serde_json/default) < 2.0.0~) (crate(serde_with/default) >= 3.12.0 with crate(serde_with/default) < 4.0.0~) (crate(smallvec/default) >= 1.14.0 with crate(smallvec/default) < 2.0.0~) (crate(toml/default) >= 0.8.20 with crate(toml/default) < 0.9.0~) cargo rust rust-wiremix+default-devel (rpmlib, GLIBC filtered): cargo crate(wiremix) rust-wiremix+trace-devel (rpmlib, GLIBC filtered): (crate(tracing-error/default) >= 0.2.1 with crate(tracing-error/default) < 0.3.0~) (crate(tracing-subscriber/default) >= 0.3.19 with crate(tracing-subscriber/default) < 0.4.0~) (crate(tracing-subscriber/env-filter) >= 0.3.19 with crate(tracing-subscriber/env-filter) < 0.4.0~) (crate(tracing/default) >= 0.1.41 with crate(tracing/default) < 0.2.0~) cargo crate(wiremix) Provides -------- wiremix: wiremix wiremix(aarch-64) rust-wiremix-devel: crate(wiremix) rust-wiremix-devel rust-wiremix+default-devel: crate(wiremix/default) rust-wiremix+default-devel rust-wiremix+trace-devel: crate(wiremix/trace) rust-wiremix+trace-devel Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/usr/bin/fedora-review -b 2392155 Buildroot used: fedora-rawhide-aarch64 Active plugins: Generic, Shell-api Disabled plugins: C/C++, PHP, Ocaml, Perl, R, Python, SugarActivity, Haskell, Java, fonts Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH -- You are receiving this mail because: You are always notified about changes to this product and component You are on the CC list for the bug. https://bugzilla.redhat.com/show_bug.cgi?id=2392155 Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202392155%23c2 -- _______________________________________________ package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue