SHA256
1
0
forked from pool/slurm

Accepting request 1005247 from network:cluster

- Fix build for older product version. (forwarded request 1005246 from eeich)

OBS-URL: https://build.opensuse.org/request/show/1005247
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/slurm?expand=0&rev=77
This commit is contained in:
Dominique Leuenberger 2022-09-22 12:49:55 +00:00 committed by Git OBS Bridge
commit ae04ec8787
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 20 21:12:19 UTC 2022 - Egbert Eich <eich@suse.com>
- Fix build for older product version.
-------------------------------------------------------------------
Tue Aug 2 12:43:39 UTC 2022 - Egbert Eich <eich@suse.com>

View File

@ -605,6 +605,7 @@ Requires: pdsh
Requires: perl-%{name} = %version
Requires: sudo
Requires: tar
Requires: config(pam)
BuildRequires: sudo
%description testsuite
@ -836,7 +837,7 @@ EOF
# Install testsuite
%if 0%{?slurm_testsuite}
# bug in testsuite
ln -sf /usr/lib64/libslurm.so %{buildroot}/usr/lib64/slurm/libslurm.so
ln -sf %{_libdir}/libslurm.so %{buildroot}%{_libdir}/slurm/libslurm.so
mkdir -p %{buildroot}/srv/slurm-testsuite
cd testsuite/expect
@ -877,8 +878,11 @@ find -type f -name "*.[ao]" -print | while read f; do
# drop non-deterministic lto bits from .o files
strip -p --discard-locals -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 $f
done
%if 0%{?suse_version} >= 1500
%define tar_sort --sort=name
%endif
tar --group=%slurm_g --owner=%slurm_u \
--sort=name --mtime="@${SOURCE_DATE_EPOCH:-`date +%%s`}" --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
%{?tar_sort} --mtime="@${SOURCE_DATE_EPOCH:-`date +%%s`}" --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
-cjf /tmp/slurmtest.tar.bz2 *
cd -
rm -rf %{buildroot}/srv/slurm-testsuite
@ -908,6 +912,9 @@ sed -i -e '/ExecStart/aExecStartPre=/bin/bash -c "for i in 0 1 2 3; do test -e /
tar -xzf %{S:20}
mkdir -p %{buildroot}%{_pam_secconfdir}/limits.d
mv test_setup/slurm.conf.limits %{buildroot}%_pam_secconfdir/limits.d/slurm.conf
%if 0%{?sle_version} < 150200
sed -i -e '/hard[[:space:]]*nofile/s@unlimited@1048576@' %{buildroot}%_pam_secconfdir/limits.d/slurm.conf
%endif
mkdir -p %{buildroot}/root
mv test_setup/setup-testsuite.sh %{buildroot}/root
@ -1043,7 +1050,7 @@ exit 0
%post testsuite
rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsuite/config.h
sudo -u %slurm_u /usr/bin/tar --same-owner -C /srv/slurm-testsuite -xjf %{_datadir}/%{name}/slurmtest.tar.bz2
runuser -u %slurm_u -- tar --same-owner -C /srv/slurm-testsuite -xjf %{_datadir}/%{name}/slurmtest.tar.bz2
%preun testsuite
rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsuite/config.h