#11 Packaging binaries (and libraries together)
Closed: Fixed 7 years ago Opened 7 years ago by ignatenkobrain.

  • Is it enough to just do cargo install or we need something more?
  • How we determine from metadata when it's binary or when it's both?
  • What about naming?

Probably just cargo install. However, if you do this from a direct path, and there are any path dependencies, Cargo will look for those directly instead of from the local registry we want. In debcargo, they deal with this by forming a temporary local registry, then cargo install foo from that. That temporary registry would be something in the build root that has symlinks to the crate dirs in /usr/src/... or whatever, as well as a link to the unpacked foo.crate they're wanting to install.

For determining binary vs library, the metadata has a "targets" array, with kind = lib/bin/etc.

On naming, this is very subjective. I'd expect ripgrep to be named just like that, for instance, since the fact that it's written in Rust is incidental. Many cargo addons are named like cargo-graph, cargo-watch, which seem appropriately named for packages too. Sometimes there can be multiple binaries, like the rustfmt crate has rustfmt and cargo-fmt, but we can probably just ship that as one rustfmt.rpm.

AGREED: bin + lib naming scheme is Name: foo and subpackage rust-bar-devel (ignatenkobrain, 21:52:07)

Metadata Update from @ignatenkobrain:
- Issue assigned to ignatenkobrain

7 years ago

Metadata Update from @ignatenkobrain:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

7 years ago

Login to comment on this ticket.

Metadata