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 7ACB1915DF for ; Mon, 29 Jan 2024 13:44:47 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5B75D15BA1 for ; Mon, 29 Jan 2024 13:44:17 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 for ; Mon, 29 Jan 2024 13:44:16 +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 D2B95492EC for ; Mon, 29 Jan 2024 13:44:15 +0100 (CET) Message-ID: <014673339f88b31a362d2f0ee666453ac978865c.camel@proxmox.com> From: Folke Gleumes To: Proxmox Backup Server development discussion Date: Mon, 29 Jan 2024 13:44:15 +0100 In-Reply-To: <20240124101519.30079-1-f.schauer@proxmox.com> References: <20240124101519.30079-1-f.schauer@proxmox.com> Organization: Proxmox Server Solutions GmbH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [extract.rs, zip.rs] Subject: Re: [pbs-devel] [PATCH v4 many] fix #4995: Include symlinks in zip file restore 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, 29 Jan 2024 12:44:47 -0000 On Wed, 2024-01-24 at 11:15 +0100, Filip Schauer wrote: > Include symlinks when restoring files from a backup as a zip file. >=20 > Resulting ZIP files were successfully tested on Linux with: zipinfo, > unzip, unar >=20 > On Windows the extracted symlinks show up as regular files containing > the path to the destination. As far as I am aware Windows Explorer > does > not support symlinks in ZIP files. >=20 > Changes since v3: > * Move content to Regular FileType enum > * Make ZipEntry private > * Add take_reader function to FileType enum >=20 > Changes since v2: > * Add a FileType enum and embed the symlink target into the enum. > * Add unit tests for ZipEncoder to the proxmox-compression crate >=20 > Changes since v1: > * Use P instead of &Path > * Fix compile error due to misplaced comma > * Check content before symlink_target, since regular files are more > =C2=A0 common than symlinks >=20 > proxmox: >=20 > Filip Schauer (3): > =C2=A0 compression: Refactor ZipEntry creation and add FileType enum > =C2=A0 compression: Add support for symlinks in zip files > =C2=A0 compression: Add unit tests for the ZipEncoder >=20 > =C2=A0proxmox-compression/Cargo.toml=C2=A0=C2=A0 |=C2=A0=C2=A0 2 +- > =C2=A0proxmox-compression/src/zip.rs=C2=A0=C2=A0 | 159 ++++++++++++++++++= +---------- > -- > =C2=A0proxmox-compression/tests/zip.rs | 123 ++++++++++++++++++++++++ > =C2=A03 files changed, 223 insertions(+), 61 deletions(-) > =C2=A0create mode 100644 proxmox-compression/tests/zip.rs >=20 > proxmox-backup: >=20 > Filip Schauer (2): > =C2=A0 pxar: Adopt FileType enum when adding a zip entry > =C2=A0 fix #4995: pxar: Include symlinks in zip file creation >=20 > =C2=A0pbs-client/src/pxar/extract.rs | 59 +++++++++++++++++++++----------= - > -- > =C2=A01 file changed, 36 insertions(+), 23 deletions(-) >=20 Tested this with some handcrafted directory/symlink structures and my home directory for some organic data. Restore was tested on Windows 11 and Debian 12. Everything worked as intended. Tested-by: Folke Gleumes