davesteele / comitup

Bootstrap Wifi support over Wifi
https://davesteele.github.io/comitup/
GNU General Public License v2.0
320 stars 54 forks source link

comitup with newest raspios Bookworm fails (Fix referenced) #234

Closed falkyre closed 3 months ago

falkyre commented 8 months ago

I'm trying to use comitup on the just released RaspiOS Bookworm lite (official release October 10) and I am getting the following error:

Traceback (most recent call last): File "/usr/sbin/comitup", line 5, in from comitup.comitup import main File "/usr/share/comitup/comitup/comitup.py", line 22, in from comitup import cdns # noqa ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/comitup/comitup/cdns.py", line 14, in from comitup import modemgr File "/usr/share/comitup/comitup/modemgr.py", line 16, in from comitup import config, nm File "/usr/share/comitup/comitup/nm.py", line 24, in import NetworkManager as nm File "/usr/lib/python3/dist-packages/NetworkManager.py", line 773, in NetworkManager = NetworkManager() ^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/NetworkManager.py", line 251, in new SignalDispatcher.listen_for_restarts() File "/usr/lib/python3/dist-packages/NetworkManager.py", line 43, in listen_for_restarts dbus.SystemBus().add_signal_receiver(self.handle_restart, 'NameOwnerChanged', 'org.freedesktop.DBus') ^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dbus/_dbus.py", line 192, in new return Bus.new(cls, Bus.TYPE_SYSTEM, mainloop=mainloop, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dbus/_dbus.py", line 99, in new bus = BusConnection.new(subclass, bus_type, mainloop=mainloop) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dbus/bus.py", line 120, in new bus = cls._new_for_bus(address_or_type, mainloop=mainloop) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory

KeyError: dbus.UInt32(32, variant_level=1)

Not sure what's changed from Bullseye or how to fix it but I figured I'd let you know. I'm seeing the same error on one of my plain Debian Bookworm VMs as well.

davesteele commented 8 months ago

Yup. Debian 12 (Bookworm) is incompatible with the required python-networkmanager, which is no longer maintained. I'm looking into replacing it.

falkyre commented 8 months ago

That's what I thought. I'm hoping it's not a massive rewrite as your app has become a key bit to my image creation. I'll stick with Bullseye for now and hope you can get things worked out. I'll leave this open in case anyone else wanders this way for the same reason.

Ataraxiall commented 8 months ago

Yup. Debian 12 (Bookworm) is incompatible with the required python-networkmanager, which is no longer maintained. I'm looking into replacing it.

maybe this can be a option https://github.com/python-sdbus/python-sdbus-networkmanager

davesteele commented 8 months ago

I'm hoping it's not a massive rewrite

It is, but I've been interested in reworking it with asyncio.

Pupwiz commented 7 months ago

any progress? I would like to move some of my portable debian unit to a newer release. I would like to help but not nearly smart enough to work on this.

davesteele commented 7 months ago

I'm doing a pretty-much full rewrite in async. It will happen, but is probably a couple months out.

ampledata commented 6 months ago

I wouldn't discourage your work to add Async, but in the interim I've patched python-networkmanager to fix this Loopback/32 bug:

https://github.com/snstac/python-networkmanager

Pupwiz commented 6 months ago

Static hostname: zimaboard Operating System: Debian GNU/Linux 12 (bookworm)
Kernel: Linux 6.1.0-17-amd64 Architecture: x86-64 Hardware Vendor: IceWhale Technology Co.,Ltd. Hardware Model: ZimaBoard 832 Firmware Version: 5.12

Tested and working with patch networkmanager. Much appreciated ampledata systems update to latest bookworm and no issues with it working now

Thanks again

davesteele commented 5 months ago

python3-networkmanager v2.2-3 includes the patch, as well as a general fix for future unknown device types. It is available in the Comitup repository.

The Comitup Image, containing the fix, is now based on the latest release of Pi OS, Bookworm.

Leaving this open since it likely won't make it to Pi OS Bookworm.

Pupwiz commented 5 months ago

Thanks davesteel. noticed during some maintenance on portable server that it did pull the latest deb package and installed. Over writting the patched version without issues. Thanks again.

Steve