[OS-BUILD PATCH] [redhat] fix kernel.changelog sorting

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

 



From: Patrick Talbert <ptalbert@xxxxxxxxxx>

[redhat] fix kernel.changelog sorting

We take all the redhat/kernel.changelog-{major}.{minor} files and
generate a unified changelog file from them. It should process the
files in order from newest version to latest version so the unified file
is in reverse chronological order. Unfortunately, the sort operation
orders kernel.changelog-9.99 before kernel.changelog-10.0 so the
resulting file is out of order.

Fix this by using sort's -V (--version-sort) option as it orders the
files as expected.

Fixes: ec7c0d2f5586 ("redhat: ship all the changelog from source git into kernel-doc")

Signed-off-by: Patrick Talbert <ptalbert@xxxxxxxxxx>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -705,7 +705,7 @@ sources-rh: $(TARBALL) $(KABI_TARBALL) $(KABIDW_TARBALL) generate-testpatch-tmp
 		kernel-local \
 		dracut-virt.conf \
 		$(SOURCES)/
-	@cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -t '.' -k 3 -n -r) \
+	@cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -V -r) \
 		> $(SOURCES)/kernel.changelog
 	cp keys/redhatsecureboot{501,ca5}.cer $(SOURCES)/;
 	@for KABIARCH in $(ARCH_LIST); do \

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3229

-- 
_______________________________________________
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, report it: https://pagure.io/fedora-infrastructure/new_issue




[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