Redeclared ForFiles release sections as %%nil no longer works with %%1

RPM 4.19 no longer accept our double percentaged %%{nil} passed to %%{1}
so we have to pass in "" but evaluate it, otherwise files record will include it
This commit is contained in:
Jiri 2023-06-14 21:59:48 +02:00 committed by Petra Mikova
parent 609807750f
commit 13e6aabfbd

View File

@ -338,7 +338,7 @@
# buildjdkver is usually same as %%{featurever}, # buildjdkver is usually same as %%{featurever},
# but in time of bootstrap of next jdk, it is featurever-1, # but in time of bootstrap of next jdk, it is featurever-1,
# and this it is better to change it here, on single place # and this it is better to change it here, on single place
%global buildjdkver 19 %global buildjdkver 20
# We don't add any LTS designator for STS packages (Fedora and EPEL). # We don't add any LTS designator for STS packages (Fedora and EPEL).
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined. # We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
%if 0%{?rhel} && !0%{?epel} %if 0%{?rhel} && !0%{?epel}
@ -472,6 +472,14 @@
# top of the JDK archive # top of the JDK archive
%define staticlibsportablename() %{expand:%{jdkportablenameimpl -- %%{1}}} %define staticlibsportablename() %{expand:%{jdkportablenameimpl -- %%{1}}}
# RPM 4.19 no longer accept our double percentaged %%{nil} passed to %%{1}
# so we have to pass in "" but evaluate it, otherwise files record will include it
%define jreportablearchiveForFiles() %(echo %{jreportablearchive -- ""})
%define jdkportablearchiveForFiles() %(echo %{jdkportablearchive -- ""})
%define jdkportablesourcesarchiveForFiles() %(echo %{jdkportablesourcesarchive -- ""})
%define staticlibsportablearchiveForFiles() %(echo %{staticlibsportablearchive -- ""})
%define jdkportablesourcesnameForFiles() %(echo %{jdkportablesourcesname -- ""})
################################################################# #################################################################
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349 # fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
# https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14 # https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
@ -1556,9 +1564,9 @@ done
%if %{include_normal_build} %if %{include_normal_build}
%files %files
# main package builds always # main package builds always
%{_jvmdir}/%{jreportablearchive -- %%{nil}} %{_jvmdir}/%{jreportablearchiveForFiles}
%{_jvmdir}/%{jreportablearchive -- %%{nil}}.sha256sum %{_jvmdir}/%{jreportablearchiveForFiles}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%else %else
%files %files
# placeholder # placeholder
@ -1566,19 +1574,19 @@ done
%if %{include_normal_build} %if %{include_normal_build}
%files devel %files devel
%{_jvmdir}/%{jdkportablearchive -- %%{nil}} %{_jvmdir}/%{jdkportablearchiveForFiles}
#%{_jvmdir}/%{jdkportablearchive -- .debuginfo} #%{_jvmdir}/%{jdkportablearchive -- .debuginfo}
%{_jvmdir}/%{jdkportablearchive -- %%{nil}}.sha256sum %{_jvmdir}/%{jdkportablearchiveForFiles}.sha256sum
#%{_jvmdir}/%{jdkportablearchive -- .debuginfo}.sha256sum #%{_jvmdir}/%{jdkportablearchive -- .debuginfo}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%endif %endif
%if %{include_normal_build} %if %{include_normal_build}
%if %{include_staticlibs} %if %{include_staticlibs}
%files static-libs %files static-libs
%{_jvmdir}/%{staticlibsportablearchive -- %%{nil}} %{_jvmdir}/%{staticlibsportablearchiveForFiles}
%{_jvmdir}/%{staticlibsportablearchive -- %%{nil}}.sha256sum %{_jvmdir}/%{staticlibsportablearchiveForFiles}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%endif %endif
%endif %endif
@ -1586,18 +1594,18 @@ done
%files slowdebug %files slowdebug
%{_jvmdir}/%{jreportablearchive -- .slowdebug} %{_jvmdir}/%{jreportablearchive -- .slowdebug}
%{_jvmdir}/%{jreportablearchive -- .slowdebug}.sha256sum %{_jvmdir}/%{jreportablearchive -- .slowdebug}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%files devel-slowdebug %files devel-slowdebug
%{_jvmdir}/%{jdkportablearchive -- .slowdebug} %{_jvmdir}/%{jdkportablearchive -- .slowdebug}
%{_jvmdir}/%{jdkportablearchive -- .slowdebug}.sha256sum %{_jvmdir}/%{jdkportablearchive -- .slowdebug}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%if %{include_staticlibs} %if %{include_staticlibs}
%files static-libs-slowdebug %files static-libs-slowdebug
%{_jvmdir}/%{staticlibsportablearchive -- .slowdebug} %{_jvmdir}/%{staticlibsportablearchive -- .slowdebug}
%{_jvmdir}/%{staticlibsportablearchive -- .slowdebug}.sha256sum %{_jvmdir}/%{staticlibsportablearchive -- .slowdebug}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%endif %endif
%endif %endif
@ -1605,27 +1613,32 @@ done
%files fastdebug %files fastdebug
%{_jvmdir}/%{jreportablearchive -- .fastdebug} %{_jvmdir}/%{jreportablearchive -- .fastdebug}
%{_jvmdir}/%{jreportablearchive -- .fastdebug}.sha256sum %{_jvmdir}/%{jreportablearchive -- .fastdebug}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%files devel-fastdebug %files devel-fastdebug
%{_jvmdir}/%{jdkportablearchive -- .fastdebug} %{_jvmdir}/%{jdkportablearchive -- .fastdebug}
%{_jvmdir}/%{jdkportablearchive -- .fastdebug}.sha256sum %{_jvmdir}/%{jdkportablearchive -- .fastdebug}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%if %{include_staticlibs} %if %{include_staticlibs}
%files static-libs-fastdebug %files static-libs-fastdebug
%{_jvmdir}/%{staticlibsportablearchive -- .fastdebug} %{_jvmdir}/%{staticlibsportablearchive -- .fastdebug}
%{_jvmdir}/%{staticlibsportablearchive -- .fastdebug}.sha256sum %{_jvmdir}/%{staticlibsportablearchive -- .fastdebug}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%endif %endif
%endif %endif
%files sources %files sources
%{_jvmdir}/%{jdkportablesourcesarchive -- %%{nil}} %{_jvmdir}/%{jdkportablesourcesarchiveForFiles}
%{_jvmdir}/%{jdkportablesourcesarchive -- %%{nil}}.sha256sum %{_jvmdir}/%{jdkportablesourcesarchiveForFiles}.sha256sum
%license %{unpacked_licenses}/%{jdkportablesourcesarchive -- %%{nil}} %license %{unpacked_licenses}/%{jdkportablesourcesarchiveForFiles}
%changelog %changelog
* Fri Jun 16 2023 Jiri Vanek <jvanek@redhat.com> - 1:20.0.1.0.9-4.rolling
- Redeclared ForFiles release sections as %%nil no longer works with %%1
- RPM 4.19 no longer accept our double percentaged %%{nil} passed to %%{1}
- so we have to pass in "" but evaluate it, otherwise files record will include it
* Thu May 18 2023 Petra Alice Mikova <pmikova@redhat.com> - 1:20.0.1.0.9-4.rolling * Thu May 18 2023 Petra Alice Mikova <pmikova@redhat.com> - 1:20.0.1.0.9-4.rolling
- fix jdkportablename, jreportablename macro to apply also to epel - fix jdkportablename, jreportablename macro to apply also to epel
- lower buildversion of jdk to 19 - lower buildversion of jdk to 19