summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2008-03-06 23:05:44 +0000
committerJustin Bronder <jsbronder@gentoo.org>2008-03-06 23:05:44 +0000
commit543a5c57f7569e1caf524cfbaed7590bb0390ac7 (patch)
tree07806c549df126f1b057a5c994e19bc0128751ba /sys-cluster/pvfs2
parentQA cleanup: Fix quoting. (diff)
downloadgentoo-2-543a5c57f7569e1caf524cfbaed7590bb0390ac7.tar.gz
gentoo-2-543a5c57f7569e1caf524cfbaed7590bb0390ac7.tar.bz2
gentoo-2-543a5c57f7569e1caf524cfbaed7590bb0390ac7.zip
Fix bug #210923. Support kernel 2.6.24. Cleanup ebuild.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-cluster/pvfs2')
-rw-r--r--sys-cluster/pvfs2/ChangeLog16
-rw-r--r--sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch239
-rw-r--r--sys-cluster/pvfs2/files/2.7.0-gentoo-makefile.patch198
-rw-r--r--sys-cluster/pvfs2/files/2.7.0-kernel-rt.patch88
-rw-r--r--sys-cluster/pvfs2/files/2.7.0-kmem_cache.patch127
-rw-r--r--sys-cluster/pvfs2/files/2.7.0-verbose-checking.patch15
-rw-r--r--sys-cluster/pvfs2/files/pvfs2-client-conf.d-2.7.018
-rw-r--r--sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.079
-rw-r--r--sys-cluster/pvfs2/files/pvfs2-server-conf.d-2.7.017
-rw-r--r--sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.065
-rw-r--r--sys-cluster/pvfs2/pvfs2-2.7.0-r1.ebuild165
11 files changed, 1025 insertions, 2 deletions
diff --git a/sys-cluster/pvfs2/ChangeLog b/sys-cluster/pvfs2/ChangeLog
index e4216a54a5e4..cb52c86034dc 100644
--- a/sys-cluster/pvfs2/ChangeLog
+++ b/sys-cluster/pvfs2/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sys-cluster/pvfs2
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/ChangeLog,v 1.9 2007/12/03 00:00:45 nerdboy Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/ChangeLog,v 1.10 2008/03/06 23:05:43 jsbronder Exp $
+
+*pvfs2-2.7.0-r1 (06 Mar 2008)
+
+ 06 Mar 2008; Justin Bronder <jsbronder@gentoo.org>
+ +files/pvfs2-client-conf.d-2.7.0, +files/pvfs2-client-init.d-2.7.0,
+ +files/pvfs2-server-conf.d-2.7.0, +files/pvfs2-server-init.d-2.7.0,
+ +files/2.7.0-ctl_unnumbered.patch, +files/2.7.0-gentoo-makefile.patch,
+ +files/2.7.0-kernel-rt.patch, +files/2.7.0-kmem_cache.patch,
+ +files/2.7.0-verbose-checking.patch, +pvfs2-2.7.0-r1.ebuild:
+ Fix bug #210923. Support kernel 2.6.24. One patch for Makefile. Support
+ more than one pvfs2 mountpoint and cleanup init/conf stuff for single pvfs2
+ config file layout. General cleanup all around.
*pvfs2-2.7.0 (02 Dec 2007)
diff --git a/sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch b/sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch
new file mode 100644
index 000000000000..ed648842b7dd
--- /dev/null
+++ b/sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch
@@ -0,0 +1,239 @@
+Index: src/kernel/linux-2.6/pvfs2-proc.c
+===================================================================
+RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-proc.c,v
+diff -u -r1.8 -r1.9
+--- src/kernel/linux-2.6/pvfs2-proc.c 19 Aug 2007 18:20:28 -0000 1.8
++++ src/kernel/linux-2.6/pvfs2-proc.c 11 Jan 2008 15:20:16 -0000 1.9
+@@ -261,10 +261,19 @@
+ static int min_debug[] = {0}, max_debug[] = {GOSSIP_MAX_DEBUG};
+ static int min_op_timeout_secs[] = {0}, max_op_timeout_secs[] = {INT_MAX};
+
++/*
++ * Modern kernels prefer to number the controls themselves.
++ */
++#ifdef CTL_UNNUMBERED
++#define UNNUMBERED_OR_VAL(x) CTL_UNNUMBERED
++#else
++#define UNNUMBERED_OR_VAL(x) x
++#endif
++
+ static ctl_table pvfs2_acache_table[] = {
+ /* controls acache timeout */
+ {
+- .ctl_name = 1,
++ .ctl_name = UNNUMBERED_OR_VAL(1),
+ .procname = "timeout-msecs",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -273,7 +282,7 @@
+ },
+ /* controls acache hard limit */
+ {
+- .ctl_name = 2,
++ .ctl_name = UNNUMBERED_OR_VAL(2),
+ .procname = "hard-limit",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -282,7 +291,7 @@
+ },
+ /* controls acache soft limit */
+ {
+- .ctl_name = 3,
++ .ctl_name = UNNUMBERED_OR_VAL(3),
+ .procname = "soft-limit",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -291,7 +300,7 @@
+ },
+ /* controls acache reclaim percentage */
+ {
+- .ctl_name = 4,
++ .ctl_name = UNNUMBERED_OR_VAL(4),
+ .procname = "reclaim-percentage",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -303,7 +312,7 @@
+ static ctl_table pvfs2_ncache_table[] = {
+ /* controls ncache timeout */
+ {
+- .ctl_name = 1,
++ .ctl_name = UNNUMBERED_OR_VAL(1),
+ .procname = "timeout-msecs",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -312,7 +321,7 @@
+ },
+ /* controls ncache hard limit */
+ {
+- .ctl_name = 2,
++ .ctl_name = UNNUMBERED_OR_VAL(2),
+ .procname = "hard-limit",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -321,7 +330,7 @@
+ },
+ /* controls ncache soft limit */
+ {
+- .ctl_name = 3,
++ .ctl_name = UNNUMBERED_OR_VAL(3),
+ .procname = "soft-limit",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -330,7 +339,7 @@
+ },
+ /* controls ncache reclaim percentage */
+ {
+- .ctl_name = 4,
++ .ctl_name = UNNUMBERED_OR_VAL(4),
+ .procname = "reclaim-percentage",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -343,15 +352,15 @@
+ static int ncache_perf_count = PVFS2_PERF_COUNT_REQUEST_NCACHE;
+ static ctl_table pvfs2_pc_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = UNNUMBERED_OR_VAL(1),
+ .procname = "acache",
+ .maxlen = 4096,
+ .mode = 0444,
+ .proc_handler = pvfs2_pc_proc_handler,
+ .extra1 = &acache_perf_count,
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = UNNUMBERED_OR_VAL(2),
+ .procname = "ncache",
+ .maxlen = 4096,
+ .mode = 0444,
+@@ -366,44 +375,44 @@
+ static ctl_table pvfs2_stats_table[] = {
+ /* shows number of hits in cache */
+ {
+- .ctl_name = 1,
++ .ctl_name = UNNUMBERED_OR_VAL(1),
+ .procname = "hits",
+ .data = &g_pvfs2_stats.cache_hits,
+ .maxlen = sizeof(unsigned long),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = UNNUMBERED_OR_VAL(2),
+ .procname = "misses",
+ .data = &g_pvfs2_stats.cache_misses,
+ .maxlen = sizeof(unsigned long),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = UNNUMBERED_OR_VAL(3),
+ .procname = "reads",
+ .data = &g_pvfs2_stats.reads,
+ .maxlen = sizeof(unsigned long),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = UNNUMBERED_OR_VAL(4),
+ .procname = "writes",
+ .data = &g_pvfs2_stats.writes,
+ .maxlen = sizeof(unsigned long),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+- {.ctl_name = 0},
++ {0}
+ };
+
+ static ctl_table pvfs2_table[] = {
+ /* controls debugging level */
+ {
+- .ctl_name = 1,
++ .ctl_name = UNNUMBERED_OR_VAL(1),
+ .procname = "debug",
+ .data = &gossip_debug_mask,
+ .maxlen = sizeof(int),
+@@ -415,7 +424,7 @@
+ },
+ /* operation timeout */
+ {
+- .ctl_name = 2,
++ .ctl_name = UNNUMBERED_OR_VAL(2),
+ .procname = "op-timeout-secs",
+ .data = &op_timeout_secs,
+ .maxlen = sizeof(int),
+@@ -427,7 +436,7 @@
+ },
+ /* time interval for client side performance counters */
+ {
+- .ctl_name = 3,
++ .ctl_name = UNNUMBERED_OR_VAL(3),
+ .procname = "perf-time-interval-secs",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -436,7 +445,7 @@
+ },
+ /* time interval for client side performance counters */
+ {
+- .ctl_name = 4,
++ .ctl_name = UNNUMBERED_OR_VAL(4),
+ .procname = "perf-history-size",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -445,7 +454,7 @@
+ },
+ /* reset performance counters */
+ {
+- .ctl_name = 5,
++ .ctl_name = UNNUMBERED_OR_VAL(5),
+ .procname = "perf-counter-reset",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+@@ -454,30 +463,30 @@
+ },
+ /* subdir for acache control */
+ {
+- .ctl_name = 6,
++ .ctl_name = UNNUMBERED_OR_VAL(6),
+ .procname = "acache",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = pvfs2_acache_table
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = UNNUMBERED_OR_VAL(7),
+ .procname = "perf-counters",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = pvfs2_pc_table
+ },
+ /* subdir for ncache control */
+ {
+- .ctl_name = 8,
++ .ctl_name = UNNUMBERED_OR_VAL(8),
+ .procname = "ncache",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = pvfs2_ncache_table
+ },
+ /* statistics maintained by the kernel module (output only below this) */
+ {
+- .ctl_name = 9,
++ .ctl_name = UNNUMBERED_OR_VAL(9),
+ .procname = "stats",
+ .maxlen = 0,
+ .mode = 0555,
+@@ -487,7 +496,7 @@
+ };
+ static ctl_table fs_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = UNNUMBERED_OR_VAL(1),
+ .procname = "pvfs2",
+ .mode = 0555,
+ .child = pvfs2_table
diff --git a/sys-cluster/pvfs2/files/2.7.0-gentoo-makefile.patch b/sys-cluster/pvfs2/files/2.7.0-gentoo-makefile.patch
new file mode 100644
index 000000000000..0e277e14cbba
--- /dev/null
+++ b/sys-cluster/pvfs2/files/2.7.0-gentoo-makefile.patch
@@ -0,0 +1,198 @@
+diff -urN pvfs-2.7.0/Makefile.in pvfs-2.7.0_patched/Makefile.in
+--- pvfs-2.7.0/Makefile.in 2008-02-28 10:27:37.000000000 -0500
++++ pvfs-2.7.0_patched/Makefile.in 2008-02-28 10:27:35.000000000 -0500
+@@ -52,10 +52,14 @@
+ # define a few generic variables that we need to use
+ DESTDIR =
+ srcdir = @srcdir@
+-prefix = $(DESTDIR)@prefix@
++prefix = @prefix@
+ datarootdir = $(DESTDIR)@datarootdir@
+ mandir = $(DESTDIR)@mandir@
+-exec_prefix = $(DESTDIR)@exec_prefix@
++exec_prefix = @exec_prefix@
++sbindir = $(DESTDIR)@sbindir@
++bindir = $(DESTDIR)@bindir@
++libdir = $(DESTDIR)@libdir@
++includedir = $(DESTDIR)@includedir@
+
+ VPATH = $(srcdir)
+ SHELL = @SHELL@
+@@ -63,6 +67,7 @@
+ # TODO: should probably check for bison and flex in configure
+ BISON = bison
+ FLEX = flex
++LN_S = ln -s
+ BUILD_BMI_TCP = @BUILD_BMI_TCP@
+ BUILD_GM = @BUILD_GM@
+ BUILD_MX = @BUILD_MX@
+@@ -162,6 +167,9 @@
+ REDHAT_RELEASE = @REDHAT_RELEASE@
+ NPTL_WORKAROUND = @NPTL_WORKAROUND@
+ STRICT_CFLAGS = @STRICT_CFLAGS@
++SO_FULL = 2.0.0
++SO_MAJOR = 2
++
+ # for Solaris:
+ # LIBS += -lsocket -lnsl
+
+@@ -435,8 +443,10 @@
+ LIBRARIES :=
+ LIBRARIES_THREADED :=
+ ifeq ($(build_shared),yes)
+-LIBRARIES_SHARED = lib/libpvfs2.so
++LIBRARIES_SHARED = lib/libpvfs2.so.$(SO_FULL)
+ LIBRARIES += $(LIBRARIES_SHARED)
++LIBRARIES_THREADED_SHARED = lib/libpvfs2-threaded.so.$(SO_FULL)
++LIBRARIES_THREADED += $(LIBRARIES_THREADED_SHARED)
+ endif
+ ifeq ($(build_static),yes)
+ LIBRARIES_STATIC = lib/libpvfs2.a
+@@ -627,16 +637,16 @@
+ $(E)ar rcs $@ $(LIBTHREADEDOBJS)
+
+ # rule for building the pvfs2 library
+-lib/libpvfs2.so: $(LIBPICOBJS)
++lib/libpvfs2.so.$(SO_FULL): $(LIBPICOBJS)
+ $(Q) " LDSO $@"
+ $(E)$(INSTALL) -d lib
+- $(E)$(LDSHARED) -o $@ $(LIBPICOBJS)
++ $(E)$(LDSHARED) -Wl,-soname,libpvfs2.so -o $@ $(LIBPICOBJS)
+
+ # rule for building the pvfs2 _multithreaded_ library
+-lib/libpvfs2-threaded.so: $(LIBTHREADEDPICOBJS)
++lib/libpvfs2-threaded.so.$(SO_FULL): $(LIBTHREADEDPICOBJS)
+ $(Q) " LDSO $@"
+ $(E)$(INSTALL) -d lib
+- $(E)$(LDSHARED) -o $@ $(LIBTHREADEDPICOBJS)
++ $(E)$(LDSHARED) -Wl,-soname,libpvfs2-threaded.so -o $@ $(LIBTHREADEDPICOBJS)
+
+ # rule for building the pvfs2 server library
+ lib/libpvfs2-server.a: $(SERVEROBJS)
+@@ -713,7 +723,7 @@
+
+ # all applications depend on the pvfs2 library
+ $(ADMINTOOLS): %: %.o $(LIBRARIES)
+-$(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES) lib/libpvfs2-server.a
++$(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES)
+ $(KERNAPPS): %: %.o $(LIBRARIES)
+ $(KERNAPPSTHR): %: %.o $(LIBRARIES_THREADED)
+
+@@ -769,7 +779,7 @@
+ $(E)rm -f $(LIBOBJS) $(LIBTHREADEDOBJS) $(SERVEROBJS) $(MISCOBJS) \
+ $(LIBRARIES) $(LIBRARIES_THREADED) $(DEPENDS) $(SERVER) \
+ $(ADMINOBJS) $(ADMINOBJS_SERVER) $(ADMINTOOLS)\
+- $(ADMINTOOLS_SERVER) lib/libpvfs2-server.a\
++ $(ADMINTOOLS_SERVER) \
+ $(KERNAPPOBJS) $(KERNAPPS) $(KERNAPPSTHR) \
+ $(VISS) $(VISMISCOBJS) $(VISOBJS) $(VISDEPENDS)\
+ $(VISMISCDEPENDS) $(KARMAOBJS) $(LIBPICOBJS) \
+@@ -883,43 +893,48 @@
+ install -m 644 $(srcdir)/doc/man/*.5 $(mandir)/man5
+
+ install:: all install_doc
+- install -d $(prefix)/include
+- install -m 644 $(srcdir)/include/pvfs2.h $(prefix)/include
+- install -m 644 $(srcdir)/include/pvfs2-request.h $(prefix)/include
+- install -m 644 $(srcdir)/include/pvfs2-debug.h $(prefix)/include
+- install -m 644 $(srcdir)/include/pvfs2-sysint.h $(prefix)/include
+- install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(prefix)/include
+- install -m 644 $(srcdir)/include/pvfs2-types.h $(prefix)/include
+- install -m 644 $(srcdir)/include/pvfs2-util.h $(prefix)/include
+- install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(prefix)/include
+-
+- install -d $(prefix)/lib
+- install -m 755 $(LIBRARIES) $(prefix)/lib
++ install -d $(includedir)
++ install -m 644 $(srcdir)/include/pvfs2.h $(includedir)
++ install -m 644 $(srcdir)/include/pvfs2-request.h $(includedir)
++ install -m 644 $(srcdir)/include/pvfs2-debug.h $(includedir)
++ install -m 644 $(srcdir)/include/pvfs2-sysint.h $(includedir)
++ install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(includedir)
++ install -m 644 $(srcdir)/include/pvfs2-types.h $(includedir)
++ install -m 644 $(srcdir)/include/pvfs2-util.h $(includedir)
++ install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(includedir)
++
++ install -d $(libdir)
++ install -m 755 $(LIBRARIES) $(libdir)
++ install -m 755 $(LIBRARIES_THREADED) $(libdir)
++ $(LN_S) libpvfs2-threaded.so.$(SO_FULL) $(libdir)/libpvfs2-threaded.so.$(SO_MAJOR)
++ $(LN_S) libpvfs2-threaded.so.$(SO_FULL) $(libdir)/libpvfs2-threaded.so
++ $(LN_S) libpvfs2.so.$(SO_FULL) $(libdir)/libpvfs2.so.$(SO_MAJOR)
++ $(LN_S) libpvfs2.so.$(SO_FULL) $(libdir)/libpvfs2.so
+
+ ifdef TARGET_OS_DARWIN
+ # TOC needs to be regenerated in libs after they get moved
+ ranlib $(patsubst %,$(prefix)/%,$(LIBRARIES))
+ endif
+
+- install -d $(prefix)/bin
+- install -m 755 $(ADMINTOOLS) $(prefix)/bin
+- install -m 755 src/apps/admin/pvfs2-config $(prefix)/bin
++ install -d $(bindir)
++ install -m 755 $(ADMINTOOLS) $(bindir)
++ install -m 755 src/apps/admin/pvfs2-config $(bindir)
+ @# if we ever auto-generate genconfig, remove the $(srcdir)
+- install -m 755 $(srcdir)/src/apps/admin/pvfs2-genconfig $(prefix)/bin
+- install -m 755 $(srcdir)/src/apps/admin/pvfs2-config-convert $(prefix)/bin
++ install -m 755 $(srcdir)/src/apps/admin/pvfs2-genconfig $(bindir)
++ install -m 755 $(srcdir)/src/apps/admin/pvfs2-config-convert $(bindir)
+ ifdef BUILD_KARMA
+- install -m 755 $(KARMA) $(prefix)/bin
++ install -m 755 $(KARMA) $(bindir)
+ endif
+
+- install -d $(prefix)/sbin
++ install -d $(sbindir)
+
+ ifdef BUILD_SERVER
+- install -m 755 $(ADMINTOOLS_SERVER) $(prefix)/bin
++ install -m 755 $(ADMINTOOLS_SERVER) $(bindir)
+ ifeq ($(NPTL_WORKAROUND),)
+- install -m 755 $(SERVER) $(prefix)/sbin
++ install -m 755 $(SERVER) $(sbindir)
+ else
+- install -m 755 $(srcdir)/$(SERVER_STUB) $(prefix)/sbin/pvfs2-server
+- install -m 755 $(SERVER) $(prefix)/sbin/pvfs2-server.bin
++ install -m 755 $(srcdir)/$(SERVER_STUB) $(sbindir)/pvfs2-server
++ install -m 755 $(SERVER) $(sbindir)/pvfs2-server.bin
+ endif
+ endif
+
+@@ -939,9 +954,12 @@
+ install -m 755 src/kernel/linux-2.6/pvfs2.ko $(KMOD_DIR)
+
+ .PHONY: kmod_install
+-kmod_install: kmod kernapps just_kmod_install
+- install -d $(prefix)/sbin
+- install -m 755 $(KERNAPPS) $(prefix)/sbin
++kmod_install: kmod kernapps_install just_kmod_install
++
++.PHONY: kernapps_install
++kernapps_install: kernapps
++ install -d $(sbindir)
++ install -m 755 $(KERNAPPS) $(sbindir)
+ endif
+
+ ifneq (,$(LINUX24_KERNEL_SRC))
+@@ -960,12 +978,15 @@
+ install -m 755 src/kernel/linux-2.4/pvfs2.o $(KMOD_DIR)
+
+ .PHONY: kmod24_install
+-kmod24_install: kmod24 kernapps just_kmod24_install
+- install -d $(prefix)/sbin
+- install -m 755 $(KERNAPPS) $(prefix)/sbin
+- install -m 755 src/apps/kernel/linux/mount.pvfs2 $(prefix)/sbin
++kmod24_install: kmod24 kernapps_install just_kmod24_install
++
++.PHONY: kernapps_install
++kernapps_install: kernapps
++ install -d $(sbindir)
++ install -m 755 $(KERNAPPS) $(sbindir)
++ install -m 755 src/apps/kernel/linux/mount.pvfs2 $(sbindir)
+ @echo ""
+ @echo "For improved linux-2.4 support,"
+- @echo "install $(prefix)/sbin/mount.pvfs2 to /sbin/mount.pvfs2"
++ @echo "install $(sbindir)/mount.pvfs2 to /sbin/mount.pvfs2"
+ @echo ""
+ endif
diff --git a/sys-cluster/pvfs2/files/2.7.0-kernel-rt.patch b/sys-cluster/pvfs2/files/2.7.0-kernel-rt.patch
new file mode 100644
index 000000000000..2b67ff9fd987
--- /dev/null
+++ b/sys-cluster/pvfs2/files/2.7.0-kernel-rt.patch
@@ -0,0 +1,88 @@
+Index: pvfs2-config.h.in
+===================================================================
+RCS file: /projects/cvsroot/pvfs2/pvfs2-config.h.in,v
+diff -u -N -r1.111 -r1.112
+--- pvfs2-config.h.in 5 Nov 2007 21:07:54 -0000 1.111
++++ pvfs2-config.h.in 7 Dec 2007 23:05:56 -0000 1.112
+@@ -198,6 +198,9 @@
+ /* Define to 1 if you have the <malloc.h> header file. */
+ #undef HAVE_MALLOC_H
+
++/* Define if kernel defines mapping_nrpages macro -- defined by RT linux */
++#undef HAVE_MAPPING_NRPAGES_MACRO
++
+ /* Define to 1 if you have the <memory.h> header file. */
+ #undef HAVE_MEMORY_H
+
+@@ -258,6 +261,10 @@
+ /* Define if kernel has register_ioctl32_conversion */
+ #undef HAVE_REGISTER_IOCTL32_CONVERSION
+
++/* Define if kernel address_space struct has a spin_lock for private data
++ instead of rw_lock -- used by RT linux */
++#undef HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT
++
+ /* Define to 1 if you have the <SDL/SDL_ttf.h> header file. */
+ #undef HAVE_SDL_SDL_TTF_H
+
+@@ -273,6 +280,9 @@
+ /* Define if SLAB_KERNEL is defined in kernel */
+ #undef HAVE_SLAB_KERNEL
+
++/* Define if kernel address_space struct has a spin_lock instead of rw_lock */
++#undef HAVE_SPIN_LOCK_ADDR_SPACE_STRUCT
++
+ /* Define if struct super_operations in kernel has statfs_lite callback */
+ #undef HAVE_STATFS_LITE_SUPER_OPERATIONS
+
+Index: maint/config/kernel.m4
+===================================================================
+RCS file: /projects/cvsroot/pvfs2/maint/config/kernel.m4,v
+diff -u -N -r1.46 -r1.47
+--- maint/config/kernel.m4 6 Nov 2007 16:29:52 -0000 1.46
++++ maint/config/kernel.m4 7 Dec 2007 23:05:56 -0000 1.47
+@@ -849,5 +849,44 @@
+ AC_MSG_RESULT(no)
+ )
+
++ AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field)
++ AC_TRY_COMPILE([
++ #define __KERNEL__
++ #include <linux/fs.h>
++ ], [
++ struct address_space as;
++ spin_lock(&as.page_lock);
++ ],
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_SPIN_LOCK_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock instead of rw_lock]),
++ AC_MSG_RESULT(no)
++ )
++
++ AC_MSG_CHECKING(if kernel address_space struct has a priv_lock field - from RT linux)
++ AC_TRY_COMPILE([
++ #define __KERNEL__
++ #include <linux/fs.h>
++ ], [
++ struct address_space as;
++ spin_lock(&as.priv_lock);
++ ],
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock for private data instead of rw_lock -- used by RT linux]),
++ AC_MSG_RESULT(no)
++ )
++
++ AC_MSG_CHECKING(if kernel defines mapping_nrpages macro - from RT linux)
++ AC_TRY_COMPILE([
++ #define __KERNEL__
++ #include <linux/fs.h>
++ ], [
++ struct address_space idata;
++ int i = mapping_nrpages(&idata);
++ ],
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_MAPPING_NRPAGES_MACRO, 1, [Define if kernel defines mapping_nrpages macro -- defined by RT linux]),
++ AC_MSG_RESULT(no)
++ )
++
+ CFLAGS=$oldcflags
+ ])
diff --git a/sys-cluster/pvfs2/files/2.7.0-kmem_cache.patch b/sys-cluster/pvfs2/files/2.7.0-kmem_cache.patch
new file mode 100644
index 000000000000..e91a5d51f128
--- /dev/null
+++ b/sys-cluster/pvfs2/files/2.7.0-kmem_cache.patch
@@ -0,0 +1,127 @@
+Index: pvfs2-config.h.in
+===================================================================
+RCS file: /projects/cvsroot/pvfs2/pvfs2-config.h.in,v
+diff -u -r1.113 -r1.114
+--- pvfs2-config.h.in 11 Jan 2008 15:00:08 -0000 1.113
++++ pvfs2-config.h.in 11 Jan 2008 20:30:17 -0000 1.114
+@@ -159,6 +159,10 @@
+ /* Define if kernel lacks device classes */
+ #undef HAVE_KERNEL_DEVICE_CLASSES
+
++/* Define if kernel kmem_cache_create constructor has new-style two-parameter
++ form */
++#undef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM
++
+ /* Define if kernel kmem_cache_create has destructor param */
+ #undef HAVE_KMEM_CACHE_CREATE_DESTRUCTOR_PARAM
+
+Index: maint/config/kernel.m4
+===================================================================
+RCS file: /projects/cvsroot/pvfs2/maint/config/kernel.m4,v
+diff -u -r1.50 -r1.51
+--- maint/config/kernel.m4 11 Jan 2008 20:07:20 -0000 1.50
++++ maint/config/kernel.m4 11 Jan 2008 20:30:16 -0000 1.51
+@@ -126,6 +126,7 @@
+ AC_MSG_CHECKING(for struct kmem_cache in kernel)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
++ #include <linux/kernel.h>
+ #include <linux/slab.h>
+
+ int foo(struct kmem_cache *s)
+@@ -866,6 +865,32 @@
+ AC_MSG_RESULT(no)
+ )
+
++ dnl 2.6.24 changed the constructor parameter signature of
++ dnl kmem_cache_create. Check for this newer two-param style and
++ dnl if not, assume it is old. Note we can get away with just
++ dnl struct kmem_cache (and not kmem_cache_t) as that change happened
++ dnl in older kernels. If they don't match, gcc complains about
++ dnl passing argument ... from incompatible pointer type, hence the
++ dnl need for the -Werror.
++ tmp_cflags=$CFLAGS
++ CFLAGS="$CFLAGS -Werror"
++ AC_MSG_CHECKING(for two-param kmem_cache_create constructor)
++ AC_TRY_COMPILE([
++ #define __KERNEL__
++ #include <linux/kernel.h>
++ #include <linux/slab.h>
++ void ctor(struct kmem_cache *cachep, void *req)
++ {
++ }
++ ], [
++ kmem_cache_create("config-test", 0, 0, 0, ctor);
++ ],
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM, 1, [Define if kernel kmem_cache_create constructor has new-style two-parameter form]),
++ AC_MSG_RESULT(no)
++ )
++ CFLAGS=$tmp_cflags
++
+ AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field named page_lock)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+Index: src/kernel/linux-2.6/pvfs2-cache.c
+===================================================================
+RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-cache.c,v
+diff -u -r1.44 -r1.45
+--- src/kernel/linux-2.6/pvfs2-cache.c 4 Nov 2007 01:38:57 -0000 1.44
++++ src/kernel/linux-2.6/pvfs2-cache.c 11 Jan 2008 20:30:17 -0000 1.45
+@@ -202,10 +202,17 @@
+ }
+ }
+
++
+ static void dev_req_cache_ctor(
++#ifdef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM
++ struct kmem_cache *cachep,
++ void *req
++#else
+ void *req,
+ pvfs2_kmem_cache_t * cachep,
+- unsigned long flags)
++ unsigned long flags
++#endif
++)
+ {
+ memset(req, 0, sizeof(MAX_ALIGNED_DEV_REQ_DOWNSIZE));
+ }
+@@ -264,11 +271,17 @@
+ }
+
+ static void pvfs2_inode_cache_ctor(
+- void *new_pvfs2_inode,
++#ifdef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM
++ struct kmem_cache *cachep,
++ void *req
++#else
++ void *req,
+ pvfs2_kmem_cache_t * cachep,
+- unsigned long flags)
++ unsigned long flags
++#endif
++)
+ {
+- pvfs2_inode_t *pvfs2_inode = (pvfs2_inode_t *)new_pvfs2_inode;
++ pvfs2_inode_t *pvfs2_inode = req;
+
+ memset(pvfs2_inode, 0, sizeof(pvfs2_inode_t));
+ ClearInitFlag(pvfs2_inode);
+@@ -382,9 +395,15 @@
+ #ifdef HAVE_AIO_VFS_SUPPORT
+
+ static void kiocb_ctor(
++#ifdef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM
++ struct kmem_cache *cachep,
++ void *req
++#else
+ void *req,
+ pvfs2_kmem_cache_t * cachep,
+- unsigned long flags)
++ unsigned long flags
++#endif
++)
+ {
+ memset(req, 0, sizeof(pvfs2_kiocb));
+ }
diff --git a/sys-cluster/pvfs2/files/2.7.0-verbose-checking.patch b/sys-cluster/pvfs2/files/2.7.0-verbose-checking.patch
new file mode 100644
index 000000000000..d02eb7554b60
--- /dev/null
+++ b/sys-cluster/pvfs2/files/2.7.0-verbose-checking.patch
@@ -0,0 +1,15 @@
+Index: maint/config/kernel.m4
+===================================================================
+RCS file: /projects/cvsroot/pvfs2/maint/config/kernel.m4,v
+diff -u -N -r1.48 -r1.49
+--- maint/config/kernel.m4 11 Jan 2008 15:00:08 -0000 1.48
++++ maint/config/kernel.m4 11 Jan 2008 15:02:14 -0000 1.49
+@@ -849,7 +849,7 @@
+ AC_MSG_RESULT(no)
+ )
+
+- AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field)
++ AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field named page_lock)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
diff --git a/sys-cluster/pvfs2/files/pvfs2-client-conf.d-2.7.0 b/sys-cluster/pvfs2/files/pvfs2-client-conf.d-2.7.0
new file mode 100644
index 000000000000..0aa784595582
--- /dev/null
+++ b/sys-cluster/pvfs2/files/pvfs2-client-conf.d-2.7.0
@@ -0,0 +1,18 @@
+# Extra arguments to supply to the pvfs2-client daemon
+#PVFS2_CLIENT_ARGS="-L /var/log/pvfs2-client.log"
+
+# Location of the pvfs2-client binaries. Defaults are shown
+PVFS2_CLIENT="/usr/sbin/pvfs2-client"
+PVFS2_CLIENT_CORE="/usr/sbin/pvfs2-client-core"
+
+# Location to store pid
+PVFS2_CLIENT_PIDFILE="/var/run/pvfs2-client.pid"
+
+# List of server:mountpoint to automatically mount when the
+# init script is run. If some other mechanism is used to do
+# the mounting, then this can be left commented out.
+# 3334 is the default port for pvfs2.
+# <host>:<port>,<mount_point>
+#PVFS2_MOUNTS="servera.tld:3334,/pvfs serverb.tld:3334,/other/pvfs"
+
+
diff --git a/sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0 b/sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0
new file mode 100644
index 000000000000..fb86356ec0a6
--- /dev/null
+++ b/sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0
@@ -0,0 +1,79 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0,v 1.1 2008/03/06 23:05:44 jsbronder Exp $
+
+
+depend() {
+ need net
+ need localmount
+ before pbs_mom
+ after pvfs2-server
+}
+
+checkconfig() {
+ if [ ! -x "${PVFS2_CLIENT}" -o ! -x "${PVFS2_CLIENT_CORE}" ]; then
+ eend 1 "pvfs-2 was not correctly installed."
+ return 1
+ fi
+
+ local piddir=$(dirname ${PVFS2_CLIENT_PIDFILE})
+ if [ ! -d "${piddir}" ]; then
+ ewarn "Creating ${piddir}"
+ mkdir -p ${piddir} || return 1
+ fi
+}
+
+start() {
+ local rc=0
+ local server_mp server mp
+ checkconfig || return 1
+ ebegin "Starting pvfs2-client"
+
+ if ! grep -qs pvfs2 /proc/filesystems; then
+ eerror "Kernel does not support pvfs2 filesystems"
+ return 1
+ fi
+
+ # Don't fork the client so we can get the pid with s-s-d.
+ if ! start-stop-daemon --start -m -b --quiet \
+ --pidfile ${PVFS2_CLIENT_PIDFILE} \
+ --exec "${PVFS2_CLIENT}" \
+ -- -f -p ${PVFS2_CLIENT_CORE} ${PVFS2_CLIENT_ARGS}; then
+ rc=1
+ elif [ -n "${PVFS2_MOUNTS}" ]; then
+ for server_mp in ${PVFS2_MOUNTS}; do
+ mount -t pvfs2 \
+ tcp://$(echo ${server_mp} | cut -d',' -f1)/pvfs2-fs \
+ $(echo ${server_mp} | cut -d',' -f2)
+ rc=$?
+ [[ ${rc} -ne 0 ]] && break
+ done
+ [[ ${rc} -ne 0 ]] && start-stop-daemon --stop -p ${PVFS2_CLIENT_PIDFILE}
+ fi
+
+ eend ${rc}
+}
+
+stop() {
+ local rc=0
+ local server_mp
+ checkconfig || return 1
+ ebegin "Stopping pvfs2-client"
+
+ if [ -n "${PVFS2_MOUNTS}" ]; then
+ for server_mp in ${PVFS2_MOUNTS}; do
+ umount -f $(echo ${server_mp} | cut -d',' -f2)
+ rc=$?
+ [[ ${rc} -ne 0 ]] && break
+ done
+ fi
+
+ if [[ ${rc} -eq 0 ]]; then
+ start-stop-daemon --stop -p ${PVFS2_CLIENT_PIDFILE}
+ rc=$?
+ fi
+
+ eend ${rc}
+}
+
diff --git a/sys-cluster/pvfs2/files/pvfs2-server-conf.d-2.7.0 b/sys-cluster/pvfs2/files/pvfs2-server-conf.d-2.7.0
new file mode 100644
index 000000000000..7c8ed4ec05bf
--- /dev/null
+++ b/sys-cluster/pvfs2/files/pvfs2-server-conf.d-2.7.0
@@ -0,0 +1,17 @@
+# pvfs2 only uses one config file as of 2.7.0. This is the path
+# to that config file.
+PVFS2_FS_CONF="/etc/pvfs/pvfs2-fs.conf"
+
+# your server binary, default is shown.
+PVFS2_SERVER=/usr/sbin/pvfs2-server
+
+# the server will record its PID in this file using the -p argument
+PVFS2_PIDFILE=/var/run/pvfs2.pid
+
+#Additional options
+PVFS2_OPTIONS=""
+
+# Automatically call pvfs2-server with --mkfs if the first call to start
+# the daemon fails. Off by default as this does mess with the local
+# filesystem to prepare the directory for pvfs2-server
+PVFS2_AUTO_MKFS=0
diff --git a/sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0 b/sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0
new file mode 100644
index 000000000000..8ac5fe93d283
--- /dev/null
+++ b/sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0
@@ -0,0 +1,65 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0,v 1.1 2008/03/06 23:05:44 jsbronder Exp $
+
+depend() {
+ after localmount netmount nfsmount dns
+ use net
+}
+
+
+checkconfig() {
+ local piddir=$(dirname "${PVFS2_PIDFILE}")
+ if [ ! -d "${piddir}" ]; then
+ mkdir -p "${piddir}" || return 1
+ fi
+
+ # verify presence of server binary
+ if ! [ -x "${PVFS2_SERVER}" ]; then
+ eerror "Could not find executable ${PVFS2_SERVER}"
+ return 1
+ fi
+
+ if ! [ -r "${PVFS2_FS_CONF}" ]; then
+ eerror "Could not read ${PVFS2_FS_CONF}"
+ return 1
+ fi
+}
+
+start() {
+ local rc
+ checkconfig || return 1
+
+ ebegin "Starting PVFS2 server"
+
+ # Optionally force pvfs2-server to generate the pvfs2 filesystem.
+ if [[ ${PVFS2_AUTO_MKFS} -ne 0 && \
+ ! -f $(grep StorageSpace ${PVFS2_FS_CONF} | cut -d' ' -f 2)/collections.db ]]; then
+ ewarn "Initializing the file system storage with --mkfs"
+ "${PVFS2_SERVER}" --mkfs "${PVFS2_FS_CONF}"
+ rc=$?
+ fi
+
+ if [[ ${rc} -eq 0 ]]; then
+ start-stop-daemon -b --start --quiet \
+ --pidfile "${PVFS2_PIDFILE}" \
+ --exec "${PVFS2_SERVER}" \
+ -- -p "${PVFS2_PIDFILE}" ${PVFS2_OPTIONS} "${PVFS2_FS_CONF}"
+ rc=$?
+ fi
+ eend ${rc}
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Stopping PVFS2 server"
+ start-stop-daemon --stop --quiet --pidfile "${PVFS2_PIDFILE}"
+ eend
+}
+
+restart() {
+ svc_stop
+ sleep 2
+ svc_start
+}
diff --git a/sys-cluster/pvfs2/pvfs2-2.7.0-r1.ebuild b/sys-cluster/pvfs2/pvfs2-2.7.0-r1.ebuild
new file mode 100644
index 000000000000..d308b256897e
--- /dev/null
+++ b/sys-cluster/pvfs2/pvfs2-2.7.0-r1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/pvfs2-2.7.0-r1.ebuild,v 1.1 2008/03/06 23:05:43 jsbronder Exp $
+
+inherit linux-mod autotools toolchain-funcs
+
+MY_PN="${PN%[0-9]*}"
+MY_P="${MY_PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Parallel Virtual File System version 2"
+HOMEPAGE="http://www.pvfs.org/"
+SRC_URI="ftp://ftp.parl.clemson.edu/pub/pvfs2/${MY_P}.tar.gz"
+IUSE="gtk server static doc ssl examples apidocs"
+RDEPEND="gtk? ( >=x11-libs/gtk+-2 )
+ ssl? ( dev-libs/openssl )
+ doc? ( dev-tex/latex2html )
+ apidocs? ( app-doc/doxygen )
+ sys-libs/db"
+DEPEND="${RDEPEND}
+ virtual/linux-sources"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86 ~ppc64"
+
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ if kernel_is 2 4; then
+ BUILD_TARGETS="just_kmod24"
+ ECONF_PARAMS="--with-kernel24=${KV_DIR}"
+ MODULE_NAMES="pvfs2(fs::src/kernel/linux-2.4)"
+ else
+ BUILD_TARGETS="just_kmod"
+ ECONF_PARAMS="--with-kernel=${KV_DIR} --enable-verbose-build"
+ MODULE_NAMES="pvfs2(fs::src/kernel/linux-2.6)"
+ fi
+
+ ECONF_PARAMS="${ECONF_PARAMS}
+ --enable-mmap-racache
+ --sysconfdir=/etc/pvfs2
+ $(use_enable !static shared)
+ $(use_enable gtk karma)
+ $(use_enable server)
+ $(use_with ssl openssl /usr/$(get_libdir))"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Upstream packed all of these by mistake.
+ # TODO: Shouldn't be needed next release.
+ find "${S}" -name '*\.d' | xargs rm -rf
+
+ # All of these must be done in order and are required to fix the bug noted
+ # at: http://www.beowulf-underground.org/pipermail/pvfs2-developers/2008-January/003790.html
+ # TODO: Shouldn't be needed next release.
+ epatch "${FILESDIR}"/${PV}-ctl_unnumbered.patch
+ epatch "${FILESDIR}"/${PV}-kernel-rt.patch
+ epatch "${FILESDIR}"/${PV}-verbose-checking.patch
+ epatch "${FILESDIR}"/${PV}-kmem_cache.patch
+
+ # Fixes destdir, separates the kernel module from the userland build,
+ # forces enabling of the shared threaded library. Fixes so names and
+ # makes links. as-needed fixes for the shared libs. All to Makefile.in
+ epatch "${FILESDIR}"/2.7.0-gentoo-makefile.patch
+
+ # as-needed patchs
+ sed -i \
+ -e "s:LIBS=\"\$LIBS.*:LIBS=\"\$LIBS -lcrypt -lcrypto -lssl\":g" \
+ maint/config/openssl.m4 || die
+ sed -i 's:LDFLAGS=.*-lrt.*:LIBS="\$LIBS -lrt":' maint/config/rt.m4 || die
+
+ # The following makes some builds die by actually spitting out more errors.
+ # See bug #210923. If this breaks other things, it's my fault.
+ sed -i 's:-Wno-strict-aliasing=2::' maint/config/kernel.m4 || die
+
+ AT_M4DIR="maint/config" eautoreconf || die
+}
+
+src_compile() {
+ linux-mod_src_compile || die
+ emake kernapps || die
+ emake all || die
+ if use doc; then
+ emake docs || die
+ if use apidocs; then
+ cd "${S}"/doc
+ doxygen doxygen/pvfs2-doxygen.conf || die
+ fi
+ fi
+}
+
+src_install() {
+ linux-mod_src_install || die
+ emake DESTDIR="${D}" kernapps_install
+ emake DESTDIR="${D}" install
+
+ if use server; then
+ newinitd "${FILESDIR}"/pvfs2-server-init.d-2.7.0 pvfs2-server
+ newconfd "${FILESDIR}"/pvfs2-server-conf.d-2.7.0 pvfs2-server
+ fi
+
+ newinitd "${FILESDIR}"/pvfs2-client-init.d-2.7.0 pvfs2-client
+ newconfd "${FILESDIR}"/pvfs2-client-conf.d-2.7.0 pvfs2-client
+
+ dodoc AUTHORS CREDITS ChangeLog INSTALL README
+
+ # this is LARGE (~5mb)
+ if use doc; then
+ dodoc doc/multi-fs-doc.txt doc/add-server-req \
+ doc/add-client-syscall doc/coding/valgrind \
+ doc/coding/backtrace_analysis.txt
+ insinto /usr/share/doc/${PF}
+ doins doc/*.pdf doc/coding/developer-guidelines.pdf \
+ doc/design/*.pdf doc/random/SystemInterfaceTesting.pdf
+ if use apidocs; then
+ dohtml -A map -A md5 doc/doxygen/html/*
+ fi
+ fi
+ if use examples; then
+ docinto examples/heartbeat
+ dodoc examples/heartbeat/*
+ docinto examples
+ dodoc examples/fs.conf
+ fi
+}
+
+pkg_preinst() {
+ linux-mod_pkg_preinst
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ local f="$(source "${ROOT}"etc/conf.d/pvfs2-server; echo ${PVFS2_FS_CONF})"
+ elog "1.) Pvfs2 uses a unified configuration file as of 2.7.0. If you"
+ elog " have configuration files from an earlier version, use the provided:"
+ elog " ${ROOT}usr/bin/pvfs2-config-convert"
+ elog "to automatically update to the newer configuration scheme."
+ elog "2.) Use emerge --config pvfs2 to create new configuration files."
+ elog "3.) If the storage space has not been previously created, either set"
+ elog " PVFS2_AUTO_MKFS=1 in ${ROOT}etc/conf.d/pvfs2-server or run:"
+ elog " ${ROOT}usr/sbin/pvfs2-server --mkfs ${f}"
+}
+
+pkg_config() {
+ local s
+ local f="$(source "${ROOT}"etc/conf.d/pvfs2-server; echo ${PVFS2_FS_CONF})"
+ if [[ -f "${f}" ]]; then
+ ewarn "Previous install detected."
+ ewarn "We're about to wipe out ${f} and replace it with"
+ ewarn "the file generated by running pvfs2-genconfig. If this is what"
+ ewarn "you want to do, hit any key to continue. Otherwise hit ctrl+C"
+ ewarn "to abort."
+ read s
+ fi
+ einfo "Creating new unified configuration file"
+ ewarn "WARNING: pvfs2 is picky about hostnames. Make sure you use the"
+ ewarn "correct shortname for all nodes and have name resolution for these"
+ ewarn "shortnames correctly configured on all nodes."
+ [ ! -d "${ROOT}$(dirname "${f}")" ] && mkdir -p "${ROOT}$(dirname "${f}")"
+ "${ROOT}"usr/bin/pvfs2-genconfig "${f}"
+}