I made an NMU with the upstream patch. Here's the debdiff:
diff -u redhat-cluster-2.20080229/debian/changelog redhat-cluster-2.20080229/debian/changelog
--- redhat-cluster-2.20080229/debian/changelog
+++ redhat-cluster-2.20080229/debian/changelog
@@ -1,3 +1,11 @@
+redhat-cluster (2.20080229-1.1) unstable; urgency=low
+
+ * Non-maintainer upload
+ * Added upstream patch for compatibility with Linux 2.6.25.
+ Closes: #479721.
+
+ -- Ben Hutchings <ben@decadent.org.uk> Mon, 19 May 2008 23:46:03 +0100
+
redhat-cluster (2.20080229-1) unstable; urgency=low
[ Christian Perrier ]
only in patch2:
unchanged:
--- redhat-cluster-2.20080229.orig/debian/patches/00list
+++ redhat-cluster-2.20080229/debian/patches/00list
@@ -0,0 +1 @@
+2.6.25
only in patch2:
unchanged:
--- redhat-cluster-2.20080229.orig/debian/patches/2.6.25.dpatch
+++ redhat-cluster-2.20080229/debian/patches/2.6.25.dpatch
@@ -0,0 +1,149 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream changes for compatibility with Linux 2.6.25
+## DP: (git commit e80c1ff7cfb63e247a4479c4a20f65d373d99b62):
+## DP: [KERNEL] Update modules to build with 2.6.25
+## DP: Update clean target to cope with a new file that Kbuild creates at build time.
+## DP: Bump minimum kernel requirements to 2.6.25.
+## DP: Port modules to new kobj api.
+## DP: Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
+
+@DPATCH@
+diff --git a/configure b/configure
+index 13ed3e6..2501059 100755
+--- a/configure
++++ b/configure
+@@ -28,7 +28,7 @@ my $ret = 0;
+
+ # this should be only the major version without the extra version
+ # eg. only the first 3 digits
+-my $required_kernelversion = '2.6.24';
++my $required_kernelversion = '2.6.25';
+
+ my %options = (
+ help => \$help,
+diff --git a/gfs-kernel/src/gfs/sys.c b/gfs-kernel/src/gfs/sys.c
+index de64a3f..8afbebd 100644
+--- a/gfs-kernel/src/gfs/sys.c
++++ b/gfs-kernel/src/gfs/sys.c
+@@ -85,24 +85,20 @@ static struct kobj_type gfs_ktype = {
+ .sysfs_ops = &gfs_attr_ops,
+ };
+
+-static struct kset gfs_kset = {
+- .ktype = &gfs_ktype,
+-};
++static struct kset *gfs_kset;
+
+ int gfs_sys_fs_add(struct gfs_sbd *sdp)
+ {
+ int error;
+
+- sdp->sd_kobj.kset = &gfs_kset;
+- sdp->sd_kobj.ktype = &gfs_ktype;
++ sdp->sd_kobj.kset = gfs_kset;
+
+- error = kobject_set_name(&sdp->sd_kobj, "%s", sdp->sd_table_name);
++ error = kobject_init_and_add(&sdp->sd_kobj, &gfs_ktype, NULL,
++ "%s", sdp->sd_table_name);
+ if (error)
+ goto fail;
+
+- error = kobject_register(&sdp->sd_kobj);
+- if (error)
+- goto fail;
++ kobject_uevent(&sdp->sd_kobj, KOBJ_ADD);
+
+ return 0;
+
+@@ -112,20 +108,21 @@ int gfs_sys_fs_add(struct gfs_sbd *sdp)
+
+ void gfs_sys_fs_del(struct gfs_sbd *sdp)
+ {
+- kobject_unregister(&sdp->sd_kobj);
++ kobject_put(&sdp->sd_kobj);
+ }
+
+ int gfs_sys_init(void)
+ {
+ gfs_sys_margs = NULL;
+ spin_lock_init(&gfs_sys_margs_lock);
+- kobject_set_name(&gfs_kset.kobj, "gfs");
+- kobj_set_kset_s(&gfs_kset, fs_subsys);
+- return kset_register(&gfs_kset);
++ gfs_kset = kset_create_and_add("gfs", NULL, fs_kobj);
++ if (!gfs_kset)
++ return -ENOMEM;
++ return 0;
+ }
+
+ void gfs_sys_uninit(void)
+ {
+ kfree(gfs_sys_margs);
+- kset_unregister(&gfs_kset);
++ kset_unregister(gfs_kset);
+ }
+diff --git a/gnbd-kernel/src/gnbd.c b/gnbd-kernel/src/gnbd.c
+index 1be2eee..9a6abe3 100644
+--- a/gnbd-kernel/src/gnbd.c
++++ b/gnbd-kernel/src/gnbd.c
+@@ -266,21 +266,19 @@ static const char *gnbdcmd_to_ascii(int cmd)
+
+ static void gnbd_end_request(struct request *req)
+ {
+- int uptodate = (req->errors == 0) ? 1 : 0;
++ int error = req->errors ? -EIO : 0;
+ struct request_queue *q = req->q;
+ unsigned long flags;
+
+ dprintk(DBG_BLKDEV, "%s: request %p: %s\n", req->rq_disk->disk_name,
+- req, uptodate? "done": "failed");
++ req, error ? "failed" : "done");
+
+- if (!uptodate)
++ if (error)
+ printk("%s %d called gnbd_end_request with an error\n",
+ current->comm, current->pid);
+
+ spin_lock_irqsave(q->queue_lock, flags);
+- if (!end_that_request_first(req, uptodate, req->nr_sectors)) {
+- end_that_request_last(req, uptodate);
+- }
++ __blk_end_request(req, error, req->nr_sectors << 9);
+ spin_unlock_irqrestore(q->queue_lock, flags);
+ }
+
+@@ -879,10 +877,8 @@ static int __init gnbd_init(void)
+ struct timeval tv;
+ int i;
+
+- if (sizeof(struct gnbd_request) != 28) {
+- printk(KERN_CRIT "gnbd: sizeof gnbd_request needs to be 28 in order to work!\n" );
+- return -EIO;
+- }
++ BUILD_BUG_ON(sizeof(struct gnbd_request) != 28);
++
+ shutdown_req.cmd_type = REQ_TYPE_SPECIAL;
+ gnbd_cmd(&shutdown_req) = GNBD_CMD_DISC;
+ shutdown_req.sector = 0;
+@@ -984,7 +980,7 @@ static int __init gnbd_init(void)
+ set_capacity(disk, 0);
+ add_disk(disk);
+ if(sysfs_create_link(&gnbd_dev[i].class_dev.kobj,
+- &gnbd_dev[i].disk->kobj, "block"))
++ &gnbd_dev[i].disk->dev.kobj, "block"))
+ goto out_remove_disk;
+
+ }
+diff --git a/make/clean.mk b/make/clean.mk
+index 68a0980..ac5f603 100644
+--- a/make/clean.mk
++++ b/make/clean.mk
+@@ -1,6 +1,6 @@
+ generalclean:
+ rm -rf *~* *.o *.a *.so *.so.* a.out *.po *.s *.d
+ rm -rf core core.* .depend cscope.* *.orig *.rej
+- rm -rf linux .*.o.cmd .*.ko.cmd *.mod.c .tmp_versions Module.symvers .*.o.d
++ rm -rf linux .*.o.cmd .*.ko.cmd *.mod.c .tmp_versions Module.symvers .*.o.d modules.order
+ rm -rf ${TARGET} ${TARGETS} ${TARGET}_test
+ rm -rf ${TARGET1} ${TARGET2} ${TARGET3} ${TARGET4} ${TARGET5} ${TARGET6}
--- END ---
--
Ben Hutchings
One of the nice things about standards is that there are so many of them.
Attachment:
signature.asc
Description: This is a digitally signed message part