diff options
author | Justin Bronder <jsbronder@gentoo.org> | 2008-03-06 23:05:44 +0000 |
---|---|---|
committer | Justin Bronder <jsbronder@gentoo.org> | 2008-03-06 23:05:44 +0000 |
commit | 7dceae20b13f211088f412367d05dc9be24abcd0 (patch) | |
tree | 6cbaa83de74bfebe2d68c07cfb2611da27b79f76 /sys-cluster | |
parent | QA cleanup: Fix quoting. (diff) | |
download | historical-7dceae20b13f211088f412367d05dc9be24abcd0.tar.gz historical-7dceae20b13f211088f412367d05dc9be24abcd0.tar.bz2 historical-7dceae20b13f211088f412367d05dc9be24abcd0.zip |
Fix bug #210923. Support kernel 2.6.24. Cleanup ebuild.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/pvfs2/ChangeLog | 16 | ||||
-rw-r--r-- | sys-cluster/pvfs2/Manifest | 12 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch | 239 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/2.7.0-gentoo-makefile.patch | 198 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/2.7.0-kernel-rt.patch | 88 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/2.7.0-kmem_cache.patch | 127 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/2.7.0-verbose-checking.patch | 15 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/pvfs2-client-conf.d-2.7.0 | 18 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0 | 79 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/pvfs2-server-conf.d-2.7.0 | 17 | ||||
-rw-r--r-- | sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0 | 65 | ||||
-rw-r--r-- | sys-cluster/pvfs2/pvfs2-2.7.0-r1.ebuild | 165 |
12 files changed, 1036 insertions, 3 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/Manifest b/sys-cluster/pvfs2/Manifest index 09e85800de63..f47dc57c2552 100644 --- a/sys-cluster/pvfs2/Manifest +++ b/sys-cluster/pvfs2/Manifest @@ -4,11 +4,20 @@ AUX 2.6.3-link-librt-properly.patch 423 RMD160 603b286432b9f8dce5eb318070272e71b AUX 2.6.3-no-pointer-sign.patch 621 RMD160 ea21accad4f71d7cd64b582e0de71a252bf69d7d SHA1 3483c675ed807275aaf6f0d9978557732f5a0283 SHA256 6c93a5467dfb40fae22beaf43a03b222ed3a98327af7ca0265045a77bbad06d8 AUX 2.6.3-register_sysctl_table.patch 368 RMD160 6c50500757240820eaa405312da6fea9d1d32dcc SHA1 d285ac5d240dad52fcaadaf6b302925507a21061 SHA256 f714a8483592dc8d2c317c790fc7ee7bc6dd2ce7f919463e9d621e992bd896c9 AUX 2.6.3-soname.patch 406 RMD160 af22e2cf118d12c89e1dfcd455b9148bffd9221f SHA1 d742180e3edf3b433bc0f1e5f3c8e516d0a6a76a SHA256 7530c4ad04b7e3248d122f5b3151264690f03aba7a48620617d1cda297affa34 +AUX 2.7.0-ctl_unnumbered.patch 6746 RMD160 f8041f1c971ce118a385925e52051064a6a80277 SHA1 4f29e9e6f40d533c3cc8ef0b806d7c8b6227d1de SHA256 5420e60d15f64172d47e908ae873da148ccacf69ab6d81f0c15d28bcd0af8eff +AUX 2.7.0-gentoo-makefile.patch 7176 RMD160 8946851367c19d08c72a3fcb69e659bf4961ddef SHA1 42db7f04eadc8faee632889ef0a6ecf2d8f81095 SHA256 ddbfbc80f95f93477027459faf4633033e48a98f270b263419d63765f4c682c9 +AUX 2.7.0-kernel-rt.patch 2871 RMD160 0f8cd7ef899f69d056dde46c730dfee64b9e03dc SHA1 ee00fa223e0bbf4bd10024271665a2a84e273b8c SHA256 e4848f3c8d6b2179895114c4d9cb2f89f9712a7ac73c3658cdfda77f9e9e1df2 +AUX 2.7.0-kmem_cache.patch 3811 RMD160 648b7a17078ef7928ca9e73d46954554deba5bc2 SHA1 a8a69b1ca273bbd21a1a079d93a8e086775bbe09 SHA256 e6ae6b0466f831b090ba05e848c7964fb2485ad1bb629c356fc15fd73f1068b7 AUX 2.7.0-lib-install.patch 701 RMD160 bfe2b7b5b0106310ad3d2211212587f2ec282894 SHA1 f166423709f7c3eaf055f3d0e4e1b53d3eaceb2e SHA256 706c8e270a37064e0b9f393258abab329227d5a363c1383b907196f3e455257c AUX 2.7.0-soname.patch 1920 RMD160 e2019ee00a87a6294530f5e76d216e93cd870d8e SHA1 c8aa8cc016e0219508e405f48e2450b56daa5894 SHA256 73856f4f5338b7b3cc15a26b02ae544c5384cfa5da955f74ea346a88842818fd +AUX 2.7.0-verbose-checking.patch 572 RMD160 50d692e671d26960e5d3f703a72a858803994376 SHA1 59f5656b4c8482d5c5b222337c376c7f8df00664 SHA256 7e40429b49e375b6b625f69053705b9bb5e40fe0a4c3e229819cbd2c3826e599 AUX pvfs2-1.5.1-destdir.patch 4927 RMD160 58f046ec9e23a10d500cd304ef400f6611e1895c SHA1 b88f931faa0609a31c3665a7337fd8f8ff36a37d SHA256 36d150fa14c53b76933ee5d4121242f206b61e2de76562bfd930088a2d097b6d +AUX pvfs2-client-conf.d-2.7.0 640 RMD160 467e6c3bf46caa2e4f5331632a92c607830fa14c SHA1 dcbe86d8bb7cb236cac27fef5a79d561f59ab55c SHA256 8806ce51ede53dcce5b54a1f056dc4d4091097ba413d09a828595c075961256c AUX pvfs2-client-init.d 1698 RMD160 ce6644995a1159b161fd06b88b48e175f33cd2c5 SHA1 57795ad8996c66a8196d07dc3537a101bc517f60 SHA256 5f30f14198b3e0ff62f66f2bd0c6d7d85662cf3b286627629b84d51876a9ca46 +AUX pvfs2-client-init.d-2.7.0 1999 RMD160 afa86aba6649ad31a42eee5f7a13e0e8b320bcc2 SHA1 c6a89c8717696a3d5008c9cab65b925ed83f4d6b SHA256 70dfe3e3def22919cdeb025e0f4daaa8e3ec7b06d35bc74cc6b27fbeddc5ed51 AUX pvfs2-client.conf 451 RMD160 b76ed044ceb06b4fc420ed427bbaceeea593ffa0 SHA1 2dbf9c003a168b016789f019d9d5c09cd64a5ae7 SHA256 337b29fb849a8a37f02635b649cf278de356309d57dee4a871dbd1338a06a2f0 +AUX pvfs2-server-conf.d-2.7.0 561 RMD160 ea11685bbbbf66b0fca07b33a62aa2c194185687 SHA1 bd100931efd1d27a433b14d4298fa8c5d311fda0 SHA256 36ad9211b79141988cb57ab21b6d3062b728ad7a1b670c94dfec5e1349c535e3 +AUX pvfs2-server-init.d-2.7.0 1665 RMD160 1659d01727ded4d46b27d42731fcd8961a4e77cc SHA1 968a8f83ff3bf2c7c9ff82cb3afcf895bb10e055 SHA256 787f5f61aa0268cccf8140ed5a2c29c8a1eb5f9aea5cc0b43e50978d2c242e10 AUX pvfs2-server.conf 988 RMD160 34c3413aed1e488c803928d9c2f94e9f5daa6450 SHA1 2637011019ecc1274cc3f039eb4870b74e118aaa SHA256 d20259d26773fdbcebc815eb47cc21ce01b5c6b6036bc843b7e9718cccb0eaed AUX pvfs2-server.rc 2814 RMD160 4027463eca4ddc593519c27e8f4e3b101601e2d9 SHA1 87f7dc30eb6c262acaa4a247df11674dacec76bc SHA256 c9a0bc9d2c49bd1e30712bb6621e4c9a6622206e0d8a4487cc3a5eece0b0171f DIST pvfs-2.6.3.tar.gz 3971014 RMD160 a2dcfcf60bde46a3f99b1cc490e9148fdbaacda6 SHA1 781d626996477afff8b87bb9204acd72b3a24a98 SHA256 e8468c277b8832ef26308400a41244fad6e98f38ffcfd417b42aae9f796c03f6 @@ -17,6 +26,7 @@ DIST pvfs2-1.5.1.tar.gz 3295116 RMD160 fcb2c61318efa73a55e19a592f1b6c429a34ea4d EBUILD pvfs2-1.5.1.ebuild 1468 RMD160 a7de71a915066f145ea65bad2aec48b293d817c5 SHA1 a536ab73b5d3c5cb49e61aa2ea1abbc37ef8a8a8 SHA256 257db85531d0c2b9901bb52a27de40692062f55e2490d726667c185bf1c77da0 EBUILD pvfs2-2.6.3-r1.ebuild 4005 RMD160 3e45a20b3d0aabc2df1bb3a3b99a37cae57397aa SHA1 073f0da03cd690132f25615dcdefa04e181cb97a SHA256 df6d2c30336519fd8cf748b0f0325607222236ab6c05fcd24224f1cfdaab7f62 EBUILD pvfs2-2.6.3.ebuild 3915 RMD160 26cb233eccf04755023fd4d04da3cc7640e1efd0 SHA1 903bc83e4034775e6d4431a7c35a063bb81ae3f4 SHA256 821b6a2dd2d47937762c5409c55478e80baca6f3f7cc5448193210ea26af0a3b +EBUILD pvfs2-2.7.0-r1.ebuild 5303 RMD160 c8b139013ed3f0fb5dbea102fc9b4ac5e9088e13 SHA1 82499912d07db42d4bc92f6eb013e8bd798b9065 SHA256 fd4a47c4a5b8ae026bd8bbdee67c09cc9b8cc10deda4df79d73d41e8bcca918a EBUILD pvfs2-2.7.0.ebuild 6494 RMD160 08741f5f38e94dd0458022cec524044c8f9b55c1 SHA1 9a8bf1eea55ae5b0be6e2a317cbca5ab75b749c8 SHA256 444c130adb3c920c950dd83f970b89fc1c1fb327818ccc3e40d96f92bc799ecf -MISC ChangeLog 2387 RMD160 45f691bc1008e8121d279992f586ef18aada0d53 SHA1 c655976fa206bff705e4f5e761de6f83710f33f5 SHA256 0161caa0caf5a50a16cb237a2419fd99f111197de0134e37b23b7a6d376a3f8e +MISC ChangeLog 3020 RMD160 1f7e88a0861db8278ac872f23fa79786cb6d4d97 SHA1 2c21da49aff0ad3a06bd36c4a4ccddd418fc4313 SHA256 9196161639bcabe004f4b3e9e3c65ce4dd647932a12a2d6db094166840103f96 MISC metadata.xml 163 RMD160 ea1530cd45b9e04e8693261b9a94b5988e4b09a1 SHA1 443b7a3d8fb76c8d20647b165032ad358bfa3b6a SHA256 5a03bf3074b07158dffe793af69f7b0cd1e5c785537574713f9a7978032363a3 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}" +} |