Commit Graph

7 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 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 41f199c69c Avoid creating files in $RPM_SOURCE_DIR
Bugzilla: INTERNAL
Upstream Status: RHEL only, https://gitlab.com/cki-project/kernel-ark

commit d1cdeda1e83f1dc7bbabb7d23c66f4fd56ddb929
Author: Nicolas Chauvet <kwizart@gmail.com>
Date:   Wed Feb 9 16:18:37 2022 +0100

    Avoid creating files in $RPM_SOURCE_DIR

    Initially reported at
    https://gitlab.com/cki-project/kernel-ark/-/issues/76

    This patch removes the creation of intermediate files in $RPM_SOURCE_DIR

    Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2022-09-22 10:18:51 -04:00
Ben Crocker f0169a781a [redhat] update_scripts.sh: Fix syntax flagged by shellcheck
SC2231: Quote expansions in this for loop glob to prevent wordsplitting.
SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Ben Crocker <bcrocker@redhat.com>
2021-08-30 14:30:02 -04:00
David Howells 58b65cfdea Fix update_scripts.sh unselective pattern sub
The update_scripts.sh script doesn't correctly strip the suffix from the
end of the pathname, but will substitute for it anywhere in the path.  The
pattern really ought to have been /[.]$TARGET$//.

Fix this by using a special shell expansion to do it instead of invoking a
sed pipeline.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeremy Cline <jcline@redhat.com>
2021-08-30 10:50:16 -04:00
Jeremy Cline d4873d17f1 Copy distro files rather than moving them
Moving them clobbers them in the dist-git repository. People using the
dist-git to rebuild the SRPM might "fedpkg prep" and then "fedpkg local"
(or similar) which fails because the files got moved.

Cc: jforbes@redhat.com
Signed-off-by: Jeremy Cline <jcline@redhat.com>
2021-08-30 10:50:12 -04:00
Laura Abbott f28f383104 Provide both Fedora and RHEL files in the SRPM
Currently, we've been switching between copying Fedora and RHEL files
based on dist-tag. Long term, we want to have a single tree to manage
both Fedora and RHEL. Move towards this by shipping both RHEL and
Fedora files in a single RPM. The choice of which set of files to use
gets decided at build time based on the buildroot.

This series is a big large but it's not easy to break up simply because
making one change requires making all the other changes to avoid breaking
anything. The big changes:

- Move some files and scripts to have the .fedora or .rhel extension
- Tweak some of the config scripts to accont for a fedora/rhel extension
- spec file changes to account for these changes

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