[Bug 288612] sysutils/slurm-wlm: /var/spool/slurmctld not being created at install time
Date: Sat, 02 Aug 2025 19:58:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288612
Bug ID: 288612
Summary: sysutils/slurm-wlm: /var/spool/slurmctld not being
created at install time
Product: Ports & Packages
Version: Latest
Hardware: amd64
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs@FreeBSD.org
Reporter: rikka.goering@outlook.de
When installing the port and trying to start slurmctld, the service complains
about /var/spool/slurmctld not being writable. By creating the directory and
chowning it to slurm:slurm this can be fixed. An even better fix, though, would
be to create it during installation of the port and set correct permissions
during post-install.
I already uploaded a patch to fix this in bug #288593 but created this bug
report due to the 1 bug per report policy, so i will add my suggested patch in
cleartext here for review:
index 4db32cacac65..a24c7e6ef254 100644
--- a/sysutils/slurm-wlm/Makefile
+++ b/sysutils/slurm-wlm/Makefile
@@ -43,7 +43,7 @@ GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
INSTALL_TARGET= install-strip
TEST_TARGET= check
-PLIST_SUB= PORTVERSION="${DISTVERSION}" VER="${DISTVERSION:R}"
+PLIST_SUB= PORTVERSION="${DISTVERSION}" VER="${DISTVERSION:R}"
USERS=${USERS} GROUPS=${GROUPS}
SHEBANG_FILES= doc/html/shtml2html.py doc/man/man2html.py
PORTDOCS= *
@@ -162,6 +162,9 @@ pre-configure:
${REINPLACE_CMD} -e 's|htmldir = \$${datadir.*$$|htmldir =
@htmldir@|'
post-install:
+ @${MKDIR} ${STAGEDIR}/var/spool/slurmctld
+ @${CHOWN} ${USERS}:${GROUPS} ${STAGEDIR}/var/spool/slurmctld
+ @${CHMOD} 700 ${STAGEDIR}/var/spool/slurmctld
${INSTALL_DATA} ${WRKSRC}/etc/slurm.conf.example \
${STAGEDIR}${PREFIX}/etc/slurm.conf.sample
diff --git a/sysutils/slurm-wlm/pkg-plist b/sysutils/slurm-wlm/pkg-plist
index 72bf05a521d4..315d8d210ce4 100644
--- a/sysutils/slurm-wlm/pkg-plist
+++ b/sysutils/slurm-wlm/pkg-plist
@@ -255,3 +255,4 @@ sbin/slurmctld
sbin/slurmd
sbin/slurmdbd
sbin/slurmstepd
+@dir(%%USERS%%,%%GROUPS%%,700) /var/spool/slurmctld
--
You are receiving this mail because:
You are the assignee for the bug.