-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make init scripts work properly for Debian+OpenRC setup (again) #15977
Conversation
Hi Mo (@cdluminate), you comments would be high valuable to this PR. |
Let Debian use the sysv-rc variant of the script, even when OpenRC is installed. Unlike on Gentoo, OpenRC on Debian consumes both the sysv-rc scripts and OpenRC ones. ZFS initscripts on Debian should be the sysv-rc version to provide most compatibility and to integrate with the rest of initscripts for dependency tracking. Restrict the substitution in the Makefile to the dedicated list. This construct is inspired by Mo Zhou's detection of the execution shell and follows the strategy of Peter in 6ef28c5. Reference: openzfs#8063 Reference: openzfs#8204 Reference: openzfs#8359 Signed-off-by: Benda Xu <orv@debian.org>
As of 2024, the initscripts are mostly relevant on Debian, Gentoo and their derivatives. Signed-off-by: Benda Xu <orv@debian.org>
My memory about the Debian OpenRC + ZFS setup is almost gone. But after going through the patch, I think there is a clear problem. The Think about the following scenario: (1) the user installs Debian/gentoo with sysv-rc; (2) the user installs openzfs and the generated scripts are specific to sysv-rc; (3) the user decides to switch to openrc and zfs services just breaks silently. Is it possible to detect this within the service scripts at the run time? |
This is not a concern, because OpenRC on debian consumes both sysv-rc and openrc initscripts. (3) won't happen. |
Let Debian use the sysv-rc variant of the script, even when OpenRC is installed. Unlike on Gentoo, OpenRC on Debian consumes both the sysv-rc scripts and OpenRC ones. ZFS initscripts on Debian should be the sysv-rc version to provide most compatibility and to integrate with the rest of initscripts for dependency tracking. Restrict the substitution in the Makefile to the dedicated list. This construct is inspired by Mo Zhou's detection of the execution shell and follows the strategy of Peter in 6ef28c5. As of 2024, the initscripts are mostly relevant on Debian, Gentoo and their derivatives. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Benda Xu <orv@debian.org> Issue #8063 Issue #8204 Issue #8359 Closes #15977
Attempt to upstream the patches for the Debian+OpenRC setup. Reference: openzfs/zfs#15977 Signed-off-by: Benda Xu <orv@debian.org>
Let Debian use the sysv-rc variant of the script, even when OpenRC is installed. Unlike on Gentoo, OpenRC on Debian consumes both the sysv-rc scripts and OpenRC ones. ZFS initscripts on Debian should be the sysv-rc version to provide most compatibility and to integrate with the rest of initscripts for dependency tracking. Restrict the substitution in the Makefile to the dedicated list. This construct is inspired by Mo Zhou's detection of the execution shell and follows the strategy of Peter in 6ef28c5. As of 2024, the initscripts are mostly relevant on Debian, Gentoo and their derivatives. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Benda Xu <orv@debian.org> Issue openzfs#8063 Issue openzfs#8204 Issue openzfs#8359 Closes openzfs#15977
Motivation and Context
I intend to submit a sequel of #8359 to finally produce the correct init scripts for Debian + OpenRC setup.
Let Debian use the sysv-rc variant of the script, even when OpenRC is installed. Unlike on Gentoo, OpenRC on Debian consumes both the sysv-rc scripts and OpenRC ones. ZFS initscripts on Debian should be the sysv-rc version to provide most compatibility and to integrate with the rest of initscripts for dependency tracking.
Past issues closed by being staled includes:
#8063
#8204
Description
It replaces the runtime check with build-time configuration, simplifying the logic to maintain initscripts of ZFS. The built init script is completely determined by the
--with-vendor=
option.This construct is inspired by Mo Zhou's runtime detection of the execution shell.
How Has This Been Tested?
Debian unstable + sysv-rc: works
Debian unstable + openrc: works
Gentoo + openrc: works
Types of changes
Checklist:
Signed-off-by
.