[Rpm-maint] [rpm-software-management/rpm] `%{_builddir}` has different values in different contexts (Issue #3151)

Vít Ondruch notifications at github.com
Fri Jun 7 08:02:16 UTC 2024


**Describe the bug**

In ruby.spec, we are using `%{_builddir}` on several places. E.g. [here](https://src.fedoraproject.org/rpms/ruby/blob/677893973e5e3cac2a1eb8a691aad6f5feccf69c/f/ruby.spec#_977-978):

~~~
# Check RubyGems version.
[ "`make -C %{_vpath_builddir} -s runruby TESTRUN_SCRIPT='%{_builddir}/%{buildsubdir}/bin/gem -v' | tail -1`" == '%{rubygems_version}' ]
~~~

which expands to

~~~
++ make -C redhat-linux-build -s runruby 'TESTRUN_SCRIPT=/builddir/build/BUILD/ruby-3.3.1-build/ruby-3.3.1/bin/gem -v'
++ tail -1
+ '[' 3.5.9 == 3.5.9 ']'
~~~

But also on other places, such as [local generator setup](https://src.fedoraproject.org/rpms/ruby/blob/677893973e5e3cac2a1eb8a691aad6f5feccf69c/f/ruby.spec#_242-245):

~~~
%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$
~~~

However, this expands differently and results in errors:

~~~
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.
~~~

The full logs can be found [here](https://koji.fedoraproject.org/koji/buildinfo?buildID=2461729)

**Expected behavior**
The `%{_builddir}` is consistent.

**Environment**
rpm-4.19.91-8.fc41.x86_64


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3151
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/3151 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240607/34bffe51/attachment.html>


More information about the Rpm-maint mailing list