summaryrefslogtreecommitdiff
path: root/sysutils/slurm-wlm/files
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2023-12-18 22:13:00 +0100
committerThierry Thomas <thierry@FreeBSD.org>2023-12-18 22:26:58 +0100
commit9adb7c18c4707e89084824854d4e8cce3157df6e (patch)
tree0df57b2d688ae65a1dc99137a4e4b91f81438e4d /sysutils/slurm-wlm/files
parentscience/siesta: Update WWW (diff)
sysutils/slurm-wlm: upgrade to 23.11.1
Releases notes at <https://www.schedmd.com/news.php>. Remark: MySQL is no more an option. Security: CVE-2023-49933 through CVE-2023-49938 Differential Revision: <https://reviews.freebsd.org/D42764>
Diffstat (limited to 'sysutils/slurm-wlm/files')
-rw-r--r--sysutils/slurm-wlm/files/patch-configure268
-rw-r--r--sysutils/slurm-wlm/files/patch-etc_slurm.conf.example109
-rw-r--r--sysutils/slurm-wlm/files/patch-src_api_Makefile.in10
-rw-r--r--sysutils/slurm-wlm/files/patch-src_common_callerid.h10
-rw-r--r--sysutils/slurm-wlm/files/patch-src_common_conmgr.c11
-rw-r--r--sysutils/slurm-wlm/files/patch-src_interfaces_cgroup.c18
-rw-r--r--sysutils/slurm-wlm/files/patch-src_plugins_auth_slurm_net__aliases.c13
-rw-r--r--sysutils/slurm-wlm/files/patch-src_plugins_cli__filter_user__defaults_cli__filter__user__defaults.c4
-rw-r--r--sysutils/slurm-wlm/files/patch-src_plugins_job__container_tmpfs_job__container__tmpfs.c11
-rw-r--r--sysutils/slurm-wlm/files/patch-src_plugins_jobacct__gather_common_common__jag.c70
-rw-r--r--sysutils/slurm-wlm/files/patch-src_plugins_mpi_cray__shasta_mpi__cray__shasta.c6
-rw-r--r--sysutils/slurm-wlm/files/patch-src_plugins_switch_cray__aries_switch__cray__aries.c12
-rw-r--r--sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c11
-rw-r--r--sysutils/slurm-wlm/files/patch-src_scrun_anchor.c27
-rw-r--r--sysutils/slurm-wlm/files/patch-src_scrun_commands.c13
-rw-r--r--sysutils/slurm-wlm/files/patch-src_scrun_scrun.c24
-rw-r--r--sysutils/slurm-wlm/files/patch-src_scrun_srun.c12
-rw-r--r--sysutils/slurm-wlm/files/patch-src_slurmctld_prep__slurmctld.c10
-rw-r--r--sysutils/slurm-wlm/files/patch-src_slurmd_slurmd_slurmd.h10
19 files changed, 479 insertions, 170 deletions
diff --git a/sysutils/slurm-wlm/files/patch-configure b/sysutils/slurm-wlm/files/patch-configure
index 1ef524b3b42c..51cf89bd4981 100644
--- a/sysutils/slurm-wlm/files/patch-configure
+++ b/sysutils/slurm-wlm/files/patch-configure
@@ -1,40 +1,228 @@
---- configure.orig 2020-03-26 21:44:05 UTC
+--- configure.orig 2023-11-21 22:33:29 UTC
+++ configure
-@@ -20744,25 +20744,19 @@ HDF5 support is being disabled (equivalent to --with-h
+@@ -5513,7 +5513,7 @@ _ACEOF
+ /* end confdefs.h. */
+ $ac_c_conftest_c99_program
+ _ACEOF
+-for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
++for ac_arg in '' -std=gnu99 -qlanglvl=extc1x -qlanglvl=extc99
+ do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+@@ -6659,7 +6659,7 @@ _ACEOF
+ /* end confdefs.h. */
+ $ac_c_conftest_c99_program
+ _ACEOF
+-for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
++for ac_arg in '' -std=gnu99 -qlanglvl=extc1x -qlanglvl=extc99
+ do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+@@ -7270,7 +7270,7 @@ _ACEOF
+ /* end confdefs.h. */
+ $ac_cxx_conftest_cxx98_program
+ _ACEOF
+-for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
++for ac_arg in '' -std=gnu++98 -qlanglvl=extended -AA
+ do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+@@ -12320,7 +12320,7 @@ printf %s "checking whether the $compiler linker ($LD)
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+- link_all_deplibs=unknown
++ link_all_deplibs=no
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+@@ -12622,7 +12622,7 @@ _LT_EOF
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
+ fi
+ ;;
+
+@@ -12641,7 +12641,7 @@ _LT_EOF
+ _LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
+ else
+ ld_shlibs=no
+ fi
+@@ -12670,7 +12670,7 @@ _LT_EOF
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
+ else
+ ld_shlibs=no
+ fi
+@@ -12688,7 +12688,7 @@ _LT_EOF
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
+ else
+ ld_shlibs=no
+ fi
+@@ -13344,7 +13344,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-version-script,$lib-ver'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ else
+@@ -14194,7 +14194,7 @@ freebsd* | dragonfly*)
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
++ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+@@ -15345,7 +15345,7 @@ printf %s "checking whether stripping libraries is pos
+ old_striplib=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+ printf %s "checking whether stripping libraries is possible... " >&6; }
+-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
++if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -15592,7 +15592,7 @@ module_expsym_cmds_CXX=
+ inherit_rpath_CXX=no
+ module_cmds_CXX=
+ module_expsym_cmds_CXX=
+-link_all_deplibs_CXX=unknown
++link_all_deplibs_CXX=no
+ old_archive_cmds_CXX=$old_archive_cmds
+ reload_flag_CXX=$reload_flag
+ reload_cmds_CXX=$reload_cmds
+@@ -15806,7 +15806,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
+ # archiving commands below assume that GNU ld is being used.
+ if test yes = "$with_gnu_ld"; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+@@ -16502,7 +16502,7 @@ fi
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+@@ -16510,7 +16510,7 @@ fi
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+@@ -16542,7 +16542,7 @@ fi
+ ;;
+ *) # Version 6 and above use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
+ ;;
+ esac
+
+@@ -16553,7 +16553,7 @@ fi
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-version-script $wl$lib-ver'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+@@ -16587,7 +16587,7 @@ fi
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-version-script $wl$lib-ver'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object_CXX=yes
+@@ -16655,7 +16655,7 @@ fi
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-version-script,$lib-ver -o $lib'
+ export_dynamic_flag_spec_CXX='$wl-E'
+ whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ fi
+@@ -18186,7 +18186,7 @@ freebsd* | dragonfly*)
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
++ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+@@ -21930,7 +21930,7 @@ case $host_os in
+
+ case $host_os in
+
+- freebsd*)
++dragonfly* | freebsd*)
+
+ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+ # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+@@ -22897,24 +22897,19 @@ HDF5 support is being disabled (equivalent to --with-h
with_hdf5="no"
with_hdf5_fortran="no"
else
- HDF5_SHOW=$(eval $H5CC -show)
-+ HDF5_SHOW=`$PKG_CONFIG --cflags hdf5 --libs hdf5`
++ HDF5_SHOW=`$PKG_CONFIG --cflags hdf5 --libs hdf5`
-- HDF5_CC=$(eval $H5CC -show | $AWK '{print $1}')
+- HDF5_CC=$(eval $H5CC -show | head -n 1 | $AWK '{print $1}')
- if test "$HDF5_CC" = "ccache"; then
-- HDF5_CC=$(eval $H5CC -show | $AWK '{print $2}')
+- HDF5_CC=$(eval $H5CC -show | head -n 1 | $AWK '{print $2}')
- fi
-+ HDF5_CC=$CC
++ HDF5_CC=$CC
-+ HDF5_VERSION=`$GREP 'HDF5 Version:' %%LOCALBASE%%/lib/libhdf5.settings \
-+ | $AWK '{print $3}'`
- HDF5_VERSION=$(eval $H5CC -showconfig | $GREP 'HDF5 Version:' \
- | $AWK '{print $3}')
-+ HDF5_tmp_flags=`$GREP 'FLAGS\|Extra libraries:' %%LOCALBASE%%/lib/libhdf5.settings \
-+ | $AWK -F: '{printf("%s "), $2}' `
++ HDF5_VERSION=`$GREP 'HDF5 Version:' /usr/local/lib/libhdf5.settings \
++ | $AWK '{print $3}'`
- HDF5_tmp_flags=$(eval $H5CC -showconfig \
- | $GREP 'FLAGS\|Extra libraries:' \
- | $AWK -F: '{printf("%s "), $2}' )
-+ HDF5_tmp_inst=`$GREP 'Installation point:' %%LOCALBASE%%/lib/libhdf5.settings \
-+ | $AWK '{print $NF}' `
++ HDF5_tmp_flags=`$GREP 'FLAGS\|Extra libraries:' /usr/local/lib/libhdf5.settings \
++ | $AWK -F: '{printf("%s "), $2}'`
- HDF5_tmp_inst=$(eval $H5CC -showconfig \
- | $GREP 'Installation point:' \
- | $AWK '{print $NF}' )
--
++ HDF5_tmp_inst=`$GREP 'Installation point:' /usr/local/lib/libhdf5.settings \
++ | $AWK '{print $NF}'`
+
HDF5_CPPFLAGS="-I${HDF5_tmp_inst}/include"
- for arg in $HDF5_SHOW $HDF5_tmp_flags ; do
-@@ -20907,7 +20901,7 @@ $as_echo "$H5FC" >&6; }
+@@ -23062,7 +23057,7 @@ printf "%s\n" "$H5FC" >&6; }
with_hdf5_fortran="yes"
@@ -43,50 +231,12 @@
do
case "$arg" in #(
-I*) echo $HDF5_FFLAGS | $GREP -e "$arg" >/dev/null \
-@@ -20967,9 +20961,8 @@ fi
- # because slurm uses the 1.8 API. By defining this CPP macro we get
- # the 1.8 API.
+@@ -23172,7 +23167,7 @@ fi
+
+ if test "$ax_compare_version" = "true" ; then
--$as_echo "#define H5_NO_DEPRECATED_SYMBOLS 1" >>confdefs.h
+-printf "%s\n" "#define H5_NO_DEPRECATED_SYMBOLS 1" >>confdefs.h
+# Remove on FreeBSD ports because we use 1.12 with 1.10 API
--
- #
- # Handle user hints
- #
-@@ -24075,8 +24068,24 @@ fi
-
-
- x_ac_lua_pkg_name="lua"
-- #check for 5.3 then 5.2 then 5.1
-- if test -n "$PKG_CONFIG" && \
-+ #check for 5.4 then 5.3 then 5.2 then 5.1
-+if test -n "$PKG_CONFIG" && \
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.4\""; } >&5
-+ ($PKG_CONFIG --exists --print-errors "lua5.4") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; then
-+ x_ac_lua_pkg_name=lua5.4
-+else
-+ if test -n "$PKG_CONFIG" && \
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.4\""; } >&5
-+ ($PKG_CONFIG --exists --print-errors "lua-5.4") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; then
-+ x_ac_lua_pkg_name=lua-5.4
-+else
-+ if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.3\""; } >&5
- ($PKG_CONFIG --exists --print-errors "lua5.3") 2>&5
- ac_status=$?
-@@ -24125,6 +24134,8 @@ else
- x_ac_lua_pkg_name=lua-5.1
- else
- x_ac_lua_pkg_name="lua >= 5.1"
-+fi
-+fi
- fi
- fi
- fi
+ else
+ printf "%s\n" "#define H5_USE_18_API 1" >>confdefs.h
diff --git a/sysutils/slurm-wlm/files/patch-etc_slurm.conf.example b/sysutils/slurm-wlm/files/patch-etc_slurm.conf.example
index 4b8872095bdc..ce9c31fd439b 100644
--- a/sysutils/slurm-wlm/files/patch-etc_slurm.conf.example
+++ b/sysutils/slurm-wlm/files/patch-etc_slurm.conf.example
@@ -1,86 +1,79 @@
---- etc/slurm.conf.example.orig 2020-03-26 21:44:05 UTC
+--- etc/slurm.conf.example.orig 2023-11-21 22:33:29 UTC
+++ etc/slurm.conf.example
@@ -8,8 +8,9 @@
- #
+ # Put this file on all nodes of your cluster.
# See the slurm.conf man page for more information.
#
--ClusterName=linux
--ControlMachine=linux0
+-ClusterName=cluster
+-SlurmctldHost=linux0
+ClusterName=Beastie
+# Short hostname of the head node
-+ControlMachine=head
- #ControlAddr=
- #BackupController=
- #BackupAddr=
-@@ -25,8 +26,8 @@ StateSaveLocation=/var/spool/slurm/ctld
- SlurmdSpoolDir=/var/spool/slurm/d
- SwitchType=switch/none
- MpiDefault=none
--SlurmctldPidFile=/var/run/slurmctld.pid
--SlurmdPidFile=/var/run/slurmd.pid
-+SlurmctldPidFile=/var/run/slurm/slurmctld.pid
-+SlurmdPidFile=/var/run/slurm/slurmd.pid
- ProctrackType=proctrack/pgid
- #PluginDir=
- #FirstJobId=
-@@ -34,7 +35,7 @@ ReturnToService=0
- #MaxJobCount=
- #PlugStackConfig=
- #PropagatePrioProcess=
++SlurmctldHost=head
+ #SlurmctldHost=
+ #
+ #DisableRootJobs=NO
+@@ -41,7 +42,7 @@ ProctrackType=proctrack/cgroup
+ #PrologFlags=
+ #PrologSlurmctld=
+ #PropagatePrioProcess=0
-#PropagateResourceLimits=
+PropagateResourceLimits=NONE
#PropagateResourceLimitsExcept=
- #Prolog=
- #Epilog=
-@@ -42,7 +43,9 @@ ReturnToService=0
- #SrunEpilog=
- #TaskProlog=
+ #RebootProgram=
+ ReturnToService=1
+@@ -58,6 +59,8 @@ TaskPlugin=task/affinity
+ SwitchType=switch/none
#TaskEpilog=
--#TaskPlugin=
-+TaskPlugin=task/affinity
+ TaskPlugin=task/affinity
+TaskPluginParam=cores
+# For debugging: TaskPluginParam=cores,verbose
- #TrackWCKey=no
- #TreeWidth=50
- #TmpFS=
-@@ -57,10 +60,11 @@ KillWait=30
- Waittime=0
+ #TaskProlog=
+ #TopologyPlugin=topology/tree
+ #TmpFS=/tmp
+@@ -88,11 +91,12 @@ Waittime=0
+ #
#
# SCHEDULING
+-#DefMemPerCPU=0
+DefMemPerCPU=256
+ #MaxMemPerCPU=0
+ #SchedulerTimeSlice=30
SchedulerType=sched/backfill
- #SchedulerAuth=
SelectType=select/cons_tres
--SelectTypeParameters=CR_Core
+SelectTypeParameters=CR_Core_Memory
- #PriorityType=priority/multifactor
- #PriorityDecayHalfLife=14-0
- #PriorityUsageResetPeriod=14-0
-@@ -72,22 +76,58 @@ SelectTypeParameters=CR_Core
#
- # LOGGING
+ #
+ # JOB PRIORITY
+@@ -115,9 +119,11 @@ SelectType=select/cons_tres
+ #AccountingStorageHost=
+ #AccountingStoragePass=
+ #AccountingStoragePort=
+-AccountingStorageType=accounting_storage/none
++#AccountingStorageType=accounting_storage/slurmdb
++#AccountingStorageLoc=/home/slurm/Accounting
++#AccountingStoreJobComment=YES
+ #AccountingStorageUser=
+-#AccountingStoreFlags=
++AccountingStoreFlags=job_comment
+ #JobCompHost=
+ #JobCompLoc=
+ #JobCompPass=
+@@ -128,9 +134,9 @@ SlurmctldDebug=info
+ JobAcctGatherFrequency=30
+ JobAcctGatherType=jobacct_gather/none
SlurmctldDebug=info
-SlurmctldLogFile=/var/log/slurmctld.log
+SlurmctldLogFile=/var/log/slurm/slurmctld
SlurmdDebug=info
-SlurmdLogFile=/var/log/slurmd.log
+SlurmdLogFile=/var/log/slurm/slurmd
- JobCompType=jobcomp/none
- #JobCompLoc=
+ #SlurmSchedLogFile=
+ #SlurmSchedLogLevel=
+ #DebugFlags=
+@@ -148,6 +154,41 @@ SlurmdLogFile=/var/log/slurmd.log
+ #SuspendTime=
#
- # ACCOUNTING
--#JobAcctGatherType=jobacct_gather/linux
-+JobAcctGatherType=jobacct_gather/none
- #JobAcctGatherFrequency=30
#
--#AccountingStorageType=accounting_storage/slurmdbd
-+AccountingStorageType=accounting_storage/filetxt
-+AccountingStorageLoc=/home/slurm/Accounting
-+AccountingStoreJobComment=YES
- #AccountingStorageHost=
- #AccountingStorageLoc=
- #AccountingStoragePass=
- #AccountingStorageUser=
+
+############################################################################
+# Enable power saving if remote IPMI power-on is available on compute nodes.
@@ -89,7 +82,7 @@
+# login shell in order to execute shutdown on compute nodes.
+# If you prefer to control power manually, see the following scripts
+# from the SPCM port:
- #
++ #
+# auto-ipmi-remote-power
+# cluster-power-saver
+# cluster-power-waster
@@ -112,7 +105,7 @@
+
+#
# COMPUTE NODES
--NodeName=linux[1-32] Procs=1 State=UNKNOWN
+-NodeName=linux[1-32] CPUs=1 State=UNKNOWN
-PartitionName=debug Nodes=ALL Default=YES MaxTime=INFINITE State=UP
+# Set RealMemory < avail memory in /var/run/dmesg.boot
+# Note that it may change slightly following freebsd-update
diff --git a/sysutils/slurm-wlm/files/patch-src_api_Makefile.in b/sysutils/slurm-wlm/files/patch-src_api_Makefile.in
deleted file mode 100644
index 955345040c2a..000000000000
--- a/sysutils/slurm-wlm/files/patch-src_api_Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/api/Makefile.in.orig 2021-05-12 20:23:20 UTC
-+++ src/api/Makefile.in
-@@ -1306,7 +1306,6 @@ $(VERSION_SCRIPT) :
- echo " slurmdb_*;"; \
- echo " plugin_context_*;"; \
- echo " working_cluster_rec;"; \
-- echo " local: *;"; \
- echo "};") > $(VERSION_SCRIPT)
-
- $(FULL_VERSION_SCRIPT) :
diff --git a/sysutils/slurm-wlm/files/patch-src_common_callerid.h b/sysutils/slurm-wlm/files/patch-src_common_callerid.h
new file mode 100644
index 000000000000..e6ad8f5413d2
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_common_callerid.h
@@ -0,0 +1,10 @@
+--- src/common/callerid.h.orig 2023-06-15 19:16:14 UTC
++++ src/common/callerid.h
+@@ -43,6 +43,7 @@
+ #ifdef __FreeBSD__
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <netdb.h>
+ #endif
+
+ typedef struct {
diff --git a/sysutils/slurm-wlm/files/patch-src_common_conmgr.c b/sysutils/slurm-wlm/files/patch-src_common_conmgr.c
new file mode 100644
index 000000000000..4a536f2854cc
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_common_conmgr.c
@@ -0,0 +1,11 @@
+--- src/common/conmgr.c.orig 2023-11-21 22:33:29 UTC
++++ src/common/conmgr.c
+@@ -47,6 +47,8 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/un.h>
++#include <sys/param.h>
++#include <sys/ucred.h>
+ #include <time.h>
+ #include <unistd.h>
+
diff --git a/sysutils/slurm-wlm/files/patch-src_interfaces_cgroup.c b/sysutils/slurm-wlm/files/patch-src_interfaces_cgroup.c
new file mode 100644
index 000000000000..12bf2f7f5656
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_interfaces_cgroup.c
@@ -0,0 +1,18 @@
+--- src/interfaces/cgroup.c.orig 2023-11-21 22:33:29 UTC
++++ src/interfaces/cgroup.c
+@@ -419,6 +419,7 @@ extern char *autodetect_cgroup_version(void)
+ struct statfs fs;
+ int cgroup_ver = -1;
+
++#ifndef __FreeBSD__
+ if (statfs("/sys/fs/cgroup/", &fs) < 0) {
+ error("cgroup filesystem not mounted in /sys/fs/cgroup/");
+ return NULL;
+@@ -451,6 +452,7 @@ extern char *autodetect_cgroup_version(void)
+ error("Unknown filesystem type mounted on /sys/fs/cgroup");
+ return NULL;
+ }
++#endif
+
+ log_flag(CGROUP, "%s: using cgroup version %d", __func__, cgroup_ver);
+
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_auth_slurm_net__aliases.c b/sysutils/slurm-wlm/files/patch-src_plugins_auth_slurm_net__aliases.c
new file mode 100644
index 000000000000..17f9e1d76fdd
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_plugins_auth_slurm_net__aliases.c
@@ -0,0 +1,13 @@
+--- src/plugins/auth/slurm/net_aliases.c.orig 2023-12-13 21:49:39 UTC
++++ src/plugins/auth/slurm/net_aliases.c
+@@ -40,6 +40,10 @@
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+ #include <sys/types.h>
++#if defined(__FreeBSD__)
++#include <netinet/in.h>
++#include <sys/socket.h>
++#endif
+
+ #include "slurm/slurm.h"
+ #include "slurm/slurm_errno.h"
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_cli__filter_user__defaults_cli__filter__user__defaults.c b/sysutils/slurm-wlm/files/patch-src_plugins_cli__filter_user__defaults_cli__filter__user__defaults.c
index 1f0d4ba9681a..9d0c3a93d22d 100644
--- a/sysutils/slurm-wlm/files/patch-src_plugins_cli__filter_user__defaults_cli__filter__user__defaults.c
+++ b/sysutils/slurm-wlm/files/patch-src_plugins_cli__filter_user__defaults_cli__filter__user__defaults.c
@@ -1,6 +1,6 @@
---- src/plugins/cli_filter/user_defaults/cli_filter_user_defaults.c.orig 2020-04-02 16:01:45 UTC
+--- src/plugins/cli_filter/user_defaults/cli_filter_user_defaults.c.orig 2023-03-28 20:19:41 UTC
+++ src/plugins/cli_filter/user_defaults/cli_filter_user_defaults.c
-@@ -44,6 +44,7 @@
+@@ -45,6 +45,7 @@
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_job__container_tmpfs_job__container__tmpfs.c b/sysutils/slurm-wlm/files/patch-src_plugins_job__container_tmpfs_job__container__tmpfs.c
new file mode 100644
index 000000000000..bf60423ff176
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_plugins_job__container_tmpfs_job__container__tmpfs.c
@@ -0,0 +1,11 @@
+--- src/plugins/job_container/tmpfs/job_container_tmpfs.c.orig 2023-11-21 22:33:29 UTC
++++ src/plugins/job_container/tmpfs/job_container_tmpfs.c
+@@ -612,7 +612,7 @@ static int _create_ns(uint32_t job_id, stepd_step_rec_
+ goto exit1;
+ }
+
+- xstrfmtcat(proc_path, "/proc/%u/ns/mnt", cpid);
++ xstrfmtcat(proc_path, "/compat/linux/proc/%u/ns/mnt", cpid);
+
+ /*
+ * Bind mount /proc/pid/ns/mnt to hold namespace active
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_jobacct__gather_common_common__jag.c b/sysutils/slurm-wlm/files/patch-src_plugins_jobacct__gather_common_common__jag.c
index 37753084f886..426c9ab710b7 100644
--- a/sysutils/slurm-wlm/files/patch-src_plugins_jobacct__gather_common_common__jag.c
+++ b/sysutils/slurm-wlm/files/patch-src_plugins_jobacct__gather_common_common__jag.c
@@ -1,5 +1,14 @@
---- src/plugins/jobacct_gather/common/common_jag.c.orig 2020-01-18 14:05:02 UTC
+--- src/plugins/jobacct_gather/common/common_jag.c.orig 2023-11-21 22:33:29 UTC
+++ src/plugins/jobacct_gather/common/common_jag.c
+@@ -233,7 +233,7 @@ static int _get_sys_interface_freq_line(uint32_t cpu,
+ } else {
+ /* frequency scaling not enabled */
+ if (!cpunfo_frequency) {
+- snprintf(freq_file, 14, "/proc/cpuinfo");
++ snprintf(freq_file, 14, "/compat/linux/proc/cpuinfo");
+ log_flag(JAG, "filename = %s (cpu scaling not enabled)",
+ freq_file);
+ if ((sys_fp = fopen(freq_file, "r")) != NULL) {
@@ -250,6 +250,11 @@ static int _get_sys_interface_freq_line(uint32_t cpu,
return 0;
}
@@ -12,14 +21,65 @@
static int _is_a_lwp(uint32_t pid)
{
char *filename = NULL;
-@@ -258,6 +263,10 @@ static int _is_a_lwp(uint32_t pid)
- ssize_t n;
+@@ -259,8 +264,12 @@ static int _is_a_lwp(uint32_t pid)
char *tgids = NULL;
pid_t tgid = -1;
-+
+
+- xstrfmtcat(filename, "/proc/%u/status", pid);
+ // Disable check for now, this will only skew process accounting
+ // slightly by including threads
+ return 0;
- xstrfmtcat(filename, "/proc/%u/status", pid);
++ xstrfmtcat(filename, "/compat/linux/proc/%u/status", pid);
++
+ fd = open(filename, O_RDONLY);
+ if (fd < 0) {
+ xfree(filename);
+@@ -503,7 +512,7 @@ void _set_smaps_file(char **proc_smaps_file, pid_t pid
+ static int use_smaps_rollup = -1;
+
+ if (use_smaps_rollup == -1) {
+- xstrfmtcat(*proc_smaps_file, "/proc/%d/smaps_rollup", pid);
++ xstrfmtcat(*proc_smaps_file, "/compat/linux/proc/%d/smaps_rollup", pid);
+ FILE *fd = fopen(*proc_smaps_file, "r");
+ if (fd) {
+ fclose(fd);
+@@ -514,9 +523,9 @@ void _set_smaps_file(char **proc_smaps_file, pid_t pid
+ }
+
+ if (use_smaps_rollup)
+- xstrfmtcat(*proc_smaps_file, "/proc/%d/smaps_rollup", pid);
++ xstrfmtcat(*proc_smaps_file, "/compat/linux/proc/%d/smaps_rollup", pid);
+ else
+- xstrfmtcat(*proc_smaps_file, "/proc/%d/smaps", pid);
++ xstrfmtcat(*proc_smaps_file, "/compat/linux/proc/%d/smaps", pid);
+ }
+
+ static void _handle_stats(pid_t pid, jag_callbacks_t *callbacks, int tres_count)
+@@ -551,7 +560,7 @@ static void _handle_stats(pid_t pid, jag_callbacks_t *
+ disable_gpu_acct = 0;
+ }
+
+- xstrfmtcat(proc_file, "/proc/%u/stat", pid);
++ xstrfmtcat(proc_file, "/compat/linux/proc/%u/stat", pid);
+ if (!(stat_fp = fopen(proc_file, "r")))
+ return; /* Assume the process went away */
+ /*
+@@ -598,7 +607,7 @@ static void _handle_stats(pid_t pid, jag_callbacks_t *
+ /* Remove shared data from rss */
+ if (no_share_data) {
+ xfree(proc_file);
+- xstrfmtcat(proc_file, "/proc/%u/statm", pid);
++ xstrfmtcat(proc_file, "/compat/linux/proc/%u/statm", pid);
+ if (!_remove_share_data(proc_file, prec))
+ goto bail_out;
+ }
+@@ -612,7 +621,7 @@ static void _handle_stats(pid_t pid, jag_callbacks_t *
+ }
+ xfree(proc_file);
+- xstrfmtcat(proc_file, "/proc/%u/io", pid);
++ xstrfmtcat(proc_file, "/compat/linux/proc/%u/io", pid);
+ if ((io_fp = fopen(proc_file, "r"))) {
+ fd2 = fileno(io_fp);
+ if (fcntl(fd2, F_SETFD, FD_CLOEXEC) == -1)
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_mpi_cray__shasta_mpi__cray__shasta.c b/sysutils/slurm-wlm/files/patch-src_plugins_mpi_cray__shasta_mpi__cray__shasta.c
index 984ba746751c..4ba25ef6da2c 100644
--- a/sysutils/slurm-wlm/files/patch-src_plugins_mpi_cray__shasta_mpi__cray__shasta.c
+++ b/sysutils/slurm-wlm/files/patch-src_plugins_mpi_cray__shasta_mpi__cray__shasta.c
@@ -1,10 +1,10 @@
---- src/plugins/mpi/cray_shasta/mpi_cray_shasta.c.orig 2020-04-02 16:02:44 UTC
+--- src/plugins/mpi/cray_shasta/mpi_cray_shasta.c.orig 2023-03-28 20:19:41 UTC
+++ src/plugins/mpi/cray_shasta/mpi_cray_shasta.c
-@@ -39,6 +39,7 @@
+@@ -46,6 +46,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <limits.h>
#include "slurm/slurm_errno.h"
-
+ #include "src/common/slurm_xlator.h"
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_switch_cray__aries_switch__cray__aries.c b/sysutils/slurm-wlm/files/patch-src_plugins_switch_cray__aries_switch__cray__aries.c
deleted file mode 100644
index ba5d47f80016..000000000000
--- a/sysutils/slurm-wlm/files/patch-src_plugins_switch_cray__aries_switch__cray__aries.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/plugins/switch/cray_aries/switch_cray_aries.c.orig 2020-01-18 14:02:02 UTC
-+++ src/plugins/switch/cray_aries/switch_cray_aries.c
-@@ -43,7 +43,9 @@
- #include <fcntl.h>
- #include <inttypes.h>
- #include <limits.h>
-+#ifdef __linux__
- #include <linux/limits.h>
-+#endif
- #include <math.h>
- #include <sched.h>
- #include <signal.h>
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c b/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c
deleted file mode 100644
index cf09d539002c..000000000000
--- a/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/plugins/task/affinity/affinity.c.orig 2021-05-12 20:23:20 UTC
-+++ src/plugins/task/affinity/affinity.c
-@@ -297,7 +297,7 @@ void reset_cpuset(cpu_set_t *new_mask, cpu_set_t *cur_
- if (slurm_getaffinity(1, sizeof(full_mask), &full_mask)) {
- /* Try to get full CPU mask from process init */
- CPU_ZERO(&full_mask);
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) && !defined(CPU_ALLOC)
- CPU_OR(&full_mask, cur_mask);
- #else
- CPU_OR(&full_mask, &full_mask, cur_mask);
diff --git a/sysutils/slurm-wlm/files/patch-src_scrun_anchor.c b/sysutils/slurm-wlm/files/patch-src_scrun_anchor.c
new file mode 100644
index 000000000000..2e2ab45af905
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_scrun_anchor.c
@@ -0,0 +1,27 @@
+--- src/scrun/anchor.c.orig 2023-11-21 22:33:29 UTC
++++ src/scrun/anchor.c
+@@ -43,7 +43,12 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/param.h>
++#ifdef __FreeBSD__
++#include <pthread_np.h>
++#include <sys/signal.h>
++#else
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+@@ -1034,7 +1039,11 @@ static void _set_proctitle()
+
+ setproctitle("%s", state.id);
+ xstrfmtcat(thread_name, "scrun:%s", state.id);
++#ifdef __FreeBSD__
++ if (pthread_setname_np(pthread_self(), thread_name) < 0) {
++#else
+ if (prctl(PR_SET_NAME, thread_name, NULL, NULL, NULL) < 0) {
++#endif
+ fatal("Unable to set process name");
+ }
+ xfree(thread_name);
diff --git a/sysutils/slurm-wlm/files/patch-src_scrun_commands.c b/sysutils/slurm-wlm/files/patch-src_scrun_commands.c
new file mode 100644
index 000000000000..8d7fe43ec92b
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_scrun_commands.c
@@ -0,0 +1,13 @@
+--- src/scrun/commands.c.orig 2023-11-21 22:33:29 UTC
++++ src/scrun/commands.c
+@@ -39,6 +39,10 @@
+ #include <signal.h>
+ #include <unistd.h>
+
++#ifdef __FreeBSD__
++#include <sys/signal.h>
++#endif
++
+ #include "src/common/daemonize.h"
+ #include "src/common/fd.h"
+ #include "src/common/log.h"
diff --git a/sysutils/slurm-wlm/files/patch-src_scrun_scrun.c b/sysutils/slurm-wlm/files/patch-src_scrun_scrun.c
new file mode 100644
index 000000000000..95511eeec11c
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_scrun_scrun.c
@@ -0,0 +1,24 @@
+--- src/scrun/scrun.c.orig 2023-03-28 20:15:54 UTC
++++ src/scrun/scrun.c
+@@ -45,6 +45,9 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#ifdef __FreeBSD__
++#include <sys/param.h>
++#endif
+
+ #include "src/common/data.h"
+ #include "src/common/log.h"
+@@ -186,7 +189,11 @@ static void _parse_create(int argc, char **argv)
+ }
+
+ if (!state.bundle) {
++#ifdef __FreeBSD__
++ char *dir = getcwd(NULL, PATH_MAX);
++#else
+ char *dir = get_current_dir_name();
++#endif
+ state.bundle = xstrdup(dir);
+ free(dir);
+ }
diff --git a/sysutils/slurm-wlm/files/patch-src_scrun_srun.c b/sysutils/slurm-wlm/files/patch-src_scrun_srun.c
new file mode 100644
index 000000000000..05de1170c73d
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_scrun_srun.c
@@ -0,0 +1,12 @@
+--- src/scrun/srun.c.orig 2023-03-28 20:15:54 UTC
++++ src/scrun/srun.c
+@@ -40,7 +40,9 @@
+
+ #include <fcntl.h>
+ #include <stdlib.h>
++#ifndef __FreeBSD__
+ #include <sys/prctl.h>
++#endif
+ #include <sys/stat.h>
+ #include <sys/un.h>
+ #include <termios.h>
diff --git a/sysutils/slurm-wlm/files/patch-src_slurmctld_prep__slurmctld.c b/sysutils/slurm-wlm/files/patch-src_slurmctld_prep__slurmctld.c
deleted file mode 100644
index fe4fcae2d841..000000000000
--- a/sysutils/slurm-wlm/files/patch-src_slurmctld_prep__slurmctld.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/slurmctld/prep_slurmctld.c.orig 2020-04-02 16:23:16 UTC
-+++ src/slurmctld/prep_slurmctld.c
-@@ -35,6 +35,7 @@
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- \*****************************************************************************/
-
-+#include <signal.h>
- #include "src/slurmctld/job_scheduler.h"
- #include "src/slurmctld/locks.h"
- #include "src/slurmctld/power_save.h"
diff --git a/sysutils/slurm-wlm/files/patch-src_slurmd_slurmd_slurmd.h b/sysutils/slurm-wlm/files/patch-src_slurmd_slurmd_slurmd.h
new file mode 100644
index 000000000000..3197178e7d54
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_slurmd_slurmd_slurmd.h
@@ -0,0 +1,10 @@
+--- src/slurmd/slurmd/slurmd.h.orig 2023-12-13 21:49:39 UTC
++++ src/slurmd/slurmd/slurmd.h
+@@ -43,6 +43,7 @@
+ #include <limits.h>
+ #include <pthread.h>
+ #include <sys/types.h>
++#include <limits.h>
+
+ #include "src/common/log.h"
+ #include "src/common/list.h"