From 23b4fae2c2a4dfbf5421f2b11c83c52ca18ed1a8 Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Tue, 23 Feb 2021 09:30:20 -0500 Subject: [PATCH 1/2] Force a dependency on versioned libslurm.so --- slurm-spank-lua.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/slurm-spank-lua.spec b/slurm-spank-lua.spec index bddfee2..aaf93a5 100644 --- a/slurm-spank-lua.spec +++ b/slurm-spank-lua.spec @@ -1,4 +1,6 @@ %global slurm_version %(rpm -q slurm-devel --qf "%{VERSION}" 2>/dev/null) +%define _use_internal_dependency_generator 0 +%define __find_requires %{_builddir}/find-requires Summary: Slurm Lua SPANK plugin Name: slurm-spank-lua @@ -23,11 +25,22 @@ spank(8) manpage). %prep %setup -q +# Dummy file used to get a RPM dependency on libslurm.so +echo 'int main(){}' > %{_builddir}/libslurm_dummy.c +cat < %{_builddir}/find-requires +#!/bin/sh +# Add dummy to list of files sent to the regular find-requires +{ echo %{_builddir}/libslurm_dummy; cat; } | \ + %{_rpmconfigdir}/find-requires +EOF +chmod +x %{_builddir}/find-requires %build %{__cc} -g -o lua.o -fPIC -c lua.c %{__cc} -g -o lib/list.o -fPIC -c lib/list.c %{__cc} -g -shared -fPIC -o lua.so lua.o lib/list.o -llua +# Dummy file to get a dependency on libslurm +%{__cc} -lslurm -o %{_builddir}/libslurm_dummy %{_builddir}/libslurm_dummy.c %install From 3f0553481251c28d8f7cafadd6795608de0b507a Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Tue, 2 Mar 2021 13:04:19 -0500 Subject: [PATCH 2/2] Update spec changelog and bump version --- slurm-spank-lua.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slurm-spank-lua.spec b/slurm-spank-lua.spec index aaf93a5..9344694 100644 --- a/slurm-spank-lua.spec +++ b/slurm-spank-lua.spec @@ -4,7 +4,7 @@ Summary: Slurm Lua SPANK plugin Name: slurm-spank-lua -Version: 0.41 +Version: 0.42 Release: %{slurm_version}.1%{?dist} License: GPL Group: System Environment/Base @@ -71,6 +71,8 @@ rm -rf "$RPM_BUILD_ROOT" %changelog +* Tue Mar 02 2021 Trey Dockendorf - 0.42-1 +- Force a dependency on versioned libslurm.so * Tue Aug 11 2020 Trey Dockendorf - 0.41-1 - Keep dist in RPM release * Tue Aug 11 2020 Trey Dockendorf - 0.40-1