summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHTEKK <CHTEKK@localhost>2008-07-12 16:03:54 +0000
committerCHTEKK <CHTEKK@localhost>2008-07-12 16:03:54 +0000
commitc591a2129fe6b5d97b2a2c01cccad435cf51d057 (patch)
tree3bd984ea915535e6517c77c0efa896e1e382b1c9
parentFix. (diff)
downloadchtekk-c591a2129fe6b5d97b2a2c01cccad435cf51d057.tar.gz
chtekk-c591a2129fe6b5d97b2a2c01cccad435cf51d057.tar.bz2
chtekk-c591a2129fe6b5d97b2a2c01cccad435cf51d057.zip
Add current coda stuff to prepare for an update.
svn path=/; revision=79
-rw-r--r--coda/net-fs/coda/coda-6.0.15.ebuild273
-rw-r--r--coda/net-fs/coda/files/6.0.15/venus31
-rw-r--r--coda/net-fs/coda/files/auth253
-rw-r--r--coda/net-fs/coda/files/coda-6.0.15-mit-krb5-struct.patch29
-rw-r--r--coda/net-fs/coda/files/coda-update60
-rw-r--r--coda/net-fs/coda/files/codasrv44
-rw-r--r--coda/net-fs/coda/metadata.xml9
-rw-r--r--coda/net-libs/rpc2/metadata.xml9
-rw-r--r--coda/net-libs/rpc2/rpc2-2.0.ebuild25
-rw-r--r--coda/profiles/repo_name1
-rw-r--r--coda/sys-libs/lwp/files/lwp-2.0-amd64.patch28
-rw-r--r--coda/sys-libs/lwp/lwp-2.2.ebuild33
-rw-r--r--coda/sys-libs/lwp/metadata.xml9
-rw-r--r--coda/sys-libs/rvm/metadata.xml9
-rw-r--r--coda/sys-libs/rvm/rvm-1.12.ebuild24
15 files changed, 637 insertions, 0 deletions
diff --git a/coda/net-fs/coda/coda-6.0.15.ebuild b/coda/net-fs/coda/coda-6.0.15.ebuild
new file mode 100644
index 0000000..6d575c9
--- /dev/null
+++ b/coda/net-fs/coda/coda-6.0.15.ebuild
@@ -0,0 +1,273 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.0.15.ebuild,v 1.9 2007/07/12 05:38:40 mr_bones_ Exp $
+
+inherit autotools eutils
+
+IUSE="kerberos ssl"
+
+DESCRIPTION="Coda is an advanced networked filesystem developed at Carnegie Mellon Univ."
+HOMEPAGE="http://www.coda.cs.cmu.edu/"
+SRC_URI="http://www.coda.cs.cmu.edu/pub/coda/src/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~ppc x86"
+
+# partly based on the deps suggested by Mandrake's RPM, and/or on my current versions
+# Also, definely needs coda.h from linux-headers.
+RDEPEND=">=sys-libs/lwp-2.1
+ >=net-libs/rpc2-2.0
+ >=sys-libs/rvm-1.11
+ >=sys-libs/db-3
+ >=sys-libs/ncurses-4
+ >=sys-libs/readline-3
+ >=dev-lang/perl-5.8
+ kerberos? ( virtual/krb5 )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-apps/gawk
+ sys-devel/bison
+ sys-apps/grep
+ virtual/os-headers"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-mit-krb5-struct.patch"
+}
+
+src_compile() {
+ local myflags=""
+
+ use kerberos && myflags="${myflags} --with-krb5"
+ use ssl && myflags="${myflags} --with-openssl"
+
+ econf ${myflags} || die "configure failed"
+ emake -j1 || die "emake failed"
+}
+
+src_install () {
+ #these crazy makefiles dont seem to use DESTDIR, but they do use these...
+ # (except infodir, but no harm in leaving it there)
+ # see Makeconf.setup in the package
+
+ #Also note that for Coda, we need to do "make client-install" for
+ # the client, and "make server-install" for the server.
+ #...you can find out about this from ./configs/Makerules
+ emake \
+ CINIT-SCRIPTS="" \
+ prefix=${D}/usr \
+ sysconfdir=${D}/etc/coda \
+ mandir=${D}/usr/share/man \
+ infodir=${D}/usr/share/info \
+ oldincludedir=${D}/usr/include client-install || die
+
+ emake \
+ SINIT-SCRIPTS="" \
+ prefix=${D}/usr \
+ sysconfdir=${D}/etc/coda \
+ mandir=${D}/usr/share/man \
+ oldincludedir=${D}/usr/include server-install || die
+ infodir=${D}/usr/share/info \
+
+ dodoc README* ChangeLog CREDITS
+
+ doinitd ${FILESDIR}/${PV}/venus
+ doinitd ${FILESDIR}/coda-update
+ doinitd ${FILESDIR}/codasrv
+ doinitd ${FILESDIR}/auth2
+
+ # We may use a conf.d/coda file at some point ?
+# insinto /etc/conf.d
+# newins ${FILESDIR}/coda.conf.d coda
+
+ sed -i -e "s,^#vicedir=/.*,vicedir=/var/lib/vice," \
+ ${D}/etc/coda/server.conf.ex
+
+ sed -i -e "s,^#mountpoint=/.*,mountpoint=/mnt/coda," \
+ ${D}/etc/coda/venus.conf.ex
+
+ # Fix conflict with backup.sh from tar
+ mv -f ${D}/usr/sbin/backup{,-coda}.sh
+
+ dodir /var/lib/vice
+ dodir /mnt/coda
+ dodir /usr/coda
+ dodir /usr/coda/spool
+
+ diropts -m0700
+ dodir /usr/coda/etc
+ dodir /usr/coda/venus.cache
+}
+
+pkg_postinst () {
+ elog
+ elog "To enable the coda at boot up, please do:"
+ elog " rc-update add codasrv default"
+ elog " rc-update add venus default"
+ elog
+ elog "To get started, run vice-setup and venus-setup."
+ elog
+ elog "Alternatively you can get a default coda setup by running:"
+ elog " emerge --config =${PF}"
+}
+
+pkg_config () {
+
+ # Set of default configuration values
+ local CODA_ROOT_DIR="/var/lib/vice"
+ local CODA_TEST_VOLUME="codatestvol"
+ local CODA_TEST_VOLUME_MOUNTPOINT="test"
+ local CODA_ADMIN_UID="6000"
+ local CODA_ADMIN_NAME="codaroot"
+ local CODA_STORAGE_DIR="/var/lib/vice"
+ local RVM_LOG_PARTITION="rvmlogpartition.img"
+ local RVM_DATA_PARTITION="rvmdatapartition.img"
+ local VICE_PARTITION="vicepa"
+ local UPDATE_AUTHENTICATION_TOKEN="updatetoken"
+ local AUTH2_AUTHENTICATION_TOKEN="auth2token"
+ local VOLUTIL_AUTHENTICATION_TOKEN="volutiltoken"
+
+ # Do not modify after this line
+
+ local FQDN=$(hostname --fqdn)
+ local CODA_MOUNTPOINT=$(codaconfedit venus.conf mountpoint)
+
+ # Make sure coda is not running before we start messing with its files
+ if [ "x$(pidof auth2)" != "x" ]; then
+ eerror "Please stop coda, coda-update and auth2 first."
+ exit 1
+ fi
+
+ # Also make sure venus is not running
+ if [ "x$(pidof venus)" != "x" ]; then
+ eerror "Please stop venus first."
+ exit 1
+ fi
+
+ # Ask for the location of (amongst other things) the vice partition
+ ewarn "This default configuration of coda will require 350MB of free space"
+ ewarn "for Recoverable Virtual Memory. Additional space is required for"
+ ewarn "the files that you store on your coda volume."
+ echo
+ einfon "Please specify where coda should store this data [${CODA_STORAGE_DIR}]: "
+ read new_storage_dir
+ if [ "x${new_storage_dir}" != "x" ]; then
+ CODA_STORAGE_DIR=${new_storage_dir}
+ fi
+ echo
+
+ # Check if an existing server.conf is in the way
+ conf=$(codaconfedit server.conf)
+ intheway=
+ if [ ${conf} != /dev/null ]; then
+ intheway="${intheway} ${conf}"
+ fi
+
+ # Check if an existing vice root dir is in the way
+ if [ -e ${CODA_ROOT_DIR} ]; then
+ intheway="${intheway} ${CODA_ROOT_DIR}"
+ fi
+
+ # Check if an existing vice partition is in the way
+ if [ -e ${CODA_STORAGE_DIR}/${VICE_PARTITION} ]; then
+ intheway="${intheway} ${CODA_STORAGE_DIR}/${VICE_PARTITION}"
+ fi
+
+ if [ "x${intheway}" != "x" ]; then
+ eerror "Please remove the following items manually first if you want to"
+ eerror "set up a default coda configuration:"
+ for item in ${intheway}; do
+ eerror "\t${item}"
+ done
+ exit 1
+ fi
+
+ einfo "A default coda server and client configuration will be set up that consists of:"
+ einfo "- a coda SCM (System Control Machine)"
+ einfo "- a coda administrator '${CODA_ADMIN_NAME}' with coda uid ${CODA_ADMIN_UID} and password 'changeme'"
+ einfo "- a coda root volume available at /mnt/coda/${FQDN}"
+ einfo "- a test volume mounted at ${CODA_MOUNTPOINT}/${FQDN}/${CODA_TEST_VOLUME_MOUNTPOINT}"
+ echo
+ einfon "Are you sure you want to do this? (y/n) "
+ read answer
+ if [ "x${answer}" != "xy" ]; then
+ exit 1
+ fi
+ echo
+
+ einfo "Setting up vice (the coda server)..."
+ vice-setup > /dev/null <<- EOF
+ yes
+ ${CODA_ROOT_DIR}
+ y
+ ${UPDATE_AUTHENTICATION_TOKEN}
+ ${AUTH2_AUTHENTICATION_TOKEN}
+ ${VOLUTIL_AUTHENTICATION_TOKEN}
+ 1
+ ${CODA_ADMIN_UID}
+ ${CODA_ADMIN_NAME}
+ yes
+ ${CODA_STORAGE_DIR}/${RVM_LOG_PARTITION}
+ 20M
+ ${CODA_STORAGE_DIR}/${RVM_DATA_PARTITION}
+ 315M
+ y
+ ${CODA_STORAGE_DIR}/${VICE_PARTITION}
+ y
+ 2M
+ n
+ EOF
+
+ # Start coda server
+ /etc/init.d/codasrv start || exit 1
+
+ # Workaround to increase the likelihood that the coda server finished
+ # starting up. Once there is a nicer way to detect this, it should
+ # probably be added to the codasrv init script.
+ # See http://www.coda.cs.cmu.edu/maillists/codalist/codalist-2004/6954.html
+ sleep 5
+
+ einfo "Creating root volume..."
+ # Create root volume
+ createvoloutput=`createvol_rep / ${FQDN} 2>&1 <<- EOF
+ n
+ EOF`
+ if ! volutil info / &> /dev/null
+ then
+ eerror "Unable to create root volume, output of createvol_rep follows"
+ echo "$createvoloutput"
+ exit 1
+ fi
+
+ einfo "Creating test volume..."
+ # Create test volume
+ createvoloutput=`createvol_rep ${CODA_TEST_VOLUME} ${FQDN} 2>&1 <<- EOF
+ n
+ EOF`
+ if ! volutil info ${CODA_TEST_VOLUME} &> /dev/null; then
+ eerror "Unable to create writable volume, output of createvol_rep follows"
+ echo "$createvoloutput"
+ exit 1
+ fi
+
+ einfo "Setting up venus (the coda client)..."
+ venus-setup ${FQDN} 20000 > /dev/null
+
+ /etc/init.d/venus start
+
+ einfo "Mounting test volume at ${CODA_MOUNTPOINT}/${FQDN}/${CODA_TEST_VOLUME_MOUNTPOINT}"
+ clog ${CODA_ADMIN_NAME}@${FQDN} > /dev/null <<- EOF
+ changeme
+ EOF
+
+ cfs mkmount ${CODA_MOUNTPOINT}/${FQDN}/${CODA_TEST_VOLUME_MOUNTPOINT} ${CODA_TEST_VOLUME}
+
+ echo
+ einfo "The coda server and client have been set up successfully."
+ einfo "Please refer to http://www.coda.cs.cmu.edu/doc/html/ for Coda documentation."
+ echo
+ einfo "Tip: use pdbtool to add a normal coda user and clog to authenticate and get write access."
+}
diff --git a/coda/net-fs/coda/files/6.0.15/venus b/coda/net-fs/coda/files/6.0.15/venus
new file mode 100644
index 0000000..f466663
--- /dev/null
+++ b/coda/net-fs/coda/files/6.0.15/venus
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/6.0.15/venus,v 1.1 2006/06/08 12:47:31 griffon26 Exp $
+
+depend() {
+ need net
+ after codasrv
+}
+
+checkconfig() {
+ if ! /usr/sbin/codaconfedit venus.conf &>/dev/null; then
+ eerror "Please run venus-setup before starting the service..."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting venus"
+ start-stop-daemon --start --quiet --exec /usr/sbin/venus > /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping venus"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/venus
+ umount -l coda &>/dev/null
+ eend $?
+}
diff --git a/coda/net-fs/coda/files/auth2 b/coda/net-fs/coda/files/auth2
new file mode 100644
index 0000000..6700a09
--- /dev/null
+++ b/coda/net-fs/coda/files/auth2
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/auth2,v 1.4 2004/07/26 17:50:21 griffon26 Exp $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e $vicedir/hostname ] ; then
+ eerror "Please run vice-setup before starting the service..."
+ return 1
+ fi
+}
+
+we_are_scm() {
+ if [ "`cat $vicedir/hostname`" = "`cat $vicedir/db/scm`" ] ; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+getvicedir() {
+ vicedir=`/usr/sbin/codaconfedit server.conf vicedir`
+}
+
+start() {
+ getvicedir
+
+ checkconfig || return 1
+
+ ebegin "Starting auth2"
+
+ # Check to see if we are the SCM. If not, we must add -chk to auth2
+
+ if (! we_are_scm) ; then
+ start-stop-daemon --start --quiet --exec /usr/sbin/auth2 \
+ --background -- -chk
+ else
+ start-stop-daemon --start --quiet --exec /usr/sbin/auth2 \
+ --background
+ fi
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping auth2"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/auth2
+ eend $?
+}
diff --git a/coda/net-fs/coda/files/coda-6.0.15-mit-krb5-struct.patch b/coda/net-fs/coda/files/coda-6.0.15-mit-krb5-struct.patch
new file mode 100644
index 0000000..d74a159
--- /dev/null
+++ b/coda/net-fs/coda/files/coda-6.0.15-mit-krb5-struct.patch
@@ -0,0 +1,29 @@
+diff -ruN coda-6.0.15/coda-src/auth2/krb5.c coda-6.0.15-fixed/coda-src/auth2/krb5.c
+--- coda-6.0.15/coda-src/auth2/krb5.c 2005-04-13 16:27:00.000000000 +0200
++++ coda-6.0.15-fixed/coda-src/auth2/krb5.c 2006-06-08 14:11:17.287528250 +0200
+@@ -54,14 +54,14 @@
+ #define tkt_realm(t) ((t)->client->realm)
+ #define tkt_realmlen(t) (strlen((t)->client->realm))
+ #define tkt_client(t) ((t)->client)
+-#define tkt_key(t) ((t)->ticket.key)
++#define tkt_key(t) (&(t)->ticket.key)
+ #define key_data(k) ((k)->keyvalue.data)
+ #define key_length(k) ((k)->keyvalue.length)
+ #else
+ #define tkt_realm(t) ((t)->enc_part2->client->realm.data)
+ #define tkt_realmlen(t) ((t)->enc_part2->client->realm.length)
+ #define tkt_client(t) ((t)->enc_part2->client)
+-#define tkt_key(t) ((t)->session)
++#define tkt_key(t) ((t)->enc_part2->session)
+ #define key_data(k) ((k)->contents)
+ #define key_length(k) ((k)->length)
+ #endif
+@@ -334,7 +334,7 @@
+ /* now prepare the keys */
+
+ /* hKey is the md5 hash of the kerberos session secret */
+- HashSecret(key_data(&tkt_key(ticket)), key_length(&tkt_key(ticket)), hKey);
++ HashSecret(key_data(tkt_key(ticket)), key_length(tkt_key(ticket)), hKey);
+
+ /* sKey is a random sequence of bytes */
+ GenerateSecret(sKey);
diff --git a/coda/net-fs/coda/files/coda-update b/coda/net-fs/coda/files/coda-update
new file mode 100644
index 0000000..9e6276f
--- /dev/null
+++ b/coda/net-fs/coda/files/coda-update
@@ -0,0 +1,60 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/coda-update,v 1.4 2004/07/26 17:50:21 griffon26 Exp $
+
+depend() {
+ need net auth2
+}
+
+checkconfig() {
+ if [ ! -e $vicedir/hostname ] ; then
+ eerror "Please run vice-setup before starting the service..."
+ return 1
+ fi
+}
+
+we_are_scm() {
+ if [ "`cat $vicedir/hostname`" = "`cat $vicedir/db/scm`" ] ; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+getvicedir() {
+ vicedir=`/usr/sbin/codaconfedit server.conf vicedir`
+}
+
+start() {
+ getvicedir
+
+ checkconfig || return 1
+
+ ebegin "Starting coda-update"
+
+ # Check to see if we are the SCM.
+ if we_are_scm ; then
+ start-stop-daemon --start --quiet --exec /usr/sbin/rpc2portmap
+ start-stop-daemon --start --quiet --exec /usr/sbin/updatesrv
+ fi
+
+ start-stop-daemon --start --quiet --exec /usr/sbin/updateclnt
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping coda-update"
+
+ getvicedir
+
+ if we_are_scm ; then
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rpc2portmap
+ start-stop-daemon --stop --quiet --exec /usr/sbin/updatesrv
+ fi
+
+ start-stop-daemon --stop --quiet --exec /usr/sbin/updateclnt
+
+ eend $?
+}
diff --git a/coda/net-fs/coda/files/codasrv b/coda/net-fs/coda/files/codasrv
new file mode 100644
index 0000000..6783add
--- /dev/null
+++ b/coda/net-fs/coda/files/codasrv
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/codasrv,v 1.5 2004/07/26 17:50:21 griffon26 Exp $
+
+depend() {
+ need net coda-update auth2
+}
+
+checkconfig() {
+ if [ ! -e $vicedir/hostname ] ; then
+ eerror "Please run vice-setup before starting the service..."
+ return 1
+ fi
+}
+
+we_are_scm() {
+ if [ "`cat $vicedir/hostname`" = "`cat $vicedir/db/scm`" ] ; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+getvicedir() {
+ vicedir=`/usr/sbin/codaconfedit server.conf vicedir`
+}
+
+start() {
+ getvicedir
+
+ checkconfig || return 1
+
+ ebegin "Starting codasrv"
+ start-stop-daemon --start --background --exec /usr/sbin/codasrv
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping codasrv"
+ msg=`/usr/sbin/volutil shutdown 2>&1` || echo "$msg"
+ start-stop-daemon --stop --quiet --retry 30/TERM --oknodo --exec /usr/sbin/codasrv
+ eend $?
+}
diff --git a/coda/net-fs/coda/metadata.xml b/coda/net-fs/coda/metadata.xml
new file mode 100644
index 0000000..fde0080
--- /dev/null
+++ b/coda/net-fs/coda/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-fs</herd>
+<maintainer>
+ <email>chtekk@gentoo.org</email>
+ <name>Luca Longinotti</name>
+</maintainer>
+</pkgmetadata>
diff --git a/coda/net-libs/rpc2/metadata.xml b/coda/net-libs/rpc2/metadata.xml
new file mode 100644
index 0000000..fde0080
--- /dev/null
+++ b/coda/net-libs/rpc2/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-fs</herd>
+<maintainer>
+ <email>chtekk@gentoo.org</email>
+ <name>Luca Longinotti</name>
+</maintainer>
+</pkgmetadata>
diff --git a/coda/net-libs/rpc2/rpc2-2.0.ebuild b/coda/net-libs/rpc2/rpc2-2.0.ebuild
new file mode 100644
index 0000000..74dc9bf
--- /dev/null
+++ b/coda/net-libs/rpc2/rpc2-2.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/rpc2/rpc2-2.0.ebuild,v 1.3 2007/03/27 18:48:20 armin76 Exp $
+
+DESCRIPTION="Remote procedure call package for IP/UDP (used by Coda)"
+HOMEPAGE="http://www.coda.cs.cmu.edu/"
+SRC_URI="http://www.coda.cs.cmu.edu/pub/rpc2/src/${P}.tar.gz"
+IUSE=""
+SLOT="1"
+LICENSE="LGPL-2.1"
+KEYWORDS="~alpha ~amd64 ~hppa ia64 ~mips ~ppc ~sparc x86"
+
+RDEPEND=">=sys-libs/lwp-2.1"
+
+DEPEND="${RDEPEND}
+ sys-apps/gawk
+ sys-apps/sed
+ sys-apps/grep
+ sys-devel/libtool"
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failed"
+
+ dodoc NEWS README.ipv6
+}
diff --git a/coda/profiles/repo_name b/coda/profiles/repo_name
new file mode 100644
index 0000000..ebf05ad
--- /dev/null
+++ b/coda/profiles/repo_name
@@ -0,0 +1 @@
+chtekk-coda
diff --git a/coda/sys-libs/lwp/files/lwp-2.0-amd64.patch b/coda/sys-libs/lwp/files/lwp-2.0-amd64.patch
new file mode 100644
index 0000000..64a1576
--- /dev/null
+++ b/coda/sys-libs/lwp/files/lwp-2.0-amd64.patch
@@ -0,0 +1,28 @@
+diff -ruN lwp-2.0/src/lwp.c lwp-2.0-fixed/src/lwp.c
+--- lwp-2.0/src/lwp.c 2005-03-25 17:50:56.000000000 +0100
++++ lwp-2.0-fixed/src/lwp.c 2005-05-05 14:32:56.580753096 +0200
+@@ -463,6 +463,16 @@
+ #ifndef MMAP_LWP_STACKS
+ stackptr = (char *) malloc(stacksize);
+ #else
++ pagesize = getpagesize();
++
++#if defined(__x86_64__)
++ /* [gb] Ensure minimal stack size. Heuristically determined
++ through tdb test that 2048 is too small when printf() et al. come
++ into action. */
++ if (stacksize < pagesize)
++ stacksize = pagesize;
++#endif
++
+ #ifdef MAP_ANON
+ stackptr = mmap(lwp_stackbase, stacksize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANON, -1, 0);
+@@ -483,7 +493,6 @@
+ perror("stack: ");
+ assert(0);
+ }
+- pagesize = getpagesize();
+ lwp_stackbase += ((stacksize/pagesize) + 2) * pagesize;
+ #endif
+ if (!stackptr)
diff --git a/coda/sys-libs/lwp/lwp-2.2.ebuild b/coda/sys-libs/lwp/lwp-2.2.ebuild
new file mode 100644
index 0000000..fb08e58
--- /dev/null
+++ b/coda/sys-libs/lwp/lwp-2.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/lwp/lwp-2.2.ebuild,v 1.8 2007/11/26 13:14:05 corsair Exp $
+
+inherit eutils
+
+DESCRIPTION="Light weight process library (used by Coda). This is NOT libwww-perl."
+HOMEPAGE="http://www.coda.cs.cmu.edu/"
+SRC_URI="http://www.coda.cs.cmu.edu/pub/lwp/src/${P}.tar.gz"
+
+SLOT="1"
+LICENSE="LGPL-2.1"
+KEYWORDS="alpha amd64 ~hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+DEPEND="sys-apps/grep
+ sys-apps/sed
+ sys-devel/libtool
+ sys-devel/gcc"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Was introduced for bug #34542, not sure if still needed
+ use amd64 && epatch "${FILESDIR}"/lwp-2.0-amd64.patch
+}
+
+src_install() {
+ einstall || die "einstall failed."
+ dodoc AUTHORS NEWS PORTING README
+}
diff --git a/coda/sys-libs/lwp/metadata.xml b/coda/sys-libs/lwp/metadata.xml
new file mode 100644
index 0000000..fde0080
--- /dev/null
+++ b/coda/sys-libs/lwp/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-fs</herd>
+<maintainer>
+ <email>chtekk@gentoo.org</email>
+ <name>Luca Longinotti</name>
+</maintainer>
+</pkgmetadata>
diff --git a/coda/sys-libs/rvm/metadata.xml b/coda/sys-libs/rvm/metadata.xml
new file mode 100644
index 0000000..fde0080
--- /dev/null
+++ b/coda/sys-libs/rvm/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-fs</herd>
+<maintainer>
+ <email>chtekk@gentoo.org</email>
+ <name>Luca Longinotti</name>
+</maintainer>
+</pkgmetadata>
diff --git a/coda/sys-libs/rvm/rvm-1.12.ebuild b/coda/sys-libs/rvm/rvm-1.12.ebuild
new file mode 100644
index 0000000..9d147d4
--- /dev/null
+++ b/coda/sys-libs/rvm/rvm-1.12.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/rvm/rvm-1.12.ebuild,v 1.4 2007/07/15 02:08:20 mr_bones_ Exp $
+
+DESCRIPTION="Recoverable Virtual Memory (used by Coda)"
+HOMEPAGE="http://www.coda.cs.cmu.edu/"
+SRC_URI="http://www.coda.cs.cmu.edu/pub/rvm/src/${P}.tar.gz"
+IUSE=""
+SLOT="1"
+LICENSE="LGPL-2.1"
+KEYWORDS="~alpha ~amd64 ~hppa ia64 ~mips ~ppc ~sparc x86"
+
+DEPEND=">=sys-libs/lwp-2.0
+ sys-apps/grep
+ sys-devel/libtool
+ sys-devel/gcc"
+
+RDEPEND=">=sys-libs/lwp-2.0"
+
+src_install() {
+ make DESTDIR=${D} install || die
+
+ dodoc NEWS
+}