Bug 2306380

Summary: Review Request: rust-delharc - Library for parsing and extracting files from LHA/LZH archives
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: Package ReviewAssignee: Fabio Valentini <decathorpe>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: decathorpe, package-review
Target Milestone: ---Keywords: AutomationTriaged
Target Release: ---Flags: decathorpe: fedora-review+
Hardware: All   
OS: Linux   
URL: https://crates.io/crates/delharc
Whiteboard:
Fixed In Version: rust-delharc-0.6.1-1.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-10-17 02:02:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2306379    
Bug Blocks: 2170297    
Attachments:
Description Flags
The .spec file difference from Copr build 8121231 to 8145571 none

Description Orion Poplawski 2024-08-21 03:06:17 UTC
Spec URL: https://orion.fedorapeople.org/rust-delharc.spec
SRPM URL: https://orion.fedorapeople.org/rust-delharc-0.6.1-1.fc42.src.rpm
Description:
A library for parsing and extracting files from LHA/LZH archives.

Fedora Account System Username: orion

Comment 1 Fedora Review Service 2024-08-21 19:35:21 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7932230
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2306380-rust-delharc/fedora-rawhide-x86_64/07932230-rust-delharc/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
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 2024-10-08 15:29:53 UTC
> Source:         https://github.com/royaltm/rust-delharc/archive/v%{version}/%{name}-%{version}.tar.gz
> # Crate is missing tests - https://github.com/royaltm/rust-delharc/issues/9
> #Source:         %{crates_source}

This is not acceptable for Rust crates.

Packages for Rust crates that are supposed to be used as libraries *MUST* be from the sources on crates.io (i.e. %{crates_source}):
https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_package_sources

In this case, that would mean either convincing upstream to ship the test sources in the published tarballs, or not running the missing tests.

Comment 3 Orion Poplawski 2024-10-09 02:33:37 UTC
I've gone with this:

Spec URL: https://orion.fedorapeople.org/rust-delharc.spec
SRPM URL: https://orion.fedorapeople.org/rust-delharc-0.6.1-1.fc42.src.rpm

rust2rpm.toml:
[package]
cargo-toml-patch-comments = [
    "Remove exmaples",
]

[[package.extra-sources]]
number = 2
file = "https://github.com/royaltm/rust-delharc/archive/v%{version}/%{name}-%{version}-github.tar.gz"
comments = [
    "Crate is missing tests - https://github.com/royaltm/rust-delharc/issues/9",
]

[scripts.prep]
pre = [
    "tar xvf %SOURCE2 --strip-components=1 %{name}-%{version}/tests/\\*",
]

How is that?

Comment 4 Fedora Review Service 2024-10-09 02:42:23 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8121231
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2306380-rust-delharc/fedora-rawhide-x86_64/08121231-rust-delharc/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 5 Fabio Valentini 2024-10-13 21:31:40 UTC
Thanks, looks pretty good to me, just a few minor things:

> rust-delharc-devel.noarch: W: wrong-file-end-of-line-encoding /usr/share/cargo/registry/delharc-0.6.1/CHANGELOG.md
> rust-delharc-devel.noarch: W: wrong-file-end-of-line-encoding /usr/share/cargo/registry/delharc-0.6.1/README.md

Please fix these up in %prep, either with sed or with dos2unix.

> rust-delharc.src: W: strange-permission delharc-0.6.1.crate 660
> rust-delharc.src: W: strange-permission delharc-fix-metadata.diff 660
> rust-delharc.src: W: strange-permission rust-delharc-0.6.1-github.tar.gz 660
> rust-delharc.src: W: strange-permission rust-delharc.spec 660

This looks like an artifact from the environment where you built the SRPM - did you use a folder under /tmp ?

> GNU General Public License, Version 2
> -------------------------------------
> rust-delharc-0.6.1-build/delharc-0.6.1/tests/decode/lh0.bin

It looks like this ".bin" file just ... contains a copy of the GPL-2.0 license text verbatim, with some non-ASCII junk added in front?
If this is just test data, fine. It just looks weird in the licensecheck output.
I've checked that none of the binary test files end up in the built package, so that should be OK too.

> tar xvf %SOURCE2 --strip-components=1 %{name}-%{version}/tests/\*

This looks very strange, and I'm surprised it works. But if it does ... then ok :D

Comment 6 Orion Poplawski 2024-10-16 03:06:44 UTC
Spec URL: https://orion.fedorapeople.org/rust-delharc.spec
SRPM URL: https://orion.fedorapeople.org/rust-delharc-0.6.1-1.fc42.src.rpm

(In reply to Fabio Valentini from comment #5)
> Thanks, looks pretty good to me, just a few minor things:
> 
> > rust-delharc-devel.noarch: W: wrong-file-end-of-line-encoding /usr/share/cargo/registry/delharc-0.6.1/CHANGELOG.md
> > rust-delharc-devel.noarch: W: wrong-file-end-of-line-encoding /usr/share/cargo/registry/delharc-0.6.1/README.md
> 
> Please fix these up in %prep, either with sed or with dos2unix.

Done.

> > rust-delharc.src: W: strange-permission delharc-0.6.1.crate 660
> > rust-delharc.src: W: strange-permission delharc-fix-metadata.diff 660
> > rust-delharc.src: W: strange-permission rust-delharc-0.6.1-github.tar.gz 660
> > rust-delharc.src: W: strange-permission rust-delharc.spec 660
> 
> This looks like an artifact from the environment where you built the SRPM -
> did you use a folder under /tmp ?

I've been using a umask of 0007.  I've reset to a more normal 0022.


Is there a standard way to include the rust2rpm.toml file in the spec/srpm?

Comment 7 Fedora Review Service 2024-10-16 03:12:28 UTC
Created attachment 2052228 [details]
The .spec file difference from Copr build 8121231 to 8145571

Comment 8 Fedora Review Service 2024-10-16 03:12:30 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8145571
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2306380-rust-delharc/fedora-rawhide-x86_64/08145571-rust-delharc/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 9 Fabio Valentini 2024-10-16 19:54:33 UTC
> Is there a standard way to include the rust2rpm.toml file in the spec/srpm?

No, just commit it into dist-git, but don't reference it in the .spec file.

Comment 10 Fabio Valentini 2024-10-16 20:03:29 UTC
Package was generated with rust2rpm, simplifying the review.

✅ package contains only permissible content
✅ package builds and installs without errors on rawhide
✅ test suite is run and all unit tests pass
✅ latest version of the crate is packaged
✅ license matches upstream specification and is acceptable for Fedora
✅ license files are included with %license in %files
✅ package complies with Rust Packaging Guidelines

Package APPROVED.

===

Recommended post-import rust-sig tasks:

- set up package on release-monitoring.org:
  project: $crate
  homepage: https://crates.io/crates/$crate
  backend: crates.io
  version scheme: semantic
  version (*NOT* pre-release) filter: alpha;beta;rc;pre
  distro: Fedora
  Package: rust-$crate

- add @rust-sig with "commit" access as package co-maintainer
  (should happen automatically)

- set bugzilla assignee overrides to @rust-sig (optional)

- track package in koschei for all built branches
  (should happen automatically once rust-sig is co-maintainer)

Comment 11 Fedora Admin user for bugzilla script actions 2024-10-17 01:48:58 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-delharc

Comment 12 Orion Poplawski 2024-10-17 02:02:34 UTC
Checked in and built.  Thanks for the review.