packages: grub2/grub2.spec, grub2/sort-version.patch (NEW) - sort kernel ve...

glen glen at pld-linux.org
Wed Jan 11 23:58:31 CET 2012


Author: glen                         Date: Wed Jan 11 22:58:31 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- sort kernel versions better when generating grub config; rel 9

---- Files affected:
packages/grub2:
   grub2.spec (1.115 -> 1.116) , sort-version.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/grub2/grub2.spec
diff -u packages/grub2/grub2.spec:1.115 packages/grub2/grub2.spec:1.116
--- packages/grub2/grub2.spec:1.115	Tue Nov 15 23:28:01 2011
+++ packages/grub2/grub2.spec	Wed Jan 11 23:58:26 2012
@@ -34,7 +34,7 @@
 Summary(pt_BR.UTF-8):	Gerenciador de inicialização GRUB2
 Name:		grub2
 Version:	1.99
-Release:	8
+Release:	9
 License:	GPL v2
 Group:		Base
 Source0:	http://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
@@ -55,6 +55,7 @@
 Patch8:		ppc.patch
 Patch9:		%{name}-awk.patch
 Patch10:	posix.patch
+Patch11:	sort-version.patch
 BuildRequires:	autoconf >= 2.53
 BuildRequires:	automake >= 1:1.11.1-1
 BuildRequires:	bison
@@ -202,10 +203,11 @@
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
 
 %if "%{cc_version}" < "3.4"
-grep -rl -- -Wno-missing-field-initializers . | xargs sed -i -e 's,-Wno-missing-field-initializers,,'
-sed -i -e '/video_mod_CFLAGS/s/$/ -Wno-error/' conf/common.rmk
+grep -rl -- -Wno-missing-field-initializers . | xargs %{__sed} -i -e 's,-Wno-missing-field-initializers,,'
+%{__sed} -i -e '/video_mod_CFLAGS/s/$/ -Wno-error/' conf/common.rmk
 %endif
 
 %build
@@ -407,6 +409,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.116  2012/01/11 22:58:26  glen
+- sort kernel versions better when generating grub config; rel 9
+
 Revision 1.115  2011/11/15 22:28:01  glen
 - one custom.cfg is enough, prefer one that needs to grub regeneration in grub dir; rel 8
 

================================================================
Index: packages/grub2/sort-version.patch
diff -u /dev/null packages/grub2/sort-version.patch:1.1
--- /dev/null	Wed Jan 11 23:58:31 2012
+++ packages/grub2/sort-version.patch	Wed Jan 11 23:58:26 2012
@@ -0,0 +1,29 @@
+grub-mkconfig does not get it right when sorting "recent kernel first":
+
+sort kernel versions correctly:
+
+Wrong:
+        echo    'Loading Linux 3.0.8-1 ...'
+        echo    'Loading Linux 3.0.4-2 ...'
+        echo    'Loading Linux 3.0.13-1 ...'
+        echo    'Loading Linux 3.0.12-2 ...'
+        echo    'Loading Linux 2.6.38.8-1 ...'
+
+Correct:
+        echo    'Loading Linux 3.0.13-1 ...'
+        echo    'Loading Linux 3.0.12-2 ...'
+        echo    'Loading Linux 3.0.8-1 ...'
+        echo    'Loading Linux 3.0.4-2 ...'
+        echo    'Loading Linux 2.6.38.8-1 ...'
+
+--- grub-1.99/util/grub-mkconfig_lib.in~	2012-01-12 00:47:28.626740879 +0200
++++ grub-1.99/util/grub-mkconfig_lib.in	2012-01-12 00:53:49.554292436 +0200
+@@ -165,7 +165,7 @@
+     a="$b"
+     b="$c"
+   fi
+-  if (echo "$a" ; echo "$b") | sort -n | head -n 1 | grep -qx "$b" ; then
++  if (echo "$a" ; echo "$b") | sort -V | head -n 1 | grep -qx "$b" ; then
+     return 0
+   else
+     return 1
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/grub2/grub2.spec?r1=1.115&r2=1.116&f=u



More information about the pld-cvs-commit mailing list