https://bugzilla.redhat.com/show_bug.cgi?id=2266320
--- Comment #4 from Ben Beasley <code(a)musicinmybrain.net> ---
(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.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2266320
Report this comment as SPAM:
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=rep...