I am learning rpm/rpmbuild and I see strange behavior difference in RPM v4.4.2.3 and RPM v4.14.
I created an rpmrc file which has below content
macrofiles:/home/rmehta/rpmtest/rpmmacros
and rpmmacros has below contents
%_name Rakesh
When I execute rpmbuild --rcfile /home/rmehta/rpmtest/rpmrc --eval %_name
it gives different output for both RPM versions
For RPM version 4.4.2.3 (SLES-15) it prints Rakesh
For RPM version 4.14.3 (SLES-11) it prints %_name
My question is why this difference and why for RPM v4.14.3 its not reading the rcfile.
I tried same with RPM v4.11(openSUSE) and its behaviour is same as RPM v4.14.3.
1) With RPM v4.4 there is no Macro path, which is there for RPM v4.14 as below
Macro Path: /usr/lib/rpm/macros:/usr/lib/rpm/macros.d/macros.*:/usr/lib/rpm/platform/%{_target}/macros:/usr/lib/rpm/fileattrs/*.attr:/usr/lib/rpm/suse/macros:/etc/ rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros – Rakesh Mehta Apr 20 '22 at 08:02