summaryrefslogtreecommitdiff
path: root/source/a/lilo
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/lilo')
-rwxr-xr-xsource/a/lilo/lilo.SlackBuild18
-rw-r--r--source/a/lilo/lilo.use_major_minor_instead_lvm_name.diff47
-rw-r--r--source/a/lilo/slack.bmpbin15754 -> 14174 bytes
3 files changed, 62 insertions, 3 deletions
diff --git a/source/a/lilo/lilo.SlackBuild b/source/a/lilo/lilo.SlackBuild
index 197f3384..e33c8778 100755
--- a/source/a/lilo/lilo.SlackBuild
+++ b/source/a/lilo/lilo.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +22,17 @@
VERSION=${VERSION:-22.8}
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-14}
+BUILD=${BUILD:-15}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -38,6 +47,9 @@ tar xvf $CWD/lilo-$VERSION.src.tar.gz || exit 1
cd lilo-$VERSION
chown -R root:root .
+# This is needed for LVM+udev+devtmpfs
+zcat $CWD/lilo.use_major_minor_instead_lvm_name.diff.gz | patch -p1 --verbose || exit 1
+
make || exit 1
make install ROOT=$PKG
diff --git a/source/a/lilo/lilo.use_major_minor_instead_lvm_name.diff b/source/a/lilo/lilo.use_major_minor_instead_lvm_name.diff
new file mode 100644
index 00000000..860347eb
--- /dev/null
+++ b/source/a/lilo/lilo.use_major_minor_instead_lvm_name.diff
@@ -0,0 +1,47 @@
+--- lilo-22.8/geometry.c 2006-12-17 01:46:17.000000000 -0200
++++ lilo-22.8-new/geometry.c 2009-12-18 02:09:54.000000000 -0200
+@@ -903,24 +903,17 @@
+ 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));
+@@ -930,13 +923,11 @@
+
+ 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);
++ // Using device name is flawed. Better to use device major and minor
++ if (!dm_task_set_major(dmt, MAJOR(device)))
++ die("device-mapper: dm_task_set_major(DM_DEVICE_TABLE) failed");
++ if (!dm_task_set_minor(dmt, MINOR(device)))
++ die("device-mapper: dm_task_set_minor(DM_DEVICE_TABLE) failed");
+ if (!dm_task_run(dmt))
+ die("device-mapper: dm_task_run(DM_DEVICE_TABLE) failed");
+
diff --git a/source/a/lilo/slack.bmp b/source/a/lilo/slack.bmp
index 3dd5652a..22929916 100644
--- a/source/a/lilo/slack.bmp
+++ b/source/a/lilo/slack.bmp
Binary files differ