diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-21 01:52:13 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-21 01:52:13 +0000 |
commit | 4698dee13cef75597fd3406be7586e2e683fe065 (patch) | |
tree | 8887fb03105cda45207ce04a86e6071411aeae63 /sys-cluster/gnbd-kernel | |
parent | Added a missing patch. (diff) | |
download | historical-4698dee13cef75597fd3406be7586e2e683fe065.tar.gz historical-4698dee13cef75597fd3406be7586e2e683fe065.tar.bz2 historical-4698dee13cef75597fd3406be7586e2e683fe065.zip |
Patched gnbd to compile also with kernel >= 2.6.20.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-cluster/gnbd-kernel')
-rw-r--r-- | sys-cluster/gnbd-kernel/ChangeLog | 7 | ||||
-rw-r--r-- | sys-cluster/gnbd-kernel/Manifest | 11 | ||||
-rw-r--r-- | sys-cluster/gnbd-kernel/files/gnbd-kernel-2.02.00-compile-fix-kernel-pre-2.6.24.diff | 118 | ||||
-rw-r--r-- | sys-cluster/gnbd-kernel/gnbd-kernel-2.02.00.ebuild | 12 |
4 files changed, 138 insertions, 10 deletions
diff --git a/sys-cluster/gnbd-kernel/ChangeLog b/sys-cluster/gnbd-kernel/ChangeLog index e51baf23f3f5..35c547e040e3 100644 --- a/sys-cluster/gnbd-kernel/ChangeLog +++ b/sys-cluster/gnbd-kernel/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-cluster/gnbd-kernel # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd-kernel/ChangeLog,v 1.24 2008/03/17 17:05:35 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd-kernel/ChangeLog,v 1.25 2008/03/21 01:52:13 xmerlin Exp $ + + 21 Mar 2008; Christian Zoffoli <xmerlin@gentoo.org> + +files/gnbd-kernel-2.02.00-compile-fix-kernel-pre-2.6.24.diff, + gnbd-kernel-2.02.00.ebuild: + Patched gnbd to compile also with kernel >= 2.6.20. *gnbd-kernel-2.02.00 (17 Mar 2008) diff --git a/sys-cluster/gnbd-kernel/Manifest b/sys-cluster/gnbd-kernel/Manifest index 612f66b1fbdf..674f3bccf613 100644 --- a/sys-cluster/gnbd-kernel/Manifest +++ b/sys-cluster/gnbd-kernel/Manifest @@ -3,6 +3,7 @@ Hash: SHA1 AUX gnbd-kernel-1.03.00-compile-fix-kernel-post-2.6.18.patch 1154 RMD160 c6024a6cb9d73db789e9d4fbfcbe183e9964e1bf SHA1 1fded2ce8e7ba4699f8cca6fa41f55d43992790e SHA256 147eab028cb542698ec0cf4d234e54ba38b3dc5d9e2988091a13c0d2cbf18ec3 AUX gnbd-kernel-1.04.00-compile-fix-kernel-pre-2.6.19.patch 1164 RMD160 ec4b0aff8a265b2ad4fa18f97085d920f22379d5 SHA1 da307a5bcf7ad30ac97c534d8872068ad934d6dd SHA256 b54878e639458ac49b69aba47a73cfc3c56c93d4c8e13c4da144b38c5e26fb88 +AUX gnbd-kernel-2.02.00-compile-fix-kernel-pre-2.6.24.diff 3469 RMD160 d2751dc804141a90107711c02bc998040e97a250 SHA1 6e8d46686d4483bd9441d8de9cba68a194b507a7 SHA256 6bc953243324c3ed6c6183640fafd79a76598567c79ed4ad8cca425eda8ef78c AUX gnbd-kernel-remove-devfs-support.patch 1387 RMD160 6b9d2b4bab7a2d3c2fe423844724f06a1661febd SHA1 74e18a212e02331acccf270ca5cd1db4457b0e7c SHA256 0c20977ba60fcaa8b4f48fddc9fc46d2511148648545ef398992c14e872f47bf DIST cluster-1.02.00.tar.gz 1356451 RMD160 e9c0cdd1f5a7542c8a4ea38ccf6d057767269dc5 SHA1 d74cadb1ef21d1cfda333b20d7ef20272e0002d6 SHA256 de45885146f1481808f7a34af5e6b7e2042895a4e3844eaa6161f942345c7849 DIST cluster-1.03.00.tar.gz 1658274 RMD160 6fc16e2edba73dd1a83ecfad749b1553eca6d938 SHA1 c205d8ec034433c33f26724f7f69b0028d2a63d4 SHA256 e61c2438c7ee8d546aec9dd86ee1851c9a71f127c25ad1fb0c59eb4ed534e97b @@ -12,13 +13,13 @@ DIST gnbd-kernel-1.02.00-20060713-cvs.patch.gz 381 RMD160 f2a241926fc8645bdf209f EBUILD gnbd-kernel-1.02.00-r1.ebuild 1783 RMD160 a9ff782d514646a68ceac7624dcbdb0b238cc277 SHA1 465f768ed51dd2000948fa56a66e7e0d9e09166b SHA256 2c92ef1cdeab77ef6680d2a331868ac3da05a98aa618fe7edc83c9c230e9d018 EBUILD gnbd-kernel-1.03.00.ebuild 1543 RMD160 b50ad48b2707917b07183c53dea74d893ee536a1 SHA1 06f5852e578129eec5cc077d60bd534ba482a5a7 SHA256 7c06a8885da58b8fabdbdae717bc91d1eef7f4c65159175fa295e5c15cee167d EBUILD gnbd-kernel-1.04.00.ebuild 1477 RMD160 1c08ce6f984bbb3d8e8d84c7a08f0ceeca3960af SHA1 c7feab0246b2a93c00e3b81df6f32961b7c9adc4 SHA256 1a1b9937320046b10841ffa4520a105def584be6aaa39f13e35f12fda140e1ce -EBUILD gnbd-kernel-2.02.00.ebuild 1660 RMD160 6266623f0e17c4f756581faa9f31bec9f7d1c189 SHA1 05fa358164b093be1ef21cc99de46d03f02359e4 SHA256 e14feebccaf0c91a257ae95327287c6365c76d0948f4b45a5844938ed9403c00 -MISC ChangeLog 4150 RMD160 ed91c7db9a7128c90fa6eb0e4b9e30d8476b4580 SHA1 801d5e360e0e2d0d98469f2248a57265e39733a9 SHA256 46d0edbb01b8976b5e78bac39e498b68926ab17ee11ac01a4dbf84387e041a0b +EBUILD gnbd-kernel-2.02.00.ebuild 1754 RMD160 136147b66189e76250ca312fca080a0dfe310d5c SHA1 32c46972acb7072e8f815e20e1632ddf6e3a93ea SHA256 0af3182e8ac00b21bf4d9e254ee975f0b556fb84870fd6743bc8004585aeda43 +MISC ChangeLog 4354 RMD160 58f6d42c1ab6cf750c48e7a7971da568803ee4f2 SHA1 40b9c713a331c3bb87f76d745b6c108a80ac205c SHA256 50c4bbfec785b6aa5f396d9eb26885423bab2385051e580e03da9a011d90276c MISC metadata.xml 229 RMD160 4dcf17b88c5f4db2e817f473f3e8269b0bff2e6e SHA1 e6315be43241c55bdc0d12a42fa05632c5ff9b79 SHA256 49e13d2d49bef7298e3bb665ebeceeff9b0880fae5ff639cb8405993504f244f -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) -iD8DBQFH3qTogMUyd/cdjWsRAteUAJ9dCuyTstDCwghUxo6ZJCQMvAfWLgCeN5xQ -JNeSR8OnHJgS5shnn1prov8= -=d1zx +iD8DBQFH4xTWgMUyd/cdjWsRAnwSAKCDnMVpVraSorZJTFr7P0gx7s0cOQCfURy3 +LocWYpmvDVWjRo+Y9xf1HGE= +=EixW -----END PGP SIGNATURE----- diff --git a/sys-cluster/gnbd-kernel/files/gnbd-kernel-2.02.00-compile-fix-kernel-pre-2.6.24.diff b/sys-cluster/gnbd-kernel/files/gnbd-kernel-2.02.00-compile-fix-kernel-pre-2.6.24.diff new file mode 100644 index 000000000000..8cd1fc77c227 --- /dev/null +++ b/sys-cluster/gnbd-kernel/files/gnbd-kernel-2.02.00-compile-fix-kernel-pre-2.6.24.diff @@ -0,0 +1,118 @@ +diff -uNr cluster-2.02.00.orig/gnbd-kernel/src/gnbd.c cluster-2.02.00/gnbd-kernel/src/gnbd.c +--- cluster-2.02.00.orig/gnbd-kernel/src/gnbd.c 2008-02-26 16:37:43.000000000 +0100 ++++ cluster-2.02.00/gnbd-kernel/src/gnbd.c 2008-03-21 02:40:52.000000000 +0100 +@@ -168,7 +168,7 @@ + + if (down_trylock(&dev->do_it_lock)) + return -EBUSY; +- res = sscanf(buf, "%Lu\n", (unsigned long long int *)&size); ++ res = sscanf(buf, "%Lu\n", &size); + if (res != 1){ + up(&dev->do_it_lock); + return -EINVAL; +@@ -267,7 +267,7 @@ + static void gnbd_end_request(struct request *req) + { + int uptodate = (req->errors == 0) ? 1 : 0; +- struct request_queue *q = req->q; ++ request_queue_t *q = req->q; + unsigned long flags; + + dprintk(DBG_BLKDEV, "%s: request %p: %s\n", req->rq_disk->disk_name, +@@ -369,7 +369,7 @@ + int __gnbd_send_req(struct gnbd_device *dev, struct socket *sock, + struct request *req, int can_signal) + { +- int result, flags; ++ int result, i, flags; + struct gnbd_request request; + unsigned long size = req->nr_sectors << 9; + +@@ -403,26 +403,28 @@ + } + + if (gnbd_cmd(req) == GNBD_CMD_WRITE) { +- struct req_iterator iter; +- struct bio_vec *bvec; ++ struct bio *bio; + /* + * we are really probing at internals to determine + * whether to set MSG_MORE or not... + */ +- rq_for_each_segment(bvec, req, iter) { +- flags = 0; +- if (!rq_iter_last(req, iter)) +- flags = MSG_MORE; +- dprintk(DBG_TX, "%s: request %p: sending %d bytes data\n", +- dev->disk->disk_name, req, +- bvec->bv_len); +- result = sock_send_bvec(sock, bvec, flags, +- can_signal); +- if (result < 0) { +- printk(KERN_ERR "%s: Send data failed (result %d)\n", +- dev->disk->disk_name, +- result); +- goto error_out; ++ rq_for_each_bio(bio, req) { ++ struct bio_vec *bvec; ++ bio_for_each_segment(bvec, bio, i) { ++ flags = 0; ++ if ((i < (bio->bi_vcnt - 1)) || bio->bi_next) ++ flags = MSG_MORE; ++ dprintk(DBG_TX, "%s: request %p: sending %d bytes data\n", ++ dev->disk->disk_name, req, ++ bvec->bv_len); ++ result = sock_send_bvec(sock, bvec, flags, ++ can_signal); ++ if (result < 0) { ++ printk(KERN_ERR "%s: Send data failed (result %d)\n", ++ dev->disk->disk_name, ++ result); ++ goto error_out; ++ } + } + } + } +@@ -462,19 +464,21 @@ + int gnbd_recv_req(struct gnbd_device *dev, struct request *req) + { + int result; +- struct bio_vec *bvec; +- struct req_iterator iter; +- +- rq_for_each_segment(bvec, req, iter) { +- result = sock_recv_bvec(dev->sock, bvec); +- if (result < 0) { +- printk(KERN_ERR "%s: Receive data failed (result %d)\n", +- dev->disk->disk_name, +- result); +- return result; ++ int i; ++ struct bio *bio; ++ rq_for_each_bio(bio, req) { ++ struct bio_vec *bvec; ++ bio_for_each_segment(bvec, bio, i) { ++ result = sock_recv_bvec(dev->sock, bvec); ++ if (result < 0) { ++ printk(KERN_ERR "%s: Receive data failed (result %d)\n", ++ dev->disk->disk_name, ++ result); ++ return result; ++ } ++ dprintk(DBG_RX, "%s: request %p: got %d bytes data\n", ++ dev->disk->disk_name, req, bvec->bv_len); + } +- dprintk(DBG_RX, "%s: request %p: got %d bytes data\n", +- dev->disk->disk_name, req, bvec->bv_len); + } + return 0; + } +@@ -561,7 +565,7 @@ + * { printk( "Warning: Ignoring result!\n"); gnbd_end_request( req ); } + */ + +-static void do_gnbd_request(struct request_queue *q) ++static void do_gnbd_request(request_queue_t * q) + { + int err; + struct request *req; diff --git a/sys-cluster/gnbd-kernel/gnbd-kernel-2.02.00.ebuild b/sys-cluster/gnbd-kernel/gnbd-kernel-2.02.00.ebuild index 9b964b9ffc39..a6ace8d7129b 100644 --- a/sys-cluster/gnbd-kernel/gnbd-kernel-2.02.00.ebuild +++ b/sys-cluster/gnbd-kernel/gnbd-kernel-2.02.00.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd-kernel/gnbd-kernel-2.02.00.ebuild,v 1.1 2008/03/17 17:05:35 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd-kernel/gnbd-kernel-2.02.00.ebuild,v 1.2 2008/03/21 01:52:13 xmerlin Exp $ inherit eutils linux-mod linux-info versionator @@ -19,7 +19,7 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" -DEPEND="=virtual/linux-sources-2.6.23*" +DEPEND=">=virtual/linux-sources-2.6.20" RDEPEND="${DEPEND}" S="${WORKDIR}/${MY_P}/${PN}" @@ -35,7 +35,11 @@ src_unpack() { unpack ${A} cd "${S}" -# epatch "${FILESDIR}"/${P}-to-cvs-20080217.patch || die + if kernel_is 2 6; then + if [ "$KV_PATCH" -lt "24" ] ; then + epatch "${FILESDIR}"/${P}-compile-fix-kernel-pre-2.6.24.diff || die + fi + fi } src_compile() { @@ -52,7 +56,7 @@ src_compile() { ) || die "configure problem" (cd "${S}"/src; - emake \ + emake clean all \ ) || die "compile problem" } |