From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ayufan@ayufan.eu>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 8DC6869FB5
 for <pve-devel@lists.proxmox.com>; Tue,  8 Dec 2020 11:20:38 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 729942DB93
 for <pve-devel@lists.proxmox.com>; Tue,  8 Dec 2020 11:20:08 +0100 (CET)
Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com
 [IPv6:2607:f8b0:4864:20::731])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 67C0D2DB7D
 for <pve-devel@lists.proxmox.com>; Tue,  8 Dec 2020 11:20:06 +0100 (CET)
Received: by mail-qk1-x731.google.com with SMTP id q22so15465476qkq.6
 for <pve-devel@lists.proxmox.com>; Tue, 08 Dec 2020 02:20:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=ayufan-eu.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=aooCsC5HGeR+LDeTuOIzHMKQrXrJCMsoXWTPovkEeFw=;
 b=GjPjeRFeZ0VINV55ocl5sMeBzCOW7wQ2dLuZ+tjvqnnozKE4cXBF+eCyccTroL3n1i
 832fNSG8jQH37Vz83uMJZYaqa32zot/XJJ+cw1tbP3HztCF98FwtJRV6dbqVk3dbfpc/
 NJQ9Sdmbs5emvZnjQjJJG6W5gpv5mA7YRL6s3nSBKVAXdV6rScNmbw7gF/tFRx8WqVe3
 LX+VNuYWKEFfSW1oFUnkIzWqp80FSAjUsuMkBkVmVaaJDIEVTKjggLC/VuAeai+QBbvG
 7Xaq0q6wLtfe41L4Y4Gu2jwJuKZWztXUF5BCgdx2QMXKefvQOEpsFRKYIcAayGUZ4S+U
 //+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=aooCsC5HGeR+LDeTuOIzHMKQrXrJCMsoXWTPovkEeFw=;
 b=mMWdfmyi3zZ/RDOtdVSXuo9GcAOq1GNNrO2Kks8ih9dcoPl2I3JgY9CQWC3zMzDbjP
 Azq22tC27zyoqmRCLSOI7C6wc4rtrz24pMES4HSPem31SByBVj14zSlW2BCfsxNhnN65
 kRqDDr5JrerFbSSdm2tFqk/hGmjm5bwRDnyItSqm7879NGKvWSJMNQaUO79fa+oTfStG
 9Xk/7caRgUvs0r+uYQm+rluounZ0RQiKYjoxAb0a6QzQMZs7j2YpfO1oDHDfpfqx023g
 G2npwDPAcTuEJLNQKG6G2Ceit/A0G7apl+hR66TqBTQSNEEaHDzJRWznvycp8Hp4iEfT
 UhnA==
X-Gm-Message-State: AOAM53319mUbRBoUcqlUSPw7LfDGuxq7yTetkYJDU/MVefnM04ai1p9i
 OTEqwnCZlNG+DhljJzz5fVYes6u8T8OrZG3DV6I0vvSEQFfw5A==
X-Google-Smtp-Source: ABdhPJxR1PmxK5b+b2Hd2hPUYoMQZCD497L1L/XRzODcmFbI9cxAaVl0ECB9mmbbczV1eeNsmJTOcC4jWpk7JwoXASc=
X-Received: by 2002:a37:490a:: with SMTP id w10mr21247139qka.487.1607422798678; 
 Tue, 08 Dec 2020 02:19:58 -0800 (PST)
MIME-Version: 1.0
References: <CAJ-Uffn1eVivrsxHxVJJjoUp-gJue0BHZ9coYACTssQBaoK+vQ@mail.gmail.com>
 <CAJ-Uffk_gWE9yqFQBn8WzRKf93hu_GtHoraoBj_gLDQNLKTqSw@mail.gmail.com>
 <1607327433.kteohg3dea.astroid@nora.none>
 <CAJ-UffmsnNEn57M1rGYco5Dqsrwa1GzAW6z=b_ZWbFje-sjphw@mail.gmail.com>
In-Reply-To: <CAJ-UffmsnNEn57M1rGYco5Dqsrwa1GzAW6z=b_ZWbFje-sjphw@mail.gmail.com>
From: =?UTF-8?Q?Kamil_Trzci=C5=84ski?= <ayufan@ayufan.eu>
Date: Tue, 8 Dec 2020 11:19:47 +0100
Message-ID: <CAJ-Uff=gK7WbSQJCZoAEQXVqFT_KJ6ySzB+hN-T5cx_HVjM4iQ@mail.gmail.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.083 Adjusted score from AWL reputation of From: address
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 HTML_MESSAGE            0.001 HTML included in message
 KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years
 RCVD_IN_DNSWL_NONE     -0.0001 Sender listed at https://www.dnswl.org/,
 no trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_NONE                0.001 SPF: sender does not publish an SPF Record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [crates.io, proxmox.com, docker.com]
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
Subject: Re: [pve-devel] Compiling PBS on arm64
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Tue, 08 Dec 2020 10:20:38 -0000

OK. If anyone is interested, a little hacky, but works:

1. I was able to compile (after minor patching) without having to rebuild
the whole dependency tree
    as required by Debian, instead using `crates.io`. It builds on a Debian
Bullseye as it was simpler
    and required basically no backports

2. I did use stock `debcargo`, but had to include patches to add `debian/*`
files in some cases.
    This is suboptimal, but it was the fastest way to have something
working. Ideally a mentioned `debcargo`
    should be used to create this glue between Rust and Debian

3. It compiled a minimal PBS for `amd64` and `arm64v8`. `amd64` compiled
natively, where for
    compiling `arm64v8` I used `qemu-user`. It took a few hours for this to
finish

4. It builds a very simple Docker image that can be easily run via
docker-compose. I was successful
    running a bunch of backups from my Home PC to my NAS running on
RockPro64 (ARM64)

5. All details and precompiled images are here:

    - https://github.com/ayufan/pve-backup-server-dockerfiles
    - https://hub.docker.com/repository/docker/ayufan/proxmox-backup-server

6. I plan to occasionally update it to the newer version and use it
personally for backuping my personal PVE



On Mon, Dec 7, 2020 at 1:42 PM Kamil Trzci=C5=84ski <ayufan@ayufan.eu> wrot=
e:

> Thank you Fabian :)
>
> I was looking for just that.
>
> I was able to remove `.cargo/config` and use `crates.io` to compile
> packages. I will post more results once it is done, but I got it rebuild =
at
> least on amd64,
> and waiting for arm64 to finish.
>
> Kamil
>
> On Mon, Dec 7, 2020 at 8:54 AM Fabian Gr=C3=BCnbichler <
> f.gruenbichler@proxmox.com> wrote:
>
>> On December 6, 2020 8:41 pm, Kamil Trzci=C5=84ski wrote:
>> > I'm slightly progressing, but I stumbled across some `debcargo`
>> problem. It
>> > appears that
>> > Proxmox uses their own fork of `debcargo`, which is needed in order to
>> > build crates
>> > without the usage of crates.io. Is this patch published somewhere?
>> >
>> > rust-debcargo (2.4.2-pve1) proxmox-rust; urgency=3Dmedium
>> >
>> >   * allow overriding maintainer via debcargo.toml
>> >   * implement local crate support.patch
>> >
>> >  -- Proxmox Support Team <support@proxmox.com>  Tue, 14 Jan 2020
>> 16:13:48
>> > +0100
>>
>>
>> https://git.proxmox.com/?p=3Ddebcargo-conf.git;a=3Dtree;f=3Dsrc/debcargo=
/debian/patches;h=3D7345cadea4cbffc3174c04e34960e91767892100;hb=3Drefs/head=
s/proxmox/buster
>>
>> all of the toolchain backports are published as well on
>> git.proxmox.com.. if you want to re-compile all of our devel repo for
>> arm64, I suggest familiarizing yourself with debcargo and the
>> debcargo-conf repo (especially the upstream and Proxmox readmes) ;)
>>
>> > On Fri, Dec 4, 2020 at 4:21 PM Kamil Trzci=C5=84ski <ayufan@ayufan.eu>
>> wrote:
>> >
>> >> ARM64 is becoming increasingly popular, especially that PBS seems at
>> least
>> >> for my usage-pattern to be ideal to run on my arm64 NAS. In the end
>> >> I want to try to be able to recompile everything for arm64 and see ho=
w
>> >> nicely
>> >> it works there.
>> >>
>> >> But first I decided to try to compile all packages for `amd64`. And I=
'm
>> >> scratching my head
>> >> to try to do that. This proves to be super hard due to multitude of
>> >> dependencies that are backported,
>> >> unordered, and require a very special set of commands to be executed
>> >> depending on a git repo
>> >> since PBS is rust-based.
>> >>
>> >> Do you maybe happen to have a comprehensive guide that allows you to
>> >> compile everything
>> >> from the scratch without the use of `/devel` repo, ideally with some
>> kind
>> >> of CI scripts that would do this heavy lifting?
>> >>
>> >> Kamil Trzci=C5=84ski
>> >>
>> >>
>> >>
>> > _______________________________________________
>> > pve-devel mailing list
>> > pve-devel@lists.proxmox.com
>> > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>> >
>>
>>
>> _______________________________________________
>> pve-devel mailing list
>> pve-devel@lists.proxmox.com
>> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>>
>