From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 6AF9F6ABDC for ; Mon, 15 Mar 2021 19:35:57 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5A57C25B6C for ; Mon, 15 Mar 2021 19:35:57 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS id 69F0025B5D for ; Mon, 15 Mar 2021 19:35:55 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3384A456EF for ; Mon, 15 Mar 2021 19:35:55 +0100 (CET) Message-ID: <5fd482b7-1d3a-431b-bb1a-2d9c3ef06acb@proxmox.com> Date: Mon, 15 Mar 2021 19:35:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Thunderbird/87.0 Content-Language: en-US To: Proxmox Backup Server development discussion , Stefan Reiter References: <20210216170710.31767-1-s.reiter@proxmox.com> <20210216170710.31767-4-s.reiter@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210216170710.31767-4-s.reiter@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.048 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] applied: [PATCH proxmox-restore-vm-data 03/22] initial commit X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2021 18:35:57 -0000 On 16.02.21 18:06, Stefan Reiter wrote: > proxmox-restore-vm-data provides means to build a debian package > containing a minimalistic Linux kernel and a corresponding initramfs > image for use in a file-restore VM. > > Launched with QEMU/KVM, it boots in 1.6 seconds to userspace (on AMD > 2700X) and has a minimal attack surface (no network stack other than > virtio-vsock, no auxiliary device support (USB, etc...), userspace > written in Rust) as opposed to mounting backup archives directly on the > host. > > Since our Rust binaries are currently not fully statically linked, we > need to include some libraries into the initramfs as well. This is done > in 'build_initramfs.sh'. > > A minimal /init is included as a Rust binary (init-shim-rs), doing only > the bare-minimum userspace setup before handing over control to the > file-restore daemon (see 'proxmox-backup' repository). > > The debian package comes with a 'activate-noawait > pbs-file-restore-initramfs' trigger activation to rebuild the cached > initramfs when the base image shipped here updates. This is taken care > of by proxmox-file-restore. > > Signed-off-by: Stefan Reiter > --- > > Brand new git repo! I called it proxmox-restore-vm-data for lack of any smarter > ideas, open for better names :) > > I also decided to include the 5.10 kernel and ZFS 2.0.3 from current pve-kernel > repository pretty last-minute, it seems to work fine though (ZFS isn't used atm > anyway). > > > .gitignore | 9 ++ > .gitmodules | 6 + > Makefile | 103 +++++++++++++ > build_initramfs.sh | 42 +++++ > config-base | 144 ++++++++++++++++++ > debian/changelog | 6 + > debian/compat | 1 + > debian/control | 34 +++++ > debian/copyright | 22 +++ > debian/install | 2 + > debian/rules | 13 ++ > debian/triggers | 1 + > init-shim-rs/Cargo.lock | 51 +++++++ > init-shim-rs/Cargo.toml | 9 ++ > init-shim-rs/src/main.rs | 122 +++++++++++++++ > ...-OVERRIDE-do-not-build-xr-usb-serial.patch | 30 ++++ > ...2-FIXUP-syntax-error-in-Ubuntu-Sauce.patch | 26 ++++ > submodules/ubuntu-hirsute | 1 + > submodules/zfsonlinux | 1 + > 19 files changed, 623 insertions(+) > create mode 100644 .gitignore > create mode 100644 .gitmodules > create mode 100644 Makefile > create mode 100755 build_initramfs.sh > create mode 100644 config-base > create mode 100644 debian/changelog > create mode 100644 debian/compat > create mode 100644 debian/control > create mode 100644 debian/copyright > create mode 100644 debian/install > create mode 100755 debian/rules > create mode 100644 debian/triggers > create mode 100644 init-shim-rs/Cargo.lock > create mode 100644 init-shim-rs/Cargo.toml > create mode 100644 init-shim-rs/src/main.rs > create mode 100644 patches/kernel/0001-OVERRIDE-do-not-build-xr-usb-serial.patch > create mode 100644 patches/kernel/0002-FIXUP-syntax-error-in-Ubuntu-Sauce.patch > create mode 160000 submodules/ubuntu-hirsute > create mode 160000 submodules/zfsonlinux > > applied, thanks! Did two big changes though: * renamed to "proxmox-backup-restore-image" * split build system into packaging and actual build As there was quite some stuff changed, which I did in a few ~10 minutes sessions with days/weeks in-between: please re-check https://git.proxmox.com/?p=proxmox-backup-restore-image.git;a=summary