diff --git a/README.md b/README.md index 7287e3d..68b6c62 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,37 @@ or newer. The plug-ins are compiled against the header file ``. Fedora distributes this file in the `slurm-devel` RPM package [^DoUiD]. CMake is available via the `cmake` package. +Choose a `` to configure and build the plugin: ```sh -cmake -S . -B build # configure the project and choose a build dir -cmake --build build # build the Singularity SPANK plug-in -sudo cmake --install build # install the binary and configuration files -# on older CMake: sudo cmake --build build --target install +cmake -S -B # configure +cmake --build # build the Singularity SPANK plug-in +``` + +You may customize the configure phase further via the following CMake options: + +CMake option | Default | Description +---------------------------------|-------------------------------------------------------|------------------------------------------------------------------------------------- +`--install-prefix ` | `/usr` | Equivalent to `-DCMAKE_INSTALL_PREFIX=` +`-DINSTALL_PLUGSTACK_CONF=ON` | `OFF` | Whether to install a plugin config file +`-DSLURM_SYSCONFDIR=...` | `/etc/slurm` | Slurm sysconfdir +`-DSLURM_PLUGSTACK_CONF_D=...` | `${SLURM_SYSCONFDIR}/plugstack.conf.d` | Slurm plugstack conf dir +`-DPLUGIN_DEFAULT_ARG=...` | `""` | Plugin default= arg` +`-DPLUGIN_BIND_ARG=...` | `${SLURM_SYSCONFDIR},/var/spool/slurm,/var/run/munge` | Plugin bind= arg +`-DPLUGIN_EXTRA_ARGS=...` | `""` | Plugin args= arg +`-DSLURM_INCLUDE_DIR=...` | Detected by CMake, typically `/usr/include` | Slurm include dir passed to compiler via `-I` so `#include ` resolves +`-DCMAKE_INSTALL_LIBEXECDIR=...` | `libexec` on RHEL-based systems | FHS "internal binaries" directory + +## Install + +```sh +[sudo] cmake --install ``` -By default the plug-in `singularity-exec.so` is installed to `/usr/lib64/slurm`. +`sudo` is needed to install to system directories like `/usr`. + +By default, installation directories are chosen to be FSH-compliant [^sSrfT] as +implemented by the CMake "GNUInstallDirs" module [^dsfDS]. -Restart `slurmd` in order to load the plug-in after installation. ## Configuration @@ -76,6 +97,9 @@ Option | Description Passing `-DINSTALL_PLUGSTACK_CONF=ON` to the CMake configure command will automate the above configuration. +Restart `slurmd` in order to load the plug-in after installation and configuration. + + ## Usage The plugin adds following command-line options to `salloc`, `srun` and `sbatch`: @@ -209,6 +233,12 @@ along with this program. If not, see . [^DoUiD]: Fedora Slurm RPM Package +[^sSrfT]: Filesystem Hierarchy Standard + + +[^dsfDS]: CMake "GNUInstallDirs" module + + [99]: singularity-exec.conf.in [98]: slurm-singularity-wrapper.sh [97]: containers.sh