diff options
-rw-r--r-- | net-fs/cvmfs/ChangeLog | 8 | ||||
-rw-r--r-- | net-fs/cvmfs/cvmfs-2.0.19.ebuild | 126 | ||||
-rw-r--r-- | net-fs/cvmfs/files/cvmfs-2.0.19-autotools.patch | 194 | ||||
-rw-r--r-- | net-fs/cvmfs/files/cvmfs-2.0.19-no-redhat-init.patch | 22 | ||||
-rw-r--r-- | net-fs/cvmfs/files/cvmfs-2.0.19-openrc.patch | 82 | ||||
-rw-r--r-- | net-fs/cvmfs/files/cvmfs-2.0.19-spinlock.patch | 15 | ||||
-rw-r--r-- | net-fs/cvmfs/files/cvmfs.initd | 195 | ||||
-rw-r--r-- | net-fs/cvmfs/files/cvmfsd.confd | 0 | ||||
-rw-r--r-- | net-fs/cvmfs/files/cvmfsd.initd | 191 |
9 files changed, 7 insertions, 826 deletions
diff --git a/net-fs/cvmfs/ChangeLog b/net-fs/cvmfs/ChangeLog index 9354d53509c9..c45fa65e524e 100644 --- a/net-fs/cvmfs/ChangeLog +++ b/net-fs/cvmfs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-fs/cvmfs # 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 $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/cvmfs/ChangeLog,v 1.3 2013/06/21 17:03:28 bicatali Exp $ + + 21 Jun 2013; Sébastien Fabbro <bicatali@gentoo.org> -cvmfs-2.0.19.ebuild, + -files/cvmfs-2.0.19-autotools.patch, -files/cvmfs-2.0.19-no-redhat-init.patch, + -files/cvmfs-2.0.19-openrc.patch, -files/cvmfs-2.0.19-spinlock.patch, + -files/cvmfs.initd, -files/cvmfsd.confd, -files/cvmfsd.initd: + Removed old, buggy init files *cvmfs-2.1.10 (17 Jun 2013) diff --git a/net-fs/cvmfs/cvmfs-2.0.19.ebuild b/net-fs/cvmfs/cvmfs-2.0.19.ebuild deleted file mode 100644 index 81fe56942afc..000000000000 --- a/net-fs/cvmfs/cvmfs-2.0.19.ebuild +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/cvmfs/cvmfs-2.0.19.ebuild,v 1.1 2012/10/30 14:44:26 bicatali Exp $ - -EAPI=4 - -inherit eutils autotools toolchain-funcs linux-mod - -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" - -KEYWORDS="~amd64 ~x86" -IUSE="+client doc openmp server" - -CDEPEND="dev-db/sqlite:3 - dev-libs/openssl - sys-libs/zlib - client? ( - dev-libs/jemalloc - net-misc/curl - sys-fs/fuse ) - server? ( >=sys-fs/redirfs-0.10.20120313 )" - -RDEPEND="${CDEPEND} - client? ( net-fs/autofs )" - -DEPEND="${CDEPEND} - virtual/pkgconfig - doc? ( app-doc/doxygen[dot] )" - -# either client or server is required and are mutually exclusive -REQUIRED_USE="^^ ( client server )" - -pkg_setup() { - if use server && use openmp && [[ $(tc-getCC) == *gcc* ]] && ! tc-has-openmp - then - ewarn "You are using a gcc without OpenMP capabilities" - die "Need an OpenMP capable compiler" - fi - if use server; then - MODULE_NAMES="cvmfsflt(misc:${S}/kernel/cvmfsflt/src)" - BUILD_PARAMS="-C ${KERNEL_DIR} M=${S}/kernel/cvmfsflt/src" - BUILD_TARGETS="cvmfsflt.ko" - linux-mod_pkg_setup - fi -} - -src_prepare() { - # "${FILESDIR}"/${P}-system-redirfs.patch \ - epatch \ - "${FILESDIR}"/${P}-autotools.patch \ - "${FILESDIR}"/${P}-no-redhat-init.patch \ - "${FILESDIR}"/${P}-spinlock.patch \ - "${FILESDIR}"/${P}-openrc.patch - eautoreconf -} - -src_configure() { - econf \ - --disable-sqlite3-builtin \ - --disable-libcurl-builtin \ - --disable-zlib-builtin \ - --disable-jemalloc-builtin \ - $(use_enable client cvmfs) \ - $(use_enable client mount-scripts) \ - $(use_enable openmp) \ - $(use_enable server) -} - -src_compile() { - emake - if use server; then - ln -s "${EROOT}"/usr/include/redirfs.h "${S}"/kernel/cvmfsflt/src - linux-mod_src_compile - fi - use doc && doxygen doc/cvmfs.doxy -} - -src_install() { - default - # NEWS file is empty - rm "${ED}"/usr/share/doc/${PF}/{INSTALL,NEWS,COPYING} - - use client && newinitd "${FILESDIR}"/${PN}.initd ${PN} - if use server; then - linux-mod_src_install - newinitd "${FILESDIR}"/${PN}d.initd ${PN}d - newconfd "${FILESDIR}"/${PN}d.confd ${PN}d - fi - use doc && dohtml -r doc/html/* -} - -pkg_preinst() { - use server && linux-mod_pkg_preinst -} - -pkg_postinst() { - use server && linux-mod_pkg_postinst -} - -pkg_postrm() { - use server && linux-mod_pkg_postrm -} - -pkg_config() { - if use client; then - einfo "Setting up CernVM-FS client" - cvmfs_config setup - cat > "${EROOT}"/etc/cvmfs/default.local <<-EOF - # Repositories to fetch example is for ATLAS - CVMFS_REPOSITORIES=atlas.cern.ch,atlas-condb.cern.ch,grid.cern.ch - # Local proxy settings, ex: http://cernvm.cern.ch/config/proxy.cgi - CVMFS_HTTP_PROXY="DIRECT" - # Where to keep the cvmfs cache - CVMFS_CACHE_BASE=${EROOT}/var/scratch/cvmfs - # Quota limit in Mb - CVMFS_QUOTA_LIMIT=10000 - EOF - einfo "Now edit ${EROOT}/etc/cvmfs/default.local and run" - einfo " ${EROOT}/usr/init.d/cvmfs restart" - fi -} diff --git a/net-fs/cvmfs/files/cvmfs-2.0.19-autotools.patch b/net-fs/cvmfs/files/cvmfs-2.0.19-autotools.patch deleted file mode 100644 index 74ba5f2c83a7..000000000000 --- a/net-fs/cvmfs/files/cvmfs-2.0.19-autotools.patch +++ /dev/null @@ -1,194 +0,0 @@ -Patch for various autotools fixes: -* cleaner enable/disable functions -* allow to build against system jemalloc -* adapated to newer autoconf with standard macros -* use LDADD instead of LDFLAGS to respect user's flags - -bicatali@gentoo.org 07/2012 - -diff -Nur cvmfs-2.0.19.orig/configure.ac cvmfs-2.0.19/configure.ac ---- cvmfs-2.0.19.orig/configure.ac 2012-07-24 17:54:17.000000000 +0100 -+++ cvmfs-2.0.19/configure.ac 2012-10-30 11:00:26.000000000 +0000 -@@ -9,20 +9,22 @@ - AC_CONFIG_HEADER([config.h]) - AH_BOTTOM([#define CVMFS_PATCH_LEVEL "0"]) - --AC_ARG_ENABLE([cvmfs], AC_HELP_STRING([--disable-cvmfs], [Don't build the CernVM-FS FUSE module]), AC_SUBST([HAVE_CVMFS], [no])) --AC_ARG_ENABLE([server], AC_HELP_STRING([--disable-server], [Don't build writer's end programs]), AC_SUBST([HAVE_SERVER], [no])) --AC_ARG_ENABLE([sqlite3-builtin], AC_HELP_STRING([--enable-sqlite3-builtin], [Don't use system SQLite3]), AC_SUBST([USE_BUILTIN_SQLITE3], [yes])) --AC_ARG_ENABLE([libcurl-builtin], AC_HELP_STRING([--enable-libcurl-builtin], [Don't use system libcurl]), AC_SUBST([USE_BUILTIN_LIBCURL], [yes])) -+AC_ARG_ENABLE([cvmfs], AC_HELP_STRING([--disable-cvmfs], [Don't build the CernVM-FS FUSE module]), AC_SUBST([HAVE_CVMFS], [$enableval]),AC_SUBST([HAVE_CVMFS], [yes])) -+AC_ARG_ENABLE([server], AC_HELP_STRING([--disable-server], [Don't build writer's end programs]), AC_SUBST([HAVE_SERVER], [$enableval]),AC_SUBST([HAVE_SERVER], [yes])) -+AC_ARG_ENABLE([sqlite3-builtin], AC_HELP_STRING([--enable-sqlite3-builtin], [Don't use system SQLite3]), AC_SUBST([USE_BUILTIN_SQLITE3], [$enableval]),AC_SUBST([USE_BUILTIN_SQLITE3], [no])) -+AC_ARG_ENABLE([libcurl-builtin], AC_HELP_STRING([--enable-libcurl-builtin], [Don't use system libcurl]), AC_SUBST([USE_BUILTIN_LIBCURL], [$enableval]),AC_SUBST([USE_BUILTIN_LIBCURL], [no])) - dnl AC_ARG_ENABLE([libfuse-builtin], AC_HELP_STRING([--enable-libfuse-builtin], [Don't use system libfuse]), AC_SUBST([USE_BUILTIN_LIBFUSE], [yes])) --AC_ARG_ENABLE([zlib-builtin], AC_HELP_STRING([--enable-zlib-builtin], [Don't use system]), AC_SUBST([USE_BUILTIN_ZLIB], [yes])) --AC_ARG_ENABLE([kernel-module], AC_HELP_STRING([--enable-kernel-module], [Build the kernel module for the server part]), AC_SUBST([HAVE_KMODULE], [yes])) --AC_ARG_ENABLE([mount-scripts], AC_HELP_STRING([--enable-mount-scripts], [Install CernVM-FS mount tools in /etc and /sbin]), AC_SUBST([HAVE_MOUNTSCRIPTS], [yes])) -+AC_ARG_ENABLE([zlib-builtin], AC_HELP_STRING([--enable-zlib-builtin], [Don't use system]), AC_SUBST([USE_BUILTIN_ZLIB], [$enableval]),AC_SUBST([USE_BUILTIN_ZLIB], [no])) -+AC_ARG_ENABLE([jemalloc-builtin], AC_HELP_STRING([--enable-jemalloc-builtin], [Don't use system jemalloc]), AC_SUBST([USE_BUILTIN_JEMALLOC], [$enableval]),AC_SUBST([USE_BUILTIN_JEMALLOC], [no])) -+AC_ARG_ENABLE([kernel-module], AC_HELP_STRING([--enable-kernel-module], [Build the kernel module for the server part]), AC_SUBST([HAVE_KMODULE], [$enableval]),AC_SUBST([HAVE_KMODULE], [no])) -+AC_ARG_ENABLE([mount-scripts], AC_HELP_STRING([--enable-mount-scripts], [Install CernVM-FS mount tools in /etc and /sbin]), AC_SUBST([HAVE_MOUNTSCRIPTS], [$enableval]),AC_SUBST([HAVE_MOUNTSCRIPTS], [no])) - AM_CONDITIONAL([BUILD_CVMFS], [test x$HAVE_CVMFS != xno]) - AM_CONDITIONAL([BUILD_SERVER], [test x$HAVE_SERVER != xno]) - AM_CONDITIONAL([SYSTEM_SQLITE3], [test x$USE_BUILTIN_SQLITE3 != xyes]) - AM_CONDITIONAL([SYSTEM_LIBCURL], [test x$USE_BUILTIN_LIBCURL != xyes]) - AM_CONDITIONAL([SYSTEM_LIBFUSE], [test x != x]) - AM_CONDITIONAL([SYSTEM_ZLIB], [test x$USE_BUILTIN_ZLIB != xyes]) -+AM_CONDITIONAL([SYSTEM_JEMALLOC], [test x$USE_BUILTIN_JEMALLOC != xyes]) - AM_CONDITIONAL([BUILD_KMODULE], [test x$HAVE_KMODULE == xyes]) - AM_CONDITIONAL([BUILD_MEMCACHED], [test x$HAVE_MEMCACHED == xyes]) - AM_CONDITIONAL([BUILD_MOUNTSCRIPTS], [test x$HAVE_MOUNTSCRIPTS == xyes]) -@@ -35,6 +37,7 @@ - dnl AC_PROG_LIBTOOL - AC_PROG_MAKE_SET - AC_PROG_RANLIB -+m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) - - CXXFLAGS="$CXXFLAGS -g -fno-exceptions -fno-strict-aliasing -fasynchronous-unwind-tables -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall \ - -D_REENTRANT -D__EXTENSIONS__ -D_LARGEFILE64_SOURCE -D__LARGE64_FILES" -@@ -70,7 +73,7 @@ - PKG_CHECK_MODULES([OPENSSL], [libcrypto >= 0.9.7a]) - - dnl Get OpenMP Options --gt_OPENMP() -+AC_OPENMP - - dnl Checks for libraries. - save_LIBS=$LIBS -@@ -86,6 +89,10 @@ - - AC_CHECK_LIB([rt], [sched_yield], ,[AC_MSG_ERROR(librt (Posix real time extensions) required)]) - -+if test x$USE_BUILTIN_JEMALLOC != xyes; then -+ AC_CHECK_LIB([jemalloc], [malloc], ,[AC_MSG_ERROR(jemalloc required)]) -+fi -+ - if test x$HAVE_CVMFS != xno; then - dnl if test x$USE_BUILTIN_LIBFUSE != xyes; then - dnl AC_CHECK_HEADERS([fuse.h fuse/fuse_opt.h],,[AC_MSG_ERROR(fuse headers required)],[#define _FILE_OFFSET_BITS 64]) -diff -Nur cvmfs-2.0.19.orig/cvmfs/src/Makefile.am cvmfs-2.0.19/cvmfs/src/Makefile.am ---- cvmfs-2.0.19.orig/cvmfs/src/Makefile.am 2012-07-25 08:17:28.000000000 +0100 -+++ cvmfs-2.0.19/cvmfs/src/Makefile.am 2012-10-30 11:08:44.000000000 +0000 -@@ -224,6 +224,11 @@ - cvmfs_proxy_rtt_LDADD += $(LDFLAGS_ZLIB) - endif - -+if ! SYSTEM_JEMALLOC -+LDFLAGS_JEMALLOC = ../../jemalloc/src/lib/libjemalloc.a -+cvmfs2_debug_LDADD += $(LDFLAGS_JEMALLOC) -+cvmfs2_LDADD += $(LDFLAGS_JEMALLOC) -+endif - - CFLAGS_CVMFS2 = - if ! SYSTEM_SQLITE3 -@@ -238,8 +243,8 @@ - if ! SYSTEM_ZLIB - CFLAGS_CVMFS2 += -I../../zlib/src - endif --cvmfs2_debug_LDADD += ../../jemalloc/src/lib/libjemalloc.a -ldl --cvmfs2_LDADD += ../../jemalloc/src/lib/libjemalloc.a -ldl -+ -+ - CFLAGS_CVMFS2 += $(PTHREAD_CFLAGS) $(CURL_CFLAGS) $(SQLITE_CFLAGS) $(OPENSSL_CFLAGS) $(FUSE_CFLAGS) -DCVMFS_CLIENT -DFUSE_CLIENT - LDFLAGS_CVMFS2 = $(PTHREAD_CFLAGS) -rdynamic - LIBS_CVMFS2 = $(PTHREAD_LIBS) $(CURL_LIBS) $(SQLITE_LIBS) $(FUSE_LIBS) $(Z_LIBS) $(OPENSSL_LIBS) $(CVMFS_LIBS) -lrt -@@ -291,11 +296,11 @@ - endif - CFLAGS_PROXYRTT += $(CURL_CFLAGS) -DCVMFS_CLIENT -DNDEBUGMSG - cvmfs_proxy_rtt_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_PROXYRTT) --cvmfs_proxy_rtt_LDFLAGS = $(CVMFS_LIBS) $(CURL_LIBS) -+cvmfs_proxy_rtt_LDADD += $(CVMFS_LIBS) $(CURL_LIBS) - - - testtracer_CXXFLAGS = $(CVMFS_CXXFLAGS) $(PTHREAD_CFLAGS) --testtracer_LDFLAGS = $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) -+testtracer_LDADD += $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) - - CFLAGS_SYNC = - if ! SYSTEM_SQLITE3 -@@ -307,7 +312,7 @@ - CFLAGS_SYNC += $(PTHREAD_CFLAGS) $(OPENMP_CFLAGS) $(SQLITE_CFLAGS) $(OPENSSL_CFLAGS) -DNDEBUGMSG - cvmfs_sync_bin_CXXFLAGS = $(CVMFS_CXXFLAGS) $(CFLAGS_SYNC) - cvmfs_sync_bin_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_SYNC) --cvmfs_sync_bin_LDFLAGS = $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SQLITE_LIBS) $(OPENSSL_LIBS) $(Z_LIBS) $(GOMP_LIBS) -+cvmfs_sync_bin_LDADD += $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SQLITE_LIBS) $(OPENSSL_LIBS) $(Z_LIBS) $(GOMP_LIBS) - - - CFLAGS_CLGCMP = -@@ -320,7 +325,7 @@ - CFLAGS_CLGCMP += $(SQLITE_CFLAGS) $(PTHREAD_CFLAGS) $(OPENSSL_CFLAGS) -DNDEBUGMSG - cvmfs_clgcmp_CXXFLAGS = $(CVMFS_CXXFLAGS) $(CFLAGS_CLGCMP) - cvmfs_clgcmp_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_CLGCMP) --cvmfs_clgcmp_LDFLAGS = $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(OPENSSL_LIBS) $(SQLITE_LIBS) $(Z_LIBS) -+cvmfs_clgcmp_LDADD += $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(OPENSSL_LIBS) $(SQLITE_LIBS) $(Z_LIBS) - - - CFLAGS_LSCAT = -@@ -333,7 +338,7 @@ - CFLAGS_LSCAT += $(SQLITE_CFLAGS) $(PTHREAD_CFLAGS) $(OPENSSL_CFLAGS) -DNDEBUGMSG - cvmfs_lscat_CXXFLAGS = $(CVMFS_CXXFLAGS) $(CFLAGS_LSCAT) - cvmfs_lscat_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_LSCAT) --cvmfs_lscat_LDFLAGS = $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(OPENSSL_LIBS) $(SQLITE_LIBS) $(Z_LIBS) -+cvmfs_lscat_LDADD += $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(OPENSSL_LIBS) $(SQLITE_LIBS) $(Z_LIBS) - - CFLAGS_FIXINODES = - if ! SYSTEM_SQLITE3 -@@ -345,7 +350,7 @@ - CFLAGS_FIXINODES += $(SQLITE_CFLAGS) $(PTHREAD_CFLAGS) $(OPENSSL_CFLAGS) -DNDEBUGMSG - cvmfs_fixinodes_CXXFLAGS = $(CVMFS_CXXFLAGS) $(CFLAGS_FIXINODES) - cvmfs_fixinodes_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_FIXINODES) --cvmfs_fixinodes_LDFLAGS = $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(OPENSSL_LIBS) $(SQLITE_LIBS) $(Z_LIBS) -+cvmfs_fixinodes_LDADD += $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(OPENSSL_LIBS) $(SQLITE_LIBS) $(Z_LIBS) - - CFLAGS_SIGN = - if ! SYSTEM_ZLIB -@@ -354,7 +359,7 @@ - CFLAGS_SIGN += $(SQLITE_CFLAGS) $(PTHREAD_CFLAGS) $(OPENSSL_CFLAGS) -DNDEBUGMSG - cvmfs_sign_CXXFLAGS = $(CVMFS_CXXFLAGS) $(CFLAGS_SIGN) - cvmfs_sign_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_SIGN) --cvmfs_sign_LDFLAGS = $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SQLITE_LIBS) $(Z_LIBS) $(OPENSSL_LIBS) -+cvmfs_sign_LDADD += $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SQLITE_LIBS) $(Z_LIBS) $(OPENSSL_LIBS) - - CFLAGS_PULL = - if ! SYSTEM_SQLITE3 -@@ -369,13 +374,13 @@ - CFLAGS_PULL += $(SQLITE_CFLAGS) $(PTHREAD_CFLAGS) $(OPENSSL_CFLAGS) -DNDEBUGMSG - cvmfs_pull_CXXFLAGS = $(CVMFS_CXXFLAGS) $(CFLAGS_PULL) - cvmfs_pull_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_PULL) --cvmfs_pull_LDFLAGS = $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(OPENSSL_LIBS) $(SQLITE_LIBS) $(Z_LIBS) -+cvmfs_pull_LDADD += $(CVMFS_LIBS) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(OPENSSL_LIBS) $(SQLITE_LIBS) $(Z_LIBS) $(CURL_LIBS) - - - CFLAGS_SCRUB = $(OPENSSL_CFLAGS) -DNDEBUGMSG - cvmfs_scrub_CXXFLAGS = $(CVMFS_CXXFLAGS) $(CFLAGS_SCRUB) - cvmfs_scrub_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_SCRUB) --cvmfs_scrub_LDFLAGS = $(CVMFS_LIBS) $(OPENSSL_LIBS) -+cvmfs_scrub_LDADD += $(CVMFS_LIBS) $(OPENSSL_LIBS) - - - CFLAGS_ZPIPE = -@@ -383,4 +388,4 @@ - CFLAGS_ZPIPE += -I../../zlib/src - endif - cvmfs_zpipe_CFLAGS = $(CVMFS_CFLAGS) $(CFLAGS_ZPIPE) --cvmfs_zpipe_LDFLAGS = $(CVMFS_LIBS) $(Z_LIBS) -+cvmfs_zpipe_LDADD += $(CVMFS_LIBS) $(Z_LIBS) -diff -Nur cvmfs-2.0.19.orig/Makefile.am cvmfs-2.0.19/Makefile.am ---- cvmfs-2.0.19.orig/Makefile.am 2012-02-07 17:04:54.000000000 +0000 -+++ cvmfs-2.0.19/Makefile.am 2012-10-30 11:00:26.000000000 +0000 -@@ -10,10 +10,13 @@ - if ! SYSTEM_ZLIB - SUBDIR_ZLIB = zlib - endif -+if ! SYSTEM_JEMALLOC -+ SUBDIR_JEMALLOC = jemalloc -+endif - if BUILD_KMODULE - SUBDIR_KMODULE = kernel - endif --SUBDIRS = $(SUBDIR_KMODULE) $(SUBDIR_SQLITE3) $(SUBDIR_ZLIB) $(SUBDIR_LIBCURL) $(SUBDIR_LIBFUSE) jemalloc cvmfs cvmfsd mount replica -+SUBDIRS = $(SUBDIR_KMODULE) $(SUBDIR_SQLITE3) $(SUBDIR_ZLIB) $(SUBDIR_LIBCURL) $(SUBDIR_LIBFUSE) $(SUBDIR_JEMALLOC) cvmfs cvmfsd mount replica - EXTRA_DIST = sign-whitelist add-ons rpm doc c-ares libcurl libfuse kernel jemalloc zlib mount replica - docdir = ${datadir}/doc/${PACKAGE}-${VERSION} - dist_doc_DATA = NEWS README ChangeLog AUTHORS INSTALL COPYING FAQ diff --git a/net-fs/cvmfs/files/cvmfs-2.0.19-no-redhat-init.patch b/net-fs/cvmfs/files/cvmfs-2.0.19-no-redhat-init.patch deleted file mode 100644 index 12593f78e603..000000000000 --- a/net-fs/cvmfs/files/cvmfs-2.0.19-no-redhat-init.patch +++ /dev/null @@ -1,22 +0,0 @@ -* Avoid forcing install of fedora/redhat init scripts -* Add a more general init script to adapt other distributions - -bicatali@gentoo.org 07/2012 - ---- cvmfs-2.0.19.orig/mount/Makefile.am -+++ cvmfs-2.0.19/mount/Makefile.am -@@ -2,14 +2,12 @@ - install-exec-hook: - test -z "$(DESTDIR)/etc" || mkdir -p "$(DESTDIR)/etc" - test -z "$(DESTDIR)/sbin" || mkdir -p "$(DESTDIR)/sbin" -- test -z "$(DESTDIR)/etc/rc.d/init.d" || mkdir -p "$(DESTDIR)/etc/rc.d/init.d" - test -z "$(DESTDIR)/etc/cvmfs" || mkdir -p "$(DESTDIR)/etc/cvmfs" - test -z "$(DESTDIR)/etc/cvmfs/config.d" || mkdir -p "$(DESTDIR)/etc/cvmfs/config.d" - test -z "$(DESTDIR)/etc/cvmfs/domain.d" || mkdir -p "$(DESTDIR)/etc/cvmfs/domain.d" - test -z "$(DESTDIR)/etc/cvmfs/keys" || mkdir -p "$(DESTDIR)/etc/cvmfs/keys" - install -c auto.cvmfs "$(DESTDIR)/etc/auto.cvmfs" - install -c mount.cvmfs "$(DESTDIR)/sbin/mount.cvmfs" -- install -c cvmfs.initd "$(DESTDIR)/etc/rc.d/init.d/cvmfs" - install -c -m 0644 config.sh "$(DESTDIR)/etc/cvmfs/config.sh" - install -c -m 0644 default.conf "$(DESTDIR)/etc/cvmfs/default.conf" - install -c -m 0644 domain.d/cern.ch.conf "$(DESTDIR)/etc/cvmfs/domain.d/cern.ch.conf" diff --git a/net-fs/cvmfs/files/cvmfs-2.0.19-openrc.patch b/net-fs/cvmfs/files/cvmfs-2.0.19-openrc.patch deleted file mode 100644 index a2abd87cd839..000000000000 --- a/net-fs/cvmfs/files/cvmfs-2.0.19-openrc.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -Nur cvmfs-2.0.19.orig/cvmfs/src/cvmfs_config cvmfs-2.0.19/cvmfs/src/cvmfs_config ---- cvmfs-2.0.19.orig/cvmfs/src/cvmfs_config 2012-05-05 15:16:19.000000000 +0100 -+++ cvmfs-2.0.19/cvmfs/src/cvmfs_config 2012-07-23 23:16:06.000000000 +0100 -@@ -16,9 +16,15 @@ - - if [ -x /sbin/service ]; then - service="/sbin/service" --else -+ chkconfig="/sbin/chkconfig" -+elif [ -x /usr/sbin/service ]; then - # Ubuntu - service="/usr/sbin/service" -+ chkconfig="/usr/sbin/chkconfig" -+elif [ -x /sbin/rc-service ]; then -+ # OpenRC -+ service="/sbin/rc-service" -+ chkconfig="/usr/bin/rc-config" - fi - - var_list="CVMFS_USER CVMFS_NFILES CVMFS_CACHE_BASE CVMFS_MOUNT_DIR CVMFS_QUOTA_LIMIT \ -@@ -116,9 +122,9 @@ - fi - - if [ $noservice -eq 0 ]; then -- /sbin/chkconfig --list cvmfs > /dev/null 2>&1 -+ $chkconfig --list cvmfs > /dev/null 2>&1 - if [ $? -ne 0 ]; then -- /sbin/chkconfig --add cvmfs -+ $chkconfig --add cvmfs - fi - fi - -@@ -580,8 +586,8 @@ - for cmd in 'uname -a' 'cat /etc/issue' 'hostname -f' 'ifconfig -a' 'cvmfs2 --version' \ - 'grep cvmfs2 /var/log/messages' 'grep cvmfs2 /var/log/syslog' \ - "eval find ${CVMFS_CACHE_BASE} -maxdepth 1 -exec ls -lah \{\} \;" \ -- 'service cvmfs probe' 'mount' 'df -h' 'ps -ef' \ -- 'service cvmfs status' 'cvmfs_config showconfig' \ -+ "${service}\ cvmfs\ probe" 'mount' 'df -h' 'ps -ef' \ -+ "${service}\ cvmfs\ status" 'cvmfs_config showconfig' \ - 'cvmfs_config chksetup' 'cvmfs_config stat -v' \ - 'cat /etc/fuse.conf' 'ls -la /usr/bin/fusermount' 'ls -la /bin/fusermount' \ - 'cat /etc/auto.master' 'cat /etc/sysconfig/autofs' 'cat /etc/fstab' -diff -Nur cvmfs-2.0.19.orig/cvmfs/src/cvmfs_server cvmfs-2.0.19/cvmfs/src/cvmfs_server ---- cvmfs-2.0.19.orig/cvmfs/src/cvmfs_server 2011-11-30 11:26:55.000000000 +0000 -+++ cvmfs-2.0.19/cvmfs/src/cvmfs_server 2012-07-23 23:31:32.000000000 +0100 -@@ -1,5 +1,13 @@ - #!/bin/bash - -+service=$(type -P service) -+chconfig=$(type -P chkconfig) -+if [ -n ${service} ]; then -+ # OpenRC -+ service="rc-service" -+ chkconfig="echo > /dev/null" -+fi -+ - create_master_key() { - local name; name=$1 - master_key="/etc/cvmfs/keys/$name.masterkey" -@@ -161,8 +169,8 @@ - create_whitelist $name - - echo -n "Starting services... " -- service cvmfsd start > /dev/null -- chkconfig cvmfsd on -+ $service cvmfsd start > /dev/null -+ $chkconfig cvmfsd on - echo "New CernVM-FS repository for $name" > /cvmfs/${name}/empty - usermod -s /bin/bash cvmfs - publish $name > /dev/null -@@ -182,8 +190,8 @@ - - echo -n "Stopping services... " - usermod -s /sbin/nologin cvmfs -- service cvmfsd stop > /dev/null -- chkconfig cvmfsd off -+ $service cvmfsd stop > /dev/null -+ $chkconfig cvmfsd off - echo "done" - - echo -n "Unmounting CernVM-FS Area... " diff --git a/net-fs/cvmfs/files/cvmfs-2.0.19-spinlock.patch b/net-fs/cvmfs/files/cvmfs-2.0.19-spinlock.patch deleted file mode 100644 index b3a6bbce3eeb..000000000000 --- a/net-fs/cvmfs/files/cvmfs-2.0.19-spinlock.patch +++ /dev/null @@ -1,15 +0,0 @@ -Use macro since SPIN_LOCK_UNLOCKED has been obsolete in kernel since 2007 - -bicatali@gentoo.org 07/2012 - ---- cvmfs-2.0.19.orig/kernel/cvmfsflt/src/cvmfsflt_data.c -+++ cvmfs-2.0.19/kernel/cvmfsflt/src/cvmfsflt_data.c -@@ -5,7 +5,7 @@ - int rbuf_head, rbuf_tail; /* Current positions in ring buffer */ - struct semaphore rbuf_full, rbuf_empty; /* semaphores for producer-consumer synchronization */ - struct cvmfsflt_logline *ll_current = NULL; --static spinlock_t rbuf_wlock = SPIN_LOCK_UNLOCKED; -+DEFINE_SPINLOCK(rbuf_wlock); - atomic_t cvmfsflt_noll = ATOMIC_INIT(0); /* number of loglines in the ring buffer */ - - diff --git a/net-fs/cvmfs/files/cvmfs.initd b/net-fs/cvmfs/files/cvmfs.initd deleted file mode 100644 index 75f45b7f1558..000000000000 --- a/net-fs/cvmfs/files/cvmfs.initd +++ /dev/null @@ -1,195 +0,0 @@ -#!/sbin/runscript - -extra_commands="probe status" -extra_started_commands="reload flush restart_clean" -description="The CernVM-FS init script" - -init() { - # Initialization, read config - [ -x /etc/cernvm/config ] && /etc/cernvm/config - if [ -f /etc/cvmfs/config.sh ]; then - . /etc/cvmfs/config.sh - else - exit 1 - fi - - cvmfs_readconfig - [ -f /etc/cernvm/repositories.sh ] && . /etc/cernvm/repositories.sh - export LANG=C LC_ALL=C - [ -f /etc/cernvm/custom/init.sh ] && . /etc/cernvm/custom/init.sh -} - -depend() { - need net fuse autofs - after logger -} - -list_mounts() { - mount -t fuse | grep "^cvmfs2[[:space:]]" -} - -repository_status() { - local fqrn=$1 ret=0 pid - if list_mounts | grep ${CVMFS_MOUNT_DIR}/${fqrn} > /dev/null; then - pid=$(cvmfs-talk -c "${CVMFS_CACHE_BASE}" -i "${fqrn}" pid) - ret=$(echo ${pid} | grep ^[0-9]*$ > /dev/null) - if [ ${ret} -eq 0 ]; then - einfo "CernVM-FS mounted on ${CVMFS_MOUNT_DIR}/${fqrn} with pid ${pid}" - else - ewarn "CernVM-FS running with process ${pid}" - fi - else - einfo "CernVM-FS not mounted on ${CVMFS_MOUNT_DIR}/${fqrn}" - fi - return ${ret} -} - -repository_flush() { - local fqrn=$1 - ebegin "Flushing ${fqrn}" - stat ${CVMFS_MOUNT_DIR}/${fqrn}/. > /dev/null 2>&1 && \ - cvmfs-talk -c "${CVMFS_CACHE_BASE}" -i "${fqrn}" cleanup 0 > /dev/null - eend $? -} - -repository_reload() { - local fqrn=$1 ret=0 hosts - if cvmfs-talk -i ${fqrn} pid > /dev/null 2>&1; then - ebegin "Reloading ${fqrn}" - [[ $(cvmfs-talk -i ${fqrn} timeout set ${CVMFS_TIMEOUT} ${CVMFS_TIMEOUT_DIRECT} 2>&1) == OK ]] - ret=$((ret + $?)) - [[ $(cvmfs-talk -i ${fqrn} proxy set ${CVMFS_HTTP_PROXY} 2>&1) == OK ]] - ret=$((ret + $?)) - hosts=$(echo ${CVMFS_SERVER_URL} | sed -e "s/@org@/$(cvmfs_getorg ${fqrn})/g" -e "s/@fqrn@/${fqrn}/g") - [[ $(cvmfs-talk -i ${fqrn} host set ${hosts} 2>&1) == OK ]] - ret=$((ret + $?)) - [[ $(cvmfs-talk -i ${fqrn} max ttl set ${CVMFS_MAX_TTL:-0} 2>&1) == OK ]] - eend $? - ret=$((ret + $?)) - else - einfo "${frqn} not mounted" - fi - return ${ret} -} - -repository_wipe() { - local fqrn=$1 - ebegin "Wiping out ${CVMFS_CACHE_BASE}/${fqrn}" - [ ! -d "${CVMFS_CACHE_BASE}/${fqrn}" ] || rm -rf "${CVMFS_CACHE_BASE}/${fqrn}" - eend $? -} - -repository_probe() { - local fqrn=$1 - ebegin "Probing ${CVMFS_MOUNT_DIR}/${fqrn}" - df -P "${CVMFS_MOUNT_DIR}/${fqrn}" 2>&1 | grep -q ^cvmfs2 - eend $? -} - -cvmfs_action() { - local action=$1 org fqrn - for org in ${CVMFS_REPOSITORIES/,/ /}; do - case ${org} in - none) - ;; - *) - . /etc/cvmfs/config.sh - cvmfs_readconfig - fqrn=$(cvmfs_mkfqrn ${org}) - cvmfs_readconfig ${fqrn} - [[ $(type -t "${action}") == "function" ]] && ${action} ${fqrn} - ;; - esac - done -} - -start() { - ebegin "Starting CernVM-FS" - cvmfs_action repository_start - eend $? -} - -stop() { - local m ret=0 - # FIXME: do we need to unmount here or? - for m in $(list_mounts | awk '{print $3}'); do - ebegin "Unmounting ${m}" - umount ${m} 2>/dev/null - eend $? - if [ $? -ne 0 ]; then - ret=$((ret + $?)) - fuser -m -a -v ${m} - fi - done - if [ ${ret} -eq 0 ]; then - ebegin "Shutting down CernVM-FS" - cvmfs_action repository_stop - eend $? - ret=$((ret + $?)) - fi - return ${ret} -} - -status() { - ebegin "Checking status on CernVM-FS" - cvmfs_action repository_status - - local org processed repo ret=0 - - for org in ${CVMFS_REPOSITORIES/,/ /}; do - case ${org} in - none) - ;; - *) - . /etc/cvmfs/config.sh # start with fresh repository_... functions - cvmfs_readconfig - fqrn=$(cvmfs_mkfqrn ${org}) - processed="${fqrn} ${processed}" - cvmfs_readconfig ${fqrn} - - # in an action? - list_mounts | grep ${CVMFS_MOUNT_DIR}/${fqrn} > /dev/null - if [ $? -eq 0 ]; then - local pid=$(/usr/bin/cvmfs-talk -c "${CVMFS_CACHE_BASE}" -i "${fqrn}" pid) - if echo ${pid} | grep ^[0-9]*$ > /dev/null; then - einfo "CernVM-FS mounted on ${CVMFS_MOUNT_DIR}/${fqrn} with pid ${pid}" - else - ret=$((ret + $?)) - ewarn "CernVM-FS running with process ${pid}" - fi - else - einfo "CernVM-FS not mounted on ${CVMFS_MOUNT_DIR}/${fqrn}" - fi - ;; - esac - done - - for repo in $(list_mounts | awk '{print $3}'); do - repo=$(basename "${repo}") - echo "${processed}" | grep -q "${repo}" || \ - ewarn "CernVM-FS mounted on ${CVMFS_MOUNT_DIR}/${repo} (not in CVMFS_REPOSITORIES)" - done - eend ${ret} -} - -flush() { - cvmfs_action repository_flush -} - -reload() { - cvmfs_action repository_reload -} - -restart_clean() { - stop - local ret=$? - cvmfs_action repository_wipe - ret=$((ret + $?)) - [[ ${ret} == 0 ]] && start - ret=$((ret + $?)) - return ${ret} -} - -probe() { - cvmfs_action repository_probe -} diff --git a/net-fs/cvmfs/files/cvmfsd.confd b/net-fs/cvmfs/files/cvmfsd.confd deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/net-fs/cvmfs/files/cvmfsd.confd +++ /dev/null diff --git a/net-fs/cvmfs/files/cvmfsd.initd b/net-fs/cvmfs/files/cvmfsd.initd deleted file mode 100644 index bc0c604dd95d..000000000000 --- a/net-fs/cvmfs/files/cvmfsd.initd +++ /dev/null @@ -1,191 +0,0 @@ -#!/sbin/runscript - -. /etc/cvmfs/server.conf -[[ -f /etc/cvmfs/server.local ]] && . /etc/cvmfs/server.local - -extra_commands="checkconfig" -extra_started_commands="pause flush resume" - -description="Background daemon that writes the cvmfs character device into a log file" -description_checkconfig="Check configuration file validity" -description_pause="Pause the transactions (not a full stop)" -description_flush="Flush the CernVM-FS change log" -description_resume="Resume transactions after a pause" - -pidfile="/var/run/cvmfsd.pid" -subsysfile="/var/lock/subsys/cvmfsd" - -checkconfig() { - local var ret=0 - for var in SHADOW_DIR PUB_DIR LOG_FILE; do - eval value=\$$var - if [[ -z ${value} ]]; then - eerror "You need to set a value for ${var} in /etc/cvmfs/server.local" - ret=$((ret + $?)) - fi - done - return ${ret} -} - -depend() { - after localmount - use net -} - -# returns: 0 (stopped), 1 (running), 2 (paused) -check_status() { - if [ -f ${pidfile} ]; then - [ $(cat /sys/fs/redirfs/filters/cvmfsflt/lockdown) -eq 1 ] && return 2 - return 1 - fi - return 0 -} - -# FIXME: could we use start-stop-daemon instead of listen/unlisten? - -listen() { - ebegin "Starting journal writer" - nohup cat /dev/cvmfs >> "${LOG_FILE}" 2>/dev/null </dev/null & - [ $? -eq 0 ] && echo $! > ${pidfile} - eend $? -} - -unlisten() { - ebegin "Stopping journal writer" - local pid=$(cat ${pidfile}) - kill ${pid} - local killed=0 retries=0 - while [ ${killed} -eq 0 ]; do - sleep 1 - kill -0 ${pid} 2>/dev/null - killed=$? - retries=$((retries + 1)) - [ ${retries} -eq 3 ] && kill -9 ${pid} - done - eend $? -} - -start() { - checkconfig || return 1 - - if [ ! -d ${SHADOW_DIR} ]; then - eerror "Missing ${SHADOW_DIR}" - return 1 - fi - - if mkdir -p "$(echo "${LOG_FILE}" | grep -o '\([^\/]*\/\)*')"; then - eerror "Could not create file system journal in ${LOG_FILE}" - return 1 - fi - - ebegin "Loading cvmfsflt kernel module" - modprobe -q redirfs && modprobe -q cvmfsflt - eend $? || return 1 - - ebegin "Linking to character device" - rm -f /dev/cvmfs - mknod /dev/cvmfs c $(awk '/cvmfs/ {print $1}' /proc/devices) 0 > /dev/null 2>&1 - chmod 0600 /dev/cvmfs - eend $? || return 1 - - ebegin "Setting filter path to ${SHADOW_DIR}" - echo -n "a:i:${SHADOW_DIR}" > /sys/fs/redirfs/filters/cvmfsflt/paths - eend $? || return 1 - - listen || return 1 - ebegin "Starting CernVM-FS daemon" - touch ${subsysfile} - eend $? -} - - -pause() { - check_status - local ret=$? - if [ ${ret} -eq 0 ]; then - eerror "CernVM-FS daemon is stopped" - return 1 - fi - if [ ${ret} -eq 2 ]; then - ewarn "CernVM-FS daemon is already paused" - return 1 - fi - - ebegin "Locking down ${SHADOW_DIR}" - echo -n "1" > /sys/fs/redirfs/filters/cvmfsflt/lockdown - eend $? || return 1 - - ebegin "Waiting for pending operations on ${SHADOW_DIR}" - local nowops noll - while true; do - nowops=$(cat /sys/fs/redirfs/filters/cvmfsflt/nowops) - [ $? -ne 0 ] && eend 1 && return 1 - [ ${nowops} -eq 0 ] && break - sleep 1 - done - eend $? - - ebegin "Waiting for pending messages in call buffer" - local noll - while true; do - noll=$(cat /sys/fs/redirfs/filters/cvmfsflt/noll) - [ $? -ne 0 ] && eend 1 && return 1 - [ ${noll} -eq 0 ] && break - sleep 1 - done - eend $? || return 1 - unlisten || return 1 - mark_service_stopped cvmfsd -} - -resume() { - check_status - local ret=$? - if [ ${ret} -eq 0 ]; then - eerror "CernVM-FS daemon is stopped" - return 1 - fi - if [ $retval -eq 1 ]; then - ewarn "CernVM-FS daemon is already running" - return 1 - fi - - listen || return 1 - - ebegin "Open up ${SHADOW_DIR}" - echo -n "0" > /sys/fs/redirfs/filters/cvmfsflt/lockdown - eend $? || return 1 - mark_service_started cvmfsd -} - - -stop() { - check_status - local ret=$? - if [ ${ret} -eq 0 ]; then - ewarn "CernVM-FS daemon is already stopped" - return 2 - fi - - if [ ${ret} -eq 1 ]; then - pause - ret=$? - [ ${ret} -ne 0 ] && return ${ret} - fi - - ebegin "Unloading cvmfsflt kernel module" - echo -n "c\0" > /sys/fs/redirfs/filters/cvmfsflt/paths || ret=$((ret + 1)) - echo -n "1\0" > /sys/fs/redirfs/filters/cvmfsflt/unregister || ret=$((ret + 1)) - rmmod cvmfsflt || ret=$((ret + 1)) - eend ${ret} || return 1 - - ebegin "Shutting down CernVM-FS daemon" - rm -f ${pidfile} ${subsysfile} - eend $? -} - -flush() { - ebegin "Flushing CernVM-FS server file system change log" - cat /dev/null > "${LOG_FILE}" - eend $? -} |