Re: RPM_* env variables vs macros

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

 



* Vít Ondruch:

> Dne 04. 06. 24 v 8:11 Panu Matilainen napsal(a):
>> On 6/3/24 17:18, Eike Rathke wrote:
>>> Hi Panu,
>>>
>>> On Monday, 2024-06-03 15:55:09 +0300, Panu Matilainen wrote:
>>>
>>>> or better yet, ${RPM_BUILD_ROOT}.
>>>
>>> Why better?
>>
>> In general, the RPM_* environment variables available to build
>> scriptlets are what should be used instead of macros. Because,
>> macros are processed while parsing the spec, which is different from
>> actually *building* it. For one, using the environment improves srpm
>> reproducibility because the local gunk like number of CPUs, the
>> concrete path of %buildroot etc are only visible the scriptlets
>> where actually used.
>>
>> It's a subtle thing, took me 10+ years with rpm to grok the
>> recommendation I'd seen long, long, long ago.
>>
>
> I wish this nugget was captured somewhere on more prominent
> place. Because what you say does not really correspond with what we
> have in guidelines:
>
> https://docs.fedoraproject.org/en-US/packaging-guidelines/#_using_buildroot_and_optflags_vs_rpm_build_root_and_rpm_opt_flags

That's a bit unfortunate because %{optflags} and $RPM_OPT_FLAGS are
necessary language-agnostic, which makes them less precise.  And
descripting %{optflags} as optimization flags has been misleading for
around twenty years now.

Thanks,
Florian
--
_______________________________________________
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