39 Commits

Author SHA1 Message Date
Andrew A. Vasilyev
fc51d3f03a ALT: remove dpkg 2024-04-03 13:46:31 +03:00
Wolfgang Bumiller
237b276028 bump common to 0.3.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-07 09:58:06 +01:00
Wolfgang Bumiller
62fc43fea9 common: move probe into a new SslProbe package
Because Proxmox::Lib::Common isn't actually `use`d by most packages.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-07 09:56:05 +01:00
Wolfgang Bumiller
6a31f73fa3 bump common to 0.3.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 11:23:09 +01:00
Wolfgang Bumiller
089e555d51 fixate openssl-probe dependency, probe env vars in perl
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>
2023-12-06 11:21:25 +01:00
Lukas Wagner
036236c278 notify: support 'origin' paramter
This parameter shows the origin of a config entry (builtin,
user-created, modified-builtin)

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 13:30:57 +01:00
Lukas Wagner
36fbb76145 notify: add 'disable' parameter
This parameter disables a matcher/a target.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 13:30:57 +01:00
Lukas Wagner
7f8cb0c5c3 notify: add bindings for smtp API calls
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 13:30:57 +01:00
Lukas Wagner
29602a4b01 notify: adapt to new matcher-based notification routing
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 13:30:57 +01:00
Lukas Wagner
76b63ed6a8 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>
2023-07-28 11:50:08 +02:00
Wolfgang Bumiller
2be21ff9fa bump common to 0.3.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 14:14:06 +02:00
Wolfgang Bumiller
47b7ebbc96 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>
2023-07-24 14:14:06 +02:00
Lukas Wagner
703cfbd212 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>
2023-07-24 13:58:26 +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
Thomas Lamprecht
181b19e2ef buildsys: add clean target for common package
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-18 12:46:27 +02:00
Thomas Lamprecht
e3d4bb03c9 common: wrap-and-sort & refresh
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-18 12:45:44 +02:00
Thomas Lamprecht
a53d4737d3 common: d/changelog: fixup distribution to bookworm
got (correctly) uploaded to bookworm, not bullseye

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-18 12:34:43 +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
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
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
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
Fabian Grünbichler
8e7330c474 common: bump to 0.2.1
and update versioned depends/breaks

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 12:05:37 +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
Wolfgang Bumiller
db85dc1b7a common: add versioned Breaks
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-08-17 13:13:47 +02:00
Wolfgang Bumiller
301bfb5b9a bump common to 0.2.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 15:01:47 +02:00
Wolfgang Bumiller
75796e3275 common: depend on next pve-rs/pmg-rs bump
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 15:01:20 +02:00
Fabian Grünbichler
31a1c78845 common: adapt to changes in proxmox_subscription
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-21 14:44:12 +02:00
Fabian Grünbichler
95e5e59fd0 cargo fmt
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-21 13:33:37 +02:00
Fabian Grünbichler
03bba92a8b adapt to proxmox-apt changes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-21 13:00:53 +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
c078098160 bump common version to 0.1.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-08 14:50:46 +02:00
Wolfgang Bumiller
a50a2191e8 common: depend on next pmg/pve bump
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-08 14:48:11 +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
0ddf4db934 common: bump version to 0.1.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-06-20 10:21:19 +02:00
Stoiko Ivanov
84c52f3810 common: d/control: break/replace libpve-rs-perl (<< 0.6.0)
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>
2022-05-10 07:10:43 +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
e6de656805 common: add PVE::RS::CalendarEvent for compat
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>
2022-03-17 13:50:14 +01:00
Wolfgang Bumiller
4beb35701b add libproxmox-rs-perl and release it as 0.1.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-01 11:46:49 +01:00
Wolfgang Bumiller
ba8dad1190 add common-src/ and move CalendarEvent to it
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-01 10:54:15 +01:00