[OS-BUILD PATCHv6 2/2] redhat: Unify genspec.sh and kernel.spec variable names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat: Unify genspec.sh and kernel.spec variable names

Use common variable names between genspec.sh and kernel.spec.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/redhat/genspec.sh b/redhat/genspec.sh
index blahblah..blahblah 100755
--- a/redhat/genspec.sh
+++ b/redhat/genspec.sh
@@ -134,9 +134,9 @@ test -f "$SOURCES/$SPECFILE" &&
 	/%%CHANGELOG%%/r $SOURCES/$CHANGELOG
 	/%%CHANGELOG%%/d
 	s/%%BUILDID%%/$BUILDID_DEFINE/
-	s/%%KVERSION%%/$RPMKVERSION/
-	s/%%KPATCHLEVEL%%/$RPMKPATCHLEVEL/
-	s/%%KSUBLEVEL%%/$RPMKSUBLEVEL/
+	s/%%RPMKVERSION%%/$RPMKVERSION/
+	s/%%RPMKPATCHLEVEL%%/$RPMKPATCHLEVEL/
+	s/%%RPMKSUBLEVEL%%/$RPMKSUBLEVEL/
 	s/%%PKGRELEASE%%/$PKGRELEASE/
 	s/%%SPECRELEASE%%/$SPECRELEASE/
 	s/%%DISTRO_BUILD%%/$DISTRO_BUILD/
@@ -145,7 +145,7 @@ test -f "$SOURCES/$SPECFILE" &&
 	s/%%INCLUDE_FEDORA_FILES%%/$INCLUDE_FEDORA_FILES/
 	s/%%INCLUDE_RHEL_FILES%%/$INCLUDE_RHEL_FILES/
 	s/%%PATCHLIST_CHANGELOG%%/$PATCHLIST_CHANGELOG/
-	s/%%TARBALL_VERSION%%/$TARFILE_RELEASE/" "$SOURCES/$SPECFILE"
+	s/%%TARFILE_RELEASE%%/$TARFILE_RELEASE/" "$SOURCES/$SPECFILE"
 
 echo "MARKER is $MARKER"
 
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -128,14 +128,14 @@ Summary: The Linux kernel
 %endif
 
 # The kernel tarball/base version
-%define kversion %%KVERSION%%.%%KPATCHLEVEL%%
+%define kversion %%RPMKVERSION%%.%%RPMKPATCHLEVEL%%
 
-%define rpmversion %%KVERSION%%.%%KPATCHLEVEL%%.%%KSUBLEVEL%%
-%define patchversion %%KVERSION%%.%%KPATCHLEVEL%%
+%define rpmversion %%RPMKVERSION%%.%%RPMKPATCHLEVEL%%.%%RPMKSUBLEVEL%%
+%define patchversion %%RPMKVERSION%%.%%RPMKPATCHLEVEL%%
 %define pkgrelease %%PKGRELEASE%%
 
 # This is needed to do merge window version magic
-%define patchlevel %%KPATCHLEVEL%%
+%define patchlevel %%RPMKPATCHLEVEL%%
 
 # allow pkg_release to have configurable %%{?dist} tag
 %define specrelease %%SPECRELEASE%%
@@ -695,7 +695,7 @@ BuildRequires: lld
 # exact git commit you can run
 #
 # xzcat -qq ${TARBALL} | git get-tar-commit-id
-Source0: linux-%%TARBALL_VERSION%%.tar.xz
+Source0: linux-%%TARFILE_RELEASE%%.tar.xz
 
 Source1: Makefile.rhelver
 
@@ -1364,7 +1364,7 @@ ApplyPatch()
     exit 1
   fi
   if ! grep -E "^Patch[0-9]+: $patch\$" %{_specdir}/${RPM_PACKAGE_NAME}.spec ; then
-    if [ "${patch:0:8}" != "patch-%%KVERSION%%." ] ; then
+    if [ "${patch:0:8}" != "patch-%%RPMKVERSION%%." ] ; then
       echo "ERROR: Patch  $patch  not listed as a source patch in specfile"
       exit 1
     fi
@@ -1391,8 +1391,8 @@ ApplyOptionalPatch()
   fi
 }
 
-%setup -q -n kernel-%%TARBALL_VERSION%% -c
-mv linux-%%TARBALL_VERSION%% linux-%{KVERREL}
+%setup -q -n kernel-%%TARFILE_RELEASE%% -c
+mv linux-%%TARFILE_RELEASE%% linux-%{KVERREL}
 
 cd linux-%{KVERREL}
 cp -a %{SOURCE1} .

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1638
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux