zyga / gentoo-snappy

An unofficial Gentoo repository for installing Canonical's Snappy backbone
http://snapcraft.io/
29 stars 16 forks source link

without systemd? #10

Open skunk73 opened 7 years ago

skunk73 commented 7 years ago

hello, does it work without systemd? how would an init script look like? on my openrc gentoo system it's complaining it cannot communicate with the server... thank you

tbsteinb commented 7 years ago

It does not appear to work without systemd.

sebastianheyn commented 6 years ago

have you found a way to start that service manually?

tbsteinb commented 6 years ago

I can not speak for skunk73, however I did not. Looking at the dates for some of the commits in here, this looks like a dead project. Assuming this version of snappy even works anymore, Someone with knowledge of both OpenRC init scripts and Systemd service files would probably need to write an init script for OpenRC.

skunk73 commented 6 years ago

no, and didn't even try as i don't care about snappy anymore...

zyga commented 6 years ago

Much of the snapd code assumes to use systemd. It may be possible to work on top a systemd shim but such work has not been attempted in any moden version of the project.

For Ubuntu 14.04 we have prepared a special package of systemd that doesn't work as the boot init system but instead as separate init that just handles snapd. If you are interested in pursuing that design or native support for systemd-less systems then please discuss this at the forum.

jachstet-sea commented 6 years ago

Maybe the two facts that this repo is not actively maintained anymore and that snapd requires systemd should be mentioned in the README.md file?

Update: Sorry, misread one thing. Forget about my "not actively maintained anymore" comment. But could systemd be added to the ebuild's DEPEND please?

zyga commented 6 years ago

@jachstet-sea I need to review the existing PRs and restore my build environment. Ideally I'd like someone that actively uses gentoo on a daily basis to assist me. I'm looking for help.

prototype99 commented 6 years ago

i use gentoo as my main system. i use systemd as my main init system so that may prove to be a hinderance for this particular request. however if i can help otherwise i will happily do so! i could try building an openrc vm though if you'd consider that close enough to a real openrc install.

tbsteinb commented 6 years ago

I am not convinced snappy would actually work without systemd in it's current form. I suspect it uses systemd for the same reason (or at least a similar one) flatpak used to, which was for cgroup controls. As snappy is built with Ubuntu specifically in mind, and Ubuntu uses systemd by default, I would be surprised if this changes any time soon.

prototype99 commented 6 years ago

i definitely agree, it'd need either a compatibility layer or a stripped down version of systemd as far as i can tell. at that point it becomes clear it would probably be more beneficial to just have systemd installed. all the same we have a userbase that loves openrc, no doubt they won't ever accept it as an official package until someone hacks in openrc compatibility.

zyga commented 6 years ago

Hey, sorry for late replies.

One interesting data point is Ubuntu 14.04. If you don't know it uses upstart rather than systemd but it also supports snapd. How? It has a "deputy systemd" package that makes systemd a pure service manager, without being a init system for the whole machine. This was done on an older copy of systemd but I suspect something similar could be made to work again.

prototype99 commented 6 years ago

mmm hence why i mentioned the stripped down version. i imagine the biggest issue is how it is approached. do we create a version and only update it when snappy breaks, or do we design it so it can 'convert' any version of systemd you throw at it?

tbsteinb commented 6 years ago

That could be an interesting project. I guess the trick is to figure out how they did it in 14.04. A good starting point would probably be to obtain the .deb they used to package it, and unpack it to see what parts are in there.

zyga commented 6 years ago

You can just ... apt-get source systemd on 14.04 :-)

prototype99 commented 6 years ago

wait... from what i can tell it's not that they created a different version so much as they just didn't use it as an init system? there might be a few more tweaks but i think that's actually about it. so perhaps the only real issue is the fact they can't be installed side by side (if memory serves correctly anyway). so i'm guessing the more popular solution would be creating a patchset for snapd so it doesn't need to depend on systemd. it may be easier making it so it's possible for openrc and systemd to co exist on a system though, after all in the current state of snaps i imagine it's possible developers could tell snaps to target things that could be specific to systemd

zyga commented 6 years ago

AFAIK there were several patches but they would be in the source package for systemd in 14.04. (AFAIR it was actually "deputy-systemd" or something like that.)

zyga commented 6 years ago

As for making patches for snapd without systemd. Please discuss this on https://forum.snapcraft.io. I strongly suspect it would be NACked since it would be a huge change across many layers and the number of users that could ensure this is actually working would not be worth supporting it. With my snapd developer hat on I would strongly prefer to have a well-maintained non-init systemd instead.

prototype99 commented 6 years ago

yeah, i feel a patch that could be applied using flags or the like would be far more beneficial. when i have the free time i'll be sure to look into this

necrose99 commented 4 years ago

https://packages.gentoo.org/packages/app-admin/openrc-settingsd fakes systemd services files for the latter

https://forum.artixlinux.org/index.php/topic,276.0.html (forum post)

https://github.com/goose121/initify initify This utility converts simple systemd services to OpenRC init-scripts.

necrose99 commented 3 years ago

sqfs2tar now in squash-fstools-ng likely could make an ebuild "installer" script snap >/opt/.... for us poor sods on openrc ,