Bug 2279537 - Review Request: rust-sqlx-core - Core of SQLx, the rust SQL toolkit. Not intended to be used directly
Summary: Review Request: rust-sqlx-core - Core of SQLx, the rust SQL toolkit. Not inte...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Fabio Valentini
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/sqlx-core
Whiteboard:
Depends On: 2268045 2279513 2279515 2310831
Blocks: 2279539 2279540 2279542 2279544 2279546 2279547
TreeView+ depends on / blocked
 
Reported: 2024-05-07 12:11 UTC by Cristian Le
Modified: 2024-09-10 19:02 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-09-10 19:02:49 UTC
Type: ---
Embargoed:
decathorpe: fedora-review+


Attachments (Terms of Use)

Description Cristian Le 2024-05-07 12:11:41 UTC
Spec URL: https://github.com/LecrisUT/sqlx-rpmspec/raw/b8d1b82fdbcf7e5292f2c61076ac42c6f84cee7b/rust-sqlx-core/rust-sqlx-core.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/packit/LecrisUT-sqlx-rpmspec-main/fedora-rawhide-x86_64/07376143-rust-sqlx-core/rust-sqlx-core-0.7.4-1.fc41.src.rpm
Description: Part of `sqlx`
Fedora Account System Username: lecris

rust2rpm.toml:
```toml
[tests]
comments = [
    "resolve dependency loop with sqlx",
]
run = ["none"]
```

Comment 1 Fedora Review Service 2024-05-07 12:14:33 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7424562
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2279537-rust-sqlx-core/fedora-rawhide-x86_64/07424562-rust-sqlx-core/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 Robert-André Mauchin 🐧 2024-05-21 15:39:30 UTC
 - Grab license files from https://github.com/launchbadge/sqlx and reference this bug for resolution of the situation:

https://github.com/launchbadge/sqlx/issues/3237

- License ok
- Latest version packaged
- Builds in mock
- Checks pass
- No rpmlint errors
- Conforms to Go Packaging Guidelines

Package approved.

Comment 3 Cristian Le 2024-05-21 17:50:17 UTC
Thanks for the review, I guess you mean Rust Packaging Guidelines in these? And I guess you were checking the copr repo for the review?

Re: license files any suggestions on where to link the source in the spec file? Just get the whole repo as a git archive and extract from there?

Comment 4 Robert-André Mauchin 🐧 2024-05-21 18:11:19 UTC
(In reply to Cristian Le from comment #3)
> Thanks for the review, I guess you mean Rust Packaging Guidelines in these?
> And I guess you were checking the copr repo for the review?
> 
> Re: license files any suggestions on where to link the source in the spec
> file? Just get the whole repo as a git archive and extract from there?

Oh yeah sorry I copy pasted my template from an old review.

> Re: license files any suggestions on where to link the source in the spec file? Just get the whole repo as a git archive and extract from there?

Just link to the raw files on Github as a source, install the files, add them in the devel package where there is the FIX comment.

Comment 5 Fabio Valentini 2024-05-21 18:22:41 UTC
see also my comment here: https://bugzilla.redhat.com/show_bug.cgi?id=2279542#c3

Comment 6 Fabio Valentini 2024-05-21 18:24:11 UTC
You can use links like these:

Source1: https://github.com/launchbadge/sqlx/raw/v0.7.4/LICENSE-APACHE
Source2: https://github.com/launchbadge/sqlx/raw/v0.7.4/LICENSE-MIT

then copy them into the sources at the end of %prep with

cp -pav %{SOURCE1} %{SOURCE2} .

then reference them in the "devel" subpackage like this:

%license %{crate_instdir}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT

Comment 7 Cristian Le 2024-05-22 09:53:48 UTC
Spec URL: https://github.com/LecrisUT/sqlx-rpmspec/raw/bcb99b4c4cf9566d8da58eb5eb90b0f26257fd3f/rust-sqlx-core/rust-sqlx-core.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/packit/LecrisUT-sqlx-rpmspec-main/fedora-rawhide-x86_64/07475524-rust-sqlx-core/rust-sqlx-core-0.7.4-1.fc41.src.rpm

rust2rpm.toml: (Edited `%files devel` after running `rust2rpm -I`)
```toml
[[package.extra-sources]]
number = 10
file = "https://github.com/launchbadge/sqlx/raw/v%{version}/LICENSE-APACHE"
comments = [
    "Fix missing LICENSE-* files in released crates",
    "https://github.com/launchbadge/sqlx/issues/3237",
]
[[package.extra-sources]]
number = 11
file = "https://github.com/launchbadge/sqlx/raw/v%{version}/LICENSE-MIT"
comments = [
    "Fix missing LICENSE-* files in released crates",
    "https://github.com/launchbadge/sqlx/issues/3237",
]

[scripts.prep]
pre = ["cp -p '%{SOURCE10}' '%{SOURCE11}' ."]

[package]
extra-files = [
    "%license %{crate_instdir}/LICENSE-APACHE",
    "%license %{crate_instdir}/LICENSE-MIT",
]

[tests]
comments = [
    "resolve dependency loop with sqlx",
]
run = ["none"]
```

---

Referenced: https://src.fedoraproject.org/rpms/rust-reqwest-retry for this, but couldn't find more automation here. I guess it's similar to the patches that change the spec metadata.

Comment 8 Fabio Valentini 2024-05-24 13:28:55 UTC
> [package]
> extra-files = [
>     "%license %{crate_instdir}/LICENSE-APACHE",
>     "%license %{crate_instdir}/LICENSE-MIT",
> ]

Just for the record, this is not the intended use case for this setting.
It's meant to be used for including stuff like bash completions or man pages,
so it has no effect for packages that don't ship executables.
You will need to include the files in the "%files devel" section and remove the #FIXME manually.

Comment 10 Fabio Valentini 2024-09-10 16:36:32 UTC
Package looks good to me! Upstream has released 0.8.2 in the meantime.
Please update the package before (or after) importing it, if possible.

===

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 (disabled to avoid a circular dependency)
🫤 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 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-09-10 18:05:28 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-sqlx-core

Comment 12 Cristian Le 2024-09-10 18:10:26 UTC
Thank you for the review, Fabio. I will update it as part of the import and will update all the other reviews

Comment 13 Fedora Update System 2024-09-10 18:55:30 UTC
FEDORA-2024-08036bafef (rust-sqlx-core-0.8.2-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-08036bafef

Comment 14 Fedora Update System 2024-09-10 19:02:49 UTC
FEDORA-2024-08036bafef (rust-sqlx-core-0.8.2-1.fc42) has been pushed to the Fedora 42 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.