]>
Commit | Line | Data |
---|---|---|
a6f21e76 FG |
1 | Local cargo config |
2 | ================== | |
8bd5e820 | 3 | |
a6f21e76 FG |
4 | This repository ships with a ``.cargo/config`` that replaces the crates.io |
5 | registry with packaged crates located in ``/usr/share/cargo/registry``. | |
8bd5e820 | 6 | |
a6f21e76 FG |
7 | A similar config is also applied building with dh_cargo. Cargo.lock needs to be |
8 | deleted when switching between packaged crates and crates.io, since the | |
8bd5e820 | 9 | checksums are not compatible. |
a6f21e76 FG |
10 | |
11 | To reference new dependencies (or updated versions) that are not yet packaged, | |
12 | the dependency needs to point directly to a path or git source. | |
b9e7824b WB |
13 | |
14 | Steps for Releases | |
15 | ================== | |
16 | ||
17 | - Cargo.toml updates: | |
18 | - Bump all modified crate versions. | |
19 | - Update all the other crates' Cargo.toml to depend on the new versions if | |
20 | required, then bump their version as well if not already done. | |
21 | - Update debian/changelog files in all the crates updated above. | |
22 | - Build packages with `make deb`. | |
b89c56b9 WB |
23 | |
24 | Adding Crates | |
25 | ============= | |
26 | ||
27 | 1) At the top level: | |
28 | - Generate the crate: ``cargo new --lib the-name`` | |
29 | - Sort the crate into ``Cargo.toml``'s ``workspace.members`` | |
30 | - Sort the crate into the ``Makefile``'s ``CRATES`` list. | |
31 | ||
32 | 2) In the new crate's ``Cargo.toml``: | |
33 | - Replace the ``author`` line with | |
34 | ``authors = ["Proxmox Support Team <support@proxmox.com>"]`` | |
35 | - Add ``license = "AGPL-3"`` | |
36 | - Add ``exclude = [ "debian" ]`` | |
37 | - Add a meaningful ``description`` | |
38 | - Copy ``debian/copyright`` and ``debian/debcargo.toml`` from another subcrate. |