Hello, is it possible to build binaries on OBS which depend on packages installed by rust cargo? cargo wants to download from github.com with curl library.
I've got:
[ 13s] + cargo install -f --version 0.6.10 cargo-web [ 14s] Updating registry `https://github.com/rust-lang/crates.io-index%60 [ 14s] warning: spurious network error (2 tries remaining): curl error: Could not resolve host: github.com [ 14s] ; class=Net (12) [ 14s] warning: spurious network error (1 tries remaining): curl error: Could not resolve host: github.com [ 14s] ; class=Net (12) [ 14s] error: failed to fetch `https://github.com/rust-lang/crates.io-index%60 [ 14s] [ 14s] Caused by: [ 14s] curl error: Could not resolve host: github.com [ 14s] ; class=Net (12) [ 14s] error: Bad exit status from /var/tmp/rpm-tmp.rf2FSs (%prep)
How can this be done?
Thanks.
On Okt 14 2018, Markus Kolb suse+ml-opensuse-buildservice@tower-net.de wrote:
is it possible to build binaries on OBS which depend on packages installed by rust cargo? cargo wants to download from github.com with curl library.
Build workers have no network connectivity at all. You need to make sure all build dependencies are present in the build root.
Andreas.
Am 14.10.2018 18:01, schrieb Andreas Schwab:
On Okt 14 2018, Markus Kolb suse+ml-opensuse-buildservice@tower-net.de wrote:
is it possible to build binaries on OBS which depend on packages installed by rust cargo? cargo wants to download from github.com with curl library.
Build workers have no network connectivity at all. You need to make sure all build dependencies are present in the build root.
Andreas.
Yes. That is the cause of the error. The question is what is the official way to build these rpms?
I'm using now the cargo-vendor package. I've downloaded the cargo-package-source, called cargo-vendor over it, tar(ed) the package-source with vendor directory and use this as a spec-source. Modify ~/.cargo/config in the build worker chroot with the prep-step in spec-file for using the vendor directory.
But I've thought of a build service which would handle this?!
Another way would be to use rust2rpm command, I guess. But I've no idea how to find the 1st crate, which has no build dependency on another crate.
And I think, that the versioned dependencies of cargo packages might be a problem for rpm. cargo packages can/must be installed in different versions next to each other. rust2rpm makes the cargo package version to rpm package version. So a newer one will replace/update other versions. This breaks the dependency tree of cargo packages.
On Okt 14 2018, Markus Kolb suse+ml-opensuse-buildservice@tower-net.de wrote:
The question is what is the official way to build these rpms?
You should ask that on the opensuse-packaging mailing list.
Andreas.
On Sun, Oct 14, 2018 at 1:43 PM Markus Kolb suse+ml-opensuse-buildservice@tower-net.de wrote:
Am 14.10.2018 18:01, schrieb Andreas Schwab:
On Okt 14 2018, Markus Kolb suse+ml-opensuse-buildservice@tower-net.de wrote:
is it possible to build binaries on OBS which depend on packages installed by rust cargo? cargo wants to download from github.com with curl library.
Build workers have no network connectivity at all. You need to make sure all build dependencies are present in the build root.
Andreas.
Yes. That is the cause of the error. The question is what is the official way to build these rpms?
I'm using now the cargo-vendor package. I've downloaded the cargo-package-source, called cargo-vendor over it, tar(ed) the package-source with vendor directory and use this as a spec-source. Modify ~/.cargo/config in the build worker chroot with the prep-step in spec-file for using the vendor directory.
But I've thought of a build service which would handle this?!
Another way would be to use rust2rpm command, I guess. But I've no idea how to find the 1st crate, which has no build dependency on another crate.
And I think, that the versioned dependencies of cargo packages might be a problem for rpm. cargo packages can/must be installed in different versions next to each other. rust2rpm makes the cargo package version to rpm package version. So a newer one will replace/update other versions. This breaks the dependency tree of cargo packages.
The preferred way is to package the crates independently and use them as dependencies. It's possible to support multiple versions in the dependency tree (this is already done in Fedora). However, the initial work of unbundling the crates has not been done yet for openSUSE Rust software, so devel:languages:rust:crates[1] is quite empty compared to the collection of crates Fedora has packaged[2].
That said, this is the wrong mailing list for this. For openSUSE, the opensuse-packaging mailing list is the correct place for these questions.
[1]: https://build.opensuse.org/project/show/devel:languages:rust:crates [2]: https://koji.fedoraproject.org/koji/search?match=glob&type=package&t...
Am 14.10.2018 20:31, schrieb Neal Gompa:
The preferred way is to package the crates independently and use them as dependencies. It's possible to support multiple versions in the dependency tree (this is already done in Fedora). However, the initial work of unbundling the crates has not been done yet for openSUSE Rust software, so devel:languages:rust:crates[1] is quite empty compared to the collection of crates Fedora has packaged[2].
That said, this is the wrong mailing list for this. For openSUSE, the opensuse-packaging mailing list is the correct place for these questions.
Ok thanks Neal and Andreas, first thought I've to setup something for build.
buildservice@lists.opensuse.org