From 42b0e43e5a8ef84cfc2a7dcc09b0b39ad924f378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 7 Jun 2024 12:25:48 +0200 Subject: [PATCH] Fix generators for RPM 4.20 compatibility RPM 4.20 introduce per-build directory. However, this also brings some issues where `%{_builddir}` might have different value in different context, leading to issues such as: ~~~ Processing files: ruby-default-gems-3.3.1-8.fc41.noarch make: *** /builddir/build/BUILD/ruby-3.3.1/redhat-linux-build: No such file or directory. Stop. ~~~ Therefore the generators are not executed properly. Use `%define` instead of `%global`, because those are laze evaluated and actually suggested by RPM upstream: https://github.com/rpm-software-management/rpm/issues/3151 --- ruby.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 896d4ae..a34a5cd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -239,10 +239,10 @@ Source15: test_openssl_fips.rb %{load:%{SOURCE4}} %{load:%{SOURCE5}} -%global __local_generator_requires make -C %{_builddir}/%{buildsubdir}/%{_vpath_builddir} -s runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE9}" -%global __local_generator_provides make -C %{_builddir}/%{buildsubdir}/%{_vpath_builddir} -s runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE10}" -%global __local_generator_conflicts make -C %{_builddir}/%{buildsubdir}/%{_vpath_builddir} -s runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE11}" -%global __local_generator_path ^%{gem_dir}/specifications/.*\.gemspec$ +%define __local_generator_requires make -C %{_builddir}/%{buildsubdir}/%{_vpath_builddir} -s runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE9}" +%define __local_generator_provides make -C %{_builddir}/%{buildsubdir}/%{_vpath_builddir} -s runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE10}" +%define __local_generator_conflicts make -C %{_builddir}/%{buildsubdir}/%{_vpath_builddir} -s runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE11}" +%define __local_generator_path ^%{gem_dir}/specifications/.*\.gemspec$ # Fix ruby_version abuse. # https://bugs.ruby-lang.org/issues/11002