# # spec file for package memory-constraints # # Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: memory-constraints Version: 20180406 Release: 5.2 Summary: Macros to limit resources allocation when building License: MIT Group: Development/Tools/Building URL: https://www.opensuse.org/ Source0: %{name}.macros BuildRequires: coreutils BuildRequires: rpm Requires: /usr/bin/awk Requires: coreutils BuildArch: noarch %description Macros to limit various resources when building huge packages to ensure we can produce results rather than OOM reports. %prep : %build : %install install -D -m 644 %{SOURCE0} %{buildroot}/%{_rpmmacrodir}/macros.%{name} %files %{_rpmmacrodir}/macros.%{name} %changelog * Thu Jan 9 2025 Guillaume GARDET - Also set _smp_build_ncpus to fix usage with meson macro and maybe others * Tue Jun 29 2021 Andreas Schneider - Fix Requires for awk to work also on Fedora * Mon May 4 2020 Dominique Leuenberger - Use the correct macro %%_rpmmacrodir in the %%files section. * Sat Jun 15 2019 Stefan BrĂ¼ns - Take SwapTotal into account, MemTotal only reflects physical memory. Some workers have a considerable amount of swap. * Sat Apr 7 2018 tchvatal@suse.com - Fix the macros to define default value if _threads are not defined to fallback to amount of CPUs * Fri Apr 6 2018 tchvatal@suse.com - Use install instead of mkdir and cp * Fri Apr 6 2018 tchvatal@suse.com - Update description to contain less typos * Fri Apr 6 2018 tchvatal@suse.com - Initial package to ensure restrictions on jobs when building huge packages