[arch-commits] Commit in grub2/trunk (PKGBUILD lvm-detection.patch)

Tobias Powalowski tpowa at archlinux.org
Mon Jul 12 14:45:31 EDT 2010


    Date: Monday, July 12, 2010 @ 14:45:31
  Author: tpowa
Revision: 85404

upgpkg: grub2 1.98-5
fix lvm detection

Added:
  grub2/trunk/lvm-detection.patch
Modified:
  grub2/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   48 ++++++++++++++++++++++++++++++------------------
 lvm-detection.patch |   25 +++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 18 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-07-12 18:43:47 UTC (rev 85403)
+++ PKGBUILD	2010-07-12 18:45:31 UTC (rev 85404)
@@ -4,7 +4,7 @@
 
 pkgname=grub2
 pkgver=1.98
-pkgrel=4
+pkgrel=5
 pkgdesc="The GNU GRand Unified Bootloader"
 url="http://www.gnu.org/software/grub/"
 arch=('i686' 'x86_64')
@@ -16,41 +16,43 @@
 conflicts=('grub')
 provides=('grub')
 source=(ftp://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.gz  
-	'archlinux-script-fixes.patch' 'gfxmenu-dependencies.patch'
-   	'menucolors-in-mkconfig.patch' 'background-image-in-mkconfig.patch'
-	'hidden-timeout-fix.patch' 'grub.default' 'grub.cfg' '20_memtest86+')
-md5sums=('c0bcf60e524739bb64e3a2d4e3732a59'         '0910da120700a6928cd0290211acc79f'
-         '897f8af2fc83fcdaf7329da39f06d3dc'         '00ae9ff8991b8f00ab90739859af2921'
-         'fa14d3feabe17ac11dd3163501a66155'         '81bcdf26aa01b08b9925d72cbc4c3dab'
-         'ff99d316b0c59e514e5bb641a392d330'         '743215998a581a54ac77630f0db222ce'
-         '5a07e04c4ecb8ed145d54fec3043e0d5')
+	'archlinux-script-fixes.patch' 
+        'gfxmenu-dependencies.patch'
+   	'menucolors-in-mkconfig.patch' 
+        'background-image-in-mkconfig.patch'
+	'hidden-timeout-fix.patch' 
+        'grub.default' 
+        'grub.cfg' 
+        '20_memtest86+'
+        'lvm-detection.patch')
 
 build() {
   cd $srcdir/grub-${pkgver}
 
   # some random patches to facilitate automatic creation of grub.cfg
-  patch -Np1 -i ${srcdir}/archlinux-script-fixes.patch || return 1
-  patch -Np1 -i ${srcdir}/gfxmenu-dependencies.patch || return 1
-  patch -Np1 -i ${srcdir}/menucolors-in-mkconfig.patch || return 1
-  patch -Np1 -i ${srcdir}/background-image-in-mkconfig.patch || return 1
-  patch -Np1 -i ${srcdir}/hidden-timeout-fix.patch || return 1
-
+  patch -Np1 -i ${srcdir}/archlinux-script-fixes.patch
+  patch -Np1 -i ${srcdir}/gfxmenu-dependencies.patch
+  patch -Np1 -i ${srcdir}/menucolors-in-mkconfig.patch
+  patch -Np1 -i ${srcdir}/background-image-in-mkconfig.patch
+  patch -Np1 -i ${srcdir}/hidden-timeout-fix.patch
+  # fix lvm symlink detection
+  patch -Np0 -i ${srcdir}/lvm-detection.patch
   # run autogen.sh to create configure files
   ./autogen.sh
 
   # fix unifont.bdf location
-  sed -i 's|/usr/src/unifont.bdf|/usr/share/fonts/misc/unifont.bdf|' configure || return 1
+  sed -i 's|/usr/src/unifont.bdf|/usr/share/fonts/misc/unifont.bdf|' configure
 
   CFLAGS= ./configure --prefix=/usr --enable-grub-mkfont --bindir=/bin \
 		--sbindir=/sbin --mandir=/usr/share/man \
 		--infodir=/usr/share/info --sysconfdir=/etc
 
-  CFLAGS= make || return 1
+  CFLAGS= make
 }
 
 package() {
   cd $srcdir/grub-${pkgver}
-  make DESTDIR=${pkgdir} install || return 1
+  make DESTDIR=${pkgdir} install
 
   # install /etc/default/grub
   install -Dm644 ${srcdir}/grub.default ${pkgdir}/etc/default/grub
@@ -61,3 +63,13 @@
   # install memtest config detection
   install -Dm755 ${srcdir}/20_memtest86+ ${pkgdir}/etc/grub.d/20_memtest86+
 }
+md5sums=('c0bcf60e524739bb64e3a2d4e3732a59'
+         '0910da120700a6928cd0290211acc79f'
+         '897f8af2fc83fcdaf7329da39f06d3dc'
+         '00ae9ff8991b8f00ab90739859af2921'
+         'fa14d3feabe17ac11dd3163501a66155'
+         '81bcdf26aa01b08b9925d72cbc4c3dab'
+         'ff99d316b0c59e514e5bb641a392d330'
+         '743215998a581a54ac77630f0db222ce'
+         '5a07e04c4ecb8ed145d54fec3043e0d5'
+         '60b0157ed87041541ad0f62e3c7c0577')

Added: lvm-detection.patch
===================================================================
--- lvm-detection.patch	                        (rev 0)
+++ lvm-detection.patch	2010-07-12 18:45:31 UTC (rev 85404)
@@ -0,0 +1,25 @@
+--- util/getroot.c~	2010-07-12 20:34:58.498317508 +0200
++++ util/getroot.c	2010-07-12 20:34:58.556288678 +0200
+@@ -222,9 +222,20 @@
+ 	/* 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))
+ 	{



More information about the arch-commits mailing list