ghostbsd / networkmgr

NetworkMgr is a Python GTK3 network manager for FreeBSD, GhostBSD, TrueOS and DragonFlyBSD
BSD 3-Clause "New" or "Revised" License
95 stars 29 forks source link

NetBSD support #80

Open danboid opened 2 years ago

danboid commented 2 years ago

Which BSD system

FreeBSD

Describe the bug

It would seem that NetBSD meets all the requirements to run networkmgr but I've noticed the README / home page for networkmgr makes no mention of NetBSD so I thought I'd try it because I have a NetBSD compatible USB wifi device and a machine I'm testing NetBSD on.

I installed all of the dependencies required for networkmgr that are mentioned in the README then ran the python setup script but the networkmgr applet failed to launch when I next launched X. I'm running MATE 1.24 under NetBSD 9.2.

Here's the error I get when trying to run it as root from the terminal:

# networkmgr
Traceback (most recent call last):
  File "/usr/pkg/bin/networkmgr", line 4, in <module>
    __import__('pkg_resources').run_script('networkmgr==6.1', 'networkmgr')
  File "/usr/pkg/lib/python3.8/site-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/pkg/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1455, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/pkg/lib/python3.8/site-packages/networkmgr-6.1-py3.8.egg/EGG-INFO/scripts/networkmgr", line 8, in <module>
ModuleNotFoundError: No module named 'trayicon'

I expect the setup script is probably installing trayicon.py in the wrong dir for NetBSD?

How to reproduce the bug?

Try to run networkmgr under NetBSD 9.2 / MATE.

Expected behavior

I expected to see networkmgr in my MATE panel.

danboid commented 2 years ago
# ifconfig -a
re0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    capabilities=3f80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
    capabilities=3f80<UDP4CSUM_Rx,UDP4CSUM_Tx>
    enabled=0
    ec_capabilities=3<VLAN_MTU,VLAN_HWTAGGING>
    ec_enabled=0
    address: bc:ae:c5:22:7a:ec
    media: Ethernet autoselect (1000baseT full-duplex)
    status: active
    inet 192.168.0.17/24 broadcast 192.168.0.255 flags 0x0
    inet6 fe80::571b:31d7:f9a8:8ff1%re0/64 flags 0x0 scopeid 0x1
fwip0: flags=0x8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
    address: 00:1f:c6:00:00:07:a5:ee
urtwn0: flags=0x8803<UP,BROADCAST,SIMPLEX,MULTICAST> mtu 1500
    ssid ""
    powersave off
    address: 7c:c2:c6:23:09:58
    media: IEEE802.11 autoselect
    status: no network
lo0: flags=0x8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33624
    inet 127.0.0.1/8 flags 0x0
    inet6 ::1/128 flags 0x20<NODAD>
    inet6 fe80::1%lo0/64 flags 0x0 scopeid 0x4
ericbsd commented 2 years ago

I am unfamiliar with NetBSD, and NetworkMgr is made to work with devd in the background to set network cards. In NetBSD, Devd is not available. For GhostBSD supporting NetBSD is out of the scope of GhostBSD. If someone wants to contribute to making it work under NetBSD, they are welcome to do that.

danboid commented 2 years ago

Thanks Eric!

It looks like the NetBSD equivalent of devd is called devpubd. I'm not sure if it does everything devd does as I'm not a NetBSD dev

https://man.netbsd.org/NetBSD-8.0/devpubd.8