Go to file
Fabian Grünbichler 64959d9ae0 move common metadata to workspace
and switch all crates to 2021 edition as well as a unified "authors" value.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:25 +01:00
.cargo cargo: switch to use packaged crates by default 2020-01-03 09:39:52 +01:00
proxmox-api-macro move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-async move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-borrow move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-compression move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-http move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-io move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-lang move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-metrics move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-rest-server move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-router move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-schema move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-section-config move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-serde move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-shared-memory move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-sortable-macro move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-subscription move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-sys move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-tfa move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-time move common metadata to workspace 2022-12-07 09:48:25 +01:00
proxmox-uuid move common metadata to workspace 2022-12-07 09:48:25 +01:00
.gitignore git: ignore top level *-deb make target files 2022-08-26 12:18:44 +02:00
build.sh build: track d/control in git 2020-11-30 15:13:01 +01:00
Cargo.toml move common metadata to workspace 2022-12-07 09:48:25 +01:00
Makefile rest-server: add packaging and bump to 0.2.0 2022-10-11 15:09:50 +02:00
README.rst start checklist for adding crates in README.rst 2021-10-06 10:37:17 +02:00
rustfmt.toml bump edition in rustfmt.toml 2022-10-13 15:00:28 +02:00

Local cargo config
==================

This repository ships with a ``.cargo/config`` that replaces the crates.io
registry with packaged crates located in ``/usr/share/cargo/registry``.

A similar config is also applied building with dh_cargo. Cargo.lock needs to be
deleted when switching between packaged crates and crates.io, since the
checksums are not compatible.

To reference new dependencies (or updated versions) that are not yet packaged,
the dependency needs to point directly to a path or git source.

Steps for Releases
==================

- Cargo.toml updates:
  - Bump all modified crate versions.
  - Update all the other crates' Cargo.toml to depend on the new versions if
    required, then bump their version as well if not already done.
- Update debian/changelog files in all the crates updated above.
- Build packages with `make deb`.

Adding Crates
=============

1) At the top level:
  - Generate the crate: ``cargo new --lib the-name``
  - Sort the crate into ``Cargo.toml``'s ``workspace.members``
  - Sort the crate into the ``Makefile``'s ``CRATES`` list.

2) In the new crate's ``Cargo.toml``:
  - Replace the ``author`` line with
    ``authors = ["Proxmox Support Team <support@proxmox.com>"]``
  - Add ``license = "AGPL-3"``
  - Add ``exclude = [ "debian" ]``
  - Add a meaningful ``description``
  - Copy ``debian/copyright`` and ``debian/debcargo.toml`` from another subcrate.