Compare commits

11 Commits

Author SHA1 Message Date
8b352bc47d bump pmg-rs to 0.6.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-09 11:36:23 +02:00
79deb6532e bump pve-rs to 0.7.7
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-09 11:31:10 +02:00
6ad1d2d72b d/control fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-09 11:29:59 +02:00
0e09f40f29 update proxmox-apt dependency to 0.9.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-09 11:28:48 +02:00
522f90bfbc buildsys: add clean target for common package
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-09 11:28:48 +02:00
a32c2c8aa7 buildsys: cleanup and expand clean target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-09 11:28:48 +02:00
c37bb4e579 buildsys: add missing deb targets
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-09 11:28:48 +02:00
e10520d252 buildsys: backport common pkg buildsystem fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-09 11:28:48 +02:00
9d5bd4c093 buildsys: pmg-rs: dsc and sbuild updates
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-09 11:28:48 +02:00
6cf02f24d1 buildsys: make pve-rs sbuild compatible
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-09 11:28:48 +02:00
38441def60 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-06-09 11:28:48 +02:00
15 changed files with 187 additions and 182 deletions

View File

@ -1,45 +0,0 @@
[workspace]
exclude = [ "build", "common-src", "perl", "scripts" ]
members = [
"pve-rs",
"pmg-rs",
]
[workspace.package]
authors = ["Proxmox Support Team <support@proxmox.com>"]
edition = "2021"
license = "AGPL-3"
repository = "https://git.proxmox.com/?p=proxmox.git"
[workspace.dependencies]
anyhow = "1.0"
base32 = "0.4"
base64 = "0.13"
env_logger = "0.9"
hex = "0.4"
http = "0.2.7"
libc = "0.2"
nix = "0.26"
openssl = "0.10.40"
serde = "1.0"
serde_bytes = "0.11"
serde_json = "1.0"
url = "2"
perlmod = { version = "0.13", features = [ "exporter" ] }
proxmox-acme-rs = { version = "0.4", features = ["client"] }
proxmox-apt = "0.9"
proxmox-http = { version = "0.8", features = ["client-sync", "client-trait"] }
proxmox-openid = "0.9.8"
proxmox-resource-scheduling = "0.2.1"
proxmox-subscription = "0.3"
proxmox-sys = "0.4.2"
proxmox-tfa = { version = "4", features = ["api"] }
proxmox-time = "1.1.3"
[patch.crates-io]
# proxmox-tfa requires -time and -uuid as well, so enable *all* or *none* of them
#proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
#proxmox-time = { path = "../proxmox/proxmox-time" }
#proxmox-uuid = { path = "../proxmox/proxmox-uuid" }

View File

@ -2,19 +2,9 @@ CARGO ?= cargo
ifeq ($(BUILD_MODE), release) ifeq ($(BUILD_MODE), release)
CARGO_BUILD_ARGS += --release CARGO_BUILD_ARGS += --release
DEBUG_LIBPATH :=
else else
DEBUG_LIBPATH := "-L./target/debug",
endif endif
define upload_template
cd build; \
dcmd --deb lib$(1)-rs-perl*.changes \
| grep -v '.changes$$' \
| tar -cf "$@.tar" -T-; \
cat "$@.tar" | ssh -X repoman@repo.proxmox.com upload --product $(2) --dist bullseye
endef
.PHONY: all .PHONY: all
all: all:
ifeq ($(BUILD_TARGET), pve) ifeq ($(BUILD_TARGET), pve)
@ -27,10 +17,6 @@ else
@echo " - make pmg" @echo " - make pmg"
endif endif
.PHONY: pve pmg
pve pmg:
$(CARGO) build $(CARGO_BUILD_ARGS) -p $@-rs
build: build:
rm -rf build rm -rf build
mkdir build mkdir build
@ -47,30 +33,13 @@ build:
done done
# So the common packages end up in ./build, rather than ./build/common # So the common packages end up in ./build, rather than ./build/common
mv ./build/common/pkg ./build/common-pkg mv ./build/common/pkg ./build/common-pkg
# Copy the workspace root into the sources
pve-deb: build mkdir build/pve-rs/.workspace
cd ./build/pve-rs && dpkg-buildpackage -b -uc -us cp -t build/pve-rs/.workspace Cargo.toml
touch $@ sed -i -e '/\[package\]/a\workspace = ".workspace"' build/pve-rs/Cargo.toml
# Clear the member array and replace it with ".."
pmg-deb: build sed -i -e '/^members = \[/,/^]$$/d' build/pve-rs/.workspace/Cargo.toml
cd ./build/pmg-rs && dpkg-buildpackage -b -uc -us sed -i -e '/^\[workspace\]/a\members = [ ".." ]' build/pve-rs/.workspace/Cargo.toml
touch $@ # Copy the cargo config
mkdir build/pve-rs/.cargo
common-deb: build cp -t build/pve-rs/.cargo .cargo/config
cd ./build/common-pkg && dpkg-buildpackage -b -uc -us
touch $@
pve-upload: pve-deb
$(call upload_template,pve,pve)
pmg-upload: pmg-deb
$(call upload_template,pmg,pmg)
# need to put into variable to ensure comma isn't interpreted as param separator on call
common_target=pve,pmg
common-upload: common-deb
$(call upload_template,proxmox,$(common_target))
.PHONY: clean
clean:
cargo clean
rm -rf ./build ./PVE ./PMG ./pve-deb ./pmg-deb ./common-deb

View File

@ -1,4 +1,4 @@
include /usr/share/dpkg/default.mk include /usr/share/dpkg/pkg-info.mk
PACKAGE=libproxmox-rs-perl PACKAGE=libproxmox-rs-perl
@ -8,7 +8,9 @@ export GITVERSION:=$(shell git rev-parse HEAD)
PERL_INSTALLVENDORARCH != perl -MConfig -e 'print $$Config{installvendorarch};' PERL_INSTALLVENDORARCH != perl -MConfig -e 'print $$Config{installvendorarch};'
PERL_INSTALLVENDORLIB != perl -MConfig -e 'print $$Config{installvendorlib};' PERL_INSTALLVENDORLIB != perl -MConfig -e 'print $$Config{installvendorlib};'
DEB=${PACKAGE}_${DEB_VERSION}_${ARCH}.deb DEB=$(PACKAGE)_$(DEB_VERSION)_$(ARCH).deb
DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
DESTDIR= DESTDIR=
@ -34,8 +36,34 @@ install: Proxmox/RS/CalendarEvent.pm
find PVE \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';' find PVE \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';'
find Proxmox \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';' find Proxmox \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';'
$(BUILDDIR): debian PVE Proxmox Makefile
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp
cp -t $(BUILDDIR).tmp -a debian PVE Proxmox Makefile
mv $(BUILDDIR).tmp $(BUILDDIR)
.PHONY: deb .PHONY: deb
deb: $(DEB) deb: $(DEB)
$(DEB): build $(DEB): $(BUILDDIR)
cd build; dpkg-buildpackage -b -us -uc --no-pre-clean cd $(BUILDDIR); dpkg-buildpackage -b -us -uc --no-pre-clean
lintian $(DEBS) lintian $(DEB)
.PHONY: dsc
dsc: $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
lintian $(DSC)
sbuild: $(DSC)
sbuild $(DSC)
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEB)
# check if working directory is clean
git diff --exit-code --stat && git diff --exit-code --stat --staged
tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pve,pmg --dist $(DEB_DISTRIBUTION)
clean:
rm -f *.deb *.dsc *.tar.* *.build *.buildinfo *.changes
rm -rf $(PACKAGE)-[0-9]*/

View File

@ -3,6 +3,7 @@ Section: perl
Priority: optional Priority: optional
Build-Depends: Build-Depends:
debhelper (>= 12), debhelper (>= 12),
perlmod-bin,
Maintainer: Proxmox Support Team <support@proxmox.com> Maintainer: Proxmox Support Team <support@proxmox.com>
Standards-Version: 4.5.1 Standards-Version: 4.5.1
Vcs-Git: git://git.proxmox.com/git/proxmox-perl-rs.git Vcs-Git: git://git.proxmox.com/git/proxmox-perl-rs.git

View File

@ -1,11 +1,12 @@
[package] [package]
name = "pmg-rs" name = "pmg-rs"
version = "0.6.2" version = "0.6.3"
description = "PMG parts which have been ported to rust" description = "PMG parts which have been ported to rust"
authors.workspace = true homepage = "https://www.proxmox.com"
edition.workspace = true authors = ["Proxmox Support Team <support@proxmox.com>"]
license.workspace = true edition = "2021"
repository.workspace = true license = "AGPL-3"
repository = "https://git.proxmox.com/?p=proxmox.git"
exclude = [ exclude = [
"build", "build",
@ -17,24 +18,24 @@ exclude = [
crate-type = [ "cdylib" ] crate-type = [ "cdylib" ]
[dependencies] [dependencies]
anyhow.workspace = true anyhow = "1.0"
env_logger.workspace = true env_logger = "0.9"
hex.workspace = true hex = "0.4"
http.workspace = true http = "0.2.7"
libc.workspace = true libc = "0.2"
nix.workspace = true nix = "0.26"
openssl.workspace = true openssl = "0.10.40"
serde.workspace = true serde = "1.0"
serde_bytes.workspace = true serde_bytes = "0.11"
serde_json.workspace = true serde_json = "1.0"
url.workspace = true url = "2"
perlmod.workspace = true perlmod = { version = "0.13", features = [ "exporter" ] }
proxmox-acme-rs.workspace = true proxmox-acme-rs = { version = "0.4", features = ["client"] }
proxmox-apt.workspace = true proxmox-apt = "0.9.4"
proxmox-http.workspace = true proxmox-http = { version = "0.8", features = ["client-sync", "client-trait"] }
proxmox-subscription.workspace = true proxmox-subscription = "0.3"
proxmox-sys.workspace = true proxmox-sys = "0.4.2"
proxmox-tfa.workspace = true proxmox-tfa = { version = "4", features = ["api"] }
proxmox-time.workspace = true proxmox-time = "1.1.3"

View File

@ -1,4 +1,4 @@
include /usr/share/dpkg/default.mk include /usr/share/dpkg/pkg-info.mk
PACKAGE=libpmg-rs-perl PACKAGE=libpmg-rs-perl
@ -8,9 +8,11 @@ export GITVERSION:=$(shell git rev-parse HEAD)
PERL_INSTALLVENDORARCH != perl -MConfig -e 'print $$Config{installvendorarch};' PERL_INSTALLVENDORARCH != perl -MConfig -e 'print $$Config{installvendorarch};'
PERL_INSTALLVENDORLIB != perl -MConfig -e 'print $$Config{installvendorlib};' PERL_INSTALLVENDORLIB != perl -MConfig -e 'print $$Config{installvendorlib};'
MAIN_DEB=${PACKAGE}_${DEB_VERSION}_${ARCH}.deb MAIN_DEB=$(PACKAGE)_$(DEB_VERSION)_$(ARCH).deb
DBGSYM_DEB=${PACKAGE}-dbgsym_${DEB_VERSION}_${ARCH}.deb DBGSYM_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(ARCH).deb
DEBS=$(MAIN_DEB) $(DBGSYM_DEB) DEBS=$(MAIN_DEB) $(DBGSYM_DEB)
DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
DESTDIR= DESTDIR=
@ -36,37 +38,58 @@ else
TARGET_DIR=debug TARGET_DIR=debug
endif endif
all: all: PMG
ifneq ($(BUILD_MODE), skip)
cargo build $(CARGO_BUILD_ARGS) cargo build $(CARGO_BUILD_ARGS)
endif
PMG: Proxmox/Lib/PMG.pm PMG: Proxmox/Lib/PMG.pm
Proxmox/Lib/PMG.pm: Proxmox/Lib/PMG.pm:
$(PERLMOD_GENPACKAGE) $(PERLMOD_PACKAGES) $(PERLMOD_GENPACKAGE) $(PERLMOD_PACKAGES)
.PHONY: install .PHONY: install
install: ../target/release/libpmg_rs.so Proxmox/Lib/PMG.pm PMG install: target/release/libpmg_rs.so Proxmox/Lib/PMG.pm PMG
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto
install -m644 ../target/release/libpmg_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpmg_rs.so install -m644 target/release/libpmg_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpmg_rs.so
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB) install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib
install -m644 Proxmox/Lib/PMG.pm $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib/PMG.pm install -m644 Proxmox/Lib/PMG.pm $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib/PMG.pm
find $(PM_DIR) \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';' find $(PM_DIR) \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';'
distclean: clean distclean: clean
clean: clean:
cargo clean cargo clean
rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes Cargo.lock rm -f *.deb *.dsc *.tar.* *.build *.buildinfo *.changes Cargo.lock
find . -name '*~' -exec rm {} ';' rm -rf $(PACKAGE)-[0-9]*/
.PHONY: dinstall .PHONY: dinstall
dinstall: ${DEBS} dinstall: $(DEBS)
dpkg -i ${DEBS} dpkg -i $(DEBS)
.PHONY: upload .PHONY: upload
upload: ${DEBS} upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
# check if working directory is clean # check if working directory is clean
git diff --exit-code --stat && git diff --exit-code --stat --staged git diff --exit-code --stat && git diff --exit-code --stat --staged
tar cf - ${DEBS} | ssh -X repoman@repo.proxmox.com upload --product pmg --dist bullseye tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com upload --product pmg --dist $(DEB_DISTRIBUTION)
$(BUILDDIR): src debian common/src Cargo.toml Makefile .cargo/config
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp/common
cp -a -t $(BUILDDIR).tmp src debian Cargo.toml Makefile .cargo
cp -a -t $(BUILDDIR).tmp/common common/src
mv $(BUILDDIR).tmp $(BUILDDIR)
.PHONY: deb
deb: $(DEBS)
$(DEBS): $(BUILDDIR)
cd $(BUILDDIR); PATH="/usr/local/bin:/usr/bin" dpkg-buildpackage -b -us -uc
lintian $(DEBS)
.PHONY: dsc
dsc: $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); PATH="/usr/local/bin:/usr/bin" dpkg-buildpackage -S -us -uc -d
lintian $(DSC)
sbuild: $(DSC)
sbuild $(DSC)

View File

@ -1,3 +1,10 @@
libpmg-rs-perl (0.6.3) bullseye; urgency=medium
* build with proxmox-apt 0.9.4 to also detect repository with next suite as
configured
-- Proxmox Support Team <support@proxmox.com> Fri, 09 Jun 2023 11:36:12 +0200
libpmg-rs-perl (0.6.2) bullseye; urgency=medium libpmg-rs-perl (0.6.2) bullseye; urgency=medium
* update to proxmox-subscription 0.3 / proxmox-http 0.7 * update to proxmox-subscription 0.3 / proxmox-http 0.7

View File

@ -20,7 +20,7 @@ Build-Depends:
librust-perlmod-0.13+exporter-dev, librust-perlmod-0.13+exporter-dev,
librust-proxmox-acme-rs-0.4+client-dev, librust-proxmox-acme-rs-0.4+client-dev,
librust-proxmox-acme-rs-0.4+default-dev, librust-proxmox-acme-rs-0.4+default-dev,
librust-proxmox-apt-0.9+default-dev, librust-proxmox-apt-0.9+default-dev (>= 0.9.4-~~),
librust-proxmox-http-0.8+client-sync-dev, librust-proxmox-http-0.8+client-sync-dev,
librust-proxmox-http-0.8+client-trait-dev, librust-proxmox-http-0.8+client-trait-dev,
librust-proxmox-http-0.8+default-dev, librust-proxmox-http-0.8+default-dev,

5
pve-rs/.cargo/config Normal file
View File

@ -0,0 +1,5 @@
[source]
[source.debian-packages]
directory = "/usr/share/cargo/registry"
[source.crates-io]
replace-with = "debian-packages"

View File

@ -1,12 +1,12 @@
[package] [package]
name = "pve-rs" name = "pve-rs"
version = "0.7.6" version = "0.7.7"
description = "PVE parts which have been ported to Rust" description = "PVE parts which have been ported to Rust"
homepage = "https://www.proxmox.com" homepage = "https://www.proxmox.com"
authors.workspace = true authors = ["Proxmox Support Team <support@proxmox.com>"]
edition.workspace = true edition = "2021"
license.workspace = true license = "AGPL-3"
repository.workspace = true repository = "https://git.proxmox.com/?p=proxmox.git"
exclude = [ exclude = [
"debian", "debian",
@ -16,27 +16,27 @@ exclude = [
crate-type = [ "cdylib" ] crate-type = [ "cdylib" ]
[dependencies] [dependencies]
anyhow.workspace = true anyhow = "1.0"
base32.workspace = true base32 = "0.4"
base64.workspace = true base64 = "0.13"
env_logger.workspace = true env_logger = "0.9"
hex.workspace = true hex = "0.4"
http.workspace = true http = "0.2.7"
libc.workspace = true libc = "0.2"
nix.workspace = true nix = "0.26"
openssl.workspace = true openssl = "0.10.40"
serde.workspace = true serde = "1.0"
serde_bytes.workspace = true serde_bytes = "0.11"
serde_json.workspace = true serde_json = "1.0"
url.workspace = true url = "2"
perlmod.workspace = true perlmod = { version = "0.13", features = [ "exporter" ] }
proxmox-apt.workspace = true proxmox-apt = "0.9.4"
proxmox-http.workspace = true proxmox-http = { version = "0.8", features = ["client-sync", "client-trait"] }
proxmox-openid.workspace = true proxmox-openid = "0.9.8"
proxmox-resource-scheduling.workspace = true proxmox-resource-scheduling = "0.2.1"
proxmox-subscription.workspace = true proxmox-subscription = "0.3"
proxmox-sys.workspace = true proxmox-sys = "0.4.2"
proxmox-tfa.workspace = true proxmox-tfa = { version = "4", features = ["api"] }
proxmox-time.workspace = true proxmox-time = "1.1.3"

View File

@ -1,5 +1,4 @@
include /usr/share/dpkg/pkg-info.mk include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/default.mk
PACKAGE=libpve-rs-perl PACKAGE=libpve-rs-perl
export PERLMOD_PRODUCT=PVE export PERLMOD_PRODUCT=PVE
@ -10,10 +9,11 @@ export GITVERSION:=$(shell git rev-parse HEAD)
PERL_INSTALLVENDORARCH != perl -MConfig -e 'print $$Config{installvendorarch};' PERL_INSTALLVENDORARCH != perl -MConfig -e 'print $$Config{installvendorarch};'
PERL_INSTALLVENDORLIB != perl -MConfig -e 'print $$Config{installvendorlib};' PERL_INSTALLVENDORLIB != perl -MConfig -e 'print $$Config{installvendorlib};'
MAIN_DEB=${PACKAGE}_${DEB_VERSION}_${ARCH}.deb MAIN_DEB=$(PACKAGE)_$(DEB_VERSION)_$(ARCH).deb
DBGSYM_DEB=${PACKAGE}-dbgsym_${DEB_VERSION}_${ARCH}.deb DBGSYM_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(ARCH).deb
DEBS=$(MAIN_DEB) $(DBGSYM_DEB) DEBS=$(MAIN_DEB) $(DBGSYM_DEB)
DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
DESTDIR= DESTDIR=
@ -39,13 +39,11 @@ TARGET_DIR=debug
endif endif
all: PVE all: PVE
ifneq ($(BUILD_MODE), skip)
cargo build $(CARGO_BUILD_ARGS) cargo build $(CARGO_BUILD_ARGS)
mkdir -p test/Proxmox/Lib mkdir -p test/Proxmox/Lib
sed -r -e \ sed -r -e \
's@^sub libdirs.*$$@sub libdirs { return ("../target/$(TARGET_DIR)", "../../target/$(TARGET_DIR)"); }@' \ 's@^sub libdirs.*$$@sub libdirs { return ("./target/$(TARGET_DIR)", "./../target/$(TARGET_DIR)"); }@' \
Proxmox/Lib/PVE.pm >test/Proxmox/Lib/PVE.pm Proxmox/Lib/PVE.pm >test/Proxmox/Lib/PVE.pm
endif
PVE: Proxmox/Lib/PVE.pm PVE: Proxmox/Lib/PVE.pm
Proxmox/Lib/PVE.pm: Proxmox/Lib/PVE.pm:
@ -55,37 +53,49 @@ check: all
$(MAKE) -C test test $(MAKE) -C test test
.PHONY: install .PHONY: install
install: ../target/release/libpve_rs.so Proxmox/Lib/PVE.pm PVE install: target/release/libpve_rs.so Proxmox/Lib/PVE.pm PVE
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto
install -m644 ../target/release/libpve_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpve_rs.so install -m644 target/release/libpve_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpve_rs.so
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB) install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib
install -m644 Proxmox/Lib/PVE.pm $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib/PVE.pm install -m644 Proxmox/Lib/PVE.pm $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib/PVE.pm
find $(PM_DIR) \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';' find $(PM_DIR) \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';'
distclean: clean
clean: clean:
cargo clean cargo clean
rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes Cargo.lock rm -f *.deb *.dsc *.tar.* *.build *.buildinfo *.changes Cargo.lock
find . -name '*~' -exec rm {} ';' rm -rf $(PACKAGE)-[0-9]*/
.PHONY: dinstall .PHONY: dinstall
dinstall: ${DEBS} dinstall: $(DEBS)
dpkg -i ${DEBS} dpkg -i $(DEBS)
.PHONY: upload .PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: ${DEBS} upload: $(DEBS)
# check if working directory is clean # check if working directory is clean
git diff --exit-code --stat && git diff --exit-code --stat --staged git diff --exit-code --stat && git diff --exit-code --stat --staged
tar cf - ${DEBS} | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(DEB_DISTRIBUTION) tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(DEB_DISTRIBUTION)
$(BUILDDIR): src debian test common/src Cargo.toml Makefile .cargo/config
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp/common
cp -a -t $(BUILDDIR).tmp src debian test Cargo.toml Makefile .cargo
cp -a -t $(BUILDDIR).tmp/common common/src
mv $(BUILDDIR).tmp $(BUILDDIR)
.PHONY: deb
deb: $(DEBS)
$(DEBS): $(BUILDDIR)
cd $(BUILDDIR); PATH="/usr/local/bin:/usr/bin" dpkg-buildpackage -b -us -uc
lintian $(DEBS)
.PHONY: dsc .PHONY: dsc
dsc: ${DSC} dsc: $(DSC)
${DSC}: ${BUILDDIR} $(DSC): $(BUILDDIR)
cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d cd $(BUILDDIR); PATH="/usr/local/bin:/usr/bin" dpkg-buildpackage -S -us -uc -d
lintian ${DSC} lintian $(DSC)
sbuild: $(DSC) sbuild: $(DSC)
sbuild $(DSC) sbuild $(DSC)

View File

@ -1,3 +1,10 @@
libpve-rs-perl (0.7.7) bullseye; urgency=medium
* build with proxmox-apt 0.9.4 to also detect repository with next suite as
configured
-- Proxmox Support Team <support@proxmox.com> Fri, 09 Jun 2023 11:30:59 +0200
libpve-rs-perl (0.7.6) bullseye; urgency=medium libpve-rs-perl (0.7.6) bullseye; urgency=medium
* update to new tfa crate * update to new tfa crate

View File

@ -1 +0,0 @@
10

View File

@ -2,7 +2,7 @@ Source: libpve-rs-perl
Section: perl Section: perl
Priority: optional Priority: optional
Build-Depends: Build-Depends:
debhelper (>= 12), debhelper-compat (= 13),
dh-cargo (>= 24), dh-cargo (>= 24),
perlmod-bin, perlmod-bin,
cargo:native <!nocheck>, cargo:native <!nocheck>,
@ -19,7 +19,7 @@ Build-Depends:
librust-openssl-0.10+default-dev (>= 0.10.40-~~), librust-openssl-0.10+default-dev (>= 0.10.40-~~),
librust-perlmod-0.13+default-dev, librust-perlmod-0.13+default-dev,
librust-perlmod-0.13+exporter-dev, librust-perlmod-0.13+exporter-dev,
librust-proxmox-apt-0.9+default-dev, librust-proxmox-apt-0.9+default-dev (>= 0.9.4-~~),
librust-proxmox-http-0.8+client-sync-dev, librust-proxmox-http-0.8+client-sync-dev,
librust-proxmox-http-0.8+client-trait-dev, librust-proxmox-http-0.8+client-trait-dev,
librust-proxmox-http-0.8+default-dev, librust-proxmox-http-0.8+default-dev,