Re: rawhide %{_buildrootdir} not expanded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/3/24 15:55, Panu Matilainen wrote:
On 6/3/24 15:22, Eike Rathke wrote:
Hi,

what did recently change in rawhide that the %{_buildrootdir} macro
isn't expanded as in

+ mkdir '%{_buildrootdir}/bin'
mkdir: cannot create directory ‘%{_buildrootdir}/bin’: No such file or directory
+ :
+ cp /builddir/build/SOURCES/node-stdout-nonblocking-wrapper '%{_buildrootdir}/bin' cp: cannot create regular file '%{_buildrootdir}/bin': No such file or directory

What changed is new rpm cleaned up dusty corners. I only learned of *this* dusty corner usage this morning.

%{_buildrootdir} is nothing packages should be referring to, in any circumstance really. It's a potentially shared directory among arbitrary packages (in the traditional it's ~/rpmbuild/BUILDROOT/ ) and putting anything there can conflict with other packages being built on the system. %{buildroot} is what packages should be referring to, or better yet, ${RPM_BUILD_ROOT}.

That said, these cases kinda appear to be something not intended to be packaged at all, just "I need to put this file somewhere". That's one of the many use-cases we introduced the intermediate %builddir in 4.20, under which the %{buildroot} itself is.

And with the new directory layout, there's no reason to break these usages, instead we can now support it safely: we'll just redefine %_buildrootdir to be the dirname of %{buildroot} and voila, these files end up in the per-build directory where they cannot conflict with other packages.

I hope to have a build for this tomorrow, we just need to address another related matter before it makes sense to touch this.

FWIW, upstream PR is at https://github.com/rpm-software-management/rpm/pull/3139

	- Panu -
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux