%global fsldir %{_prefix}/lib/fsl %global srcname fsl_sub_plugin_slurm Name: fsl-sub-plugin-slurm # 1.7.1 (FSL 6.0.7.23's pin) exists only as a tag on git.fmrib.ox.ac.uk, # unreachable over HTTPS since mid-October 2026. PyPI's latest sdist is # 1.7.0; Patch1 carries the whole 1.7.1 change on top of it. Version: 1.7.0 Release: 1%{?dist} Summary: Slurm back end for FSL's job submission wrapper License: Apache-2.0 URL: https://git.fmrib.ox.ac.uk/fsl/fsl_sub_plugin_slurm Source0: %{pypi_source %{srcname}} Patch0: fsl-sub-plugin-slurm-queue-list.patch # Upstream 1.7.1: account discovery limited to the user's own accounts. Patch1: fsl-sub-plugin-slurm-1.7.1-user-accounts.patch # Example single-node configuration, tested by tests/fsl-sub-slurm.bats Source1: slurm.conf.example Source2: cgroup.conf.example Source3: fsl-sub-slurm-examples-README.md BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros Requires: fsl-sub %description The Slurm back end for fsl_sub. With this installed and configured, FSL pipelines that call fsl_sub submit their work to Slurm instead of running it on the local machine. Installing it is not enough on its own: fsl_sub still needs a configuration naming the queues, which `fsl_sub_config slurm` generates. %prep %autosetup -p1 -n %{srcname}-%{version} # Fails the build if a patch did not apply or upstream fixed it differently. grep -q "queue_config(pure_queues\[0\])" fsl_sub_plugin_slurm/__init__.py grep -q "f'user={me}'" fsl_sub_plugin_slurm/__init__.py # No .git in a release tarball, so setuptools-scm cannot infer the version. %global _scm_env SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %generate_buildrequires export %{_scm_env} %pyproject_buildrequires %build export %{_scm_env} %pyproject_wheel %install export %{_scm_env} %pyproject_install %pyproject_save_files -l fsl_sub_plugin_slurm install -d %{buildroot}%{_docdir}/%{name}/examples install -p -m 0644 %{SOURCE1} %{SOURCE2} %{buildroot}%{_docdir}/%{name}/examples/ install -p -m 0644 %{SOURCE3} %{buildroot}%{_docdir}/%{name}/examples/README.md %check # The bundled tests import pytest, which a packaging build does not need. %pyproject_check_import -e 'fsl_sub_plugin_slurm.tests*' # fsl_sub discovers back ends by import name, so prove this one is discoverable # under the name fsl_sub looks for rather than only that its files landed. PYTHONPATH=%{buildroot}%{python3_sitelib} python3 -c 'import fsl_sub_plugin_slurm' %files -f %{pyproject_files} %doc README.md %doc %{_docdir}/%{name}/examples %changelog * Thu Oct 22 2026 Morgan Hough - 1.7.0-1 - Source0 from PyPI instead of the git.fmrib.ox.ac.uk archive, unreachable since about 2026-10-15 (every Copr SRPM build of 1.7.1-3 failed on the download). PyPI stops at 1.7.0, so the version goes back one step and the entire 1.7.1 change (sacctmgr account discovery filtered to the user's own accounts, de-duplicated and sorted) is carried as fsl-sub-plugin-slurm-1.7.1-user-accounts.patch: the installed code is 1.7.1's, PLUGIN_VERSION reports 1.7.0. No 1.7.1 build was ever published, so nothing is downgraded. Return to upstream's tarball when FMRIB's GitLab or a 1.7.1 sdist is back. * Wed Oct 07 2026 Morgan Hough - 1.7.1-3 - Ship an example single-node Slurm configuration under %{_docdir}/%{name}/examples: slurm.conf.example (cores and memory both consumable, DefMemPerCPU, per-partition DefaultTime, backfill), cgroup.conf.example for enforcement, and a README covering the fsl_sub side (set_time_limit: true, which fsl_sub_config generates as false). The file set is the one tests/fsl-sub-slurm.bats renders and runs against a real Slurm with accounting. * Wed Oct 07 2026 Morgan Hough - 1.7.1-2 - Fix `fsl_sub -q QUEUE -s N` crashing with "cannot use 'list' as a dict key": queue_config() was given the raw queue list instead of a queue name (fsl-sub-plugin-slurm-queue-list.patch). Found by tests/fsl-sub-slurm.bats against a real Slurm; FMRIB's own install has the same defect. * Sun Sep 27 2026 Morgan Hough - 1.7.1-1 - Initial package: the Slurm back end for fsl_sub, at the version the FSL 6.0.7.23 manifest pins, Apache-2.0. Packaged so that a scheduler back end can be installed by the package manager rather than by fsl_sub_plugin pulling it from PyPI into /usr/lib/fsl.