diff options
author | 2008-07-12 21:32:16 +0000 | |
---|---|---|
committer | 2008-07-12 21:32:16 +0000 | |
commit | 78e36ca1deef7c1565fc1bf15bcd5a7271109b05 (patch) | |
tree | 8edb76279367c714ed7baab5a584bfc82b09c5d6 | |
parent | Fix implicit declarations. (diff) | |
download | chtekk-78e36ca1deef7c1565fc1bf15bcd5a7271109b05.tar.gz chtekk-78e36ca1deef7c1565fc1bf15bcd5a7271109b05.tar.bz2 chtekk-78e36ca1deef7c1565fc1bf15bcd5a7271109b05.zip |
Update coda, big cleanup.
svn path=/; revision=84
-rw-r--r-- | coda/net-fs/coda/Manifest | 8 | ||||
-rw-r--r-- | coda/net-fs/coda/coda-6.0.15.ebuild | 273 | ||||
-rw-r--r-- | coda/net-fs/coda/coda-6.9.3.ebuild | 92 | ||||
-rw-r--r-- | coda/net-fs/coda/files/6.0.15/venus | 31 | ||||
-rw-r--r-- | coda/net-fs/coda/files/auth2 | 51 | ||||
-rw-r--r-- | coda/net-fs/coda/files/coda-6.0.15-mit-krb5-struct.patch | 29 | ||||
-rw-r--r-- | coda/net-fs/coda/files/coda-6.9.3-gentoo-dirs.patch | 332 | ||||
-rw-r--r-- | coda/net-fs/coda/files/coda-update | 66 | ||||
-rw-r--r-- | coda/net-fs/coda/files/codasrv | 42 | ||||
-rw-r--r-- | coda/net-fs/coda/files/venus | 29 |
10 files changed, 510 insertions, 443 deletions
diff --git a/coda/net-fs/coda/Manifest b/coda/net-fs/coda/Manifest new file mode 100644 index 0000000..04f44d2 --- /dev/null +++ b/coda/net-fs/coda/Manifest @@ -0,0 +1,8 @@ +AUX auth2 604 RMD160 eb4336656492f22541e79c6854130ae46bee287d SHA1 4af20753da5c61666b9aff5fcec07f596af851b2 SHA256 f3da3e16eed06fb3a8d6949bbc0557b009232dcfee812afd79b38a494bd916a4 +AUX coda-6.9.3-gentoo-dirs.patch 11035 RMD160 628dea7bf66c897110693ba17da2bd35971753ed SHA1 e55be90dd9a3df2248fcd5b32e4cdfec104e0ead SHA256 d3765e414149c56dbfc6c58c09395fcaa41a76a0189db2708863afcef128435c +AUX coda-update 929 RMD160 17dc273447dcf9c80ccba62625e065298f5a863f SHA1 4be4d18b8d4c8f3da070e1072250b37f30b8f37d SHA256 ad62ed9fa6d78da0a334a4b72597beb74d8920365f53d084fde56d06f9af2d12 +AUX codasrv 528 RMD160 bacac42bcf31c659f10c2dec76a2cc66b1da2d55 SHA1 a7be5983aab0a6d8d86ca97064257a99818fa0d2 SHA256 5239f678bf5be56d61ead907c7ad0992baaf6328d9b750bc0061225a718e1a70 +AUX venus 566 RMD160 7938eeea4decdd21ed05570ff3d19ce598e6a32e SHA1 75656ccd579dce627b5e7e11e98b7127cd1d5262 SHA256 63f7d6f4f7cfc73435b3f16591312d3316c2d5d9906cb88ac7f17fe7c8f399df +DIST coda-6.9.3.tar.gz 1662535 RMD160 c12e30c84471f1d659d48cd1bf2ecaf5f684fe0e SHA1 cc73ac3e6987154ffa1772d4005b7acedc0f0afb SHA256 608a91fd9cea79b0b77511f47dc29d176f66898b9a0ef1856f8bafa3cc53d320 +EBUILD coda-6.9.3.ebuild 2166 RMD160 318814516c646d5e344d5efabf141a2ac1f6112c SHA1 f57e4d5d313a88f706e6b6cef7d51977f53027cc SHA256 7b5bb85f2d0d75f061b3a4050b8f88ae5445bc7cf9e89aff1a05b01d0d6e8814 +MISC metadata.xml 250 RMD160 6aa4816072481129f87c0eb8a85c6a15287da965 SHA1 a8f9a0fb13692c19c95e700e32796c147c6c7804 SHA256 1ed32cc76b9bd8664c2bfd7d84f4186b444d5d39659b40523d0bc27e0ebb9846 diff --git a/coda/net-fs/coda/coda-6.0.15.ebuild b/coda/net-fs/coda/coda-6.0.15.ebuild deleted file mode 100644 index 6d575c9..0000000 --- a/coda/net-fs/coda/coda-6.0.15.ebuild +++ /dev/null @@ -1,273 +0,0 @@ -# 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/coda-6.9.3.ebuild b/coda/net-fs/coda/coda-6.9.3.ebuild new file mode 100644 index 0000000..1e4970d --- /dev/null +++ b/coda/net-fs/coda/coda-6.9.3.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit autotools eutils + +KEYWORDS="~amd64 ~ppc ~x86" + +DESCRIPTION="Coda is an advanced networked filesystem developed at Carnegie Mellon Uni." +HOMEPAGE="http://www.coda.cs.cmu.edu/" +SRC_URI="http://www.coda.cs.cmu.edu/pub/${PN}/src/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +IUSE="coda-client coda-server kerberos" + +RDEPEND=">=sys-libs/lwp-2.4 + >=net-libs/rpc2-2.7 + >=sys-libs/rvm-1.15 + >=sys-libs/db-4.2 + >=sys-libs/ncurses-5.4 + >=sys-libs/readline-5.0 + dev-lang/perl + kerberos? ( virtual/krb5 )" + +DEPEND="${RDEPEND} + virtual/os-headers" + +src_unpack() { + unpack ${A} + + cd "${S}" + #epatch "${FILESDIR}/${P}-gentoo-dirs.patch" +} + +src_compile() { + local myconf="" + + use coda-client && myconf="${myconf} --enable-client" + use coda-server && myconf="${myconf} --enable-server" + use kerberos && myconf="${myconf} --with-crypto --with-krb5" + + econf ${myconf} || die "econf failed" + + emake || die "emake failed" +} + +src_install () { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc INSTALL* README* + + rm -Rf "${D}"/etc/init.d + doinitd "${FILESDIR}"/auth2 + doinitd "${FILESDIR}"/coda-update + doinitd "${FILESDIR}"/codasrv + doinitd "${FILESDIR}"/venus + + # Fix conflict with backup.sh from tar. + mv -f "${D}"/usr/sbin/backup{,-${PN}}.sh + + # Add Gentoo specific directories. + dodir /var/lib/vice + dodir /var/lib/coda/spool + dodir /mnt/coda + dodir /mnt/vicepa + + diropts -m0700 + dodir /var/lib/coda/venus.cache + + # Symlink traditional coda dirs to Gentoo dirs. + dosym var/lib/vice /vice + dosym var/lib/coda /usr/coda + dosym mnt/coda /coda + dosym mnt/vicepa /vicepa +} + +pkg_preinst () { + enewgroup codaroot + enewuser codaroot -1 -1 -1 codaroot +} + +pkg_postinst () { + elog "To enable the coda server at boot up, please do:" + elog " rc-update add auth2 default" + elog " rc-update add coda-update default" + elog " rc-update add codasrv default" + elog + elog "To enable the coda client at boot up, please do:" + elog " rc-update add venus default" + elog + elog "To get started, run vice-setup (server) and/or venus-setup (client)." +} diff --git a/coda/net-fs/coda/files/6.0.15/venus b/coda/net-fs/coda/files/6.0.15/venus deleted file mode 100644 index f466663..0000000 --- a/coda/net-fs/coda/files/6.0.15/venus +++ /dev/null @@ -1,31 +0,0 @@ -#!/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 index 6700a09..8b18727 100644 --- a/coda/net-fs/coda/files/auth2 +++ b/coda/net-fs/coda/files/auth2 @@ -1,53 +1,30 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2008 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 $ +# $Header: $ 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` + use logger + after domainname } 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 + if [[ "`cat /var/lib/vice/hostname`" != "`cat /var/lib/vice/db/scm`" ]] ; then + CHK="-chk" fi + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --background \ + --pidfile /var/lib/vice/auth2/pid --make-pidfile \ + --exec /usr/sbin/auth2 -- ${CHK} eend $? } stop() { - ebegin "Stopping auth2" - start-stop-daemon --stop --quiet --exec /usr/sbin/auth2 + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --pidfile /var/lib/vice/auth2/pid \ + --name 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 deleted file mode 100644 index d74a159..0000000 --- a/coda/net-fs/coda/files/coda-6.0.15-mit-krb5-struct.patch +++ /dev/null @@ -1,29 +0,0 @@ -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-6.9.3-gentoo-dirs.patch b/coda/net-fs/coda/files/coda-6.9.3-gentoo-dirs.patch new file mode 100644 index 0000000..c023335 --- /dev/null +++ b/coda/net-fs/coda/files/coda-6.9.3-gentoo-dirs.patch @@ -0,0 +1,332 @@ +diff -Nru coda-6.9.3/coda-src/scripts/bldvldb.sh.in coda-6.9.3-gt/coda-src/scripts/bldvldb.sh.in +--- coda-6.9.3/coda-src/scripts/bldvldb.sh.in 2004-03-05 22:12:44.000000000 +0100 ++++ coda-6.9.3-gt/coda-src/scripts/bldvldb.sh.in 2008-07-12 23:15:47.141740587 +0200 +@@ -28,7 +28,7 @@ + fi + + if [ x${vicedir} = x ] ; then +- vicedir=/vice ++ vicedir=/var/lib/vice + fi + + THISHOST=`hostname | tr A-Z a-z` +diff -Nru coda-6.9.3/coda-src/scripts/coda-server-logrotate coda-6.9.3-gt/coda-src/scripts/coda-server-logrotate +--- coda-6.9.3/coda-src/scripts/coda-server-logrotate 2003-08-04 20:09:58.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/coda-server-logrotate 2008-07-12 23:15:53.629741210 +0200 +@@ -3,7 +3,7 @@ + # Simple logrotation for Coda server logfiles + # + +-vicedir=/vice ++vicedir=/var/lib/vice + . "`codaconfedit server.conf`" + + srvdir="${vicedir}/srv" +diff -Nru coda-6.9.3/coda-src/scripts/codastart coda-6.9.3-gt/coda-src/scripts/codastart +--- coda-6.9.3/coda-src/scripts/codastart 2006-09-19 19:48:57.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/codastart 2008-07-12 23:16:40.249741012 +0200 +@@ -1,11 +1,11 @@ + #!/bin/sh +-if [ "`cat /vice/hostname`" = "`cat /vice/db/scm`" ] ++if [ "`cat /var/lib/vice/hostname`" = "`cat /var/lib/vice/db/scm`" ] + then + updatesrv & + auth2 & + else + auth2 -chk & + fi +-updateclnt -h `grep '' /vice/db/scm` & ++updateclnt -h `grep '' /var/lib/vice/db/scm` & + startserver + +diff -Nru coda-6.9.3/coda-src/scripts/createvol_rep.in coda-6.9.3-gt/coda-src/scripts/createvol_rep.in +--- coda-6.9.3/coda-src/scripts/createvol_rep.in 2007-06-26 18:18:28.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/createvol_rep.in 2008-07-12 23:17:29.601740626 +0200 +@@ -32,7 +32,7 @@ + export PATH + + # load the server configuration file +-vicedir=/vice ++vicedir=/var/lib/vice + . "`@sbindir@/codaconfedit server.conf`" + + if [ ! -f ${vicedir}/hostname -o ! -f ${vicedir}/db/scm ] ; then +diff -Nru coda-6.9.3/coda-src/scripts/purgevol_rep.in coda-6.9.3-gt/coda-src/scripts/purgevol_rep.in +--- coda-6.9.3/coda-src/scripts/purgevol_rep.in 2005-05-04 14:13:41.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/purgevol_rep.in 2008-07-12 23:18:23.829740822 +0200 +@@ -24,7 +24,7 @@ + export PATH + + # load the server configuration file +-vicedir=/vice ++vicedir=/var/lib/vice + . "`@sbindir@/codaconfedit server.conf`" + + SCM=`cat ${vicedir}/db/scm` +diff -Nru coda-6.9.3/coda-src/scripts/startserver.in coda-6.9.3-gt/coda-src/scripts/startserver.in +--- coda-6.9.3/coda-src/scripts/startserver.in 2004-10-26 23:36:43.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/startserver.in 2008-07-12 23:18:54.541741263 +0200 +@@ -30,7 +30,7 @@ + fi + + if [ x${vicedir} = x ]; then +- vicedir=/vice ++ vicedir=/var/lib/vice + fi + + # Rotate logfiles +diff -Nru coda-6.9.3/coda-src/scripts/venus-setup.in coda-6.9.3-gt/coda-src/scripts/venus-setup.in +--- coda-6.9.3/coda-src/scripts/venus-setup.in 2007-08-10 20:02:24.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/venus-setup.in 2008-07-12 23:22:24.537741513 +0200 +@@ -65,16 +65,16 @@ + #fi + + # default paths +-errorlog=/usr/coda/etc/console +-cachedir=/usr/coda/venus.cache +-checkpointdir=/usr/coda/spool +-logfile=/usr/coda/etc/venus.log +-marinersocket=/usr/coda/spool/mariner +-pid_file=/usr/coda/venus.cache/pid +-run_control_file=/usr/coda/venus.cache/VENUS_CTRL +-rvm_log=/usr/coda/LOG +-rvm_data=/usr/coda/DATA +-mountpoint=/coda ++errorlog=/var/lib/coda/etc/console ++cachedir=/var/lib/coda/venus.cache ++checkpointdir=/var/lib/coda/spool ++logfile=/var/lib/coda/etc/venus.log ++marinersocket=/var/lib/coda/spool/mariner ++pid_file=/var/lib/coda/venus.cache/pid ++run_control_file=/var/lib/coda/venus.cache/VENUS_CTRL ++rvm_log=/var/lib/coda/LOG ++rvm_data=/var/lib/coda/DATA ++mountpoint=/mnt/coda + + # override with user defined paths + if [ x${conf} != x/dev/null ] ; then +@@ -224,8 +224,8 @@ + # next run will always initialize + touch $cachedir/INIT + +-if [ -f /usr/coda/etc/vstab ] ; then +- echo "To avoid confusion, remove /usr/coda/etc/vstab, we have switched to" ++if [ -f /var/lib/coda/etc/vstab ] ; then ++ echo "To avoid confusion, remove /var/lib/coda/etc/vstab, we have switched to" + echo "the /etc/coda/venus.conf file for configuring the client." + fi + +diff -Nru coda-6.9.3/coda-src/scripts/vice-setup-rvm.in coda-6.9.3-gt/coda-src/scripts/vice-setup-rvm.in +--- coda-6.9.3/coda-src/scripts/vice-setup-rvm.in 2006-09-19 19:35:02.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/vice-setup-rvm.in 2008-07-12 23:23:28.909741348 +0200 +@@ -42,7 +42,7 @@ + # + + # defaults, will be overridden by settings in the server.conf file +-vicedir=/vice ++vicedir=/var/lib/vice + + prefix=@prefix@ + exec_prefix=@exec_prefix@ +diff -Nru coda-6.9.3/coda-src/scripts/vice-setup-scm coda-6.9.3-gt/coda-src/scripts/vice-setup-scm +--- coda-6.9.3/coda-src/scripts/vice-setup-scm 2005-09-01 23:59:24.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/vice-setup-scm 2008-07-12 23:23:46.517741267 +0200 +@@ -36,7 +36,7 @@ + . "`codaconfedit server.conf`" + + if [ x${vicedir} = x ] ; then +- vicedir=/vice ++ vicedir=/var/lib/vice + fi + + # current first maximum replicated volume id (0x7f000000) +diff -Nru coda-6.9.3/coda-src/scripts/vice-setup-srvdir coda-6.9.3-gt/coda-src/scripts/vice-setup-srvdir +--- coda-6.9.3/coda-src/scripts/vice-setup-srvdir 2005-09-01 23:59:24.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/vice-setup-srvdir 2008-07-12 23:24:28.813741293 +0200 +@@ -28,7 +28,7 @@ + # + # Configuration + # +-vicedir=/vice ++vicedir=/var/lib/vice + numservers=1 + . "`codaconfedit server.conf`" + +@@ -73,15 +73,15 @@ + echo + + if [ $numservers -gt 1 ]; then +- echon "Where shall we store your file data for server $n ($hn) [/vicepa]? " ++ echon "Where shall we store your file data for server $n ($hn) [/mnt/vicepa]? " + else +- echon 'Where shall we store your file data [/vicepa]? ' ++ echon 'Where shall we store your file data [/mnt/vicepa]? ' + fi + srvdir= + read srvdir + + if [ "x$srvdir" = x ]; then +- srvdir=/vicepa ++ srvdir=/mnt/vicepa + fi + + # Create the directory if needed. (Symlink is OK.) +diff -Nru coda-6.9.3/coda-src/scripts/vice-setup-user coda-6.9.3-gt/coda-src/scripts/vice-setup-user +--- coda-6.9.3/coda-src/scripts/vice-setup-user 2004-12-22 16:06:25.000000000 +0100 ++++ coda-6.9.3-gt/coda-src/scripts/vice-setup-user 2008-07-12 23:24:51.889740616 +0200 +@@ -31,7 +31,7 @@ + # + # Configuration + # +-vicedir=/vice ++vicedir=/var/lib/vice + . "`codaconfedit server.conf`" + + # Set up password and group files for Coda +diff -Nru coda-6.9.3/coda-src/scripts/vice-setup.in coda-6.9.3-gt/coda-src/scripts/vice-setup.in +--- coda-6.9.3/coda-src/scripts/vice-setup.in 2007-07-20 23:34:49.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/scripts/vice-setup.in 2008-07-12 23:25:43.881740900 +0200 +@@ -122,12 +122,12 @@ + fi + fi + +-echon "What is the root directory for your coda server(s)? [/vice] " ++echon "What is the root directory for your coda server(s)? [/var/lib/vice] " + vicedir="" + read vicedir + + if [ "x$vicedir" = x ] ; then +- vicedir=/vice ++ vicedir=/var/lib/vice + fi + + if [ $mkconf = 1 ] ; then +@@ -410,7 +410,7 @@ + echo "That seems to have worked..." + echo "If you have a working Coda client you should now be able to" + echo "access the new Coda realm" +- echo " - cfs lv /coda/${hn}/" ++ echo " - cfs lv /mnt/coda/${hn}/" + fi + echo + echo "enjoy Coda." +@@ -444,7 +444,7 @@ + echo "After that, there is still some configuration needed on the SCM before" + echo "this server can be started." + echo +-echo "An entry for this host is needed in /vice/db/servers" ++echo "An entry for this host is needed in /var/lib/vice/db/servers" + echo "Then all servers need to be shut down and restarted, as they need to" + echo "know about the new server." + echo "After all that it _should_ be ok to start the new server and create" +diff -Nru coda-6.9.3/coda-src/venus/venus.conf.ex coda-6.9.3-gt/coda-src/venus/venus.conf.ex +--- coda-6.9.3/coda-src/venus/venus.conf.ex 2007-10-17 21:26:34.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/venus/venus.conf.ex 2008-07-12 22:53:43.817740642 +0200 +@@ -20,7 +20,7 @@ + # Which file is used for realm lookups, before we look at dns SRV and A + # records. + # +-#realmtab=/etc/coda/realms ++realmtab=/etc/coda/realms + + # + # What should the size of the local cache be in 1k blocks. If this is +@@ -55,9 +55,9 @@ + + # + # Which file should receive venus's stderr output. +-# (default is /usr/coda/etc/console). ++# (default is /var/lib/coda/etc/console). + # +-#errorlog=/usr/coda/etc/console ++errorlog=/var/lib/coda/etc/console + + # + # What is the uid of the primary user of this system. The primary user +@@ -72,43 +72,43 @@ + + # + # What are the locations of the rvm log and data files or partitions. +-# (default /usr/coda/{LOG,DATA} ++# (default /var/lib/coda/{LOG,DATA} + # + # CAUTION: these are _unrelated_ to the server's rvm log and data. Also + # when specifying partitions, do NOT specify any partions which might + # have an existing filesystem, as you WILL lose all data during + # initialization. + # +-#rvm_log=/usr/coda/LOG +-#rvm_data=/usr/coda/DATA ++rvm_log=/var/lib/coda/LOG ++rvm_data=/var/lib/coda/DATA + + # + # Where should venus keep it's pool of cached files. +-# (default is /usr/coda/venus.cache) ++# (default is /var/lib/coda/venus.cache) + # +-#cachedir=/usr/coda/venus.cache ++cachedir=/var/lib/coda/venus.cache + + # + # Where should venus store snapshots of the modification logs. This is + # primarily to provide some safe fallback when venus dies or messes up +-# the CML during reintegration. (default is /usr/coda/spool) ++# the CML during reintegration. (default is /var/lib/coda/spool) + # +-#checkpointdir=/usr/coda/spool ++checkpointdir=/var/lib/coda/spool + + # + # Where does venus store it's pidfile + # +-#pid_file=/usr/coda/venus.cache/pid ++pid_file=/var/lib/coda/venus.cache/pid + + # + # What file does vutil use to control venus + # +-#run_control_file=/usr/coda/venus.cache/VENUS_CTRL ++run_control_file=/var/lib/coda/venus.cache/VENUS_CTRL + + # + # Venus log file + # +-#logfile=/usr/coda/etc/venus.log ++logfile=/var/lib/coda/etc/venus.log + + # + # Mariner socket, +@@ -116,7 +116,7 @@ + # codacon and spy use to talk to venus. On other platforms they will + # connect to venus through tcp port 2430. + # +-#marinersocket=/usr/coda/spool/mariner ++marinersocket=/var/lib/coda/spool/mariner + + # + # Dont use RVM, +@@ -271,3 +271,11 @@ + # + #isr=0 + ++# Mountpoint ++# Where the coda filesystem is mounted, many application still depend on ++# this being /coda. I am unsure whether it matters much on Windows95/98, ++# but we normally use N: for those. ++# ++#mountpoint=N: ++#mountpoint=/coda ++mountpoint=/mnt/coda +diff -Nru coda-6.9.3/coda-src/vice/server.conf.ex coda-6.9.3-gt/coda-src/vice/server.conf.ex +--- coda-6.9.3/coda-src/vice/server.conf.ex 2007-06-26 18:18:19.000000000 +0200 ++++ coda-6.9.3-gt/coda-src/vice/server.conf.ex 2008-07-12 22:54:43.185740582 +0200 +@@ -11,7 +11,7 @@ + # + # Prefix of server tree + # +-#vicedir=/vice ++vicedir=/var/lib/vice + + # + # Should the server use private mmaps for RVM diff --git a/coda/net-fs/coda/files/coda-update b/coda/net-fs/coda/files/coda-update index 9e6276f..b1fc1b6 100644 --- a/coda/net-fs/coda/files/coda-update +++ b/coda/net-fs/coda/files/coda-update @@ -1,60 +1,40 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2008 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 $ +# $Header: $ 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` + use logger + after domainname } 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 + if [[ "`cat /var/lib/vice/hostname`" == "`cat /var/lib/vice/db/scm`" ]] ; then + ebegin "Starting updatesrv" + start-stop-daemon --start --background \ + --pidfile /var/lib/vice/misc/updatesrv.pid \ + --exec /usr/sbin/updatesrv + eend $? fi - start-stop-daemon --start --quiet --exec /usr/sbin/updateclnt - + ebegin "Starting updateclnt" + start-stop-daemon --start --background \ + --pidfile /var/lib/vice/misc/updateclnt.pid \ + --exec /usr/sbin/updateclnt -- -h `cat /var/lib/vice/db/scm` 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 + ebegin "Stopping updatesrv" + start-stop-daemon --stop \ + --pidfile /var/lib/vice/misc/updatesrv.pid \ + --name updatesrv + eend $? + ebegin "Stopping updateclnt" + start-stop-daemon --stop \ + --pidfile /var/lib/vice/misc/updateclnt.pid \ + --name updateclnt eend $? } diff --git a/coda/net-fs/coda/files/codasrv b/coda/net-fs/coda/files/codasrv index 6783add..349020b 100644 --- a/coda/net-fs/coda/files/codasrv +++ b/coda/net-fs/coda/files/codasrv @@ -1,44 +1,26 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2008 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 $ +# $Header: $ 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` + use logger + after domainname } start() { - getvicedir - - checkconfig || return 1 - - ebegin "Starting codasrv" - start-stop-daemon --start --background --exec /usr/sbin/codasrv + ebegin "Starting ${SVCNAME}" + 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 + ebegin "Stopping ${SVCNAME}" + volmsg=`/usr/sbin/volutil shutdown 2>&1` || echo "${volmsg}" + start-stop-daemon --stop \ + --retry 30/TERM --oknodo \ + --exec /usr/sbin/codasrv eend $? } diff --git a/coda/net-fs/coda/files/venus b/coda/net-fs/coda/files/venus new file mode 100644 index 0000000..4b58c7d --- /dev/null +++ b/coda/net-fs/coda/files/venus @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net + after codasrv domainname +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --background \ + --pidfile /var/lib/coda/venus.cache/pid --make-pidfile \ + --exec /usr/sbin/venus + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --pidfile /var/lib/coda/venus.cache/pid \ + --name venus + eend $? + + ebegin "Unmounting /mnt/coda" + umount -l /mnt/coda + eend $? +} |