diff options
author | George Shapovalov <george@gentoo.org> | 2009-12-11 13:41:55 +0000 |
---|---|---|
committer | George Shapovalov <george@gentoo.org> | 2009-12-11 13:41:55 +0000 |
commit | 1dbda4c86047f06b0629a945c6196a6fe76815da (patch) | |
tree | 76e3710048ee7c9f02e2770b0e0c68e2f2038aa6 | |
parent | Automated update of use.local.desc (diff) | |
download | gentoo-2-1dbda4c86047f06b0629a945c6196a6fe76815da.tar.gz gentoo-2-1dbda4c86047f06b0629a945c6196a6fe76815da.tar.bz2 gentoo-2-1dbda4c86047f06b0629a945c6196a6fe76815da.zip |
a major update. Adds FHS compliancy and fixes bugs ##144234, 193012 and 281029
(Portage version: 2.1.7.4/cvs/Linux x86_64)
-rw-r--r-- | net-fs/coda/ChangeLog | 11 | ||||
-rw-r--r-- | net-fs/coda/coda-6.9.4.ebuild | 284 | ||||
-rw-r--r-- | net-fs/coda/files/fixdeps.patch | 17 | ||||
-rw-r--r-- | net-fs/coda/files/gentoo-init.patch | 27 | ||||
-rw-r--r-- | net-fs/coda/files/scripts.tar.bz2 | bin | 0 -> 1344 bytes | |||
-rw-r--r-- | net-fs/coda/metadata.xml | 14 |
6 files changed, 351 insertions, 2 deletions
diff --git a/net-fs/coda/ChangeLog b/net-fs/coda/ChangeLog index ecd0f06cd2cb..ecaa854c9f99 100644 --- a/net-fs/coda/ChangeLog +++ b/net-fs/coda/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-fs/coda -# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.32 2008/07/12 22:31:40 chtekk Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.33 2009/12/11 13:41:55 george Exp $ + +*coda-6.9.4 (11 Dec 2009) + + 11 Dec 2009; George Shapovalov <george@gentoo.org> +coda-6.9.4.ebuild, + +files/fixdeps.patch, +files/gentoo-init.patch, +files/scripts.tar.bz2: + added new major version, heavily reworked. See bugs #193012 and #144234 + fore related info/discussions. Also fixes #281029 12 Jul 2008; Luca Longinotti <chtekk@gentoo.org> +files/6.0.15/auth2, +files/6.0.15/coda-update, +files/6.0.15/codasrv, -files/auth2, diff --git a/net-fs/coda/coda-6.9.4.ebuild b/net-fs/coda/coda-6.9.4.ebuild new file mode 100644 index 000000000000..57824650ac45 --- /dev/null +++ b/net-fs/coda/coda-6.9.4.ebuild @@ -0,0 +1,284 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.9.4.ebuild,v 1.1 2009/12/11 13:41:55 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 [[ "$(gcc-version)" > "4.3" ]]; then + ewarn + eerror "coda needs gcc < 4.4 to build cleanly" + ewarn + die "coda needs gcc < 4.4 to build cleanly" + fi + + 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 "FHS compliancy is selected!" + ewarn "There is nothing wrong with this, however this is still a special" + ewarn "modification to coda code and settings." + ewarn "If you are unsire, please add coda_layout to use flags of net-fs/coda" + ewarn "and restart the emerge." + einfo + sleep 5 + fi +} + +src_unpack() { + unpack ${A} + + cd "${S}" + tar xjpf "${FILESDIR}"/scripts.tar.bz2 + epatch "${FILESDIR}"/fixdeps.patch + epatch "${FILESDIR}"/gentoo-init.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" + + grep -rl "/usr/coda/venus.cache" "${S}"/* | xargs \ + sed -i -e "s:/usr/coda/venus.cache:/var/cache/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/fixdeps.patch b/net-fs/coda/files/fixdeps.patch new file mode 100644 index 000000000000..7c64a5c59e47 --- /dev/null +++ b/net-fs/coda/files/fixdeps.patch @@ -0,0 +1,17 @@ +diff -Nuar coda-6.9.3.old/coda-src/auth2/Makefile.am coda-6.9.3/coda-src/auth2/Makefile.am +--- coda-6.9.3.old/coda-src/auth2/Makefile.am 2007-12-17 09:20:25.000000000 -0800 ++++ coda-6.9.3/coda-src/auth2/Makefile.am 2008-07-06 14:10:10.000000000 -0700 +@@ -20,11 +20,11 @@ + if WANT_KERBEROS + if WANT_KRB4 + KRBSRC += krb4.c +-LIBKRB += $(LIBKRB4) ++LIBKRB += $(LIBKRB4) ../util/libutil.la + endif + if WANT_KRB5 + KRBSRC += krb5.c +-LIBKRB += $(LIBKRB5) ++LIBKRB += $(LIBKRB5) ../util/libutil.la + endif + KRBSRC += krbcommon.c krbcommon.h + endif diff --git a/net-fs/coda/files/gentoo-init.patch b/net-fs/coda/files/gentoo-init.patch new file mode 100644 index 000000000000..05b52081b6f3 --- /dev/null +++ b/net-fs/coda/files/gentoo-init.patch @@ -0,0 +1,27 @@ +diff -ruaN coda-6.9.3.old/coda-src/scripts/Makefile.am coda-6.9.3/coda-src/scripts/Makefile.am +--- coda-6.9.3.old/coda-src/scripts/Makefile.am 2007-12-11 12:06:17.000000000 -0800 ++++ coda-6.9.3/coda-src/scripts/Makefile.am 2008-07-06 22:44:57.000000000 -0700 +@@ -9,9 +9,7 @@ + sbin_SCRIPTS += venus-setup + dist_sbin_SCRIPTS += volmunge + dist_man_MANS += venus-setup.8 volmunge.8 +-if SYSVINIT +-init_SCRIPTS += venus.init +-endif ++init_SCRIPTS += venus + endif + if BUILD_SERVER + sbin_SCRIPTS += bldvldb.sh createvol_rep purgevol_rep startserver vice-setup \ +@@ -21,11 +19,7 @@ + vice-setup-srvdir vice-setup-user + dist_man_MANS += bldvldb.sh.8 createvol_rep.8 maxgroupid.5 purgevol_rep.8 \ + startserver.8 vice-setup.8 volumelist.5 +-if SYSVINIT +-dist_init_SCRIPTS += auth2.init codasrv.init update.init +-else +-init_SCRIPTS += rc.vice +-endif ++init_SCRIPTS += codasrv + endif + EXTRA_DIST = findparents.sh volinfo.pl volsizes.pl + CLEANFILES = $(sbin_SCRIPTS) $(init_SCRIPTS) diff --git a/net-fs/coda/files/scripts.tar.bz2 b/net-fs/coda/files/scripts.tar.bz2 Binary files differnew file mode 100644 index 000000000000..13368437f10b --- /dev/null +++ b/net-fs/coda/files/scripts.tar.bz2 diff --git a/net-fs/coda/metadata.xml b/net-fs/coda/metadata.xml index ca66751dee2f..147ae0d0efd7 100644 --- a/net-fs/coda/metadata.xml +++ b/net-fs/coda/metadata.xml @@ -2,4 +2,18 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <herd>net-fs</herd> +<use> + <flag name='client'>Build and install the client components of coda + filesystem. At least one of client or server should be enabled.</flag> + <flag name='coda_layout'>Use legacy filesystem layout instead of FHS + compliant one. Note: /coda symlink is installed unconditionally + when FHS layout is used. Therefore the /coda namespace is preserved + with either layout.</flag> + <flag name='coda_symlinks'>Install legacy symlinks when FHS layout has been + selected (-coda_layout). You should only need this if you use local + scripts or 3rd party apps relying on precise layout. Note: /coda symlink + is installed unconditionally, so the namespace is preserved in any case.</flag> + <flag name='server'>Build and install the server components of coda + filesystem. Note: at least one of client/server flags must be enabled.</flag> +</use> </pkgmetadata> |