From 7c479482ac11484c7323df9a3c565a782ff43d1b Mon Sep 17 00:00:00 2001 From: Christian Zoffoli Date: Sat, 3 Mar 2007 00:27:34 +0000 Subject: [PATCH] Fixed compilation with kernel > 2.6.18 (without devfs support). Closed bug#158577. Package-Manager: portage-2.1.2-r9 --- sys-cluster/gnbd-kernel/Manifest | 26 ++++++----- .../gnbd-kernel-remove-devfs-support.patch | 43 +++++++++++++++++++ .../gnbd-kernel/gnbd-kernel-1.02.00-r1.ebuild | 8 +++- .../gnbd-kernel/gnbd-kernel-1.03.00.ebuild | 13 +++++- 4 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 sys-cluster/gnbd-kernel/files/gnbd-kernel-remove-devfs-support.patch diff --git a/sys-cluster/gnbd-kernel/Manifest b/sys-cluster/gnbd-kernel/Manifest index 578251552e81..1b9faac3f693 100644 --- a/sys-cluster/gnbd-kernel/Manifest +++ b/sys-cluster/gnbd-kernel/Manifest @@ -1,17 +1,21 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX gnbd-kernel-remove-devfs-support.patch 1387 RMD160 6b9d2b4bab7a2d3c2fe423844724f06a1661febd SHA1 74e18a212e02331acccf270ca5cd1db4457b0e7c SHA256 0c20977ba60fcaa8b4f48fddc9fc46d2511148648545ef398992c14e872f47bf +MD5 a8a8ce68a0970fcc153d5d840b62f8bb files/gnbd-kernel-remove-devfs-support.patch 1387 +RMD160 6b9d2b4bab7a2d3c2fe423844724f06a1661febd files/gnbd-kernel-remove-devfs-support.patch 1387 +SHA256 0c20977ba60fcaa8b4f48fddc9fc46d2511148648545ef398992c14e872f47bf files/gnbd-kernel-remove-devfs-support.patch 1387 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 DIST gnbd-kernel-1.02.00-20060713-cvs.patch.gz 381 RMD160 f2a241926fc8645bdf209fce89a80a7a96dc188d SHA1 a78241831b98845940bc3267f833a2cad7d5cb29 SHA256 eee3531aef1de1e1f3657d34b568fe311afd350db933e59410f1c87f65a1c425 -EBUILD gnbd-kernel-1.02.00-r1.ebuild 1424 RMD160 5dd94f3c417fc7fb9bfecba3bb931c24835683e5 SHA1 214f633e8423ce629d312d55c00afd335454e10c SHA256 4b0245edacd1fa155e16aa62f5f2d8393915cb3a7c221ae99714eadbbf37d508 -MD5 886260ea07e8a7abb271bae8220edca5 gnbd-kernel-1.02.00-r1.ebuild 1424 -RMD160 5dd94f3c417fc7fb9bfecba3bb931c24835683e5 gnbd-kernel-1.02.00-r1.ebuild 1424 -SHA256 4b0245edacd1fa155e16aa62f5f2d8393915cb3a7c221ae99714eadbbf37d508 gnbd-kernel-1.02.00-r1.ebuild 1424 -EBUILD gnbd-kernel-1.03.00.ebuild 1156 RMD160 54b200a78e3ff801aead9e7756a99af1cfd83fd5 SHA1 cefec9f408a10c053aa63d821946a0a6218e68a1 SHA256 03e9d3d90f73c70fc223868fca5f064f53b0df20ff8fbcd0907d73ffa78e6034 -MD5 e2458b2e4b01056252cc7597fe4b2fdc gnbd-kernel-1.03.00.ebuild 1156 -RMD160 54b200a78e3ff801aead9e7756a99af1cfd83fd5 gnbd-kernel-1.03.00.ebuild 1156 -SHA256 03e9d3d90f73c70fc223868fca5f064f53b0df20ff8fbcd0907d73ffa78e6034 gnbd-kernel-1.03.00.ebuild 1156 +EBUILD gnbd-kernel-1.02.00-r1.ebuild 1557 RMD160 570ea5ee2df3e1ee691d84d5ca88f2581bd82697 SHA1 0e714218a05600dd4e5109dc58a12743fde91794 SHA256 1366e88879f8ca739687bb9e9f2a21229d3eeb653196bc61df64d43e60e55962 +MD5 63f247dcb0423aa9dfcb7595af6e02ba gnbd-kernel-1.02.00-r1.ebuild 1557 +RMD160 570ea5ee2df3e1ee691d84d5ca88f2581bd82697 gnbd-kernel-1.02.00-r1.ebuild 1557 +SHA256 1366e88879f8ca739687bb9e9f2a21229d3eeb653196bc61df64d43e60e55962 gnbd-kernel-1.02.00-r1.ebuild 1557 +EBUILD gnbd-kernel-1.03.00.ebuild 1335 RMD160 f4581591158034193b01e2b13d9d11a1207bdbfe SHA1 b72f174933ecbc4f95a33bc8c514a5f8253de775 SHA256 ad1a5ba46e5ddc153c4d767b1bb41a099500cf259deb80ec31ed37be999ac0b9 +MD5 52372d2cc7795e05f3c59a359407b58b gnbd-kernel-1.03.00.ebuild 1335 +RMD160 f4581591158034193b01e2b13d9d11a1207bdbfe gnbd-kernel-1.03.00.ebuild 1335 +SHA256 ad1a5ba46e5ddc153c4d767b1bb41a099500cf259deb80ec31ed37be999ac0b9 gnbd-kernel-1.03.00.ebuild 1335 MISC ChangeLog 3326 RMD160 7e8efba418b9c54db65191e809e4d398af3548d0 SHA1 7abc7ae602a723858390aef30527cb230df3e0a1 SHA256 0a1d0e0aa7917e840fc1b87d6fc6c7b9a69f71a84554617f4873abd223399d08 MD5 9648000019242898aa3033525914db3c ChangeLog 3326 RMD160 7e8efba418b9c54db65191e809e4d398af3548d0 ChangeLog 3326 @@ -29,7 +33,7 @@ SHA256 2cebe51521eb8f9a520e29bb0d8baa5820ef747d5e5e18218a5d1880e40167f8 files/di -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFF6LoBgMUyd/cdjWsRAp5cAJ90pXsYWBKe/R4wqorzqHSMjptP0QCfYjkt -IWr5obZ2nhUOGYTXiN5RCQE= -=SJ+y +iD8DBQFF6MEAgMUyd/cdjWsRAoRGAJwK0gay3mARiBsa3lakiIGB0qB4JwCeJRpA +zCiMEHTAPQLeZqyFePns4oE= +=kt5x -----END PGP SIGNATURE----- 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 + #include + #include +-#include + + #include + #include +@@ -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 -- 2.26.2