public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* Re: [pve-devel] Building proxmox on riscv64 Debian Sid
       [not found] <mailman.261.1676973980.376.pve-devel@lists.proxmox.com>
@ 2023-02-21 11:14 ` Wolfgang Bumiller
  2023-02-21 11:19 ` Fabian Grünbichler
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Bumiller @ 2023-02-21 11:14 UTC (permalink / raw)
  To: Proxmox VE development discussion
  Cc: Tianyu Chen, Zenithal, Proxmox Support Team, Fabian Grünbichler

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 :-)
@Fabian?
(Why would we even have it test the host version :S)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] Building proxmox on riscv64 Debian Sid
       [not found] <mailman.261.1676973980.376.pve-devel@lists.proxmox.com>
  2023-02-21 11:14 ` [pve-devel] Building proxmox on riscv64 Debian Sid Wolfgang Bumiller
@ 2023-02-21 11:19 ` Fabian Grünbichler
  1 sibling, 0 replies; 5+ messages in thread
From: Fabian Grünbichler @ 2023-02-21 11:19 UTC (permalink / raw)
  To: Proxmox VE development discussion; +Cc: Tianyu Chen, Zenithal

> Tianyu Chen via pve-devel <pve-devel@lists.proxmox.com> hat am 21.02.2023 07:29 CET geschrieben:
> Hi all,
> 
> I'm trying to build proxmox on riscv64 Debian Sid, and I'm having some
> questions when building.

out of interest - when you say "proxmox", you mean Proxmox VE? on what hardware and for what use case are you trying to port it?

> 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?

1. our git repositories are hosted on git.proxmox.com (the Github org is just an unofficial mirror)
2. our repos target bullseye
3. as always, when a new Debian stable release is approaching we will also target that for our new stable release(s), and once we are done, publish the resulting repositories

unless you have very little time left to wait before proceeding, you will likely have considerable less work (other than rebuilding packages for riscv64) if you wait for our bookworm-targeting branches/repos to become available.
 
> 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?

the corresponding repository is at https://git.proxmox.com/?p=debcargo-conf.git;a=summary (it's a fork of the Debian rust team's debcargo-conf repository with some additional crates and lots of backports for bullseye)

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

in the proxmox workspace you can build them in the order required by their individual build dependencies
 
> 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?

it's used for repository configuration and update querying (e.g., by pve-manager via proxmox-perl-rs).




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] Building proxmox on riscv64 Debian Sid
@ 2023-02-27  7:36 Fabian Grünbichler
  0 siblings, 0 replies; 5+ messages in thread
From: Fabian Grünbichler @ 2023-02-27  7:36 UTC (permalink / raw)
  To: Tianyu Chen; +Cc: Proxmox VE development discussion, Zenithal

> Tianyu Chen <billchenchina2001@gmail.com> hat am 25.02.2023 13:13 CET geschrieben:
> 
>  
> Hi Fabian,
> 
> On Tue, Feb 21, 2023 at 12:19:39PM +0100, Fabian Grünbichler wrote:
> > 1. our git repositories are hosted on git.proxmox.com (the Github org is just an unofficial mirror)
> 
> I'm curious where is proxmox-rs hosted? I'm afraid i cannot find it on
> git.proxmox.com.

https://git.proxmox.com/?p=proxmox.git;a=tree (seems the GH mirror is out of sync?)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] Building proxmox on riscv64 Debian Sid
@ 2023-02-21 14:37 Fabian Grünbichler
  0 siblings, 0 replies; 5+ messages in thread
From: Fabian Grünbichler @ 2023-02-21 14:37 UTC (permalink / raw)
  To: Tianyu Chen; +Cc: Proxmox VE development discussion, Zenithal

> Tianyu Chen <billchenchina2001@gmail.com> hat am 21.02.2023 14:11 CET geschrieben:
> On Tue, Feb 21, 2023 at 12:19:39PM +0100, Fabian Grünbichler wrote:
> > unless you have very little time left to wait before proceeding, you will likely have considerable less work (other than rebuilding packages for riscv64) if you wait for our bookworm-targeting branches/repos to become available.
> 
> As previous e-mail, I'm wondering when will the bookworm tree be
> available?

the usual answer is "when it's done" ;) we don't want to fork too early, as that increases the amount of work we have to do. I'll try to remember to ping this thread once our bookworm packages are available as preview.

but like Wolfgang said - there are two crates that have an incompatible version in bookworm:
- zstd (and zstd-safe and zstd-sys), the patch for that is fairly mechanical
- syslog (could be backported to the bullseye-based releases)

and a few crates that are not in bookworm or too old, as well as the proxmox-apt change for also accepting Bookworm or skipping that test.

> > the corresponding repository is at https://git.proxmox.com/?p=debcargo-conf.git;a=summary (it's a fork of the Debian rust team's debcargo-conf repository with some additional crates and lots of backports for bullseye)
> 
> Gotcha.
> 
> > in the proxmox workspace you can build them in the order required by their individual build dependencies
> 
> Okay, seems porting to a new architecture doesn't have that.

well, you have to sort out the actual ordering yourself (I just meant that the build-dependencies should be correct and you can use them for ordering the builds) - not sure what tooling you use ;) e.g., debian uses wanna-build for that, we mostly do it by hand since we only (re-)bootstrap every ~2 years when a new Debian stable release is approaching..

hope that helps!




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] Building proxmox on riscv64 Debian Sid
@ 2023-02-21 14:32 Fabian Grünbichler
  0 siblings, 0 replies; 5+ messages in thread
From: Fabian Grünbichler @ 2023-02-21 14:32 UTC (permalink / raw)
  To: Tianyu Chen, Wolfgang Bumiller
  Cc: Proxmox VE development discussion, Zenithal

> Tianyu Chen <billchenchina2001@gmail.com> hat am 21.02.2023 13:53 CET geschrieben:
> On Tue, Feb 21, 2023 at 12:14:04PM +0100, Wolfgang Bumiller wrote:
> 
> > 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 ;-)
> 
> Haha dpkg-deb --extract is a nice trick! I've done it before for some
> packages. debcargo use `Architecture: any` for librust-*-dev files but I
> believe they could be installed for `all`.

there's actually a reason for that - having librust-*-dev as arch:any is required for cross-compiling/multi-arch support (not something we do (yet) in Proxmox, but relevant for Debian), where arch:all would pull in non-rust transitive build dependencies from the wrong arch.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-27  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.261.1676973980.376.pve-devel@lists.proxmox.com>
2023-02-21 11:14 ` [pve-devel] Building proxmox on riscv64 Debian Sid Wolfgang Bumiller
2023-02-21 11:19 ` Fabian Grünbichler
2023-02-21 14:32 Fabian Grünbichler
2023-02-21 14:37 Fabian Grünbichler
2023-02-27  7:36 Fabian Grünbichler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal