RE: Help packaging a "C" library written in Rust

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Richard W.M. Jones" <rjones@xxxxxxxxxx> writes:
> On Wed, Sep 07, 2022 at 10:05:55AM +0100, Richard W.M. Jones wrote:
>>
>> https://gitlab.com/libblkio/libblkio
>>
>> This is a library that offers a C API.  It happens to be implemented
>> in Rust, but it's not a "Crate" or anything like that.
>>
>> I wrote a spec file for it assuming it's a C library and it works fine
>> when building locally:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=2124697
>>
>> However it turns out that it downloads stuff during the build and
>> therefore won't build in Koji.  Apart from reading the Rust packaging
>> guidelines which don't seem applicable here (as this is not a Rust
>> Crate), that's as far as I've got on this one.
>>
>> Has anyone packaged anything like this for Fedora?
>
> It was pointed out on the bug that librsvg2 is in a similar situation.
> The answer there was to bundle ("vendor") all the Rust dependencies
> into the tarball.  The command "cargo vendor" does this.
>
> For librsvg2 that's 278MB of dependencies (10 times larger than the
> sources of librsvg2 itself) in 265 separate Rust libraries.  For
> libblkio it's 123MB of dependencies in a mere 21 libraries.
>
> Also there's no Provides: bundled(...) in the librsvg2 package.

For Amazon Linux, we take a different approach to Fedora (but similar to
RHEL) for software written in Rust and Go, and instead bundle
dependencies rather than have each module/crate in its own RPM. We do it
so we don't have to synchronize moving dependencies, or making these
libraries/packages part of what customers could take a dependency on.

Somewhere on my TODO list (or a TODO to delegate to someone) is to do
that automatically from some packaging helper macros, but currently
it's just way too manual and annoying.

It'd be interesting to know what the general Fedora feeling is about
having a distro/package level choice on this and a bunch of
macros/scripts that help with that for packagers.
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-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/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux