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/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -564,3 +564,5 @@ dist-full-help: @echo ' target used by the current branch/tree.' @echo ' dist-self-test - Runs self-tests from the redhat/self-test directory' @echo '' + +export diff --git a/redhat/dumpvar b/redhat/dumpvar new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/dumpvar @@ -0,0 +1 @@ +echo dumpvar $UPSTREAM_BRANCH diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -1,13 +1,5 @@ #!/bin/bash -# set all Makefile variables -while read VAR -do - var=$(echo $VAR | cut -d"=" -f1) - value=$(echo $VAR | cut -d"=" -f2) - eval $var=\$value -done < <(make dist-dump-variables | grep "=" | grep -v -E "^\.") - LAST_MARKER=$(cat $REDHAT/marker) RPMVERSION=${RPMKVERSION}.${RPMKPATCHLEVEL} clogf="$SOURCES/changelog" @@ -142,9 +134,9 @@ test -n "$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/ @@ -153,7 +145,7 @@ test -n "$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