On 15.07.24 15:50, Luca Boccassi wrote:
On Sun, 14 Jul 2024 at 19:21, Simon McVittie <s...@debian.org> wrote:
Dependency size and maintenance
-------------------------------
I also notice that the netplan.io package would bring GLib, Python,
python3-dbus and python3-yaml into the dependencies of the base system,
among others. As an upstream and downstream maintainer of GLib, and in
practice the only upstream and downstream unmaintainer[1] of python3-dbus,
I'm not comfortable with that, both for size reasons (GLib and Python
are not small) and for quality and maintainedness reasons (python3-dbus).
GLib and Python are relatively large in both on-disk size and attack
surface, but they're essential to our desktop installations anyway,
reinventing them in parallel would be worse than reusing them, and
their maintainers have already accepted the responsibility of them
being an important system component. So those two are actually not my
main concern here, and if we had no good alternative, I'd be saying:
yes they're relatively bulky for a container/embedded use-case, but on
a typical server installation they're fine.
Let's put some hard numbers on the table given this is an important
detail. The following is all starting from a default debootstrapped
unstable.
With networkd only we can drop ifupdown, net changes:
REMOVING:
ifupdown
Summary:
Upgrading: 0, Installing: 0, Removing: 1, Not Upgrading: 0
Freed space: 207 kB
Using network-manager in headless mode (no GUI) brings in:
Installing:
network-manager
[...]
Summary:
Upgrading: 0, Installing: 69, Removing: 0, Not Upgrading: 0
Download size: 28.2 MB
Space needed: 110 MB / 8295 MB available
Installing netplan.io instead brings in:
Installing:
netplan.io
[...]
Summary:
Upgrading: 0, Installing: 42, Removing: 0, Not Upgrading: 0
Download size: 25.2 MB
Space needed: 101 MB / 8340 MB available
So we have a net gain of ~200K when using networkd, a net loss of
~110M when using network-manager, and a net loss of ~101M when using
netplan.
Furthermore, netplan pulls in a lot of python dependencies that are
not exactly recommended, as Simon said. And I think one of the reasons
ifupdown2 never gained traction was because it pulled in python3,
which was considered a deal breaker for the default minimal install.
It seems to me if something other than networkd is desired,
network-manager would be the better choice.
As stated previously, we don't need the Netplan CLI's Python dependency.
It's nice and convenient and can be installed is Python is installed anyway.
Let's re-do the Netplan numbers:
# apt install netplan-generator
Installing:
netplan-generator
Installing dependencies:
libglib2.0-0t64 libglib2.0-data libicu72 libnetplan1 libxml2 libyaml-0-2
shared-mime-info xdg-user-dirs
Suggested packages:
low-memory-monitor network-manager | wpasupplicant openvswitch-switch iw
Summary:
Upgrading: 0, Installing: 9, Removing: 0, Not Upgrading: 0
Download size: 13.9 MB
Space needed: 59.9 MB / 22.5 GB available
The "shared-mime-info" seems to be the culprit for most of the additional
size here. Not sure if that'd be needed in the minimal setup?
And for the fun of it, let's do it once more with the minimal required set:
# apt install --no-install-recommends netplan-generator
Installing:
netplan-generator
Installing dependencies:
libglib2.0-0t64 libnetplan1 libyaml-0-2
Suggested packages:
low-memory-monitor network-manager | wpasupplicant openvswitch-switch iw
Recommended packages:
libglib2.0-data shared-mime-info xdg-user-dirs
Summary:
Upgrading: 0, Installing: 4, Removing: 0, Not Upgrading: 0
Download size: 1,728 kB
Space needed: 5,265 kB / 22.5 GB available
So yes, we have an additional overhead of ~5M, in cases where GLib is not
already installed and even less on systems with NetworkManager, as we'd
share some dependencies. 5M of additional storage shouldn't be a huge issue
in today's world, IMHO. For the benefit of gaining a common way do to
networking on Debian.
-- Lukas