Commit Graph

287 Commits

Author SHA1 Message Date
Thomas Lamprecht
04eb26f7e2 pve: update proxmox-ve-config to 0.2.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 22:10:08 +01:00
Thomas Lamprecht
cf26bd615f pve: bump version to 0.9.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-20 16:18:07 +01:00
Stefan Hanreich
f83a9a6367 firewall: sdn: ignore EPERM when reading the legacy IPAM file
On fresh installations, neither the new nor the old IPAM db file
exist. This triggers our fallback code path and leads to errors in the
syslog on fresh installs where there is no IPAM database. This happens
whenever a firewall API call is made. Because of this, we choose to
ignore EPERM when reading the legacy files. This is okay, because we
move existing databases in the postinstall script of
libpve-network-perl, making the situation where the new file does not
exist, but the old file exists unlikely.

Reported-by: Alexander Zeidler <a.zeidler@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-20 16:17:20 +01:00
Thomas Lamprecht
7ae468de65 pve: bump version to 0.8.13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-19 16:11:31 +01:00
Thomas Lamprecht
217df011c9 sdn: use new IPAM state path with fallback to legacy one
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-19 11:10:36 +01:00
Thomas Lamprecht
601a82cb64 pve: bump version to 0.8.12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-17 12:19:16 +01:00
Thomas Lamprecht
0b9b31eead pve: bump dependency for proxmox-ve-config to 0.2 and add to d/control
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-15 19:10:11 +01:00
Stefan Hanreich
02b7eae00a add PVE::RS::Firewall::SDN module
Used for obtaining the IPSets that get autogenerated by the nftables
firewall. The returned configuration has the same format as the
pve-firewall uses internally, making it compatible with the existing
pve-firewall code.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Tested-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Hannes Dürr <h.duerr@proxmox.com>
2024-11-15 18:53:14 +01:00
Thomas Lamprecht
ebaf08b8e6 pve: bump dependency to proxmox-apt to 0.11.5
to ensure that the standard-repos for PVE include Ceph Squid too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-11 21:18:09 +01:00
Thomas Lamprecht
64fafc6913 pve: bump version to 0.8.11
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-11 20:42:25 +01:00
Jing Luo
2a107dd8e0 common: buildsys: Makefile: drop --no-pre-clean
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>
2024-11-11 11:41:17 +01:00
Jing Luo
2a1451f8f6 common: d/control: change binary package architecture from any to all
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>
2024-11-11 11:41:13 +01:00
Lukas Wagner
f885544707 tree-wide: run cargo fmt
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>
2024-11-11 11:37:10 +01:00
Wolfgang Bumiller
8a35f2e4d5 README: add note on version bumps
Since these packages are a bit "special", the way they should be
bumped is now specified in the README. I hope the explanation is clear
enough.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-11-11 11:15:34 +01:00
Thomas Lamprecht
c7aab1b9b7 pve: update proxmox-apt to >= 0.11.4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-10 19:12:49 +01:00
Thomas Lamprecht
bede4e949c update proxmox-subscription to 0.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-10 19:11:14 +01:00
Thomas Lamprecht
ceadf4de50 update proxmox-notify to 0.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-10 19:10:58 +01:00
Lukas Wagner
21886bb2ac common: notify: add bindings for get_targets
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>
2024-11-10 19:08:55 +01:00
Lukas Wagner
7747ac46de common: notify: add bindings for webhook API routes
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-10 19:08:55 +01:00
Lukas Wagner
9b0714c4ed pmg-rs: acme: simplify acount config saving
We already depend on proxmox_sys, so we can just use
`replace_file`. Fixing a clippy warning (missing
truncate setting for OpenOptions) is an added benefit.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
dc38e4736e pmg-rs: acme: clippy: reference is immediately deref'd by the compiler
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
b9e227eedb pmg-rs: tfa: clippy: useless conversion to the same type
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
1c3af08a37 pmg-rs: tfa: clippy: the borrowed expression implements the required traits
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
f4164a056a pmg-rs: tfa: clippy: this function has too many arguments
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
e3dd69e832 pmg-rs: tfa: clippy: question mark operator is useless here
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
3d28612fa8 pmg-rs: tfa: clippy: unnecessary pub(self)
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
6c69a07552 pve-rs: tfa: clippy: stripping a prefix manually
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
927df476fc pve-rs: tfa: clippy: redundant slicing of the whole range
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
8aa44dddb8 pve-rs: tfa: clippy: accessing first element with .get(0)
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
824b39583d pve-rs: tfa: clippy: borrowed expression impls the required traits
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
02d170a5b5 pve-rs: tfa: clippy: question mark operator is useless here
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
79b2c8e481 pve-rs: tfa: clippy: this function has too many arguments
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
2b23512a56 pve-rs: tfa: clippy: unnecessary pub(self)
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Wolfgang Bumiller
ae27b307b8 pve: fix use vs mod grouping
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-29 10:31:31 +02:00
Wolfgang Bumiller
dfd8a2e321 bump common to 0.3.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-09 14:22:00 +02:00
Wolfgang Bumiller
a3e466af88 bump pmg-rs to 0.7.6
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-09 14:20:50 +02:00
Wolfgang Bumiller
cdc792005e pve: bump version to 0.8.10
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-09 13:46:22 +02:00
Lukas Wagner
ea4d87816b cache: add bindings for SharedCache
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>
2024-08-09 13:21:01 +02:00
Fabian Grünbichler
9a91594ee6 update to proxmox-log 0.2
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-08-06 14:13:31 +02:00
Wolfgang Bumiller
885830935c update to sys 0.6 and proxmox-log crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-17 12:44:46 +02:00
Wolfgang Bumiller
b3b8b375c2 apt: minor parameter cleanup
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>
2024-07-08 15:33:58 +02:00
Lukas Wagner
6789b14986 pve-rs: common: send apt update notification via proxmox-notify
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>
2024-07-08 15:33:58 +02:00
Dietmar Maurer
89d9debadb perl-rs: add further apt api calls
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:33:57 +02:00
Dietmar Maurer
5c994bf942 perl-rs: use api functions from proxmox-apt
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:33:32 +02:00
Dietmar Maurer
9eda29d688 perl-rs: use proxmox-apt-api-types
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:33:29 +02:00
Wolfgang Bumiller
83427e9204 bump proxmox-tfa to 5.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-04 10:48:48 +02:00
Wolfgang Bumiller
61b2f69a45 bump proxmox-time to 2.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-20 14:11:34 +02:00
Fabian Grünbichler
c873ac57d5 build: adapt Makefile to moved cargo config
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-20 12:20:42 +02:00
Lukas Wagner
7e3ea35595 pve-rs: pmg-rs: move deprecated .cargo/config to .cargo/config.toml
Fixes the following new warning that appeared after switching
to rust 1.77:

warning: `proxmox-perl-rs/pve-rs/.cargo/config` is deprecated in
favor of `config.toml`

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-06-20 12:19:01 +02:00
Fabian Grünbichler
a34b31054d build: force debug symbols in release build
they then get stripped into their own package anyway, but without this we don't
get debug symbols at all with rustc >= 1.77

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-20 10:09:19 +02:00