# ChangeLog for net-fs/openafs-kernel
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs-kernel/ChangeLog,v 1.35 2006/11/09 15:15:34 stefaan Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs-kernel/ChangeLog,v 1.36 2006/11/11 08:13:58 stefaan Exp $
+
+*openafs-kernel-1.4.2-r1 (11 Nov 2006)
+
+ 11 Nov 2006; Stefaan De Roeck <stefaan@gentoo.org>
+ +files/tasklist_lock.patch, -openafs-kernel-1.4.2_rc4.ebuild,
+ +openafs-kernel-1.4.2-r1.ebuild:
+ Fix unresolved symbol problem on amd64 (bug #149274), remove obsolete ebuild
09 Nov 2006; Stefaan De Roeck <stefaan@gentoo.org>
openafs-kernel-1.4.1.ebuild:
--- /dev/null
+MD5 1fbf87303775036696ee0ce176d7160b openafs-1.4.2-src.tar.bz2 12437458
+RMD160 821a7064008d26050cdb1715bf04a19aac598578 openafs-1.4.2-src.tar.bz2 12437458
+SHA256 6a83b393a680c2dbbb186c1adc1acdcfb95f8e2db892ba6e66fe524c6d9b9814 openafs-1.4.2-src.tar.bz2 12437458
+MD5 6f298d8eb669b91b43b50ff8bd8dc5ef openafs-gentoo-0.9.tar.bz2 17015
+RMD160 07b90f9093677c6e043412c42dfa8096628fe6de openafs-gentoo-0.9.tar.bz2 17015
+SHA256 3f08b6f76b860efe522affccdfc393ea12b2255a3fe476d8d3f12b5f88233f26 openafs-gentoo-0.9.tar.bz2 17015
--- /dev/null
+Date: Fri, 27 Oct 2006 18:46:38 -0400
+From: Jeffrey Hutzelman
+To: "Peter N. Schweitzer"
+cc: Stefaan, openafs-info@openafs.org,
+ Jeffrey Hutzelman
+Subject: Re: [OpenAFS] tasklist_lock undefined Linux 2.6.18, OpenAFS 1.4.2
+
+
+On Friday, October 27, 2006 03:53:23 PM -0400 "Peter N. Schweitzer" wrote:
+
+># nm afs_osi.o | grep tasklist_lock
+> U tasklist_lock
+
+OK; this is the one we're looking for. That, combined with Stefaan's
+comment about not having the problem if keyring support is enabled, makes
+me think the compiler is doing something bogus here, like not correctly
+handling the 'weak' attribute on an extern symbol not declared in global
+scope.
+
+Try the following patch:
+
+
+--- src/afs/afs_osi.c.orig 2006-10-27 18:45:35.000000000 -0400
++++ src/afs/afs_osi.c 2006-10-27 18:45:43.000000000 -0400
+@@ -805,11 +805,11 @@
+ #endif
+
+ #if defined(AFS_LINUX22_ENV)
++extern rwlock_t tasklist_lock __attribute__((weak));
+ void
+ afs_osi_TraverseProcTable()
+ {
+ #if !defined(LINUX_KEYRING_SUPPORT)
+- extern rwlock_t tasklist_lock __attribute__((weak));
+ struct task_struct *p;
+
+ if (&tasklist_lock)
+
+
+
+> I'm still thinking there's some kernel feature that I should have enabled
+> but didn't know I needed.
+
+No; the symbol really isn't exported in recent kernels; this is not about
+kernel configuration.
+
+
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs-kernel/openafs-kernel-1.4.2-r1.ebuild,v 1.1 2006/11/11 08:13:58 stefaan Exp $
+
+inherit eutils linux-mod versionator toolchain-funcs
+
+PATCHVER=0.9
+MY_PN=${PN/-kernel}
+MY_P=${MY_PN}-${PV}
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="http://www.openafs.org/"
+SRC_URI="http://openafs.org/dl/${MY_PN}/${PV}/${MY_P}-src.tar.bz2
+ mirror://gentoo/${MY_PN}-gentoo-${PATCHVER}.tar.bz2"
+
+LICENSE="IPL-1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+PATCHDIR=${WORKDIR}/gentoo/patches/$(get_version_component_range 1-2)
+
+CONFIG_CHECK="!DEBUG_RODATA"
+DEBUG_RODATA_ERROR="OpenAFS is incompatible with linux' CONFIG_DEBUG_RODATA option"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}; cd ${S}
+
+ EPATCH_SUFFIX="patch" epatch ${PATCHDIR}
+
+ # fix unresolved symbol on amd64 (bug #149274)
+ epatch ${FILESDIR}/tasklist_lock.patch
+
+ ./regen.sh || die "Failed: regenerating configure script"
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" econf --with-linux-kernel-headers=${KV_DIR} || die "Failed: econf"
+
+ ARCH="$(tc-arch-kernel)" emake -j1 only_libafs || die "Failed: emake"
+}
+
+src_install() {
+ MOD_SRCDIR=$(expr ${S}/src/libafs/MODLOAD-*)
+ [ -f ${MOD_SRCDIR}/openafs.${KV_OBJ} ] \
+ || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES='openafs(fs/openafs:$MOD_SRCDIR)'
+
+ linux-mod_src_install
+}
+