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%60
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
thanks, L.
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%60
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).
buildsys@lists.fedoraproject.org