Commit Graph

3081 Commits

Author SHA1 Message Date
Thomas Lamprecht
daff73bdd6 sys: use correct pointer type for mkdtemp return value
The libc function mkdtemp takes a C char pointer while we previously
cast our OSString buffer as i8 pointer, but that's not valid on
platforms like AArch64 (ARM), where char is equivalent with a u8.

Fix that by using the c_char type that was explicitly made to always
get the correct, platform-independent type for C chars when doing FFI.

This was reported by OJaksch on our Arch Linux User Repo (AUR) package
[0].

https://aur.archlinux.org/packages/proxmox-backup-client#comment-1006851

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-01-21 09:14:43 +01:00
Wolfgang Bumiller
4be2392d59 time-api: bump to 0.1.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:54:28 +01:00
Wolfgang Bumiller
e0bdcda6e6 syslog-api: bump to 0.1.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:53:28 +01:00
Wolfgang Bumiller
27c50bd037 rrd-api-types: bump to 1.0.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:52:15 +01:00
Wolfgang Bumiller
975f29bd7f network-api: bump to 0.1.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:51:19 +01:00
Wolfgang Bumiller
ce206f0a96 dns-api: bump to 0.1.5-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:50:26 +01:00
Wolfgang Bumiller
891413ffb7 access-control: bump to 0.2.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:49:23 +01:00
Wolfgang Bumiller
f01f934963 auth-api: bump to 0.4.7-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:47:08 +01:00
Wolfgang Bumiller
0807248c15 acme-api: bump to 0.1.7-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:46:13 +01:00
Wolfgang Bumiller
7e25958623 tfa: bump to 5.0.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:43:41 +01:00
Wolfgang Bumiller
40f0a0bdd3 subscription: bump to 0.5.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:42:10 +01:00
Wolfgang Bumiller
c84376e2c8 apt: bump to 0.11.7-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:40:14 +01:00
Wolfgang Bumiller
5382b8ce13 apt-api-types: bump to 1.0.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:38:33 +01:00
Wolfgang Bumiller
ca92328569 api-macro: bump to 1.3.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:36:57 +01:00
Wolfgang Bumiller
59d1ca87e5 rrd: bump to 0.4.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:36:56 +01:00
Wolfgang Bumiller
106aa95ced rest-server: bump to 0.8.6-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:35:43 +01:00
Wolfgang Bumiller
698b6782cd router: bump to 3.0.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:35:43 +01:00
Wolfgang Bumiller
69298c8d20 acme: bump to 0.5.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:28:06 +01:00
Wolfgang Bumiller
ed74a6a8a2 simple-config: bump to 0.1.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:26:42 +01:00
Wolfgang Bumiller
2782c72747 config-digest: bump to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:25:33 +01:00
Wolfgang Bumiller
94b9f8db60 notify: bump to 0.5.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:25:31 +01:00
Wolfgang Bumiller
f2fefb7ffd section-config: bump to 2.1.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:20:00 +01:00
Wolfgang Bumiller
c7f4afb3fc human-byte: bump to 0.1.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:20:00 +01:00
Wolfgang Bumiller
e4f5179ae6 schema: bump to 4.0.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:07:49 +01:00
Wolfgang Bumiller
2e2edcf833 schema: add Schema::unwrap_*_schema_cloned
This way we can copy and modify a schema.

Eg. via the following ways:

    const FOO_SCHEMA: Schema = SOME_SCHEMA
        .unwrap_integer_schema_cloned()
        .description("Foo")
        .schema();

Note that for example there is currently no builder to set a
`default_key` for an `ObjectSchema` back to None, so one could do:

    const FOO_SCHEMA: Schema = const {
        let mut schema = SOME_SCHEMA.unwrap_object_schema_cloned();
        schema.default_key = None;
        schema.schema()
    };

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 11:56:57 +01:00
Wolfgang Bumiller
c040054827 schema: add 'description' builder methods to schema types
To cover the use case where we want to change only the description of
an existing type.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 11:07:08 +01:00
Wolfgang Bumiller
72c95c35bb schema: make schema types #[non_exhaustive]
This way extending them is not a breaking change anymore.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 10:56:58 +01:00
Wolfgang Bumiller
c794c42919 schema: drop deprecated code
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 10:56:58 +01:00
Wolfgang Bumiller
8d9cf97611 schema: doc: replace use of deprecated methods
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 10:56:58 +01:00
Wolfgang Bumiller
dc232f8bd4 schema: support PVE's "keyAlias" legacy property strings
Because the UI kept producing them...
And still does...

This is NOT meant to be used by anything other than generated legacy
code for PDM (pve-api-types) and only affects the serde based
deserializer. The "old" `schema.parse_property_string() -> Value`
method does not utilize this for now.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 10:56:58 +01:00
Wolfgang Bumiller
4378d44bcb notify: use builder for ObjectSchema
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 10:56:58 +01:00
Wolfgang Bumiller
3c34ef5573 section-config: use builder pattern for ObjectSchema
To prepare for a breaking change in proxmox-schema.
Since new fields in the schema constitute a breaking change, using the
builder methods will let this compile later as well.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-14 11:48:52 +01:00
Wolfgang Bumiller
c99a31c66f router: test: sort object schema properties
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-14 10:34:29 +01:00
Dominik Csapak
be57fb0122 schema: updater: add blanked implementation for PropertyString
so that we can have a property:

```
foo: Option<PropertyString<Bar>>,
```

within a struct that derives `Updater`

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-01-14 10:19:54 +01:00
Wolfgang Bumiller
8c5fa1c562 schema: fix pointer/length confusion in str_slice_to_range
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-13 15:22:40 +01:00
Wolfgang Bumiller
62e105a34e api-macro: bump to 1.3.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-09 14:21:53 +01:00
Wolfgang Bumiller
dce9102163 api-macro: add json_schema!() macro
This allows using the json schema notation to generate `Schema`
expressions.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-09 14:19:42 +01:00
Wolfgang Bumiller
619c290cf8 client: bump to 0.5.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-09 14:16:03 +01:00
Dietmar Maurer
b31ab119bb client: improve api error message (avoid duplicate status code)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2025-01-09 12:02:28 +01:00
Wolfgang Bumiller
ddc154e5cd notify: add missing tracing::error macro import
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-07 10:20:37 +01:00
Thomas Lamprecht
b74391cada daemon: bump version to 0.1.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-12-30 15:34:16 +01:00
Thomas Lamprecht
1db49cb269 daemon: try to remove existing unix socket in bind directly
We tried this unconditionally on start-up in the PDM for the priv. API
daemon, but we actually only want to clean-up on fresh bind, not on
restoring the FD on daemon reload. Otherwise the unprivileged daemon
cannot connect to the privileged one anymore after the latter got
reloaded.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-12-30 15:30:10 +01:00
Thomas Lamprecht
7648aabf42 daemon: output debug log when restoring FD passed through env
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-12-30 15:29:34 +01:00
Thomas Lamprecht
cc4ee60452 apt: bump version to 0.11.6-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-12-19 12:46:05 +01:00
Thomas Lamprecht
aba50ebc38 apt: bump version to 0.11.6-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-12-19 12:42:45 +01:00
Thomas Lamprecht
942186e2b7 apt: pdm uses separator for test repo
For consistency with it's other repositories, we might migrate other
products also to this schema with a future major release (and nginx
rewrite config for backward compatibility)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-12-19 12:40:26 +01:00
Gabriel Goller
df6b705f56 notify: migrate from log to tracing
Migrated from `log` to `tracing`. Imported `tracing` only as it has a
smaller footprint (and less dependencies) than `proxmox_log`.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-12-05 13:22:24 +01:00
Thomas Lamprecht
212249e009 sys: bump version to 0.6.5-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-12-05 08:32:47 +01:00
Thomas Lamprecht
87dd908530 client: run cargo fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-12-05 08:32:47 +01:00
Shannon Sterz
8eae5a8330 product-config: use inner mutability for PRODUCT_CONFIG
with edition 2024 `static mut` references will be disallowed [1]. the
recommended way to work around this is to use inner mutability, so use a
`OnceLock` for the `PRODUCT_CONFIG` as that should not change throughout
the run time of an application.

[1]:
https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-12-04 09:54:12 +01:00