]> git.proxmox.com Git - proxmox-perl-rs.git/log
proxmox-perl-rs.git
8 months agoexpose use_safe_putenv via Proxmox::Lib::PMG
Wolfgang Bumiller [Fri, 6 Oct 2023 07:09:36 +0000 (09:09 +0200)]
expose use_safe_putenv via Proxmox::Lib::PMG

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agobump perlmod to 0.13.4 for use_safe_putenv
Wolfgang Bumiller [Fri, 6 Oct 2023 07:09:15 +0000 (09:09 +0200)]
bump perlmod to 0.13.4 for use_safe_putenv

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agopve: switch openid to use magic
Wolfgang Bumiller [Wed, 4 Oct 2023 07:09:44 +0000 (09:09 +0200)]
pve: switch openid to use magic

Instead of blessed raw pointers as these can easily lead to double
free corruptions when they're copied in perl.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agopmg: switch acme to use magic
Wolfgang Bumiller [Wed, 4 Oct 2023 07:03:28 +0000 (09:03 +0200)]
pmg: switch acme to use magic

Instead of blessed raw pointers as these can easily lead to double
free corruptions when they're copied in perl.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agopmg: buildsys: add notify related dependencies
Wolfgang Bumiller [Wed, 4 Oct 2023 07:06:37 +0000 (09:06 +0200)]
pmg: buildsys: add notify related dependencies

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agoupdate to env_logger 0.10
Fabian Grünbichler [Tue, 3 Oct 2023 07:59:58 +0000 (09:59 +0200)]
update to env_logger 0.10

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 months agonotify context: fix 'default_sendmail_from' context method
Lukas Wagner [Mon, 2 Oct 2023 07:40:49 +0000 (09:40 +0200)]
notify context: fix 'default_sendmail_from' context method

The name of the configuration option in datacenter.cfg is `email_from`
and not `mail_from`.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agobump version to 0.8.6
Thomas Lamprecht [Tue, 5 Sep 2023 14:32:45 +0000 (16:32 +0200)]
bump version to 0.8.6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobump d/control
Wolfgang Bumiller [Fri, 28 Jul 2023 09:50:54 +0000 (11:50 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 months agobump notify dependency
Wolfgang Bumiller [Fri, 28 Jul 2023 09:51:23 +0000 (11:51 +0200)]
bump notify dependency

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 months agonotify: use new HttpError type
Lukas Wagner [Wed, 26 Jul 2023 14:18:24 +0000 (16:18 +0200)]
notify: use new HttpError type

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>
10 months agobump common to 0.3.1
Wolfgang Bumiller [Mon, 24 Jul 2023 12:02:32 +0000 (14:02 +0200)]
bump common to 0.3.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 months agocommon: bump pve-rs dep to 0.8.5 for Proxmox::RS::Notify
Wolfgang Bumiller [Mon, 24 Jul 2023 12:08:13 +0000 (14:08 +0200)]
common: bump pve-rs dep to 0.8.5 for Proxmox::RS::Notify

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>
10 months agobump pve-rs to 0.8.5
Wolfgang Bumiller [Mon, 24 Jul 2023 12:01:29 +0000 (14:01 +0200)]
bump pve-rs to 0.8.5

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 months agoremove leftover PVE::RS::Notify module
Wolfgang Bumiller [Mon, 24 Jul 2023 12:01:23 +0000 (14:01 +0200)]
remove leftover PVE::RS::Notify module

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 months agonotify: rename PVE::RS::Notify to Proxmox::RS::Notify
Lukas Wagner [Mon, 24 Jul 2023 11:26:57 +0000 (13:26 +0200)]
notify: rename PVE::RS::Notify to Proxmox::RS::Notify

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>
10 months agonotify: add wrapper for `get_referenced_entities`
Lukas Wagner [Thu, 20 Jul 2023 14:32:02 +0000 (16:32 +0200)]
notify: add wrapper for `get_referenced_entities`

The function returns all other entities referenced by a filter/target.
This is useful for permission checks, where the user must have the
appropriate permissions for all entities.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agonotify: add context for getting http_proxy from datacenter.cfg
Lukas Wagner [Thu, 20 Jul 2023 14:32:01 +0000 (16:32 +0200)]
notify: add context for getting http_proxy from datacenter.cfg

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agonotify: implement context for getting default author/mailfrom
Lukas Wagner [Thu, 20 Jul 2023 14:32:00 +0000 (16:32 +0200)]
notify: implement context for getting default author/mailfrom

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agonotify: sendmail: support the `mailto-user` parameter
Lukas Wagner [Thu, 20 Jul 2023 14:31:59 +0000 (16:31 +0200)]
notify: sendmail: support the `mailto-user` parameter

This parameter allows to send mails to the email address configured
for users from the product's user database.

`proxmox-notify` now has a `Context` that must be set via
`proxmox_notify::context::set_context` before the crate is used.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agonotify: add api for notification filters
Lukas Wagner [Thu, 20 Jul 2023 14:31:58 +0000 (16:31 +0200)]
notify: add api for notification filters

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agonotify: add api for gotify endpoints
Lukas Wagner [Thu, 20 Jul 2023 14:31:57 +0000 (16:31 +0200)]
notify: add api for gotify endpoints

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agonotify: add api for sendmail endpoints
Lukas Wagner [Thu, 20 Jul 2023 14:31:56 +0000 (16:31 +0200)]
notify: add api for sendmail endpoints

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agonotify: add api for notification groups
Lukas Wagner [Thu, 20 Jul 2023 14:31:55 +0000 (16:31 +0200)]
notify: add api for notification groups

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agonotify: add api for sending notifications/testing endpoints
Lukas Wagner [Thu, 20 Jul 2023 14:31:54 +0000 (16:31 +0200)]
notify: add api for sending notifications/testing endpoints

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agoadd PVE::RS::Notify module
Lukas Wagner [Thu, 20 Jul 2023 14:31:53 +0000 (16:31 +0200)]
add PVE::RS::Notify module

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
11 months agobuildsys: both: check crate vs debian version
Wolfgang Bumiller [Wed, 5 Jul 2023 11:44:48 +0000 (13:44 +0200)]
buildsys: both: check crate vs debian version

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agobump pmg-rs to 0.7.3
Wolfgang Bumiller [Wed, 5 Jul 2023 11:35:43 +0000 (13:35 +0200)]
bump pmg-rs to 0.7.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agobump pve-rs to 0.8.4
Wolfgang Bumiller [Wed, 5 Jul 2023 11:30:27 +0000 (13:30 +0200)]
bump pve-rs to 0.8.4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agopmg: bump d/control
Wolfgang Bumiller [Wed, 5 Jul 2023 09:03:08 +0000 (11:03 +0200)]
pmg: bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agopve: bump d/control
Wolfgang Bumiller [Wed, 5 Jul 2023 09:02:40 +0000 (11:02 +0200)]
pve: bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agopmg: reset tfa failure count on unlock
Wolfgang Bumiller [Wed, 5 Jul 2023 09:01:45 +0000 (11:01 +0200)]
pmg: reset tfa failure count on unlock

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agopve: reset tfa failure count on unlock
Wolfgang Bumiller [Wed, 5 Jul 2023 09:01:36 +0000 (11:01 +0200)]
pve: reset tfa failure count on unlock

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agobump proxmox-tfa dependency to 4.0.4
Wolfgang Bumiller [Wed, 5 Jul 2023 08:59:52 +0000 (10:59 +0200)]
bump proxmox-tfa dependency to 4.0.4

This allows resetting the tfa failure counters on unlock.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agobump pmg-rs to 0.7.2
Wolfgang Bumiller [Tue, 27 Jun 2023 14:01:55 +0000 (16:01 +0200)]
bump pmg-rs to 0.7.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agopmg: enable tfa lockout
Wolfgang Bumiller [Tue, 27 Jun 2023 13:59:39 +0000 (15:59 +0200)]
pmg: enable tfa lockout

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agopmg: add tfa_lock_status_query and api_unlock_tfa
Wolfgang Bumiller [Tue, 27 Jun 2023 13:58:50 +0000 (15:58 +0200)]
pmg: add tfa_lock_status_query and api_unlock_tfa

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agopmg: bump proxmox-tfa to 4.0.2
Wolfgang Bumiller [Tue, 27 Jun 2023 13:55:36 +0000 (15:55 +0200)]
pmg: bump proxmox-tfa to 4.0.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
12 months agobump pve-rs to 0.8.3
Wolfgang Bumiller [Mon, 5 Jun 2023 10:55:12 +0000 (12:55 +0200)]
bump pve-rs to 0.8.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
12 months agobump proxmox-tfa dep to 4.0.2
Wolfgang Bumiller [Mon, 5 Jun 2023 10:53:22 +0000 (12:53 +0200)]
bump proxmox-tfa dep to 4.0.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
12 months agopve: add tfa_lock_status query sub
Wolfgang Bumiller [Fri, 2 Jun 2023 13:05:22 +0000 (15:05 +0200)]
pve: add tfa_lock_status query sub

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
12 months agolog: set default log level to 'info', add product specific logging env var
Lukas Wagner [Wed, 24 May 2023 13:56:25 +0000 (15:56 +0200)]
log: set default log level to 'info', add product specific logging env var

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>
12 months agopve: bump version to 0.8.2
Thomas Lamprecht [Sun, 4 Jun 2023 16:34:02 +0000 (18:34 +0200)]
pve: bump version to 0.8.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agobump pve-rs to 0.8.1
Wolfgang Bumiller [Wed, 31 May 2023 12:18:13 +0000 (14:18 +0200)]
bump pve-rs to 0.8.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
12 months agopve: enable tfa lockout, add api_unlock_tfa method
Wolfgang Bumiller [Fri, 26 May 2023 10:19:55 +0000 (12:19 +0200)]
pve: enable tfa lockout, add api_unlock_tfa method

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
12 months agopve-rs: bump proxmox-tfa dep to 4.0.1
Wolfgang Bumiller [Wed, 31 May 2023 12:15:29 +0000 (14:15 +0200)]
pve-rs: bump proxmox-tfa dep to 4.0.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
12 months agobump proxmox-apt,http,openid,subscription,sys crate dependencies
Wolfgang Bumiller [Wed, 24 May 2023 14:05:33 +0000 (16:05 +0200)]
bump proxmox-apt,http,openid,subscription,sys crate dependencies

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agopve: update & wrap-and-sort d/control
Thomas Lamprecht [Thu, 18 May 2023 11:07:28 +0000 (13:07 +0200)]
pve: update & wrap-and-sort d/control

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agobuildsys: add clean target for common package
Thomas Lamprecht [Thu, 18 May 2023 10:46:27 +0000 (12:46 +0200)]
buildsys: add clean target for common package

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agocommon: wrap-and-sort & refresh
Thomas Lamprecht [Thu, 18 May 2023 10:45:44 +0000 (12:45 +0200)]
common: wrap-and-sort & refresh

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agocommon: d/changelog: fixup distribution to bookworm
Thomas Lamprecht [Thu, 18 May 2023 10:30:23 +0000 (12:30 +0200)]
common: d/changelog: fixup distribution to bookworm

got (correctly) uploaded to bookworm, not bullseye

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agopmg: bump version to 0.7.1
Thomas Lamprecht [Thu, 18 May 2023 10:01:56 +0000 (12:01 +0200)]
pmg: bump version to 0.7.1

as the cargo one wasn't bumped, d/changelog still listed bullseye as
distribution for the original 0.7.0 upload and d/control was a bit
dusted, so to avoid any confusion just re-bumped with no actual code
change.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agopmg: refresh d/control and note that debcargo.toml isn't canonical source
Thomas Lamprecht [Thu, 18 May 2023 10:26:20 +0000 (12:26 +0200)]
pmg: refresh d/control and note that debcargo.toml isn't canonical source

Also run `wrap-and-sort -tkn`

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agobuildsys: cleanup and expand clean target
Thomas Lamprecht [Thu, 18 May 2023 09:59:07 +0000 (11:59 +0200)]
buildsys: cleanup and expand clean target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agopmg: d/changelog: fixup distribution to bookworm
Thomas Lamprecht [Thu, 18 May 2023 09:43:46 +0000 (11:43 +0200)]
pmg: d/changelog: fixup distribution to bookworm

this release got uploaded to bookworm only.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agobuildsys: add missing deb targets
Wolfgang Bumiller [Wed, 17 May 2023 13:57:02 +0000 (15:57 +0200)]
buildsys: add missing deb targets

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agobump proxmox-rs-perl to 0.3.0, pmg-rs to 0.7.0
Wolfgang Bumiller [Wed, 17 May 2023 13:49:08 +0000 (15:49 +0200)]
bump proxmox-rs-perl to 0.3.0, pmg-rs to 0.7.0

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agobuildsys: pmg-rs: dsc and sbuild updates
Wolfgang Bumiller [Wed, 17 May 2023 13:43:28 +0000 (15:43 +0200)]
buildsys: pmg-rs: dsc and sbuild updates

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agobump pve-rs to 0.8.0
Wolfgang Bumiller [Tue, 16 May 2023 12:29:16 +0000 (14:29 +0200)]
bump pve-rs to 0.8.0

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agobuildsys: make pve-rs sbuild compatible
Wolfgang Bumiller [Wed, 17 May 2023 07:37:31 +0000 (09:37 +0200)]
buildsys: make pve-rs sbuild compatible

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agoundo rust workspace change in preparation for .dsc builds
Wolfgang Bumiller [Wed, 17 May 2023 07:03:49 +0000 (09:03 +0200)]
undo rust workspace change in preparation for .dsc builds

The library ending up a level above the actual code just
makes .dsc/sbuild building very inconvenient, and pve-rs and
pmg-rs often grow independently from one another.

All we need is the common code available.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agobuildsys: pve: add dsc target, derive distribution automatically
Wolfgang Bumiller [Tue, 16 May 2023 12:28:25 +0000 (14:28 +0200)]
buildsys: pve: add dsc target, derive distribution automatically

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agobump pve-rs to 0.7.6
Wolfgang Bumiller [Wed, 10 May 2023 11:21:21 +0000 (13:21 +0200)]
bump pve-rs to 0.7.6

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agomajor build system upgrade
Wolfgang Bumiller [Tue, 9 May 2023 09:29:05 +0000 (11:29 +0200)]
major build system upgrade

- 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>
13 months agobump proxmox-tfa to 4
Wolfgang Bumiller [Thu, 20 Apr 2023 07:51:09 +0000 (09:51 +0200)]
bump proxmox-tfa to 4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agoupdate to new tfa crate
Wolfgang Bumiller [Tue, 18 Apr 2023 09:26:04 +0000 (11:26 +0200)]
update to new tfa crate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agouse more workspace variables, upgrade edition
Wolfgang Bumiller [Fri, 28 Apr 2023 10:37:50 +0000 (12:37 +0200)]
use more workspace variables, upgrade edition

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 months agobuildsys: drop old deb building from pmg,pve Makefiles
Wolfgang Bumiller [Tue, 21 Mar 2023 14:40:08 +0000 (15:40 +0100)]
buildsys: drop old deb building from pmg,pve Makefiles

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 months agobump version to 0.7.5
Thomas Lamprecht [Tue, 21 Mar 2023 16:58:45 +0000 (17:58 +0100)]
bump version to 0.7.5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agobump version to 0.7.4
Thomas Lamprecht [Tue, 21 Mar 2023 14:30:34 +0000 (15:30 +0100)]
bump version to 0.7.4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agobump proxmox-resource-scheduling dependency to 0.2
Thomas Lamprecht [Tue, 21 Mar 2023 14:26:40 +0000 (15:26 +0100)]
bump proxmox-resource-scheduling dependency to 0.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agopve: test: resource scheduling: add test with overcommitted node
Fiona Ebner [Tue, 21 Mar 2023 12:33:45 +0000 (13:33 +0100)]
pve: test: resource scheduling: add test with overcommitted node

which will fail with librust-proxmox-resource-scheduling-dev=0.1.0-1

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
15 months agopve: test: resource scheduling: use dedicated functions for tests
Fiona Ebner [Tue, 21 Mar 2023 12:33:44 +0000 (13:33 +0100)]
pve: test: resource scheduling: use dedicated functions for tests

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
15 months agobuildsys: fix 'target/' path in install target
Wolfgang Bumiller [Tue, 21 Mar 2023 11:54:50 +0000 (12:54 +0100)]
buildsys: fix 'target/' path in install target

The target/ dir is relative to the workspace Cargo.toml
file.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 months agoupdate to new tfa crate
Wolfgang Bumiller [Tue, 7 Mar 2023 11:48:46 +0000 (12:48 +0100)]
update to new tfa crate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 months agobump d/control
Wolfgang Bumiller [Tue, 7 Mar 2023 11:42:08 +0000 (12:42 +0100)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 months agouse workspace dependencies
Wolfgang Bumiller [Tue, 7 Mar 2023 11:40:49 +0000 (12:40 +0100)]
use workspace dependencies

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 months agoinitialize logging when shared library is loaded
Lukas Wagner [Tue, 21 Feb 2023 09:29:46 +0000 (10:29 +0100)]
initialize logging when shared library is loaded

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>
17 months agoupdate to nix 0.26
Fabian Grünbichler [Thu, 5 Jan 2023 12:16:26 +0000 (13:16 +0100)]
update to nix 0.26

and proxmox-sys using it

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
19 months agodrop comment about running tests during build
Wolfgang Bumiller [Tue, 15 Nov 2022 12:45:58 +0000 (13:45 +0100)]
drop comment about running tests during build

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agopve: build test stub of Proxmox::Lib::PVE for tests
Wolfgang Bumiller [Tue, 15 Nov 2022 12:35:23 +0000 (13:35 +0100)]
pve: build test stub of Proxmox::Lib::PVE for tests

this replaces the libdirs() sub with one containing:
- ../target (for when run from build/pve-rs)
- ../../target (for when run from toplevel/pve-rs

This way we can run 'make check' both from within `pve-rs`
as well as from the package building process.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agopackage template: introduce libdirs() method
Wolfgang Bumiller [Tue, 15 Nov 2022 12:25:21 +0000 (13:25 +0100)]
package template: introduce libdirs() method

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agobuildsys: generate .pm files in packages
Wolfgang Bumiller [Tue, 15 Nov 2022 12:16:51 +0000 (13:16 +0100)]
buildsys: generate .pm files in packages

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agobuildsys: generate Proxmox::Lib within the product Makefiles
Wolfgang Bumiller [Tue, 15 Nov 2022 12:09:27 +0000 (13:09 +0100)]
buildsys: generate Proxmox::Lib within the product Makefiles

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agobuildsys: include defines.mk in pve-rs and pmg-rs
Wolfgang Bumiller [Tue, 15 Nov 2022 12:06:47 +0000 (13:06 +0100)]
buildsys: include defines.mk in pve-rs and pmg-rs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agobuildsys: move package_template to defines.mk
Wolfgang Bumiller [Tue, 15 Nov 2022 12:05:50 +0000 (13:05 +0100)]
buildsys: move package_template to defines.mk

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agobuildsys: drop PERLMOD_PRODUCT variable
Wolfgang Bumiller [Tue, 15 Nov 2022 12:05:10 +0000 (13:05 +0100)]
buildsys: drop PERLMOD_PRODUCT variable

it's not used anymore

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agopve-rs: bump to 0.7.3
Wolfgang Bumiller [Tue, 15 Nov 2022 10:14:14 +0000 (11:14 +0100)]
pve-rs: bump to 0.7.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agopve: bump d/control
Wolfgang Bumiller [Tue, 15 Nov 2022 10:11:27 +0000 (11:11 +0100)]
pve: bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agouse Test::More for resource_scheduling tests
Wolfgang Bumiller [Tue, 15 Nov 2022 10:10:32 +0000 (11:10 +0100)]
use Test::More for resource_scheduling tests

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
19 months agoadd basic test for resource scheduling
Fiona Ebner [Thu, 10 Nov 2022 14:37:44 +0000 (15:37 +0100)]
add basic test for resource scheduling

currently only used to test the installed version and not
automatically during build. See the FIXME note for why.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
19 months agopve-rs: add resource scheduling module
Fiona Ebner [Thu, 10 Nov 2022 14:37:43 +0000 (15:37 +0100)]
pve-rs: add resource scheduling module

backed by the proxmox-resource-scheduling crate.

Initially to be used by the HA manager to allow it basing its decision
where to start a new or recovered service on static usage information
rather than just counting.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
21 months agopmg-rs: bump to 0.6.2
Fabian Grünbichler [Wed, 7 Sep 2022 10:06:18 +0000 (12:06 +0200)]
pmg-rs: bump to 0.6.2

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
21 months agopve-rs: bump to 0.7.2
Fabian Grünbichler [Wed, 7 Sep 2022 10:06:05 +0000 (12:06 +0200)]
pve-rs: bump to 0.7.2

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
21 months agocommon: bump to 0.2.1
Fabian Grünbichler [Wed, 7 Sep 2022 10:05:37 +0000 (12:05 +0200)]
common: bump to 0.2.1

and update versioned depends/breaks

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
21 months agoupdate to proxmox-subscription 0.3
Fabian Grünbichler [Wed, 7 Sep 2022 08:06:10 +0000 (10:06 +0200)]
update to proxmox-subscription 0.3

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
21 months agoupdate to proxmox-http 0.7
Fabian Grünbichler [Thu, 4 Aug 2022 08:31:37 +0000 (10:31 +0200)]
update to proxmox-http 0.7

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agocommon: add versioned Breaks
Wolfgang Bumiller [Wed, 17 Aug 2022 11:13:47 +0000 (13:13 +0200)]
common: add versioned Breaks

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agobump proxmox-sys dependency to 0.4
Fabian Grünbichler [Tue, 2 Aug 2022 12:42:50 +0000 (14:42 +0200)]
bump proxmox-sys dependency to 0.4

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agobump pmg-rs to 0.6.1
Wolfgang Bumiller [Mon, 25 Jul 2022 11:46:35 +0000 (13:46 +0200)]
bump pmg-rs to 0.6.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>