Problems compiling PBS v3.3.2

Lephisto

Well-Known Member
Jun 22, 2019
159
16
58
47
Hello,

since the thread patch that adresses this https://forum.proxmox.com/threads/low-zfs-read-performance-disk-tape.139494/ still didn't make it upstream I am forced to maintain my own patched Version of PBS, so I have to build my own debian packages. I usually take a clean bookworm vm for this and follow this: https://git.proxmox.com/?p=proxmox-backup.git;a=blob_plain;f=README.rst;hb=HEAD

Still I have to manually adjust some things because the patch at https://lists.proxmox.com/pipermail/pbs-devel/2024-April/009162.html doesn't apply cleanly anymore. However, when trying to "make deb" I get:

Code:
root@promox-build:~/proxmox-backup# make deb
rm -rf build
mkdir build
git rev-parse HEAD > build/.repoid
cp -a debian \
  Cargo.toml src \
  pbs-api-types pbs-buildcfg pbs-client pbs-datastore pbs-config pbs-key-config pbs-tools pbs-fuse-loop pbs-pxar-fuse pbs-tape proxmox-backup-banner proxmox-backup-client proxmox-file-restore proxmox-restore-daemon pxar-bin \
  docs etc examples tests www zsh-completions templates \
  defines.mk Makefile \
  ./build/
rm -f build/Cargo.lock
find build/debian -name "*.hint" -delete
make -C build/etc clean ;  make -C build/www clean ;  make -C build/docs clean ;  make -C build/templates clean ;
make[1]: Entering directory '/root/proxmox-backup/build/etc'
rm -f proxmox-backup-banner.service proxmox-backup-daily-update.service proxmox-backup.service proxmox-backup-proxy.service
make[1]: Leaving directory '/root/proxmox-backup/build/etc'
make[1]: Entering directory '/root/proxmox-backup/build/www'
find . -name '*~' -exec rm {} ';'
rm -rf js .lint-incremental
make[1]: Leaving directory '/root/proxmox-backup/build/www'
make[1]: Entering directory '/root/proxmox-backup/build/docs'
rm -r -f *~ *.1 output config/acl/roles.rst config/datastore/config.rst config/domains/config.rst config/media-pool/config.rst config/notifications-priv/config.rst config/notifications/config.rst config/remote/config.rst config/sync/config.rst config/tape-job/config.rst config/tape/config.rst config/user/config.rst config/verification/config.rst pmt/synopsis.rst pmtx/synopsis.rst proxmox-backup-client/catalog-shell-synopsis.rst proxmox-backup-client/synopsis.rst proxmox-backup-debug/synopsis.rst proxmox-backup-manager/synopsis.rst proxmox-file-restore/synopsis.rst proxmox-tape/synopsis.rst pxar/synopsis.rst  api-viewer/apidata.js
rm -f api-viewer/apidoc.js lto-barcode/lto-barcode-generator.js prune-simulator/prune-simulator.js
make[1]: Leaving directory '/root/proxmox-backup/build/docs'
make[1]: Entering directory '/root/proxmox-backup/build/templates'
make[1]: Nothing to be done for 'clean'.
make[1]: Leaving directory '/root/proxmox-backup/build/templates'
cd build; dpkg-buildpackage -b -us -uc
dpkg-buildpackage: info: source package rust-proxmox-backup
dpkg-buildpackage: info: source version 3.3.2-1
dpkg-buildpackage: info: source distribution bookworm
dpkg-buildpackage: info: source changed by Proxmox Support Team <support@proxmox.com>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
dpkg-checkbuilddeps: error: Unmet build dependencies: librust-proxmox-schema-3+api-macro-dev librust-proxmox-schema-3+default-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
make: *** [Makefile:123: deb] Error 3

Can somebody help me out? I am not a pro when it comes to rust and it's toolchains.
 
Last edited:
Hi Hannes,

yeah:

Code:
root@promox-build:~/proxmox-backup# apt-get build-dep .
Note, using directory '.' to get the build dependencies
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 builddeps:. : Depends: librust-proxmox-schema-3+api-macro-dev
               Depends: librust-proxmox-schema-3+default-dev
E: Unable to correct problems, you have held broken packages.
 
your git checkout is outdated, please pull..
 
Yeah well I am forced to checkout v3.3.2 because in the current master the patch won't apply at all because pbs-api-types is missing.

Code:
root@promox-build:~/proxmox-backup# patch -p1 <../pbs.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
|index 31767417a..2ad2ae063 100644
|--- a/pbs-api-types/src/datastore.rs
|+++ b/pbs-api-types/src/datastore.rs
--------------------------

really, without this patch LTO9 isn't usable with PBS, because its too slow.
 
then you need to manually downgrade all the dependencies to match the repo state you have. or port the patch forward to apply again
 
Yeah i tried that: checked out v3.3.2, then I get:

Code:
Preparing to unpack rust-proxmox-backup-build-deps_3.3.2-1_all.deb ...
Unpacking rust-proxmox-backup-build-deps (3.3.2-1) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies...Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) rust-proxmox-backup-build-deps:amd64 < 3.3.2-1 @iU K Nb Ib >
Broken rust-proxmox-backup-build-deps:amd64 Depends on librust-bitflags-2+default-dev:amd64 < none @un H > (>= 2.4-~~)
  Removing rust-proxmox-backup-build-deps:amd64 because I can't find librust-bitflags-2+default-dev:amd64
Done
 Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done

Somehow the build-deps package doesn't resolve anymore. How can I fix this?
 
you need to manually downgrade each build dependency it complains about ("apt install librust-XXX-dev=VERSION") and anything that might require to be downgraded in turn.

I am not sure what the current plans regarding that patch are - @dcsapak ?