summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorGeorge Shapovalov <george@gentoo.org>2010-05-10 22:07:08 +0000
committerGeorge Shapovalov <george@gentoo.org>2010-05-10 22:07:08 +0000
commit2f981d95bcbe1c8df3ed01c6296e2c101ea920ce (patch)
treef9e31195e2199f0abe3d603fa4e302b90410feb0 /net-fs
parentremove libpng-1.4 mask as texlive-2009 is unmasked (diff)
downloadhistorical-2f981d95bcbe1c8df3ed01c6296e2c101ea920ce.tar.gz
historical-2f981d95bcbe1c8df3ed01c6296e2c101ea920ce.tar.bz2
historical-2f981d95bcbe1c8df3ed01c6296e2c101ea920ce.zip
new version out. FHS compliance and gcc-4.4 support
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/coda/ChangeLog9
-rw-r--r--net-fs/coda/Manifest5
-rw-r--r--net-fs/coda/coda-6.9.5.ebuild289
-rw-r--r--net-fs/coda/files/vice-setup.in.patch64
4 files changed, 365 insertions, 2 deletions
diff --git a/net-fs/coda/ChangeLog b/net-fs/coda/ChangeLog
index a4acba568952..ea2ff50bf144 100644
--- a/net-fs/coda/ChangeLog
+++ b/net-fs/coda/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-fs/coda
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.34 2010/01/20 13:37:33 george Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.35 2010/05/10 22:07:06 george Exp $
+
+*coda-6.9.5 (10 May 2010)
+
+ 10 May 2010; George Shapovalov <george@gentoo.org> +coda-6.9.5.ebuild,
+ +files/vice-setup.in.patch:
+ new version out. Looks like upstream decided to transition to FHS
+ compliant paths.
20 Jan 2010; George Shapovalov <george@gentoo.org> coda-6.9.4.ebuild:
fixed omission in path substitution in server-setup scripts
diff --git a/net-fs/coda/Manifest b/net-fs/coda/Manifest
index a7b77687c1b1..80924d852926 100644
--- a/net-fs/coda/Manifest
+++ b/net-fs/coda/Manifest
@@ -6,9 +6,12 @@ AUX coda-6.0.15-mit-krb5-struct.patch 1282 RMD160 440a95a89ab8e650bc9af98807cda8
AUX fixdeps.patch 535 RMD160 8d32b43dc061abb8fe6217b93e43db39a3c4d0a4 SHA1 192becc79e916d51593f2c951041cb2211dbc753 SHA256 97f66bba4abf8b21b839bbee72b98ec987948aafd4f4e23f91b6a616e5fb81bf
AUX gentoo-init.patch 974 RMD160 c55195e237892732bb2a0b806717126aacc040c0 SHA1 848e0891d02ad5b2cddf0765b959057ee92e697e SHA256 601095a7f0cacc2a8a3600bbb9c0d2b9c9df388fdc111b7d980b0caa3c0f9669
AUX scripts.tar.bz2 1344 RMD160 5b55d1a503c2756b296be7ae5047481c1726255c SHA1 970ea990c321f1857eacb5d21dd8602b320696c0 SHA256 d1e88102507141042ddf01fccc9d716b1b84539fcbb840fc6ef755de42d6f449
+AUX vice-setup.in.patch 2137 RMD160 cb7105b318594a79af499f305b96e128a78b5c1e SHA1 0a6339020c721eb13547ce2e20a0a0326d5fbf2e SHA256 5a1eb365a9bb3d53692967ac5f86ca8bfc273928abaf6bbc2d14fa5e524f23d7
DIST coda-6.0.15.tar.gz 1573599 RMD160 b453c61a89b71482a8b690a54036c9b6ce1a9c56 SHA1 f245251654bc6859f599b26f79a4ce8799b8c6bd SHA256 aec4140a7bfec26c4991b6865e4c5672633b3bd6dac11fef1102db8ecdee8edd
DIST coda-6.9.4.tar.gz 1687157 RMD160 5b90115cf5c29d0f6f4d3271e4a81b9c72b83186 SHA1 49024ac22090f47b245d83a37fe5cc81f4d7335c SHA256 87995da7155f5f99e9ec19e8250d98b97544a9d5531d1b79d3c77557ef200285
+DIST coda-6.9.5.tar.gz 1723098 RMD160 9ef0643aacc7d1352ef253af00d4c7e6ad9e1f78 SHA1 248af27c506f5c3be4c4e53f821c9c904580fe60 SHA256 3bfcdce4eccbf389a850705fee4fb73e65a24322699894d0e076f82aac4a9443
EBUILD coda-6.0.15.ebuild 7679 RMD160 009df21988ffbd92b809f35035e4328c5f2397bd SHA1 b1b33f0619cd572427061740c3c696ef678795f7 SHA256 358c34cd92a1ed57c4a423d3cbf676733dd6884a8cec9367f234179ffc10a49b
EBUILD coda-6.9.4.ebuild 7869 RMD160 81d17d8fc96d616dd43efea7dd4cbf0ae4ac7916 SHA1 9bfa6b138ff6bd301facaee2ee1f6d0e02440910 SHA256 ca2ce6e7dc79f8863a8ff210e4ea2aae760a09ab1eb5dac302786e8ce8857919
-MISC ChangeLog 8080 RMD160 2dd942b84f1ca5f08dab6dc91bf1577a602c601c SHA1 75bf41039d10d527757901c865e7244f5530f0c8 SHA256 16c298509e41d7f11f80be7f4767cf3515ba2fbd87e4c9b1cd458051d6bc5757
+EBUILD coda-6.9.5.ebuild 8380 RMD160 5888a979c28ccc6b415d18f4e24f694bd9f31e29 SHA1 0ec83db9ffdd2e3bba7be9c2e3e71274981bc280 SHA256 00028ffd8d40bc364bf453b55d63c79cc1b332e1d5b586e8eb70417ab2470633
+MISC ChangeLog 8298 RMD160 cb6399d8f73c23913bb5e0422646733d8674ab36 SHA1 4845808205af1da10703d16bc0b57784f36fedfb SHA256 cd8c8ec32c2c0a3694ad544d37352f7fb193dc4ecbd96ad8a75b7e732fa4f704
MISC metadata.xml 1002 RMD160 53f6c1005025bb79632d28b6cfd5b31c11a820b3 SHA1 4c4b6141afccc80460ab1da7326918928ce1e6a0 SHA256 cc81b1aff5055f80c7f5fd0c478766c29c074343cc928aa46260b0fede9141d2
diff --git a/net-fs/coda/coda-6.9.5.ebuild b/net-fs/coda/coda-6.9.5.ebuild
new file mode 100644
index 000000000000..c3ae9550936e
--- /dev/null
+++ b/net-fs/coda/coda-6.9.5.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.9.5.ebuild,v 1.1 2010/05/10 22:07:06 george Exp $
+
+inherit autotools eutils toolchain-funcs
+
+IUSE="client server coda_layout coda_symlinks kerberos"
+# client : causes the coda client (venus) to be built.
+# server : causes the coda server (vice) to be built.
+# coda_layout : doesn't apply FHS compliancy patches. Use this if using any directory
+# other than /coda for the mount point makes you upset.
+# coda_symlinks : create legacy symlinks if FHS layout is used.
+
+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="~amd64 ~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.6
+ >=sys-libs/rvm-1.15
+ >=sys-libs/db-3
+ >=sys-libs/ncurses-4
+ >=sys-libs/readline-3
+ >=dev-lang/perl-5.8
+ kerberos? ( virtual/krb5 )"
+
+DEPEND="${RDEPEND}
+ sys-apps/gawk
+ sys-devel/bison
+ sys-apps/grep
+ virtual/os-headers"
+
+pkg_setup() {
+ echo
+ einfo "gcc-version = $(gcc-version)"
+ echo
+
+ if ! use client && ! use server; then
+ eerror "Neither client nor server is enabled."
+ eerror "Please enable at least one of these flags!"
+ die "at least one of client or server flags should be on!"
+ fi
+
+ if use coda_layout; then
+ einfo
+ ewarn "You selected coda (legacy) layout."
+ ewarn "Please note, that coda itself have transitioned to more FHS"
+ ewarn "compilant layout starting with version 6.9.5. Although not all"
+ ewarn "internal paths seem to have been updated."
+ ewarn "Use with care!"
+ einfo
+ ewarn "In case you are updating existing installation it is"
+ ewarn "recommended to keep old layout in conf files or perform a clean"
+ ewarn "transition - copying data externally to fresh version."
+ einfo
+ sleep 5
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ tar xjpf "${FILESDIR}"/scripts.tar.bz2
+ epatch "${FILESDIR}"/fixdeps.patch
+ epatch "${FILESDIR}"/vice-setup.in.patch
+
+ if ! use coda_layout; then
+ einfo "seding sources.."
+ # First, some common substitutions.
+ # As this is a rather critical subsystem and screwing paths can break
+ # user's data, protect all seds by die.
+ #
+ # NOTE: gentoo specific init scripts installed as a part of unpack ${A}
+ # have some paths specified inside. However these will be autoupdated by
+ # below seds for free, no need for special care.
+ #
+ # first, special cases under /usr/coda
+ # for spool, look only in subdirs, as we do not want to touch ChangeLog
+ grep -rl "/usr/coda/spool" "${S}"/*/* | xargs \
+ sed -i -e "s:/usr/coda/spool:/var/spool/coda:" \
+ || die "setting FHS compliant paths failed"
+
+ # coda/etc used to contain vstab file, which normally would reside in
+ # /etc/coda. However this file was deprecated, so no special handling..
+ # do only subdirs here too.
+ grep -rl "/usr/coda/etc" "${S}"/*/* | xargs \
+ sed -i -e "s:/usr/coda/etc:/var/log/coda:" \
+ || die "setting FHS compliant paths failed"
+
+ # stuff uder venus.cache need special care
+ # "real cache" goues under /var/cache and pid related files under
+ # /var/run
+ grep -rl "cachedir=/usr/coda/venus.cache" "${S}"/* | xargs \
+ sed -i -e "s:cachedir=/usr/coda/venus.cache:cachedir=/var/cache/coda:" \
+ || die "setting FHS compliant paths failed"
+ sed -i -e "s:DFLT_CD \"/usr/coda/venus.cache\":DFLT_CD \"/var/cache/coda\":" \
+ "${S}"/coda-src/venus/venus.private.h || die "seding venus.private.h failed"
+ grep -rl "/usr/coda/venus.cache" "${S}"/* | xargs \
+ sed -i -e "s:/usr/coda/venus.cache:/var/run/coda:" \
+ || die "setting FHS compliant paths failed"
+
+ # what's left in /usr/coda goes to /var/lib/coda
+ # NOTE: dumplits.5 man page seems unduly touched by this sed, ignoring
+ # for now..
+ grep -rl "/usr/coda" "${S}"/*/* | xargs \
+ sed -i -e "s:/usr/coda:/var/lib/coda:" \
+ || die "setting FHS compliant paths failed"
+
+ # move /coda to /mnt/coda
+ grep -rle "[[:space:]\"=]/coda" "${S}"/*/* | xargs \
+ sed -i -e "s:\([[:space:]\"=]\)/coda:\1/mnt/coda:" \
+ || die "setting FHS compliant paths failed"
+
+ # move /vice and /vicepX under /var/lib/coda/
+ grep -rle "[[:space:]\"=\[]/vice" "${S}"/*/* | xargs \
+ sed -i -e "s:\([[:space:]\"=\[]\)/vice:\1/var/lib/coda/vice:g" \
+ || die "setting FHS compliant paths failed"
+ fi
+
+ eautoreconf
+}
+
+my_build_venus_prereqs() {
+ # Coda uses a recursive make with some directories depending
+ # on objects built in other directories, so run make inside
+ # the prerequisite dirs first. This builds everything required
+ # by venus in the order listed in coda-src/Makefile.am.
+
+ cd "${S}/lib-src"
+ emake || die "emake failed"
+
+ # auth2 depends on kerndep
+ cd "${S}/coda-src/kerndep"
+ emake || die "emake failed"
+
+ # auth2 depends on util.
+ cd "${S}/coda-src/util"
+ emake || die "emake failed"
+
+ # librepair depends on vicedep
+ cd "${S}/coda-src/vicedep"
+ emake || die "emake failed"
+
+ # venus depends on dir
+ cd "${S}/coda-src/dir"
+ emake || die "emake failed"
+
+ # venus depends on al
+ cd "${S}/coda-src/al"
+ emake || die "emake failed"
+
+ # librepair depends on auth2
+ cd "${S}/coda-src/auth2"
+ emake || die "emake failed"
+
+ # venus depends on vv
+ cd "${S}/coda-src/vv"
+ emake || die "emake failed"
+
+ # venus depends on lka
+ cd "${S}/coda-src/lka"
+ emake || die "emake failed"
+
+ # venus depends on vol
+ cd "${S}/coda-src/vol"
+ emake || die "emake failed"
+
+ # venus depends on librepair
+ cd "${S}/coda-src/librepair"
+ emake || die "emake failed"
+}
+
+src_compile() {
+ local myflags=""
+
+ # Coda uses type punning in a way that violates assumptions made by -O2
+ # and friends (via -fstrict-aliasing). Disable this optimization where
+ # required.
+ local my_safe_cflags="${CFLAGS} -fno-strict-aliasing"
+ local my_safe_cxxflags="${CXXFLAGS} -fno-strict-aliasing"
+
+ # Include the server/client code.
+ use client && myflags="${myflags} --enable-client"
+ use server && myflags="${myflags} --enable-server"
+
+ # Enable kerboeros?
+ if use kerberos; then
+ myflags="${myflags} --with-crypto --with-krb5"
+ myflags="${myflags} --with-krb5-includes=/usr/include/krb5"
+ myflags="${myflags} --with-krb5-libs=/usr/lib"
+ fi
+
+ # Perform the actual configure.
+ econf ${myflags} || die "configure failed"
+
+ # Build any prerequisites for venus.
+ my_build_venus_prereqs
+
+ # Venus uses unsafe type punning, so disable
+ # some optimizations for venus.
+ pushd coda-src/venus
+ emake \
+ CFLAGS="${my_safe_cflags}" \
+ CXXFLAGS="${my_safe_cxxflags}" \
+ || die "emake failed"
+ popd
+
+ # Now run make in the source directory to finish the compile.
+ emake -j1 || die "emake failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+
+ dodoc INSTALL* README* NEWS ChangeLog AUTHORS
+
+ use server && doinitd coda-src/scripts/codasrv
+ use client && doinitd coda-src/scripts/venus
+
+ # Fix conflict with backup.sh from tar
+ mv -f "${D}"/usr/sbin/backup{,-coda}.sh
+
+ if use coda_layout; then
+ # Create coda specific layout
+ dodir /usr/coda
+ dodir /usr/coda/etc
+ dodir /usr/coda/spool
+ if use server; then
+ dodir /vice
+ dodir /vicepa
+ fi
+ if use client; then
+ dodir /coda
+ diropts -m0700
+ dodir /usr/coda/venus.cache
+ fi
+ else
+ # Create FHS compliant layout
+ dodir /var/lib/coda
+ dodir /var/log/coda
+ dodir /var/spool/coda
+
+ if use server; then
+ dodir /var/lib/coda/vice
+ dodir /var/lib/coda/vicepa
+ fi
+
+ if use client; then
+ dodir /mnt/coda
+ dosym mnt/coda /coda
+ diropts -m0700
+ dodir /var/cache/coda
+ fi
+
+ if use coda_symlinks; then
+ # Symlink traditional coda dirs to gentoo dirs.
+ # NOTE: /coda symlink is unconditional for compatibility of client apps
+ dosym ../var/lib/coda /usr/coda
+ if use server; then
+ dosym var/lib/coda/vice /vice
+ dosym var/lib/coda/vicepa /vicepa
+ fi
+ fi
+ fi
+}
+
+pkg_preinst () {
+ enewgroup codaroot
+ enewuser codaroot -1 -1 -1 codaroot
+}
+
+pkg_postinst () {
+ einfo
+ elog "To enable the coda server at boot up, please do:"
+ elog " rc-update add codasrv default"
+ elog
+ elog "To enable the coda client at boot up, do:"
+ elog " rc-update add venus default"
+ elog
+ elog "To get started, run vice-setup and/or venus-setup."
+ einfo
+}
diff --git a/net-fs/coda/files/vice-setup.in.patch b/net-fs/coda/files/vice-setup.in.patch
new file mode 100644
index 000000000000..9e5cf6ec5a88
--- /dev/null
+++ b/net-fs/coda/files/vice-setup.in.patch
@@ -0,0 +1,64 @@
+diff -ru coda-6.9.5.orig/coda-src/scripts/vice-setup.in coda-6.9.5/coda-src/scripts/vice-setup.in
+--- coda-6.9.5.orig/coda-src/scripts/vice-setup.in 2008-08-08 21:09:37.000000000 +0200
++++ coda-6.9.5/coda-src/scripts/vice-setup.in 2010-05-10 17:12:22.013409206 +0200
+@@ -345,57 +345,9 @@
+ DP=`cat ${vicedir}/db/vicetab | awk '{print $2}' | head -n 1`
+ echo "Congratulations: your configuration is ready..."
+ echo
+-
+- start=""
+- yesno=""
+- until [ "x$yesno" != x ]; do
+- echon 'Shall I try to get things started? (y/n) '
+- read yesno
+- done
+- if [ "x$yesno" = xy -o "x$yesno" = xyes -o "x$yesno" = xY ]; then
+- start=Y
+- else
+- echo "Here is what you would have to do to get things up and running"
+- fi
+-
+- set -e
+- echo " - Coda authentication server (auth2 &)"
+- [ "$start" ] && @sbindir@/auth2 &
+- echo " - Coda update server (updatesrv)"
+- [ "$start" ] && @sbindir@/updatesrv
+- echo " - Coda update client (updateclnt -h $hn)"
+- [ "$start" ] && @sbindir@/updateclnt -h $hn
+-
+- if [ $numservers = 1 ]; then
+- echo " - Coda file server (startserver)"
+- [ "$start" ] && @sbindir@/startserver
+- else
+- echo " - Coda file servers:"
+- n=1
+- while [ $n -le $numservers ]; do
+- echo " startserver -n $n"
+- [ "$start" ] && @sbindir@/startserver -n $n
+- n=`expr $n + 1`
+- done
+- fi
+- echo
+-
+- if [ "$start" ] ; then
+- echo
+- echo "Nice, it looks like everything went ok"
+- echo "Now I'll try to create an initial root volume"
+- fi
+-
+- echo " - createvol_rep / ${hn}${DP}"
+- [ "$start" ] && @sbindir@/createvol_rep / ${hn}${DP}
+-
+- if [ "$start" ] ; then
+- echo
+- 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}/"
+- fi
++ echo "To test configuration run /etc/init.d/codasrv start"
++ echo "To start coda server at boot, run rc-update add codasrv default"
++ echo "To create root volume run: createvol_rep / ${hn}${DP}"
+ echo
+ echo "enjoy Coda."
+ echo " for more information see http://www.coda.cs.cmu.edu."