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>
while introducing a 'product' parameter to the relevant functions and
adding wrappers for backwards-compatibility.
Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
libproxmox-rs-perl ships /usr/share/perl5/PVE/RS/CalendarEvent.pm,
which was also present in libpve-rs-perl until version 0.5.1
This can lead to a (racy) issue while upgrading - depending
on which of libproxmox-rs-perl or libpve-rs-perl gets unpacked first
we potentially run into:
```
dpkg: error processing archive \
/tmp/apt-dpkg-install-lNBzMn/48-libproxmox-rs-perl_0.1.0_amd64.deb (--unpack):
trying to overwrite '/usr/share/perl5/PVE/RS/CalendarEvent.pm', \
which is also in package libpve-rs-perl 0.5.1
```
This patch follows the debian policy manual for these situations:
https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
just install all files, `make gen` at the top level is
responsible for generating the correct files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This simply uses the new one as a base in order to help
getting the packages setup initially.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>