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>
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>
We only have the month, day, hours, minutes and seconds available to us,
but not the year. Because of this we assume the logs are always relative
to the current year. This means when running the log tracker the CTIME
is calculated based on the current year and once a new year starts, all
old tests have to be updated to match the new year.
To work around this issue, use 'faketime' to set the time to 2020-12-31
23:59:59 as all tests assume 2020 as the year.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
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>
diffoscope shows that the only real changes is the new SOURCE file we
ship in docs, like other packages.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>