Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2017 13:38:10 +0000 (UTC)
From:      Joseph Mingrone <jrm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r438780 - head/sysutils/slurm-wlm
Message-ID:  <201704181338.v3IDcAiI013431@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jrm
Date: Tue Apr 18 13:38:10 2017
New Revision: 438780
URL: https://svnweb.freebsd.org/changeset/ports/438780

Log:
  sysutils/slurm-wlm: Add support for the jobacct_gather/linux plugin
  
  - The plugin requires linprocfs, so add an off-by-defult option knob to
    depend on linux.
  - Patch source files to point to /compat/linux/proc.
  
  Submitted by:	Jason Bacon <bacon4000@gmail.com>
  Approved by:	swills (mentor, implicit)

Modified:
  head/sysutils/slurm-wlm/Makefile

Modified: head/sysutils/slurm-wlm/Makefile
==============================================================================
--- head/sysutils/slurm-wlm/Makefile	Tue Apr 18 12:58:16 2017	(r438779)
+++ head/sysutils/slurm-wlm/Makefile	Tue Apr 18 13:38:10 2017	(r438780)
@@ -34,7 +34,7 @@ USES=		gmake libtool pkgconfig python:bu
 USE_PERL5=	configure
 SHEBANG_FILES=	doc/html/shtml2html.py doc/man/man2html.py
 
-OPTIONS_DEFINE=	CURL DOCS GTK2 HDF5 HWLOC IPMI MYSQL RRD
+OPTIONS_DEFINE=	CURL DOCS GTK2 HDF5 HWLOC IPMI MYSQL RRD LINUX
 OPTIONS_DEFAULT=HDF5 HWLOC
 OPTIONS_SUB=	yes
 
@@ -44,6 +44,7 @@ HDF5_DESC=	Job profiling using HDF5
 HWLOC_DESC=	Portable hardware locality
 IPMI_DESC=	IPMI engergy consumption accounting
 RRD_DESC=	RRD external sensor data collection
+LINUX_DESC=	Support jobacct_gather/linux (requires linprocfs)
 
 DOCS_BUILD_DEPENDS=	man2html:textproc/man2html
 
@@ -75,6 +76,8 @@ MYSQL_CONFIGURE_OFF=	--with-mysql_config
 RRD_LIB_DEPENDS=	librrd.so:databases/rrdtool
 RRD_CONFIGURE_WITH=	rrdtool
 
+LINUX_USES=		linux
+
 CFLAGS+=	-I${WRKSRC}/slurm -I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib -lsysinfo -lkvm
 
@@ -100,6 +103,31 @@ post-patch:
 		-e 's|SlurmdSpoolDir=.*|SlurmdSpoolDir=/var/spool/slurmd|' \
 		-e 's|StateSaveLocation=.*|StateSaveLocation=/var/run/slurm|' \
 		${WRKSRC}/etc/slurm.conf.example
+	@${REINPLACE_CMD} -e 's|"/proc|"/compat/linux/proc|g' \
+		${WRKSRC}/src/slurmd/slurmstepd/req.c \
+		${WRKSRC}/src/slurmd/slurmstepd/pdebug.c \
+		${WRKSRC}/src/slurmd/slurmd/get_mach_stat.c \
+		${WRKSRC}/src/slurmd/slurmd/read_proc.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/jobacct_gather/aix/jobacct_gather_aix.c \
+		${WRKSRC}/src/plugins/switch/cray/scaling.c \
+		${WRKSRC}/src/plugins/proctrack/cray/proctrack_cray.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/proctrack/lua/proctrack_lua.c \
+		${WRKSRC}/src/plugins/acct_gather_filesystem/lustre/acct_gather_filesystem_lustre.c \
+		${WRKSRC}/contribs/cray/pam_job.c \
+		${WRKSRC}/contribs/lua/proctrack.lua
 
 # Hack around nonfunctional --disable-gtktest flag
 post-patch-GTK2-off:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704181338.v3IDcAiI013431>