On 10/15/25 7:36 PM, Gordon Messmer wrote:
On 2025-10-15 12:54 AM, Panu Matilainen wrote:
I haven't looked at the details here, but I'll note that both these predate rpm's native support for memory/cpu balancing in rpm 4.19. Ideally, these limit_build macros would be phased out in both Fedora and Suse in favor of using the native thing. The road towards that would be having limit_build() translate its arguments to the native tunables instead of all that shell math.


Awesome! I see it mentioned in the 4.19 release nodes, but not much in the way of documentation.

Documentation in 4.19 was scarce indeed, a bit more better now in https://rpm.org/docs/6.0.x/man/rpmbuild-config.5 (the man page is for 6.0 but most of it, including the _smp* stuff is same for all recent releases)

If I look through commits, it looks like "%limit_build -m 4096" should be removed and replaced with "%global _smp_tasksize_proc 4096" near the top of the spec? Is that right?

That looks about right, yeah.

If that's the case, then I think we'll need two steps to clean up:

1: replace all of the uses of %limit_build and %constrain build, then..

2: replace the %limit_build and %constrain_build macro definitions with versions that consume the -m and -c arguments, but return nothing and have no side effects

(and maybe 3: announce the deprecation of those macros somewhere)

Or just make these macros wrappers that do (roughly) the same thing using the rpm native things. That'd allow folks to keep it compatible across multiple distro versions, as I imagine some users like Firefox might want.


I only see 20 packages that use these macros, so cleaning up shouldn't take *too* long.


--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to