[pve-devel] Building proxmox on riscv64 Debian Sid

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Feb 21 12:14:04 CET 2023

On Tue, Feb 21, 2023 at 02:29:22PM +0800, Tianyu Chen via pve-devel wrote:
> Hi all,
> I'm trying to build proxmox on riscv64 Debian Sid, and I'm having some
> questions when building.

Very nice. As a side note: the next pve-container release will recognize
riscv32/64 architectures (and therefore also work via qemu-static to run
riscv contaienrs on amd64 hosts via binfmt_misc).
(Personally, I do intend to give a fully bootstrapped PVE a spin on a
vision five 2 at some point, but can't commit to any timeline there
atm., but it'll have to be bookworm, not bullseye, and as you already
figured out, getting there is a bit more involved now with the rust
crate version dependencies ;-))

> 1. When I'm building proxmox-rs, the dependencies are incorrect. I
> fetched proxmox-rs source code from
> https://github.com/proxmox/proxmox-rs.git and it shows that most
> dependencies are targeting bullseye, not Sid. I've tried editing
> Cargo.toml and some of them worked. Is there a actively developing
> branch targeting Sid? Or is there a schedule against testing(bookworm)
> so I can schedule the porting?

The rust crate situation is a *little* bit annoying due the version
differences. Some, like zstd, require tiny modifications (unfortunately
in a way that supporting both versions in the same code base would
require an annoying build script :-S). Some just work because we don't
use the affected APIs.
I don't think there are any *major* changes required, but I'm not sure.
@Fabian did some initial/test-bootstrapping for bookworm and might
remember more?

But for now there's unfortunately nothing targeting anything past
bullseye in the repos as it would just require merging/rebasing without
there being an actual release for it yet.

> 2. Missing dependencies. I've found that proxmox have packed some
> librust-*-dev packages out of tree. (I mean, Debian tree). Since
> librust-*-dev packages are with `Architecture: amd64` (from
> http://download.proxmox.com/debian/devel/dists/bullseye/main/binary-amd64/),
> I cannot install the proxmox version. Since there's no dsc file in the
> pool, Can I assume proxmox only did debcargo things, without any patch?

You can find a `debcargo-conf.git` with a `proxmox/bullseye` branch on
git.proxmox.com which is the source of all the librust- packages we
packaged separately.
You can build from that, or, since they're actually source-only
packages, you could fixup the architecture on the deb files from our
bullseye repo directly (dpkg-deb --extract, sed, dpkg-deb --build) and
use it that way ;-)

> 3. Also proxmox-rs, can I build subprojects by built-dependency order
> since I don't have them in my pool?

There's no automatic ordering in the build system right now.

> 4. proxmox-apt. The package proxmox-apt shows that DebianCodename only
> support stable versions, not Sid. test_get_current_release_codename
> failed since codename != DebianCodename::Bullseye. I'm wondering where
> are these piece of code used? Is there any unexpected behavior with Sid?

Hmm, I don't actually know :-)
(Why would we even have it test the host version :S)

More information about the pve-devel mailing list