summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs/cvmfs')
-rw-r--r--net-fs/cvmfs/ChangeLog11
-rw-r--r--net-fs/cvmfs/cvmfs-2.1.10.ebuild87
-rw-r--r--net-fs/cvmfs/files/FindCARes.cmake48
-rw-r--r--net-fs/cvmfs/files/Findleveldb.cmake41
-rw-r--r--net-fs/cvmfs/files/cvmfs-2.1.10-no-config.patch11
-rw-r--r--net-fs/cvmfs/files/cvmfs-2.1.10-openrc.patch55
6 files changed, 251 insertions, 2 deletions
diff --git a/net-fs/cvmfs/ChangeLog b/net-fs/cvmfs/ChangeLog
index e11c4158d7ea..9354d53509c9 100644
--- a/net-fs/cvmfs/ChangeLog
+++ b/net-fs/cvmfs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-fs/cvmfs
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/cvmfs/ChangeLog,v 1.1 2012/10/30 14:44:26 bicatali Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/cvmfs/ChangeLog,v 1.2 2013/06/17 23:03:46 bicatali Exp $
+
+*cvmfs-2.1.10 (17 Jun 2013)
+
+ 17 Jun 2013; Sébastien Fabbro <bicatali@gentoo.org> +cvmfs-2.1.10.ebuild,
+ +files/FindCARes.cmake, +files/Findleveldb.cmake,
+ +files/cvmfs-2.1.10-no-config.patch, +files/cvmfs-2.1.10-openrc.patch:
+ Version bump, could need more testing
*cvmfs-2.0.19 (30 Oct 2012)
diff --git a/net-fs/cvmfs/cvmfs-2.1.10.ebuild b/net-fs/cvmfs/cvmfs-2.1.10.ebuild
new file mode 100644
index 000000000000..50d651492d43
--- /dev/null
+++ b/net-fs/cvmfs/cvmfs-2.1.10.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/cvmfs/cvmfs-2.1.10.ebuild,v 1.1 2013/06/17 23:03:46 bicatali Exp $
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="HTTP read-only file system for distributing software"
+HOMEPAGE="http://cernvm.cern.ch/portal/filesystem"
+SRC_URI="https://ecsft.cern.ch/dist/${PN}/${P}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+
+IUSE="+client debug doc server"
+
+CDEPEND="
+ dev-db/sqlite:3
+ dev-libs/openssl
+ net-dns/c-ares
+ net-misc/curl[adns]
+ sys-libs/zlib
+ client? (
+ dev-cpp/sparsehash
+ dev-libs/leveldb
+ sys-fs/fuse )
+ server? ( sys-libs/zlib )"
+
+RDEPEND="${CDEPEND}
+ client? ( net-fs/autofs )
+ server? ( www-servers/apache[ssl] )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen[dot] )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-config.patch
+ "${FILESDIR}"/${P}-openrc.patch
+)
+
+src_prepare() {
+ sed -i -e 's/COPYING//' CMakeLists.txt || die
+ cp "${FILESDIR}"/Find*.cmake cmake/Modules/ || die
+ rm bootstrap.sh || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCARES_BUILTIN=OFF
+ -DSQLITE3_BUILTIN=OFF
+ -DLIBCURL_BUILTIN=OFF
+ -DZLIB_BUILTIN=OFF
+ -DSPARSEHASH_BUILTIN=OFF
+ -DLEVELDB_BUILTIN=OFF
+ $(cmake-utils_use debug BUILD_SERVER_DEBUG)
+ $(cmake-utils_use server BUILD_SERVER)
+ $(cmake-utils_use client BUILD_CVMFS)
+ $(cmake-utils_use client BUILD_LIBCVMFS)
+ $(cmake-utils_use client INSTALL_MOUNT_SCRIPTS)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use doc; then
+ cd doc
+ doxygen cvmfs.doxy || die
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dohtml -r doc/html/*
+}
+
+pkg_config() {
+ if use client; then
+ einfo "Setting up CernVM-FS client"
+ cvmfs_config setup
+ einfo "Now edit ${EROOT%/}/etc/cvmfs/default.local and run"
+ einfo " ${EROOT%/}/usr/init.d/autofs restart"
+ fi
+}
diff --git a/net-fs/cvmfs/files/FindCARes.cmake b/net-fs/cvmfs/files/FindCARes.cmake
new file mode 100644
index 000000000000..1ed5b3291358
--- /dev/null
+++ b/net-fs/cvmfs/files/FindCARes.cmake
@@ -0,0 +1,48 @@
+# -*- cmake -*-
+
+# - Find c-ares
+# Find the c-ares includes and library
+# This module defines
+# CARES_INCLUDE_DIR, where to find ares.h, etc.
+# CARES_LIBRARIES, the libraries needed to use c-ares.
+# CARES_FOUND, If false, do not try to use c-ares.
+# also defined, but not for general use are
+# CARES_LIBRARY, where to find the c-ares library.
+
+FIND_PATH(CARES_INCLUDE_DIR ares.h
+/usr/local/include
+/usr/include
+)
+
+SET(CARES_NAMES ${CARES_NAMES} cares)
+FIND_LIBRARY(CARES_LIBRARY
+ NAMES ${CARES_NAMES}
+ PATHS /usr/lib /usr/local/lib
+ )
+
+IF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
+ SET(CARES_LIBRARIES ${CARES_LIBRARY})
+ SET(CARES_FOUND "YES")
+ELSE (CARES_LIBRARY AND CARES_INCLUDE_DIR)
+ SET(CARES_FOUND "NO")
+ENDIF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
+
+
+IF (CARES_FOUND)
+ IF (NOT CARES_FIND_QUIETLY)
+ MESSAGE(STATUS "Found c-ares: ${CARES_LIBRARIES}")
+ ENDIF (NOT CARES_FIND_QUIETLY)
+ELSE (CARES_FOUND)
+ IF (CARES_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find c-ares library")
+ ENDIF (CARES_FIND_REQUIRED)
+ENDIF (CARES_FOUND)
+
+# Deprecated declarations.
+SET (NATIVE_CARES_INCLUDE_PATH ${CARES_INCLUDE_DIR} )
+GET_FILENAME_COMPONENT (NATIVE_CARES_LIB_PATH ${CARES_LIBRARY} PATH)
+
+MARK_AS_ADVANCED(
+ CARES_LIBRARY
+ CARES_INCLUDE_DIR
+ )
diff --git a/net-fs/cvmfs/files/Findleveldb.cmake b/net-fs/cvmfs/files/Findleveldb.cmake
new file mode 100644
index 000000000000..755db1160f9d
--- /dev/null
+++ b/net-fs/cvmfs/files/Findleveldb.cmake
@@ -0,0 +1,41 @@
+# Try to find leveldb
+# Once done, this will define
+#
+# LEVELDB_FOUND - system has leveldb
+# LEVELDB_INCLUDE_DIR - the leveldb include directory
+# LEVELDB_LIB_DIR - the leveldb library directory
+#
+# LEVELDB_DIR may be defined as a hint for where to look
+# LEVELDB_LIBRARIES - the level db library name(s)
+
+if(LEVELDB_INCLUDE_DIR AND LEVELDB_LIBRARY)
+ set(LEVELDB_FOUND_QUIETLY TRUE)
+else(LEVELDB_INCLUDE_DIR AND LEVELDB_LIBRARY)
+ find_path(LEVELDB_INCLUDE_DIR leveldb/db.h
+ HINTS
+ ${LEVELDB_INCLUDE_DIR}
+ $ENV{LEVELDB_INCLUDE_DIR}
+ /usr
+ /usr/local
+ /opt/
+ PATH_SUFFIXES include/
+ PATHS /opt
+ )
+
+ find_library(LEVELDB_LIB leveldb
+ HINTS
+ ${LEVELDB_DIR}
+ $ENV{LEVELDB_DIR}
+ /usr
+ /usr/local
+ /opt/leveldb/
+ PATH_SUFFIXES lib
+ )
+
+
+ set(LEVELDB_LIBRARIES ${LEVELDB_LIB})
+
+ get_filename_component( LEVELDB_LIB_DIR ${LEVELDB_LIB} PATH )
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(leveldb DEFAULT_MSG LEVELDB_LIB_DIR LEVELDB_INCLUDE_DIR )
+endif(LEVELDB_INCLUDE_DIR AND LEVELDB_LIBRARY)
diff --git a/net-fs/cvmfs/files/cvmfs-2.1.10-no-config.patch b/net-fs/cvmfs/files/cvmfs-2.1.10-no-config.patch
new file mode 100644
index 000000000000..f6bbdd184673
--- /dev/null
+++ b/net-fs/cvmfs/files/cvmfs-2.1.10-no-config.patch
@@ -0,0 +1,11 @@
+--- cvmfs-2.1.10/cvmfs/tracer.cc.orig 2013-06-11 13:39:47.469323020 -0700
++++ cvmfs-2.1.10/cvmfs/tracer.cc 2013-06-11 13:40:04.361414919 -0700
+@@ -19,7 +19,7 @@
+ * down on assertion. This might be not desired behavior.
+ */
+
+-#include "config.h"
++#include "cvmfs_config.h"
+ #include "tracer.h"
+
+ #include <pthread.h>
diff --git a/net-fs/cvmfs/files/cvmfs-2.1.10-openrc.patch b/net-fs/cvmfs/files/cvmfs-2.1.10-openrc.patch
new file mode 100644
index 000000000000..eb5a3f4b08a4
--- /dev/null
+++ b/net-fs/cvmfs/files/cvmfs-2.1.10-openrc.patch
@@ -0,0 +1,55 @@
+simple patch to adapt cvmfs scripts for openrc
+bicatali@gentoo.org 06/2013
+
+--- cvmfs/cvmfs_config.orig 2013-06-17 15:42:57.011022876 -0700
++++ cvmfs/cvmfs_config 2013-06-17 15:46:22.395157110 -0700
+@@ -14,20 +14,23 @@
+ Linux )
+ if [ -x /sbin/service ]; then
+ service="/sbin/service"
+- else
++ elif [ -x /usr/sbin/service ]; then
+ # Ubuntu
+ service="/usr/sbin/service"
++ elif [ -x /sbin/rc-service ]; then
++ # OpenRC
++ service="/sbin/rc-service"
+ fi
+ if [ -x /sbin/pidof ]; then
+ pidof="/sbin/pidof"
+ else
+- # Ubuntu
++ # Ubuntu, Gentoo
+ pidof="/bin/pidof"
+ fi
+ if [ -x /sbin/fuser ]; then
+ fuser="/sbin/fuser" # RHEL
+ else
+- fuser="/bin/fuser" # Ubuntu, SuSE
++ fuser="/bin/fuser" # Ubuntu, SuSE, Gentoo
+ fi
+ if [ ! -x /usr/bin/attr ]; then
+ # Fedora
+--- cvmfs/cvmfs_server.orig 2013-06-17 15:42:51.426992247 -0700
++++ cvmfs/cvmfs_server 2013-06-17 15:44:02.092381590 -0700
+@@ -38,7 +38,7 @@
+ if which httpd2 >/dev/null 2>&1; then #SLES/OpenSuSE
+ APACHE_SERVICE="apache2"
+ APACHE_CONF=${APACHE_SERVICE}
+-elif which apache2 >/dev/null 2>&1; then # Debian based
++elif which apache2 >/dev/null 2>&1; then # Debian, Gentoo based
+ APACHE_SERVICE="apache2"
+ APACHE_CONF=${APACHE_SERVICE}
+ else
+@@ -49,8 +49,10 @@
+ # Find the service binary
+ if [ -x /sbin/service ]; then
+ SERVICE_BIN="/sbin/service"
+-else
++elif [ -x /usr/sbin/service ]; then
+ SERVICE_BIN="/usr/sbin/service" # Ubuntu
++elif [ -x /sbin/rc-service ]; then
++ SERVICE_BIN="/sbin/rc-service" # OpenRC
+ fi
+ [ -z "$SERVICE_BIN" ] && die "Could not locate 'service' utility"
+