IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
To avoid openssl's unhelpful error messages when the proxy.key or
proxy.pem files have the wrong permissions, we open the files. To load
the private key, we can simply read from the file and pass it to the
`set_private_key` openssl function. Sadly such a function does not exist
for loading certificate chains, so we have to open and close the file
before calling the `set_certificate_chain_file` fn.
Motivation: https://forum.proxmox.com/threads/proxmox-backup-tailscale-proxmox-backup-proxy-service-wont-boot.153204
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
In the reference Bugzilla entry, a certificate with an IP address as a
SAN was used. rustls seems to have problems with that [1].
Also, pretty much all of our code uses native-tls at the moment, so
it makes sense to not pull in a second TLS implementation.
Tested by rebuilding libpve-rs-perl and testing a Gotify notification
target with a self-signed TLS certificate (one that is accepted by
OpenSSL but not by rusttls).
[1] https://github.com/rustls/rustls/issues/184
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
A description is required for the API schema types and we fallback to
the rust doc-comment when no explicit one is set.
But a empty string was returned if no doc-comment existed, so check
for the comment to be non-empty and throw a compile-time error
otherwise.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The wrap_text helper accepts and initial indentation, so use that as
central point to add the indentation that glues the list entry
together with its description.
Mostly a small optimization, should not matter in practice, i.e. where
all properties should have a description.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
There was basically no documentation at all, so try to document the
basic format syntax and where it comes from. The text is partially
adapted from the systemd docs.
Could be still expanded with some example code and the methods might
do good with getting some docs too, but those parts can be relatively
easily be figured out from the code itself, the basic underlying
design and format background is much harder to guess..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Previously we displayed, e.g., "4m 1h 1min", i.e. using "m" for months
and "min" for minutes but "m" was not accepted as month when parsing
a timespan string, so a 4 month timespan would be printed "4m" but if
parsed again it would result in a timespan of 4 minutes.
So switch month to an uppercase "M" and minute to the lower case "m",
which makes renderings of common timespans nicer, as in most of our
use cases they are in the range of minutes to hours, sometimes days
but seldom longer than weeks. So using single letters for all but
"min" stuck out quite a bit, e.g.: "1h 5min 2s" looks odd compared to
"1h 5m 1s"
While the duplicate letter is not 100% ideal it's still better than
the status quo, where rendering and parsing would interpret things
differently.
Also, the order still makes it quite clear, e.g.:
"7m 2w 3d 1h 5min 44s" now becomes "7M 2w 3d 1h 5m 44s"
As a side effect this also brings the display format closer to what is
used inside PVE backup job taks logs.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Seconds are not displayed when the value is smaller than 0.1s and
they are not at the start of the display output, e.g. `1h 2m`.
Drop the additional whitespace currently appended for this edge case.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
(conveted with pandoc and some minor manual fixups)
Mention that the crates should activate `doc_cfg, doc_auto_cfg` and
ideally `#[deny(unsafe_op_in_unsafe_fn)]` and `#[deny(missing_docs)]`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Object schemas can now declare a field which causes
'additional_properties' to be set to true and the field being ignored
in the schema.
This allows adding a flattened HashMap<String, Value> to gather the
additional unspecified properties.
#[api(additional_properties: "rest")]
struct Something {
#[serde(flatten)]
rest: HashMap<String, Value>,
}
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
So we can get going on the wasm side where we don't yet have access to
the webauthn-rs crate.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
To ease development on new machines, this provides an easy way to just
do
# apt install $(make list-packages)
to get started.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>