2022-03-06 14:28:39 +03:00
%global _unpackaged_files_terminate_build 1
2024-02-28 20:26:16 +03:00
%def_without check
2022-03-06 14:28:39 +03:00
Name : proxmox-perl-rs
2024-09-09 18:51:44 +03:00
Version : 0.3.4
2024-10-31 13:21:55 +03:00
Release : alt2
2022-03-06 14:28:39 +03:00
Summary : PVE and PMG common parts which have been ported to Rust
License : AGPL-3.0+
Group : Development/Other
URL : https://www.proxmox.com
Vcs: git://git.proxmox.com/git/proxmox-perl-rs.git
Source : %name-%version.tar
Patch : %name-%version.patch
2024-09-06 01:57:56 +03:00
Patch1 : 0001-ALT-set-correct-context-not-None.patch
2024-02-28 20:26:16 +03:00
Source1 : genpackage.pl
2022-03-06 14:28:39 +03:00
ExclusiveArch : x86_64 aarch64
BuildRequires(pre): rpm-macros-rust
BuildRequires : rpm-build-rust clang-devel perl-devel
BuildRequires : libssl-devel libacl-devel libuuid-devel
2024-09-06 01:57:56 +03:00
BuildRequires : cargo-vendor-checksum
2024-10-28 18:38:46 +03:00
BuildRequires : build-essential libapt-devel
2022-03-06 14:28:39 +03:00
BuildRequires : /proc
2022-05-06 18:43:46 +03:00
%set_perl_req_method relaxed
2022-03-06 14:28:39 +03:00
%description
Contains the perl side of modules provided by the libraries of both
libpve-rs-perl and libpmg-rs-perl, loading whichever is available.
%package -n libproxmox-rs-perl
Summary : PVE/PMG common parts which have been ported to Rust
2024-09-09 18:51:44 +03:00
Version : 0.3.4
2022-03-06 14:28:39 +03:00
Group : Development/Other
Provides : proxmox-perl-rs = %EVR
Provides : proxmox-rs-perl = %EVR
%description -n libproxmox-rs-perl
%summary
%package -n libpve-rs-perl
Summary : PVE parts which have been ported to Rust
2024-09-09 18:51:44 +03:00
Version : 0.8.10
2022-03-06 14:28:39 +03:00
Group : Development/Other
Provides : pve-perl-rs = %EVR
Provides : pve-rs-perl = %EVR
%description -n libpve-rs-perl
%summary
%package -n libpmg-rs-perl
Summary : Components of Proxmox Mail Gateway which have been ported to Rust
2024-09-09 18:51:44 +03:00
Version : 0.7.6
2022-03-06 14:28:39 +03:00
Group : Development/Other
Provides : pmg-perl-rs = %EVR
Provides : pmg-rs-perl = %EVR
%description -n libpmg-rs-perl
%summary
%prep
%setup
%patch -p1
2024-09-06 01:57:56 +03:00
%patch1 -p1
pushd pve-rs
sed -i 's/PL_use_safe_putenv = on ? TRUE : FALSE;//' vendor/perlmod/src/glue.c
cargo-vendor-checksum --vendor vendor -f perlmod/src/glue.c
%ifarch aarch64
sed -i 's/mut i8/mut u8/' vendor/proxmox-sys/src/fs/dir.rs
# Checksum update for patched files
cargo-vendor-checksum --vendor vendor -f proxmox-sys/src/fs/dir.rs
%endif
cargo-vendor-checksum --vendor vendor -f proxmox-notify/src/context/mod.rs
popd
2022-03-06 14:28:39 +03:00
%build
export BUILD_MODE=release
export PERLMOD_WRITE_PACKAGES=1
2024-02-28 20:26:16 +03:00
export BUILD_TARGET=pve
export RUSTFLAGS=" - L / u s r / l i b 6 4 / p e r l 5 / C O R E - l p e r l "
cp %SOURCE1 common/pkg/
cp %SOURCE1 pmg-rs/
cp %SOURCE1 pve-rs/
sed -i 's|/usr/lib/perlmod/genpackage.pl|./genpackage.pl|' common/pkg/Makefile pmg-rs/Makefile pve-rs/Makefile
# Build only in pve-rs:
pushd pve-rs
%make
2024-04-03 13:46:51 +03:00
popd
pushd common/pkg
%make
popd
2022-03-06 14:28:39 +03:00
%install
2024-02-28 20:26:16 +03:00
pushd pve-rs
2022-03-06 14:28:39 +03:00
install -pD -m0644 target/release/libpve_rs.so %buildroot%perl_vendor_autolib/libpve_rs.so
2024-10-31 15:06:25 +03:00
mkdir -p %buildroot%perl_vendor_privlib/{PVE/RS/ResourceScheduling,PVE/RS/APT,Proxmox/Lib,Proxmox/RS,Proxmox/RS/APT}
2022-03-06 14:28:39 +03:00
install -m0644 PVE/RS/*.pm %buildroot%perl_vendor_privlib/PVE/RS/
2023-03-17 21:04:34 +03:00
install -m0644 PVE/RS/ResourceScheduling/*.pm %buildroot%perl_vendor_privlib/PVE/RS/ResourceScheduling/
2024-10-31 15:06:25 +03:00
install -m0644 PVE/RS/APT/*.pm %buildroot%perl_vendor_privlib/PVE/RS/APT/
2022-05-06 01:16:19 +03:00
install -m0644 common/pkg/PVE/RS/*.pm %buildroot%perl_vendor_privlib/PVE/RS/
install -m0644 Proxmox/RS/*.pm %buildroot%perl_vendor_privlib/Proxmox/RS/
2024-10-31 15:06:25 +03:00
install -m0644 Proxmox/RS/APT/*.pm %buildroot%perl_vendor_privlib/Proxmox/RS/APT
2024-02-28 20:26:16 +03:00
install -m0644 common/pkg/Proxmox/Lib/Common.pm Proxmox/Lib/PVE.pm %buildroot%perl_vendor_privlib/Proxmox/Lib/
%check
pushd pve-rs
LD_LIBRARY_PATH='$LD_LIBRARY_PATH:../target/release' make check
2022-03-06 14:28:39 +03:00
%files -n libpve-rs-perl
%perl_vendor_autolib/libpve_rs.so
%dir %perl_vendor_privlib/PVE/RS
2023-03-17 21:04:34 +03:00
%dir %perl_vendor_privlib/PVE/RS/ResourceScheduling
2024-10-31 15:06:25 +03:00
%dir %perl_vendor_privlib/PVE/RS/APT
2022-03-06 14:28:39 +03:00
%perl_vendor_privlib/PVE/RS/*.pm
2023-03-17 21:04:34 +03:00
%perl_vendor_privlib/PVE/RS/ResourceScheduling/*.pm
2024-10-31 15:06:25 +03:00
%perl_vendor_privlib/PVE/RS/APT/*.pm
2022-03-06 14:28:39 +03:00
2022-05-06 01:16:19 +03:00
%files -n libproxmox-rs-perl
%dir %perl_vendor_privlib/Proxmox/RS
2024-10-31 15:06:25 +03:00
%dir %perl_vendor_privlib/Proxmox/RS/APT
2022-05-06 01:16:19 +03:00
%perl_vendor_privlib/Proxmox/RS/*
2024-10-31 15:06:25 +03:00
%perl_vendor_privlib/Proxmox/RS/APT/*
2022-05-06 01:16:19 +03:00
%dir %perl_vendor_privlib/Proxmox/Lib
%perl_vendor_privlib/Proxmox/Lib/*
2022-03-06 14:28:39 +03:00
%changelog
2024-09-09 18:51:44 +03:00
* Mon Sep 09 2024 Alexander Burmatov <thatman@altlinux.org> 0.3.4-alt1
- Update:
+ libproxmox-rs-perl 0.3.4
+ libpve-rs-perl 0.8.10
2024-09-06 01:57:56 +03:00
* Fri Sep 06 2024 Alexander Burmatov <thatman@altlinux.org> 0.3.3-alt3
- some notifications fixes (thx andy@)
- Update:
+ libpve-rs-perl 0.8.9
2024-04-03 13:46:51 +03:00
* Wed Apr 03 2024 Andrew A. Vasilyev <andy@altlinux.org> 0.3.3-alt2
- update cargo vendor
2024-02-28 20:26:16 +03:00
* Thu Feb 22 2024 Andrew A. Vasilyev <andy@altlinux.org> 0.3.3-alt1
- Update:
+ libproxmox-rs-perl 0.3.3
+ libpve-rs-perl 0.8.8
- new building scheme
2023-11-07 22:24:28 +03:00
* Tue Nov 07 2023 Andrew A. Vasilyev <andy@altlinux.org> 0.2.1-alt3
- libpve-rs-perl: add linking with libperl (Closes: #48330)
2023-03-17 21:04:34 +03:00
* Fri Mar 17 2023 Alexey Shabalin <shaba@altlinux.org> 0.2.1-alt2
- Update libpve-rs-perl 0.7.3
2022-10-03 17:15:57 +03:00
* Mon Oct 03 2022 Alexey Shabalin <shaba@altlinux.org> 0.2.1-alt1
- Update:
+ libproxmox-rs-perl 0.2.1
+ libpve-rs-perl 0.7.2
2022-05-06 18:43:46 +03:00
* Fri May 06 2022 Andrew A. Vasilyev <andy@altlinux.org> 0.1.0-alt1.2
- add %%set_perl_req_method relaxed
2022-05-06 01:16:19 +03:00
* Fri May 06 2022 Alexey Shabalin <shaba@altlinux.org> 0.1.0-alt1.1
- Update libpve-rs-perl.
2022-03-06 14:28:39 +03:00
* Sun Mar 06 2022 Alexey Shabalin <shaba@altlinux.org> 0.1.0-alt1
- initial build.