There is no difference in the source or binary packge running with or
without `--no-pre-clean`. On the other hand, dpkg-buildpackge complains
loudly when `--no-pre-clean` is specified, so let's remove it.
Signed-off-by: Jing Luo <jing@jing.rocks>
There is no architecture dependent binary files in the libproxmox-rs-perl deb
package. There is no shared libs either (says debhelper), so let's remove
that too. Slight adjustment for Makefile too.
Signed-off-by: Jing Luo <jing@jing.rocks>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[ TL: squash in small changes from re-run on current master ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This allows us to drop the impl of that function on the perl side.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
This is a simple, cache implementation which can be accessed from
multiple processes. It also supports storing a range of historical
values.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[wb: also update pmg-rs/Cargo.toml and both d/control files]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
We cannot use &[&str] - since this would be a poitner to a `[&str]`
data structure, that's not how perl stores strings.
But we *can* use Vec<&str> - here, the Vec will be allocated, but the
contents will borrow. We don't need to transform this afterwards.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
For PMG we for now only provide an empty stub and warn to syslog -
we need basic notification system integration there first.
On PMG, we still use a pure Perl implementation at the moment,
so this should not be an issue unless we change that.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
proxmox_notify's api functions have been changed so that they take
ownership of config structs.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Instead of passing literal template strings to the notification
system, we now only pass an identifier. This identifier will be used
load the template files from a product-specific directory.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
This fixes an issue with `openssl-probe` calling `setenv` when (issued
via the `native-tls` crate with the ACME client) which crashes perl.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Use `proxmox-http-error::HttpError` instead of
`proxmox-notify::api::ApiError`.
Also factoring out the digest decoding into a small helper.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Note: this is more of a soft requirement, since as long as the Notify
module isn't loaded we don't need the latest version.
This is important to keep in mind since we do not currently have a
`pmg-rs` notify `Context` implementation and thus cannot depend on a
newer `pmg-rs`. However, as long as pmg code doesn't try to *use* the
Notify module, this won't be a problem.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Also splitting PVE-specific context into its own file.
Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Logging behaviour can be overridden by the {PMG,PVE}_LOG environment
variable.
This commit also disables styled output and timestamps in log messages,
since we usually log to the journal anyway. The log output is configured
to match with other log messages in task logs.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
- Add a 'common' symlink inside pve-rs/pmg-rs
- Have the `build/` target replace it with a dir and copy
`common/src` into it.
- Depend on perlmod-bin to generate the perl package files.
now pve-rs and pmg-rs can be built directly from within via
dpkg-buildpackage
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit sets up logging by hooking into module loading/bootstraping
process to call a new `init` function exported by the `Proxmox::Lib::{PVE,PMG}`
module, which initializes `env_logger` with its default settings.
This allows us to use `log::*` macros from Rust code.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>