[pve-devel] applied: [PATCH installer] proxmox-chroot: replace nix::(u)mount calls with external (u)mount
Christoph Heiss
c.heiss at proxmox.com
Fri Apr 4 10:39:45 CEST 2025
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 at 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)
More information about the pve-devel
mailing list