Accepting request 1143794 from science:HPC

- Fix master package README generation 'trick' for rpm <= 4.19.1
  rpm version 4.19.1 started to add quotes around the file name
  when it expands a %doc statements into a script. This broke
  the 'trick' we've used to generate a README file on-the-fly.
  Here the saving grace was the introduction of the macro %rpmversion
  with the same version of rpm that can be used to identify
  versions affected by this. (forwarded request 1143793 from eeich)

OBS-URL: https://build.opensuse.org/request/show/1143794
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/suse-hpc?expand=0&rev=30
This commit is contained in:
Ana Guerrero 2024-02-04 18:08:59 +00:00 committed by Git OBS Bridge
commit 580a2fb0b9
4 changed files with 33 additions and 3 deletions

View File

@ -6,7 +6,7 @@
<param name="exclude">.git</param>
<param name="filename">suse-hpc</param>
<param name="versionformat">0.5.%cd.%h</param>
<param name="revision">36e049da8d5c8bab1e78e15d7a26c91b58b12ff5</param>
<param name="revision">a16bd5ecc15e1a0ec8904b78102c7b444ce18df5</param>
<param name="extract">general/dlinfo.c</param>
<param name="extract">general/macros.hpc</param>
<param name="extract">general/hpc_elf.pl</param>

View File

@ -361,6 +361,21 @@ sed -e '/#%%Module1.0.*/b 1;1s/\(.*\)/#%%Module1.0\n\1/;:1' << EOF\\\
echo %nil \
%{-x:exit 1}
# Get rpm version string from %rpmversion that can be used in
# comparisons if this macro exists. If not, return 0
%_hpc_rpmv %{lua: \
v=rpm.expand("%rpmversion") \
r=0 \
if (v == "%rpmversion") then \
print("0") \
else \
for w in string.gmatch(v, "(%w+)") do \
r=r*100+w \
end \
print(math.tointeger(r)) \
end \
}
#
# Create 'master' package: packages which have the built package as
# dependency. This way, the latest version of a library can be installed
@ -480,7 +495,11 @@ When this package gets updated it installs the latest version of %name. \
echo "#!/bin/bash" > $tmp; \
echo "echo -e %_msg \> $readme && rm -f $tmp || true" >> $tmp; \
chmod u+x $tmp; echo -n $tmp) \
%if %{_hpc_rpmv} < 41901 \
%doc $(%_tmpexec)./%{_readme} \
%else \
%doc '$(%_tmpexec)'./%{_readme} \
%endif \
} \
%{nil}

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Sat Feb 3 11:34:25 UTC 2024 - Egbert Eich <eich@suse.com>
- Fix master package README generation 'trick' for rpm <= 4.19.1
rpm version 4.19.1 started to add quotes around the file name
when it expands a %doc statements into a script. This broke
the 'trick' we've used to generate a README file on-the-fly.
Here the saving grace was the introduction of the macro %rpmversion
with the same version of rpm that can be used to identify
versions affected by this.
-------------------------------------------------------------------
Thu Oct 26 21:07:33 UTC 2023 - Egbert Eich <eich@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package suse-hpc
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -20,7 +20,7 @@ Summary: SUSE HPC Environment
License: BSD-3-Clause
Group: Productivity/Clustering/Computing
Name: suse-hpc
Version: 0.5.20231026.36e049d
Version: 0.5.20240203.a16bd5e
Release: 0
Source0: macros.hpc
Source1: dlinfo.c