Commit Graph

9 Commits

Author SHA1 Message Date
Don Zickus a9703038fe Use RHJOBS for create-tarball
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>
2023-03-20 16:29:05 -04:00
Prarit Bhargava 93172111e2 redhat/Makefile: Deprecate SINGLE_TARBALL variable
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit 30f1220bd624d9af3daefff7aca0fd7e558fd743
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Wed Jul 27 08:53:56 2022 -0400

    redhat/Makefile: Deprecate SINGLE_TARBALL variable

    Deprecate the SINGLE_TARBALL variable.

    Signed-off-by: Prarit Bhargava <prarit@redhat.com>

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:19:06 -04:00
Prarit Bhargava c61f1f88bb redhat: shellcheck cleanup
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit 74181714e9fc866f3d7fc40b94d7eb8e0e7650d1
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Mon May 2 09:06:11 2022 -0400

    redhat: shellcheck cleanup

    Some shellcheck cleanups.

    Signed-off-by: Prarit Bhargava <prarit@redhat.com>

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:18:57 -04:00
Prarit Bhargava 3061375ab9 redhat/Makefile: Rename TARFILE_RELEASE to SPECTARFILE_RELEASE
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>
2022-09-22 10:18:57 -04:00
Prarit Bhargava ed4c734715 redhat/scripts/create-tarball.sh: Use Makefile variables
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit 9019d540aed0e5aa187a36d0297d87a53c127801
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Wed Apr 20 17:20:28 2022 -0400

    redhat/scripts/create-tarball.sh: Use Makefile variables

    Use Makefile variables in redhat/scripts/create-tarball.sh.

    Signed-off-by: Prarit Bhargava <prarit@redhat.com>

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:18:55 -04:00
Prarit Bhargava c89c8498db redhat/scripts/create-tarball.sh: Use Makefile TARBALL variable
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit 4d36694587c650488d15ec58723fa79744cf06a7
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Fri Mar 4 19:39:37 2022 -0500

    redhat/scripts/create-tarball.sh: Use Makefile TARBALL variable

    Use the Makefile TARBALL variable instead of passing it as an argument.

    Signed-off-by: Prarit Bhargava <prarit@redhat.com>

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:18:49 -04:00
Ben Crocker ee0750cb0b [redhat] create-tarball.sh: Fix syntax flagged by shellcheck
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>
2021-08-30 14:30:02 -04:00
Neil Horman 76ee5e1237 Fix xz memory usage issue
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>
2021-08-30 10:49:58 -04:00
Laura Abbott c8079d9d8b [initial commit] Add scripts
Various scripts used to support kernel building

Signed-off-by: Laura Abbott <labbott@redhat.com>
2021-08-30 10:49:08 -04:00