On 2019-04-28 21:23, Michael Aquilina wrote:
Hi there,
I'm looking into adding several rust packages to OBS including xidlehook (https://github.com/jD91mZM2/xidlehook) and vivid (https://github.com/sharkdp/vivid).
From what I recall, network connections cannot be made from within the build service and this is an important part of how the "cargo build" process in rust works. Is there any documentation for how to build rust packages in OBS that I can reference?
Looking at the ripgrep package for inspiration (https://build.opensuse.org/package/view_file/openSUSE:Factory/ripgrep/ripgre...) it seems like you take a copy of the dependencies locally? Is this a purely manual process or are there some tools to help?
Mike
I recently packaged pijul [1] and also mostly copied the ripgrep spec [2]. Getting the dependencies is indeed a pain right now. As Stasiek Michalski wrote, you need the cargo-vendor package. Either get it from the official repositories or crates.io. Here is how I do it currently: curl -L https://crates.io/api/v1/crates/pijul/0.12.0/download -o pijul-0.12.0.tar.gz gunzip pijul-0.12.0.tar.gz cd pijul-0.12.0 cargo vendor --relative-path tar cfJ vendor.tar.xz vendor cp vendor.tar.xz .. You could build a script around this. Cheers [1] https://pijul.org/ [2] https://build.opensuse.org/package/view_file/home:cney/pijul/pijul.spec -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org