diff --git a/0069-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch b/0069-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch index 11452fc..2db4f75 100644 --- a/0069-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch +++ b/0069-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch @@ -1,4 +1,4 @@ -From e00237f383d6c5cce444e3ac4c8991573b8a518c Mon Sep 17 00:00:00 2001 +From 6656c53125c328613529a52b3dcdf479d49ec475 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Mon, 16 Mar 2015 14:14:19 -0400 Subject: [PATCH 69/74] Use Distribution Package Sort for grub2-mkconfig @@ -10,6 +10,16 @@ starting with the most recent. Added an option for rpm-based systems to use the rpm-sort library to sort kernels instead. Resolves rhbz#1124074 + +And then later we discovered that was wrong and did: + +Reverse rpmvercmp return value (#1229329) + +RPM sort was returning kernels sorted from oldest to newest +instead of newest to oldest. Flipped the sign on the return +value to switch the order. + +Resolves: rhbz#1229329 --- .gitignore | 1 + Makefile.util.def | 16 +++ @@ -160,7 +170,7 @@ index 0000000..8ce2148 +.BR "info grub" diff --git a/util/grub-rpm-sort.c b/util/grub-rpm-sort.c new file mode 100644 -index 0000000..f33bd1e +index 0000000..4bbba1f --- /dev/null +++ b/util/grub-rpm-sort.c @@ -0,0 +1,281 @@ @@ -283,19 +293,19 @@ index 0000000..f33bd1e + vercmpflag = rpmvercmp ((lhs_name == NULL ? "" : lhs_name), + (rhs_name == NULL ? "" : rhs_name)); + if (vercmpflag != 0) -+ return vercmpflag; ++ return -vercmpflag; + + /* Check version and return if unequal */ + vercmpflag = rpmvercmp ((lhs_version == NULL ? "" : lhs_version), + (rhs_version == NULL ? "" : rhs_version)); + if (vercmpflag != 0) -+ return vercmpflag; ++ return -vercmpflag; + + /* Check release and return the version compare value */ + vercmpflag = rpmvercmp ((lhs_release == NULL ? "" : lhs_release), + (rhs_release == NULL ? "" : rhs_release)); + -+ return vercmpflag; ++ return -vercmpflag; +} + +static void diff --git a/0070-Add-friendly-grub2-password-config-tool-985962.patch b/0070-Add-friendly-grub2-password-config-tool-985962.patch index e3b1b31..ac29044 100644 --- a/0070-Add-friendly-grub2-password-config-tool-985962.patch +++ b/0070-Add-friendly-grub2-password-config-tool-985962.patch @@ -1,4 +1,4 @@ -From d41ecd85b4a086643bc17d6bd96d9cf644017199 Mon Sep 17 00:00:00 2001 +From 9e6914a17245c7a9499c58b5b8c578526f201004 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Thu, 25 Jun 2015 11:13:11 -0400 Subject: [PATCH 70/74] Add friendly grub2 password config tool (#985962) diff --git a/0071-Make-exit-take-a-return-code.patch b/0071-Make-exit-take-a-return-code.patch index 08f2c15..ba26e16 100644 --- a/0071-Make-exit-take-a-return-code.patch +++ b/0071-Make-exit-take-a-return-code.patch @@ -1,4 +1,4 @@ -From 0bc88ef1f983924c9fdc82c5f3a55213ec71ea4c Mon Sep 17 00:00:00 2001 +From 77d0a87d5c1d1864f9a8409cde6fbd29d11bd996 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 7 Jul 2015 12:00:26 -0400 Subject: [PATCH 71/74] Make "exit" take a return code. diff --git a/0072-Add-some-__unused__-where-gcc-5.x-is-more-picky-abou.patch b/0072-Add-some-__unused__-where-gcc-5.x-is-more-picky-abou.patch index ebddeda..96726e1 100644 --- a/0072-Add-some-__unused__-where-gcc-5.x-is-more-picky-abou.patch +++ b/0072-Add-some-__unused__-where-gcc-5.x-is-more-picky-abou.patch @@ -1,4 +1,4 @@ -From de4b00b23dcbe9218650565cb55b15866cb51868 Mon Sep 17 00:00:00 2001 +From 9466b1c5194e6c7d388349fa2691e288b4523bc3 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 7 Jul 2015 12:04:28 -0400 Subject: [PATCH 72/74] Add some __unused__ where gcc 5.x is more picky about diff --git a/0073-Fix-race-in-EFI-validation.patch b/0073-Fix-race-in-EFI-validation.patch index 79be625..3f929e6 100644 --- a/0073-Fix-race-in-EFI-validation.patch +++ b/0073-Fix-race-in-EFI-validation.patch @@ -1,4 +1,4 @@ -From 2636009baa0bed56168f41f97e2396afdb183a0d Mon Sep 17 00:00:00 2001 +From 6afbd577549250cdd954dfc12f03a6a4e7d3b906 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 14 Jul 2015 16:58:51 -0700 Subject: [PATCH 73/74] Fix race in EFI validation diff --git a/0074-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch b/0074-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch index 4cdc0a3..42e1560 100644 --- a/0074-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch +++ b/0074-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch @@ -1,4 +1,4 @@ -From 98d1d5afe30a77125a153c09e73e9dc71b5ef8da Mon Sep 17 00:00:00 2001 +From 530c5e9d5b84fd87daed817fd11415486bcfd9a6 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 22 Jul 2015 11:21:01 -0400 Subject: [PATCH 74/74] Mark po/exclude.pot as binary so git won't try to diff diff --git a/grub2.spec b/grub2.spec index 215eb28..d70939d 100644 --- a/grub2.spec +++ b/grub2.spec @@ -45,7 +45,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 0.18%{?dist} +Release: 0.19%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -594,6 +594,10 @@ fi %{_datarootdir}/grub/themes/starfield %changelog +* Fri Jul 31 2015 Peter Jones - 2.02-0.19 +- Fix grub2-mkconfig's sort to put kernels in the right order. + Related: rhbz#1124074 + * Thu Jul 30 2015 Peter Jones - 2.02-0.18 - Fix a build failure on aarch64