[OS-BUILD PATCH 4/4] [redhat] fix kernel changelog release mismatch in dist-release

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

 



From: "Herton R. Krzesinski" <herton@xxxxxxxxxx>

The kernel changelog which is created also have a wrong release number eg.:

  ...
  +RHEL_RELEASE = 69
  --- a/redhat/kernel.changelog-8.99
  +++ b/redhat/kernel.changelog-8.99
  @@ -1,3 +1,7 @@
  +* Wed Nov 11 2020 Fedora Kernel Team <kernel-team@xxxxxxxxxxxxxxxxx> [5.10.0-0.rc3.20201111giteccc87672492.68.test]
  ...

That's because of stale data/changelog which is created before the release
bump is done. We need to revert changes and recreate the changelog after
the diff-index check and release bump, so we get the updated number and do
not have a duplicate changelog entry.

Signed-off-by: Herton R. Krzesinski <herton@xxxxxxxxxx>
---
 redhat/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/redhat/Makefile b/redhat/Makefile
index 0a7654e8fd28..7130f4e25c8c 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -296,7 +296,8 @@ dist-rpm-baseonly: dist-sources
 
 
 # unless you know what you're doing, you don't want to use the next four ones
-dist-release-finish:
+dist-release-finish: setup-source
+	@cp $(SOURCES)/$(CHANGELOG) $(REDHAT)/$(CHANGELOG)
 	@git add $(REDHAT)/$(CHANGELOG)
 	@git add $(REDHAT)/marker
 	@git commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(CHANGELOG) $(PACKAGE_NAME).spec.template -m "[redhat] $(PACKAGE_NAME)-$(STAMP_VERSION)-$(PREBUILD)$(BUILD)$(BUILDID)"
@@ -308,6 +309,7 @@ dist-release-changed: setup-source
 	@if git diff-index --quiet HEAD; then \
 		echo "Nothing changed, skipping updates"; \
 	else \
+		git checkout -- $(REDHAT)/$(CHANGELOG); \
 		$(REDHAT)/scripts/new_release.sh $(REDHAT) $(__YSTREAM) $(__ZSTREAM); \
 		$(MAKE) dist-release-finish; \
 	fi
-- 
GitLab
_______________________________________________
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




[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