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

Installing dependencies:
  ca-certificates          libgudev-1.0-0            libnl-genl-3-200
     libssh2-1t64
  dbus                     libicu72                  libnl-route-3-200
     libteamdctl0
  dbus-bin                 libjim0.82t64             libnm0
     libusb-1.0-0
  dbus-daemon              libldap-2.5-0             libpam-systemd
     libxml2
  dbus-session-bus-common  libldap-common            libpcap0.8t64
     modemmanager
  dbus-system-bus-common   libmbim-glib4             libpcsclite1
     openssl
  dbus-user-session        libmbim-proxy
libpolkit-agent-1-0    polkitd
  dns-root-data            libmbim-utils             libpolkit-gobject-1-0  ppp
  dnsmasq-base             libmm-glib0               libpsl5t64
     publicsuffix
  libbluetooth3            libndp0                   libqmi-glib5
     sgml-base
  libbrotli1               libnetfilter-conntrack3   libqmi-proxy
     shared-mime-info
  libcurl3t64-gnutls       libnfnetlink0             libqmi-utils
     usb-modeswitch
  libdbus-1-3              libnghttp2-14             libqrtr-glib0
     usb-modeswitch-data
  libduktape207            libnghttp3-9              librtmp1
     wireless-regdb
  libexpat1                libngtcp2-16              libsasl2-2
     wpasupplicant
  libglib2.0-0t64          libngtcp2-crypto-gnutls8  libsasl2-modules
     xdg-user-dirs
  libglib2.0-data          libnl-3-200
libsasl2-modules-db    xml-core

Suggested packages:
  low-memory-monitor  libsasl2-modules-gssapi-mit
libsasl2-modules-sql  comgt                     debhelper
  libcryptsetup12     | libsasl2-modules-gssapi-heimdal  libteam-utils
        wvdial
  libtss2-rc0t64      libsasl2-modules-ldap              iptables
        wpagui
  pcscd               libsasl2-modules-otp               sgml-base-doc
        libengine-pkcs11-openssl

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

Installing dependencies:
  ca-certificates          libexpat1              libsqlite3-0
 python3-gi             python3-yaml
  dbus                     libgirepository-1.0-1  libxml2
 python3-markdown-it    python3.12
  dbus-bin                 libglib2.0-0t64        libyaml-0-2
 python3-mdurl          python3.12-minimal
  dbus-daemon              libglib2.0-data        media-types
 python3-minimal        shared-mime-info
  dbus-session-bus-common  libicu72               netplan-generator
 python3-netifaces      xdg-user-dirs
  dbus-system-bus-common   libnetplan1            openssl
 python3-netplan
  gir1.2-girepository-2.0  libpython3-stdlib      python3
 python3-pkg-resources
  gir1.2-glib-2.0          libpython3.12-minimal  python3-cffi-backend
 python3-pygments
  libdbus-1-3              libpython3.12-stdlib   python3-dbus
 python3-rich

Suggested packages:
  default-dbus-session-bus  | wpasupplicant     python3-tk
python-pygments-doc  binutils
  | dbus-session-bus        openvswitch-switch  python3-venv
ttf-bitstream-vera   binfmt-support
  low-memory-monitor        iw                  python-dbus-doc
python3.12-venv
  network-manager           python3-doc         python3-setuptools
python3.12-doc

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.

Reply via email to