summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2007-03-03 00:27:34 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2007-03-03 00:27:34 +0000
commit2a5494b73494d56cea09dfdb5cba2886c1872981 (patch)
tree44cbbfcd5976f0cc9fa1cb876d4c31bb3dcad2a4 /sys-cluster
parentFixed module install path bug #158572. (diff)
downloadgentoo-2-2a5494b73494d56cea09dfdb5cba2886c1872981.tar.gz
gentoo-2-2a5494b73494d56cea09dfdb5cba2886c1872981.tar.bz2
gentoo-2-2a5494b73494d56cea09dfdb5cba2886c1872981.zip
Fixed compilation with kernel > 2.6.18 (without devfs support). Closed bug#158577.
(Portage version: 2.1.2-r9)
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/gnbd-kernel/files/gnbd-kernel-remove-devfs-support.patch43
-rw-r--r--sys-cluster/gnbd-kernel/gnbd-kernel-1.02.00-r1.ebuild8
-rw-r--r--sys-cluster/gnbd-kernel/gnbd-kernel-1.03.00.ebuild13
3 files changed, 62 insertions, 2 deletions
diff --git a/sys-cluster/gnbd-kernel/files/gnbd-kernel-remove-devfs-support.patch b/sys-cluster/gnbd-kernel/files/gnbd-kernel-remove-devfs-support.patch
new file mode 100644
index 000000000000..be105ea7a495
--- /dev/null
+++ b/sys-cluster/gnbd-kernel/files/gnbd-kernel-remove-devfs-support.patch
@@ -0,0 +1,43 @@
+diff -uNr cluster-1.03.00.orig/gnbd-kernel/src/gnbd.c cluster-1.03.00/gnbd-kernel/src/gnbd.c
+--- cluster-1.03.00.orig/gnbd-kernel/src/gnbd.c 2006-07-12 19:34:29.000000000 +0200
++++ cluster-1.03.00/gnbd-kernel/src/gnbd.c 2007-03-03 01:18:40.000000000 +0100
+@@ -30,7 +30,6 @@
+ #include <linux/buffer_head.h>
+ #include <linux/miscdevice.h>
+ #include <linux/moduleparam.h>
+-#include <linux/devfs_fs_kernel.h>
+
+ #include <asm/uaccess.h>
+ #include <asm/types.h>
+@@ -845,7 +844,6 @@
+ {
+ .minor = MISC_DYNAMIC_MINOR,
+ .name = "gnbd_ctl",
+- .devfs_name = "gnbd_ctl",
+ .fops = &_gnbd_ctl_fops
+ };
+
+@@ -926,7 +924,6 @@
+ printk(KERN_INFO "gnbd: registered device at major %d\n", major_nr);
+ dprintk(DBG_INIT, "gnbd: debugflags=0x%x\n", debugflags);
+
+- devfs_mk_dir("gnbd_minor");
+ err = class_register(&gnbd_class);
+ if (err)
+ goto out_unregister;
+@@ -982,7 +979,6 @@
+ disk->fops = &gnbd_fops;
+ disk->private_data = &gnbd_dev[i];
+ sprintf(disk->disk_name, "gnbd%d", i);
+- sprintf(disk->devfs_name, "gnbd_minor/%d", i);
+ set_capacity(disk, 0);
+ add_disk(disk);
+ if(sysfs_create_link(&gnbd_dev[i].class_dev.kobj,
+@@ -1036,7 +1032,6 @@
+ kfree(gnbd_dev[i].server_name);
+ }
+ class_unregister(&gnbd_class);
+- devfs_remove("gnbd");
+ unregister_blkdev(major_nr, "gnbd");
+ printk(KERN_INFO "gnbd: unregistered device at major %d\n", major_nr);
+ }
diff --git a/sys-cluster/gnbd-kernel/gnbd-kernel-1.02.00-r1.ebuild b/sys-cluster/gnbd-kernel/gnbd-kernel-1.02.00-r1.ebuild
index 6a4b3fd62f43..c02be8865295 100644
--- a/sys-cluster/gnbd-kernel/gnbd-kernel-1.02.00-r1.ebuild
+++ b/sys-cluster/gnbd-kernel/gnbd-kernel-1.02.00-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd-kernel/gnbd-kernel-1.02.00-r1.ebuild,v 1.8 2007/03/02 23:57:43 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd-kernel/gnbd-kernel-1.02.00-r1.ebuild,v 1.9 2007/03/03 00:27:34 xmerlin Exp $
inherit eutils linux-mod linux-info
@@ -34,6 +34,12 @@ src_unpack() {
unpack ${A}
cd ${S}
epatch ${WORKDIR}/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die
+
+ if kernel_is 2 6; then
+ if [ "$KV_PATCH" -ge "18" ] ; then
+ epatch ${FILESDIR}/${PN}-remove-devfs-support.patch || die
+ fi
+ fi
}
src_compile() {
diff --git a/sys-cluster/gnbd-kernel/gnbd-kernel-1.03.00.ebuild b/sys-cluster/gnbd-kernel/gnbd-kernel-1.03.00.ebuild
index 47e75cd88b69..6908d2baba1d 100644
--- a/sys-cluster/gnbd-kernel/gnbd-kernel-1.03.00.ebuild
+++ b/sys-cluster/gnbd-kernel/gnbd-kernel-1.03.00.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd-kernel/gnbd-kernel-1.03.00.ebuild,v 1.7 2007/03/02 23:57:43 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd-kernel/gnbd-kernel-1.03.00.ebuild,v 1.8 2007/03/03 00:27:34 xmerlin Exp $
inherit linux-mod linux-info
@@ -27,6 +27,17 @@ pkg_setup() {
esac
}
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ if kernel_is 2 6; then
+ if [ "$KV_PATCH" -ge "18" ] ; then
+ epatch ${FILESDIR}/${PN}-remove-devfs-support.patch || die
+ fi
+ fi
+}
+
src_compile() {
set_arch_to_kernel