I'm finally giving scx (1.0.6-r1) a try and it seems I'm the first person to use openrc: root>/etc/init.d/scx zsh: /etc/init.d/scx: bad interpreter: /usr/bin/openrc-run: no such file or directory Changing the interpreter to the usual /sbin/openrc-run makes it work. Maybe this is a split/merged-usr issue compared to CachyOS but IMHO it should work nevertheless. The upstream openrc support can be found here: https://github.com/sched-ext/scx/tree/main/services/openrc Not sure about the best way to fix this - sed the first line or just drop a fixed script into $FILESDIR and install it as necessary. Reproducible: Always Steps to Reproduce: 1. install scx-1.0.6-r1 with USE=openrc enabled 2. /etc/init.d/scx fails 3. :(
This works for me: --snip-- @@ -359,6 +359,9 @@ src_prepare() { # Inject the rust_abi value into install_rust_user_scheds sed -i "s;\${MESON_BUILD_ROOT};\${MESON_BUILD_ROOT}/$(rust_abi);" \ meson-scripts/install_rust_user_scheds || die + + # Fix up openrc service script (#944832) + use openrc && sed -i 's/usr\/bin/sbin/g' "${S}"/services/openrc/scx.initrd || die } src_configure() { --snip--
(In reply to Holger Hoffstätte from comment #1) > This works for me: ..except that it doesn't work for -openrc, sigh. fixed: --snip-- @@ -359,6 +359,9 @@ src_prepare() { # Inject the rust_abi value into install_rust_user_scheds sed -i "s;\${MESON_BUILD_ROOT};\${MESON_BUILD_ROOT}/$(rust_abi);" \ meson-scripts/install_rust_user_scheds || die + + # Fix up openrc service script (#944832) + use openrc && (sed -i 's/usr\/bin/sbin/g' "${S}"/services/openrc/scx.initrd || die) } src_configure() { --snip--
(In reply to Holger Hoffstätte from comment #2) > 's/usr\/bin/sbin/g' This would also change command="/usr/bin/$SCX_SCHEDULER" to command="/sbin/$SCX_SCHEDULER" Not sure if that's what we want, given that scx installs its binaries under /usr/bin. Maybe it is better to fix the openrc she-bang?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53d62fca42306efee6f52deaafd5757428f710cd commit 53d62fca42306efee6f52deaafd5757428f710cd Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2024-11-26 16:29:54 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2024-11-26 16:32:00 +0000 sys-kernel/scx: fix openrc init Closes: https://bugs.gentoo.org/944832 Signed-off-by: Florian Schmaus <flow@gentoo.org> sys-kernel/scx/{scx-1.0.6-r1.ebuild => scx-1.0.6-r2.ebuild} | 4 ++++ 1 file changed, 4 insertions(+)