Commit Graph

30 Commits

Author SHA1 Message Date
Fabian Grünbichler
1f50e31f3e bump proxmox-time to 2
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-07-25 13:02:25 +02:00
Fabian Grünbichler
29a60a33a8 bump pico-args to 0.5
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-07-25 13:02:17 +02:00
Thomas Lamprecht
7c49ea9088 bump version to 2.5.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-26 20:23:15 +01:00
Dominik Csapak
e34f84b91f use pico-args instead of clap
Instead of upgrading from clap3 to clap4 (which seems to change their
interface every year or so), switch to the much smaller pico-args. (Same
as we did for termproxy recently, see [0])

It has almost all features we need (except producing help output) and
supports OsString, but wihout any dependencies. This decreases compile
time and reduces the size of the resulting binary. It also reduces the
lines of code.

The only difference is now the different output for errors, e.g. for
missing values of options.

Help output is copied from the old clap output.

0: https://git.proxmox.com/?p=pve-xtermjs.git;a=commitdiff;h=24d707d0506b120a085b06b5f2b6000696879a1e

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
Reviewed-by: Mira Limbeck <m.limbeck@proxmox.com>
2024-02-13 15:54:42 +01:00
Thomas Lamprecht
a1ebc0c6fe bump version to 2.4.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-28 13:07:30 +02:00
Thomas Lamprecht
cdcc762692 bump version to 2.4.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 18:04:53 +02:00
Mira Limbeck
34c921addd add support for bookworm syslog time format
Adds `proxmox-time` as dependency to parse the timestamp

Since parse_rfc3339 can't handle microseconds, we try to remove the dot
followed by 6 digits of microseconds before passing it to parse_rfc3339.

A fallback to the previous format is used when when it fails to parse
the new format.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 18:04:53 +02:00
Thomas Lamprecht
41d4b6dd8e bump version to 2.3.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-25 11:38:14 +01:00
Thomas Lamprecht
0809816451 update clap to 0.3.23
to get some convenience things like the get_count helper

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-25 11:35:25 +01:00
Thomas Lamprecht
3e6542d819 update clap from 2 to 3
only relevant change is the assertion that multiple(true) takes a
value, so we need to change to the new actions system.

Note that with 3.2.20+ we could switch to args.get_count("verbose")
saving us the unwrap/dereference dance.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-24 18:47:12 +01:00
Thomas Lamprecht
ac32804169 cargo: relaxe libc dependency to minor 0.2 version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-13 11:35:04 +02:00
Thomas Lamprecht
915a5aa7f8 cargo: update clap to 2.33
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-13 11:34:44 +02:00
Wolfgang Bumiller
8f1719eebe drop 'time' dependency
We're using a very old version of it and the functions we
actually use are available in glibc anyway.

The only difference I found was that the result of
glibc's `strptime()`'s `%s` does *not* want an additional
`.to_local()` call anymore...

... which was weird anyway.

As a minor optimization I pass the format string as `&CStr`
to avoid the memcpy.

(The CString::new() call in `strptime()` only happens during
parameter parsing)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
[dropped left-over and fixed FIXME]
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2022-02-14 19:05:47 +01:00
Thomas Lamprecht
4b388f8d40 bump version to 2.3.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-01 13:32:06 +01:00
Wolfgang Bumiller
daec25d33f bump version to 2.3.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-01-04 15:55:53 +01:00
Wolfgang Bumiller
821c09bd9f bump edition to 2021
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-01-03 13:22:16 +01:00
Wolfgang Bumiller
f9d4bdda8b switch to anyhow, don't use old style imports
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-01-03 13:21:18 +01:00
Thomas Lamprecht
8eeab2adf0 bump version to 2.2.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 16:01:50 +02:00
Thomas Lamprecht
0908781e80 cargo: more flexible versioned dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-24 12:15:03 +01:00
Thomas Lamprecht
5af4c03d8c bump version to 2.1.9-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-24 12:08:23 +01:00
Thomas Lamprecht
8d0d075975 bump version to 2.1.8-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-18 19:29:27 +01:00
Thomas Lamprecht
5c363ec815 bump version to 2.1.7-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-03 17:50:45 +02:00
Thomas Lamprecht
b0b36cefa9 bump version to 2.1.6-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-19 18:05:02 +02:00
Thomas Lamprecht
0a16b4d6fd bump version to 2.1.5-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-14 17:34:02 +02:00
Thomas Lamprecht
2f182bc7c9 bump version to 2.1.4-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-24 19:35:20 +02:00
Thomas Lamprecht
a27c3b076b bump version to 2.1.3-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-24 12:27:11 +02:00
Wolfgang Bumiller
75acc91506 bump version to 2.1.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-06 12:08:10 +02:00
Thomas Lamprecht
bccbe8d894 bump version to 2.1.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-24 12:37:55 +01:00
Wolfgang Bumiller
d06ac89c35 Cargo.toml: add license, description, homepage and excludes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-02-28 09:43:15 +01:00
Mira Limbeck
457d833549 rewrite in rust
pmg-log-tracker has been rewritten in Rust. Functionality is the same.
Output sometimes has a different order than the pmg-log-tracker in C.
This only happens when the time of the entries match.

There's one change regarding the interface. In addition to the short
versions of arguments also long versions exist.

The implementation uses Rc<>, Weak<> and RefCell<> to make holding mutable
cross-references possible, without having to change the original logic
completely. This allowed for easier translation from C to Rust.

The file debian/cargo-checksum.json is required by dh-cargo, otherwise
it won't compile. The cargo-checksum.json should contain the upstream
.crate file which does not exist in this case, so we just create an
empty one with the required keys. (see 'Library package structure' in
https://wiki.debian.org/Teams/RustPackaging/Policy)

The change to the minimum version of debhelper required was done
according to other rust packages (rust-clap, rust-bindgen, rust-ripgrep).

Adds a README that provides an overview of the stages a mail passes
through and what we can use to match those together for a single mail.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-02-21 09:47:30 +01:00