From: Herton R. Krzesinski <herton@xxxxxxxxxx> 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@xxxxxxxxxx> diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -205,11 +205,10 @@ else endif KVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL) -DISTRO_BUILD:=$(PREBUILD)$(shell echo $(BUILD) | sed -e 's|\(^[0-9]\{1,4\}\)\..*|\1|') -KABI_TARBALL:=$(SOURCES)/kernel-abi-stablelists-$(KVERSION)-$(DISTRO_BUILD).tar.bz2 -KABIDW := $(REDHAT)/kabi-dwarf -KABIDW_TARBALL:=$(SOURCES)/kernel-kabi-dw-$(KVERSION)-$(DISTRO_BUILD).tar.bz2 PKGRELEASE:=$(PREBUILD)$(BUILD)$(BUILDID) +KABI_TARBALL:=$(SOURCES)/kernel-abi-stablelists-$(KVERSION)-$(PKGRELEASE).tar.bz2 +KABIDW := $(REDHAT)/kabi-dwarf +KABIDW_TARBALL:=$(SOURCES)/kernel-kabi-dw-$(KVERSION)-$(PKGRELEASE).tar.bz2 RPMVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL)-$(PKGRELEASE) SPECRELEASE:=$(PREBUILD)$(BUILD)%{?buildid}%{?dist} SRPM:=$(SRPMS)/$(PACKAGE_NAME)-$(RPMVERSION)$(DIST).src.rpm @@ -421,10 +420,10 @@ dist-tarball: $(TARBALL) @echo "redhat/$(TARFILE)" dist-kernelrelease: - @echo $(PACKAGE_NAME)-$(KVERSION)-$(DISTRO_BUILD) + @echo $(PACKAGE_NAME)-$(KVERSION)-$(PKGRELEASE) dist-kernelversion: - @echo $(KVERSION)-$(DISTRO_BUILD) + @echo $(KVERSION)-$(PKGRELEASE) dist-specfile: setup-source @echo $(SOURCES)/$(SPECFILE) diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -63,7 +63,6 @@ test -f "$SOURCES/$SPECFILE" && s/%%RPMKSUBLEVEL%%/$RPMKSUBLEVEL/ s/%%PKGRELEASE%%/$PKGRELEASE/ s/%%SPECRELEASE%%/$SPECRELEASE/ - s/%%DISTRO_BUILD%%/$DISTRO_BUILD/ s/%%RELEASED_KERNEL%%/$RELEASED_KERNEL/ s/%%DEBUG_BUILDS_ENABLED%%/$DEBUG_BUILDS_ENABLED/ s/%%INCLUDE_FEDORA_FILES%%/$INCLUDE_FEDORA_FILES/ 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 @@ -87,8 +87,6 @@ Summary: The Linux kernel # the --with-release option overrides this setting.) %define debugbuildsenabled %%DEBUG_BUILDS_ENABLED%% -%global distro_build %%DISTRO_BUILD%% - %if 0%{?fedora} %define secure_boot_arch x86_64 %else @@ -828,8 +826,8 @@ Source211: Module.kabi_dup_ppc64le Source212: Module.kabi_dup_s390x Source213: Module.kabi_dup_x86_64 -Source300: kernel-abi-stablelists-%{rpmversion}-%{distro_build}.tar.bz2 -Source301: kernel-kabi-dw-%{rpmversion}-%{distro_build}.tar.bz2 +Source300: kernel-abi-stablelists-%{rpmversion}-%{pkgrelease}.tar.bz2 +Source301: kernel-kabi-dw-%{rpmversion}-%{pkgrelease}.tar.bz2 # Sources for kernel-tools Source2000: cpupower.service diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh index blahblah..blahblah 100755 --- a/redhat/scripts/rh-dist-git.sh +++ b/redhat/scripts/rh-dist-git.sh @@ -37,19 +37,9 @@ echo "Copying updated files" echo "Uploading new tarballs" # upload tarballs sed -i "/linux-.*.tar.xz/d" "$tmpdir/$PACKAGE_NAME"/{sources,.gitignore}; -upload_list="$TARBALL" - -# Only upload kernel-abi-stablelists tarball if its release counter changed. -if [ "$__ZSTREAM" == "no" ]; then - if ! grep -q "$KABI_TARBALL" "$tmpdir/$PACKAGE_NAME"/sources; then - sed -i "/kernel-abi-stablelists.*.tar.bz2/d" "$tmpdir/$PACKAGE_NAME"/{sources,.gitignore}; - upload_list="$upload_list $KABI_TARBALL" - fi - if ! grep -q "$KABIDW_TARBALL" "$tmpdir/$PACKAGE_NAME"/sources; then - sed -i "/kernel-kabi-dw-.*.tar.bz2/d" "$tmpdir/$PACKAGE_NAME"/{sources,.gitignore}; - upload_list="$upload_list $KABIDW_TARBALL" - fi -fi +sed -i "/kernel-abi-stablelists.*.tar.bz2/d" "$tmpdir/$PACKAGE_NAME"/{sources,.gitignore}; +sed -i "/kernel-kabi-dw-.*.tar.bz2/d" "$tmpdir/$PACKAGE_NAME"/{sources,.gitignore}; +upload_list="$TARBALL $KABI_TARBALL $KABIDW_TARBALL" # We depend on word splitting here: # shellcheck disable=SC2086 -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1764 _______________________________________________ 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