git: 9adb7c18c470 - main - sysutils/slurm-wlm: upgrade to 23.11.1
Date: Mon, 18 Dec 2023 21:27:02 UTC
The branch main has been updated by thierry: URL: https://cgit.FreeBSD.org/ports/commit/?id=9adb7c18c4707e89084824854d4e8cce3157df6e commit 9adb7c18c4707e89084824854d4e8cce3157df6e Author: Thierry Thomas <thierry@FreeBSD.org> AuthorDate: 2023-12-18 21:13:00 +0000 Commit: Thierry Thomas <thierry@FreeBSD.org> CommitDate: 2023-12-18 21:26:58 +0000 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> --- sysutils/slurm-wlm/Makefile | 115 ++-- sysutils/slurm-wlm/distinfo | 6 +- sysutils/slurm-wlm/files/patch-configure | 268 +++++++-- .../slurm-wlm/files/patch-etc_slurm.conf.example | 109 ++-- sysutils/slurm-wlm/files/patch-src_api_Makefile.in | 10 - .../slurm-wlm/files/patch-src_common_callerid.h | 10 + sysutils/slurm-wlm/files/patch-src_common_conmgr.c | 11 + .../slurm-wlm/files/patch-src_interfaces_cgroup.c | 18 + .../patch-src_plugins_auth_slurm_net__aliases.c | 13 + ...er_user__defaults_cli__filter__user__defaults.c | 4 +- ...ns_job__container_tmpfs_job__container__tmpfs.c | 11 + ...rc_plugins_jobacct__gather_common_common__jag.c | 70 ++- ...rc_plugins_mpi_cray__shasta_mpi__cray__shasta.c | 6 +- ...lugins_switch_cray__aries_switch__cray__aries.c | 12 - .../patch-src_plugins_task_affinity_affinity.c | 11 - sysutils/slurm-wlm/files/patch-src_scrun_anchor.c | 27 + .../slurm-wlm/files/patch-src_scrun_commands.c | 13 + sysutils/slurm-wlm/files/patch-src_scrun_scrun.c | 24 + sysutils/slurm-wlm/files/patch-src_scrun_srun.c | 12 + .../files/patch-src_slurmctld_prep__slurmctld.c | 10 - .../files/patch-src_slurmd_slurmd_slurmd.h | 10 + sysutils/slurm-wlm/pkg-plist | 631 ++++++++------------- 22 files changed, 784 insertions(+), 617 deletions(-) diff --git a/sysutils/slurm-wlm/Makefile b/sysutils/slurm-wlm/Makefile index acc08dafa461..fcd497736d99 100644 --- a/sysutils/slurm-wlm/Makefile +++ b/sysutils/slurm-wlm/Makefile @@ -1,8 +1,7 @@ PORTNAME= slurm -DISTVERSION= 20.02.7 -PORTREVISION= 3 -CATEGORIES= sysutils python -MASTER_SITES= https://ftp.icm.edu.pl/packages/slurm/ +DISTVERSION= 23.11.1 +CATEGORIES= sysutils +MASTER_SITES= https://download.schedmd.com/slurm/ PKGNAMESUFFIX= -wlm MAINTAINER= ports@FreeBSD.org @@ -18,10 +17,19 @@ NOT_FOR_ARCHS_REASON= 32-bit support is deprecated LIB_DEPENDS= libjson-c.so:devel/json-c \ libsysinfo.so:devel/libsysinfo \ libmunge.so:security/munge \ - liblz4.so:archivers/liblz4 - -USES= compiler:c11 cpe gmake gnome libtool localbase lua perl5 \ - pkgconfig python:build readline shebangfix ssl tar:bz2 + liblz4.so:archivers/liblz4 \ + libze_loader.so:devel/level-zero \ + libhttp_parser.so:www/http-parser \ + libunwind.so:devel/libunwind \ + librdkafka.so:net/librdkafka \ + libyaml.so:textproc/libyaml \ + libdbus-1.so:devel/dbus \ + libcheck.so:devel/check \ + libtbb.so:devel/onetbb \ + libjwt.so:www/libjwt + +USES= compiler:c11 cpe gmake gnome libtool localbase lua mysql:client \ + perl5 pkgconfig python:build readline shebangfix ssl tar:bz2 USE_PERL5= build CPE_VENDOR= schedmd USE_LDCONFIG= yes @@ -32,10 +40,11 @@ GROUPS= ${USERS} GNU_CONFIGURE= yes INSTALL_TARGET= install-strip -PLIST_SUB= PORTVERSION="${PORTVERSION}" +TEST_TARGET= check +PLIST_SUB= PORTVERSION="${DISTVERSION}" VER="${DISTVERSION:R}" SHEBANG_FILES= doc/html/shtml2html.py doc/man/man2html.py -OPTIONS_DEFINE= CURL DOCS GUI HDF5 HWLOC IPMI MYSQL RRD +OPTIONS_DEFINE= CURL DOCS GUI HDF5 HWLOC IPMI RRD OPTIONS_DEFAULT= HDF5 HWLOC OPTIONS_SUB= yes @@ -51,14 +60,12 @@ DOCS_BUILD_DEPENDS= man2html:textproc/man2html CURL_LIB_DEPENDS= libcurl.so:ftp/curl CURL_CONFIGURE_WITH= libcurl -GUI_USE= GNOME=cairo,gdkpixbuf2,glib20,gtk20 +GUI_USE= GNOME=cairo,gdkpixbuf2,glib20,gtk20,pango GUI_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ - libfreetype.so:print/freetype2 + libfreetype.so:print/freetype2 \ + libharfbuzz.so:print/harfbuzz GUI_USES= gettext GUI_CONFIGURE_ENABLE= glibtest gtktest x11 -# Neither of these work. See post-patch below. -#GTK2_CONFIGURE_ENV_OFF= ac_gtk_test=no -#GTK2_CONFIGURE_OFF= --disable-gtktest HDF5_LIB_DEPENDS= libhdf5_cpp.so:science/hdf5 \ libsz.so:science/libaec @@ -71,58 +78,62 @@ HWLOC_CONFIGURE_WITH= hwloc IPMI_LIB_DEPENDS= libfreeipmi.so:sysutils/freeipmi IPMI_CONFIGURE_WITH= freeipmi -MYSQL_USES= mysql -MYSQL_CONFIGURE_OFF= --with-mysql_config=/nonexistent - RRD_LIB_DEPENDS= librrd.so:databases/rrdtool RRD_CONFIGURE_WITH= rrdtool -# --docdir is non-functional -# CONFIGURE_ARGS= --docdir=${DOCSDIR} # FreeBSD Infiniband support is still experimental # slurmrestd does not build on FreeBSD -CONFIGURE_ARGS= --without-ofed --disable-slurmrestd -DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${DISTVERSION} - -CFLAGS+= -I${WRKSRC}/slurm -I${LOCALBASE}/include -fcommon +CONFIGURE_ARGS= --without-ofed --disable-slurmrestd \ + --with-mysql_config=${LOCALBASE}/bin \ + --docdir=${DOCSDIR} --htmldir=${DOCSDIR} + +CFLAGS+= -I${WRKSRC}/slurm -I${LOCALBASE}/include \ + -I${LOCALBASE}/include/level_zero \ + -I${LOCALBASE}/include/librdkafka \ + -fcommon -D__BSD_VISIBLE=1 LDFLAGS+= -L${LOCALBASE}/lib -lsysinfo -lprocstat -fcommon +PROC2FIX= common/callerid.c common/fd.c common/fetch_config.c \ + interfaces/proctrack.c \ + plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c \ + plugins/acct_gather_filesystem/lustre/acct_gather_filesystem_lustre.c \ + plugins/burst_buffer/common/burst_buffer_common.c \ + plugins/cgroup/v1/xcgroup.c plugins/cgroup/v2/cgroup_v2.c \ + plugins/gpu/nvml/gpu_nvml.c \ + plugins/job_container/tmpfs/job_container_tmpfs.c \ + plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c \ + plugins/jobacct_gather/common/common_jag.c \ + plugins/jobacct_gather/linux/jobacct_gather_linux.c \ + plugins/node_features/knl_generic/node_features_knl_generic.c \ + plugins/proctrack/cgroup/proctrack_cgroup.c \ + plugins/proctrack/cray_aries/proctrack_cray_aries.c \ + plugins/proctrack/linuxproc/kill_tree.c \ + plugins/proctrack/pgid/proctrack_pgid.c \ + plugins/switch/cray_aries/scaling.c \ + plugins/task/affinity/affinity.c slurmd/common/set_oomadj.c \ + slurmd/common/xcpuinfo.c slurmd/slurmstepd/pdebug.c \ + slurmd/slurmstepd/req.c + +LLD2FIX= api plugins/openapi sacctmgr sackd scontrol scrontab scrun \ + slurmctld slurmd/slurmd squeue + # Hack around nonfunctional --disable-gtktest flag pre-configure-GUI-off: - @${REINPLACE_CMD} -e 's|min_gtk_version=.*|min_gtk_version=2000.0.0|' \ + ${REINPLACE_CMD} -e 's|min_gtk_version=.*|min_gtk_version=2000.0.0|' \ ${WRKSRC}/configure # SLURM's configure enables interactive jobs if pty.h exists. Replacing # #include <pty.h> with appropriate headers will therefore not work, so instead # add a pty.h for the build. pre-configure: - @${CP} ${FILESDIR}/pty.h ${WRKSRC}/slurm - @${REINPLACE_CMD} -e 's|sched_setaffinity|cpuset_setaffinity|g' \ + ${CP} ${FILESDIR}/pty.h ${WRKSRC}/slurm + ${REINPLACE_CMD} -e 's|sched_setaffinity|cpuset_setaffinity|g' \ -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/configure - - @${REINPLACE_CMD} -e 's|"/proc|"/compat/linux/proc|g' \ +.for src in ${PROC2FIX} + ${REINPLACE_CMD} -e 's|"/proc|"/compat/linux/proc|g' \ -e 's|(/proc)|(/compat/linux/proc)|g' \ - ${WRKSRC}/src/slurmd/slurmstepd/req.c \ - ${WRKSRC}/src/slurmd/slurmstepd/pdebug.c \ - ${WRKSRC}/src/slurmd/common/xcpuinfo.c \ - ${WRKSRC}/src/slurmd/common/xcgroup.c \ - ${WRKSRC}/src/slurmd/common/set_oomadj.c \ - ${WRKSRC}/src/slurmd/common/proctrack.c \ - ${WRKSRC}/src/common/callerid.c \ - ${WRKSRC}/src/plugins/task/affinity/affinity.c \ - ${WRKSRC}/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c \ - ${WRKSRC}/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c \ - ${WRKSRC}/src/plugins/jobacct_gather/common/common_jag.c \ - ${WRKSRC}/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c \ - ${WRKSRC}/src/plugins/switch/cray_aries/scaling.c \ - ${WRKSRC}/src/plugins/proctrack/cray_aries/proctrack_cray_aries.c \ - ${WRKSRC}/src/plugins/proctrack/cgroup/proctrack_cgroup.c \ - ${WRKSRC}/src/plugins/proctrack/pgid/proctrack_pgid.c \ - ${WRKSRC}/src/plugins/proctrack/linuxproc/kill_tree.c \ - ${WRKSRC}/src/plugins/acct_gather_filesystem/lustre/acct_gather_filesystem_lustre.c \ - ${WRKSRC}/src/plugins/node_features/knl_generic/node_features_knl_generic.c \ - ${WRKSRC}/contribs/cray/pam_job.c - + ${WRKSRC}/src/${src} +.endfor @if ${WHICH} sbatch > /dev/null; then \ ${ECHO_CMD} "********************************************"; \ ${ECHO_CMD} "Build may fail while slurm-wlm is installed."; \ @@ -130,6 +141,10 @@ pre-configure: ${ECHO_CMD} "********************************************"; \ false; \ fi + ${FIND} ${LLD2FIX:C|^|${WRKSRC}/src/|} -name Makefile.in | ${XARGS} \ + ${REINPLACE_CMD} -e 's|-r -o|-r -m elf_${ARCH} -o|' + ${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} \ + ${REINPLACE_CMD} -e 's|htmldir = \$${datadir.*$$|htmldir = @htmldir@|' post-install: ${INSTALL_DATA} ${WRKSRC}/etc/slurm.conf.example \ diff --git a/sysutils/slurm-wlm/distinfo b/sysutils/slurm-wlm/distinfo index fbbff46a6650..6f7a8d2043da 100644 --- a/sysutils/slurm-wlm/distinfo +++ b/sysutils/slurm-wlm/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1624569118 -SHA256 (slurm-20.02.7.tar.bz2) = 06865ff3cbf8bee1e75b12fa24c7d7a8fb0d4331f4c4a0d97c90058293d914ce -SIZE (slurm-20.02.7.tar.bz2) = 6562603 +TIMESTAMP = 1702833046 +SHA256 (slurm-23.11.1.tar.bz2) = 2f3f4ad4c92596c405d465f5a991bc50d85508b8b127fb2cc008a0980b7bdbd8 +SIZE (slurm-23.11.1.tar.bz2) = 7536436 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() + *** 903 LINES SKIPPED ***