packages: grub2/grub2.spec, grub2/grub-1.98-follow-dev-mapper-symlinks.patc...

arekm arekm at pld-linux.org
Thu Sep 1 10:22:42 CEST 2011


Author: arekm                        Date: Thu Sep  1 08:22:42 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 1; follow device mapper symlinks

---- Files affected:
packages/grub2:
   grub2.spec (1.96 -> 1.97) , grub-1.98-follow-dev-mapper-symlinks.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/grub2/grub2.spec
diff -u packages/grub2/grub2.spec:1.96 packages/grub2/grub2.spec:1.97
--- packages/grub2/grub2.spec:1.96	Wed Jul 27 08:40:00 2011
+++ packages/grub2/grub2.spec	Thu Sep  1 10:22:37 2011
@@ -8,8 +8,6 @@
 #   --enable-grub-emu-usb conflicts with --enable-grub-emu-pci, emu-pci seems experimental
 #   - to build and install the `grub-emu' debugging utility we need to re-run build with --target=emu
 #   - put grub-emu to subpackage if it is fixed
-# - grub2-1.97.2-2.x86_64, grub2-1.98-0.5.x86_64 affected: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544577
-#   i.e "grub-probe /" would fail if rootfs is on lvm and /dev/mapper/foo-rootfs is symlink
 #
 # Conditional build:
 %bcond_with	static	# build static binaries
@@ -34,7 +32,7 @@
 Summary(pt_BR.UTF-8):	Gerenciador de inicialização GRUB2
 Name:		grub2
 Version:	1.98
-Release:	0.5
+Release:	1
 License:	GPL v2
 Group:		Base
 Source0:	http://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz
@@ -53,6 +51,7 @@
 Patch6:		pld-mkconfigdir.patch
 Patch7:		grub-mkconfig-diagnostics.patch
 Patch8:		ppc.patch
+Patch9:		grub-1.98-follow-dev-mapper-symlinks.patch
 BuildRequires:	autoconf >= 2.53
 BuildRequires:	automake >= 1:1.11.1-1
 BuildRequires:	bison
@@ -195,6 +194,7 @@
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 %if "%{cc_version}" < "3.4"
 grep -rl -- -Wno-missing-field-initializers . | xargs sed -i -e 's,-Wno-missing-field-initializers,,'
@@ -387,6 +387,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.97  2011/09/01 08:22:37  arekm
+- rel 1; follow device mapper symlinks
+
 Revision 1.96  2011/07/27 06:40:00  glen
 - yep 1.98 affected too
 

================================================================
Index: packages/grub2/grub-1.98-follow-dev-mapper-symlinks.patch
diff -u /dev/null packages/grub2/grub-1.98-follow-dev-mapper-symlinks.patch:1.1
--- /dev/null	Thu Sep  1 10:22:42 2011
+++ packages/grub2/grub-1.98-follow-dev-mapper-symlinks.patch	Thu Sep  1 10:22:37 2011
@@ -0,0 +1,25 @@
+--- a/util/getroot.c	2010-03-06 20:51:37.000000000 +0000
++++ b/util/getroot.c	2010-05-28 19:21:57.592307313 +0100
+@@ -222,9 +222,20 @@ find_root_device (const char *dir, dev_t
+ 	/* Ignore any error.  */
+ 	continue;
+ 
+-      if (S_ISLNK (st.st_mode))
+-	/* Don't follow symbolic links.  */
++      if (S_ISLNK (st.st_mode)) {
++#ifdef __linux__
++	if (strcmp (dir, "mapper") == 0) {
++	  /* Follow symbolic links under /dev/mapper/; the canonical name
++	     may be something like /dev/dm-0, but the names under
++	     /dev/mapper/ are more human-readable and so we prefer them if
++	     we can get them.  */
++	  if (stat (ent->d_name, &st) < 0)
++	    continue;
++	} else
++#endif /* __linux__ */
++	/* Don't follow other symbolic links.  */
+ 	continue;
++      }
+ 
+       if (S_ISDIR (st.st_mode))
+ 	{
================================================================

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



More information about the pld-cvs-commit mailing list