There are two different bashisms in /etc/conf.d/incus: /etc/conf.d/incus: INCUS_OPTIONS+=" --group incus-admin" Should be: INCUS_OPTIONS="${INCUS_OPTIONS} --group incus-admin}" Second, passing multiple ulimit options in one call as specified by rc_ulimit="-n 1048576 -l unlimited" isn't supported by dash, so I assume it's a bashism. I'm not sure if ulimit is actually standardized anywhere though.
(In reply to Violet Purcell from comment #0) > INCUS_OPTIONS="${INCUS_OPTIONS} --group incus-admin}" Presumably this was a mere typo but it should be: INCUS_OPTIONS="${INCUS_OPTIONS} --group incus-admin" > Second, passing multiple ulimit options in one call as specified by > rc_ulimit="-n 1048576 -l unlimited" isn't supported by dash, so I assume > it's a bashism. I'm not sure if ulimit is actually standardized anywhere > though. The only standard option is -f. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ulimit.html I would suggest calling prlimit(1) from the runscript instead. It is provided by util-linux.
I'll try to remember this with 6.3 bump.
Oh and checkbashisms doesn't flag the "INCUS_OPTIONS+=" part, but I wonder if it's limited to just checking the init file.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd8a0d3ea99d4353ab2ac59e4dbb48dc6ca52662 commit dd8a0d3ea99d4353ab2ac59e4dbb48dc6ca52662 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2024-07-12 08:48:40 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2024-07-12 08:58:01 +0000 app-containers/incus: add 6.3 - clear out bashishms from openrc service files, - switch to calling 'prlimit' from the openrc init file instead of relying on openrc's rc_ulimit. Closes: https://bugs.gentoo.org/929138 Signed-off-by: Joonas Niilola <juippis@gentoo.org> app-containers/incus/Manifest | 2 + app-containers/incus/files/incus-6.0.confd | 27 ++++ app-containers/incus/files/incus-6.0.initd | 63 +++++++++ app-containers/incus/incus-6.3.ebuild | 219 +++++++++++++++++++++++++++++ 4 files changed, 311 insertions(+)
The prlimit call needs to be "prlimit -n=1048576 -l=unlimited --pid=$$" instead of "prlimit -n 1048576 -l unlimited --pid=$$"
(In reply to Violet Purcell from comment #5) > The prlimit call needs to be "prlimit -n=1048576 -l=unlimited --pid=$$" > instead of "prlimit -n 1048576 -l unlimited --pid=$$" Ah crap, I must've forgotten to update the FILESDIR file. I fixed it locally straight in /etc/init.d
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b05fe66cb10d75cc17f9998db5fc98eee0e9a049 commit b05fe66cb10d75cc17f9998db5fc98eee0e9a049 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2024-07-12 19:27:12 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2024-07-12 19:28:01 +0000 app-containers/incus: update the prlimit syntax in 6.3 Bug: https://bugs.gentoo.org/929138 Signed-off-by: Joonas Niilola <juippis@gentoo.org> app-containers/incus/files/incus-6.0.initd | 2 +- app-containers/incus/{incus-6.3.ebuild => incus-6.3-r1.ebuild} | 0 2 files changed, 1 insertion(+), 1 deletion(-)