summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorMaurice van der Pot <griffon26@gentoo.org>2004-10-03 19:37:12 +0000
committerMaurice van der Pot <griffon26@gentoo.org>2004-10-03 19:37:12 +0000
commitacfc40b80b81c2674b6c43f26c59aa96e85e859b (patch)
tree965f75e1bc7842b88f531522783991336d9a10f0 /net-fs
parent~amd64 (diff)
downloadhistorical-acfc40b80b81c2674b6c43f26c59aa96e85e859b.tar.gz
historical-acfc40b80b81c2674b6c43f26c59aa96e85e859b.tar.bz2
historical-acfc40b80b81c2674b6c43f26c59aa96e85e859b.zip
Added pkg_config implementation for coda-6.0.6
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/coda/ChangeLog5
-rw-r--r--net-fs/coda/Manifest12
-rw-r--r--net-fs/coda/coda-6.0.6.ebuild161
3 files changed, 169 insertions, 9 deletions
diff --git a/net-fs/coda/ChangeLog b/net-fs/coda/ChangeLog
index 3052395e718a..11751bb14b04 100644
--- a/net-fs/coda/ChangeLog
+++ b/net-fs/coda/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-fs/coda
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.9 2004/08/12 09:22:54 griffon26 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.10 2004/10/03 19:37:12 griffon26 Exp $
+
+ 03 Oct 2004; Maurice van der Pot <griffon26@gentoo.org> coda-6.0.6.ebuild:
+ Ebuild now allows user to set up initial configuration after installation.
12 Aug 2004; Maurice van der Pot <griffon26@gentoo.org> coda-6.0.6.ebuild:
Changed dependency from sys-kernel/linux-headers to virtual/os-headers
diff --git a/net-fs/coda/Manifest b/net-fs/coda/Manifest
index 534695f9bd1d..a4d153322dec 100644
--- a/net-fs/coda/Manifest
+++ b/net-fs/coda/Manifest
@@ -3,8 +3,8 @@ Hash: SHA1
MD5 f905a614fde3a85e0adefb203ece18fc metadata.xml 321
MD5 14e8df1cfd403bd955f4de826e758920 coda-6.0.3.ebuild 2974
-MD5 3107e169b6c128048b60ea41b7ce75e6 coda-6.0.6.ebuild 3027
-MD5 453e773fac698939d52204d2fb1cab50 ChangeLog 2100
+MD5 8068c59c5224f3683e5bf869912012b1 coda-6.0.6.ebuild 7535
+MD5 88983cc792ef92f57721c32226f51dc5 ChangeLog 2256
MD5 d21e4e5142a0266459b5ad8b39e3e707 files/coda-6.0.3-iowr.patch 607
MD5 464a8cd91e3af12266c0570034388221 files/coda-6.0.6-gcc3.4.patch 1984
MD5 d08316a08429d573d30dbc9924707206 files/digest-coda-6.0.3 63
@@ -14,9 +14,9 @@ MD5 f40f2b0227b97168e8dcd64c86f2e8cc files/codasrv 941
MD5 1ea6425841d7fed645aad9d06d728ff7 files/auth2 1041
MD5 494ef5b4a48b5a4aa77251d2b5942a91 files/venus 697
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.4 (GNU/Linux)
+Version: GnuPG v1.2.6 (GNU/Linux)
-iD8DBQFBGzb4MGnpIbeahxwRAuPGAJwLWdYFjekgO6HbQg5/YZTIDjgB7wCeMIA8
-wYdeISryEmi/1BL20yeeIPg=
-=HtVQ
+iD8DBQFBYFUBMGnpIbeahxwRArT/AKCwPQJjQqJD/5R6m1+ojayb3oeDjgCgwFr4
+fN+kb0pbaI82QffzKNlA19Q=
+=gOPH
-----END PGP SIGNATURE-----
diff --git a/net-fs/coda/coda-6.0.6.ebuild b/net-fs/coda/coda-6.0.6.ebuild
index 49d395815d5f..d0aea3be48d4 100644
--- a/net-fs/coda/coda-6.0.6.ebuild
+++ b/net-fs/coda/coda-6.0.6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.0.6.ebuild,v 1.5 2004/08/12 09:22:54 griffon26 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.0.6.ebuild,v 1.6 2004/10/03 19:37:12 griffon26 Exp $
inherit eutils
@@ -117,6 +117,163 @@ pkg_postinst () {
einfo " rc-update add codasrv default"
einfo " rc-update add venus default"
einfo
- einfo "* To get started, run venus-setup and vice-setup"
+ einfo "To get started, run vice-setup and venus-setup."
einfo
+ einfo "Alternatively you can get a default coda setup by running:"
+ einfo " ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
}
+
+pkg_config () {
+
+ # Set of default configuration values
+ local CODA_ROOT_DIR="/var/lib/vice"
+ local CODA_ROOT_VOLUME="codarootvol"
+ 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
+
+ # 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 /var/lib/vice 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
+
+ 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
+ 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 writable coda volume available 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_ROOT_VOLUME}
+ ${CODA_ADMIN_UID}
+ ${CODA_ADMIN_NAME}
+ yes
+ ${CODA_STORAGE_DIR}/${RVM_LOG_PARTITION}
+ 2M
+ ${CODA_STORAGE_DIR}/${RVM_DATA_PARTITION}
+ 315M
+ y
+ ${CODA_STORAGE_DIR}/${VICE_PARTITION}
+ y
+ 2M
+ EOF
+
+ # Start coda server
+ /etc/init.d/codasrv start || exit 1
+
+ einfo "Creating root volume..."
+ # Create root volume
+ createvol_rep ${CODA_ROOT_VOLUME} E0000100 ${CODA_STORAGE_DIR}/${VICE_PARTITION} &> /dev/null <<- EOF
+ n
+ EOF
+
+ einfo "Creating writable volume..."
+ # Create test volume
+ createvol_rep ${CODA_TEST_VOLUME} E0000100 ${CODA_STORAGE_DIR}/${VICE_PARTITION} &> /dev/null <<- EOF
+ n
+ EOF
+
+ einfo "Setting up venus (the coda client)..."
+ venus-setup ${FQDN} 20000 > /dev/null
+
+ /etc/init.d/venus start
+
+ einfo "Waiting for ${CODA_MOUNTPOINT} to be mounted... "
+ for count in 4 3 2 1 0; do
+ if [ ! -e ${CODA_MOUNTPOINT}/NOT_REALLY_CODA ]; then
+ break
+ fi
+ sleep 1
+ done
+
+ if [ ${count} = 0 ]; then
+ eerror "Mounting failed!"
+ exit 1
+ fi
+
+ einfo "Mounting coda 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."
+}
+