dw-0 / kiauh

Klipper Installation And Update Helper
GNU General Public License v3.0
3.44k stars 497 forks source link

Support for non-systemd environments #528

Open apparle opened 2 months ago

apparle commented 2 months ago

Is your feature request related to a problem? Please describe

Kiauh is a very convenient set of installation tools, but it is locked-in with systemd. When trying to set up lightweight environments like Android Termux proot-distro environment, or alpine linux, or a lightweight alpine based docker container, systemd is just not available. I'm trying to use an old Android phone which has everything (USB-OTG support, a good camera,a nice touchscreen) that will be very good to run Klipper+Moonraker+Mainsail+Klipperscreen. With termux and termux-x11 there's all the tools needed to run any reasonable app. But it being an older kernel and a proot env, I only have openrc or sysv init services and not proper systemd; and trying to install systemd is near impossible because the kernel is derived off of Android or docker or other env.

I see the past issue from years ago https://github.com/dw-0/kiauh/issues/287 which isn't clear on the solution -- Is the stance a flat no?

Describe the solution you'd like

There should be a mechanism to instruct KIAUH script to install everything as standalone apps without the services, and then generate standalone start.sh & stop.sh which the user can invoke or manually install set up in their own service mechanisms as needed? Or alternatively, support for openrc or sysvinit or other non-systemd service infrastructures?

Describe alternatives you've considered

The current alternative is to give up on Kiauh altogether and manually install Klipper, Moonraker, Mainsail one by one. Definitely not easy.

Additional information

No response

CODeRUS commented 2 months ago

solution was not removing init;d scripts, you are free to write your own autorun scripts for your favorite init system.

fyi: https://github.com/mkuf/prind

dw-0 commented 2 months ago

Thank you for the request. I see that there is demand for support on non-systemd environments. However, supporting new base distros besides Debian is possible, but maintaining it may be a burden. Especially for such niche usecases like using old android phones as a host system. For docker, i can recommend prind as well, although i haven't tested it on my own, the project seems really nice and most important is actively maintained.

I plan to support more base systems in the future (Fedora, Arch, etc.) but i have no timeframe for it yet and this decision is also not final and may be subject to change. So for now, i tagged this issue as a feature request and that further evaluation is required.

apparle commented 2 months ago

solution was not removing init;d scripts, you are free to write your own autorun scripts for your favorite init system.

fyi: https://github.com/mkuf/prind

But how do I get Kiauh to not try to install systemd dependencies or interact with systemd? Right now, I've an Ubuntu environment setup inside of Android's terminal with chroot (or proot, I tried both), and Kiauh tries to pull-in a lot of systemd packages which then fails because its a chroot. I don't mind writing my own autorun scripts, in fact I precisely want to do that -- I just need a way to tell Kiauh explicitly with some conf option or env variable DONT_USE_SYSTEMD_INIT which indicates:

Is there already a way to do this? Am I doing something completely wrong? I understand that implementing support for more base systems is a lot of work both for implementation & maintenance, so maybe above is a reasonable first step ?

Some more thoughts on proper support for different base systems (Just my naive mental model, can't say I understand all complexities yet):

The reason I'm suggesting this -- Kiauh is popular enough that underlying projects (Klipper, Moonraker, Mainsail) all suggest Kaiuh as the right way to install things, and it's hard to find standalone installation instructions anywhere; even for the savvy. I literally ran Kiauh on a standalone system + read code to reverse engineer the install for these and then set them up manually. Since it is popular enough already, maybe extend it to be friendly for all linux based systems :-)