<div dir="ltr"><div>That's great to hear, and I would like to volunteer on dh-cargo. Can I get</div><div>started on an /bin/sh -eu based dh-cargo, and is it OK to use that language?</div><div><br></div><div>If you want a rough idea of what my scripting currently looks like, this</div><div>would be most representative:</div><div><br></div><div><a href="https://gitlab.com/willemmali/chegit/">https://gitlab.com/willemmali/chegit/</a></div><div><br></div><div>- Willem Mali</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-14 19:48 GMT+01:00 Josh Triplett <span dir="ltr"><<a href="mailto:josh@joshtriplett.org" target="_blank">josh@joshtriplett.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I just pushed a preliminary version of debcargo to the debcargo.git<br>
repository under pkg-rust on alioth.<br>
<br>
After building debcargo with "cargo build" and putting it in your $PATH,<br>
run "debcargo package cratename" to create a source package for that<br>
crate.  That will download the crate if Cargo hasn't already downloaded<br>
and cached it.<br>
<br>
The resulting packaging currently invokes the not-yet-written dh-cargo,<br>
via "--buildsystem cargo".  That debhelper build system needs to do a<br>
few things:<br>
<br>
- Depend on an appropriate version of cargo.<br>
- Write a temporary .cargo/config file pointing to the directory<br>
  registry in /usr/share/rust/cargo, and clean it up in the clean<br>
  target.<br>
- Run "cargo test" as part of the test target (unless DEB_BUILD_OPTIONS<br>
  includes nocheck).<br>
- For lib crates, run "cargo package" in the build target, and extract<br>
  the resulting .crate file into the package's<br>
  /usr/share/rust/cargo/$crate-$<wbr>version in the binary target, to add it<br>
  to the cargo directory registry.  In that same directory, write a<br>
  .cargo-checksum.json file containing<br>
  `{"package":"$checksum","files<wbr>":{}}` , where $checksum is the<br>
  sha256sum of the .crate file.<br>
- For bin crates, run "cargo install --path . --root $tmpdir" in the<br>
  binary target, where $tmpdir refers to the directory you package the<br>
  .deb from.<br>
<br>
The .cargo/config file should contain the following:<br>
<br>
[source.crates-io]<br>
replace-with = 'debian-registry'<br>
local-registry = "/nonexistent"<br>
<br>
[source.debian-registry]<br>
directory = '/usr/share/rust/cargo'<br>
<br>
I plan to write dh-cargo at some point, but if someone else wants to<br>
start on it, feel free. :)  Happy to help adapt debcargo to make<br>
dh-cargo's job easier (such as by pre-determining the list of binary and<br>
library crates and providing that to dh-cargo somehow so it doesn't need<br>
to parse debian/control).<br>
<br>
Also, for some reason, debcargo.git doesn't show up on <a href="http://git.debian.org" rel="noreferrer" target="_blank">git.debian.org</a><br>
yet.  Do I need to do something to get it to show up there?<br>
<br>
- Josh Triplett<br>
<br>
______________________________<wbr>_________________<br>
Pkg-rust-maintainers mailing list<br>
<a href="mailto:Pkg-rust-maintainers@lists.alioth.debian.org" target="_blank">Pkg-rust-maintainers@lists.ali<wbr>oth.debian.org</a><br>
<a href="https://lists.alioth.debian.org/mailman/listinfo/pkg-rust-maintainers" rel="noreferrer" target="_blank">https://lists.alioth.debian.or<wbr>g/mailman/listinfo/pkg-rust-ma<wbr>intainers</a><br>
</blockquote></div><br></div></div>