Commit Graph

269 Commits

Author SHA1 Message Date
Wolfgang Bumiller
d34865bc55 bump perlmod-macro to 0.9.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-04-03 15:16:54 +02:00
Wolfgang Bumiller
d4dd49a2a3 macro: use alternate error representation for context
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-04-01 11:45:01 +02:00
Wolfgang Bumiller
0a6b18f4b1 update to edition 2024
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-03-17 11:04:08 +01:00
Wolfgang Bumiller
d7a1add485 macro: wrap xs calls in std::panic::catch_unwind
This causes panics to "croak" in perl, rather than aborting the entire
process.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-03-17 10:26:48 +01:00
Wolfgang Bumiller
95d8d56b0a perlmod: build.rs: rerun-if-changed=src/glue.c
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-03-17 10:13:48 +01:00
Wolfgang Bumiller
ba9864d3b9 perlmod: update d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-02-06 17:32:23 +01:00
Wolfgang Bumiller
e9f516161b bump perlmod-bin to 0.2.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-02-06 17:31:36 +01:00
Wolfgang Bumiller
aed250cd08 perlmod-bin: genpackage: better help output formatting
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-02-06 17:31:30 +01:00
Wolfgang Bumiller
1544fc13d7 bump perlmod to 0.13.6-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-02-06 17:28:42 +01:00
Wolfgang Bumiller
7cb965bdb7 perlmod-bin: option to just --list-from-notes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-02-06 17:27:50 +01:00
Wolfgang Bumiller
73fdaa816d Fix ELF note alignment
The individual entries should be 4-byte aligned.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-02-06 17:19:35 +01:00
Wolfgang Bumiller
2c5f34aee0 bump perlmod-bin to 0.2.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-16 13:46:10 +01:00
Wolfgang Bumiller
717da0f5cb bump perlmod to 0.13.5-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-16 13:38:55 +01:00
Wolfgang Bumiller
3420df88a8 bump perlmod-macro to 0.9.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-16 13:38:18 +01:00
Wolfgang Bumiller
057f71a473 macro: create .notes.perlmod.package section in libraries
So all the macro-supported packages can be listed in the ELF file.
This way all the available packages in a library can be viewed with
`readelf -W -n libfoo.so`. In the future we can also embed metadata in
there.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-16 10:45:13 +01:00
Wolfgang Bumiller
ca64bc9fdf clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 13:52:21 +01:00
Wolfgang Bumiller
9c7a42379a elide lifetimes in serializer
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 13:48:12 +01:00
Wolfgang Bumiller
476bd7af6b update tests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-14 16:50:28 +01:00
Wolfgang Bumiller
f5adbcf1aa fix enum serialization
For tuple variants we built the hash but discarded it and returned the
inner array instead.

For newtype variants we returned the raw hash instead of a reference
to it.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-14 16:50:22 +01:00
Wolfgang Bumiller
3ddf67eb04 doc fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-30 15:51:31 +02:00
Wolfgang Bumiller
1adcd9727e clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-30 15:46:55 +02:00
Wolfgang Bumiller
5e2a30e18c cargo fmt
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-30 15:42:33 +02:00
Wolfgang Bumiller
c2c6d6572b macro: comment out unused field
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-30 15:42:27 +02:00
Wolfgang Bumiller
3b56a68df4 perlmod: add missing drop handler for RawGuard
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-30 15:42:06 +02:00
Wolfgang Bumiller
1624184105 perlmod, macro: add add perlmod=multiplicity as expected lint
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-30 15:36:42 +02:00
Fabian Grünbichler
d017a02e0b move .cargo/config to .cargo/config.toml
the old location has been deprecated for a while, and rustc 1.78 will start to warn about it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-20 12:25:49 +02:00
Wolfgang Bumiller
f95893f1bc document errno and serializ_error in the #[export] doc
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-05-28 11:08:13 +02:00
Wolfgang Bumiller
754682961f macro: unraw() function names
so we can name an exported sub 'r#type'

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-14 13:46:13 +01:00
Wolfgang Bumiller
88d7d3b742 bump perlmod-bin to 0.2.0-3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-02 14:15:01 +01:00
Wolfgang Bumiller
ff16830506 perlmod-bin: fix generated libfile invocation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-02 14:13:34 +01:00
Wolfgang Bumiller
55418e22f6 bump perlmod-macro to 0.8.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-19 08:42:02 +01:00
Wolfgang Bumiller
95e8123f5b perlmod: search LD_LIBRARY_PATH before @INC/auto dirs
This is for the code generated for `#[package(write = true)]`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-19 08:38:41 +01:00
Wolfgang Bumiller
766889a98c bump perlmod-bin to 0.2.0-2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 10:38:45 +01:00
Wolfgang Bumiller
760f47bdd5 perlmod-bin: actually use 'libfile'
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 10:36:49 +01:00
Wolfgang Bumiller
71fe7e0e29 upload command pattern fixup
perlmod-bin is not prefixed with `rust-`

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 10:31:38 +01:00
Wolfgang Bumiller
b6e8fced0c bump perlmod-bin to 0.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 09:46:03 +01:00
Wolfgang Bumiller
c05806d1d8 genpackage: add --include-file option to add extra code
We'll use this to inject a 'use SslProbe.pm;' in pve and pmg to avoid
openssl-probe manipulating environment variables.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 09:43:21 +01:00
Wolfgang Bumiller
c6d49a8cde genpackage: change library loading
Replace the 'libdirs()' function with a 'libfile()' function.
To text a fixed file, we should only place that one file in there in
test suites.

Additionally, search LD_LIBRARY_PATH before the auto-dirs, which
should make custom testing via the command line easier as well.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 09:26:47 +01:00
Wolfgang Bumiller
fa7d62bf37 genpackage: make 'init()' optional
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 09:26:33 +01:00
Wolfgang Bumiller
8591b61ea4 genpackage: use strict and warnings
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 09:26:14 +01:00
Wolfgang Bumiller
24b9a0c268 bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-03 13:29:37 +01:00
Wolfgang Bumiller
677cb08446 bump perlmod to 0.13.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-10-06 09:05:13 +02:00
Wolfgang Bumiller
d2b6ea3f12 test: expose setenv, unsetenv and use_safe_putenv
mostly for local leak testing with valgrind

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-10-05 13:39:16 +02:00
Wolfgang Bumiller
e780222ea7 add ffi::use_safe_putenv and glue for it
This causes changes to environment variables to leak instead of crash,
which is arguably better. This will be removed (and fixed) in perl
5.38.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-10-05 13:39:16 +02:00
Wolfgang Bumiller
b425032d53 buildsys: explicitly resolver 2
to shut up a warning

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-10-05 13:39:16 +02:00
Fabian Grünbichler
fd5490e460 build: update upload target
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-03 10:01:57 +02:00
Fabian Grünbichler
0d64d1093e perlmod-macro: bump to 0.8.3 2023-10-03 08:36:28 +02:00
Wolfgang Bumiller
cb86559d13 update to syn-2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-10-02 13:31:09 +02:00
Wolfgang Bumiller
b32c4fd40a bump perlmod to 0.13.3-1 and perlmod-macro to 0.8.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-26 09:59:42 +02:00
Wolfgang Bumiller
4600b0779f macro: move 'boot' call into the 'Once' section
This also means boot function call chains must not cause circular
dependencies at all without a way to mitigate this in code. If this
should ever be a problem, we can move it out again, but this should
rather not be necessary.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-26 09:58:01 +02:00