Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails because of missing systemctl on non-systemd distros #1415

Open
systemdlete opened this issue Oct 10, 2024 · 3 comments · May be fixed by #1416
Open

Install fails because of missing systemctl on non-systemd distros #1415

systemdlete opened this issue Oct 10, 2024 · 3 comments · May be fixed by #1416
Assignees
Labels
area:build Relating to deployment/releases status: awaiting reply Awaiting reply from the author of the issue type:bug Something isn't working

Comments

@systemdlete
Copy link

Describe the bug
During installation of the debian package, an error occurs:

# dpkg -i gnomeshade.deb
Selecting previously unselected package gnomeshade.
(Reading database ... 212230 files and directories currently installed.)
Preparing to unpack gnomeshade.deb ...
Unpacking gnomeshade (0.8.6.581) ...
Setting up gnomeshade (0.8.6.581) ...
Adding group `gnomeshade' (GID 121) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `gnomeshade' (UID 113) ...
Adding new user `gnomeshade' (UID 113) with group `gnomeshade' ...
Not creating home directory `/nonexistent'.
Can't exec "systemctl": No such file or directory at /usr/bin/deb-systemd-invoke line 110.

To Reproduce
Steps to reproduce the behavior:

  1. dpkg -i gnomeshade.deb

Expected behavior
Friendly, peaceful install of your package on non-systemd distros.

Screenshots
See above.

Additional context
Installation is on devuan chimaera (equivalent of debian bullseye without systemd).

@systemdlete systemdlete added the type:bug Something isn't working label Oct 10, 2024
@VMelnalksnis
Copy link
Owner

I'm currently only testing on debian/Ubuntu, so I hadn't considered other init systems. From a quick search I see that Debian recommends supporting at least 2 init systems, but I couldn't find any information on how to actually do that. Best I could find was this post which suggests checking which init system is installed in postinst.sh https://unix.stackexchange.com/a/258256.

I'm assuming you're using sysvinit since it's the default on devuan? I'll take a look at adding support for it.

Also, are there any official docker images I could use for testing? These were the only ones I found that were updated this year https://hub.docker.com/r/dyne/devuan/tags.

@VMelnalksnis
Copy link
Owner

Looks like there is no good way to detect init system, see https://unix.stackexchange.com/questions/196166/how-to-find-out-if-a-system-uses-sysv-upstart-or-systemd-initsystem and https://unix.stackexchange.com/questions/18209/detect-init-system-using-the-shell.

For debian it might make sense to just stick with https://packages.debian.org/sid/init-system-helpers, since it should handle systemd and sysvinit - This package contains helper tools that are necessary for switching between the various init systems that Debian contains (e. g. sysvinit or systemd). An example is deb-systemd-helper, a script that enables systemd unit files without depending on a running systemd.

@VMelnalksnis VMelnalksnis linked a pull request Oct 12, 2024 that will close this issue
@VMelnalksnis
Copy link
Owner

@systemdlete Can you take a look at the PR if the changes make sense? I'll clean it up and update documentation then.

I'll be honest I could not any definitive documentation on how to setup a service with sysvinit scripts, but it's working. I added tests for Daedalus and Chimaera, Beowulf failed with /lib/lsb/init-functions: No such file or directory and I don't want to spend time rewriting the current script for such an old version.

@VMelnalksnis VMelnalksnis added the area:build Relating to deployment/releases label Oct 13, 2024
@VMelnalksnis VMelnalksnis added the status: awaiting reply Awaiting reply from the author of the issue label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:build Relating to deployment/releases status: awaiting reply Awaiting reply from the author of the issue type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants