Go to file
Fiona Ebner 3b2b1214b3 section config: parse additional properties when schema allows it
Additional properties will be parsed according to the default string
schema.

This is relevant for use cases when the full schema is not known for
some reason or another. In particular this allows support for parsing
older/newer versions of configuration files. One example of this is
the proposed proxmox-mail-forward helper binary, which currently
doesn't have access to the PBS API types for dependency reasons and
is only interested in the email field for the root user. If it can
only use a minimal schema with additional_properties set to true, it
will be robust against changes.

Writing already works, because the ObjectSchema's verify_json()
already handles additional_properties correctly and
format_section_content() handles them like all other properties
(method doesn't depend on the schema).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-10-24 13:35:50 +02:00
.cargo cargo: switch to use packaged crates by default 2020-01-03 09:39:52 +01:00
proxmox-api-macro api-macro: track d/control 2022-08-26 12:57:57 +02:00
proxmox-async bump proxmox-async to 0.4.1 2022-04-12 14:22:59 +02:00
proxmox-borrow tree wide update of genereated control 2022-05-05 10:22:50 +02:00
proxmox-compression bump proxmox-compression to 0.1.2-1 2022-07-05 13:46:38 +02:00
proxmox-http proxmox-http: fix last changelog entry 2022-10-19 14:17:42 +02:00
proxmox-io clippy fixes 2022-10-11 09:48:04 +02:00
proxmox-lang lang: update c_str 2022-07-26 12:27:44 +02:00
proxmox-metrics metrics: bump to 0.2.1 2022-09-07 14:49:35 +02:00
proxmox-rest-server rest-server: update to OwnedFd 2022-10-19 13:25:40 +02:00
proxmox-router router: bump to 1.3.0 2022-09-07 09:17:45 +02:00
proxmox-schema clippy fixes 2022-10-11 09:48:04 +02:00
proxmox-section-config section config: parse additional properties when schema allows it 2022-10-24 13:35:50 +02:00
proxmox-serde bump proxmox-serde to 0.1.1 2022-06-29 10:32:44 +02:00
proxmox-shared-memory bump d/control files 2022-07-28 13:39:21 +02:00
proxmox-sortable-macro tree wide update of genereated control 2022-05-05 10:22:50 +02:00
proxmox-subscription subscription: bump to 0.3.0 2022-09-07 14:49:35 +02:00
proxmox-sys sys: impl AsFd for PTY 2022-10-19 14:36:45 +02:00
proxmox-tfa d/control: tree wide update after switch to weak/namespaced dependencies 2022-08-26 12:07:36 +02:00
proxmox-time clippy fixes 2022-10-11 09:48:04 +02:00
proxmox-uuid uuid: clippy fixes 2022-07-27 10:51:22 +02: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 rest-server: add packaging and bump to 0.2.0 2022-10-11 15:09:50 +02: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.