Merge remote-tracking branch 'up/f33' into f33-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
commit
e61a4352ec
|
@ -0,0 +1,42 @@
|
||||||
|
# Macros to constrain resource use during the build process
|
||||||
|
|
||||||
|
# outputs build flag overrides to be used in conjunction with
|
||||||
|
# %%make_build, %%cmake_build etc.
|
||||||
|
#
|
||||||
|
# if no override is needed, this macro outputs nothing
|
||||||
|
#
|
||||||
|
# - m memory limit in MBs per core; default is 1024
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# e.g. %make_build %{limit_build -m 2048}
|
||||||
|
# => /usr/bin/make -O -j16 V=1 VERBOSE=1
|
||||||
|
# %make_build %{limit_build -m 40960}
|
||||||
|
# => /usr/bin/make -O -j16 V=1 VERBOSE=1 -j1
|
||||||
|
#
|
||||||
|
%limit_build(m:) %{lua:
|
||||||
|
local mem_per_process=rpm.expand("%{-m*}")
|
||||||
|
if mem_per_process == "" then
|
||||||
|
mem_per_process = 1024
|
||||||
|
else
|
||||||
|
mem_per_process = tonumber(mem_per_process)
|
||||||
|
end
|
||||||
|
local mem_total = 0
|
||||||
|
for line in io.lines('/proc/meminfo') do
|
||||||
|
if line:sub(1, 9) == "MemTotal:" then
|
||||||
|
local tokens = {}
|
||||||
|
for token in line:gmatch("%w+") do
|
||||||
|
tokens[#tokens + 1] = token
|
||||||
|
end
|
||||||
|
mem_total = tonumber(tokens[2])
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local max_jobs = mem_total // (mem_per_process * 1024)
|
||||||
|
if max_jobs < 1 then
|
||||||
|
max_jobs = 1
|
||||||
|
end
|
||||||
|
cur_max_jobs=tonumber(rpm.expand("%{_smp_build_ncpus}"))
|
||||||
|
if cur_max_jobs > max_jobs then
|
||||||
|
print("-j" .. max_jobs)
|
||||||
|
end
|
||||||
|
}
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
Summary: Red Hat specific rpm configuration files
|
Summary: Red Hat specific rpm configuration files
|
||||||
Name: redhat-rpm-config
|
Name: redhat-rpm-config
|
||||||
Version: 175
|
Version: 176
|
||||||
Release: 1.0.riscv64%{?dist}
|
Release: 3%{?dist}
|
||||||
# No version specified.
|
# No version specified.
|
||||||
License: GPL+
|
License: GPL+
|
||||||
URL: https://src.fedoraproject.org/rpms/redhat-rpm-config
|
URL: https://src.fedoraproject.org/rpms/redhat-rpm-config
|
||||||
|
@ -36,12 +36,13 @@ Source104: macros.ldc-srpm
|
||||||
Source105: macros.valgrind-srpm
|
Source105: macros.valgrind-srpm
|
||||||
|
|
||||||
# Other misc macros
|
# Other misc macros
|
||||||
Source150: macros.dwz
|
Source150: macros.build-constraints
|
||||||
Source151: macros.kmp
|
Source151: macros.dwz
|
||||||
Source152: macros.vpath
|
Source152: macros.fedora-misc
|
||||||
Source153: macros.forge
|
Source153: macros.forge
|
||||||
Source154: macros.ldconfig
|
Source154: macros.kmp
|
||||||
Source155: macros.fedora-misc
|
Source155: macros.ldconfig
|
||||||
|
Source156: macros.vpath
|
||||||
|
|
||||||
# Build policy scripts
|
# Build policy scripts
|
||||||
# this comes from https://github.com/rpm-software-management/rpm/pull/344
|
# this comes from https://github.com/rpm-software-management/rpm/pull/344
|
||||||
|
@ -111,6 +112,7 @@ Requires: perl-srpm-macros
|
||||||
Requires: python-srpm-macros >= 3-46
|
Requires: python-srpm-macros >= 3-46
|
||||||
Requires: qt5-srpm-macros
|
Requires: qt5-srpm-macros
|
||||||
Requires: rust-srpm-macros
|
Requires: rust-srpm-macros
|
||||||
|
Requires: rpmautospec-rpm-macros
|
||||||
|
|
||||||
Requires: rpm >= 4.11.0
|
Requires: rpm >= 4.11.0
|
||||||
Requires: dwz >= 0.4
|
Requires: dwz >= 0.4
|
||||||
|
@ -188,11 +190,12 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
||||||
%{rrcdir}/brp-ldconfig
|
%{rrcdir}/brp-ldconfig
|
||||||
%{_fileattrsdir}/*.attr
|
%{_fileattrsdir}/*.attr
|
||||||
%{_rpmconfigdir}/macros.d/macros.*-srpm
|
%{_rpmconfigdir}/macros.d/macros.*-srpm
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.build-constraints
|
||||||
%{_rpmconfigdir}/macros.d/macros.dwz
|
%{_rpmconfigdir}/macros.d/macros.dwz
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.fedora-misc
|
||||||
%{_rpmconfigdir}/macros.d/macros.forge
|
%{_rpmconfigdir}/macros.d/macros.forge
|
||||||
%{_rpmconfigdir}/macros.d/macros.ldconfig
|
%{_rpmconfigdir}/macros.d/macros.ldconfig
|
||||||
%{_rpmconfigdir}/macros.d/macros.vpath
|
%{_rpmconfigdir}/macros.d/macros.vpath
|
||||||
%{_rpmconfigdir}/macros.d/macros.fedora-misc
|
|
||||||
%dir %{_rpmluadir}/fedora
|
%dir %{_rpmluadir}/fedora
|
||||||
%dir %{_rpmluadir}/fedora/srpm
|
%dir %{_rpmluadir}/fedora/srpm
|
||||||
%dir %{_rpmluadir}/fedora/rpm
|
%dir %{_rpmluadir}/fedora/rpm
|
||||||
|
@ -213,8 +216,18 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
||||||
%{_rpmconfigdir}/macros.d/macros.kmp
|
%{_rpmconfigdir}/macros.d/macros.kmp
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 26 2021 David Abdurachmanov <david.abdurachmanov@gmail.com> - 175-1.0.riscv64
|
* Sun Aug 15 2021 Michel Alexandre Salim <salimma@fedoraproject.org> - 176-3
|
||||||
- Add riscv64 to %%mono_arches
|
- Fix macros.build-constraints' %%limit_build
|
||||||
|
- number of CPUs will never be set to less than 1
|
||||||
|
- this now outputs build flag overrides to be used with %%make_build etc.
|
||||||
|
- add documentation
|
||||||
|
|
||||||
|
* Sat Jul 24 2021 Michel Alexandre Salim <salimma@fedoraproject.org> - 176-2
|
||||||
|
- Add macros.build-constraints
|
||||||
|
- Keep the misc macros in alphabetical order
|
||||||
|
|
||||||
|
* Thu Apr 29 2021 Stephen Coady <scoady@redhat.com> - 176-1
|
||||||
|
- Add Requires: rpmautospec-rpm-macros
|
||||||
|
|
||||||
* Wed Mar 10 2021 Kalev Lember <klember@redhat.com> - 175-1
|
* Wed Mar 10 2021 Kalev Lember <klember@redhat.com> - 175-1
|
||||||
- BRP Python Bytecompile: Avoid hardcoding /usr/bin prefix for python
|
- BRP Python Bytecompile: Avoid hardcoding /usr/bin prefix for python
|
||||||
|
|
Loading…
Reference in New Issue