68 Commits

Author SHA1 Message Date
Wolfgang Bumiller
cd8984a954 buildsys: both: check crate vs debian version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-05 13:50:17 +02:00
Wolfgang Bumiller
225b640f1f bump pmg-rs to 0.7.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-05 13:35:43 +02:00
Wolfgang Bumiller
e2c950bf4c pmg: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-05 11:03:08 +02:00
Wolfgang Bumiller
470849f974 pmg: reset tfa failure count on unlock
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-05 11:01:45 +02:00
Wolfgang Bumiller
06f325fd9d 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>
2023-07-05 10:59:52 +02:00
Wolfgang Bumiller
3df4aecac0 bump pmg-rs to 0.7.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-27 16:01:55 +02:00
Wolfgang Bumiller
fdcdd326c3 pmg: enable tfa lockout
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-27 15:59:39 +02:00
Wolfgang Bumiller
aed1657598 pmg: add tfa_lock_status_query and api_unlock_tfa
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-27 15:59:14 +02:00
Wolfgang Bumiller
39a7399c2c pmg: bump proxmox-tfa to 4.0.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-27 15:56:02 +02:00
Lukas Wagner
d0cab6371a 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>
2023-06-05 09:25:05 +02:00
Wolfgang Bumiller
a4610c6a0f bump proxmox-apt,http,openid,subscription,sys crate dependencies
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-24 16:05:33 +02:00
Thomas Lamprecht
6b92c01349 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>
2023-05-18 12:34:43 +02:00
Thomas Lamprecht
0d049201e9 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>
2023-05-18 12:28:58 +02:00
Thomas Lamprecht
f7a9ddfdfd buildsys: cleanup and expand clean target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-18 12:00:17 +02:00
Thomas Lamprecht
c0bc3436ee pmg: d/changelog: fixup distribution to bookworm
this release got uploaded to bookworm only.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-18 11:43:49 +02:00
Wolfgang Bumiller
6beb0ffa6b buildsys: add missing deb targets
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-17 15:57:02 +02:00
Wolfgang Bumiller
4917bd4ead bump proxmox-rs-perl to 0.3.0, pmg-rs to 0.7.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-17 15:53:38 +02:00
Wolfgang Bumiller
3255c3b59c buildsys: pmg-rs: dsc and sbuild updates
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-17 15:45:59 +02:00
Wolfgang Bumiller
34a0068618 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>
2023-05-17 11:02:00 +02:00
Wolfgang Bumiller
932d602d33 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>
2023-05-10 11:44:44 +02:00
Wolfgang Bumiller
e885772926 bump proxmox-tfa to 4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-10 11:44:44 +02:00
Wolfgang Bumiller
72140ad516 update to new tfa crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-05 10:57:48 +02:00
Wolfgang Bumiller
187d43394d use more workspace variables, upgrade edition
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-04-28 12:40:53 +02:00
Wolfgang Bumiller
856ab916b1 buildsys: drop old deb building from pmg,pve Makefiles
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-04-18 10:14:22 +02:00
Wolfgang Bumiller
0648876946 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>
2023-03-21 12:54:50 +01:00
Wolfgang Bumiller
9fdb289df2 update to new tfa crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-07 12:48:46 +01:00
Wolfgang Bumiller
bd90bdf495 bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-07 12:44:15 +01:00
Wolfgang Bumiller
29181c7a0e use workspace dependencies
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-07 12:44:15 +01:00
Lukas Wagner
c7c3940718 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>
2023-03-07 12:02:02 +01:00
Fabian Grünbichler
f6b244dfb3 update to nix 0.26
and proxmox-sys using it

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 13:16:26 +01:00
Wolfgang Bumiller
6583f4d840 buildsys: generate .pm files in packages
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-11-15 13:22:34 +01:00
Wolfgang Bumiller
6b2814d612 buildsys: generate Proxmox::Lib within the product Makefiles
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-11-15 13:13:59 +01:00
Wolfgang Bumiller
807651bc7b buildsys: include defines.mk in pve-rs and pmg-rs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-11-15 13:06:47 +01:00
Fabian Grünbichler
9488180f9e pmg-rs: bump to 0.6.2
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 12:06:33 +02:00
Fabian Grünbichler
156f3d7727 update to proxmox-subscription 0.3
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 10:25:12 +02:00
Fabian Grünbichler
95b9307776 update to proxmox-http 0.7
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 10:25:12 +02:00
Fabian Grünbichler
39c29ee9a4 bump proxmox-sys dependency to 0.4
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-02 14:42:50 +02:00
Wolfgang Bumiller
4cc6259a60 bump pmg-rs to 0.6.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:46:35 +02:00
Wolfgang Bumiller
ed3bbe6425 bump proxmox-tfa to 2.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:45:00 +02:00
Wolfgang Bumiller
9c11a1bea6 bump pmg-rs to 0.6.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 15:00:27 +02:00
Wolfgang Bumiller
54d694bbaf pmg: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 15:00:27 +02:00
Wolfgang Bumiller
719c66bf04 bump proxmox-http to 0.6.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 14:59:07 +02:00
Wolfgang Bumiller
818886ee45 bump proxmox-apt to 0.9 and proxmox-subscription to 0.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 14:54:45 +02:00
Fabian Grünbichler
8d143f8f9e common: add proxmox_subscription wrapper
and expose it for PVE and PMG.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-21 12:55:20 +02:00
Wolfgang Bumiller
059d216e12 bump pmg-rs to 0.5.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-08 14:49:41 +02:00
Fabian Ebner
f386660b4b move apt repositories module to common
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>
2022-07-08 14:29:54 +02:00
Thomas Lamprecht
b2a4623ac7 d/control: update build-dep for nix rs dependency to 0.24
was missed in commit b67ff27d9e5869d0e7d25bf6b0c8176b401cb438

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-06-20 10:33:13 +02:00
Fabian Grünbichler
b67ff27d9e update to nix 0.24
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-02 14:23:07 +02:00
Wolfgang Bumiller
d00bfdcddb buildsys: drop file list in Makefiles
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>
2022-03-21 14:16:21 +01:00
Wolfgang Bumiller
6ff0991ba4 bump pmg-rs to 0.5.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-21 09:29:43 +01:00