Re: Set RUSTFLAGS and CARGO_NET_OFFLINE in %set_build_flags?

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

 



On Tue, Nov 22, 2022 at 9:37 PM Richard W.M. Jones <rjones@xxxxxxxxxx> wrote:
>
> On Tue, Nov 22, 2022 at 02:53:14PM -0500, Stefan Hajnoczi wrote:
> > On a similar note, should the CARGO_NET_OFFLINE=true environment
> > variable also be set in %set_build_flags?

I don't think so. I already think it's weird that %set_build_flags
sets compiler flags for some arbitrary set of programming languages
(C, C++, Fortran?) ...

> FYI setting this environment variable didn't make cargo work offline
> for me.  It still failed with the error:
>
> error: the lock file /home/rjones/rpmbuild/BUILD/libblkio-v1.1.1/Cargo.lock needs to be updated but --locked was passed to prevent this
>
> This error is why the libblkio spec file normally edits
> src/cargo-build.sh to replace --locked with --offline.

cargo is a bit peculiar here, which is why the %cargo_prep,
%cargo_build, etc. macros exist, and override some key cargo
behaviours.

In particular, running %cargo_prep will inject a .cargo/config file
with settings that will make it load dependencies from the registry on
disk instead of loading things from the internet, and which also sets
rustflags to Fedora defaults.

I suspect that it's not run in the correct directory for this to
affect "cargo" invocations by meson.

Fabio
_______________________________________________
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