[arch-commits] Commit in lilo/trunk (ChangeLog PKGBUILD fix_lilo_dm.patch)

Eric Bélanger eric at archlinux.org
Fri Nov 6 22:56:18 EST 2009


    Date: Friday, November 6, 2009 @ 22:56:18
  Author: eric
Revision: 58333

upgpkg: lilo 22.8-4
    Fixed issue with device-mapper, PKGBUILD clean up, Added ChangeLog

Added:
  lilo/trunk/ChangeLog
  lilo/trunk/fix_lilo_dm.patch
Modified:
  lilo/trunk/PKGBUILD

-------------------+
 ChangeLog         |    6 ++++++
 PKGBUILD          |   39 +++++++++++++++++++--------------------
 fix_lilo_dm.patch |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+), 20 deletions(-)

Added: ChangeLog
===================================================================
--- ChangeLog	                        (rev 0)
+++ ChangeLog	2009-11-07 03:56:18 UTC (rev 58333)
@@ -0,0 +1,6 @@
+2009-11-06  Eric Belanger  <eric at archlinux.org>
+
+	* lilo 22.8-4
+	* Fixed issue with device-mapper
+	* PKGBUILD clean up
+	* Added ChangeLog

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-11-07 01:45:45 UTC (rev 58332)
+++ PKGBUILD	2009-11-07 03:56:18 UTC (rev 58333)
@@ -1,13 +1,12 @@
 # $Id$
-# Maintainer: Andreas Radke <andyrtr at archlinux.org>
+# Maintainer: Eric Belanger <eric at archlinux.org>
 # Contributor: judd <jvinet at zeroflux.org>
 
 pkgname=lilo
 pkgver=22.8
-pkgrel=3
+pkgrel=4
 pkgdesc="A bootloader for Linux"
-arch=(i686 x86_64)
-#url="http://lilo.go.dyndns.org" - seems down
+arch=('i686' 'x86_64')
 url="ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/!INDEX.html"
 license=('BSD')
 # While lilo should stay in the base category,
@@ -15,24 +14,24 @@
 # with pacman -S base, therefore, don't add
 # the base group here.
 #groups=('base')
-backup=(etc/lilo.conf)
-depends=(device-mapper coreutils)
-makedepends=(bin86)
+backup=('etc/lilo.conf')
+depends=('device-mapper' 'coreutils')
+makedepends=('bin86')
 install=lilo.install
-options=(!makeflags)
-source=(#http://home.san.rr.com/johninsd/pub/linux/lilo/lilo-$pkgver.src.tar.gz
-	ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/lilo-$pkgver.src.tar.gz
-	lilo.conf)
-md5sums=('72765f2aafd20e23ecf07ebd22baeec7'
-	 'a3a4c90bead3f9b8672bd384ff9f8db1')
+options=('!makeflags')
+source=(ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/lilo-${pkgver}.src.tar.gz \
+	lilo.conf fix_lilo_dm.patch)
+md5sums=('72765f2aafd20e23ecf07ebd22baeec7' 'a3a4c90bead3f9b8672bd384ff9f8db1'\
+         'd82cd0a08b89782261e534a81b82bb88')
+sha1sums=('59852eab59b93dcea63b39eef1db7963b7268b0d' '9ca31ef52ae0a29269c608f9470fb9341bb38f2e'\
+         '4d2ce83a1bf50fb18594713e4c15bce6e6149b6f')
 
 build() {
-  cd $srcdir/$pkgname-$pkgver
-  LANG=EN_US
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -p1 < ../fix_lilo_dm.patch || return 1
+  LANG=en_US
   make all || return 1
-  make ROOT=$pkgdir MAN_DIR=/usr/share/man install
-  mkdir -p $pkgdir/etc
-  cp $startdir/$pkgname.conf $pkgdir/etc/
-  # install license
-  install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/license.txt
+  make ROOT="${pkgdir}" MAN_DIR=/usr/share/man install || return 1
+  install -D -m644 "${srcdir}/lilo.conf" "${pkgdir}/etc/lilo.conf" || return 1
+  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1
 }

Added: fix_lilo_dm.patch
===================================================================
--- fix_lilo_dm.patch	                        (rev 0)
+++ fix_lilo_dm.patch	2009-11-07 03:56:18 UTC (rev 58333)
@@ -0,0 +1,48 @@
+diff -Nur lilo-22.8.orig/geometry.c lilo-22.8/geometry.c
+--- lilo-22.8.orig/geometry.c	2006-12-17 04:46:17.000000000 +0100
++++ lilo-22.8/geometry.c	2009-11-07 03:26:02.815256390 +0100
+@@ -901,42 +901,15 @@
+ 	    DEVICE dev;
+ 	    struct dm_task *dmt;
+ 	    void *next = NULL;
+-	    char dmdev[PATH_MAX+1];
+ 	    char buf[PATH_MAX+1];
+-	    char *slash;
+ 	    int result;
+ 
+ 	    dev_open(&dev, device, -1);
+-	    strncpy(dmdev, dev.name, PATH_MAX);
+-	    dmdev[PATH_MAX] = 0;
+-	    do {
+-		memset(buf, 0, PATH_MAX + 1);
+-		if ((result = readlink(dmdev, buf, PATH_MAX)) < 0 && errno != EINVAL)
+-		    die("device-mapper: readlink(\"%s\") failed with: %s",buf,
+-			strerror(errno));
+-		if (result >= 0) {
+-		    if (buf[0] != '/' && (slash = strrchr(dmdev, '/')) != NULL)
+-			slash++;
+-		    else
+-			slash = dmdev;
+-		    strncpy(slash, buf, PATH_MAX - (slash-dmdev));
+-		}
+-		if (realpath(dmdev, buf) == NULL)
+-		    die("device-mapper: realpath(\"%s\") failed with: %s",dmdev,
+-			strerror(errno));
+-		strncpy(dmdev, buf, PATH_MAX);
+-	    } while (result >= 0);
+-	    dmdev[PATH_MAX] = 0;
+ 
+ 	    if (!(dmt = dm_task_create(DM_DEVICE_TABLE)))
+ 		die("device-mapper: dm_task_create(DM_DEVICE_TABLE) failed");
+-	    slash = strrchr(dmdev, '/');
+-		if (slash)
+-	    slash++;
+-		else
+-	    slash = dmdev;
+-	    if (!dm_task_set_name(dmt, slash))
+-		die("device-mapper: dm_task_set_name(\"%s\") failed",dmdev);
++	    if (!dm_task_set_name(dmt, dev.name))
++		die("device-mapper: dm_task_set_name(\"%s\") failed",dev.name);
+ 	    if (!dm_task_run(dmt))
+ 		die("device-mapper: dm_task_run(DM_DEVICE_TABLE) failed");
+ 



More information about the arch-commits mailing list