From: Jeremy Cline <jcline(a)redhat.com>
Include Makefile.rhelver by treating it as a source file rather than
generating it in a patch. This avoids depending on the tree being
prepared having a reference to the master branch, which should fix the
CKI build failures. It's also simpler.
Signed-off-by: Jeremy Cline <jcline(a)redhat.com>
---
redhat/Makefile | 1 +
redhat/genspec.sh | 17 -----------------
redhat/kernel.spec.template | 7 +++----
3 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/redhat/Makefile b/redhat/Makefile
index 25ed46f667c3..e330d3e8b806 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -250,6 +250,7 @@ sources-rh: $(TARBALL)
configs/process_configs.sh \
parallel_xz.sh \
generate_bls_conf.sh \
+ ../Makefile.rhelver \
README.rst \
$(SOURCES)/
@for KABIARCH in $(ARCH_LIST); do \
diff --git a/redhat/genspec.sh b/redhat/genspec.sh
index 3a80426e348b..65829f959978 100755
--- a/redhat/genspec.sh
+++ b/redhat/genspec.sh
@@ -245,24 +245,7 @@ test -n "$SPECFILE" &&
s/%%TARBALL_VERSION%%/$TARFILE_RELEASE/" $SPECFILE
-# Need an empty file for dist-git compatibility
-touch "$SOURCES/patch-$RPMVERSION-redhat.patch"
-truncate -s 0 "$SOURCES/patch-$RPMVERSION-redhat.patch"
if [ "$SINGLE_TARBALL" = 0 ]; then
- # We want the current state of this file, not all its history
- RHELVER=$(git diff -p --stat master HEAD -- ../Makefile.rhelver)
- printf "From 8474ffe83a89d7b5d2c6515875a308ff682df6f9 Mon Sep 17 00:00:00 2001
-From: Kernel Team <kernel-team(a)fedoraproject.org>
-Date: %s
-Subject: [PATCH] Include Makefile.rhelver
-
-Used to set the RHEL version.
----
-%s
---
-2.26.0\n
-" "$(date "+%a, %d %b %Y %R:%S %z")" "$RHELVER" >
"$SOURCES/patch-$RPMVERSION-redhat.patch"
-
truncate -s 0 $plistf
COMMITS=$(git log --reverse --pretty=format:"%h" --no-merges
"$MARKER".. \
":(exclude,top).get_maintainer.conf" \
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index 8d0244f08056..c494d197f0d8 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -570,6 +570,8 @@ BuildRequires: asciidoc
# xzcat -qq ${TARBALL} | git get-tar-commit-id
Source0: linux-%%TARBALL_VERSION%%.tar.xz
+Source1: Makefile.rhelver
+
# Name of the packaged file containing signing key
%ifarch ppc64le
@@ -703,8 +705,6 @@ Source4000: README.rst
## Patches needed for building this package
-Patch1: patch-%{rpmversion}-redhat.patch
-
%if !%{nopatches}
%%PATCHLIST%%
@@ -1206,8 +1206,7 @@ ApplyOptionalPatch()
mv linux-%%TARBALL_VERSION%% linux-%{KVERREL}
cd linux-%{KVERREL}
-
-ApplyOptionalPatch patch-%{rpmversion}-redhat.patch
+cp -a %{SOURCE1} .
%if !%{nopatches}
--
2.26.2