From 392bec3223532759e817fd89a5d402ff035b55da251ce215067bc8a87907ddcf Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 27 Apr 2023 13:24:37 +0000 Subject: [PATCH 1/2] Accepting request 1082770 from home:eeich:branches:network:cluster - Web-configurator: changed presets to SUSE defaults. - If %_restart_on_update is no longer defined replace by own macro. - Marked slurm-openlava, slurm-seff and slurm-sjstat noarch. - rpmlint: * dropped some rpmlint filters which are no longer relevant. * added/refreshed filters. For Details, see rpmlintrc. - Remove workaround to fix the restart issue in an Slurm package described in bsc#1088693. The Slurm version in this package as 16.05. Any attempt to directly migrate to the current version is bound to fail anyway. OBS-URL: https://build.opensuse.org/request/show/1082770 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=251 --- slurm-rpmlintrc | 26 ++++++++++++--------- slurm.changes | 16 +++++++++++++ slurm.spec | 61 +++++++++++++++++-------------------------------- 3 files changed, 52 insertions(+), 51 deletions(-) diff --git a/slurm-rpmlintrc b/slurm-rpmlintrc index f0faf2e..1003086 100644 --- a/slurm-rpmlintrc +++ b/slurm-rpmlintrc @@ -14,12 +14,15 @@ addFilter(".*obsolete-not-provided slurmdb-direct.*") # channel. addFilter("libnss_slurm\d_\d{2}_\d{2}.*: E: shlib-policy-name-error.*") -# slurms uses shared libraries for its plugins, so these plugins can have -# no dependency information - -addFilter(".*shared-library-without-dependency-information /usr/lib64/slurm/.*so") # Our logrotate file names are derived from the service name. -addFilter(".* E: incoherent-logrotate-file /etc/logrotate.d/slurm.*\.conf") +addFilter(".* (W|E): incoherent-logrotate-file /etc/logrotate.d/slurm.*\.conf") + +# libpmix2 is opened using dlopen() - no automatic dependency resolution possible +addFilter("slurm(|_.*)-plugins.x86_64: (W|E): explicit-lib-dependency libpmix2") + +# We need to build for more than one product. rpmlint tests differ between products +# Some may not trigger on all products. +addFilter("slurm.src: (W|E): unused-rpmlintrc-filter .*") # ? Why should we package the log dir? addFilter(".*: E: logrotate-log-dir-not-packaged /var/log") @@ -32,19 +35,20 @@ addFilter("slurm(|-node|-slurmdbd)\..*: systemd-service-without-service_del_post # The idea is to place the test suite into a package mostly unaltered # to place it to a test rig without requiring to install the full Slurm # sources. -# ... and in the same vein -addFilter("slurm(|_.*)-testsuite.*: E: filelist-forbidden-opt /opt/slurmtest") # This is by intention - the test suite requires a test suite specific # systemd unit file. addFilter("slurm(|_.*)-testsuite.*: E: filelist-forbidden-systemd-userdirs") -# It is not a devel package but a test suite. The test suite is designed to -# build test binaries when it is executed. -addFilter("slurm(|_.*)-testsuite.*: E: devel-file-in-non-devel-package") # We want to give root a script to set up the test system -addFilter("slurm(|_.*)-testsuite.*: E: filelist-forbidden-fhs23 /root") +addFilter("slurm(|_.*)-testsuite.*: E: (suse-|)filelist-forbidden-fhs23 /root") # Testsuite needs this as it builds test binaries. addFilter("slurm(|_.*)-testsuite.*: devel-dependency libnuma-devel") addFilter("slurm(|_.*)-testsuite.*: E: explicit-lib-dependency libnuma-devel") # To reduce the amount of preparation, the test suite supplies all required # settings. addFilter("slurm(|_.*)-testsuite.*: sudoers-file-unauthorized .*") +# Testsuite needs to override default slurmd.service +addFilter("slurm(|_.*)-testsuite.x86_64: W: suse-filelist-forbidden-systemd-userdirs /etc/systemd/system/slurmd.service") +# dito +addFilter("slurm(|_.*)-testsuite.x86_64: W: systemd-unit-in-etc /etc/systemd/system/slurmd.service") +# No lib dependency - test suite needs devel package to compile tests +addFilter("slurm-testsuite.x86_64: W: explicit-lib-dependency .*") diff --git a/slurm.changes b/slurm.changes index e4fdb48..291be19 100644 --- a/slurm.changes +++ b/slurm.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Apr 17 19:16:40 UTC 2023 - Egbert Eich + +- Web-configurator: changed presets to SUSE defaults. +- If %_restart_on_update is no longer defined replace by own + macro. +- Marked slurm-openlava, slurm-seff and slurm-sjstat noarch. +- rpmlint: + * dropped some rpmlint filters which are no longer relevant. + * added/refreshed filters. For Details, see rpmlintrc. +- Remove workaround to fix the restart issue in an Slurm package + described in bsc#1088693. + The Slurm version in this package as 16.05. Any attempt to + directly migrate to the current version is bound to fail + anyway. + ------------------------------------------------------------------- Fri Mar 31 07:37:01 UTC 2023 - Christian Goll diff --git a/slurm.spec b/slurm.spec index bd57b4b..46c2d71 100644 --- a/slurm.spec +++ b/slurm.spec @@ -436,6 +436,7 @@ Wrapper scripts for aiding migration from Torque/PBS to SLURM. Summary: Wrappers for transitition from OpenLava/LSF to Slurm Group: Productivity/Clustering/Computing Requires: perl-%{name} = %{version} +BuildArch: noarch %{?upgrade:Provides: %{pname}-openlava = %{version}} %{?upgrade:Obsoletes: %{pname}-openlava < %{version}} %{?upgrade:Conflicts: %{pname}-openlava} @@ -447,6 +448,7 @@ Wrapper scripts for aiding migration from OpenLava/LSF to Slurm Summary: Mail tool that includes job statistics in user notification email Group: Productivity/Clustering/Computing Requires: perl-%{name} = %{version} +BuildArch: noarch %{?upgrade:Provides: %{pname}-seff = %{version}} %{?upgrade:Obsoletes: %{pname}-seff < %{version}} %{?upgrade:Conflicts: %{pname}-seff} @@ -460,6 +462,7 @@ information in the email body. Summary: Perl tool to print SLURM job state information Group: Productivity/Clustering/Computing Requires: %{name} = %{version} +BuildArch: noarch %{?upgrade:Provides: %{pname}-sjstat = %{version}} %{?upgrade:Obsoletes: %{pname}-sjstat < %{version}} %{?upgrade:Conflicts: %{pname}-sjstat} @@ -764,7 +767,13 @@ sed -i -e "s@PIDFile=.*@PIDFile=%{_localstatedir}/run/slurm/slurmd.pid@" \ %{buildroot}/%{_unitdir}/slurmd.service sed -i -e "s@PIDFile=.*@PIDFile=%{_localstatedir}/run/slurm/slurmdbd.pid@" \ -e 's@After=\(.*\)@After=\1 mariadb.service@' \ - %{buildroot}/%{_unitdir}/slurmdbd.service + %{buildroot}/%{_unitdir}/slurmdbd.service +htmldir=%{buildroot}/%{_datadir}/doc/slurm-%{ver}/html +sed -e '/name=\"state_save_location\"/s@value=\".*\"@value=\"%{_localstatedir}/lib/slurm\"@' \ + -e '/name=\"slurmd_pid_file\"/s@value=\".*\"@value=\"%{_localstatedir}/run/slurm/slurmd.pid\"@' \ + -e '/name=\"slurmctld_pid_file\"/s@value=\".*\"@value=\"%{_localstatedir}/run/slurm/slurmctld.pid\"@' \ + -e '/name=\"slurmd_spool_dir\"/s@value=\".*\"@value=\"%{_localstatedir}/spool/slurm\"@' \ + -i ${htmldir}/configurator.html -i ${htmldir}/configurator.easy.html %if 0%{?have_sysuser} [ -e /usr/bin/bash ] && BASH_BIN=/usr/bin/bash || BASH_BIN=/bin/bash echo "u %slurm_u %{slurm_uid} \"%slurmdescr\" %{slurmdir} ${BASH_BIN}" > system-user-%{pname}.conf @@ -831,8 +840,8 @@ EOF done mkdir -p %{buildroot}/%{apache_sysconfdir}/conf.d cat > %{buildroot}/%{apache_sysconfdir}/conf.d/slurm.conf < +Alias /slurm/ "%{_datadir}/doc/slurm-%{ver}/html/" + AllowOverride None DirectoryIndex slurm.html # Controls who can get stuff from this server. @@ -1036,52 +1045,24 @@ rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite \ /srv/slurm-testsuite/slurm /srv/slurm-testsuite/shared \ /srv/slurm-testsuite/config.h -%{!?nil: -# On update the %%postun code of the old package restarts the -# service. This breaks in case the ABI between slurm and its -# plugins has changed as updates are not atomic. Since we cannot -# fix the old scripts we need these macros as a workaround. -# They should be removed at some point. -# Do pretrans in lua: https://fedoraproject.org/wiki/Packaging:Scriptlets -} -%define _test_rest() %{?nil:os.remove("/run/%{1}.rst") - if os.execute() and os.getenv("YAST_IS_RUNNING") ~= "instsys" then - local handle = io.popen("systemctl is-active %{1} 2>&1") - local str = handle:read("*a"); handle:close() - str = string.gsub(str, '^%%s+', '') - str = string.gsub(str, '%%s+$', '') - str = string.gsub(str, '[\\n\\r]+', ' ') - if str == "active" then - local file = io.open("/run/%{1}.rst","w"); file:close() - end - end -} - -%define _rest() [ -e /run/%{1}.rst ] && { systemctl status %{1} &>/dev/null || systemctl restart %{1}; }; rm -f /run/%{1}.rst; - -%pretrans -p -%_test_rest slurmctld - -%pretrans node -p -%_test_rest slurmd - -%pretrans slurmdbd -p -%_test_rest slurmdbd +%if 0%{!?_restart_on_update:1} +%define _restart_on_update() %{?nil: [ $1 -ge 1 ] && { DISABLE_RESTART_ON_UPDATE=no; \ + [ -e /etc/sysconfig/services ] && . /etc/sysconfig/services || : \ + case "$DISABLE_RESTART_ON_UPDATE" in \ + yes|1) ;; \ + *) /usr/bin/systemctl try-restart %{*} || : ;; \ + esac; } \ + } +%endif %posttrans %_restart_on_update slurmctld -%{!?nil: 4 bogus %_restart_on_update on SUSE:SLE-12-SP2:GA:Update} -%_rest slurmctld %posttrans node %_restart_on_update slurmd -%{!?nil: 4 bogus %_restart_on_update on SUSE:SLE-12-SP2:GA:Update} -%_rest slurmd %posttrans slurmdbd %_restart_on_update slurmdbd -%{!?nil: 4 bogus %_restart_on_update on SUSE:SLE-12-SP2:GA:Update} -%_rest slurmdbd %if 0%{?sle_version} > 120200 || 0%{?suse_version} > 1320 %define my_license %license From 33bf8791ac0f66e3d4acb8110027d77913916008859be838d035ff05398bc811 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Fri, 28 Apr 2023 07:46:44 +0000 Subject: [PATCH 2/2] - Require slurm-munge if munge authentication is installed. - Replace 'Require: config(pam)' by 'Require: pam'. OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=252 --- slurm.changes | 1 + slurm.spec | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/slurm.changes b/slurm.changes index 291be19..d5a5d44 100644 --- a/slurm.changes +++ b/slurm.changes @@ -13,6 +13,7 @@ Mon Apr 17 19:16:40 UTC 2023 - Egbert Eich The Slurm version in this package as 16.05. Any attempt to directly migrate to the current version is bound to fail anyway. +- Now require slurm-munge if munge authentication is installed. ------------------------------------------------------------------- Fri Mar 31 07:37:01 UTC 2023 - Christian Goll diff --git a/slurm.spec b/slurm.spec index 46c2d71..0c34e51 100644 --- a/slurm.spec +++ b/slurm.spec @@ -154,7 +154,7 @@ Patch15: Fix-test7.2-to-find-libpmix-under-lib64-as-well.patch Requires: %{name}-config = %{version} %if 0%{?have_boolean_deps} -Recommends: (%{name}-munge = %version if munge) +Requires: (%{name}-munge = %version if munge) %else Recommends: %{name}-munge = %version %endif @@ -627,11 +627,11 @@ Requires: expect Requires: gcc-c++ Requires: libnuma-devel %ts_depends: openmpi4-gnu-hpc-devel +Requires: pam Requires: pdsh Requires: perl-%{name} = %version Requires: sudo Requires: tar -Requires: config(pam) BuildRequires: sudo %description testsuite