Need help porting with CARGO_FEATURES
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 Mar 2024 15:48:35 UTC
Hello.
I'm using net-im/signal-cli (and of course it's dependency
net-im/libsignal-client).
These port tend to get outdated (as in "not working anymore") pretty
fast, as the protocol changes upstream.
What we have in port tree was dead long ago; I provided a bug report
with an updated version (#276037), but that's not working anymore either.
So I'm trying to port a newer version of libsignal-client (0.39.2).
I've got it compiling via standard "make", but failing in Poudriere.
I think I've pinpointed the cause, but I don't know how to solve.
Starting from the beginning...
Libsignal-client is written in Rust and so uses Cargo to build.
It has a gob of dependencies and cargo handles well all but one: their
own version of "Boring".
Boring has a subproject "boring-sys", which depends on "boringssl" from
Google. Some previous work on the port solved this by downloading both
of them and copying files from the latter to the former.
Fine. It works with "make".
However, when switching to Poudriere, comes another trouble: boring-sys
tries to update itself via git and this cannot obviously work in a
confied jail.
The fragment of build.rs code is:
> if cfg!(feature = "no-patches") {
> println!(
> "cargo:warning=skipping git patches application, provided\
> native BoringSSL is expected to have the patches included"
> );
> } else {
> ensure_patches_applied().unwrap();
> }
So I guess I need to tell him not to update.
I tried "CARGO_FEATURES=--no-patches" and "CARGO_FEATURES=no-patches" in
the makefile, but I end up with:
> error: none of the selected packages contains these features: --no-patches
I'm very ignorant on this...
Maybe no project accepts "no-patches", but only a *sub*project?
Is there a way to specify such an option within the current port framework?
Or should I just use post-patch target to manually hack that file?
bye & Thanks
av.