Re: F35 Change: Memory Constraints macros for RPM (System-Wide Change proposal)

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

 



On 8/16/21 11:18 AM, Panu Matilainen wrote:
On 8/16/21 12:25 AM, Michel Alexandre Salim wrote:
On Thu, Aug 12, 2021 at 06:14:57PM -0700, Michel Alexandre Salim via
[...]
   %make_build %{limit_build -m 4096} -- with %limit_build used as a
   %function that spits out the relevant -j override


Updated pull request, using the latter option:
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/141

The macro is now rewritten in Lua, since I can't coerce the shell
definition to just output a value. Tested locally with mock (I had to
copy fedora-34-x86_64 to fedora-35-x86_64 as the Rawhide target is
currently failing on GPG verification).

- if limit_build computes a number that is higher than %_smp_build_ncpus
   it outputs nothing
- if it computes a value that is smaller, it outputs '-j<thatvalue>'
- if it computes a value less than 1 it outputs '-j1'

Tested with mcrouter locally and setting the memory requirement to some
ridiculous value (-m 409600) I do end up with a single-core build.

Inline documentation is provided, once the PR is reviewed and this is
built for Rawhide I'll update the packaging guideline.

EEK! NAK!

That totally breaks the idea of how %make_build and friends are supposed to work. Revert this hack, NOW!

This thing needs to go back to drawing board to be discussed at leisure rather than trying to hack something up in a hurry that we will regret later.

And now this leaked into F34 :(

Really, the primary reason for %make_build existence is to hide away the ugly %{?_smp_mflags} stuff that's not really relevant to the packaging of a given software. This new variant goes directly against that idea.

If you want this to only affect %build, then overriding %_smp_mflags from the %limit_build macro is a far better thing to do, as that doesn't require unrelated fubar added to %make_build line. Which is exactly what the original Suse variant does.

The scope of the change is unclear though, rpm uses %_smp_build_ncpus for other purposes than calculating %_smp_mflags value too. To me it'd make more sense to override %_smp_build_ncpus instead to have it affect the other parallelisation places too.

	- 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 on the list, report it: https://pagure.io/fedora-infrastructure




[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