Bugzilla: INTERNAL
Upstream Status: RHEL Only (ARK 3fcd177f84c5080)
rpm-4.18.1 recently modified how _smp_mflags is defined and it breaks
tarball creation: rpm --eval %{_smp_mflags} because the output is
'-j${RPM_BUILD_NCPUS}' instead of '-j8'.
While that is being worked on, let's simplify things and use what we
already have: RHJOBS.
Now the user controls how many threads with 'make -jX'.
Signed-off-by: Don Zickus <dzickus@redhat.com>
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark
commit 084cfe3eb7ba637ca30ea8ff222ba408ab878c84
Author: Prarit Bhargava <prarit@redhat.com>
Date: Sun Mar 27 11:31:21 2022 -0400
redhat/Makefile: Rename TARFILE_RELEASE to SPECTARFILE_RELEASE
Change TARFILE_RELEASE to SPECTARFILE_RELEASE so that readers
understand it is passed into the spec file.
Rename TARFILE_RELEASE to SPECTARFILE_RELEASE.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
SC2006: Use $(...) notation instead of legacy backticked `...`.
SC1083: This { is literal. Check expression (missing ;/\n?) or quote it.
SC2086: Double quote to prevent globbing and word splitting.
BUT:
Disable shellcheck on last step:
On the last step, we DEPEND on word splitting for correct interpretation
of XZ_OPTIONS and XZ_THREADS, so remove quotes and, just before the
xz step:
shellcheck disable=SC2086
Signed-off-by: Ben Crocker <bcrocker@redhat.com>
The create-tarball.sh script can occasionally hang non 64 bit systems
due to extreeme memory usage. Build farms will occasionally use older
32 bit systems to do arch independent work (like assembling
srpms/tarballs/etc), and when xz runs on those systems, it will, given a
sufficiently large input file, allocate more than the available 3G of
memory address space allocated to a user space process, causing swap
storms, and build failures due to resultant job timeouts.
Fix it by detecting if we are on a 64 bit arch or not, and setting the
xz memory usage limit accordingly
Signed-off-by: Neil Horman <nhorman@redhat.com>