Commit Graph

19 Commits

Author SHA1 Message Date
Prarit Bhargava ffbbe8ea1b redhat: shellcheck script fixes
Bugzilla: INTERNAL
Upstream Status: RHEL only

Fix shellcheck errors found by self-test/0001-shellcheck.bats.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2023-09-11 10:12:42 -04:00
Prarit Bhargava 324ffdc02d redhat/Makefile: Add DIST to git tags for RHEL
Bugzilla: INTERNAL
Upstream Status: RHEL only

RHEL repositories may have an extended DIST tag, such as .el9_0.  Users
looking for builds need a complete tag in dist-git and source-git in order
to find a build's source tag.

Add DIST to the git tags for RHEL.

Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-30 09:05:40 -04:00
Prarit Bhargava e2b07ed7f9 redhat: remove GL_DISTGIT_USER, RHDISTGIT and unify dist-git cloning
Bugzilla: INTERNAL
Upstream Status: RHEL only

commit e91e57ec0c
Merge: ff991bd01d 576aafefc3
Author: Patrick Talbert <ptalbert@redhat.com>
Date:   Fri Sep 2 09:41:12 2022 +0200

    Merge: redhat: remove GL_DISTGIT_USER, RHDISTGIT and unify dist-git cloning

    MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1286

    ```
    Bugzilla: INTERNAL
    Upstream Status: RHEL Only
    Tested: make DISTRO=centos dist-git-test

    1) GL_DISTGIT_USER is used for private fork cloning. There is no
       reason to use private fork in dist-git cloning. First this would
       require to keep the fork in sync with the orig repo main branch
       and moreover this behaves differently if the local repo cache is
       specified or not(*pkg vs git).

    2) Copying sources from repo cache depends on working dir and it
       requires the sources to be updated anyways. Just remove this step.

    3) *pkg commands allow to pass extra args to git. There is no need
       to use two ways how to clone the repo. This also makes RHDISTGIT
       obsolete. Use just *pkg for cloning and remove RHDISTGIT.

    4) With these clean-ups there is no need to keep clone_tree.sh around.
       Just remove it and move the few commands directly into rh-dist-git.sh

    Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
    ```

    Approved-by: Herton R. Krzesinski <herton@redhat.com>
    Approved-by: John B. Wyatt IV <jwyatt@redhat.com>
    Approved-by: Jarod Wilson <jarod@redhat.com>

    Signed-off-by: Patrick Talbert <ptalbert@redhat.com>

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:19:13 -04:00
Prarit Bhargava 1eba1f58aa redhat/Makefile: Rename RPMVERSION to BASEVERSION
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit 2f028d90bf23340c8825c689cc33ca98e12134a1
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Sun Mar 27 15:26:48 2022 -0400

    redhat/Makefile: Rename RPMVERSION to BASEVERSION

    RPMVERSION is the rpm NVR without the dist tag.  It is not the RPM
    version so RPMVERSION is not an accurate name for this field.

    Rename RPMVERSION to BASEVERSION.

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

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:18:59 -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 bb2ff98e50 redhat/Makefile: Rename CHANGELOG to SPECCHANGELOG
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit f5df15e4b630e1a38ac7882c407f8b1715cec026
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Sun Mar 27 10:18:16 2022 -0400

    redhat/Makefile: Rename CHANGELOG to SPECCHANGELOG

    Change CHANGELOG to SPECCHANGELOG so that readers understand it is passed
    into the spec file.  While the CHANGELOG does have use other than in the
    spec file it is useful to know that the string is used in the spec file.

    Rename CHANGELOG to SPECKCHANGELOG.

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

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:18:56 -04:00
Prarit Bhargava 0bccd129ef redhat: change kabi tarballs to use the package release
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit 0178dbf844a0899c9c19493e4e3e38ce360f1bf2
Author: Herton R. Krzesinski <herton@redhat.com>
Date:   Tue Apr 26 18:09:04 2022 -0300

    redhat: change kabi tarballs to use the package release

    Bugzilla: INTERNAL
    Upstream Status: RHEL only

    In the past, kabi would not change with zstream releases, so there was
    special logic to use only the last ystream build number in the kabi*
    tarball names, as kabi data would never change while we did zstream
    kernel builds.

    However, that will change with RHEL 9, where actual kabi enforcement
    will be done later only with zstream and will depend on the stream. kabi
    data will only be relevant/added during zstream phase. Thus all the
    previous kabi data logic is obsolete now. Just clean that up and use
    package release for the kabi tarballs, which also simplify some things
    and allows us to remove the distro build number usage.

    Signed-off-by: Herton R. Krzesinski <herton@redhat.com>

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:18:55 -04:00
Prarit Bhargava ff55b4b330 redhat: generate distgit changelog in genspec.sh as well
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit fb4eb51672061b29a4a5ae392acc3cdee0ec1d76
Author: Herton R. Krzesinski <herton@redhat.com>
Date:   Fri Mar 11 14:00:25 2022 -0300

    redhat: generate distgit changelog in genspec.sh as well

    This is forwarded ported from current rhel-9/centos9 tree. Due lots
    of recent changes in the ARK tree regarding Makefile and variables,
    some changes had to be done to this: dropped variable changes/additions
    to redhat/Makefile, redhat/genspec.sh and redhat/scripts/rh-dist-git.sh,
    since those now are exported from the Makefile; for the same reason, the
    usage of some variables is changed from what was used as arguments before,
    to use the exported values from the Makefile. Another difference is also
    that the selftest data conditional made the changelog not use the
    stripped and updated changelog, this is adjusted/fixed here in this
    version.

    From: Jan Stancek <jstancek@redhat.com>

    Bugzilla: INTERNAL
    Upstream Status: RHEL only

    Forward port of rhel-8 commit:

    commit 924856ea3952cc52781d252be70f45c1231ee8ba
    Author: Jan Stancek <jstancek@redhat.com>
    Date:   Wed Mar 9 11:15:16 2022 +0100

        redhat: generate distgit changelog in genspec.sh as well

        Bugzilla: INTERNAL
        Upstream Status: RHEL only

        To break our dependence on ZSTREAM flag, make genlog.py generate
        also dist-git Resolves lines. Whether Resolves line uses ZBZs or YBZs,
        depends on whether genlog.py finds any ZBZs.

        After this change kernel.changelog* will start to contain also
        Resolves lines, which we need for dist-git changelog. For RPM changelog,
        we strip Resolves lines and use as before.

        Signed-off-by: Jan Stancek <jstancek@redhat.com>

    Signed-off-by: Jan Stancek <jstancek@redhat.com>
    Signed-off-by: Herton R. Krzesinski <herton@redhat.com>

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

commit a240f3a0ea72acdb6c52dea33a3dd3779fb01bd0
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Fri Mar 11 17:55:30 2022 -0500

    redhat/scripts/rh-dist-git.sh: Use Makefile variables

    Use Makefile variables in rh-dist-git.sh.

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

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:18:54 -04:00
Prarit Bhargava ce7ecf0cdc Revert "redhat: generate distgit changelog in genspec.sh as well"
Bugzilla: INTERNAL
Upstream Status: RHEL only.

Backout all centos-stream-9 redhat/ commits.

This reverts commit 5c27bf1520.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-07 19:43:35 -04:00
Prarit Bhargava 5fb2cc9464 Revert "redhat: change kabi tarballs to use the package release"
Bugzilla: INTERNAL
Upstream Status: RHEL only.

Backout all centos-stream-9 redhat/ commits.

This reverts commit 8f40af8ef0.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-07 19:43:35 -04:00
Prarit Bhargava 95f0955233 Revert "redhat: remove GL_DISTGIT_USER, RHDISTGIT and unify dist-git cloning"
Bugzilla: INTERNAL
Upstream Status: RHEL only

This reverts commit 576aafefc3.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-07 19:43:20 -04:00
Frantisek Hrbata 576aafefc3 redhat: remove GL_DISTGIT_USER, RHDISTGIT and unify dist-git cloning
Bugzilla: INTERNAL
Upstream Status: RHEL Only
Tested: make DISTRO=centos dist-git-test

1) GL_DISTGIT_USER is used for private fork cloning. There is no
   reason to use private fork in dist-git cloning. First this would
   require to keep the fork in sync with the orig repo main branch
   and moreover this behaves differently if the local repo cache is
   specified or not(*pkg vs git).

2) Copying sources from repo cache depends on working dir and it
   requires the sources to be updated anyways. Just remove this step.

3) *pkg commands allow to pass extra args to git. There is no need
   to use two ways how to clone the repo. This also makes RHDISTGIT
   obsolete. Use just *pkg for cloning and remove RHDISTGIT.

4) With these clean-ups there is no need to keep clone_tree.sh around.
   Just remove it and move the few commands directly into rh-dist-git.sh

Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
2022-08-22 13:14:26 +02:00
Herton R. Krzesinski 8f40af8ef0 redhat: change kabi tarballs to use the package release
Bugzilla: INTERNAL
Upstream Status: RHEL only

In the past, kabi would not change with zstream releases, so there was
special logic to use only the last ystream build number in the kabi*
tarball names, as kabi data would never change while we did zstream
kernel builds.

However, that will change with RHEL 9, where actual kabi enforcement
will be done later only with zstream and will depend on the stream. kabi
data will only be relevant/added during zstream phase. Thus all the
previous kabi data logic is obsolete now. Just clean that up and use
package release for the kabi tarballs, which also simplify some things
and allows us to remove the distro build number usage.

Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2022-03-11 14:14:58 -03:00
Herton R. Krzesinski 5c27bf1520 redhat: generate distgit changelog in genspec.sh as well
From: Jan Stancek <jstancek@redhat.com>

Bugzilla: INTERNAL
Upstream Status: RHEL only

Forward port of rhel-8 commit:

commit 924856ea3952cc52781d252be70f45c1231ee8ba
Author: Jan Stancek <jstancek@redhat.com>
Date:   Wed Mar 9 11:15:16 2022 +0100

    redhat: generate distgit changelog in genspec.sh as well

    Bugzilla: INTERNAL
    Upstream Status: RHEL only

    To break our dependence on ZSTREAM flag, make genlog.py generate
    also dist-git Resolves lines. Whether Resolves line uses ZBZs or YBZs,
    depends on whether genlog.py finds any ZBZs.

    After this change kernel.changelog* will start to contain also
    Resolves lines, which we need for dist-git changelog. For RPM changelog,
    we strip Resolves lines and use as before.

    Signed-off-by: Jan Stancek <jstancek@redhat.com>

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2022-03-11 14:01:37 -03:00
Čestmír Kalina 7e408b0be3 [redhat] kabi: rename legacy terminology
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1953486
Upstream Status: RHEL only

As part of Red Hat’s commitment to remove problematic language from
our code, documentation, websites, and open source projects that we
are involved with, this patch renames kABI whitelist to stablelist.

Signed-off-by: Čestmír Kalina <ckalina@redhat.com>
2021-08-30 15:44:43 -04:00
Ben Crocker 497bf60763 [redhat] rh-dist-git.sh: Fix syntax flagged by shellcheck
SC2086: Double quote to prevent globbing and word splitting.
SC2145: Argument mixes string and array. Use * or separate argument.

SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Signed-off-by: Ben Crocker <bcrocker@redhat.com>
2021-08-30 14:30:03 -04:00
Jeremy Cline d17e2c0ebb Sync up the ARK build scripts
Signed-off-by: Jeremy Cline <jcline@redhat.com>
2021-08-30 10:49:11 -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