Best way to port Snap to FreeBSD?

It is possible, I got partial stability without system, and by partial I mean I sometimes had it work and run. Would it be best to fork Snap and just remove/replace the Systemd requirements to what FreeBSD uses? Or would it be easier to emulate a Systemd environment in a container of its own right? This is a large scale side-project that will take me a lot of time to complete, but it is something I do want to do. Please don’t crush my dreams on doing this, I will move mountains to prove you wrong.

If you can get systemd operational in a Linux-flavoured Jail then you might be able to get snapd operational, though apparmor and seccomp rules won’t be applied because the kernel stuff to support that isn’t in the FreeBSD kernel. I have wondered if something like capsicum could be bent into something workable.

1 Like

If you don’t want to maintain many complex patches to the snapd source code, I think that emulating a systemd environment is probably easier, but the most ideal thing would probably be as @daniel mentioned is somehow running real systemd (in some sort of degraded mode somehow) in a BSD Jail. I admit I am not familiar with BSD so I don’t know how well that would work.