From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id BD95C1FF189
	for <inbox@lore.proxmox.com>; Fri,  4 Apr 2025 10:40:01 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 70D6B19C32;
	Fri,  4 Apr 2025 10:39:48 +0200 (CEST)
Date: Fri, 04 Apr 2025 10:39:45 +0200
Message-Id: <D8XPWOUK5M4Q.1T9WZU7OIZ581@proxmox.com>
From: "Christoph Heiss" <c.heiss@proxmox.com>
To: "Thomas Lamprecht" <t.lamprecht@proxmox.com>
Mime-Version: 1.0
X-Mailer: aerc 0.20.1
References: <20250311132733.820837-1-c.heiss@proxmox.com>
 <f5a03ff5-7190-4d19-8fa9-3a93bffc1eb6@proxmox.com>
In-Reply-To: <f5a03ff5-7190-4d19-8fa9-3a93bffc1eb6@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.030 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
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches 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. [main.rs]
Subject: Re: [pve-devel] applied: [PATCH installer] proxmox-chroot: replace
 nix::(u)mount calls with external (u)mount
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>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

On Fri Apr 4, 2025 at 10:28 AM CEST, Thomas Lamprecht wrote:
> Am 11.03.25 um 14:27 schrieb Christoph Heiss:
>> Comes with a reduction of 52 -> 40 in terms of crate dependencies for
>> proxmox-chroot, 198 -> 192 for a full workspace build.
>>
>> Currently, this is done inconsistently anyway, i.e. there are calls to
>> the external mount(8) as well as mount(2) and umount(2) via `nix`.
>> Just switch over to calling the external programs completely, which in
>> turn allows to drop the `nix` crate dependency from the tree.
>>
>> No functional changes.
>>
>> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
>> ---
>>  debian/control             |  1 -
>>  proxmox-chroot/Cargo.toml  |  1 -
>>  proxmox-chroot/src/main.rs | 81 +++++++++++++++++++++++++-------------
>>  3 files changed, 53 insertions(+), 30 deletions(-)
>>
>>
>
> applied, thanks!
>
> btw. to throw in a crate I'd not be sad to see get removed: clap, at least
> if upstream still is full in the refactoring for the sake of it and adding
> yet another way to do things...

Yeah, definitely, agreed! I have already been previously working on
removing it and got a ~half done local branch - but its unfortunately
bit of a bigger refactor/rewrite. I'll try to get to it again tho and
finish it.

(fwiw, looking at my notes, dropping clap would also be quite a sizeable
win w.r.t. binary sizes, with ~20% reduction for one of the binaries)


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel