Bug 2266320 - Review Request: rust-k8s-openapi - Bindings for the Kubernetes client API
Summary: Review Request: rust-k8s-openapi - Bindings for the Kubernetes client API
Keywords:
Status: CLOSED NOTABUG
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/k8s-openapi
Whiteboard:
Depends On:
Blocks: 2266336
TreeView+ depends on / blocked
 
Reported: 2024-02-27 15:23 UTC by Alberto Faria
Modified: 2024-07-11 14:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-07-11 14:14:53 UTC
Type: ---
Embargoed:
decathorpe: fedora-review?


Attachments (Terms of Use)

Comment 1 Fedora Review Service 2024-02-27 15:27:15 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7065195
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2266320-rust-k8s-openapi/fedora-rawhide-x86_64/07065195-rust-k8s-openapi/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 2024-02-29 15:34:22 UTC
Oof, this package contains so much duplicated identical files ... it's 35 MB of source code, of which ~23 MB are duplicate files. 😧

It looks like most of these are generated. Do you think it would be possible to de-duplicate at least some of these files? Otherwise the package is going to be gigantic compared to "regular" Rust packages.

Comment 3 Ben Beasley 2024-05-11 13:14:23 UTC
The COPR URLs are now expired and give a 404 error.

Comment 4 Ben Beasley 2024-05-11 13:31:57 UTC
(In reply to Fabio Valentini from comment #2)
> Oof, this package contains so much duplicated identical files ... it's 35 MB
> of source code, of which ~23 MB are duplicate files. 😧
> 
> It looks like most of these are generated. Do you think it would be possible
> to de-duplicate at least some of these files? Otherwise the package is going
> to be gigantic compared to "regular" Rust packages.

May I recommend something like the following rust2rpm.toml snippet?

[requires]
build = [
    "hardlink",
]

[scripts.install]
post = [
    "# Hardlink duplicate files to greatly reduce the size of the -devel RPM",
    "hardlink -t %{buildroot}%{crate_instdir}",
]


Note that I didn’t review the result, only verified that it built and the hardlinking had the intended effect. The rust-k8s-openapi-devel-0.22.0-1.fc41.noarch.rpm is around 1 MiB compressed in both cases because the compression algorithm is able to exploit the redundancy in the duplicate files quite effectively, but with hardlinking the extracted size goes from about 50 MB to about 4 MB, which seems worthwhile.

Comment 5 Fabio Valentini 2024-05-13 14:56:08 UTC
Alternatively, you could use the "%fdupes" macro from the fdupes package:
https://src.fedoraproject.org/rpms/fdupes/blob/rawhide/f/macros.fdupes

IIUC by default, it creates hardlinks for duplicate files.

Comment 6 Fabio Valentini 2024-07-05 17:15:32 UTC
Are you still interested in packaging this crate?

I have looked into packaging "podlet" for Fedora, and it would depend on this crate too. So if you're no longer going to move forward with this package, I will likely eventually submit a new review request for it.


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