site  contact  subhomenews

ModemManager and NetworkManager compiled in Buster

August 01, 2019 — BarryK

Getting closer to the first 2.0-beta release of Easy Buster64. Using it for the last couple of days, runs nice. For Internet connection, have an ethernet cable plugged in, but I want to get NetworkManager up and running, as it is in Pyro.

The NetworkManager and ModemManager DEBs have dependencies on 'pam', 'policykit' and 'systemd', although they will probably still work if those deps are crippled or missing. Not sure though. These are system-level utilities, and more likely to get broken by one of those deps not working.

So, decided to compile them. There's a bit of an art to getting this right, as they have a lot of configure options. I went through the exercise in OE, for the Pyro build, so notes here on how I have done it in Easy Buster.

ModemManager 1.10.0

I already have the required deps in Easy Buster, so that part is taken care of. Here is how I configured it:

# ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--build=x86_64-pc-linux-gnu --with-qmi --with-mbim --with-polkit=no \
--with-systemd-journal=no --with-systemd-suspend-resume=no --with-udev \
--enable-vala=no --disable-gtk-doc-html --enable-introspection=no
# make
# new2dir make install

That was straightforward.

NetworkManager 1.14.6

I downloaded some patches from Debian:

# patch -p1 < ../debian/patches/Do-not-manage-Docker-bridge-interfaces.patch
# patch -p1 < ../debian/patches/supplicant-fix-setting-pmf-when-the-supplicant-doesn-t-ad.patch
# patch -p1 < ../debian/patches/Force-online-state-with-unmanaged-devices.patch
# patch -p1 < ../debian/patches/Don-t-make-NetworkManager-D-Bus-activatable.patch

Configure options:

# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--build=x86_64-pc-linux-gnu --without-tests --with-valgrind=no \
--with-nmtui=yes --with-nmcli=yes --with-netconfig=no --with-resolvconf=yes \
--with-config-dhcp-default=internal --with-dhcpcd=no --with-dhclient=no \
--with-dhcpcanon=no --with-crypto=gnutls --with-libaudit=no --with-selinux=no \
--with-session-tracking=no --with-consolekit=no --with-systemd-logind=no \
--with-systemd-journal=no --with-wext=yes --enable-tests=no --enable-vala=no \
--enable-concheck --disable-ovs --enable-bluez5-dun --enable-ppp \
--enable-modify-system --disable-polkit-agent --enable-polkit=no \
--enable-wifi --disable-ifupdown --disable-ifcfg-rh --enable-introspection=no \
--disable-more-warnings --with-iwd=yes --with-ofono \
--with-iptables=/usr/sbin/iptables

When I ran 'make', it complained about a missing header file, 'nm-enum-type.h' ...a catch22 situation, got it out of 'libnm-dev' binary DEB, which is part of NetworkManager.

Then it complained wanted some systemd stuff. I edited 'nm-sleep-monitor.c', Replaced the entire content of the 'nm_sleep_monitor_init()' function with just a "return;".

# make
# new2dir make install

If you are a Puppy developer, you might find the above notes useful. There are a few bits and pieces required if you want to make a PET of NetworkManager. I haven't uploaded my PETs yet, but you can look into those after they are uploaded. For example, /etc/init.d/rc.networkmanager, and integration of the 'nmtui' GUI for setting up a network. 

I haven't actually tested it yet. Will do a rebuild and test it, also want to investigate some other GUis, as nmtui is a very basic slang-based textmode GUI. 

Tags: easy