# Packaging of hardware-api client

## Development code

The development branches of hardware-api client are hosted in GitHub,
at: https://github.com/canonical/hardware-api

New pull requests with contributions to the codebase should always be
opened in GitHub.

## Package source code

You can execute the following commands to download the upstream
tarball. These commands require the `devscripts` package version
`2.25` or higher.

```sh
uscan --download-current-version
gbp import-orig ../${PACKAGE}_*.orig.tar.gz
```

## Vendor Rust Dependencies

The `rust-vendor` directory and vendor tarball can be created by
running the following command:

```sh
cargo install cargo-vendor-filterer
debian/rules vendor-tarball
```

Then update the `XS-Vendored-Sources-Rust` header in
[`debian/control`](./debian/control). You can get the new header value
from the expected seciton of this command's output:

```
export CARGO_VENDOR_DIR=$(pwd)/rust-vendor/
/usr/share/cargo/bin/dh-cargo-vendored-sources
```

If the above command returns a non-zero exit code, you'll need to update the
`XS-Vendored-Sources-Rust` header with the value shown in the output.

