[opensuse-packaging] packaging a rust application
Hi all, I'm interested in packaging a couple of applications written in rust for openSUSE (e.g. SSH Permit A38 - https://github.com/ierror/ssh-permit-a38, fselect - https://github.com/jhspetersson/fselect, rargs - https://github.com/lotabout/rargs, etc.). I've had a look at rust2rpm (https://pagure.io/fedora-rust/rust2rpm) but it doesn't currently work for me as 1) resulting spec cannot be built as none of the dependencies are available (it generates deps of the form `crate(clap) >= 2.30.0`); and 2) not all packages are published to https://crates.io/ I also see all/most of the existing packages in Tumbleweed for rust-based apps (e.g. ripgrep, fd, bat, exa, etc.) use a `vendor.tar.xz` tarball containing dependencies as a second `Source` and then instruct cargo to use those instead of going to https://crates.io/, however I can't find any documentation on how to create such packages and tarballs. Can anyone share any knowledge or point me in the right direction to help me get started? Many thanks, Michael -- Sent from: http://opensuse.14.x6.nabble.com/opensuse-packaging-f3359936.html -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi, Le dimanche 04 novembre 2018 à 11:55:32, mig4 a écrit :
Hi all,
I'm interested in packaging a couple of applications written in rust for openSUSE (e.g. SSH Permit A38 - https://github.com/ierror/ssh-permit-a38, fselect - https://github.com/jhspetersson/fselect, rargs - https://github.com/lotabout/rargs, etc.).
I've had a look at rust2rpm (https://pagure.io/fedora-rust/rust2rpm) but it doesn't currently work for me as 1) resulting spec cannot be built as none of the dependencies are available (it generates deps of the form `crate(clap) >= 2.30.0`); and 2) not all packages are published to https://crates.io/
I also see all/most of the existing packages in Tumbleweed for rust-based apps (e.g. ripgrep, fd, bat, exa, etc.) use a `vendor.tar.xz` tarball containing dependencies as a second `Source` and then instruct cargo to use those instead of going to https://crates.io/, however I can't find any documentation on how to create such packages and tarballs.
Can anyone share any knowledge or point me in the right direction to help me get started?
I maintain svgcleaner which is, for its CLI part, written in rust and use a vendor.tar.xz archive. You can create this archive using 'cargo-vendor' ``` cargo install cargo-vendor ``` then, in the project home directory you just have to launch ``` cargo vendor ``` This will create a vendor directory that you can turn into a tar.xz archive and use as secondary source in your specfile. Hope that helps. Cheers, [0] https://build.opensuse.org/package/show/Publishing/svgcleaner -- 'When there is no more room at school, the dumb will walk the Earth.' Sébastien 'sogal' Poher
On Sun, Nov 11, 2018 at 1:10 PM Sébastien 'sogal' Poher
Hi,
Le dimanche 04 novembre 2018 à 11:55:32, mig4 a écrit :
Hi all,
I'm interested in packaging a couple of applications written in rust for openSUSE (e.g. SSH Permit A38 - https://github.com/ierror/ssh-permit-a38, fselect - https://github.com/jhspetersson/fselect, rargs - https://github.com/lotabout/rargs, etc.).
I've had a look at rust2rpm (https://pagure.io/fedora-rust/rust2rpm) but it doesn't currently work for me as 1) resulting spec cannot be built as none of the dependencies are available (it generates deps of the form `crate(clap) >= 2.30.0`); and 2) not all packages are published to https://crates.io/
I also see all/most of the existing packages in Tumbleweed for rust-based apps (e.g. ripgrep, fd, bat, exa, etc.) use a `vendor.tar.xz` tarball containing dependencies as a second `Source` and then instruct cargo to use those instead of going to https://crates.io/, however I can't find any documentation on how to create such packages and tarballs.
Can anyone share any knowledge or point me in the right direction to help me get started?
I maintain svgcleaner which is, for its CLI part, written in rust and use a vendor.tar.xz archive.
You can create this archive using 'cargo-vendor'
``` cargo install cargo-vendor ```
then, in the project home directory you just have to launch
``` cargo vendor ```
This will create a vendor directory that you can turn into a tar.xz archive and use as secondary source in your specfile.
Stasiek Michalski (hellcp) is helping with bootstrapping devel:languages:rust:crates so that vendoring crates will no longer be required for applications. At the moment, we don't yet have that done, but hopefully soon the rust2rpm method will enable painless packaging for rust applications. :) -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Stasiek Michalski (hellcp) is helping with bootstrapping devel:languages:rust:crates so that vendoring crates will no longer be required for applications. At the moment, we don't yet have that done, but hopefully soon the rust2rpm method will enable painless packaging for rust applications. :)
All of this just to have gnome-podcasts in repos :T LCP [Stasiek] https://lcp.world -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Le dimanche 11 novembre 2018 à 06:37:29, Neal Gompa a écrit :
On Sun, Nov 11, 2018 at 1:10 PM Sébastien 'sogal' Poher
wrote: Hi,
Le dimanche 04 novembre 2018 à 11:55:32, mig4 a écrit :
Hi all,
I'm interested in packaging a couple of applications written in rust for openSUSE (e.g. SSH Permit A38 - https://github.com/ierror/ssh-permit-a38, fselect - https://github.com/jhspetersson/fselect, rargs - https://github.com/lotabout/rargs, etc.).
I've had a look at rust2rpm (https://pagure.io/fedora-rust/rust2rpm) but it doesn't currently work for me as 1) resulting spec cannot be built as none of the dependencies are available (it generates deps of the form `crate(clap) >= 2.30.0`); and 2) not all packages are published to https://crates.io/
I also see all/most of the existing packages in Tumbleweed for rust-based apps (e.g. ripgrep, fd, bat, exa, etc.) use a `vendor.tar.xz` tarball containing dependencies as a second `Source` and then instruct cargo to use those instead of going to https://crates.io/, however I can't find any documentation on how to create such packages and tarballs.
Can anyone share any knowledge or point me in the right direction to help me get started?
I maintain svgcleaner which is, for its CLI part, written in rust and use a vendor.tar.xz archive.
You can create this archive using 'cargo-vendor'
``` cargo install cargo-vendor ```
then, in the project home directory you just have to launch
``` cargo vendor ```
This will create a vendor directory that you can turn into a tar.xz archive and use as secondary source in your specfile.
Stasiek Michalski (hellcp) is helping with bootstrapping devel:languages:rust:crates so that vendoring crates will no longer be required for applications. At the moment, we don't yet have that done, but hopefully soon the rust2rpm method will enable painless packaging for rust applications. :)
That is great news, thanks! -- Sébastien 'sogal' Poher -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
hellcp@opensuse.org
-
mig4
-
Neal Gompa
-
Sébastien 'sogal' Poher