Dne 12. 12. 25 v 8:10 dop. lejeczek via buildsys napsal(a):
Hi guys.

I'm trying to build pdns-recursor ver. 5.1.2 which uses *cargo* dependency.
With mock build fails with:
...
SYSCONFDIR=/etc/pdns-recursor NODCACHEDIRNOD=/var/nod NODCACHEDIRUDR=/var/udr cargo build --release --target-dir=./target --manifest-path ./Cargo.toml
    Updating crates.io index
warning: spurious network error (3 tries remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io) warning: spurious network error (2 tries remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io) warning: spurious network error (1 try remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io) error: failed to get `base64` as a dependency of package `settings v5.1.0 (/builddir/build/BUILD/pdns-recursor-5.1.2/settings/rust)`

Caused by:
  download of config.json failed

Caused by:
  failed to download from `https://index.crates.io/config.json`

Caused by:
  [6] Could not resolve hostname (Could not resolve host: index.crates.io)


but outside of mock, host system seems to have no issues getting there.
Reason I'm posting here - while not being cargo nor rust consumer - is that perhaps somebody who knows/uses /cargo, /would have some idea where to go troubleshooting this.
Is it mock or cargo or something completely different?
I'm on Centos9 with mock ver. 6.5

The network error is because Mock does the build in isolated environment. Isolated even from network. This is to because of reproducibility and security.

If you do not care (you should) you can waive this by passing ` 
--enable-network`.

The proper way is to run it with network-enabled once. Investigate the logs and find out what crate are installed by cargo. And put the result in spec file as BuildRequires (it often require to package the dependency first).

--
Miroslav Suchy, RHCA
Red Hat, Manager, Packit and CPT, #brno, #fedora-buildsys
-- 
_______________________________________________
buildsys mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to