summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/ampi/Manifest1
-rw-r--r--sys-cluster/ampi/ampi-0_pre20140616.ebuild22
-rw-r--r--sys-cluster/ampi/metadata.xml9
-rw-r--r--sys-cluster/c3/Manifest1
-rw-r--r--sys-cluster/c3/c3-4.0.1.ebuild56
-rw-r--r--sys-cluster/c3/metadata.xml5
-rw-r--r--sys-cluster/ccs/Manifest1
-rw-r--r--sys-cluster/ccs/ccs-2.03.09.ebuild62
-rw-r--r--sys-cluster/ccs/files/ccs-2.03.09-mkostemp.patch11
-rw-r--r--sys-cluster/ccs/files/ccsd.conf6
-rwxr-xr-xsys-cluster/ccs/files/ccsd.rc27
-rw-r--r--sys-cluster/ccs/metadata.xml5
-rw-r--r--sys-cluster/ceph/Manifest3
-rw-r--r--sys-cluster/ceph/ceph-0.80.10-r1.ebuild138
-rw-r--r--sys-cluster/ceph/ceph-0.80.9.ebuild137
-rw-r--r--sys-cluster/ceph/ceph-0.94.2-r1.ebuild151
-rw-r--r--sys-cluster/ceph/ceph-9999.ebuild133
-rw-r--r--sys-cluster/ceph/files/README.gentoo18
-rw-r--r--sys-cluster/ceph/files/ceph-0.79-libzfs.patch13
-rw-r--r--sys-cluster/ceph/files/ceph-0.80.10-cpp-backport.patch50
-rw-r--r--sys-cluster/ceph/files/ceph-0.87.1-glibc-2.20.patch59
-rw-r--r--sys-cluster/ceph/files/ceph-fix-gnustack.patch22
-rw-r--r--sys-cluster/ceph/files/ceph-mds_at.service12
-rw-r--r--sys-cluster/ceph/files/ceph-mds_at.service.conf4
-rw-r--r--sys-cluster/ceph/files/ceph-mon_at.service19
-rw-r--r--sys-cluster/ceph/files/ceph-mon_at.service.conf0
-rw-r--r--sys-cluster/ceph/files/ceph-osd_at.service13
-rw-r--r--sys-cluster/ceph/files/ceph-osd_at.service.conf4
-rw-r--r--sys-cluster/ceph/files/ceph.confd-r14
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r148
-rw-r--r--sys-cluster/ceph/files/ceph.logrotate22
-rw-r--r--sys-cluster/ceph/files/ceph.target4
-rw-r--r--sys-cluster/ceph/files/rbdmap.initd122
-rw-r--r--sys-cluster/ceph/metadata.xml25
-rw-r--r--sys-cluster/charm/Manifest3
-rw-r--r--sys-cluster/charm/charm-6.5.1-r1.ebuild208
-rw-r--r--sys-cluster/charm/charm-6.5.1-r2.ebuild209
-rw-r--r--sys-cluster/charm/charm-6.5.1-r3.ebuild213
-rw-r--r--sys-cluster/charm/charm-6.6.0-r1.ebuild210
-rw-r--r--sys-cluster/charm/charm-6.6.0.ebuild210
-rw-r--r--sys-cluster/charm/charm-6.6.1.ebuild219
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch34
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-charmc-gentoo.patch39
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-cleanup-config.patch58
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-fix-markupSanitizer.patch203
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-fix-navmenuGenerator.patch30
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch50
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-static-library-fix.patch396
-rw-r--r--sys-cluster/charm/metadata.xml20
-rw-r--r--sys-cluster/charmdebug/Manifest1
-rw-r--r--sys-cluster/charmdebug/charmdebug-6.2.0-r1.ebuild31
-rw-r--r--sys-cluster/charmdebug/metadata.xml9
-rw-r--r--sys-cluster/cinder/Manifest2
-rw-r--r--sys-cluster/cinder/cinder-2015.1.0-r1.ebuild184
-rw-r--r--sys-cluster/cinder/cinder-2015.1.1.ebuild199
-rw-r--r--sys-cluster/cinder/cinder-2015.1.9999.ebuild200
-rw-r--r--sys-cluster/cinder/files/CVE-2015-1851_2014.2.3.patch85
-rw-r--r--sys-cluster/cinder/files/CVE-2015-1851_2015.1.0.patch85
-rw-r--r--sys-cluster/cinder/files/cinder-confd3
-rw-r--r--sys-cluster/cinder/files/cinder-init58
-rw-r--r--sys-cluster/cinder/files/cinder-sudoers4
-rw-r--r--sys-cluster/cinder/files/cinder.initd24
-rw-r--r--sys-cluster/cinder/files/cinder.sudoersd4
-rw-r--r--sys-cluster/cinder/metadata.xml23
-rw-r--r--sys-cluster/classads/Manifest1
-rw-r--r--sys-cluster/classads/classads-1.0.10.ebuild26
-rw-r--r--sys-cluster/classads/metadata.xml15
-rw-r--r--sys-cluster/cluster-glue/Manifest4
-rw-r--r--sys-cluster/cluster-glue/cluster-glue-1.0.10.ebuild93
-rw-r--r--sys-cluster/cluster-glue/cluster-glue-1.0.11.ebuild94
-rw-r--r--sys-cluster/cluster-glue/cluster-glue-1.0.12.ebuild95
-rw-r--r--sys-cluster/cluster-glue/cluster-glue-1.0.9-r1.ebuild97
-rw-r--r--sys-cluster/cluster-glue/files/1.0.12-respect_cflags.patch11
-rw-r--r--sys-cluster/cluster-glue/files/1.0.5-docs.patch40
-rw-r--r--sys-cluster/cluster-glue/files/1.0.5-respect_cflags.patch11
-rw-r--r--sys-cluster/cluster-glue/files/1.0.7-fix_configure.patch13
-rw-r--r--sys-cluster/cluster-glue/files/1.0.9-glib-2.32.patch13
-rw-r--r--sys-cluster/cluster-glue/files/heartbeat-logd.init47
-rw-r--r--sys-cluster/cluster-glue/metadata.xml10
-rw-r--r--sys-cluster/cman-lib/Manifest1
-rw-r--r--sys-cluster/cman-lib/cman-lib-2.03.09-r1.ebuild47
-rw-r--r--sys-cluster/cman-lib/cman-lib-2.03.09.ebuild49
-rw-r--r--sys-cluster/cman-lib/metadata.xml5
-rw-r--r--sys-cluster/cman/Manifest2
-rw-r--r--sys-cluster/cman/cman-3.1.5-r1.ebuild101
-rw-r--r--sys-cluster/cman/cman-3.1.5.ebuild101
-rw-r--r--sys-cluster/cman/cman-3.2.0.ebuild101
-rw-r--r--sys-cluster/cman/files/cman.confd67
-rw-r--r--sys-cluster/cman/files/cman.initd319
-rw-r--r--sys-cluster/cman/files/cman.initd-3.1.5-r1350
-rw-r--r--sys-cluster/cman/files/qdiskd.initd21
-rw-r--r--sys-cluster/cman/metadata.xml6
-rw-r--r--sys-cluster/corosync/Manifest5
-rw-r--r--sys-cluster/corosync/corosync-1.3.0.ebuild58
-rw-r--r--sys-cluster/corosync/corosync-1.3.5.ebuild59
-rw-r--r--sys-cluster/corosync/corosync-1.4.7.ebuild64
-rw-r--r--sys-cluster/corosync/corosync-2.3.3.ebuild79
-rw-r--r--sys-cluster/corosync/corosync-2.3.4-r1.ebuild80
-rw-r--r--sys-cluster/corosync/files/corosync-2.0.0-docs.patch34
-rw-r--r--sys-cluster/corosync/files/corosync-2.3.4-docs.patch23
-rw-r--r--sys-cluster/corosync/files/corosync-docs.patch37
-rw-r--r--sys-cluster/corosync/files/corosync.initd30
-rw-r--r--sys-cluster/corosync/files/corosync.logrotate5
-rw-r--r--sys-cluster/corosync/metadata.xml19
-rw-r--r--sys-cluster/crmsh/Manifest1
-rw-r--r--sys-cluster/crmsh/crmsh-2.1.1.ebuild56
-rw-r--r--sys-cluster/crmsh/metadata.xml8
-rw-r--r--sys-cluster/csync2/Manifest2
-rw-r--r--sys-cluster/csync2/csync2-1.34-r2.ebuild109
-rw-r--r--sys-cluster/csync2/csync2-2.0.ebuild107
-rw-r--r--sys-cluster/csync2/files/csync2-1.34-gnutls.patch279
-rwxr-xr-xsys-cluster/csync2/files/csync2.initd26
-rw-r--r--sys-cluster/csync2/files/csync2.xinetd15
-rw-r--r--sys-cluster/csync2/metadata.xml5
-rw-r--r--sys-cluster/dlm-lib/Manifest2
-rw-r--r--sys-cluster/dlm-lib/dlm-lib-2.03.09.ebuild51
-rw-r--r--sys-cluster/dlm-lib/dlm-lib-2.03.11.ebuild51
-rw-r--r--sys-cluster/dlm-lib/metadata.xml5
-rw-r--r--sys-cluster/dlm/Manifest2
-rw-r--r--sys-cluster/dlm/dlm-2.03.09.ebuild70
-rw-r--r--sys-cluster/dlm/dlm-2.03.11.ebuild70
-rwxr-xr-xsys-cluster/dlm/files/dlm.rc53
-rw-r--r--sys-cluster/dlm/metadata.xml5
-rw-r--r--sys-cluster/drbd-kernel/Manifest3
-rw-r--r--sys-cluster/drbd-kernel/drbd-kernel-8.0.16.ebuild53
-rw-r--r--sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild51
-rw-r--r--sys-cluster/drbd-kernel/drbd-kernel-8.3.8.1.ebuild51
-rw-r--r--sys-cluster/drbd-kernel/files/drbd-8.0.16-kernel-2.6.30-compile-fix.patch12
-rw-r--r--sys-cluster/drbd-kernel/files/drbd-kernel-8.0.0-scripts.adjust_drbd_config_h.sh.patch23
-rw-r--r--sys-cluster/drbd-kernel/files/drbd-kernel-8.3.6-linux-2.6.32.patch46
-rw-r--r--sys-cluster/drbd-kernel/metadata.xml5
-rw-r--r--sys-cluster/drbd/Manifest11
-rw-r--r--sys-cluster/drbd/drbd-8.0.16.ebuild57
-rw-r--r--sys-cluster/drbd/drbd-8.3.10.ebuild75
-rw-r--r--sys-cluster/drbd/drbd-8.3.11-r1.ebuild76
-rw-r--r--sys-cluster/drbd/drbd-8.3.12.ebuild79
-rw-r--r--sys-cluster/drbd/drbd-8.3.13.ebuild79
-rw-r--r--sys-cluster/drbd/drbd-8.3.15.ebuild79
-rw-r--r--sys-cluster/drbd/drbd-8.3.7.ebuild77
-rw-r--r--sys-cluster/drbd/drbd-8.3.8.1-r1.ebuild78
-rw-r--r--sys-cluster/drbd/drbd-8.3.8.1.ebuild77
-rw-r--r--sys-cluster/drbd/drbd-8.4.0.ebuild79
-rw-r--r--sys-cluster/drbd/drbd-8.4.2.ebuild80
-rw-r--r--sys-cluster/drbd/drbd-8.4.3.ebuild81
-rw-r--r--sys-cluster/drbd/files/drbd-8.0.rc158
-rw-r--r--sys-cluster/drbd/files/drbd-8.3.11-kernel3.patch17
-rw-r--r--sys-cluster/drbd/files/drbd-8.3.8.1-implicits.patch12
-rw-r--r--sys-cluster/drbd/metadata.xml14
-rw-r--r--sys-cluster/fake/Manifest1
-rw-r--r--sys-cluster/fake/fake-1.1.10.ebuild37
-rw-r--r--sys-cluster/fake/files/fix-ldflags.patch12
-rw-r--r--sys-cluster/fake/metadata.xml13
-rw-r--r--sys-cluster/feedbackd-agent/Manifest1
-rw-r--r--sys-cluster/feedbackd-agent/feedbackd-agent-0.4.ebuild40
-rw-r--r--sys-cluster/feedbackd-agent/files/feedbackd-agent-0.4-asneeded.patch40
-rw-r--r--sys-cluster/feedbackd-agent/metadata.xml8
-rw-r--r--sys-cluster/feedbackd-master/Manifest1
-rw-r--r--sys-cluster/feedbackd-master/feedbackd-master-0.4.ebuild35
-rw-r--r--sys-cluster/feedbackd-master/metadata.xml11
-rw-r--r--sys-cluster/fence-agents/Manifest1
-rw-r--r--sys-cluster/fence-agents/fence-agents-3.1.5-r1.ebuild66
-rw-r--r--sys-cluster/fence-agents/fence-agents-3.1.5-r2.ebuild72
-rw-r--r--sys-cluster/fence-agents/metadata.xml6
-rw-r--r--sys-cluster/galera/Manifest2
-rw-r--r--sys-cluster/galera/files/disable-tests.patch80
-rw-r--r--sys-cluster/galera/files/galera-strip-machine-cflags.patch62
-rw-r--r--sys-cluster/galera/files/garb.cnf17
-rw-r--r--sys-cluster/galera/files/garb.sh63
-rw-r--r--sys-cluster/galera/files/respect-flags.patch35
-rw-r--r--sys-cluster/galera/galera-25.3.10.ebuild95
-rw-r--r--sys-cluster/galera/galera-25.3.5.ebuild87
-rw-r--r--sys-cluster/galera/metadata.xml11
-rw-r--r--sys-cluster/ganglia-web/Manifest2
-rw-r--r--sys-cluster/ganglia-web/files/CVE-2013-6395-fix-xss.patch27
-rw-r--r--sys-cluster/ganglia-web/ganglia-web-3.5.10-r1.ebuild61
-rw-r--r--sys-cluster/ganglia-web/ganglia-web-3.5.8-r1.ebuild61
-rw-r--r--sys-cluster/ganglia-web/metadata.xml11
-rw-r--r--sys-cluster/ganglia/Manifest3
-rw-r--r--sys-cluster/ganglia/files/ganglia-3.1.1-ctype-c99.patch13
-rw-r--r--sys-cluster/ganglia/files/ganglia-3.1.1-multidisk-group.patch11
-rw-r--r--sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow-r1.patch48
-rw-r--r--sys-cluster/ganglia/files/gmetad-python.rc31
-rwxr-xr-xsys-cluster/ganglia/files/gmetad.rc18
-rwxr-xr-xsys-cluster/ganglia/files/gmetad.rc-228
-rwxr-xr-xsys-cluster/ganglia/files/gmond.rc18
-rwxr-xr-xsys-cluster/ganglia/files/gmond.rc-228
-rw-r--r--sys-cluster/ganglia/ganglia-3.5.0-r1.ebuild90
-rw-r--r--sys-cluster/ganglia/ganglia-3.5.0.ebuild89
-rw-r--r--sys-cluster/ganglia/ganglia-3.6.0-r1.ebuild93
-rw-r--r--sys-cluster/ganglia/ganglia-3.7.1-r1.ebuild127
-rw-r--r--sys-cluster/ganglia/ganglia-3.7.1.ebuild91
-rw-r--r--sys-cluster/ganglia/metadata.xml11
-rw-r--r--sys-cluster/gearmand/Manifest1
-rw-r--r--sys-cluster/gearmand/files/gearmand.conf.d39
-rw-r--r--sys-cluster/gearmand/files/gearmand.init.d.278
-rw-r--r--sys-cluster/gearmand/gearmand-0.34-r1.ebuild85
-rw-r--r--sys-cluster/gearmand/metadata.xml28
-rw-r--r--sys-cluster/gfs-kernel/Manifest1
-rw-r--r--sys-cluster/gfs-kernel/gfs-kernel-2.03.09.ebuild70
-rw-r--r--sys-cluster/gfs-kernel/metadata.xml5
-rw-r--r--sys-cluster/glusterfs/Manifest4
-rw-r--r--sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el5
-rw-r--r--sys-cluster/glusterfs/files/glusterd-3.2.0-workdir.patch49
-rw-r--r--sys-cluster/glusterfs/files/glusterd-r1.initd16
-rw-r--r--sys-cluster/glusterfs/files/glusterd-r2.initd33
-rw-r--r--sys-cluster/glusterfs/files/glusterd-workdir.patch49
-rw-r--r--sys-cluster/glusterfs/files/glusterd.initd36
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.1.0-parallel-build.patch22
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.3.0-avoid-version.patch431
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.3.0-docdir.patch26
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.3.0-parallel-build.patch20
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.3.0-silent_rules.patch25
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.4.0-build-shared-only.patch505
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.4.0-nfs-exit-when-all-volumes-are-disabled.patch42
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.4.0-silent_rules.patch23
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.4.4-cluster-dht-Don-t-do-extra-unref-in-dht-migration-ch.patch48
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.4.4-fuse-fix-memory-leak-in-fuse_getxattr.patch91
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.5.1-Add-libraries-using-LIBADD-instead-of-LDFLAGS.patch54
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.5.1-build-shared-only.patch576
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-docdir.patch51
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-r1.initd122
-rw-r--r--sys-cluster/glusterfs/files/glusterfs.confd6
-rw-r--r--sys-cluster/glusterfs/files/glusterfs.initd120
-rw-r--r--sys-cluster/glusterfs/files/glusterfs.logrotate34
-rw-r--r--sys-cluster/glusterfs/files/glusterfs.vim8
-rw-r--r--sys-cluster/glusterfs/glusterfs-3.1.2.ebuild112
-rw-r--r--sys-cluster/glusterfs/glusterfs-3.2.7.ebuild122
-rw-r--r--sys-cluster/glusterfs/glusterfs-3.3.1-r2.ebuild135
-rw-r--r--sys-cluster/glusterfs/glusterfs-3.5.3.ebuild174
-rw-r--r--sys-cluster/glusterfs/metadata.xml21
-rw-r--r--sys-cluster/heartbeat/Manifest1
-rw-r--r--sys-cluster/heartbeat/files/3.0.4-docs.patch57
-rw-r--r--sys-cluster/heartbeat/files/3.0.4-fix_configure.patch110
-rw-r--r--sys-cluster/heartbeat/files/3.0.4-python_tests.patch29
-rw-r--r--sys-cluster/heartbeat/files/3.0.5-fix_ucast.patch145
-rw-r--r--sys-cluster/heartbeat/files/heartbeat-init93
-rw-r--r--sys-cluster/heartbeat/heartbeat-3.0.5-r2.ebuild87
-rw-r--r--sys-cluster/heartbeat/metadata.xml9
-rw-r--r--sys-cluster/hpl/Manifest1
-rw-r--r--sys-cluster/hpl/hpl-2.0-r3.ebuild66
-rw-r--r--sys-cluster/hpl/metadata.xml5
-rw-r--r--sys-cluster/hpx/Manifest3
-rw-r--r--sys-cluster/hpx/files/hpx-0.9.8-cmake_dir.patch27
-rw-r--r--sys-cluster/hpx/files/hpx-0.9.8-install-path.patch69
-rw-r--r--sys-cluster/hpx/files/hpx-0.9.8-multilib.patch163
-rw-r--r--sys-cluster/hpx/hpx-0.9.10.ebuild78
-rw-r--r--sys-cluster/hpx/hpx-0.9.8.ebuild87
-rw-r--r--sys-cluster/hpx/hpx-0.9.9.ebuild80
-rw-r--r--sys-cluster/hpx/metadata.xml27
-rw-r--r--sys-cluster/ipvsadm/Manifest4
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.26-buildsystem.patch113
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.26-stack_smashing.patch32
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch117
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.27-fix-daemon-state.patch56
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-init37
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.21-r1.ebuild50
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.24.ebuild53
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.26-r2.ebuild65
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.27-r1.ebuild67
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.27.ebuild67
-rw-r--r--sys-cluster/ipvsadm/metadata.xml9
-rw-r--r--sys-cluster/keepalived/Manifest7
-rw-r--r--sys-cluster/keepalived/files/conf-keepalived7
-rw-r--r--sys-cluster/keepalived/files/init-keepalived44
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.1.20-do-not-need-kernel-sources.patch110
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.2.2-bind-afunspec.patch13
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.2.2-fix-ipv4-addr-compare.patch23
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-backup-daemon.patch51
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-ipv6.patch33
-rw-r--r--sys-cluster/keepalived/files/keepalived.confd7
-rw-r--r--sys-cluster/keepalived/files/keepalived.init34
-rw-r--r--sys-cluster/keepalived/keepalived-1.2.15.ebuild64
-rw-r--r--sys-cluster/keepalived/keepalived-1.2.16.ebuild64
-rw-r--r--sys-cluster/keepalived/keepalived-1.2.18.ebuild64
-rw-r--r--sys-cluster/keepalived/keepalived-1.2.19.ebuild64
-rw-r--r--sys-cluster/keepalived/keepalived-1.2.2-r4.ebuild67
-rw-r--r--sys-cluster/keepalived/keepalived-1.2.9.ebuild65
-rw-r--r--sys-cluster/keepalived/metadata.xml8
-rw-r--r--sys-cluster/knem/Manifest1
-rw-r--r--sys-cluster/knem/files/45-knem.rules1
-rw-r--r--sys-cluster/knem/knem-1.1.1.ebuild76
-rw-r--r--sys-cluster/knem/knem-9999.ebuild76
-rw-r--r--sys-cluster/knem/metadata.xml9
-rw-r--r--sys-cluster/libccs-perl/Manifest1
-rw-r--r--sys-cluster/libccs-perl/libccs-perl-3.1.5.ebuild43
-rw-r--r--sys-cluster/libccs-perl/metadata.xml6
-rw-r--r--sys-cluster/libccs/Manifest2
-rw-r--r--sys-cluster/libccs/libccs-3.1.5.ebuild51
-rw-r--r--sys-cluster/libccs/libccs-3.2.0.ebuild51
-rw-r--r--sys-cluster/libccs/metadata.xml6
-rw-r--r--sys-cluster/libcircle/Manifest1
-rw-r--r--sys-cluster/libcircle/libcircle-0.2.0_rc1.ebuild44
-rw-r--r--sys-cluster/libcircle/metadata.xml12
-rw-r--r--sys-cluster/libcman/Manifest2
-rw-r--r--sys-cluster/libcman/libcman-3.1.5.ebuild47
-rw-r--r--sys-cluster/libcman/libcman-3.2.0.ebuild47
-rw-r--r--sys-cluster/libcman/metadata.xml6
-rw-r--r--sys-cluster/libdlm/Manifest2
-rw-r--r--sys-cluster/libdlm/libdlm-3.1.5.ebuild63
-rw-r--r--sys-cluster/libdlm/libdlm-3.2.0.ebuild70
-rw-r--r--sys-cluster/libdlm/metadata.xml6
-rw-r--r--sys-cluster/libfence/Manifest2
-rw-r--r--sys-cluster/libfence/libfence-3.1.5.ebuild60
-rw-r--r--sys-cluster/libfence/libfence-3.2.0.ebuild60
-rw-r--r--sys-cluster/libfence/metadata.xml6
-rw-r--r--sys-cluster/liblogthread/Manifest2
-rw-r--r--sys-cluster/liblogthread/liblogthread-3.1.5.ebuild47
-rw-r--r--sys-cluster/liblogthread/liblogthread-3.2.0.ebuild47
-rw-r--r--sys-cluster/liblogthread/metadata.xml6
-rw-r--r--sys-cluster/libqb/Manifest5
-rw-r--r--sys-cluster/libqb/libqb-0.13.0.ebuild52
-rw-r--r--sys-cluster/libqb/libqb-0.14.3.ebuild52
-rw-r--r--sys-cluster/libqb/libqb-0.14.4.ebuild52
-rw-r--r--sys-cluster/libqb/libqb-0.17.0.ebuild52
-rw-r--r--sys-cluster/libqb/libqb-0.17.1.ebuild52
-rw-r--r--sys-cluster/libqb/metadata.xml8
-rw-r--r--sys-cluster/libquo/Manifest3
-rw-r--r--sys-cluster/libquo/libquo-1.2.2.ebuild29
-rw-r--r--sys-cluster/libquo/libquo-1.2.3.ebuild35
-rw-r--r--sys-cluster/libquo/libquo-1.2.ebuild29
-rw-r--r--sys-cluster/libquo/metadata.xml9
-rw-r--r--sys-cluster/lspbs/Manifest1
-rw-r--r--sys-cluster/lspbs/lspbs-1.1-r1.ebuild24
-rw-r--r--sys-cluster/lspbs/metadata.xml20
-rw-r--r--sys-cluster/maui/Manifest4
-rw-r--r--sys-cluster/maui/files/3.2.6_p16-autoconf-2.60-compat.patch17
-rw-r--r--sys-cluster/maui/files/3.2.6_p16-link-pbs-after-moab.patch25
-rw-r--r--sys-cluster/maui/files/3.2.6_p16-set-pbs-cflags-ldflags.patch26
-rw-r--r--sys-cluster/maui/files/3.2.6_p21-autoconf-2.60-compat.patch11
-rw-r--r--sys-cluster/maui/files/maui-3.2.6_p21-pbs-nodefile.patch23
-rw-r--r--sys-cluster/maui/files/maui-3.3.1-torque_4.patch14
-rw-r--r--sys-cluster/maui/files/maui.initd24
-rw-r--r--sys-cluster/maui/maui-3.2.6_p16.ebuild45
-rw-r--r--sys-cluster/maui/maui-3.2.6_p21-r1.ebuild46
-rw-r--r--sys-cluster/maui/maui-3.2.6_p21.ebuild44
-rw-r--r--sys-cluster/maui/maui-3.3.1-r2.ebuild60
-rw-r--r--sys-cluster/maui/maui-3.3.1-r3.ebuild62
-rw-r--r--sys-cluster/maui/maui-3.3.ebuild50
-rw-r--r--sys-cluster/maui/metadata.xml9
-rw-r--r--sys-cluster/metadata.xml29
-rw-r--r--sys-cluster/moosefs/Manifest2
-rw-r--r--sys-cluster/moosefs/files/mfs.confd11
-rw-r--r--sys-cluster/moosefs/files/mfs.initd-r196
-rw-r--r--sys-cluster/moosefs/files/mfscgiserver.confd9
-rw-r--r--sys-cluster/moosefs/files/mfscgiserver.initd-r129
-rw-r--r--sys-cluster/moosefs/metadata.xml13
-rw-r--r--sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild67
-rw-r--r--sys-cluster/moosefs/moosefs-1.6.27.ebuild67
-rw-r--r--sys-cluster/mpe2/Manifest1
-rw-r--r--sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch68
-rw-r--r--sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch68
-rw-r--r--sys-cluster/mpe2/metadata.xml9
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild144
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild152
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild142
-rw-r--r--sys-cluster/mpich/Manifest3
-rw-r--r--sys-cluster/mpich/metadata.xml18
-rw-r--r--sys-cluster/mpich/mpich-3.0.4.ebuild114
-rw-r--r--sys-cluster/mpich/mpich-3.1.3.ebuild114
-rw-r--r--sys-cluster/mpich/mpich-3.1.4.ebuild114
-rw-r--r--sys-cluster/mpich2/Manifest1
-rw-r--r--sys-cluster/mpich2/metadata.xml14
-rw-r--r--sys-cluster/mpich2/mpich2-1.5.ebuild112
-rw-r--r--sys-cluster/mvapich2/Manifest1
-rw-r--r--sys-cluster/mvapich2/metadata.xml13
-rw-r--r--sys-cluster/mvapich2/mvapich2-1.6.ebuild146
-rw-r--r--sys-cluster/native-mpi/metadata.xml9
-rw-r--r--sys-cluster/native-mpi/native-mpi-0.ebuild35
-rw-r--r--sys-cluster/neutron/Manifest2
-rw-r--r--sys-cluster/neutron/files/cve-2015-3221_2015.1.0.patch127
-rw-r--r--sys-cluster/neutron/files/neutron-dhcp-agent.confd2
-rw-r--r--sys-cluster/neutron/files/neutron-l3-agent.confd2
-rw-r--r--sys-cluster/neutron/files/neutron-linuxbridge-agent.confd1
-rw-r--r--sys-cluster/neutron/files/neutron-metadata-agent.confd2
-rw-r--r--sys-cluster/neutron/files/neutron-openvswitch-agent.confd1
-rw-r--r--sys-cluster/neutron/files/neutron-ovs-cleanup.confd1
-rw-r--r--sys-cluster/neutron/files/neutron-server.confd1
-rw-r--r--sys-cluster/neutron/files/neutron.initd21
-rw-r--r--sys-cluster/neutron/files/neutron.sudoersd4
-rw-r--r--sys-cluster/neutron/metadata.xml29
-rw-r--r--sys-cluster/neutron/neutron-2015.1.0-r2.ebuild249
-rw-r--r--sys-cluster/neutron/neutron-2015.1.1.ebuild252
-rw-r--r--sys-cluster/neutron/neutron-2015.1.9999.ebuild253
-rw-r--r--sys-cluster/nova/Manifest2
-rw-r--r--sys-cluster/nova/files/nova-sudoers3
-rw-r--r--sys-cluster/nova/files/nova.initd20
-rw-r--r--sys-cluster/nova/files/openstack-scsi-disk.rules2
-rw-r--r--sys-cluster/nova/files/scsi-openscsi-link.sh93
-rw-r--r--sys-cluster/nova/metadata.xml27
-rw-r--r--sys-cluster/nova/nova-2015.1.0-r3.ebuild200
-rw-r--r--sys-cluster/nova/nova-2015.1.1-r1.ebuild251
-rw-r--r--sys-cluster/nova/nova-2015.1.9999.ebuild252
-rw-r--r--sys-cluster/ocfs/Manifest1
-rw-r--r--sys-cluster/ocfs/metadata.xml8
-rw-r--r--sys-cluster/ocfs/ocfs-1.0.14.ebuild55
-rw-r--r--sys-cluster/onesis/Manifest1
-rw-r--r--sys-cluster/onesis/metadata.xml8
-rw-r--r--sys-cluster/onesis/onesis-2.0.2.ebuild23
-rw-r--r--sys-cluster/open-mx/Manifest1
-rw-r--r--sys-cluster/open-mx/files/omxoed.initd46
-rw-r--r--sys-cluster/open-mx/files/open-mx-1.4.0-driver.patch14
-rw-r--r--sys-cluster/open-mx/metadata.xml9
-rw-r--r--sys-cluster/open-mx/open-mx-1.5.2-r1.ebuild79
-rw-r--r--sys-cluster/openais/Manifest1
-rw-r--r--sys-cluster/openais/metadata.xml14
-rw-r--r--sys-cluster/openais/openais-1.1.4-r1.ebuild46
-rw-r--r--sys-cluster/openmpi/Manifest7
-rw-r--r--sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch42
-rw-r--r--sys-cluster/openmpi/files/openmpi-1.4.1-r22513.patch72
-rw-r--r--sys-cluster/openmpi/files/openmpi-1.6-hostfile.patch16
-rw-r--r--sys-cluster/openmpi/files/openmpi-ltdl.patch78
-rw-r--r--sys-cluster/openmpi/files/openmpi-r24328.patch54
-rw-r--r--sys-cluster/openmpi/metadata.xml19
-rw-r--r--sys-cluster/openmpi/openmpi-1.4.3.ebuild102
-rw-r--r--sys-cluster/openmpi/openmpi-1.4.5.ebuild104
-rw-r--r--sys-cluster/openmpi/openmpi-1.6.5-r1.ebuild171
-rw-r--r--sys-cluster/openmpi/openmpi-1.7.5-r1.ebuild167
-rw-r--r--sys-cluster/openmpi/openmpi-1.8.4-r4.ebuild170
-rw-r--r--sys-cluster/openmpi/openmpi-1.8.7-r1.ebuild183
-rw-r--r--sys-cluster/openmpi/openmpi-1.8.8.ebuild183
-rw-r--r--sys-cluster/openstack-meta/metadata.xml20
-rw-r--r--sys-cluster/openstack-meta/openstack-meta-2014.2.9999.ebuild21
-rw-r--r--sys-cluster/openstack-meta/openstack-meta-2015.1.9999.ebuild21
-rw-r--r--sys-cluster/osc-mpiexec/Manifest1
-rw-r--r--sys-cluster/osc-mpiexec/metadata.xml5
-rw-r--r--sys-cluster/osc-mpiexec/osc-mpiexec-0.83.ebuild64
-rw-r--r--sys-cluster/pacemaker-gui/Manifest1
-rw-r--r--sys-cluster/pacemaker-gui/files/pacemaker-gui-2.1.1-doc.patch11
-rw-r--r--sys-cluster/pacemaker-gui/files/pacemaker-mgmt-query-node-uuid.patch13
-rw-r--r--sys-cluster/pacemaker-gui/metadata.xml13
-rw-r--r--sys-cluster/pacemaker-gui/pacemaker-gui-2.1.2.ebuild91
-rw-r--r--sys-cluster/pacemaker/Manifest1
-rw-r--r--sys-cluster/pacemaker/files/1.0.12-BUILD_VERSION.patch43
-rw-r--r--sys-cluster/pacemaker/files/1.1.7-glibc2.16.patch13
-rw-r--r--sys-cluster/pacemaker/files/1.1.8-backwards_compatibility.patch36
-rw-r--r--sys-cluster/pacemaker/files/pacemaker-1.0.10-asneeded.patch22
-rw-r--r--sys-cluster/pacemaker/files/pacemaker-1.0.10-installpaths.patch9
-rw-r--r--sys-cluster/pacemaker/files/pacemaker-1.1.10-tinfo.patch21
-rw-r--r--sys-cluster/pacemaker/files/pacemaker-1.1.12-glib.patch47
-rw-r--r--sys-cluster/pacemaker/files/pacemaker-1.1.12-stonith.patch21
-rw-r--r--sys-cluster/pacemaker/files/pacemaker.initd42
-rw-r--r--sys-cluster/pacemaker/files/pacemaker.service5
-rw-r--r--sys-cluster/pacemaker/files/ping380
-rw-r--r--sys-cluster/pacemaker/metadata.xml18
-rw-r--r--sys-cluster/pacemaker/pacemaker-1.1.12-r2.ebuild101
-rw-r--r--sys-cluster/pbs-python/Manifest1
-rw-r--r--sys-cluster/pbs-python/metadata.xml5
-rw-r--r--sys-cluster/pbs-python/pbs-python-4.3.3-r1.ebuild42
-rw-r--r--sys-cluster/pconsole/Manifest1
-rw-r--r--sys-cluster/pconsole/files/pconsole-1.0-exit-warn.patch10
-rw-r--r--sys-cluster/pconsole/metadata.xml5
-rw-r--r--sys-cluster/pconsole/pconsole-1.0-r3.ebuild41
-rw-r--r--sys-cluster/ploop/Manifest1
-rw-r--r--sys-cluster/ploop/files/ploop-1.2-soname.patch19
-rw-r--r--sys-cluster/ploop/files/ploop.tmpfiles1
-rw-r--r--sys-cluster/ploop/metadata.xml10
-rw-r--r--sys-cluster/ploop/ploop-1.13.2.ebuild59
-rw-r--r--sys-cluster/polysh/Manifest1
-rw-r--r--sys-cluster/polysh/metadata.xml11
-rw-r--r--sys-cluster/polysh/polysh-0.4-r1.ebuild17
-rw-r--r--sys-cluster/poolmon/Manifest1
-rw-r--r--sys-cluster/poolmon/files/poolmon.conf3
-rw-r--r--sys-cluster/poolmon/files/poolmon.init18
-rw-r--r--sys-cluster/poolmon/files/poolmon.logrotate6
-rw-r--r--sys-cluster/poolmon/metadata.xml11
-rw-r--r--sys-cluster/poolmon/poolmon-0.5.ebuild29
-rw-r--r--sys-cluster/projections/Manifest1
-rw-r--r--sys-cluster/projections/metadata.xml9
-rw-r--r--sys-cluster/projections/projections-6.2.1.ebuild30
-rw-r--r--sys-cluster/resource-agents/Manifest4
-rw-r--r--sys-cluster/resource-agents/files/1.0.3-docs.patch31
-rw-r--r--sys-cluster/resource-agents/files/1.0.3-respect_cflags.patch11
-rw-r--r--sys-cluster/resource-agents/files/1.0.4-dosymlinks.patch25
-rw-r--r--sys-cluster/resource-agents/files/3.9.4-configure.patch30
-rw-r--r--sys-cluster/resource-agents/metadata.xml19
-rw-r--r--sys-cluster/resource-agents/resource-agents-1.0.4-r1.ebuild62
-rw-r--r--sys-cluster/resource-agents/resource-agents-1.0.4-r2.ebuild63
-rw-r--r--sys-cluster/resource-agents/resource-agents-3.9.4.ebuild64
-rw-r--r--sys-cluster/resource-agents/resource-agents-3.9.5.ebuild64
-rw-r--r--sys-cluster/resource-agents/resource-agents-3.9.6.ebuild64
-rw-r--r--sys-cluster/rgmanager-agents/Manifest1
-rw-r--r--sys-cluster/rgmanager-agents/metadata.xml6
-rw-r--r--sys-cluster/rgmanager-agents/rgmanager-agents-3.9.2.ebuild65
-rw-r--r--sys-cluster/rgmanager/Manifest2
-rw-r--r--sys-cluster/rgmanager/files/rgmanager-2.03.09-CVE-2010-3389.patch36
-rw-r--r--sys-cluster/rgmanager/files/rgmanager-2.0x.conf5
-rwxr-xr-xsys-cluster/rgmanager/files/rgmanager-2.0x.rc110
-rw-r--r--sys-cluster/rgmanager/files/rgmanager-3.1.5-fix_libxml2.patch23
-rw-r--r--sys-cluster/rgmanager/files/rgmanager.confd8
-rw-r--r--sys-cluster/rgmanager/files/rgmanager.initd35
-rw-r--r--sys-cluster/rgmanager/metadata.xml5
-rw-r--r--sys-cluster/rgmanager/rgmanager-2.03.09-r1.ebuild64
-rw-r--r--sys-cluster/rgmanager/rgmanager-2.03.09.ebuild63
-rw-r--r--sys-cluster/rgmanager/rgmanager-3.1.5.ebuild64
-rw-r--r--sys-cluster/slurm/Manifest1
-rw-r--r--sys-cluster/slurm/files/logrotate20
-rw-r--r--sys-cluster/slurm/files/slurm-2.5.4-nogtk.patch43
-rw-r--r--sys-cluster/slurm/files/slurm.confd6
-rw-r--r--sys-cluster/slurm/files/slurmctld.initd69
-rw-r--r--sys-cluster/slurm/files/slurmd.initd72
-rw-r--r--sys-cluster/slurm/files/slurmdbd.initd67
-rw-r--r--sys-cluster/slurm/metadata.xml15
-rw-r--r--sys-cluster/slurm/slurm-2.6.3.ebuild261
-rw-r--r--sys-cluster/swift/Manifest2
-rw-r--r--sys-cluster/swift/files/cve-2015-1856-master-kilo.patch253
-rw-r--r--sys-cluster/swift/files/swift-account.initd36
-rw-r--r--sys-cluster/swift/files/swift-container.initd36
-rw-r--r--sys-cluster/swift/files/swift-object.initd36
-rw-r--r--sys-cluster/swift/files/swift-proxy.initd57
-rw-r--r--sys-cluster/swift/metadata.xml23
-rw-r--r--sys-cluster/swift/swift-2.2.2-r1.ebuild121
-rw-r--r--sys-cluster/swift/swift-2.3.0.ebuild122
-rw-r--r--sys-cluster/torque/Manifest3
-rw-r--r--sys-cluster/torque/files/CVE-2013-4319-2.x-root-submit-fix.patch40
-rw-r--r--sys-cluster/torque/files/CVE-2013-4319-4.x-root-submit-fix.patch38
-rw-r--r--sys-cluster/torque/files/CVE-2013-4495.4.1.patch343
-rw-r--r--sys-cluster/torque/files/CVE-2013-4495.patch32
-rw-r--r--sys-cluster/torque/files/CVE-2014-0749.patch32
-rw-r--r--sys-cluster/torque/files/TRQ-2885-limit-tm_adopt-to-only-adopt-a-session-id-t.patch134
-rw-r--r--sys-cluster/torque/files/pbs_mom-init.d48
-rw-r--r--sys-cluster/torque/files/pbs_mom-init.d-munge48
-rw-r--r--sys-cluster/torque/files/pbs_sched-init.d48
-rw-r--r--sys-cluster/torque/files/pbs_server-init.d60
-rw-r--r--sys-cluster/torque/files/pbs_server-init.d-munge61
-rw-r--r--sys-cluster/torque/files/tcl8.6.patch87
-rw-r--r--sys-cluster/torque/files/torque-4.1.5.1-tcl8.6.patch93
-rw-r--r--sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch99
-rw-r--r--sys-cluster/torque/files/torque-conf.d14
-rw-r--r--sys-cluster/torque/files/torque-conf.d-munge18
-rw-r--r--sys-cluster/torque/files/torque-env.d7
-rw-r--r--sys-cluster/torque/files/trqauthd-init.d27
-rw-r--r--sys-cluster/torque/metadata.xml15
-rw-r--r--sys-cluster/torque/torque-2.5.13.ebuild252
-rw-r--r--sys-cluster/torque/torque-4.1.7.ebuild229
-rw-r--r--sys-cluster/torque/torque-4.2.9-r4.ebuild178
-rw-r--r--sys-cluster/util-vserver/Manifest2
-rw-r--r--sys-cluster/util-vserver/files/bash_completion300
-rw-r--r--sys-cluster/util-vserver/files/util-vserver-0.30.216-varlock.patch19
-rw-r--r--sys-cluster/util-vserver/metadata.xml13
-rw-r--r--sys-cluster/util-vserver/util-vserver-0.30.216_pre3025.ebuild100
-rw-r--r--sys-cluster/util-vserver/util-vserver-0.30.216_pre3062.ebuild96
-rw-r--r--sys-cluster/vzctl/Manifest2
-rw-r--r--sys-cluster/vzctl/files/vzctl-initscript-paths.patch142
-rw-r--r--sys-cluster/vzctl/files/vzctl-initscript-typo-patch-4.8.patch32
-rw-r--r--sys-cluster/vzctl/metadata.xml20
-rw-r--r--sys-cluster/vzctl/vzctl-4.9.1.ebuild85
-rw-r--r--sys-cluster/vzctl/vzctl-4.9.2.ebuild86
-rw-r--r--sys-cluster/wulfware/Manifest1
-rw-r--r--sys-cluster/wulfware/files/wulfware-2.6.0-opts_and_strip.patch142
-rw-r--r--sys-cluster/wulfware/metadata.xml8
-rw-r--r--sys-cluster/wulfware/wulfware-2.6.0.ebuild53
-rw-r--r--sys-cluster/xgridagent/Manifest1
-rw-r--r--sys-cluster/xgridagent/metadata.xml5
-rw-r--r--sys-cluster/xgridagent/xgridagent-1.0.ebuild26
554 files changed, 29563 insertions, 0 deletions
diff --git a/sys-cluster/ampi/Manifest b/sys-cluster/ampi/Manifest
new file mode 100644
index 00000000000..d51610a4d2c
--- /dev/null
+++ b/sys-cluster/ampi/Manifest
@@ -0,0 +1 @@
+DIST ampi-0_pre20140616.tar.gz 1127315 SHA256 9c02f957f8221c5a85450fe52cd164f8062f23dadf2ba59ec5c92b2c862dadca SHA512 b6a8790c1686a32546194fa6c3818aa9d2ba08911621d5251e85a4114dad75e350f18560cf0527811c487f804265bc09a4b80faeab5eafbd670e4dfa103fe078 WHIRLPOOL f36e9b0e2958d8ad9c5fcb0a1794c536729b0bf488a77e585a84b7819981d78154c2a6b68f35844b87e62751bed97e479a367bac4c5c60ee32d08f72bef50f7a
diff --git a/sys-cluster/ampi/ampi-0_pre20140616.ebuild b/sys-cluster/ampi/ampi-0_pre20140616.ebuild
new file mode 100644
index 00000000000..bed60bd1bbc
--- /dev/null
+++ b/sys-cluster/ampi/ampi-0_pre20140616.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="MPI library for algorithmic differentiation"
+HOMEPAGE="http://www.mcs.anl.gov/~utke/AdjoinableMPI/AdjoinableMPIDox/index.html"
+SRC_URI="http://dev.gentoo.org/~jauhien/distfiles/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="virtual/mpi"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
diff --git a/sys-cluster/ampi/metadata.xml b/sys-cluster/ampi/metadata.xml
new file mode 100644
index 00000000000..58ee15ee5ec
--- /dev/null
+++ b/sys-cluster/ampi/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>jauhien@gentoo.org</email>
+ <name>Jauhien Piatlicki</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-cluster/c3/Manifest b/sys-cluster/c3/Manifest
new file mode 100644
index 00000000000..88d86c55f33
--- /dev/null
+++ b/sys-cluster/c3/Manifest
@@ -0,0 +1 @@
+DIST c3-4.0.1.tar.gz 55142 SHA256 263db9a724a8a6595e110f61d60878897acde23c30a8d8e7ed4238261094cd06 SHA512 a8ace5605709dd713f1686f3e13cd635d0d38224c835b43d0a02f255ddbd77fb9bbd4bbc0a1fac2d08a84bea2e98215264681381d9e9113ae737cc3a23a8dc89 WHIRLPOOL a3c6cbf1782b1ecabb0fa455bab8219fdeba353000e2e871aaa0be92ee3f25370b350c36b4287c08441a35f8c5eeefe12188f0dba11f808b348539a777850de0
diff --git a/sys-cluster/c3/c3-4.0.1.ebuild b/sys-cluster/c3/c3-4.0.1.ebuild
new file mode 100644
index 00000000000..a38f3c5daae
--- /dev/null
+++ b/sys-cluster/c3/c3-4.0.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="The Cluster Command and Control (C3) tool suite"
+HOMEPAGE="http://www.csm.ornl.gov/torc/C3/"
+SRC_URI="http://www.csm.ornl.gov/torc/C3/Software/${PV}/${P}.tar.gz"
+LICENSE="C3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+# Everything it needs is in "system" (profiles/base/packages)
+DEPEND=""
+
+src_compile() {
+ :
+}
+
+src_install() {
+ # The Install-c3 script is a complete hack, so we do this ourselves.
+ # CHANGELOG says it's FHS-compliant to put stuff here, so we'll believe it.
+ local C3DIR="/opt/c3-4"
+ dodir ${C3DIR}
+
+ # "libraries"
+ insinto ${C3DIR}
+ doins *.py
+
+ # tools
+ exeinto ${C3DIR}
+ # Everything's in the same dir, so we need to weed out non-tool things
+ local TOOL
+ for TOOL in $(find ${S} -maxdepth 1 -type f -name 'c*' -not -name '*.*'); do
+ doexe ${TOOL}
+ done
+ # Get systemimager-using tool out of bin, since systemimager isn't in
+ # portage
+ dodoc ${D}/${C3DIR}/cpushimage
+ rm ${D}/${C3DIR}/cpushimage
+
+ dodoc README README.scale CHANGELOG KNOWN_BUGS
+ docinto contrib
+ dodoc contrib/*
+
+ doman man/man*/*
+
+ # Create env.d file
+ echo "PATH=${C3DIR}" > ${T}/40${PN}
+ echo "ROOTPATH=${C3DIR}" >> ${T}/40${PN}
+ doenvd ${T}/40${PN}
+}
+
+pkg_postinst() {
+ einfo "Because systemimager is not in Portage, cpushimage"
+ einfo "has been installed to /usr/share/doc/${P}/."
+}
diff --git a/sys-cluster/c3/metadata.xml b/sys-cluster/c3/metadata.xml
new file mode 100644
index 00000000000..348e6c4de81
--- /dev/null
+++ b/sys-cluster/c3/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+</pkgmetadata>
diff --git a/sys-cluster/ccs/Manifest b/sys-cluster/ccs/Manifest
new file mode 100644
index 00000000000..73196da78bf
--- /dev/null
+++ b/sys-cluster/ccs/Manifest
@@ -0,0 +1 @@
+DIST cluster-2.03.09.tar.gz 1784357 RMD160 9ac5c3fd0fece8ec17bd31d116c43b33612741d0 SHA1 c2cdbc657da2a9efde4b1e6d2657170e1c09b5b8 SHA256 b6d6f35f58b2f8628c369391e0fd01b1803af40029ec1e6ef88865dda38b855f
diff --git a/sys-cluster/ccs/ccs-2.03.09.ebuild b/sys-cluster/ccs/ccs-2.03.09.ebuild
new file mode 100644
index 00000000000..41ceeb976da
--- /dev/null
+++ b/sys-cluster/ccs/ccs-2.03.09.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="cluster configuration system to manage the cluster config file"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="=sys-cluster/cman-lib-${CLUSTER_RELEASE}*"
+DEPEND="${RDEPEND}
+ dev-libs/libxml2
+ sys-libs/zlib"
+
+S="${WORKDIR}/${MY_P}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/ccs-2.03.09-mkostemp.patch || die
+}
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --disable_kernel_check \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ --cmanlibdir=/usr/lib \
+ --cmanincdir=/usr/include \
+ ) || die "configure problem"
+
+ # fix the manual pages have executable bit
+ sed -i -e '
+ /\tinstall -d/s/install/& -m 0755/; t
+ /\tinstall/s/install/& -m 0644/' \
+ man/Makefile
+
+ #rm -f "${S}"/lib/log.c || die
+
+ emake clean || die "clean problem"
+ emake || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install problem"
+}
diff --git a/sys-cluster/ccs/files/ccs-2.03.09-mkostemp.patch b/sys-cluster/ccs/files/ccs-2.03.09-mkostemp.patch
new file mode 100644
index 00000000000..42e2de6ac4f
--- /dev/null
+++ b/sys-cluster/ccs/files/ccs-2.03.09-mkostemp.patch
@@ -0,0 +1,11 @@
+--- cluster-2.03.09/ccs/ccs_tool/upgrade.c.orig 2008-11-13 01:31:14.000000000 +0100
++++ cluster-2.03.09/ccs/ccs_tool/upgrade.c 2008-11-13 01:31:34.000000000 +0100
+@@ -223,7 +223,7 @@
+ memset(tmp_file, 0, 128);
+ sprintf(tmp_file, "/tmp/ccs_tool_tmp_XXXXXX");
+
+- tmp_fd = mkostemp(tmp_file, O_RDWR | O_CREAT |O_TRUNC);
++ tmp_fd = mkstemp(tmp_file);
+ if(tmp_fd < 0){
+ fprintf(stderr, "Unable to create temporary archive: %s\n", strerror(errno));
+ error = -errno;
diff --git a/sys-cluster/ccs/files/ccsd.conf b/sys-cluster/ccs/files/ccsd.conf
new file mode 100644
index 00000000000..64164e7cb0d
--- /dev/null
+++ b/sys-cluster/ccs/files/ccsd.conf
@@ -0,0 +1,6 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+CCSD_OPTS=
diff --git a/sys-cluster/ccs/files/ccsd.rc b/sys-cluster/ccs/files/ccsd.rc
new file mode 100755
index 00000000000..ad7beca80d7
--- /dev/null
+++ b/sys-cluster/ccs/files/ccsd.rc
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+ provide ccs
+}
+
+exefile=/sbin/ccsd
+
+start() {
+ ebegin "Starting ccsd"
+ start-stop-daemon --start --quiet \
+ --exec ${exefile} -- ${CCSD_OPTS}
+ sleep 2s
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ccsd"
+ start-stop-daemon --stop --quiet \
+ -s 9 --exec ${exefile}
+ eend $?
+}
+
diff --git a/sys-cluster/ccs/metadata.xml b/sys-cluster/ccs/metadata.xml
new file mode 100644
index 00000000000..348e6c4de81
--- /dev/null
+++ b/sys-cluster/ccs/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+</pkgmetadata>
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
new file mode 100644
index 00000000000..855472f063a
--- /dev/null
+++ b/sys-cluster/ceph/Manifest
@@ -0,0 +1,3 @@
+DIST ceph-0.80.10.tar.bz2 4136018 SHA256 a7ca8a3d0710ab88adcd5c52aebe0a8ee573e247c1ccf5d84eea8a9ff07a51fa SHA512 7823a489b7654457512d300050410b4a91d615fbb467d341c76e76b77364d6a2afa763bceb2c6cd8ed05a45d7b0aef4c3baf80155cc3223e940b439e0571f3c9 WHIRLPOOL a03fc3a4ca8c49157ff3b51528418ca62c3520c4141e402863cf3475a11b240be5297f731bf1a4e77a01a476e80f5e06c0722d688fbb8ad2db26ef1975a450da
+DIST ceph-0.80.9.tar.bz2 4061267 SHA256 59fa4a60f96e648b023e05690ef4d0042cbdacf4d2f50880162ff484bfbb7797 SHA512 b2f62510c6615bcb884c201852ae11abc94faf5b51899c4e326aab4c5e1ef2c7bca8002e1c46c41fd9e82ea16f570c4ee33ee9ff0c5e7c6dfb6a2bc8da15db95 WHIRLPOOL ddbcf45b781466525b6d577ab155ea32094388aabb98e03b7186ecd90d743cbb05fbedcf212df5f5a78eddf4458bfba92f6c8220c61f8ddb89a2f4b8ce7f87f1
+DIST ceph-0.94.2.tar.bz2 7041327 SHA256 2cf36977e17d5782cdcfc885dcc2226c9c6e1454c1650f53a1e38a73e96544e8 SHA512 10b7ad611ff72b9367996e297f12dbef44c0d896ccf20133405b1d244dd1f9c9e813642918c01c16936aad58315912a87ca8dc2dcf3071311cfb14bde7e62790 WHIRLPOOL 207c8909927d520403554cc02880f8ed340602c98b2cfd4d9078afa76b79a83c5e070237f821f785eb2779cd63b3f015b85f08b031e48a7b1a862f1194947fb9
diff --git a/sys-cluster/ceph/ceph-0.80.10-r1.ebuild b/sys-cluster/ceph/ceph-0.80.10-r1.ebuild
new file mode 100644
index 00000000000..96e1e7ef70c
--- /dev/null
+++ b/sys-cluster/ceph/ceph-0.80.10-r1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+if [[ $PV = *9999* ]]; then
+ scm_eclass=git-r3
+ EGIT_REPO_URI="
+ git://github.com/ceph/ceph.git
+ https://github.com/ceph/ceph.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://ceph.com/download/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+inherit autotools eutils multilib python-any-r1 udev readme.gentoo ${scm_eclass}
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="http://ceph.com/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="cryptopp debug fuse gtk libatomic +libaio +nss radosgw static-libs tcmalloc xfs zfs"
+
+CDEPEND="
+ app-arch/snappy
+ <dev-libs/boost-1.56.0:=[threads]
+ dev-libs/fcgi
+ dev-libs/libaio
+ dev-libs/libedit
+ dev-libs/leveldb[snappy]
+ nss? ( dev-libs/nss )
+ cryptopp? ( dev-libs/crypto++ )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2
+ fuse? ( sys-fs/fuse )
+ libatomic? ( dev-libs/libatomic_ops )
+ xfs? ( sys-fs/xfsprogs )
+ zfs? ( sys-fs/zfs )
+ gtk? (
+ x11-libs/gtk+:2
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg
+ )
+ radosgw? (
+ dev-libs/fcgi
+ dev-libs/expat
+ net-misc/curl
+ )
+ tcmalloc? ( dev-util/google-perftools )
+ $(python_gen_any_dep '
+ ' )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ sys-apps/hdparm
+ $(python_gen_any_dep '
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ ' )"
+REQUIRED_USE="
+ ^^ ( nss cryptopp )
+ "
+
+STRIP_MASK="/usr/lib*/rados-classes/*"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.79-libzfs.patch
+ "${FILESDIR}"/${P}-cpp-backport.patch
+)
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-hadoop \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --includedir=/usr/include \
+ $(use_with debug) \
+ $(use_with fuse) \
+ $(use_with libaio) \
+ $(use_with libatomic libatomic-ops) \
+ $(use_with nss) \
+ $(use_with cryptopp) \
+ $(use_with radosgw) \
+ $(use_with gtk gtk2) \
+ $(use_enable static-libs static) \
+ $(use_with tcmalloc) \
+ $(use_with xfs libxfs) \
+ $(use_with zfs libzfs)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/init-ceph ceph_init.sh
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}"/ceph.logrotate ${PN}
+
+ chmod 644 "${ED}"/usr/share/doc/${PF}/sample.*
+
+ keepdir /var/lib/${PN}
+ keepdir /var/lib/${PN}/tmp
+ keepdir /var/log/${PN}/stat
+
+ newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+
+ python_fix_shebang \
+ "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \
+ "${ED}"/usr/bin/{ceph,ceph-rest-api}
+
+ #install udev rules
+ udev_dorules udev/50-rbd.rules
+ udev_dorules udev/95-ceph-osd.rules
+
+ readme.gentoo_create_doc
+}
diff --git a/sys-cluster/ceph/ceph-0.80.9.ebuild b/sys-cluster/ceph/ceph-0.80.9.ebuild
new file mode 100644
index 00000000000..6eaa17a27ba
--- /dev/null
+++ b/sys-cluster/ceph/ceph-0.80.9.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+if [[ $PV = *9999* ]]; then
+ scm_eclass=git-r3
+ EGIT_REPO_URI="
+ git://github.com/ceph/ceph.git
+ https://github.com/ceph/ceph.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://ceph.com/download/${P}.tar.bz2"
+ KEYWORDS="amd64 x86"
+fi
+
+inherit autotools eutils multilib python-any-r1 udev readme.gentoo ${scm_eclass}
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="http://ceph.com/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="cryptopp debug fuse gtk libatomic +libaio +nss radosgw static-libs tcmalloc xfs zfs"
+
+CDEPEND="
+ app-arch/snappy
+ <dev-libs/boost-1.56.0:=[threads]
+ dev-libs/fcgi
+ dev-libs/libaio
+ dev-libs/libedit
+ dev-libs/leveldb[snappy]
+ nss? ( dev-libs/nss )
+ cryptopp? ( dev-libs/crypto++ )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2
+ fuse? ( sys-fs/fuse )
+ libatomic? ( dev-libs/libatomic_ops )
+ xfs? ( sys-fs/xfsprogs )
+ zfs? ( sys-fs/zfs )
+ gtk? (
+ x11-libs/gtk+:2
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg
+ )
+ radosgw? (
+ dev-libs/fcgi
+ dev-libs/expat
+ net-misc/curl
+ )
+ tcmalloc? ( dev-util/google-perftools )
+ $(python_gen_any_dep '
+ ' )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ sys-apps/hdparm
+ $(python_gen_any_dep '
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ ' )"
+REQUIRED_USE="
+ ^^ ( nss cryptopp )
+ "
+
+STRIP_MASK="/usr/lib*/rados-classes/*"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.79-libzfs.patch
+)
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-hadoop \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --includedir=/usr/include \
+ $(use_with debug) \
+ $(use_with fuse) \
+ $(use_with libaio) \
+ $(use_with libatomic libatomic-ops) \
+ $(use_with nss) \
+ $(use_with cryptopp) \
+ $(use_with radosgw) \
+ $(use_with gtk gtk2) \
+ $(use_enable static-libs static) \
+ $(use_with tcmalloc) \
+ $(use_with xfs libxfs) \
+ $(use_with zfs libzfs)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/init-ceph ceph_init.sh
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}"/ceph.logrotate ${PN}
+
+ chmod 644 "${ED}"/usr/share/doc/${PF}/sample.*
+
+ keepdir /var/lib/${PN}
+ keepdir /var/lib/${PN}/tmp
+ keepdir /var/log/${PN}/stat
+
+ newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+
+ python_fix_shebang \
+ "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \
+ "${ED}"/usr/bin/{ceph,ceph-rest-api}
+
+ #install udev rules
+ udev_dorules udev/50-rbd.rules
+ udev_dorules udev/95-ceph-osd.rules
+
+ readme.gentoo_create_doc
+}
diff --git a/sys-cluster/ceph/ceph-0.94.2-r1.ebuild b/sys-cluster/ceph/ceph-0.94.2-r1.ebuild
new file mode 100644
index 00000000000..ec2218fadfa
--- /dev/null
+++ b/sys-cluster/ceph/ceph-0.94.2-r1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+if [[ $PV = *9999* ]]; then
+ scm_eclass=git-r3
+ EGIT_REPO_URI="
+ git://github.com/ceph/ceph.git
+ https://github.com/ceph/ceph.git"
+ SRC_URI=""
+else
+ SRC_URI="http://ceph.com/download/${P}.tar.bz2"
+fi
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+
+inherit autotools eutils multilib python-any-r1 udev readme.gentoo systemd ${scm_eclass}
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="http://ceph.com/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="babeltrace cryptopp debug fuse gtk libatomic +libaio lttng +nss radosgw static-libs tcmalloc xfs zfs"
+
+CDEPEND="
+ app-arch/snappy
+ dev-libs/boost:=[threads]
+ dev-libs/fcgi
+ dev-libs/libaio
+ dev-libs/libedit
+ dev-libs/leveldb[snappy]
+ nss? ( dev-libs/nss )
+ cryptopp? ( dev-libs/crypto++ )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse )
+ libatomic? ( dev-libs/libatomic_ops )
+ xfs? ( sys-fs/xfsprogs )
+ zfs? ( sys-fs/zfs )
+ gtk? (
+ x11-libs/gtk+:2
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg
+ )
+ radosgw? (
+ dev-libs/fcgi
+ dev-libs/expat
+ net-misc/curl
+ )
+ tcmalloc? ( dev-util/google-perftools )
+ lttng? ( dev-util/lttng-ust )
+ $(python_gen_any_dep '
+ ' )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ sys-apps/hdparm
+ $(python_gen_any_dep '
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ ' )"
+REQUIRED_USE="
+ ^^ ( nss cryptopp )
+ "
+
+STRIP_MASK="/usr/lib*/rados-classes/*"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.79-libzfs.patch
+)
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-hadoop \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --includedir=/usr/include \
+ $(use_with debug) \
+ $(use_with fuse) \
+ $(use_with libaio) \
+ $(use_with libatomic libatomic-ops) \
+ $(use_with nss) \
+ $(use_with cryptopp) \
+ $(use_with radosgw) \
+ $(use_with gtk gtk2) \
+ $(use_enable static-libs static) \
+ $(use_with tcmalloc) \
+ $(use_with xfs libxfs) \
+ $(use_with zfs libzfs) \
+ --without-kinetic \
+ --without-librocksdb \
+ $(use_with lttng ) \
+ $(use_with babeltrace)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/init-ceph ceph_init.sh
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}"/ceph.logrotate ${PN}
+
+ chmod 644 "${ED}"/usr/share/doc/${PF}/sample.*
+
+ keepdir /var/lib/${PN}
+ keepdir /var/lib/${PN}/tmp
+ keepdir /var/log/${PN}/stat
+
+ newinitd "${FILESDIR}/rbdmap.initd" rbdmap
+ newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+
+ systemd_dounit "${FILESDIR}/ceph.target"
+ systemd_newunit "${FILESDIR}/ceph-mds_at.service" "ceph-mds@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
+ systemd_newunit "${FILESDIR}/ceph-osd_at.service" "ceph-osd@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
+ systemd_newunit "${FILESDIR}/ceph-mon_at.service" "ceph-mon@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service"
+
+ python_fix_shebang \
+ "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \
+ "${ED}"/usr/bin/{ceph,ceph-rest-api}
+
+ #install udev rules
+ udev_dorules udev/50-rbd.rules
+ udev_dorules udev/95-ceph-osd.rules
+
+ readme.gentoo_create_doc
+}
diff --git a/sys-cluster/ceph/ceph-9999.ebuild b/sys-cluster/ceph/ceph-9999.ebuild
new file mode 100644
index 00000000000..fe924eb3be8
--- /dev/null
+++ b/sys-cluster/ceph/ceph-9999.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+if [[ $PV = *9999* ]]; then
+ scm_eclass=git-r3
+ EGIT_REPO_URI="
+ git://github.com/ceph/ceph.git
+ https://github.com/ceph/ceph.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://ceph.com/download/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+fi
+
+inherit autotools eutils multilib python-any-r1 udev readme.gentoo ${scm_eclass}
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="http://ceph.com/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="cryptopp debug fuse gtk libatomic +libaio +nss radosgw static-libs tcmalloc xfs zfs"
+
+CDEPEND="
+ app-arch/snappy
+ dev-libs/boost:=[threads]
+ dev-libs/fcgi
+ dev-libs/libaio
+ dev-libs/libedit
+ dev-libs/leveldb[snappy]
+ nss? ( dev-libs/nss )
+ cryptopp? ( dev-libs/crypto++ )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2
+ fuse? ( sys-fs/fuse )
+ libatomic? ( dev-libs/libatomic_ops )
+ xfs? ( sys-fs/xfsprogs )
+ zfs? ( sys-fs/zfs )
+ gtk? (
+ x11-libs/gtk+:2
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg
+ )
+ radosgw? (
+ dev-libs/fcgi
+ dev-libs/expat
+ net-misc/curl
+ )
+ tcmalloc? ( dev-util/google-perftools )
+ $(python_gen_any_dep '
+ ' )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ sys-apps/hdparm
+ $(python_gen_any_dep '
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ ' )"
+REQUIRED_USE="
+ ^^ ( nss cryptopp )
+ "
+
+STRIP_MASK="/usr/lib*/rados-classes/*"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-hadoop \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --includedir=/usr/include \
+ $(use_with debug) \
+ $(use_with fuse) \
+ $(use_with libaio) \
+ $(use_with libatomic libatomic-ops) \
+ $(use_with nss) \
+ $(use_with cryptopp) \
+ $(use_with radosgw) \
+ $(use_with gtk gtk2) \
+ $(use_enable static-libs static) \
+ $(use_with tcmalloc) \
+ $(use_with xfs libxfs) \
+ $(use_with zfs libzfs)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/init-ceph ceph_init.sh
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}"/ceph.logrotate ${PN}
+
+ chmod 644 "${ED}"/usr/share/doc/${PF}/sample.*
+
+ keepdir /var/lib/${PN}
+ keepdir /var/lib/${PN}/tmp
+ keepdir /var/log/${PN}/stat
+
+ newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+
+ python_fix_shebang \
+ "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \
+ "${ED}"/usr/bin/{ceph,ceph-rest-api}
+
+ #install udev rules
+ udev_dorules udev/50-rbd.rules
+ udev_dorules udev/95-ceph-osd.rules
+
+ readme.gentoo_create_doc
+}
diff --git a/sys-cluster/ceph/files/README.gentoo b/sys-cluster/ceph/files/README.gentoo
new file mode 100644
index 00000000000..b0495158ec1
--- /dev/null
+++ b/sys-cluster/ceph/files/README.gentoo
@@ -0,0 +1,18 @@
+1) We'd suggest you to install following packages
+ sys-block/parted to manage disk partions
+ sys-fs/btrfs-progs to use btrfs filesytem
+ sys-fs/cryptsetup to use encrypted devices with dm-crypt
+
+2) To start several daemons of one specific type, create your own scripts
+ cd /etc/init.d
+ for dmn in mds.a mon.a osd.0 osd.1 osd.2; do
+ ln -s ceph ceph-${dmn};
+ rc-update add ceph-${dmn} default;
+ done
+
+3) If you spread ceph daemons over several different machines,
+ We'd highly recommend you to start ntp-client to keep the system time sync.
+ Try to choose one of following ntp client to install and add into runlevel.
+ net-misc/ntp
+ net-misc/openntpd
+ net-misc/chrony
diff --git a/sys-cluster/ceph/files/ceph-0.79-libzfs.patch b/sys-cluster/ceph/files/ceph-0.79-libzfs.patch
new file mode 100644
index 00000000000..6d79c178d43
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-0.79-libzfs.patch
@@ -0,0 +1,13 @@
+diff --git a/src/os/Makefile.am b/src/os/Makefile.am
+index 252c678..c28ad0a 100644
+--- a/src/os/Makefile.am
++++ b/src/os/Makefile.am
+@@ -61,7 +61,7 @@ noinst_HEADERS += \
+
+ if WITH_LIBZFS
+ libos_zfs_a_SOURCES = os/ZFS.cc
+-libos_zfs_a_CXXFLAGS = ${AM_CXXFLAGS} ${LIBZFS_CFLAGS}
++libos_zfs_a_CXXFLAGS = ${AM_CXXFLAGS} ${LIBZFS_CFLAGS} -I/usr/include/libzfs -I/usr/include/libspl
+ noinst_LIBRARIES += libos_zfs.a
+ noinst_HEADERS += os/ZFS.h
+ endif
diff --git a/sys-cluster/ceph/files/ceph-0.80.10-cpp-backport.patch b/sys-cluster/ceph/files/ceph-0.80.10-cpp-backport.patch
new file mode 100644
index 00000000000..ca79f0b6f48
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-0.80.10-cpp-backport.patch
@@ -0,0 +1,50 @@
+diff --git a/src/common/RWLock.h b/src/common/RWLock.h
+index 1a70ef1..2676ede 100644
+--- a/src/common/RWLock.h
++++ b/src/common/RWLock.h
+@@ -18,6 +18,7 @@
+ #define CEPH_RWLock_Posix__H
+
+ #include <pthread.h>
++#include "include/assert.h"
+ #include "lockdep.h"
+ #include "include/atomic.h"
+
+diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc
+index 39e3429..64cd74f 100644
+--- a/src/osd/ECBackend.cc
++++ b/src/osd/ECBackend.cc
+@@ -13,7 +13,7 @@
+ */
+
+ #include <boost/variant.hpp>
+-#include <boost/optional.hpp>
++#include <boost/optional/optional_io.hpp>
+ #include <iostream>
+ #include <sstream>
+
+@@ -81,7 +81,7 @@ ostream &operator<<(ostream &lhs, const ECBackend::read_result_t &rhs)
+ lhs << "read_result_t(r=" << rhs.r
+ << ", errors=" << rhs.errors;
+ if (rhs.attrs) {
+- lhs << ", attrs=" << rhs.attrs;
++ lhs << ", attrs=" << rhs.attrs.get();
+ } else {
+ lhs << ", noattrs";
+ }
+diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
+index c8fb01e..b04f8f4 100644
+--- a/src/osd/ReplicatedPG.cc
++++ b/src/osd/ReplicatedPG.cc
+@@ -5065,7 +5065,10 @@ void ReplicatedPG::do_osd_op_effects(OpContext *ctx)
+ for (list<OpContext::NotifyAck>::iterator p = ctx->notify_acks.begin();
+ p != ctx->notify_acks.end();
+ ++p) {
+- dout(10) << "notify_ack " << make_pair(p->watch_cookie, p->notify_id) << dendl;
++ if (p->watch_cookie)
++ dout(10) << "notify_ack " << make_pair(p->watch_cookie.get(), p->notify_id) << dendl;
++ else
++ dout(10) << "notify_ack " << make_pair("NULL", p->notify_id) << dendl;
+ for (map<pair<uint64_t, entity_name_t>, WatchRef>::iterator i =
+ ctx->obc->watchers.begin();
+ i != ctx->obc->watchers.end();
diff --git a/sys-cluster/ceph/files/ceph-0.87.1-glibc-2.20.patch b/sys-cluster/ceph/files/ceph-0.87.1-glibc-2.20.patch
new file mode 100644
index 00000000000..55a49d72f68
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-0.87.1-glibc-2.20.patch
@@ -0,0 +1,59 @@
+From cf2104d4d991361c53f6e2fea93b69de10cd654b Mon Sep 17 00:00:00 2001
+From: Federico Simoncelli <fsimonce@redhat.com>
+Date: Sat, 15 Nov 2014 14:14:04 +0000
+Subject: [PATCH] common: do not unlock rwlock on destruction
+
+According to pthread_rwlock_unlock(3p):
+
+ Results are undefined if the read-write lock rwlock is not held
+ by the calling thread.
+
+and:
+
+ https://sourceware.org/bugzilla/show_bug.cgi?id=17561
+
+ Calling pthread_rwlock_unlock on an rwlock which is not locked
+ is undefined.
+
+calling pthread_rwlock_unlock on RWLock destruction could cause
+an unknown behavior for two reasons:
+
+- the lock is acquired by another thread (undefined)
+- the lock is not acquired (undefined)
+
+Moreover since glibc-2.20 calling pthread_rwlock_unlock on a
+rwlock that is not locked results in a SIGILL that kills the
+application.
+
+This patch removes the pthread_rwlock_unlock call on destruction
+and replaces it with an assertion to check that the RWLock is
+not in use.
+
+Any code that relied on the implicit release is now going to
+break the assertion, e.g.:
+
+ {
+ RWLock l;
+ l.get(for_write);
+ } // implicit release, wrong.
+
+Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
+---
+ src/common/RWLock.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/common/RWLock.h b/src/common/RWLock.h
+index e647e17..6f0ab8e 100644
+--- a/src/common/RWLock.h
++++ b/src/common/RWLock.h
+@@ -46,7 +46,9 @@ class RWLock
+ return (nwlock.read() > 0);
+ }
+ virtual ~RWLock() {
+- pthread_rwlock_unlock(&L);
++ // The following check is racy but we are about to destroy
++ // the object and we assume that there are no other users.
++ assert(!is_locked());
+ pthread_rwlock_destroy(&L);
+ }
+
diff --git a/sys-cluster/ceph/files/ceph-fix-gnustack.patch b/sys-cluster/ceph/files/ceph-fix-gnustack.patch
new file mode 100644
index 00000000000..3e2eace394c
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-fix-gnustack.patch
@@ -0,0 +1,22 @@
+diff --git a/src/common/crc32c_intel_fast_asm.S b/src/common/crc32c_intel_fast_asm.S
+index 4ca5d65..68d3426 100644
+--- a/src/common/crc32c_intel_fast_asm.S
++++ b/src/common/crc32c_intel_fast_asm.S
+@@ -662,3 +662,6 @@ global %1_slver
+ %endmacro
+ ;;; func core, ver, snum
+ slversion crc32_iscsi_00, 00, 02, 0014
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endiF
+diff --git a/src/common/crc32c_intel_fast_zero_asm.S b/src/common/crc32c_intel_fast_zero_asm.S
+index b7246f2..9728be9 100644
+--- a/src/common/crc32c_intel_fast_zero_asm.S
++++ b/src/common/crc32c_intel_fast_zero_asm.S
+@@ -644,3 +644,6 @@ global %1_slver
+ %endmacro
+ ;;; func core, ver, snum
+ slversion crc32_iscsi_zero_00, 00, 02, 0014
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endiF
diff --git a/sys-cluster/ceph/files/ceph-mds_at.service b/sys-cluster/ceph/files/ceph-mds_at.service
new file mode 100644
index 00000000000..c28604e3c43
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-mds_at.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Ceph metadata server daemon
+After=network-online.target local-fs.target
+Wants=network-online.target local-fs.target
+PartOf=ceph.target
+
+[Service]
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mds -f --cluster ${CLUSTER} --id %i
+
+[Install]
+WantedBy=ceph.target
diff --git a/sys-cluster/ceph/files/ceph-mds_at.service.conf b/sys-cluster/ceph/files/ceph-mds_at.service.conf
new file mode 100644
index 00000000000..0172cbeadee
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-mds_at.service.conf
@@ -0,0 +1,4 @@
+# Uncomment the following lines to configure the cluster name for Ceph MDSs.
+
+#[Service]
+#Environment=CLUSTER=ceph
diff --git a/sys-cluster/ceph/files/ceph-mon_at.service b/sys-cluster/ceph/files/ceph-mon_at.service
new file mode 100644
index 00000000000..4f54cc158c5
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-mon_at.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Ceph cluster monitor daemon
+After=network-online.target
+Wants=network-online.target
+
+# According to:
+# http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
+# these can be removed once ceph-mon will dynamically change network
+# configuration.
+After=network-online.target local-fs.target
+Wants=network-online.target local-fs.target
+PartOf=ceph.target
+
+[Service]
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %i
+
+[Install]
+WantedBy=ceph.target
diff --git a/sys-cluster/ceph/files/ceph-mon_at.service.conf b/sys-cluster/ceph/files/ceph-mon_at.service.conf
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-mon_at.service.conf
diff --git a/sys-cluster/ceph/files/ceph-osd_at.service b/sys-cluster/ceph/files/ceph-osd_at.service
new file mode 100644
index 00000000000..7bf125f63c7
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-osd_at.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Ceph object storage daemon
+After=network-online.target local-fs.target
+Wants=network-online.target local-fs.target
+PartOf=ceph.target
+
+[Service]
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i
+ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i
+
+[Install]
+WantedBy=ceph.target
diff --git a/sys-cluster/ceph/files/ceph-osd_at.service.conf b/sys-cluster/ceph/files/ceph-osd_at.service.conf
new file mode 100644
index 00000000000..959b948c117
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-osd_at.service.conf
@@ -0,0 +1,4 @@
+# Uncomment the following lines to configure the cluster name for Ceph OSDs.
+
+#[Service]
+#Environment=CLUSTER=ceph
diff --git a/sys-cluster/ceph/files/ceph.confd-r1 b/sys-cluster/ceph/files/ceph.confd-r1
new file mode 100644
index 00000000000..3bdb8b485ed
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r1
@@ -0,0 +1,4 @@
+# Example
+
+# default ceph conf file
+#ceph_conf="/etc/ceph/ceph.conf"
diff --git a/sys-cluster/ceph/files/ceph.initd-r1 b/sys-cluster/ceph/files/ceph.initd-r1
new file mode 100644
index 00000000000..ca5ab60cc0b
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r1
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}"
+extra_commands="reload"
+type=${RC_SVCNAME:5:3}
+id=${RC_SVCNAME:9}
+id=${id:-"0"}
+command="/usr/bin/ceph-${type}"
+pidfile="/run/ceph/${type}.${id}.pid"
+command_args="-i ${id} --pid-file ${pidfile} -c ${ceph_conf}"
+
+depend() {
+ after net ntpd ntp-client chronyd
+ before netmount
+}
+
+is_type_valid() {
+ case ${type} in
+ mon|mds|osd) return 0;;
+ *) return 1;;
+ esac
+}
+
+start_pre() {
+ checkpath -d -q $(dirname ${pidfile})
+}
+
+start() {
+ ebegin "Starting Ceph ${type}.${id}"
+ if ! is_type_valid ;then
+ eerror "Please give valid Ceph Server Type: mds, mon, osd"
+ return 1
+ fi
+ ${command} ${command_args}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Ceph ${type}.${id}"
+ start-stop-daemon --stop --pidfile ${pidfile}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading Ceph ${type}.${id}"
+ start-stop-daemon --signal 1 --pidfile ${pidfile}
+ eend $?
+}
diff --git a/sys-cluster/ceph/files/ceph.logrotate b/sys-cluster/ceph/files/ceph.logrotate
new file mode 100644
index 00000000000..881d7ffb43d
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.logrotate
@@ -0,0 +1,22 @@
+/var/log/ceph/admin.log
+/var/log/ceph/ceph.log
+/var/log/ceph/ceph-mon.*.log
+/var/log/ceph/ceph-mds.*.log
+/var/log/ceph/ceph-osd.*.log
+{
+ rotate 7
+ daily
+ compress
+ sharedscripts
+ prerotate
+ for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do
+ ceph --admin-daemon /run/ceph/${dmn} log flush 2>/dev/null >/dev/null
+ done
+ endscript
+ postrotate
+ for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do
+ ceph --admin-daemon /run/ceph/${dmn} log reopen 2>/dev/null >/dev/null
+ done
+ endscript
+ missingok
+}
diff --git a/sys-cluster/ceph/files/ceph.target b/sys-cluster/ceph/files/ceph.target
new file mode 100644
index 00000000000..60734baff68
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.target
@@ -0,0 +1,4 @@
+[Unit]
+Description=ceph target allowing to start/stop all ceph*@.service instances at once
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-cluster/ceph/files/rbdmap.initd b/sys-cluster/ceph/files/rbdmap.initd
new file mode 100644
index 00000000000..fa5832d113b
--- /dev/null
+++ b/sys-cluster/ceph/files/rbdmap.initd
@@ -0,0 +1,122 @@
+#!/sbin/runscript
+
+DESC="RBD Mapping:"
+RBDMAPFILE="/etc/ceph/rbdmap"
+
+extra_started_commands="reload"
+
+depend() {
+ need localmount net
+ before netmount
+}
+
+start() {
+
+ if [ ! -f "${RBDMAPFILE}" ]; then
+ ewarn "$DESC : No ${RBDMAPFILE} found."
+ exit 0
+ fi
+
+ RET=0
+ # Read /etc/ceph/rbdmap to create non-existant mapping
+ while read DEV PARAMS; do
+ case "$DEV" in
+ ""|\#*)
+ continue
+ ;;
+ */*)
+ ;;
+ *)
+ DEV=rbd/$DEV
+ ;;
+ esac
+ ebegin "${DESC} '${DEV}'"
+ newrbd=""
+ MAP_RV=""
+ RET_OP=0
+ OIFS=$IFS
+ IFS=','
+ for PARAM in ${PARAMS[@]}; do
+ CMDPARAMS="${CMDPARAMS} --$(echo ${PARAM} | tr '=' ' ')"
+ done
+ IFS=$OIFS
+ if [ ! -b /dev/rbd/${DEV} ]; then
+ MAP_RV=$(rbd map ${DEV} ${CMDPARAMS} 2>&1)
+ if [ $? -eq 0 ]; then
+ newrbd="yes"
+ else
+ RET=$((${RET}+$?))
+ RET_OP=1
+ fi
+ fi
+ eend ${RET_OP} "${MAP_RV}"
+
+ if [ "$newrbd" ]; then
+ ## Mount new rbd
+ MNT_RV=""
+ mount --fake /dev/rbd/${DEV} >>/dev/null 2>&1 \
+ && MNT_RV=$(mount -vn /dev/rbd/${DEV} 2>&1)
+ [ -n "${MNT_RV}" ] && einfo "mount: ${MNT_RV}"
+
+ ## post-mapping
+ if [ -x "/etc/ceph/rbd.d/${DEV}" ]; then
+ einfo "RBD Running post-map hook '/etc/ceph/rbd.d/${DEV}'"
+ /etc/ceph/rbd.d/${DEV} map "/dev/rbd/${DEV}"
+ fi
+ fi
+ done < ${RBDMAPFILE}
+ eend ${RET}
+}
+
+stop() {
+
+ RET=0
+ ## Unmount and unmap all rbd devices
+ if ls /dev/rbd[0-9]* >/dev/null 2>&1; then
+ for DEV in /dev/rbd[0-9]*; do
+ ## pre-unmapping
+ for L in $(find /dev/rbd -type l); do
+ LL="${L##/dev/rbd/}"
+ if [ "$(readlink -f $L)" = "${DEV}" ] \
+ && [ -x "/etc/ceph/rbd.d/${LL}" ]; then
+ einfo "RBD pre-unmap: '${DEV}' hook '/etc/ceph/rbd.d/${LL}'"
+ /etc/ceph/rbd.d/${LL} unmap "$L"
+ break
+ fi
+ done
+
+ ebegin "Unmapping RBD device: '${DEV}'"
+ UMNT_RV=""
+ UMAP_RV=""
+ RET_OP=0
+ MNT=$(findmnt --mtab --source ${DEV} --noheadings | awk '{print $1'})
+ if [ -n "${MNT}" ]; then
+ einfo "un-mounting '${MNT}'"
+ UMNT_RV=$(umount "${MNT}" 2>&1)
+ fi
+ if mountpoint -q "${MNT}"; then
+ ## Un-mounting failed.
+ RET_OP=1
+ RET=$((${RET}+1))
+ else
+ ## Un-mapping.
+ UMAP_RV=$(rbd unmap $DEV 2>&1)
+ if [ $? -ne 0 ]; then
+ RET=$((${RET}+$?))
+ RET_OP=1
+ fi
+ fi
+ eend ${RET_OP} "${UMAP_RV}"
+ [ -n "${UMNT_RV}" ] && einfo "${UMNT_RV}"
+ done
+ fi
+ eend ${RET}
+}
+
+reload() {
+ start
+}
+
+status() {
+ rbd showmapped
+}
diff --git a/sys-cluster/ceph/metadata.xml b/sys-cluster/ceph/metadata.xml
new file mode 100644
index 00000000000..8e46f854b1a
--- /dev/null
+++ b/sys-cluster/ceph/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ <description>Co Maintainer</description>
+ </maintainer>
+<longdescription>
+Ceph is a distributed network file system designed to provide excellent performance, reliability, and scalability.
+</longdescription>
+<use>
+ <flag name='cryptopp'>Use <pkg>dev-libs/crypto++</pkg> for cryptography</flag>
+ <flag name='fuse'>Build fuse client</flag>
+ <flag name='libatomic'>Use libatomic instead of builtin atomic operations</flag>
+ <flag name='libaio'>Use libaio as asynchronous input/output library</flag>
+ <flag name='lttng'>Add support for LTTng</flag>
+ <flag name='babeltrace'>Add support for LTTng babeltrace</flag>
+ <flag name='nss'>Use <pkg>dev-libs/nss</pkg> for cryptography</flag>
+ <flag name='radosgw'>Add radosgw support</flag>
+ <flag name='xfs'>Add xfs support</flag>
+ <flag name='zfs'>Add zfs support</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-cluster/charm/Manifest b/sys-cluster/charm/Manifest
new file mode 100644
index 00000000000..240348abb4e
--- /dev/null
+++ b/sys-cluster/charm/Manifest
@@ -0,0 +1,3 @@
+DIST charm-6.5.1.tar.gz 19265741 SHA256 68aa43e2a6e476e116a7e80e385c25c6ac6497807348025505ba8bfa256ed34a SHA512 1a25c76f3699e30d0614e85f39ea0f594896cbc299b0e670c52fcea176171e8834ea7f9ba3ba0c1957598b0f1cbfa6a4ed9279ae0c030fa32faa6acca879b694 WHIRLPOOL 0def514af09c137b951842250fe112c68e573e8eff7d5911a71ccbe55cc38b319f1d9c4587e706777f748b0c1ef69b63c4161bbf663b05984a566ff325fa49c3
+DIST charm-6.6.0.tar.gz 18779545 SHA256 c916010f2d4cc2c6bd30ea19764839d0298fb56d1696d8ff08d9fa9a61dfb1c9 SHA512 fd6cc2fa8919198fdceb8187101882a61fe974fed3ddd65b102c95b850877429fe0675a55d54075e4a2accad134f615ff717a7dd39fbd9af5fa65a5c87d34e0b WHIRLPOOL 97cfbb45c9456e79d3b6f868c6acfbf8c8701f87743139a17cdb25fbb3a90fdf9a137e8da04df0ab25569ca1b9307c910fe02dc61a84b247bf81d112e0547317
+DIST charm-6.6.1.tar.gz 125697465 SHA256 2aa16fd3015dce0a0932ab5253578a72ddbcb889bc0d23584c42b28446915467 SHA512 139409fff76ac9811b2efe6605579a877738f873b112d4e4da25f079598f6c238cf76e677ed3cf3f92aa59f29710feea3e96e59e6010e186e4191dfa4c3ef92e WHIRLPOOL d56dd8a2cf11152bcc8dd5d1bd166d28bebca02e81bb6fdc3de6c5bf4a6bdcd72f7b854cf42576d32d23fe994a207451ebca44ac9cf6a5d8b982d2e4141d422b
diff --git a/sys-cluster/charm/charm-6.5.1-r1.ebuild b/sys-cluster/charm/charm-6.5.1-r1.ebuild
new file mode 100644
index 00000000000..f16f5aee528
--- /dev/null
+++ b/sys-cluster/charm/charm-6.5.1-r1.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs python-single-r1
+
+DESCRIPTION="Message-passing parallel language and runtime system"
+HOMEPAGE="http://charm.cs.uiuc.edu/"
+SRC_URI="http://charm.cs.uiuc.edu/distrib/${P}.tar.gz"
+
+LICENSE="charm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="charmdebug charmtracing charmproduction cmkopt doc examples mlogft mpi numa smp static-libs syncft tcp"
+
+RDEPEND="mpi? ( virtual/mpi )"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ >=app-text/poppler-0.12.3-r3[utils]
+ dev-tex/latex2html
+ virtual/tex-base
+ >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ media-libs/netpbm
+ ${PYTHON_DEPS}
+ )"
+
+REQUIRED_USE="
+ doc? ( ${PYTHON_REQUIRED_USE} )
+ cmkopt? ( !charmdebug !charmtracing )
+ charmproduction? ( !charmdebug !charmtracing )"
+
+FORTRAN_STANDARD="90"
+
+get_opts() {
+ local CHARM_OPTS
+
+ # TCP instead of default UDP for socket comunication
+ # protocol
+ CHARM_OPTS+="$(usex tcp ' tcp' '')"
+
+ # enable direct SMP support using shared memory
+ CHARM_OPTS+="$(usex smp ' smp' '')"
+
+ CHARM_OPTS+="$(usex mlogft ' mlogft' '')"
+ CHARM_OPTS+="$(usex syncft ' syncft' '')"
+
+ # Build shared libraries by default.
+ CHARM_OPTS+=" --build-shared"
+
+ if use charmproduction; then
+ CHARM_OPTS+=" --with-production"
+ else
+ if use charmdebug; then
+ CHARM_OPTS+=" --enable-charmdebug"
+ fi
+
+ if use charmtracing; then
+ CHARM_OPTS+=" --enable-tracing --enable-tracing-commthread"
+ fi
+ fi
+
+ CHARM_OPTS+="$(usex numa ' --with-numa' '')"
+ echo $CHARM_OPTS
+}
+
+src_prepare() {
+ sed \
+ -e "/CMK_CF90/s:f90:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/CMK_CXX/s:g++:$(usex mpi "mpic++" "$(tc-getCXX)"):g" \
+ -e "/CMK_CC/s:gcc:$(usex mpi "mpicc" "$(tc-getCC)"):g" \
+ -e '/CMK_F90_MODINC/s:-p:-I:g' \
+ -e "/CMK_LD/s:\"$: ${LDFLAGS} \":g" \
+ -i src/arch/$(usex mpi "mpi" "net")-linux*/*sh || die
+
+ sed \
+ -e "s:-o conv-cpm:${LDFLAGS} &:g" \
+ -e "s:-o charmxi:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-silent:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-notify:${LDFLAGS} &:g" \
+ -e "s:-o charmrun:${LDFLAGS} &:g" \
+ -e "s:-o charmd_faceless:${LDFLAGS} &:g" \
+ -e "s:-o charmd:${LDFLAGS} &:g" \
+ -i \
+ src/scripts/Makefile \
+ src/arch/net/charmrun/Makefile || die
+
+ # CMK optimization
+ use cmkopt && append-cppflags -DCMK_OPTIMIZE=1
+
+ # Fix QA notice. Filed report with upstream.
+ append-cflags -DALLOCA_H
+
+ epatch "${FILESDIR}/charm-6.5.1-cleanup-config.patch"
+ epatch "${FILESDIR}/charm-6.5.1-CkReductionMgr.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-string-parsing.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch"
+}
+
+src_compile() {
+ local mybuildoptions="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '') $(get_opts) ${MAKEOPTS} ${CFLAGS}"
+
+ # Build charmm++ first.
+ einfo "running ./build charm++ ${mybuildoptions}"
+ ./build charm++ ${mybuildoptions} || die "Failed to build charm++"
+
+ # make pdf/html docs
+ if use doc; then
+ python-single-r1_pkg_setup
+ python_fix_shebang "${S}/doc"
+ einfo "forcing ${EPYTHON}"
+ emake -j1 -C doc/charm++
+ fi
+}
+
+src_test() {
+ make -C tests/charm++ test TESTOPTS="++local" || die
+}
+
+src_install() {
+ # Make charmc play well with gentoo before we move it into /usr/bin. This
+ # patch cannot be applied during src_prepare() because the charmc wrapper
+ # is used during building.
+ epatch "${FILESDIR}/charm-6.5.1-charmc-gentoo.patch"
+
+ sed -e "s|gentoo-include|${P}|" \
+ -e "s|gentoo-libdir|$(get_libdir)|g" \
+ -e "s|VERSION|${P}/VERSION|" \
+ -i ./src/scripts/charmc || die "failed patching charmc script"
+
+ # In the following, some of the files are symlinks to ../tmp which we need
+ # to dereference first (see bug 432834).
+
+ local i
+
+ # Install binaries.
+ for i in bin/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dobin "${i}"
+ done
+
+ # Install headers.
+ insinto /usr/include/${P}
+ for i in include/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ doins "${i}"
+ done
+
+ # Install static libs. Charm has a lot of .o "libs" that it requires at
+ # runtime.
+ if use static-libs; then
+ for i in lib/*.{a,o}; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dolib "${i}"
+ done
+ fi
+
+ # Install shared libs.
+ for i in lib_so/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dolib.so "${i}"
+ done
+
+ # Basic docs.
+ dodoc CHANGES README
+
+ # Install examples.
+ if use examples; then
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:(../)+bin/charmc:/usr/bin/charmc:" -i || \
+ die "Failed to fix examples"
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:./charmrun:./charmrun ++local:" -i || \
+ die "Failed to fix examples"
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/charm++/*
+ fi
+
+ # Install pdf/html docs
+ if use doc; then
+ cd "${S}/doc/charm++"
+ # Install pdfs.
+ insinto /usr/share/doc/${PF}/pdf
+ doins *.pdf
+ # Install html.
+ docinto html
+ dohtml -r manual/*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please test your charm installation by copying the"
+ einfo "content of /usr/share/doc/${PF}/examples to a"
+ einfo "temporary location and run 'make test'."
+}
diff --git a/sys-cluster/charm/charm-6.5.1-r2.ebuild b/sys-cluster/charm/charm-6.5.1-r2.ebuild
new file mode 100644
index 00000000000..f800eaedcfc
--- /dev/null
+++ b/sys-cluster/charm/charm-6.5.1-r2.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs python-single-r1
+
+DESCRIPTION="Message-passing parallel language and runtime system"
+HOMEPAGE="http://charm.cs.uiuc.edu/"
+SRC_URI="http://charm.cs.uiuc.edu/distrib/${P}.tar.gz"
+
+LICENSE="charm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="charmdebug charmtracing charmproduction cmkopt doc examples mlogft mpi numa smp static-libs syncft tcp"
+
+RDEPEND="mpi? ( virtual/mpi )"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ >=app-text/poppler-0.12.3-r3[utils]
+ dev-tex/latex2html
+ virtual/tex-base
+ >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ media-libs/netpbm
+ ${PYTHON_DEPS}
+ )"
+
+REQUIRED_USE="
+ doc? ( ${PYTHON_REQUIRED_USE} )
+ cmkopt? ( !charmdebug !charmtracing )
+ charmproduction? ( !charmdebug !charmtracing )"
+
+FORTRAN_STANDARD="90"
+
+get_opts() {
+ local CHARM_OPTS
+
+ # TCP instead of default UDP for socket comunication
+ # protocol
+ CHARM_OPTS+="$(usex tcp ' tcp' '')"
+
+ # enable direct SMP support using shared memory
+ CHARM_OPTS+="$(usex smp ' smp' '')"
+
+ CHARM_OPTS+="$(usex mlogft ' mlogft' '')"
+ CHARM_OPTS+="$(usex syncft ' syncft' '')"
+
+ # Build shared libraries by default.
+ CHARM_OPTS+=" --build-shared"
+
+ if use charmproduction; then
+ CHARM_OPTS+=" --with-production"
+ else
+ if use charmdebug; then
+ CHARM_OPTS+=" --enable-charmdebug"
+ fi
+
+ if use charmtracing; then
+ CHARM_OPTS+=" --enable-tracing --enable-tracing-commthread"
+ fi
+ fi
+
+ CHARM_OPTS+="$(usex numa ' --with-numa' '')"
+ echo $CHARM_OPTS
+}
+
+src_prepare() {
+ sed \
+ -e "/CMK_CF90/s:f90:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/CMK_CXX/s:g++:$(usex mpi "mpic++" "$(tc-getCXX)"):g" \
+ -e "/CMK_CC/s:gcc:$(usex mpi "mpicc" "$(tc-getCC)"):g" \
+ -e '/CMK_F90_MODINC/s:-p:-I:g' \
+ -e "/CMK_LD/s:\"$: ${LDFLAGS} \":g" \
+ -i src/arch/$(usex mpi "mpi" "net")-linux*/*sh || die
+
+ sed \
+ -e "s:-o conv-cpm:${LDFLAGS} &:g" \
+ -e "s:-o charmxi:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-silent:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-notify:${LDFLAGS} &:g" \
+ -e "s:-o charmrun:${LDFLAGS} &:g" \
+ -e "s:-o charmd_faceless:${LDFLAGS} &:g" \
+ -e "s:-o charmd:${LDFLAGS} &:g" \
+ -i \
+ src/scripts/Makefile \
+ src/arch/net/charmrun/Makefile || die
+
+ # CMK optimization
+ use cmkopt && append-cppflags -DCMK_OPTIMIZE=1
+
+ # Fix QA notice. Filed report with upstream.
+ append-cflags -DALLOCA_H
+
+ epatch "${FILESDIR}/charm-6.5.1-cleanup-config.patch"
+ epatch "${FILESDIR}/charm-6.5.1-CkReductionMgr.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-string-parsing.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch"
+ epatch "${FILESDIR}/charm-6.5.1-static-library-fix.patch"
+}
+
+src_compile() {
+ local mybuildoptions="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '') $(get_opts) ${MAKEOPTS} -j1 ${CFLAGS}"
+
+ # Build charmm++ first.
+ einfo "running ./build charm++ ${mybuildoptions}"
+ ./build charm++ ${mybuildoptions} || die "Failed to build charm++"
+
+ # make pdf/html docs
+ if use doc; then
+ python-single-r1_pkg_setup
+ python_fix_shebang "${S}/doc"
+ einfo "forcing ${EPYTHON}"
+ emake -j1 -C doc/charm++
+ fi
+}
+
+src_test() {
+ make -C tests/charm++ test TESTOPTS="++local" || die
+}
+
+src_install() {
+ # Make charmc play well with gentoo before we move it into /usr/bin. This
+ # patch cannot be applied during src_prepare() because the charmc wrapper
+ # is used during building.
+ epatch "${FILESDIR}/charm-6.5.1-charmc-gentoo.patch"
+
+ sed -e "s|gentoo-include|${P}|" \
+ -e "s|gentoo-libdir|$(get_libdir)|g" \
+ -e "s|VERSION|${P}/VERSION|" \
+ -i ./src/scripts/charmc || die "failed patching charmc script"
+
+ # In the following, some of the files are symlinks to ../tmp which we need
+ # to dereference first (see bug 432834).
+
+ local i
+
+ # Install binaries.
+ for i in bin/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dobin "${i}"
+ done
+
+ # Install headers.
+ insinto /usr/include/${P}
+ for i in include/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ doins "${i}"
+ done
+
+ # Install static libs. Charm has a lot of .o "libs" that it requires at
+ # runtime.
+ if use static-libs; then
+ for i in lib/*.{a,o}; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dolib "${i}"
+ done
+ fi
+
+ # Install shared libs.
+ for i in lib_so/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dolib.so "${i}"
+ done
+
+ # Basic docs.
+ dodoc CHANGES README
+
+ # Install examples.
+ if use examples; then
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:(../)+bin/charmc:/usr/bin/charmc:" -i || \
+ die "Failed to fix examples"
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:./charmrun:./charmrun ++local:" -i || \
+ die "Failed to fix examples"
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/charm++/*
+ fi
+
+ # Install pdf/html docs
+ if use doc; then
+ cd "${S}/doc/charm++"
+ # Install pdfs.
+ insinto /usr/share/doc/${PF}/pdf
+ doins *.pdf
+ # Install html.
+ docinto html
+ dohtml -r manual/*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please test your charm installation by copying the"
+ einfo "content of /usr/share/doc/${PF}/examples to a"
+ einfo "temporary location and run 'make test'."
+}
diff --git a/sys-cluster/charm/charm-6.5.1-r3.ebuild b/sys-cluster/charm/charm-6.5.1-r3.ebuild
new file mode 100644
index 00000000000..c3207a373c3
--- /dev/null
+++ b/sys-cluster/charm/charm-6.5.1-r3.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3} )
+
+inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs python-any-r1
+
+DESCRIPTION="Message-passing parallel language and runtime system"
+HOMEPAGE="http://charm.cs.uiuc.edu/"
+SRC_URI="http://charm.cs.uiuc.edu/distrib/${P}.tar.gz"
+
+LICENSE="charm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="charmdebug charmtracing charmproduction cmkopt doc examples mlogft mpi numa smp static-libs syncft tcp"
+
+RDEPEND="mpi? ( virtual/mpi )"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ >=app-text/poppler-0.12.3-r3[utils]
+ dev-tex/latex2html
+ virtual/tex-base
+ $(python_gen_any_dep '
+ >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ ')
+ media-libs/netpbm
+ ${PYTHON_DEPS}
+ )"
+
+REQUIRED_USE="
+ doc? ( ${PYTHON_REQUIRED_USE} )
+ cmkopt? ( !charmdebug !charmtracing )
+ charmproduction? ( !charmdebug !charmtracing )"
+
+FORTRAN_STANDARD="90"
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+get_opts() {
+ local CHARM_OPTS
+
+ # TCP instead of default UDP for socket comunication
+ # protocol
+ CHARM_OPTS+="$(usex tcp ' tcp' '')"
+
+ # enable direct SMP support using shared memory
+ CHARM_OPTS+="$(usex smp ' smp' '')"
+
+ CHARM_OPTS+="$(usex mlogft ' mlogft' '')"
+ CHARM_OPTS+="$(usex syncft ' syncft' '')"
+
+ # Build shared libraries by default.
+ CHARM_OPTS+=" --build-shared"
+
+ if use charmproduction; then
+ CHARM_OPTS+=" --with-production"
+ else
+ if use charmdebug; then
+ CHARM_OPTS+=" --enable-charmdebug"
+ fi
+
+ if use charmtracing; then
+ CHARM_OPTS+=" --enable-tracing --enable-tracing-commthread"
+ fi
+ fi
+
+ CHARM_OPTS+="$(usex numa ' --with-numa' '')"
+ echo $CHARM_OPTS
+}
+
+src_prepare() {
+ sed \
+ -e "/CMK_CF90/s:f90:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/CMK_CXX/s:g++:$(usex mpi "mpic++" "$(tc-getCXX)"):g" \
+ -e "/CMK_CC/s:gcc:$(usex mpi "mpicc" "$(tc-getCC)"):g" \
+ -e '/CMK_F90_MODINC/s:-p:-I:g' \
+ -e "/CMK_LD/s:\"$: ${LDFLAGS} \":g" \
+ -i src/arch/$(usex mpi "mpi" "net")-linux*/*sh || die
+
+ sed \
+ -e "s:-o conv-cpm:${LDFLAGS} &:g" \
+ -e "s:-o charmxi:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-silent:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-notify:${LDFLAGS} &:g" \
+ -e "s:-o charmrun:${LDFLAGS} &:g" \
+ -e "s:-o charmd_faceless:${LDFLAGS} &:g" \
+ -e "s:-o charmd:${LDFLAGS} &:g" \
+ -i \
+ src/scripts/Makefile \
+ src/arch/net/charmrun/Makefile || die
+
+ # CMK optimization
+ use cmkopt && append-cppflags -DCMK_OPTIMIZE=1
+
+ # Fix QA notice. Filed report with upstream.
+ append-cflags -DALLOCA_H
+
+ epatch "${FILESDIR}/charm-6.5.1-cleanup-config.patch"
+ epatch "${FILESDIR}/charm-6.5.1-CkReductionMgr.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-string-parsing.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-markupSanitizer.patch"
+ epatch "${FILESDIR}/charm-6.5.1-static-library-fix.patch"
+}
+
+src_compile() {
+ local mybuildoptions="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '') $(get_opts) ${MAKEOPTS} -j1 ${CFLAGS}"
+
+ # Build charmm++ first.
+ einfo "running ./build charm++ ${mybuildoptions}"
+ ./build charm++ ${mybuildoptions} || die "Failed to build charm++"
+
+ # make pdf/html docs
+ if use doc; then
+ emake -j1 -C doc/charm++
+ fi
+}
+
+src_test() {
+ make -C tests/charm++ test TESTOPTS="++local" || die
+}
+
+src_install() {
+ # Make charmc play well with gentoo before we move it into /usr/bin. This
+ # patch cannot be applied during src_prepare() because the charmc wrapper
+ # is used during building.
+ epatch "${FILESDIR}/charm-6.5.1-charmc-gentoo.patch"
+
+ sed -e "s|gentoo-include|${P}|" \
+ -e "s|gentoo-libdir|$(get_libdir)|g" \
+ -e "s|VERSION|${P}/VERSION|" \
+ -i ./src/scripts/charmc || die "failed patching charmc script"
+
+ # In the following, some of the files are symlinks to ../tmp which we need
+ # to dereference first (see bug 432834).
+
+ local i
+
+ # Install binaries.
+ for i in bin/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dobin "${i}"
+ done
+
+ # Install headers.
+ insinto /usr/include/${P}
+ for i in include/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ doins "${i}"
+ done
+
+ # Install static libs. Charm has a lot of .o "libs" that it requires at
+ # runtime.
+ if use static-libs; then
+ for i in lib/*.{a,o}; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dolib "${i}"
+ done
+ fi
+
+ # Install shared libs.
+ for i in lib_so/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dolib.so "${i}"
+ done
+
+ # Basic docs.
+ dodoc CHANGES README
+
+ # Install examples.
+ if use examples; then
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:(../)+bin/charmc:/usr/bin/charmc:" -i || \
+ die "Failed to fix examples"
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:./charmrun:./charmrun ++local:" -i || \
+ die "Failed to fix examples"
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/charm++/*
+ fi
+
+ # Install pdf/html docs
+ if use doc; then
+ cd "${S}/doc/charm++"
+ # Install pdfs.
+ insinto /usr/share/doc/${PF}/pdf
+ doins *.pdf
+ # Install html.
+ docinto html
+ dohtml -r manual/*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please test your charm installation by copying the"
+ einfo "content of /usr/share/doc/${PF}/examples to a"
+ einfo "temporary location and run 'make test'."
+}
diff --git a/sys-cluster/charm/charm-6.6.0-r1.ebuild b/sys-cluster/charm/charm-6.6.0-r1.ebuild
new file mode 100644
index 00000000000..b05dd5ff790
--- /dev/null
+++ b/sys-cluster/charm/charm-6.6.0-r1.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_STANDARD="90"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib multiprocessing python-any-r1 toolchain-funcs
+
+DESCRIPTION="Message-passing parallel language and runtime system"
+HOMEPAGE="http://charm.cs.uiuc.edu/"
+SRC_URI="http://charm.cs.uiuc.edu/distrib/${P}.tar.gz"
+
+LICENSE="charm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="charmdebug charmtracing charmproduction cmkopt doc examples mlogft mpi numa smp static-libs syncft tcp"
+
+RDEPEND="mpi? ( virtual/mpi )"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ >=app-text/poppler-0.12.3-r3[utils]
+ dev-tex/latex2html
+ virtual/tex-base
+ $(python_gen_any_dep '
+ >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ ')
+ media-libs/netpbm
+ ${PYTHON_DEPS}
+ )"
+
+REQUIRED_USE="
+ doc? ( ${PYTHON_REQUIRED_USE} )
+ cmkopt? ( !charmdebug !charmtracing )
+ charmproduction? ( !charmdebug !charmtracing )"
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+get_opts() {
+ local CHARM_OPTS
+
+ # TCP instead of default UDP for socket comunication
+ # protocol
+ CHARM_OPTS+="$(usex tcp ' tcp' '')"
+
+ # enable direct SMP support using shared memory
+ CHARM_OPTS+="$(usex smp ' smp' '')"
+
+ CHARM_OPTS+="$(usex mlogft ' mlogft' '')"
+ CHARM_OPTS+="$(usex syncft ' syncft' '')"
+
+ # Build shared libraries by default.
+ CHARM_OPTS+=" --build-shared"
+
+ if use charmproduction; then
+ CHARM_OPTS+=" --with-production"
+ else
+ if use charmdebug; then
+ CHARM_OPTS+=" --enable-charmdebug"
+ fi
+
+ if use charmtracing; then
+ CHARM_OPTS+=" --enable-tracing --enable-tracing-commthread"
+ fi
+ fi
+
+ CHARM_OPTS+="$(usex numa ' --with-numa' '')"
+ echo $CHARM_OPTS
+}
+
+src_prepare() {
+ sed \
+ -e "/CMK_CF77/s:[fg]77:$(usex mpi "mpif90" "$(tc-getF77)"):g" \
+ -e "/CMK_CF90/s:f95:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/CMK_CF90/s:\`which f90.*$::g" \
+ -e "/CMK_CXX/s:g++:$(usex mpi "mpic++" "$(tc-getCXX)"):g" \
+ -e "/CMK_CC/s:gcc:$(usex mpi "mpicc" "$(tc-getCC)"):g" \
+ -e '/CMK_F90_MODINC/s:-p:-I:g' \
+ -e "/CMK_LD/s:\"$: ${LDFLAGS} \":g" \
+ -i src/arch/$(usex mpi "mpi" "net")*-linux*/*sh || die
+ sed \
+ -e "/CMK_CF90/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/F90DIR/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/f95target/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/f95version/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -i src/arch/common/*.sh || die
+
+ sed \
+ -e "s:-o conv-cpm:${LDFLAGS} &:g" \
+ -e "s:-o charmxi:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-silent:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-notify:${LDFLAGS} &:g" \
+ -e "s:-o charmrun:${LDFLAGS} &:g" \
+ -e "s:-o charmd_faceless:${LDFLAGS} &:g" \
+ -e "s:-o charmd:${LDFLAGS} &:g" \
+ -i \
+ src/scripts/Makefile \
+ src/util/charmrun-src/Makefile || die
+
+ # CMK optimization
+ use cmkopt && append-cppflags -DCMK_OPTIMIZE=1
+
+ # Fix QA notice. Filed report with upstream.
+ append-cflags -DALLOCA_H
+
+ epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-markupSanitizer.patch"
+}
+
+src_compile() {
+ local build_version="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '')"
+ local build_options="$(get_opts)"
+ #build only accepts -j from MAKEOPTS
+ local build_commandline="${build_version} ${build_options} -j$(makeopts_jobs)"
+
+ # Build charmm++ first.
+ einfo "running ./build charm++ ${build_commandline}"
+ ./build charm++ ${build_commandline} || die "Failed to build charm++"
+
+ # make pdf/html docs
+ if use doc; then
+ emake -j1 -C doc/charm++
+ fi
+}
+
+src_test() {
+ make -C tests/charm++ test TESTOPTS="++local" || die
+}
+
+src_install() {
+ # Make charmc play well with gentoo before we move it into /usr/bin. This
+ # patch cannot be applied during src_prepare() because the charmc wrapper
+ # is used during building.
+ epatch "${FILESDIR}/charm-6.5.1-charmc-gentoo.patch"
+
+ sed -e "s|gentoo-include|${P}|" \
+ -e "s|gentoo-libdir|$(get_libdir)|g" \
+ -e "s|VERSION|${P}/VERSION|" \
+ -i ./src/scripts/charmc || die "failed patching charmc script"
+
+ # In the following, some of the files are symlinks to ../tmp which we need
+ # to dereference first (see bug 432834).
+
+ local i
+
+ # Install binaries.
+ for i in bin/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dobin "${i}"
+ done
+
+ # Install headers.
+ insinto /usr/include/${P}
+ for i in include/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ doins "${i}"
+ done
+
+ # Install libs incl. charm objects
+ for i in lib*/*.{so,o,a}; do
+ [[ ${i} = *.a ]] && use !static-libs && continue
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ [[ ${i} = *.so ]] && dolib.so "${i}" || dolib "${i}"
+ done
+
+ # Basic docs.
+ dodoc CHANGES README
+
+ # Install examples.
+ if use examples; then
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:(../)+bin/charmc:/usr/bin/charmc:" -i || \
+ die "Failed to fix examples"
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:./charmrun:./charmrun ++local:" -i || \
+ die "Failed to fix examples"
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/charm++/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # Install pdf/html docs
+ if use doc; then
+ cd "${S}/doc/charm++"
+ # Install pdfs.
+ insinto /usr/share/doc/${PF}/pdf
+ doins *.pdf
+ # Install html.
+ docinto html
+ dohtml -r manual/*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please test your charm installation by copying the"
+ einfo "content of /usr/share/doc/${PF}/examples to a"
+ einfo "temporary location and run 'make test'."
+}
diff --git a/sys-cluster/charm/charm-6.6.0.ebuild b/sys-cluster/charm/charm-6.6.0.ebuild
new file mode 100644
index 00000000000..5850dba3666
--- /dev/null
+++ b/sys-cluster/charm/charm-6.6.0.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_STANDARD="90"
+PYTHON_COMPAT=( python{2_7,3_3} )
+
+inherit eutils flag-o-matic fortran-2 multilib multiprocessing python-any-r1 toolchain-funcs
+
+DESCRIPTION="Message-passing parallel language and runtime system"
+HOMEPAGE="http://charm.cs.uiuc.edu/"
+SRC_URI="http://charm.cs.uiuc.edu/distrib/${P}.tar.gz"
+
+LICENSE="charm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="charmdebug charmtracing charmproduction cmkopt doc examples mlogft mpi numa smp static-libs syncft tcp"
+
+RDEPEND="mpi? ( virtual/mpi )"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ >=app-text/poppler-0.12.3-r3[utils]
+ dev-tex/latex2html
+ virtual/tex-base
+ $(python_gen_any_dep '
+ >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ ')
+ media-libs/netpbm
+ ${PYTHON_DEPS}
+ )"
+
+REQUIRED_USE="
+ doc? ( ${PYTHON_REQUIRED_USE} )
+ cmkopt? ( !charmdebug !charmtracing )
+ charmproduction? ( !charmdebug !charmtracing )"
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+get_opts() {
+ local CHARM_OPTS
+
+ # TCP instead of default UDP for socket comunication
+ # protocol
+ CHARM_OPTS+="$(usex tcp ' tcp' '')"
+
+ # enable direct SMP support using shared memory
+ CHARM_OPTS+="$(usex smp ' smp' '')"
+
+ CHARM_OPTS+="$(usex mlogft ' mlogft' '')"
+ CHARM_OPTS+="$(usex syncft ' syncft' '')"
+
+ # Build shared libraries by default.
+ CHARM_OPTS+=" --build-shared"
+
+ if use charmproduction; then
+ CHARM_OPTS+=" --with-production"
+ else
+ if use charmdebug; then
+ CHARM_OPTS+=" --enable-charmdebug"
+ fi
+
+ if use charmtracing; then
+ CHARM_OPTS+=" --enable-tracing --enable-tracing-commthread"
+ fi
+ fi
+
+ CHARM_OPTS+="$(usex numa ' --with-numa' '')"
+ echo $CHARM_OPTS
+}
+
+src_prepare() {
+ sed \
+ -e "/CMK_CF77/s:[fg]77:$(usex mpi "mpif90" "$(tc-getF77)"):g" \
+ -e "/CMK_CF90/s:f95:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/CMK_CF90/s:\`which f90.*$::g" \
+ -e "/CMK_CXX/s:g++:$(usex mpi "mpic++" "$(tc-getCXX)"):g" \
+ -e "/CMK_CC/s:gcc:$(usex mpi "mpicc" "$(tc-getCC)"):g" \
+ -e '/CMK_F90_MODINC/s:-p:-I:g' \
+ -e "/CMK_LD/s:\"$: ${LDFLAGS} \":g" \
+ -i src/arch/$(usex mpi "mpi" "net")*-linux*/*sh || die
+ sed \
+ -e "/CMK_CF90/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/F90DIR/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/f95target/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/f95version/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -i src/arch/common/*.sh || die
+
+ sed \
+ -e "s:-o conv-cpm:${LDFLAGS} &:g" \
+ -e "s:-o charmxi:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-silent:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-notify:${LDFLAGS} &:g" \
+ -e "s:-o charmrun:${LDFLAGS} &:g" \
+ -e "s:-o charmd_faceless:${LDFLAGS} &:g" \
+ -e "s:-o charmd:${LDFLAGS} &:g" \
+ -i \
+ src/scripts/Makefile \
+ src/util/charmrun-src/Makefile || die
+
+ # CMK optimization
+ use cmkopt && append-cppflags -DCMK_OPTIMIZE=1
+
+ # Fix QA notice. Filed report with upstream.
+ append-cflags -DALLOCA_H
+
+ epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-markupSanitizer.patch"
+}
+
+src_compile() {
+ local build_version="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '')"
+ local build_options="$(get_opts)"
+ #build only accepts -j from MAKEOPTS
+ local build_commandline="${build_version} ${build_options} -j$(makeopts_jobs)"
+
+ # Build charmm++ first.
+ einfo "running ./build charm++ ${build_commandline}"
+ ./build charm++ ${build_commandline} || die "Failed to build charm++"
+
+ # make pdf/html docs
+ if use doc; then
+ emake -j1 -C doc/charm++
+ fi
+}
+
+src_test() {
+ make -C tests/charm++ test TESTOPTS="++local" || die
+}
+
+src_install() {
+ # Make charmc play well with gentoo before we move it into /usr/bin. This
+ # patch cannot be applied during src_prepare() because the charmc wrapper
+ # is used during building.
+ epatch "${FILESDIR}/charm-6.5.1-charmc-gentoo.patch"
+
+ sed -e "s|gentoo-include|${P}|" \
+ -e "s|gentoo-libdir|$(get_libdir)|g" \
+ -e "s|VERSION|${P}/VERSION|" \
+ -i ./src/scripts/charmc || die "failed patching charmc script"
+
+ # In the following, some of the files are symlinks to ../tmp which we need
+ # to dereference first (see bug 432834).
+
+ local i
+
+ # Install binaries.
+ for i in bin/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dobin "${i}"
+ done
+
+ # Install headers.
+ insinto /usr/include/${P}
+ for i in include/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ doins "${i}"
+ done
+
+ # Install libs incl. charm objects
+ for i in lib*/*.{so,o,a}; do
+ [[ ${i} = *.a ]] && use !static-libs && continue
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ [[ ${i} = *.so ]] && dolib.so "${i}" || dolib "${i}"
+ done
+
+ # Basic docs.
+ dodoc CHANGES README
+
+ # Install examples.
+ if use examples; then
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:(../)+bin/charmc:/usr/bin/charmc:" -i || \
+ die "Failed to fix examples"
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:./charmrun:./charmrun ++local:" -i || \
+ die "Failed to fix examples"
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/charm++/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # Install pdf/html docs
+ if use doc; then
+ cd "${S}/doc/charm++"
+ # Install pdfs.
+ insinto /usr/share/doc/${PF}/pdf
+ doins *.pdf
+ # Install html.
+ docinto html
+ dohtml -r manual/*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please test your charm installation by copying the"
+ einfo "content of /usr/share/doc/${PF}/examples to a"
+ einfo "temporary location and run 'make test'."
+}
diff --git a/sys-cluster/charm/charm-6.6.1.ebuild b/sys-cluster/charm/charm-6.6.1.ebuild
new file mode 100644
index 00000000000..a49cd62bc92
--- /dev/null
+++ b/sys-cluster/charm/charm-6.6.1.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_STANDARD="90"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib multiprocessing python-any-r1 toolchain-funcs
+
+DESCRIPTION="Message-passing parallel language and runtime system"
+HOMEPAGE="http://charm.cs.uiuc.edu/"
+SRC_URI="http://charm.cs.uiuc.edu/distrib/${P}.tar.gz"
+
+LICENSE="charm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="charmdebug charmtracing charmproduction cmkopt doc examples mlogft mpi ampi numa smp static-libs syncft tcp"
+
+REQUIRED_USE="ampi? ( !mpi )"
+
+RDEPEND="mpi? ( virtual/mpi )"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ >=app-text/poppler-0.12.3-r3[utils]
+ dev-tex/latex2html
+ virtual/tex-base
+ $(python_gen_any_dep '
+ >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ ')
+ media-libs/netpbm
+ ${PYTHON_DEPS}
+ )"
+
+REQUIRED_USE="
+ doc? ( ${PYTHON_REQUIRED_USE} )
+ cmkopt? ( !charmdebug !charmtracing )
+ charmproduction? ( !charmdebug !charmtracing )"
+
+S="${WORKDIR}/${PN}"
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+get_opts() {
+ local CHARM_OPTS
+
+ # TCP instead of default UDP for socket comunication
+ # protocol
+ CHARM_OPTS+="$(usex tcp ' tcp' '')"
+
+ # enable direct SMP support using shared memory
+ CHARM_OPTS+="$(usex smp ' smp' '')"
+
+ CHARM_OPTS+="$(usex mlogft ' mlogft' '')"
+ CHARM_OPTS+="$(usex syncft ' syncft' '')"
+
+ # Build shared libraries by default.
+ CHARM_OPTS+=" --build-shared"
+
+ if use charmproduction; then
+ CHARM_OPTS+=" --with-production"
+ else
+ if use charmdebug; then
+ CHARM_OPTS+=" --enable-charmdebug"
+ fi
+
+ if use charmtracing; then
+ CHARM_OPTS+=" --enable-tracing --enable-tracing-commthread"
+ fi
+ fi
+
+ CHARM_OPTS+="$(usex numa ' --with-numa' '')"
+ echo $CHARM_OPTS
+}
+
+src_prepare() {
+ sed \
+ -e "/CMK_CF77/s:[fg]77:$(usex mpi "mpif90" "$(tc-getF77)"):g" \
+ -e "/CMK_CF90/s:f95:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/CMK_CF90/s:\`which f90.*$::g" \
+ -e "/CMK_CXX/s:g++:$(usex mpi "mpic++" "$(tc-getCXX)"):g" \
+ -e "/CMK_CC/s:gcc:$(usex mpi "mpicc" "$(tc-getCC)"):g" \
+ -e '/CMK_F90_MODINC/s:-p:-I:g' \
+ -e "/CMK_LD/s:\"$: ${LDFLAGS} \":g" \
+ -i src/arch/$(usex mpi "mpi" "net")*-linux*/*sh || die
+ sed \
+ -e "/CMK_CF90/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/F90DIR/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/f95target/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/f95version/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -i src/arch/common/*.sh || die
+
+ sed \
+ -e "s:-o conv-cpm:${LDFLAGS} &:g" \
+ -e "s:-o charmxi:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-silent:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-notify:${LDFLAGS} &:g" \
+ -e "s:-o charmrun:${LDFLAGS} &:g" \
+ -e "s:-o charmd_faceless:${LDFLAGS} &:g" \
+ -e "s:-o charmd:${LDFLAGS} &:g" \
+ -i \
+ src/scripts/Makefile \
+ src/util/charmrun-src/Makefile || die
+
+ # CMK optimization
+ use cmkopt && append-cppflags -DCMK_OPTIMIZE=1
+
+ # Fix QA notice. Filed report with upstream.
+ append-cflags -DALLOCA_H
+
+ epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch"
+ epatch "${FILESDIR}/charm-6.5.1-fix-markupSanitizer.patch"
+}
+
+src_compile() {
+ local build_version="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '')"
+ local build_options="$(get_opts)"
+ #build only accepts -j from MAKEOPTS
+ local build_commandline="${build_version} ${build_options} -j$(makeopts_jobs)"
+
+ # Build charmm++ first.
+ einfo "running ./build charm++ ${build_commandline}"
+ ./build charm++ ${build_commandline} || die "Failed to build charm++"
+
+ if use ampi; then
+ einfo "running ./build AMPI ${build_commandline}"
+ ./build AMPI ${build_commandline} || die "Failed to build charm++"
+ fi
+
+ # make pdf/html docs
+ if use doc; then
+ emake -j1 -C doc/charm++
+ fi
+}
+
+src_test() {
+ make -C tests/charm++ test TESTOPTS="++local" || die
+}
+
+src_install() {
+ # Make charmc play well with gentoo before we move it into /usr/bin. This
+ # patch cannot be applied during src_prepare() because the charmc wrapper
+ # is used during building.
+ epatch "${FILESDIR}/charm-6.5.1-charmc-gentoo.patch"
+
+ sed -e "s|gentoo-include|${P}|" \
+ -e "s|gentoo-libdir|$(get_libdir)|g" \
+ -e "s|VERSION|${P}/VERSION|" \
+ -i ./src/scripts/charmc || die "failed patching charmc script"
+
+ # In the following, some of the files are symlinks to ../tmp which we need
+ # to dereference first (see bug 432834).
+
+ local i
+
+ # Install binaries.
+ for i in bin/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dobin "${i}"
+ done
+
+ # Install headers.
+ insinto /usr/include/${P}
+ for i in include/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ doins "${i}"
+ done
+
+ # Install libs incl. charm objects
+ for i in lib*/*.{so,o,a}; do
+ [[ ${i} = *.a ]] && use !static-libs && continue
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ [[ ${i} = *.so ]] && dolib.so "${i}" || dolib "${i}"
+ done
+
+ # Basic docs.
+ dodoc CHANGES README
+
+ # Install examples.
+ if use examples; then
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:(../)+bin/charmc:/usr/bin/charmc:" -i || \
+ die "Failed to fix examples"
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:./charmrun:./charmrun ++local:" -i || \
+ die "Failed to fix examples"
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/charm++/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # Install pdf/html docs
+ if use doc; then
+ cd "${S}/doc/charm++"
+ # Install pdfs.
+ insinto /usr/share/doc/${PF}/pdf
+ doins *.pdf
+ # Install html.
+ docinto html
+ dohtml -r manual/*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please test your charm installation by copying the"
+ einfo "content of /usr/share/doc/${PF}/examples to a"
+ einfo "temporary location and run 'make test'."
+}
diff --git a/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch b/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch
new file mode 100644
index 00000000000..ad07fc3aa3b
--- /dev/null
+++ b/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch
@@ -0,0 +1,34 @@
+From 6b537784e9c345dee7f7cfd108c6abc779a969ae Mon Sep 17 00:00:00 2001
+From: Nicolas Bock <nicolasbock@gmail.com>
+Date: Fri, 27 Sep 2013 10:50:45 -0600
+Subject: [PATCH 2/4] Fixed bug in CkReductionMgr::reduceMessages().
+
+The first contribution of a child node is a single message. In this case
+CkReductionMgr::reduceMessages() simply returns the message without calling
+the reducer. However, when using the CkReduction::set reducer this behavior is
+incorrect, and instead the reducer should be called even for one single
+message so that the message is wrapped into a setElement struct. In the
+current implementation, the reduction becomes corrupted because the
+CkReduction::set() method one tier up in the reduction sizes the remote
+contribution incorrectly assuming a setElement struct and not a simple
+message.
+---
+ src/ck-core/ckreduction.C | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ck-core/ckreduction.C b/src/ck-core/ckreduction.C
+index 07853a2..ef3e906 100644
+--- a/src/ck-core/ckreduction.C
++++ b/src/ck-core/ckreduction.C
+@@ -850,7 +850,7 @@ CkReductionMsg *CkReductionMgr::reduceMessages(void)
+ else
+ {//Use the reducer to reduce the messages
+ //if there is only one msg to be reduced just return that message
+- if(nMsgs == 1){
++ if(nMsgs == 1 && msgArr[0]->reducer != CkReduction::set) {
+ ret = msgArr[0];
+ }else{
+ if (msgArr[0]->reducer == CkReduction::random) {
+--
+1.8.1.5
+
diff --git a/sys-cluster/charm/files/charm-6.5.1-charmc-gentoo.patch b/sys-cluster/charm/files/charm-6.5.1-charmc-gentoo.patch
new file mode 100644
index 00000000000..f1502ced7d9
--- /dev/null
+++ b/sys-cluster/charm/files/charm-6.5.1-charmc-gentoo.patch
@@ -0,0 +1,39 @@
+From 664eb097d1c5d1a158b1f41badc79d369a06aab6 Mon Sep 17 00:00:00 2001
+From: Nicolas Bock <nicolasbock@gmail.com>
+Date: Fri, 27 Sep 2013 10:53:31 -0600
+Subject: [PATCH 4/4] Fix paths for gentoo.
+
+---
+ src/scripts/charmc | 16 +++-------------
+ 1 file changed, 3 insertions(+), 13 deletions(-)
+
+diff --git a/src/scripts/charmc b/src/scripts/charmc
+index 4d37a6b..8ec2f70 100755
+--- a/src/scripts/charmc
++++ b/src/scripts/charmc
+@@ -361,19 +361,9 @@ then
+ PROG_EXT=".exe"
+ fi
+
+-CHARMLIB="$CHARMBIN/../lib"
+-CHARMINC="$CHARMBIN/../include"
+-CHARMLIBSO=
+-if test -d "$CHARMBIN/../lib_so"
+-then
+- CHARMLIBSO=`cd $CHARMBIN/../lib_so 2>/dev/null && pwd`
+- #getting absolute path is harder than thought because of symbolic links and ..
+- #ksh needs cd -P to resolve werid symbolic links, however -P is not portable
+- #csh is ok too if it exists
+- test -z "$CHARMLIBSO" && CHARMLIBSO=`cd -P $CHARMBIN/../lib_so 2>/dev/null && pwd`
+- test -z "$CHARMLIBSO" && CHARMLIBSO=`csh -c "cd $CHARMBIN/../lib_so >& /dev/null && pwd"`
+- test -z "$CHARMLIBSO" && echo "$CHARMBIN/../lib_so: not found" && exit 1
+-fi
++CHARMLIB="/usr/gentoo-libdir"
++CHARMINC="/usr/include/gentoo-include"
++CHARMLIBSO="/usr/gentoo-libdir"
+
+ ##############################################################################
+ #
+--
+1.8.1.5
+
diff --git a/sys-cluster/charm/files/charm-6.5.1-cleanup-config.patch b/sys-cluster/charm/files/charm-6.5.1-cleanup-config.patch
new file mode 100644
index 00000000000..ec71eb27d46
--- /dev/null
+++ b/sys-cluster/charm/files/charm-6.5.1-cleanup-config.patch
@@ -0,0 +1,58 @@
+From b0af812652269a59457ad1bbf57165c0543bcd07 Mon Sep 17 00:00:00 2001
+From: Nicolas Bock <nicolasbock@gmail.com>
+Date: Fri, 27 Sep 2013 10:49:52 -0600
+Subject: [PATCH 1/4] Commented out colliding defines in conv-autoconfig.h
+
+The colliding defines (bug #252) are commented out in configure.
+---
+ src/scripts/configure | 5 +++++
+ src/scripts/configure.in | 3 +++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/src/scripts/configure b/src/scripts/configure
+index acd582c..faf268f 100755
+--- a/src/scripts/configure
++++ b/src/scripts/configure
+@@ -1703,6 +1703,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_config_headers="$ac_config_headers conv-autoconfig.h"
+
+
++ac_config_commands="$ac_config_commands config-cleanup"
++
++
+ CHARMINC="."
+ test -r ./conv-config.sh && . ./conv-config.sh
+
+@@ -5259,6 +5262,7 @@ for ac_config_target in $ac_config_targets
+ do
+ case $ac_config_target in
+ "conv-autoconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS conv-autoconfig.h" ;;
++ "config-cleanup") CONFIG_COMMANDS="$CONFIG_COMMANDS config-cleanup" ;;
+ "libs/ck-libs/ampi/ampiCC") CONFIG_FILES="$CONFIG_FILES libs/ck-libs/ampi/ampiCC" ;;
+ "libs/ck-libs/ampi/ampirun") CONFIG_FILES="$CONFIG_FILES libs/ck-libs/ampi/ampirun" ;;
+ "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+@@ -5812,6 +5816,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
+
+
+ case $ac_file$ac_mode in
++ "config-cleanup":C) sed -i -e 's:^#define\s\+PACKAGE://&:' conv-autoconfig.h ;;
+ "default":C) chmod +x libs/ck-libs/ampi/ampiCC libs/ck-libs/ampi/ampirun
+ ;;
+
+diff --git a/src/scripts/configure.in b/src/scripts/configure.in
+index d1285ed..cad9a42 100644
+--- a/src/scripts/configure.in
++++ b/src/scripts/configure.in
+@@ -3,6 +3,9 @@ AC_INIT(./Makefile)
+
+ AC_CONFIG_HEADER(conv-autoconfig.h)
+
++AC_CONFIG_COMMANDS([config-cleanup],
++ [sed -i -e 's:^#define\s\+PACKAGE://&:' conv-autoconfig.h])
++
+ CHARMINC="."
+ test -r ./conv-config.sh && . ./conv-config.sh
+
+--
+1.8.1.5
+
diff --git a/sys-cluster/charm/files/charm-6.5.1-fix-markupSanitizer.patch b/sys-cluster/charm/files/charm-6.5.1-fix-markupSanitizer.patch
new file mode 100644
index 00000000000..6ed4c1989b4
--- /dev/null
+++ b/sys-cluster/charm/files/charm-6.5.1-fix-markupSanitizer.patch
@@ -0,0 +1,203 @@
+From 88f5739d3f0d34c51f318fc460b843253b4242e0 Mon Sep 17 00:00:00 2001
+From: Nicolas Bock <nicolasbock@gmail.com>
+Date: Fri, 8 Nov 2013 09:58:55 -0700
+Subject: [PATCH 2/2] Make markupSanitizer.py support python 3.1 and 3.2
+
+The script only supports <python-3 because of how uni-code literals are
+treated in python-3.{1,2}. In python-2, a unicode string had to be prefixed
+with 'u', while this notation was dropped in python-3.{1,2}. I have added a
+check to the script so that it runs now with python-2.7 and python-3.{1,2,3}.
+---
+ doc/markupSanitizer.py | 179 ++++++++++++++++++++++++++-----------------------
+ 1 file changed, 95 insertions(+), 84 deletions(-)
+
+diff --git a/doc/markupSanitizer.py b/doc/markupSanitizer.py
+index f206cab..6fe247d 100755
+--- a/doc/markupSanitizer.py
++++ b/doc/markupSanitizer.py
+@@ -4,87 +4,98 @@ from bs4 import BeautifulSoup
+ import sys
+ import os
+
+-# Accept filename as user input
+-argc = len( sys.argv )
+-if (argc < 2): raise Exception
+-fileName = sys.argv[1];
+-
+-# Construct a DOM object
+-soup = BeautifulSoup(open(fileName), "lxml")
+-
+-# Assuming, tt tags are not spewed recklessly by latex2html,
+-# replace them with code tags
+-for t in soup('tt'):
+- t.wrap( soup.new_tag('code') )
+- t.unwrap()
+-
+-# Rewrap all div class=alltt blocks in pre tags
+-for d in soup('div','alltt'):
+- d.wrap( soup.new_tag('pre') )
+- d.unwrap()
+-
+-# Remove br and span tags from within pre sections
+-for p in soup('pre'):
+- for b in p('br'):
+- b.extract()
+- for s in p('span'):
+- s.unwrap()
+-
+-# Remove all useless class 'arabic' spans
+-for s in soup('span','arabic'):
+- s.unwrap()
+-
+-# Extract the navigation bar
+-navmenu = soup.find('div', 'navigation')
+-if navmenu:
+- navmenu.extract()
+-
+-# Wrap the remaining contents within a div
+-if not soup.find('div', id='maincontainer'):
+- soup.body['id'] = 'maincontainer'
+- soup.body.name = 'div'
+- soup.find('div', id='maincontainer').wrap( soup.new_tag('body') )
+-
+-if navmenu:
+- # If this navmenu doesn't already have a TOC, insert one
+- if not navmenu.find('ul','manual-toc'):
+- # Add a toc within the navmenu
+- navmenuTOC = BeautifulSoup(open("tmp-navmenu.html"), "lxml")
+- navmenuTOC = navmenuTOC.find('ul','manual-toc').extract()
+- navmenuTOC.append( BeautifulSoup("".join([
+- '<li><a href="http://charm.cs.illinois.edu">PPL Homepage</a></li>',
+- '<li><a href="http://charm.cs.illinois.edu/help">Other Manuals</a></li>'])
+- ) )
+- navmenu.append(navmenuTOC)
+-
+- # Insert navigation symbols to prev and next links
+- prevsymbol = soup.new_tag('span')
+- prevsymbol['class'] = 'navsymbol'
+- prevsymbol.string = u'\xab'
+- prv = navmenu.find('li',id='nav-prev')
+- if prv:
+- prv.find('a').insert(0, prevsymbol)
+-
+- nextsymbol = soup.new_tag('span')
+- nextsymbol['class'] = 'navsymbol'
+- nextsymbol.string = u'\xbb'
+- nxt = navmenu.find('li',id='nav-next')
+- if nxt:
+- nxt.find('a').append(nextsymbol)
+-
+- # Reinsert the navigation bar at the end
+- soup.body.append(navmenu)
+-
+-# Extract the title
+-titl = soup.find('title')
+-
+-# Replace the head section with the user-supplied head markup
+-soup.find('head').extract()
+-newhead = BeautifulSoup(open("../assets/head.html"), "lxml")
+-newhead = newhead.find('head').extract()
+-newhead.append(titl)
+-soup.html.body.insert_before(newhead)
+-
+-# Print cleaned up markup to stdout
+-print( soup.prettify(formatter="html") )
+-
++def main ():
++ # Accept filename as user input
++ argc = len( sys.argv )
++ if (argc < 2): raise Exception
++ fileName = sys.argv[1];
++
++ # Construct a DOM object
++ soup = BeautifulSoup(open(fileName), "lxml")
++
++ # Assuming, tt tags are not spewed recklessly by latex2html,
++ # replace them with code tags
++ for t in soup('tt'):
++ t.wrap( soup.new_tag('code') )
++ t.unwrap()
++
++ # Rewrap all div class=alltt blocks in pre tags
++ for d in soup('div','alltt'):
++ d.wrap( soup.new_tag('pre') )
++ d.unwrap()
++
++ # Remove br and span tags from within pre sections
++ for p in soup('pre'):
++ for b in p('br'):
++ b.extract()
++ for s in p('span'):
++ s.unwrap()
++
++ # Remove all useless class 'arabic' spans
++ for s in soup('span','arabic'):
++ s.unwrap()
++
++ # Extract the navigation bar
++ navmenu = soup.find('div', 'navigation')
++ if navmenu:
++ navmenu.extract()
++
++ # Wrap the remaining contents within a div
++ if not soup.find('div', id='maincontainer'):
++ soup.body['id'] = 'maincontainer'
++ soup.body.name = 'div'
++ soup.find('div', id='maincontainer').wrap( soup.new_tag('body') )
++
++ if navmenu:
++ # If this navmenu doesn't already have a TOC, insert one
++ if not navmenu.find('ul','manual-toc'):
++ # Add a toc within the navmenu
++ navmenuTOC = BeautifulSoup(open("tmp-navmenu.html"), "lxml")
++ navmenuTOC = navmenuTOC.find('ul','manual-toc').extract()
++ navmenuTOC.append( BeautifulSoup("".join([
++ '<li><a href="http://charm.cs.illinois.edu">PPL Homepage</a></li>',
++ '<li><a href="http://charm.cs.illinois.edu/help">Other Manuals</a></li>'])
++ ) )
++ navmenu.append(navmenuTOC)
++
++ # Insert navigation symbols to prev and next links
++ prevsymbol = soup.new_tag('span')
++ prevsymbol['class'] = 'navsymbol'
++ prevsymbol.string = u('\xab')
++ prv = navmenu.find('li',id='nav-prev')
++ if prv:
++ prv.find('a').insert(0, prevsymbol)
++
++ nextsymbol = soup.new_tag('span')
++ nextsymbol['class'] = 'navsymbol'
++ nextsymbol.string = u('\xbb')
++ nxt = navmenu.find('li',id='nav-next')
++ if nxt:
++ nxt.find('a').append(nextsymbol)
++
++ # Reinsert the navigation bar at the end
++ soup.body.append(navmenu)
++
++ # Extract the title
++ titl = soup.find('title')
++
++ # Replace the head section with the user-supplied head markup
++ soup.find('head').extract()
++ newhead = BeautifulSoup(open("../assets/head.html"), "lxml")
++ newhead = newhead.find('head').extract()
++ newhead.append(titl)
++ soup.html.body.insert_before(newhead)
++
++ # Print cleaned up markup to stdout
++ print( soup.prettify(formatter="html") )
++
++if sys.version < '3':
++ import codecs
++ def u (x):
++ return codecs.unicode_escape_decode(x)[0]
++else:
++ def u (x):
++ return x
++
++if __name__ == "__main__":
++ main()
+--
+1.8.1.5
+
diff --git a/sys-cluster/charm/files/charm-6.5.1-fix-navmenuGenerator.patch b/sys-cluster/charm/files/charm-6.5.1-fix-navmenuGenerator.patch
new file mode 100644
index 00000000000..a19a8dba1ff
--- /dev/null
+++ b/sys-cluster/charm/files/charm-6.5.1-fix-navmenuGenerator.patch
@@ -0,0 +1,30 @@
+From 8b699f6c49df26b979da397b47c7dc7a099ed6b6 Mon Sep 17 00:00:00 2001
+From: Nicolas Bock <nicolasbock@gmail.com>
+Date: Sat, 28 Sep 2013 07:47:36 -0600
+Subject: [PATCH] Properly test for None return value in navmenuGenerator.py
+
+---
+ doc/navmenuGenerator.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/doc/navmenuGenerator.py b/doc/navmenuGenerator.py
+index c10afb5..5e5b97c 100755
+--- a/doc/navmenuGenerator.py
++++ b/doc/navmenuGenerator.py
+@@ -13,7 +13,12 @@ fileName = sys.argv[1];
+ soup = BeautifulSoup(open(fileName), "lxml")
+
+ # Get just the table of contents from the index page
+-toc = soup.find("ul","ChildLinks").extract()
++toc = soup.find("ul","ChildLinks")
++
++if toc == None:
++ sys.exit(0)
++
++toc = toc.extract()
+
+ # Retain only part and chapter titles
+ for sctn in toc.select("li > ul > li > ul"):
+--
+1.8.1.5
+
diff --git a/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch b/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch
new file mode 100644
index 00000000000..1cc6b432c3d
--- /dev/null
+++ b/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch
@@ -0,0 +1,50 @@
+From 14f407a5d183cdac7029cc54a9d8ae6b0cb5cbcd Mon Sep 17 00:00:00 2001
+From: Nicolas Bock <nicolasbock@gmail.com>
+Date: Fri, 27 Sep 2013 10:52:18 -0600
+Subject: [PATCH 3/4] charmrun.c: parsing of strings now parses "\n" into '\n'
+
+Since gdb lacks anything like ';' to separate several commands in one line,
+the commands need to be separated by a newline character. I have added some
+parsing logic so that the string "\n" will now be translated into the
+character '\n'.
+---
+ src/arch/net/charmrun/charmrun.c | 23 +++++++++++++++++++++--
+ 1 file changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/src/arch/net/charmrun/charmrun.c b/src/arch/net/charmrun/charmrun.c
+index 6837712..8818cf8 100644
+--- a/src/arch/net/charmrun/charmrun.c
++++ b/src/arch/net/charmrun/charmrun.c
+@@ -454,8 +454,27 @@ static int pparam_setdef(def, value)
+ if (*p) return -1;
+ return 0;
+ case 's' :
+- *def->where.s = strdup(value);
+- return 0;
++ {
++ /* Parse input string and convert a literal "\n" into '\n'. */
++ *def->where.s = (char*) calloc(strlen(value)+1, sizeof(char));
++ char* parsed_value = (char*) *def->where.s;
++ int i;
++ int j = 0;
++ for(i = 0; i < strlen(value); i++)
++ {
++ if(i+1 < strlen(value))
++ {
++ if(value[i] == '\\' && value[i+1] == 'n')
++ {
++ parsed_value[j++] = '\n';
++ i++;
++ continue;
++ }
++ }
++ parsed_value[j++] = value[i];
++ }
++ return 0;
++ }
+ case 'f' :
+ *def->where.f = strtol(value, &p, 10);
+ if (*p) return -1;
+--
+1.8.1.5
+
diff --git a/sys-cluster/charm/files/charm-6.5.1-static-library-fix.patch b/sys-cluster/charm/files/charm-6.5.1-static-library-fix.patch
new file mode 100644
index 00000000000..13efb2123b5
--- /dev/null
+++ b/sys-cluster/charm/files/charm-6.5.1-static-library-fix.patch
@@ -0,0 +1,396 @@
+From 3a7261ab3a00472dd4bde0619c145c69aecf80c3 Mon Sep 17 00:00:00 2001
+From: Nicolas Bock <nicolasbock@gmail.com>
+Date: Mon, 14 Oct 2013 07:15:14 -0600
+Subject: [PATCH] Some libraries are only built statically,
+
+preventing a Charm++ installation with only dynamic libraries.
+
+On a typical Linux system only shared libraries are installed, because of the
+usual security and bloat arguments. However, if I build charm with
+--build-shared, and then install only what is in lib_so, the charmc script
+breaks because some Converse libraries are built purely as .o and don't end up
+in lib_so. One example is seed based load balancing, e.g. libldb-rand.o. As
+far as I can tell, this is not too hard to fix. In the main makefile, the
+targets libldb-*.o are renamed to libldb-*.a, and the charmc script now tests
+both .a and .so when linking the seed based load balancing code.
+---
+ src/scripts/Makefile | 136 +++++++++++++++++++++++++--------------------------
+ src/scripts/charmc | 37 ++++++++------
+ 2 files changed, 91 insertions(+), 82 deletions(-)
+
+diff --git a/src/scripts/Makefile b/src/scripts/Makefile
+index 51d0e7b..1550ed2 100644
+--- a/src/scripts/Makefile
++++ b/src/scripts/Makefile
+@@ -349,7 +349,7 @@ dirs+sources:
+ # Converse Libraries
+ #
+ ###############################################################################
+-CLBLIBS=$(L)/libldb-rand.o $(L)/libldb-spray.o $(L)/libldb-workstealing.o $(L)/libldb-neighbor.o $(L)/libldb-none.o $(L)/libldb-test.o $(L)/libldb-bluegene.o
++CLBLIBS=$(L)/libldb-rand.a $(L)/libldb-spray.a $(L)/libldb-workstealing.a $(L)/libldb-neighbor.a $(L)/libldb-none.a $(L)/libldb-test.a $(L)/libldb-bluegene.a
+
+ TRACELIBS = $(L)/libtrace-converse.a $(L)/libtracef_f.a
+
+@@ -363,32 +363,32 @@ TRACELIBS += $(L)/libtrace-projections.a $(L)/libtrace-summary.a \
+ $(L)/libtrace-memory.a
+ endif
+
+-MEMLIBS=$(L)/libmemory-default.o $(L)/libmemory-os.o $(L)/libmemory-gnu.o \
+- $(L)/libmemory-gnuold.o $(L)/libmemory-verbose.o \
+- $(L)/libmemory-paranoid.o \
+- $(L)/libmemory-leak.o $(L)/libmemory-isomalloc.o \
+- $(L)/libmemory-os-verbose.o $(L)/libmemory-os-isomalloc.o \
+- $(L)/libmemory-os-leak.o $(L)/libmemory-os-paranoid.o \
+- $(L)/libmemory-os-lock.o $(L)/libmemory-os-wrapper.o
++MEMLIBS=$(L)/libmemory-default.a $(L)/libmemory-os.a $(L)/libmemory-gnu.a \
++ $(L)/libmemory-gnuold.a $(L)/libmemory-verbose.a \
++ $(L)/libmemory-paranoid.a \
++ $(L)/libmemory-leak.a $(L)/libmemory-isomalloc.a \
++ $(L)/libmemory-os-verbose.a $(L)/libmemory-os-isomalloc.a \
++ $(L)/libmemory-os-leak.a $(L)/libmemory-os-paranoid.a \
++ $(L)/libmemory-os-lock.a $(L)/libmemory-os-wrapper.a
+
+ BUILD_CHARMDEBUG=$(shell CHARMINC=.; if test -f ./conv-config.sh; then . ./conv-config.sh; echo $$CMK_CHARMDEBUG; fi )
+
+ ifneq "$(BUILD_CHARMDEBUG)" "0"
+-MEMLIBS += $(L)/libmemory-charmdebug.o $(L)/libmemory-charmdebug-mmap.o \
+- $(L)/libmemory-charmdebug-slot.o \
+- $(L)/libmemory-charmdebug-mmap-slot.o \
+- $(L)/libmemory-os-charmdebug.o $(L)/libmemory-hooks-charmdebug.o
++MEMLIBS += $(L)/libmemory-charmdebug.a $(L)/libmemory-charmdebug-mmap.a \
++ $(L)/libmemory-charmdebug-slot.a \
++ $(L)/libmemory-charmdebug-mmap-slot.a \
++ $(L)/libmemory-os-charmdebug.a $(L)/libmemory-hooks-charmdebug.a
+ endif
+
+-THREADLIBS=$(L)/libthreads-default.o $(L)/libthreads-default-tls.o \
+- $(L)/libthreads-qt.o $(L)/libthreads-qt-tls.o \
+- $(L)/libthreads-context.o $(L)/libthreads-context-tls.o \
+- $(L)/libthreads-uJcontext.o $(L)/libthreads-uJcontext-tls.o \
+- $(L)/libthreads-pthreads.o $(L)/libthreads-fibers.o \
+- $(L)/libthreads-stackcopy.o $(L)/libthreads-memoryalias.o \
+- $(L)/libthreads-qt-memoryalias.o \
+- $(L)/libthreads-context-memoryalias.o \
+- $(L)/libthreads-uJcontext-memoryalias.o
++THREADLIBS=$(L)/libthreads-default.a $(L)/libthreads-default-tls.a \
++ $(L)/libthreads-qt.a $(L)/libthreads-qt-tls.a \
++ $(L)/libthreads-context.a $(L)/libthreads-context-tls.a \
++ $(L)/libthreads-uJcontext.a $(L)/libthreads-uJcontext-tls.a \
++ $(L)/libthreads-pthreads.a $(L)/libthreads-fibers.a \
++ $(L)/libthreads-stackcopy.a $(L)/libthreads-memoryalias.a \
++ $(L)/libthreads-qt-memoryalias.a \
++ $(L)/libthreads-context-memoryalias.a \
++ $(L)/libthreads-uJcontext-memoryalias.a
+
+ CVLIBS=$(L)/libconv-core.a \
+ $(L)/libconv-cplus-y.a $(L)/libconv-cplus-n.a \
+@@ -543,19 +543,19 @@ lz4.o: lz4.c lz4.h
+ $(CHARMC) -o $@ $<
+
+ ## Converse load balancers (seed balancers, -balance)
+-$(L)/libldb-none.o: cldb.none.c $(CVHEADERS)
++$(L)/libldb-none.a: cldb.none.c $(CVHEADERS)
+ $(CHARMC) -o $@ cldb.none.c
+
+-$(L)/libldb-rand.o: cldb.rand.c cldb.h $(CVHEADERS)
++$(L)/libldb-rand.a: cldb.rand.c cldb.h $(CVHEADERS)
+ $(CHARMC) -o $@ cldb.rand.c
+
+-$(L)/libldb-neighbor.o: cldb.neighbor.c cldb.neighbor.h graph.h $(CVHEADERS)
++$(L)/libldb-neighbor.a: cldb.neighbor.c cldb.neighbor.h graph.h $(CVHEADERS)
+ $(CHARMC) -o $@ cldb.neighbor.c
+
+-$(L)/libldb-workstealing.o: cldb.workstealing.c cldb.workstealing.h graph.h $(CVHEADERS)
++$(L)/libldb-workstealing.a: cldb.workstealing.c cldb.workstealing.h graph.h $(CVHEADERS)
+ $(CHARMC) -o $@ cldb.workstealing.c
+
+-$(L)/libldb-spray.o: cldb.spray.c $(CVHEADERS)
++$(L)/libldb-spray.a: cldb.spray.c $(CVHEADERS)
+ $(CHARMC) -o $@ cldb.spray.c
+
+
+@@ -565,138 +565,138 @@ $(L)/libldb-spray.o: cldb.spray.c $(CVHEADERS)
+ #//$(L)/libldb-prioritycentralizedopt.o: cldb.prioritycentralizedopt.c cldb.prioritycentralizedopt.h $(CVHEADERS)
+ #// $(CHARMC) -o $@ cldb.prioritycentralizedopt.c
+
+-$(L)/libldb-test.o: cldb.test.c $(CVHEADERS)
++$(L)/libldb-test.a: cldb.test.c $(CVHEADERS)
+ $(CHARMC) -o $@ cldb.test.c
+
+-$(L)/libldb-bluegene.o: cldb.bluegene.c $(CVHEADERS)
++$(L)/libldb-bluegene.a: cldb.bluegene.c $(CVHEADERS)
+ $(CHARMC) -o $@ cldb.bluegene.c
+
+ ## Memory allocation libraries (-memory)
+ MEM_DEPS=memory.c memory-gnu.c memory-gnuold.c converse.h conv-mach.h $(CVHEADERS)
+-$(L)/libmemory-default.o: $(MEM_DEPS)
++$(L)/libmemory-default.a: $(MEM_DEPS)
+ $(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_DEFAULT memory.c
+
+-$(L)/libmemory-os.o: $(MEM_DEPS)
++$(L)/libmemory-os.a: $(MEM_DEPS)
+ $(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS memory.c
+
+-$(L)/libmemory-os-verbose.o: memory-verbose.c $(MEM_DEPS)
++$(L)/libmemory-os-verbose.a: memory-verbose.c $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_VERBOSE memory.c || touch $@
+
+-$(L)/libmemory-os-paranoid.o: memory-paranoid.c $(MEM_DEPS)
++$(L)/libmemory-os-paranoid.a: memory-paranoid.c $(MEM_DEPS)
+ -$(CHARMC) -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_PARANOID memory.c || touch $@
+
+-$(L)/libmemory-os-leak.o: $(MEM_DEPS)
++$(L)/libmemory-os-leak.a: $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_LEAK memory.c || touch $@
+
+-$(L)/libmemory-os-isomalloc.o: memory-isomalloc.c $(MEM_DEPS)
++$(L)/libmemory-os-isomalloc.a: memory-isomalloc.c $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_ISOMALLOC memory.c || touch $@
+
+-$(L)/libmemory-os-lock.o: memory-lock.c $(MEM_DEPS)
++$(L)/libmemory-os-lock.a: memory-lock.c $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_LOCK memory.c || touch $@
+
+-$(L)/libmemory-os-charmdebug.o: memory-charmdebug.c $(MEM_DEPS)
++$(L)/libmemory-os-charmdebug.a: memory-charmdebug.c $(MEM_DEPS)
+ -$(CHARMC) -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_CHARMDEBUG memory.c || touch $@
+
+-$(L)/libmemory-os-wrapper.o: memory-os-wrapper.C $(MEM_DEPS)
++$(L)/libmemory-os-wrapper.a: memory-os-wrapper.C $(MEM_DEPS)
+ -$(CHARMC) -o $@ memory-os-wrapper.C || touch $@
+
+-$(L)/libmemory-hooks-charmdebug.o: memory-charmdebug.c $(MEM_DEPS)
++$(L)/libmemory-hooks-charmdebug.a: memory-charmdebug.c $(MEM_DEPS)
+ -$(CHARMC) -o $@ -DCMK_MEMORY_BUILD_GNU_HOOKS -DCMK_MEMORY_BUILD_CHARMDEBUG memory.c || touch $@
+
+ # If the system doesn't have sbrk, these compilations may fail.
+ # This is OK, but then we can't use "-memory gnu" or friends.
+-$(L)/libmemory-gnu.o: $(MEM_DEPS)
++$(L)/libmemory-gnu.a: $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_GNU memory.c || touch $@
+
+-$(L)/libmemory-gnuold.o: $(MEM_DEPS)
++$(L)/libmemory-gnuold.a: $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_GNUOLD memory.c || touch $@
+
+-$(L)/libmemory-verbose.o: memory-verbose.c $(MEM_DEPS)
++$(L)/libmemory-verbose.a: memory-verbose.c $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_VERBOSE memory.c || touch $@
+
+-$(L)/libmemory-paranoid.o: memory-paranoid.c $(MEM_DEPS)
++$(L)/libmemory-paranoid.a: memory-paranoid.c $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_PARANOID memory.c || touch $@
+
+-$(L)/libmemory-leak.o: memory-leak.c $(MEM_DEPS)
++$(L)/libmemory-leak.a: memory-leak.c $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_LEAK memory.c || touch $@
+
+-$(L)/libmemory-cache.o: memory-cache.c $(MEM_DEPS)
++$(L)/libmemory-cache.a: memory-cache.c $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_CACHE memory.c || touch $@
+
+-$(L)/libmemory-isomalloc.o: memory-isomalloc.c $(MEM_DEPS)
++$(L)/libmemory-isomalloc.a: memory-isomalloc.c $(MEM_DEPS)
+ -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_ISOMALLOC memory.c || touch $@
+
+-$(L)/libmemory-charmdebug.o: memory-charmdebug.c $(MEM_DEPS)
++$(L)/libmemory-charmdebug.a: memory-charmdebug.c $(MEM_DEPS)
+ -$(CHARMC) -I. -optimize -o $@ -DCMK_MEMORY_BUILD_CHARMDEBUG memory.c || touch $@
+
+-$(L)/libmemory-charmdebug-slot.o: memory-charmdebug.c $(MEM_DEPS)
++$(L)/libmemory-charmdebug-slot.a: memory-charmdebug.c $(MEM_DEPS)
+ -$(CHARMC) -I. -optimize -o $@ -DCMK_MEMORY_BUILD_CHARMDEBUG -DCMK_SEPARATE_SLOT memory.c || touch $@
+
+-$(L)/libmemory-charmdebug-mmap.o: memory-charmdebug.c $(MEM_DEPS)
++$(L)/libmemory-charmdebug-mmap.a: memory-charmdebug.c $(MEM_DEPS)
+ -$(CHARMC) -I. -optimize -o $@ -DCMK_MEMORY_BUILD_CHARMDEBUG -DCPD_USE_MMAP memory.c || touch $@
+
+-$(L)/libmemory-charmdebug-mmap-slot.o: memory-charmdebug.c $(MEM_DEPS)
++$(L)/libmemory-charmdebug-mmap-slot.a: memory-charmdebug.c $(MEM_DEPS)
+ -$(CHARMC) -I. -optimize -o $@ -DCMK_MEMORY_BUILD_CHARMDEBUG -DCPD_USE_MMAP -DCMK_SEPARATE_SLOT memory.c || touch $@
+
+ ## Thread libraries (-thread)
+
+ LIBTHREADSDEPS = threads.c $(CVHEADERS) QUICK_THREADS
+
+-$(L)/libthreads-default.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-default.a: $(LIBTHREADSDEPS)
+ $(CHARMC) -o $@ -DCMK_THREADS_BUILD_DEFAULT=1 -IQuickThreads -I. threads.c
+
+-$(L)/libthreads-default-tls.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-default-tls.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_DEFAULT=1 -DCMK_THREADS_BUILD_TLS=1 -IQuickThreads -I. threads.c 2> /dev/null || touch $@
+
+-$(L)/libthreads-qt.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-qt.a: $(LIBTHREADSDEPS)
+ $(CHARMC) -o $@ -DCMK_THREADS_BUILD_QT=1 -IQuickThreads threads.c
+
+-$(L)/libthreads-qt-tls.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-qt-tls.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_QT=1 -DCMK_THREADS_BUILD_TLS=1 -IQuickThreads threads.c 2> /dev/null || touch $@
+
+-$(L)/libthreads-context.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-context.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_CONTEXT=1 -IQuickThreads threads.c || touch $@
+
+-$(L)/libthreads-context-tls.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-context-tls.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_CONTEXT=1 -DCMK_THREADS_BUILD_TLS=1 -IQuickThreads threads.c 2> /dev/null || touch $@
+
+-$(L)/libthreads-uJcontext.o: $(LIBTHREADSDEPS) uJcontext.c
++$(L)/libthreads-uJcontext.a: $(LIBTHREADSDEPS) uJcontext.c
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_JCONTEXT=1 -IQuickThreads -I. threads.c || touch $@
+
+-$(L)/libthreads-uJcontext-tls.o: $(LIBTHREADSDEPS) uJcontext.c
++$(L)/libthreads-uJcontext-tls.a: $(LIBTHREADSDEPS) uJcontext.c
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_JCONTEXT=1 -DCMK_THREADS_BUILD_TLS=1 -IQuickThreads -I. threads.c || touch $@
+
+-$(L)/libthreads-pthreads.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-pthreads.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_PTHREADS=1 -IQuickThreads threads.c || touch $@
+
+-$(L)/libthreads-fibers.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-fibers.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_FIBERS=1 -IQuickThreads threads.c 2> /dev/null || touch $@
+
+-$(L)/libthreads-stackcopy.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-stackcopy.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_STACKCOPY=1 -IQuickThreads threads.c || touch $@
+
+-$(L)/libthreads-memoryalias.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-memoryalias.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_ALIAS_STACK=1 -DCMK_THREADS_BUILD_DEFAULT=1 -IQuickThreads threads.c || touch $@
+
+-$(L)/libthreads-qt-memoryalias.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-qt-memoryalias.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_ALIAS_STACK=1 -DCMK_THREADS_BUILD_QT=1 -IQuickThreads threads.c || touch $@
+
+-$(L)/libthreads-context-memoryalias.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-context-memoryalias.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_ALIAS_STACK=1 -DCMK_THREADS_BUILD_CONTEXT=1 -IQuickThreads threads.c || touch $@
+
+-$(L)/libthreads-uJcontext-memoryalias.o: $(LIBTHREADSDEPS)
++$(L)/libthreads-uJcontext-memoryalias.a: $(LIBTHREADSDEPS)
+ -$(CHARMC) -o $@ -DCMK_THREADS_ALIAS_STACK=1 -DCMK_THREADS_BUILD_JCONTEXT=1 -IQuickThreads -I. threads.c || touch $@
+
+ ## Global swapping (-swapglobal)
+-swapglobal-target: $(L)/libglobal-swap.o $(L)/libglobal-copy.o $(L)/loadsym.o
++swapglobal-target: $(L)/libglobal-swap.a $(L)/libglobal-copy.a $(L)/loadsym.a
+
+-$(L)/libglobal-swap.o: global-elfgot.C $(CVHEADERS)
++$(L)/libglobal-swap.a: global-elfgot.C $(CVHEADERS)
+ -$(CHARMC) -c global-elfgot.C -o $@ || touch $@
+
+-$(L)/libglobal-copy.o: global-elfcopy.C $(CVHEADERS)
++$(L)/libglobal-copy.a: global-elfcopy.C $(CVHEADERS)
+ -$(CHARMC) -c global-elfcopy.C -o $@ || touch $@
+
+-$(L)/loadsym.o: loadsym.c $(CVHEADERS)
++$(L)/loadsym.a: loadsym.c $(CVHEADERS)
+ -$(CHARMC) -c loadsym.c -o $@ || touch $@
+
+ ###############################################################################
+diff --git a/src/scripts/charmc b/src/scripts/charmc
+index 4d37a6b..ee4e76c 100755
+--- a/src/scripts/charmc
++++ b/src/scripts/charmc
+@@ -340,6 +340,14 @@ printVersion()
+ echo Charm++ Version $version
+ }
+
++getLibraryObject()
++{
++ if [[ -f "${CHARMLIB}/$1-$2.a" ]]; then
++ echo "${CHARMLIB}/$1-$2.a"
++ else
++ echo "${CHARMLIBSO}/$1-$2.so"
++ fi
++}
+
+ ##############################################################################
+ #
+@@ -1616,13 +1624,12 @@ then
+ fi
+
+ BAL_EXT=`getExtention $BALANCE`
+-if [ -z "$BAL_EXT" ]
+-then
+-# Balance has no extention-- is a library reference
+- BAL_OBJ="$CHARMLIB/libldb-$BALANCE.o"
++if [[ -z "$BAL_EXT" ]]; then
++ # Balance has no extension-- is a library reference
++ BAL_OBJ=$(getLibraryObject "libldb" ${BALANCE})
+ else
+-# Balance has some extention-- must be a .o or .a file
+- BAL_OBJ="$BALANCE"
++ # Balance has some extension-- must be a .o or .a file
++ BAL_OBJ="$BALANCE"
+ fi
+
+ Debug "Finished with BAL_OBJ=$BAL_OBJ, TRACEMODE=$TRACEMODE..."
+@@ -1638,10 +1645,11 @@ then
+ fi
+ fi
+
++Debug "Finished with BAL_OBJ=$BAL_OBJ, TRACEMODE=$TRACEMODE..."
+
+ # Check for valid choice of MEMORY
+
+-MEM_OBJ="$CHARMLIB/libmemory-$MEMORY.o"
++MEM_OBJ=$(getLibraryObject "libmemory" ${MEMORY})
+
+ if [ ! -r $MEM_OBJ -o ! -s $MEM_OBJ ]
+ then
+@@ -1652,7 +1660,7 @@ fi
+ # For memory wrapping around the OS allocator, need to add also the wrapper object
+ case $MEMORY in
+ os-*)
+- MEM_OBJ=$MEM_OBJ" $CHARMLIB/libmemory-os-wrapper.o"
++ MEM_OBJ="${MEM_OBJ} $(getLibraryObject 'libmemory' 'os-wrapper')"
+ ;;
+ esac
+
+@@ -1670,7 +1678,8 @@ then
+ THREAD=${THREAD}-tls
+ fi
+ fi
+-THREAD_OBJ="$CHARMLIB/libthreads-$THREAD.o"
++
++THREAD_OBJ=$(getLibraryObject "libthreads" ${THREAD})
+
+ if [ ! -r $THREAD_OBJ -o ! -s $THREAD_OBJ ]
+ then
+@@ -1836,7 +1845,7 @@ esac
+
+ if [ "$BUILD_SHARE" = "0" ]
+ then
+- MIDDLE_LIBS="$MEM_OBJ $THREAD_OBJ $MIDDLE_LIBS"
++ MIDDLE_LIBS="$MIDDLE_LIBS $MEM_OBJ $THREAD_OBJ"
+ fi
+
+ if [ "$CHARM_SHARED" = "1" ]
+@@ -1848,17 +1857,17 @@ then
+ then
+ LANG_LIBS="-L$CHARMLIBSO $OBJECTFILES $PRE_LIBRARIES"
+ else
+- LANG_LIBS="-L$CHARMLIBSO $BAL_OBJ $OBJECTFILES $modInitObj $PRE_LIBRARIES"
++ LANG_LIBS="-L$CHARMLIBSO $OBJECTFILES $modInitObj $PRE_LIBRARIES"
+ fi
+ else
+- LANG_LIBS="-L$CHARMLIB -I$CHARMINC $BAL_OBJ $OBJECTFILES $modInitObj $PRE_LIBRARIES"
++ LANG_LIBS="-L$CHARMLIB -I$CHARMINC $OBJECTFILES $modInitObj $PRE_LIBRARIES"
+ fi
+ if [ "$TRACE_WITH_TAU" = 1 ]
+ then
+ echo "Linking with the TAU libraries: $TAU_LIBS"
+- ALL_LIBS="$LANG_LIBS $MIDDLE_LIBS $CMK_LIBS $POST_LIBRARIES $CMK_SYSLIBS $TAU_LIBS"
++ ALL_LIBS="$LANG_LIBS $MIDDLE_LIBS $BAL_OBJ $CMK_LIBS $POST_LIBRARIES $CMK_SYSLIBS $TAU_LIBS"
+ else
+- ALL_LIBS="$LANG_LIBS $MIDDLE_LIBS $CMK_LIBS $POST_LIBRARIES $CMK_SYSLIBS"
++ ALL_LIBS="$LANG_LIBS $MIDDLE_LIBS $BAL_OBJ $CMK_LIBS $POST_LIBRARIES $CMK_SYSLIBS"
+ fi
+ Debugf "All libraries are: $ALL_LIBS"
+
+--
+1.8.1.5
+
diff --git a/sys-cluster/charm/metadata.xml b/sys-cluster/charm/metadata.xml
new file mode 100644
index 00000000000..21c49dafe74
--- /dev/null
+++ b/sys-cluster/charm/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>nicolasbock@gentoo.org</email>
+ <name>Nicolas Bock</name>
+ </maintainer>
+ <use>
+ <flag name="ampi">Build implementation of MPI on top of Charm++</flag>
+ <flag name="charmdebug">Enable the charm debugger</flag>
+ <flag name="charmproduction">Optimize performance of Charm++ runtime</flag>
+ <flag name="charmtracing">Enable tracing support in Charm++</flag>
+ <flag name="cmkopt">Enable CMK optimisation</flag>
+ <flag name="mlogft">Compile with Charm++ message logging fault tolerance support</flag>
+ <flag name="numa">Support memory affinity with NUMA</flag>
+ <flag name="syncft">Compile with Charm++ fault tolerance support</flag>
+ <flag name="tcp">Use TCP (instead of UPD) for socket communication</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-cluster/charmdebug/Manifest b/sys-cluster/charmdebug/Manifest
new file mode 100644
index 00000000000..5683eb2761c
--- /dev/null
+++ b/sys-cluster/charmdebug/Manifest
@@ -0,0 +1 @@
+DIST charmdebug_6.2.0.tar.gz 269703 SHA256 858074b59f8eff1870a75f3b52b194122c1c31d06b65bf3b1209592cf73b6d96 SHA512 03f894c36d4231381cac22c05bc08b6673c3df23259f44539b8bea5c8e812ce53124e832f0df789c45aa15cfbfb3edb69bc4634c1839cef3b42340b19094f5e2 WHIRLPOOL c6705d7c5532d9ffdb959af1fd980998b47642feb06784a058439b69e605821cbd59c167579af932cc1deb355c3de42aca44409f9ab0382acbd72aa5cbef48c0
diff --git a/sys-cluster/charmdebug/charmdebug-6.2.0-r1.ebuild b/sys-cluster/charmdebug/charmdebug-6.2.0-r1.ebuild
new file mode 100644
index 00000000000..6a7e8022714
--- /dev/null
+++ b/sys-cluster/charmdebug/charmdebug-6.2.0-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-2
+
+DESCRIPTION="A debugger for Charm++ applications"
+HOMEPAGE="http://charm.cs.uiuc.edu/"
+SRC_URI="http://charm.cs.illinois.edu/distrib/binaries/charmdebug/charmdebug_${PV}.tar.gz"
+
+S="${WORKDIR}/${PN}"
+
+LICENSE="charm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ >=virtual/jre-1.6
+ sys-cluster/charm[charmdebug,-smp]"
+
+src_install() {
+ java-pkg_newjar ${PN}.jar
+ java-pkg_dolauncher ${PN} \
+ --main charm/debug/ParDebug \
+ --jar ${PN}.jar \
+ --java_args -ms100000000 -mx512000000
+}
diff --git a/sys-cluster/charmdebug/metadata.xml b/sys-cluster/charmdebug/metadata.xml
new file mode 100644
index 00000000000..6b1c94c9f6e
--- /dev/null
+++ b/sys-cluster/charmdebug/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>nicolasbock@gentoo.org</email>
+ <name>Nicolas Bock</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-cluster/cinder/Manifest b/sys-cluster/cinder/Manifest
new file mode 100644
index 00000000000..3cc16337077
--- /dev/null
+++ b/sys-cluster/cinder/Manifest
@@ -0,0 +1,2 @@
+DIST cinder-2015.1.0.tar.gz 2060773 SHA256 d89d588f35ce66dc7af6e9d63ebb9b3a929670db90ed2ad43d129f32928a4270 SHA512 9dddab335dae0660a59ea80b2579bca16c0cc6e5220f5f8d150f239b026fdbf085c55383d44833da5ea21fb554d9ed6f0700d503322e5467a3c6959cfcb3bd93 WHIRLPOOL 6383b7482587eb1bb298a9b6650f75225a306fe2e398a6377416f182fdc8a1614e4b0a3847bf21cb31454ad3b3c7cb87884c6770b6f4c619fa078db783cc3683
+DIST cinder-2015.1.1.tar.gz 2068679 SHA256 11c6c7e749021978b9daeb631aa9f776a9ab70ea1549e8443a225a20ca98a945 SHA512 8d0cb81ef474b82ce4e377818916b1c2cf3566993c58f756ead17ee57d3316d61cfc0603cfce4e4460c43a6ef17813f5d85126fbaceed54c86060f3e22e39313 WHIRLPOOL a3a896c33a436c485490dd95169252e014757f8c6f555ffa61e26406b9405dbedd90f89bf424b2cfd2f145770f064ce551b59395b337f9b6d883301ca50d49b9
diff --git a/sys-cluster/cinder/cinder-2015.1.0-r1.ebuild b/sys-cluster/cinder/cinder-2015.1.0-r1.ebuild
new file mode 100644
index 00000000000..5618bcdfb7f
--- /dev/null
+++ b/sys-cluster/cinder/cinder-2015.1.0-r1.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils linux-info user
+
+DESCRIPTION="Cinder is the OpenStack Block storage service, a spin out of nova-volumes"
+HOMEPAGE="https://launchpad.net/cinder"
+SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+api +scheduler +volume iscsi lvm mysql +memcached postgres sqlite test"
+REQUIRED_USE="|| ( mysql postgres sqlite )"
+
+#sudo is a build dep because I want the sudoers.d directory to exist, lazy.
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/pbr-0.8[${PYTHON_USEDEP}]
+ <dev-python/pbr-1.0[${PYTHON_USEDEP}]
+ app-admin/sudo
+ test? (
+ ${RDEPEND}
+ >=dev-python/hacking-0.10.0[${PYTHON_USEDEP}]
+ <dev-python/hacking-0.11[${PYTHON_USEDEP}]
+ >=dev-python/coverage-3.6[${PYTHON_USEDEP}]
+ >=dev-python/fixtures-0.3.14[${PYTHON_USEDEP}]
+ >=dev-python/mock-1.0[${PYTHON_USEDEP}]
+ >=dev-python/mox-0.5.3[${PYTHON_USEDEP}]
+ dev-python/mysql-python[${PYTHON_USEDEP}]
+ dev-python/psycopg[${PYTHON_USEDEP}]
+ >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}]
+ <dev-python/oslotest-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
+ !~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
+ <dev-python/sphinx-1.3[${PYTHON_USEDEP}]
+ >=dev-python/subunit-0.0.18[${PYTHON_USEDEP}]
+ >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}]
+ !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}]
+ >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}]
+ >=dev-python/oslo-sphinx-2.5.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/tempest-lib-0.4.0[${PYTHON_USEDEP}]
+ )"
+
+RDEPEND="
+ >=dev-python/anyjson-0.3.3[${PYTHON_USEDEP}]
+ >=dev-python/Babel-1.3[${PYTHON_USEDEP}]
+ >=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}]
+ !~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}]
+ >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}]
+ >=dev-python/iso8601-0.1.9[${PYTHON_USEDEP}]
+ >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}]
+ <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/kombu-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/lxml-2.3[${PYTHON_USEDEP}]
+ >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}]
+ >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}]
+ <dev-python/oslo-config-1.10.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-context-0.3.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-db-1.7.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-db-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-log-1.0.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-log-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-messaging-1.8.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-messaging-1.9.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-middleware-1.0.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-middleware-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-rootwrap-1.6.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-rootwrap-1.7.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-serialization-1.4.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-serialization-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-utils-1.4.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-utils-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/osprofiler-0.3.0[${PYTHON_USEDEP}]
+ >=dev-python/paramiko-1.13.0[${PYTHON_USEDEP}]
+ dev-python/paste[${PYTHON_USEDEP}]
+ >=dev-python/pastedeploy-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/python-barbicanclient-3.0.1[${PYTHON_USEDEP}]
+ <dev-python/python-barbicanclient-3.1.0[${PYTHON_USEDEP}]
+ >=dev-python/python-glanceclient-0.15.0[${PYTHON_USEDEP}]
+ <dev-python/python-glanceclient-0.18.0[${PYTHON_USEDEP}]
+ >=dev-python/python-novaclient-2.22.0[${PYTHON_USEDEP}]
+ <dev-python/python-novaclient-2.24.0[${PYTHON_USEDEP}]
+ >=dev-python/python-swiftclient-2.2.0[${PYTHON_USEDEP}]
+ <dev-python/python-swiftclient-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.2.0[${PYTHON_USEDEP}]
+ !~dev-python/requests-2.4.0[${PYTHON_USEDEP}]
+ >=dev-python/retrying-1.2.3[${PYTHON_USEDEP}]
+ !~dev-python/retrying-1.3.0[${PYTHON_USEDEP}]
+ >=dev-python/routes-1.12.3[${PYTHON_USEDEP}]
+ !~dev-python/routes-2.0[${PYTHON_USEDEP}]
+ >=dev-python/taskflow-0.7.1[${PYTHON_USEDEP}]
+ <dev-python/taskflow-0.8.0[${PYTHON_USEDEP}]
+ >=dev-python/rtslib-fb-2.1.41[${PYTHON_USEDEP}]
+ >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
+ sqlite? (
+ >=dev-python/sqlalchemy-0.9.7[sqlite,${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[sqlite,${PYTHON_USEDEP}]
+ )
+ mysql? (
+ dev-python/mysql-python
+ >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
+ )
+ postgres? (
+ dev-python/psycopg:2
+ >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
+ )
+ >=dev-python/sqlalchemy-migrate-0.9.5[${PYTHON_USEDEP}]
+ >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}]
+ <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}]
+ >=dev-python/suds-0.4[${PYTHON_USEDEP}]
+ >=dev-python/webob-1.2.3-r1[${PYTHON_USEDEP}]
+ >=dev-python/oslo-i18n-1.5.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-i18n-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-vmware-0.11.1[${PYTHON_USEDEP}]
+ <dev-python/oslo-vmware-0.12.0[${PYTHON_USEDEP}]
+ iscsi? (
+ || ( >=sys-block/iscsitarget-1.4.20.2_p20130821 sys-block/tgt )
+ sys-block/open-iscsi )
+ lvm? ( sys-fs/lvm2 )
+ memcached? ( net-misc/memcached )
+ sys-fs/sysfsutils"
+
+PATCHES=( "${FILESDIR}"/CVE-2015-1851_2015.1.0.patch )
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK_MODULES="ISCSI_TCP"
+ if linux_config_exists; then
+ for module in ${CONFIG_CHECK_MODULES}; do
+ linux_chkconfig_present ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
+ done
+ fi
+ enewgroup cinder
+ enewuser cinder -1 -1 /var/lib/cinder cinder
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ mv cinder/test.py cinder/test.py.bak || die
+ ./tools/config/generate_sample.sh -b ./ -p cinder -o etc/cinder || die
+ mv cinder/test.py.bak cinder/test.py || die
+}
+
+python_test() {
+ # Let's track progress of this # https://bugs.launchpad.net/swift/+bug/1249727
+ nosetests -I test_wsgi.py cinder/tests/ || die "tests failed under python2.7"
+}
+
+python_install() {
+ distutils-r1_python_install
+ keepdir /etc/cinder
+ dodir /etc/cinder/rootwrap.d
+
+ for svc in api scheduler volume; do
+ newinitd "${FILESDIR}/cinder.initd" cinder-${svc}
+ done
+
+ insinto /etc/cinder
+ newins "${S}/etc/cinder/cinder.conf.sample" "cinder.conf"
+ newins "${S}/etc/cinder/api-paste.ini" "api-paste.ini"
+ newins "${S}/etc/cinder/logging_sample.conf" "logging_sample.conf"
+ newins "${S}/etc/cinder/policy.json" "policy.json"
+ newins "${S}/etc/cinder/rootwrap.conf" "rootwrap.conf"
+ insinto /etc/cinder/rootwrap.d
+ newins "${S}/etc/cinder/rootwrap.d/volume.filters" "volume.filters"
+
+ dodir /var/log/cinder
+ fowners cinder:cinder /var/log/cinder
+
+ #add sudoers definitions for user nova
+ insinto /etc/sudoers.d/
+ insopts -m 0440 -o root -g root
+ newins "${FILESDIR}/cinder.sudoersd" cinder
+}
diff --git a/sys-cluster/cinder/cinder-2015.1.1.ebuild b/sys-cluster/cinder/cinder-2015.1.1.ebuild
new file mode 100644
index 00000000000..b4ed4b243df
--- /dev/null
+++ b/sys-cluster/cinder/cinder-2015.1.1.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils linux-info user
+
+DESCRIPTION="Cinder is the OpenStack Block storage service, a spin out of nova-volumes"
+HOMEPAGE="https://launchpad.net/cinder"
+SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+api +scheduler +volume iscsi lvm mysql +memcached postgres sqlite test"
+REQUIRED_USE="|| ( mysql postgres sqlite )"
+
+#sudo is a build dep because I want the sudoers.d directory to exist, lazy.
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/pbr-0.8[${PYTHON_USEDEP}]
+ <dev-python/pbr-1.0[${PYTHON_USEDEP}]
+ app-admin/sudo
+ test? (
+ ${RDEPEND}
+ >=dev-python/hacking-0.10.0[${PYTHON_USEDEP}]
+ <dev-python/hacking-0.11[${PYTHON_USEDEP}]
+ >=dev-python/coverage-3.6[${PYTHON_USEDEP}]
+ >=dev-python/fixtures-0.3.14[${PYTHON_USEDEP}]
+ <dev-python/fixtures-1.3.0[${PYTHON_USEDEP}]
+ >=dev-python/mock-1.0[${PYTHON_USEDEP}]
+ <dev-python/mock-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/mox-0.5.3[${PYTHON_USEDEP}]
+ dev-python/mysql-python[${PYTHON_USEDEP}]
+ dev-python/psycopg[${PYTHON_USEDEP}]
+ >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}]
+ <dev-python/oslotest-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
+ !~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
+ <dev-python/sphinx-1.3[${PYTHON_USEDEP}]
+ >=dev-python/subunit-0.0.18[${PYTHON_USEDEP}]
+ >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}]
+ !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}]
+ >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}]
+ >=dev-python/oslo-sphinx-2.5.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/tempest-lib-0.4.0[${PYTHON_USEDEP}]
+ <dev-python/tempest-lib-0.5.0[${PYTHON_USEDEP}]
+ )"
+
+RDEPEND="
+ >=dev-python/anyjson-0.3.3[${PYTHON_USEDEP}]
+ >=dev-python/Babel-1.3[${PYTHON_USEDEP}]
+ >=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}]
+ !~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}]
+ >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}]
+ >=dev-python/iso8601-0.1.9[${PYTHON_USEDEP}]
+ >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}]
+ <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/kombu-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/lxml-2.3[${PYTHON_USEDEP}]
+ >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}]
+ >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}]
+ <dev-python/oslo-config-1.10.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-context-0.3.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-db-1.7.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-db-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-log-1.0.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-log-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-messaging-1.8.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-messaging-1.9.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-middleware-1.0.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-middleware-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-rootwrap-1.6.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-rootwrap-1.7.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-serialization-1.4.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-serialization-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-utils-1.4.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-utils-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/osprofiler-0.3.0[${PYTHON_USEDEP}]
+ >=dev-python/paramiko-1.13.0[${PYTHON_USEDEP}]
+ dev-python/paste[${PYTHON_USEDEP}]
+ >=dev-python/pastedeploy-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/python-barbicanclient-3.0.1[${PYTHON_USEDEP}]
+ <dev-python/python-barbicanclient-3.1.0[${PYTHON_USEDEP}]
+ >=dev-python/python-glanceclient-0.15.0[${PYTHON_USEDEP}]
+ <dev-python/python-glanceclient-0.18.0[${PYTHON_USEDEP}]
+ >=dev-python/python-novaclient-2.22.0[${PYTHON_USEDEP}]
+ <dev-python/python-novaclient-2.24.0[${PYTHON_USEDEP}]
+ >=dev-python/python-swiftclient-2.2.0[${PYTHON_USEDEP}]
+ <dev-python/python-swiftclient-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.2.0[${PYTHON_USEDEP}]
+ !~dev-python/requests-2.4.0[${PYTHON_USEDEP}]
+ >=dev-python/retrying-1.2.3[${PYTHON_USEDEP}]
+ !~dev-python/retrying-1.3.0[${PYTHON_USEDEP}]
+ >=dev-python/routes-1.12.3[${PYTHON_USEDEP}]
+ !~dev-python/routes-2.0[${PYTHON_USEDEP}]
+ >=dev-python/taskflow-0.7.1[${PYTHON_USEDEP}]
+ <dev-python/taskflow-0.8.0[${PYTHON_USEDEP}]
+ >=dev-python/rtslib-fb-2.1.41[${PYTHON_USEDEP}]
+ >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
+ sqlite? (
+ >=dev-python/sqlalchemy-0.9.7[sqlite,${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[sqlite,${PYTHON_USEDEP}]
+ )
+ mysql? (
+ dev-python/mysql-python
+ >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
+ )
+ postgres? (
+ dev-python/psycopg:2
+ >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
+ )
+ >=dev-python/sqlalchemy-migrate-0.9.5[${PYTHON_USEDEP}]
+ >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}]
+ <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}]
+ >=dev-python/suds-0.4[${PYTHON_USEDEP}]
+ >=dev-python/webob-1.2.3-r1[${PYTHON_USEDEP}]
+ >=dev-python/oslo-i18n-1.5.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-i18n-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-vmware-0.11.1[${PYTHON_USEDEP}]
+ <dev-python/oslo-vmware-0.12.0[${PYTHON_USEDEP}]
+ iscsi? (
+ sys-block/tgt
+ sys-block/open-iscsi
+ )
+ lvm? ( sys-fs/lvm2 )
+ memcached? ( net-misc/memcached )
+ app-emulation/qemu
+ sys-fs/sysfsutils"
+# qemu is needed for image conversion
+
+PATCHES=(
+
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK_MODULES="ISCSI_TCP"
+ if linux_config_exists; then
+ for module in ${CONFIG_CHECK_MODULES}; do
+ linux_chkconfig_present ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
+ done
+ fi
+ enewgroup cinder
+ enewuser cinder -1 -1 /var/lib/cinder cinder
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ mv cinder/test.py cinder/test.py.bak || die
+ ./tools/config/generate_sample.sh -b ./ -p cinder -o etc/cinder || die
+ mv cinder/test.py.bak cinder/test.py || die
+}
+
+python_test() {
+ # Let's track progress of this # https://bugs.launchpad.net/swift/+bug/1249727
+ nosetests -I test_wsgi.py cinder/tests/ || die "tests failed under python2.7"
+}
+
+python_install() {
+ distutils-r1_python_install
+ keepdir /etc/cinder
+ dodir /etc/cinder/rootwrap.d
+
+ for svc in api scheduler volume; do
+ newinitd "${FILESDIR}/cinder.initd" cinder-${svc}
+ done
+
+ insinto /etc/cinder
+ newins "${S}/etc/cinder/cinder.conf.sample" "cinder.conf"
+ newins "${S}/etc/cinder/api-paste.ini" "api-paste.ini"
+ newins "${S}/etc/cinder/logging_sample.conf" "logging_sample.conf"
+ newins "${S}/etc/cinder/policy.json" "policy.json"
+ newins "${S}/etc/cinder/rootwrap.conf" "rootwrap.conf"
+ insinto /etc/cinder/rootwrap.d
+ newins "${S}/etc/cinder/rootwrap.d/volume.filters" "volume.filters"
+
+ dodir /var/log/cinder
+ fowners cinder:cinder /var/log/cinder
+
+ #add sudoers definitions for user nova
+ insinto /etc/sudoers.d/
+ insopts -m 0440 -o root -g root
+ newins "${FILESDIR}/cinder.sudoersd" cinder
+}
+
+pkg_postinst() {
+ if use iscsi ; then
+ elog "Cinder needs tgtd to be installed and running to work with iscsi"
+ elog "it also needs 'include /var/lib/cinder/volumes/*' in /etc/tgt/targets.conf"
+ fi
+}
diff --git a/sys-cluster/cinder/cinder-2015.1.9999.ebuild b/sys-cluster/cinder/cinder-2015.1.9999.ebuild
new file mode 100644
index 00000000000..d33474f13d7
--- /dev/null
+++ b/sys-cluster/cinder/cinder-2015.1.9999.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils git-2 linux-info user
+
+DESCRIPTION="Cinder is the OpenStack Block storage service, a spin out of nova-volumes"
+HOMEPAGE="https://launchpad.net/cinder"
+EGIT_REPO_URI="https://github.com/openstack/cinder.git"
+EGIT_BRANCH="stable/kilo"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS=""
+IUSE="+api +scheduler +volume iscsi lvm mysql +memcached postgres sqlite test"
+REQUIRED_USE="|| ( mysql postgres sqlite )"
+
+#sudo is a build dep because I want the sudoers.d directory to exist, lazy.
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/pbr-0.8[${PYTHON_USEDEP}]
+ <dev-python/pbr-1.0[${PYTHON_USEDEP}]
+ app-admin/sudo
+ test? (
+ ${RDEPEND}
+ >=dev-python/hacking-0.10.0[${PYTHON_USEDEP}]
+ <dev-python/hacking-0.11[${PYTHON_USEDEP}]
+ >=dev-python/coverage-3.6[${PYTHON_USEDEP}]
+ >=dev-python/fixtures-0.3.14[${PYTHON_USEDEP}]
+ <dev-python/fixtures-1.3.0[${PYTHON_USEDEP}]
+ >=dev-python/mock-1.0[${PYTHON_USEDEP}]
+ <dev-python/mock-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/mox-0.5.3[${PYTHON_USEDEP}]
+ dev-python/mysql-python[${PYTHON_USEDEP}]
+ dev-python/psycopg[${PYTHON_USEDEP}]
+ >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}]
+ <dev-python/oslotest-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
+ !~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
+ <dev-python/sphinx-1.3[${PYTHON_USEDEP}]
+ >=dev-python/subunit-0.0.18[${PYTHON_USEDEP}]
+ >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}]
+ !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}]
+ >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}]
+ >=dev-python/oslo-sphinx-2.5.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/tempest-lib-0.4.0[${PYTHON_USEDEP}]
+ <dev-python/tempest-lib-0.5.0[${PYTHON_USEDEP}]
+ )"
+
+RDEPEND="
+ >=dev-python/anyjson-0.3.3[${PYTHON_USEDEP}]
+ >=dev-python/Babel-1.3[${PYTHON_USEDEP}]
+ >=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}]
+ !~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}]
+ >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}]
+ >=dev-python/iso8601-0.1.9[${PYTHON_USEDEP}]
+ >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}]
+ <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/kombu-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/lxml-2.3[${PYTHON_USEDEP}]
+ >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}]
+ >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}]
+ <dev-python/oslo-config-1.10.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-context-0.3.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-db-1.7.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-db-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-log-1.0.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-log-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-messaging-1.8.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-messaging-1.9.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-middleware-1.0.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-middleware-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-rootwrap-1.6.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-rootwrap-1.7.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-serialization-1.4.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-serialization-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-utils-1.4.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-utils-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/osprofiler-0.3.0[${PYTHON_USEDEP}]
+ >=dev-python/paramiko-1.13.0[${PYTHON_USEDEP}]
+ dev-python/paste[${PYTHON_USEDEP}]
+ >=dev-python/pastedeploy-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/python-barbicanclient-3.0.1[${PYTHON_USEDEP}]
+ <dev-python/python-barbicanclient-3.1.0[${PYTHON_USEDEP}]
+ >=dev-python/python-glanceclient-0.15.0[${PYTHON_USEDEP}]
+ <dev-python/python-glanceclient-0.18.0[${PYTHON_USEDEP}]
+ >=dev-python/python-novaclient-2.22.0[${PYTHON_USEDEP}]
+ <dev-python/python-novaclient-2.24.0[${PYTHON_USEDEP}]
+ >=dev-python/python-swiftclient-2.2.0[${PYTHON_USEDEP}]
+ <dev-python/python-swiftclient-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.2.0[${PYTHON_USEDEP}]
+ !~dev-python/requests-2.4.0[${PYTHON_USEDEP}]
+ >=dev-python/retrying-1.2.3[${PYTHON_USEDEP}]
+ !~dev-python/retrying-1.3.0[${PYTHON_USEDEP}]
+ >=dev-python/routes-1.12.3[${PYTHON_USEDEP}]
+ !~dev-python/routes-2.0[${PYTHON_USEDEP}]
+ >=dev-python/taskflow-0.7.1[${PYTHON_USEDEP}]
+ <dev-python/taskflow-0.8.0[${PYTHON_USEDEP}]
+ >=dev-python/rtslib-fb-2.1.41[${PYTHON_USEDEP}]
+ >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
+ sqlite? (
+ >=dev-python/sqlalchemy-0.9.7[sqlite,${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[sqlite,${PYTHON_USEDEP}]
+ )
+ mysql? (
+ dev-python/mysql-python
+ >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
+ )
+ postgres? (
+ dev-python/psycopg:2
+ >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
+ <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
+ )
+ >=dev-python/sqlalchemy-migrate-0.9.5[${PYTHON_USEDEP}]
+ >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}]
+ <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}]
+ >=dev-python/suds-0.4[${PYTHON_USEDEP}]
+ >=dev-python/webob-1.2.3-r1[${PYTHON_USEDEP}]
+ >=dev-python/oslo-i18n-1.5.0[${PYTHON_USEDEP}]
+ <dev-python/oslo-i18n-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-vmware-0.11.1[${PYTHON_USEDEP}]
+ <dev-python/oslo-vmware-0.12.0[${PYTHON_USEDEP}]
+ iscsi? (
+ sys-block/tgt
+ sys-block/open-iscsi
+ )
+ lvm? ( sys-fs/lvm2 )
+ memcached? ( net-misc/memcached )
+ app-emulation/qemu
+ sys-fs/sysfsutils"
+# qemu is needed for image conversion
+
+PATCHES=(
+
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK_MODULES="ISCSI_TCP"
+ if linux_config_exists; then
+ for module in ${CONFIG_CHECK_MODULES}; do
+ linux_chkconfig_present ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
+ done
+ fi
+ enewgroup cinder
+ enewuser cinder -1 -1 /var/lib/cinder cinder
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ mv cinder/test.py cinder/test.py.bak || die
+ ./tools/config/generate_sample.sh -b ./ -p cinder -o etc/cinder || die
+ mv cinder/test.py.bak cinder/test.py || die
+}
+
+python_test() {
+ # Let's track progress of this # https://bugs.launchpad.net/swift/+bug/1249727
+ nosetests -I test_wsgi.py cinder/tests/ || die "tests failed under python2.7"
+}
+
+python_install() {
+ distutils-r1_python_install
+ keepdir /etc/cinder
+ dodir /etc/cinder/rootwrap.d
+
+ for svc in api scheduler volume; do
+ newinitd "${FILESDIR}/cinder.initd" cinder-${svc}
+ done
+
+ insinto /etc/cinder
+ newins "${S}/etc/cinder/cinder.conf.sample" "cinder.conf"
+ newins "${S}/etc/cinder/api-paste.ini" "api-paste.ini"
+ newins "${S}/etc/cinder/logging_sample.conf" "logging_sample.conf"
+ newins "${S}/etc/cinder/policy.json" "policy.json"
+ newins "${S}/etc/cinder/rootwrap.conf" "rootwrap.conf"
+ insinto /etc/cinder/rootwrap.d
+ newins "${S}/etc/cinder/rootwrap.d/volume.filters" "volume.filters"
+
+ dodir /var/log/cinder
+ fowners cinder:cinder /var/log/cinder
+
+ #add sudoers definitions for user nova
+ insinto /etc/sudoers.d/
+ insopts -m 0440 -o root -g root
+ newins "${FILESDIR}/cinder.sudoersd" cinder
+}
+
+pkg_postinst() {
+ if use iscsi ; then
+ elog "Cinder needs tgtd to be installed and running to work with iscsi"
+ elog "it also needs 'include /var/lib/cinder/volumes/*' in /etc/tgt/targets.conf"
+ fi
+}
diff --git a/sys-cluster/cinder/files/CVE-2015-1851_2014.2.3.patch b/sys-cluster/cinder/files/CVE-2015-1851_2014.2.3.patch
new file mode 100644
index 00000000000..5335e5c02ad
--- /dev/null
+++ b/sys-cluster/cinder/files/CVE-2015-1851_2014.2.3.patch
@@ -0,0 +1,85 @@
+From d31c937c566005dedf41a60c6b5bd5e7b26f221b Mon Sep 17 00:00:00 2001
+From: Eric Harney <eharney@redhat.com>
+Date: Tue, 31 Mar 2015 19:48:17 -0400
+Subject: [PATCH] Disallow backing files when uploading volumes to image
+
+Volumes with a header referencing a backing file can leak
+file data into the destination image when uploading a
+volume to an image.
+
+Halt the upload process if the volume data references a
+backing file to prevent this.
+
+Closes-Bug: #1415087
+Change-Id: Iab9718794e7f7e8444015712cfa08c46848ebf78
+(cherry picked from commit 9634b76ba5886d6c2f2128d550cb005dabf48213)
+Conflicts:
+ cinder/tests/test_image_utils.py (backport to old tests)
+---
+ cinder/image/image_utils.py | 14 ++++++++++++++
+ cinder/tests/test_image_utils.py | 13 +++++++++++++
+ 2 files changed, 27 insertions(+)
+
+diff --git a/cinder/image/image_utils.py b/cinder/image/image_utils.py
+index 160dfe7..cac0072 100644
+--- a/cinder/image/image_utils.py
++++ b/cinder/image/image_utils.py
+@@ -312,6 +312,20 @@ def upload_volume(context, image_service, image_meta, volume_path,
+ with fileutils.remove_path_on_error(tmp):
+ LOG.debug("%s was %s, converting to %s" %
+ (image_id, volume_format, image_meta['disk_format']))
++
++ data = qemu_img_info(volume_path)
++ backing_file = data.backing_file
++ fmt = data.file_format
++ if backing_file is not None:
++ # Disallow backing files as a security measure.
++ # This prevents a user from writing an image header into a raw
++ # volume with a backing file pointing to data they wish to
++ # access.
++ raise exception.ImageUnacceptable(
++ image_id=image_id,
++ reason=_("fmt=%(fmt)s backed by:%(backing_file)s")
++ % {'fmt': fmt, 'backing_file': backing_file})
++
+ convert_image(volume_path, tmp, image_meta['disk_format'],
+ bps_limit=CONF.volume_copy_bps_limit)
+
+diff --git a/cinder/tests/test_image_utils.py b/cinder/tests/test_image_utils.py
+index 86168c0..2cf571a 100644
+--- a/cinder/tests/test_image_utils.py
++++ b/cinder/tests/test_image_utils.py
+@@ -462,6 +462,10 @@ def test_upload_volume(self, mock_stat, bps_limit=0):
+ volume_utils.setup_blkio_cgroup(mox.IgnoreArg(), mox.IgnoreArg(),
+ bps_limit).AndReturn(prefix)
+
++ utils.execute(
++ 'env', 'LC_ALL=C', 'qemu-img', 'info',
++ mox.IgnoreArg(), run_as_root=True).AndReturn(
++ (TEST_RET, 'ignored'))
+ utils.execute(*cmd, run_as_root=True)
+ utils.execute(
+ 'env', 'LC_ALL=C', 'qemu-img', 'info',
+@@ -497,6 +501,11 @@ def test_upload_volume_with_bps_limit(self, mock_stat):
+
+ volume_utils.setup_blkio_cgroup(mox.IgnoreArg(), mox.IgnoreArg(),
+ bps_limit).AndReturn(prefix)
++
++ utils.execute(
++ 'env', 'LC_ALL=C', 'qemu-img', 'info',
++ mox.IgnoreArg(), run_as_root=True).AndReturn(
++ (TEST_RET, 'ignored'))
+ utils.execute(*cmd, run_as_root=True)
+ utils.execute(
+ 'env', 'LC_ALL=C', 'qemu-img', 'info',
+@@ -534,6 +543,10 @@ def test_upload_volume_on_error(self, mock_stat):
+ m.StubOutWithMock(utils, 'execute')
+ m.StubOutWithMock(volume_utils, 'check_for_odirect_support')
+
++ utils.execute(
++ 'env', 'LC_ALL=C', 'qemu-img', 'info',
++ mox.IgnoreArg(), run_as_root=True).AndReturn(
++ (TEST_RET, 'ignored'))
+ utils.execute('qemu-img', 'convert', '-O', 'qcow2',
+ mox.IgnoreArg(), mox.IgnoreArg(), run_as_root=True)
+ utils.execute(
diff --git a/sys-cluster/cinder/files/CVE-2015-1851_2015.1.0.patch b/sys-cluster/cinder/files/CVE-2015-1851_2015.1.0.patch
new file mode 100644
index 00000000000..2e1d31970fc
--- /dev/null
+++ b/sys-cluster/cinder/files/CVE-2015-1851_2015.1.0.patch
@@ -0,0 +1,85 @@
+From 9634b76ba5886d6c2f2128d550cb005dabf48213 Mon Sep 17 00:00:00 2001
+From: Eric Harney <eharney@redhat.com>
+Date: Tue, 31 Mar 2015 19:48:17 -0400
+Subject: [PATCH] Disallow backing files when uploading volumes to image
+
+Volumes with a header referencing a backing file can leak
+file data into the destination image when uploading a
+volume to an image.
+
+Halt the upload process if the volume data references a
+backing file to prevent this.
+
+Closes-Bug: #1415087
+Change-Id: Iab9718794e7f7e8444015712cfa08c46848ebf78
+(cherry picked from commit b1143ee45323e63b965a3710f9063e65b252c978)
+---
+ cinder/image/image_utils.py | 14 ++++++++++++++
+ cinder/tests/test_image_utils.py | 8 ++++++--
+ 2 files changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/cinder/image/image_utils.py b/cinder/image/image_utils.py
+index 6e5e2fb..6ae0f81 100644
+--- a/cinder/image/image_utils.py
++++ b/cinder/image/image_utils.py
+@@ -344,6 +344,20 @@ def upload_volume(context, image_service, image_meta, volume_path,
+ with temporary_file() as tmp:
+ LOG.debug("%s was %s, converting to %s",
+ image_id, volume_format, image_meta['disk_format'])
++
++ data = qemu_img_info(volume_path, run_as_root=run_as_root)
++ backing_file = data.backing_file
++ fmt = data.file_format
++ if backing_file is not None:
++ # Disallow backing files as a security measure.
++ # This prevents a user from writing an image header into a raw
++ # volume with a backing file pointing to data they wish to
++ # access.
++ raise exception.ImageUnacceptable(
++ image_id=image_id,
++ reason=_("fmt=%(fmt)s backed by:%(backing_file)s")
++ % {'fmt': fmt, 'backing_file': backing_file})
++
+ convert_image(volume_path, tmp, image_meta['disk_format'],
+ run_as_root=run_as_root)
+
+diff --git a/cinder/tests/test_image_utils.py b/cinder/tests/test_image_utils.py
+index ab41243..3f8e763 100644
+--- a/cinder/tests/test_image_utils.py
++++ b/cinder/tests/test_image_utils.py
+@@ -381,6 +381,7 @@ def test_diff_format(self, mock_os, mock_temp, mock_convert, mock_info,
+ mock_os.name = 'posix'
+ data = mock_info.return_value
+ data.file_format = mock.sentinel.disk_format
++ data.backing_file = None
+ temp_file = mock_temp.return_value.__enter__.return_value
+
+ output = image_utils.upload_volume(ctxt, image_service, image_meta,
+@@ -391,7 +392,8 @@ def test_diff_format(self, mock_os, mock_temp, mock_convert, mock_info,
+ temp_file,
+ mock.sentinel.disk_format,
+ run_as_root=True)
+- mock_info.assert_called_once_with(temp_file, run_as_root=True)
++ mock_info.assert_called_with(temp_file, run_as_root=True)
++ self.assertEqual(mock_info.call_count, 2)
+ mock_open.assert_called_once_with(temp_file, 'rb')
+ image_service.update.assert_called_once_with(
+ ctxt, image_meta['id'], {},
+@@ -470,6 +472,7 @@ def test_convert_error(self, mock_os, mock_temp, mock_convert, mock_info,
+ mock_os.name = 'posix'
+ data = mock_info.return_value
+ data.file_format = mock.sentinel.other_disk_format
++ data.backing_file = None
+ temp_file = mock_temp.return_value.__enter__.return_value
+
+ self.assertRaises(exception.ImageUnacceptable,
+@@ -479,7 +482,8 @@ def test_convert_error(self, mock_os, mock_temp, mock_convert, mock_info,
+ temp_file,
+ mock.sentinel.disk_format,
+ run_as_root=True)
+- mock_info.assert_called_once_with(temp_file, run_as_root=True)
++ mock_info.assert_called_with(temp_file, run_as_root=True)
++ self.assertEqual(mock_info.call_count, 2)
+ self.assertFalse(image_service.update.called)
+
+
diff --git a/sys-cluster/cinder/files/cinder-confd b/sys-cluster/cinder/files/cinder-confd
new file mode 100644
index 00000000000..d09928c17c9
--- /dev/null
+++ b/sys-cluster/cinder/files/cinder-confd
@@ -0,0 +1,3 @@
+#Don't touch this unless you know what you are doing
+PID_PATH=/run/cinder
+
diff --git a/sys-cluster/cinder/files/cinder-init b/sys-cluster/cinder/files/cinder-init
new file mode 100644
index 00000000000..4c6969ec4c4
--- /dev/null
+++ b/sys-cluster/cinder/files/cinder-init
@@ -0,0 +1,58 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+BASENAME=$(echo $SVCNAME | cut -d '-' -f 1)
+SERVERNAME=$(echo $SVCNAME | cut -d '-' -f 2)
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -r /etc/conf.d/$BASENAME ]; then
+ eerror "No cinder conf.d file found: /etc/conf.d/$BASENAME)"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ . /etc/conf.d/$BASENAME
+
+ ebegin "Starting ${SVCNAME}"
+ if [ ! -d ${PID_PATH} ]; then
+ mkdir ${PID_PATH}
+ chown cinder:root ${PID_PATH}
+ fi
+
+ start-stop-daemon --start \
+ --quiet \
+ --user cinder \
+ --pidfile "${PID_PATH}/${SVCNAME}.pid" \
+ --make-pidfile \
+ --background \
+ --exec /usr/bin/cinder-${SERVERNAME} -- --config-file /etc/cinder/cinder.conf --log-file /var/log/cinder/cinder-${SERVERNAME}
+
+ eend $? "Failed to start ${SVCNAME}"
+}
+
+stop() {
+ checkconfig || return $?
+ . /etc/conf.d/$BASENAME
+
+ ebegin "Stopping ${SVCNAME}"
+
+ start-stop-daemon --stop \
+ --quiet \
+ --user cinder \
+ --pidfile "${PID_PATH}/${SVCNAME}.pid" \
+ --exec /usr/bin/cinder-${SERVERNAME} -- --config-file /etc/cinder/cinder.conf
+
+ eend $? "Failed to stop ${SVCNAME}"
+}
+
+#restart() {
+#
+#}
diff --git a/sys-cluster/cinder/files/cinder-sudoers b/sys-cluster/cinder/files/cinder-sudoers
new file mode 100644
index 00000000000..f44bab4a577
--- /dev/null
+++ b/sys-cluster/cinder/files/cinder-sudoers
@@ -0,0 +1,4 @@
+Defaults:cinder !requiretty
+
+cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap
+
diff --git a/sys-cluster/cinder/files/cinder.initd b/sys-cluster/cinder/files/cinder.initd
new file mode 100644
index 00000000000..ded44af42b7
--- /dev/null
+++ b/sys-cluster/cinder/files/cinder.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Starts ${SVCNAME} service for OpenStack"
+
+command=/usr/bin/${SVCNAME}
+command_background=yes
+command_args="--config-file /etc/cinder/cinder.conf --log-file /var/log/cinder/${SVCNAME}.log"
+pidfile=/var/run/cinder/${SVCNAME}.pid
+required_files=/etc/cinder/cinder.conf
+
+start_stop_daemon_args="--quiet --user ${CINDER_USER:-cinder}"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath --directory --owner ${CINDER_USER:-cinder}:${CINDER_GROUP:-cinder} --mode 0755 ${CINDER_RUN:-/var/run/cinder}
+ checkpath --directory --owner ${CINDER_USER:-cinder}:${CINDER_GROUP:-cinder} --mode 0755 ${CINDER_LOCK:-/var/lock/cinder}
+}
+
diff --git a/sys-cluster/cinder/files/cinder.sudoersd b/sys-cluster/cinder/files/cinder.sudoersd
new file mode 100644
index 00000000000..f44bab4a577
--- /dev/null
+++ b/sys-cluster/cinder/files/cinder.sudoersd
@@ -0,0 +1,4 @@
+Defaults:cinder !requiretty
+
+cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap
+
diff --git a/sys-cluster/cinder/metadata.xml b/sys-cluster/cinder/metadata.xml
new file mode 100644
index 00000000000..2ca4745405e
--- /dev/null
+++ b/sys-cluster/cinder/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <longdescription lang="en">
+ Cinder is the OpenStack Block storage service.
+ This is a spin out of nova-volumes.
+ </longdescription>
+ <use>
+ <flag name="api">Installs the initscripts for the cinder api service</flag>
+ <flag name="iscsi">Allow using an iSCSI remote storage server as pool for disk image storage</flag>
+ <flag name="lvm">Allow using the Logical Volume Manager (<pkg>sys-apps/lvm2</pkg>) as pool for disk image storage</flag>
+ <flag name="memcached">Installs the memcached server</flag>
+ <flag name="scheduler">Installs the initscripts for the cinder scheduler service</flag>
+ <flag name="volume">Installs the initscripts for the cinder volume service</flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">cinder</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/classads/Manifest b/sys-cluster/classads/Manifest
new file mode 100644
index 00000000000..f4ee6b20b81
--- /dev/null
+++ b/sys-cluster/classads/Manifest
@@ -0,0 +1 @@
+DIST classads-1.0.10.tar.gz 523847 RMD160 189be8110b4201c109bb6c3a8e784dbec4735878 SHA1 699534e0ee700a38650933d47f1d9cdaa84be406 SHA256 cde2fe23962abb6bc99d8fc5a5cbf88f87e449b63c6bca991d783afb4691efb3
diff --git a/sys-cluster/classads/classads-1.0.10.ebuild b/sys-cluster/classads/classads-1.0.10.ebuild
new file mode 100644
index 00000000000..14968f657b6
--- /dev/null
+++ b/sys-cluster/classads/classads-1.0.10.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools-utils
+
+DESCRIPTION="Condor's classified advertisement language"
+HOMEPAGE="http://www.cs.wisc.edu/condor/classad/"
+SRC_URI="ftp://ftp.cs.wisc.edu/condor/classad/c++/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pcre static-libs"
+
+RDEPEND="pcre? ( dev-libs/libpcre )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ myeconfargs+=(
+ --enable-namespace
+ --enable-flexible-member
+ )
+ autotools-utils_src_configure
+}
diff --git a/sys-cluster/classads/metadata.xml b/sys-cluster/classads/metadata.xml
new file mode 100644
index 00000000000..4ef9419cf90
--- /dev/null
+++ b/sys-cluster/classads/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+<maintainer>
+ <email>bicatali@gentoo.org</email>
+</maintainer>
+<longdescription lang='en'>
+ Classified Advertisements (classads) are the lingua franca of
+ Condor. They are used for describing jobs, workstations, and other
+ resources. They are exchanged by Condor processes to schedule
+ jobs. They are logged to files for statistical and debugging
+ purposes. They are used to enquire about current state of the system.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-cluster/cluster-glue/Manifest b/sys-cluster/cluster-glue/Manifest
new file mode 100644
index 00000000000..91f5dbc1c4e
--- /dev/null
+++ b/sys-cluster/cluster-glue/Manifest
@@ -0,0 +1,4 @@
+DIST glue-1.0.10.tar.bz2 463675 SHA256 c79225097153820aa449c130ec4b4a64755e699e84dde2a698f2689c3f78a2bc SHA512 79c5c9c0a5b721d09aa134e436c476fe5b1f2dcbba3605ab89dcb3770d50ec001b8200e7beb305e8fad526eee192c9f9385458b5b90bda2d94554393ee37a991 WHIRLPOOL 7f884c5fc11ab11130f3c12badf6a0d597aaac8480bcca575717e390c90d318447fa22bf0578273ccdcfc038527143680cc1a2846fcbd333264967a0b17eddc1
+DIST glue-1.0.11.tar.bz2 466057 SHA256 dbee64df379e565a0983c08d0d5510b04f8abf4bb496368734c02926735bd91c SHA512 35ac8ac555c39f24c11e3a768cc50eba051fe617edf4cdc0429dac73f45a472f144cfe6ec5faff575606f2b04ff76a2f732556d848b61410c2683d93ba928413 WHIRLPOOL 562afc17eb8aab4a97fdf27ca85e771ccaee6bb767682ef2a56a8f0037197c813f58cbf98641b7f327c1137d0c408db2373d4c618eeb0cb0fefb2cee9e735868
+DIST glue-1.0.12.tar.bz2 451569 SHA256 feba102fa1e24b6be2005089ebe362b82d6567af60005cf371679b1b44ec503f SHA512 d5d2f6c426d2bed0d39269338fedfffe840a90ff56b05dff395243d0d8b803593bf35bbce5f7dce376120cd7ddef78400914cb7515b5451c287a1e9e74233122 WHIRLPOOL dc0db40874691d27463480e06a6f98e3b14f9566caf88667b7ed965c325e39a033b905ca16ad74d988eccc3c99559a33d43bdfdb2f70c1f1d82ac41f1661d274
+DIST glue-1.0.9.tar.bz2 461579 SHA256 c5c3e7672913798887e0127e387dcc9a4adff8ceac6ff6cec06d8eacd5ca26fa SHA512 6cafa9dfcbd71e2ab1a7187a31fd88881e552f5cc5e79e073c83840328c589e3e2beb32f7707a5bf540e16353c49c07795836a84265f48617dcf0203f7e8e7cf WHIRLPOOL b02e37d1b6ad0eaf6dc30795e6a58c88fab158932ab71d8b6cd810dcf672ec4c2e0151062a55e50f874224538d8b474c84b772d324e82a0149fc9b3b88f6d8bb
diff --git a/sys-cluster/cluster-glue/cluster-glue-1.0.10.ebuild b/sys-cluster/cluster-glue/cluster-glue-1.0.10.ebuild
new file mode 100644
index 00000000000..57becbdc3bc
--- /dev/null
+++ b/sys-cluster/cluster-glue/cluster-glue-1.0.10.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+MY_P="${P/cluster-}"
+inherit autotools multilib eutils base user
+
+DESCRIPTION="Library pack for Heartbeat / Pacemaker"
+HOMEPAGE="http://www.linux-ha.org/wiki/Cluster_Glue"
+SRC_URI="http://hg.linux-ha.org/glue/archive/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa x86"
+IUSE="doc libnet static-libs"
+
+RDEPEND="app-arch/bzip2
+ dev-libs/glib:2
+ dev-libs/libaio
+ libnet? ( net-libs/libnet:1.1 )
+ net-misc/curl
+ net-misc/iputils
+ || ( net-misc/netkit-telnetd net-misc/telnet-bsd )
+ dev-libs/libxml2
+ !<sys-cluster/heartbeat-3.0"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )"
+
+S="${WORKDIR}/Reusable-Cluster-Components-glue--${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/1.0.5-docs.patch"
+ "${FILESDIR}/1.0.5-respect_cflags.patch"
+ "${FILESDIR}/1.0.7-fix_configure.patch"
+)
+
+pkg_setup() {
+ enewgroup haclient
+ enewuser hacluster -1 /dev/null /var/lib/heartbeat haclient
+}
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ local myopts
+
+ use doc && myopts=" --enable-doc"
+ econf \
+ $(use_enable libnet) \
+ $(use_enable static-libs static) \
+ --disable-fatal-warnings \
+ --disable-dependency-tracking \
+ --docdir=/usr/share/doc/${PF} \
+ --localstatedir=/var \
+ --with-ocf-root=/usr/$(get_libdir)/ocf \
+ ${myopts} \
+ --with-group-id=$(id -g hacluster) \
+ --with-ccmuser-id=$(id -u hacluster) \
+ --with-daemon-user=hacluster --with-daemon-group=haclient
+}
+
+src_install() {
+ base_src_install
+
+ dodir /var/lib/heartbeat/cores
+ dodir /var/lib/heartbeat/lrm
+
+ keepdir /var/lib/heartbeat/cores
+ keepdir /var/lib/heartbeat/lrm
+
+ # init.d file
+ cp "${FILESDIR}"/heartbeat-logd.init "${T}/" || die
+ sed -i \
+ -e "s:%libdir%:$(get_libdir):" \
+ "${T}/heartbeat-logd.init" || die
+# newinitd "${T}/heartbeat-logd.init" heartbeat-logd || die
+ rm "${D}"/etc/init.d/logd
+
+ use static-libs || find "${D}" -type f -name "*.la" -delete
+}
+
+pkg_postinst() {
+ chown -R hacluster:haclient /var/lib/heartbeat/cores
+ chown -R hacluster:haclient /var/lib/heartbeat/lrm
+}
diff --git a/sys-cluster/cluster-glue/cluster-glue-1.0.11.ebuild b/sys-cluster/cluster-glue/cluster-glue-1.0.11.ebuild
new file mode 100644
index 00000000000..5760c217c33
--- /dev/null
+++ b/sys-cluster/cluster-glue/cluster-glue-1.0.11.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+MY_P="${P/cluster-}"
+inherit autotools multilib eutils base user
+
+DESCRIPTION="Library pack for Heartbeat / Pacemaker"
+HOMEPAGE="http://www.linux-ha.org/wiki/Cluster_Glue"
+SRC_URI="http://hg.linux-ha.org/glue/archive/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa x86"
+IUSE="doc libnet static-libs"
+
+RDEPEND="app-arch/bzip2
+ app-text/docbook-xml-dtd:4.4
+ dev-libs/glib:2
+ dev-libs/libaio
+ libnet? ( net-libs/libnet:1.1 )
+ net-misc/curl
+ net-misc/iputils
+ || ( net-misc/netkit-telnetd net-misc/telnet-bsd )
+ dev-libs/libxml2
+ !<sys-cluster/heartbeat-3.0"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )"
+
+S="${WORKDIR}/Reusable-Cluster-Components-glue--${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/1.0.5-respect_cflags.patch"
+)
+
+pkg_setup() {
+ enewgroup haclient
+ enewuser hacluster -1 /dev/null /var/lib/heartbeat haclient
+}
+
+src_prepare() {
+ base_src_prepare
+ sed -e "s@http://docbook.sourceforge.net/release/xsl/current@/usr/share/sgml/docbook/xsl-stylesheets/@g" \
+ -i doc/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ local myopts
+
+ use doc && myopts=" --enable-doc"
+ econf \
+ $(use_enable libnet) \
+ $(use_enable static-libs static) \
+ --disable-fatal-warnings \
+ --disable-dependency-tracking \
+ --docdir=/usr/share/doc/${PF} \
+ --localstatedir=/var \
+ --with-ocf-root=/usr/$(get_libdir)/ocf \
+ ${myopts} \
+ --with-group-id=$(id -g hacluster) \
+ --with-ccmuser-id=$(id -u hacluster) \
+ --with-daemon-user=hacluster --with-daemon-group=haclient
+}
+
+src_install() {
+ base_src_install
+
+ dodir /var/lib/heartbeat/cores
+ dodir /var/lib/heartbeat/lrm
+
+ keepdir /var/lib/heartbeat/cores
+ keepdir /var/lib/heartbeat/lrm
+
+ # init.d file
+ cp "${FILESDIR}"/heartbeat-logd.init "${T}/" || die
+ sed -i \
+ -e "s:%libdir%:$(get_libdir):" \
+ "${T}/heartbeat-logd.init" || die
+# newinitd "${T}/heartbeat-logd.init" heartbeat-logd || die
+ rm "${D}"/etc/init.d/logd
+
+ use static-libs || find "${D}" -type f -name "*.la" -delete
+}
+
+pkg_postinst() {
+ chown -R hacluster:haclient /var/lib/heartbeat/cores
+ chown -R hacluster:haclient /var/lib/heartbeat/lrm
+}
diff --git a/sys-cluster/cluster-glue/cluster-glue-1.0.12.ebuild b/sys-cluster/cluster-glue/cluster-glue-1.0.12.ebuild
new file mode 100644
index 00000000000..b908ffa6f06
--- /dev/null
+++ b/sys-cluster/cluster-glue/cluster-glue-1.0.12.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+MY_P="${P/cluster-}"
+inherit autotools multilib eutils base user
+
+DESCRIPTION="Library pack for Heartbeat / Pacemaker"
+HOMEPAGE="http://www.linux-ha.org/wiki/Cluster_Glue"
+SRC_URI="http://hg.linux-ha.org/glue/archive/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="doc libnet static-libs"
+
+RDEPEND="app-text/asciidoc
+ app-arch/bzip2
+ app-text/docbook-xml-dtd:4.4
+ dev-libs/glib:2
+ dev-libs/libaio
+ libnet? ( net-libs/libnet:1.1 )
+ net-misc/curl
+ net-misc/iputils
+ || ( net-misc/netkit-telnetd net-misc/telnet-bsd )
+ dev-libs/libxml2
+ !<sys-cluster/heartbeat-3.0"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )"
+
+S="${WORKDIR}/Reusable-Cluster-Components-glue--${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/1.0.12-respect_cflags.patch"
+)
+
+pkg_setup() {
+ enewgroup haclient
+ enewuser hacluster -1 /dev/null /var/lib/heartbeat haclient
+}
+
+src_prepare() {
+ base_src_prepare
+ sed -e "s@http://docbook.sourceforge.net/release/xsl/current@/usr/share/sgml/docbook/xsl-stylesheets/@g" \
+ -i doc/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ local myopts
+
+ use doc && myopts=" --enable-doc"
+ econf \
+ $(use_enable libnet) \
+ $(use_enable static-libs static) \
+ --disable-fatal-warnings \
+ --disable-dependency-tracking \
+ --docdir=/usr/share/doc/${PF} \
+ --localstatedir=/var \
+ --with-ocf-root=/usr/$(get_libdir)/ocf \
+ ${myopts} \
+ --with-group-id=$(id -g hacluster) \
+ --with-ccmuser-id=$(id -u hacluster) \
+ --with-daemon-user=hacluster --with-daemon-group=haclient
+}
+
+src_install() {
+ base_src_install
+
+ dodir /var/lib/heartbeat/cores
+ dodir /var/lib/heartbeat/lrm
+
+ keepdir /var/lib/heartbeat/cores
+ keepdir /var/lib/heartbeat/lrm
+
+ # init.d file
+ cp "${FILESDIR}"/heartbeat-logd.init "${T}/" || die
+ sed -i \
+ -e "s:%libdir%:$(get_libdir):" \
+ "${T}/heartbeat-logd.init" || die
+# newinitd "${T}/heartbeat-logd.init" heartbeat-logd || die
+ rm "${D}"/etc/init.d/logd
+
+ use static-libs || find "${D}" -type f -name "*.la" -delete
+}
+
+pkg_postinst() {
+ chown -R hacluster:haclient /var/lib/heartbeat/cores
+ chown -R hacluster:haclient /var/lib/heartbeat/lrm
+}
diff --git a/sys-cluster/cluster-glue/cluster-glue-1.0.9-r1.ebuild b/sys-cluster/cluster-glue/cluster-glue-1.0.9-r1.ebuild
new file mode 100644
index 00000000000..d6e247a62e1
--- /dev/null
+++ b/sys-cluster/cluster-glue/cluster-glue-1.0.9-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+MY_P="${P/cluster-}"
+inherit autotools multilib eutils base user
+
+DESCRIPTION="Library pack for Heartbeat / Pacemaker"
+HOMEPAGE="http://www.linux-ha.org/wiki/Cluster_Glue"
+SRC_URI="http://hg.linux-ha.org/glue/archive/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa x86"
+IUSE="doc large-cluster libnet static-libs"
+
+RDEPEND="app-arch/bzip2
+ dev-libs/glib:2
+ libnet? ( net-libs/libnet:1.1 )
+ net-misc/curl
+ net-misc/iputils
+ || ( net-misc/netkit-telnetd net-misc/telnet-bsd )
+ dev-libs/libxml2
+ !<sys-cluster/heartbeat-3.0"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )"
+
+S="${WORKDIR}/Reusable-Cluster-Components-glue--${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/1.0.5-docs.patch"
+ "${FILESDIR}/1.0.5-respect_cflags.patch"
+ "${FILESDIR}/1.0.7-fix_configure.patch"
+ "${FILESDIR}/1.0.9-glib-2.32.patch"
+)
+
+pkg_setup() {
+ enewgroup haclient
+ enewuser hacluster -1 /dev/null /var/lib/heartbeat haclient
+}
+
+src_prepare() {
+ if use large-cluster
+ then
+ sed -i -e 's@256\*1024@1024\*1024@g' -e 's@2048\*1024@8192\*1024@g' "${S}"/include/clplumbing/ipc.h || die
+ fi
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ local myopts
+
+ use doc && myopts=" --enable-doc"
+ econf \
+ $(use_enable libnet) \
+ $(use_enable static-libs static) \
+ --disable-fatal-warnings \
+ --disable-dependency-tracking \
+ --docdir=/usr/share/doc/${PF} \
+ --localstatedir=/var \
+ --with-ocf-root=/usr/$(get_libdir)/ocf \
+ ${myopts} \
+ --with-group-id=$(id -g hacluster) \
+ --with-ccmuser-id=$(id -u hacluster) \
+ --with-daemon-user=hacluster --with-daemon-group=haclient
+}
+
+src_install() {
+ base_src_install
+
+ dodir /var/lib/heartbeat/cores
+ dodir /var/lib/heartbeat/lrm
+
+ keepdir /var/lib/heartbeat/cores
+ keepdir /var/lib/heartbeat/lrm
+
+ # init.d file
+ cp "${FILESDIR}"/heartbeat-logd.init "${T}/" || die
+ sed -i \
+ -e "s:%libdir%:$(get_libdir):" \
+ "${T}/heartbeat-logd.init" || die
+ newinitd "${T}/heartbeat-logd.init" heartbeat-logd || die
+ rm "${D}"/etc/init.d/logd
+
+ use static-libs || find "${D}" -type f -name "*.la" -delete
+}
+
+pkg_postinst() {
+ chown -R hacluster:haclient /var/lib/heartbeat/cores
+ chown -R hacluster:haclient /var/lib/heartbeat/lrm
+}
diff --git a/sys-cluster/cluster-glue/files/1.0.12-respect_cflags.patch b/sys-cluster/cluster-glue/files/1.0.12-respect_cflags.patch
new file mode 100644
index 00000000000..52a879574cc
--- /dev/null
+++ b/sys-cluster/cluster-glue/files/1.0.12-respect_cflags.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac 2014-07-23 10:37:39.052887243 +0200
++++ b/configure.ac 2014-07-23 10:37:53.541464249 +0200
+@@ -1226,8 +1226,6 @@
+ CFLAGS="$CFLAGS -g"
+ enable_fatal_warnings=no
+ else
+- CFLAGS="$CFLAGS -ggdb"
+-
+ # We had to eliminate -Wnested-externs because of libtool changes
+ EXTRA_FLAGS="-fgnu89-inline
+ -fstack-protector-all
diff --git a/sys-cluster/cluster-glue/files/1.0.5-docs.patch b/sys-cluster/cluster-glue/files/1.0.5-docs.patch
new file mode 100644
index 00000000000..424c529623f
--- /dev/null
+++ b/sys-cluster/cluster-glue/files/1.0.5-docs.patch
@@ -0,0 +1,40 @@
+--- doc/Makefile.am
++++ doc/Makefile.am
+@@ -29,11 +29,10 @@
+
+ if BUILD_DOC
+ man_MANS += hb_report.8 ha_logd.8 ha_logger.1 stonith.8 meatclient.8
+-endif
+
+ EXTRA_DIST = $(man_MANS)
+
+-STYLESHEET_PREFIX ?= http://docbook.sourceforge.net/release/xsl/current
++STYLESHEET_PREFIX ?= /usr/share/sgml/docbook/xsl-stylesheets/
+ MANPAGES_STYLESHEET ?= $(STYLESHEET_PREFIX)/manpages/docbook.xsl
+ HTML_STYLESHEET ?= $(STYLESHEET_PREFIX)/xhtml/docbook.xsl
+ FO_STYLESHEET ?= $(STYLESHEET_PREFIX)/fo/docbook.xsl
+@@ -47,3 +46,4 @@
+ $(XSLTPROC) \
+ $(XSLTPROC_MANPAGES_OPTIONS) \
+ $(MANPAGES_STYLESHEET) $<
++endif
+--- configure.ac
++++ configure.ac
+@@ -492,11 +492,13 @@
+ AC_PATH_PROGS(PKGCONFIG, pkg-config)
+ AC_PATH_PROGS(XML2CONFIG, xml2-config)
+
+-AC_PATH_PROGS(XSLTPROC, xsltproc)
+-AM_CONDITIONAL(BUILD_DOC, test "x$XSLTPROC" != "x" )
+-if test "x$XSLTPROC" = "x"; then
+- AC_MSG_WARN([xsltproc not installed, unable to (re-)build manual pages])
++AC_ARG_ENABLE([doc],
++ [ --enable-doc build documentation, [default=no]],
++ [enable_doc=$withval], [enable_doc=no])
++if test "x$enable_doc" != "xno"; then
++ AC_PATH_PROGS(XSLTPROC, xsltproc)
+ fi
++AM_CONDITIONAL(BUILD_DOC, test "x$enable_doc" != "xno" )
+
+ AC_PATH_PROGS(VALGRIND_BIN, valgrind, /usr/bin/valgrind)
+ AC_DEFINE_UNQUOTED(VALGRIND_BIN, "$VALGRIND_BIN", Valgrind command)
diff --git a/sys-cluster/cluster-glue/files/1.0.5-respect_cflags.patch b/sys-cluster/cluster-glue/files/1.0.5-respect_cflags.patch
new file mode 100644
index 00000000000..f89432fc7ee
--- /dev/null
+++ b/sys-cluster/cluster-glue/files/1.0.5-respect_cflags.patch
@@ -0,0 +1,11 @@
+--- configure.ac
++++ configure.ac
+@@ -1149,8 +1149,6 @@
+ CFLAGS="$CFLAGS -g"
+ enable_fatal_warnings=no
+ else
+- CFLAGS="$CFLAGS -ggdb3 -O0"
+-
+ # We had to eliminate -Wnested-externs because of libtool changes
+ EXTRA_FLAGS="-fgnu89-inline
+ -fstack-protector-all
diff --git a/sys-cluster/cluster-glue/files/1.0.7-fix_configure.patch b/sys-cluster/cluster-glue/files/1.0.7-fix_configure.patch
new file mode 100644
index 00000000000..fff85b00332
--- /dev/null
+++ b/sys-cluster/cluster-glue/files/1.0.7-fix_configure.patch
@@ -0,0 +1,13 @@
+Fix enable/disable of libnet
+
+--- a/configure.ac 2010-12-06 18:17:03.000000000 +0100
++++ b/configure.ac 2011-01-11 13:22:16.271977100 +0100
+@@ -928,7 +928,7 @@
+
+ AC_ARG_ENABLE([libnet],
+ [ --enable-libnet Use libnet for ARP based funcationality, [default=try]],
+- [enable_libnet=$withval], [enable_libnet=try])
++ [], [enable_libnet=try])
+
+ libnet=""
+ libnet_version="none"
diff --git a/sys-cluster/cluster-glue/files/1.0.9-glib-2.32.patch b/sys-cluster/cluster-glue/files/1.0.9-glib-2.32.patch
new file mode 100644
index 00000000000..a2dff8341bf
--- /dev/null
+++ b/sys-cluster/cluster-glue/files/1.0.9-glib-2.32.patch
@@ -0,0 +1,13 @@
+Index: Reusable-Cluster-Components-glue--glue-1.0.9/include/clplumbing/cl_uuid.h
+===================================================================
+--- Reusable-Cluster-Components-glue--glue-1.0.9.orig/include/clplumbing/cl_uuid.h
++++ Reusable-Cluster-Components-glue--glue-1.0.9/include/clplumbing/cl_uuid.h
+@@ -16,7 +16,7 @@
+
+ #ifndef _CL_UUID_H_
+ #define _CL_UUID_H_
+-#include <glib/gtypes.h>
++#include <glib.h>
+
+ typedef struct cl_uuid_s{
+ unsigned char uuid[16];
diff --git a/sys-cluster/cluster-glue/files/heartbeat-logd.init b/sys-cluster/cluster-glue/files/heartbeat-logd.init
new file mode 100644
index 00000000000..60de12026db
--- /dev/null
+++ b/sys-cluster/cluster-glue/files/heartbeat-logd.init
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+
+PIDFILE=/var/run/heartbeat-logd.pid
+
+depend() {
+ need net
+}
+
+BINARY="/usr/%libdir%/heartbeat/ha_logd"
+USER="hacluster"
+GROUP="haclient"
+CONFIG="/etc/logd.cf"
+LOGFILE="/var/log/ha_logger.log"
+
+start() {
+ ebegin "Starting heartbeat non-blocking log service"
+
+ COMMAND_ARGS="-d"
+ [[ -f "${CONFIG}" ]] && COMMAND_ARGS+=" -c ${CONFIG}"
+
+ if [ -n "${RC_UNAME}" ]; then
+ PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
+ else
+ PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
+ fi
+ eval ${CHRT} start-stop-daemon \
+ --quiet --start --chdir "${RUNTIMEDIR}" \
+ --pidfile "${PIDFILE}" \
+ --make-pidfile \
+ --exec ${BINARY} ${COMMAND_ARGS} --chuid "${USER}:${GROUP}" \
+ --nicelevel "${NICELEVEL}" \
+ ${PARAMS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping heartbeat non-blocking log service"
+ start-stop-daemon --stop --retry 3 --quiet --exec "${BINARY}"
+ rm -f "${PIDFILE}"
+ eend $?
+}
+
+restart() {
+ stop
+ sleep 3
+ start
+}
diff --git a/sys-cluster/cluster-glue/metadata.xml b/sys-cluster/cluster-glue/metadata.xml
new file mode 100644
index 00000000000..09a6c407e1c
--- /dev/null
+++ b/sys-cluster/cluster-glue/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <longdescription>Cluster Glue is a set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack.</longdescription>
+ <use>
+ <flag name="libnet">Force use of <pkg>net-libs/libnet</pkg></flag>
+ <flag name="large-cluster">Extend messages length limits for resource heavy clusters</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-cluster/cman-lib/Manifest b/sys-cluster/cman-lib/Manifest
new file mode 100644
index 00000000000..4a73eee8862
--- /dev/null
+++ b/sys-cluster/cman-lib/Manifest
@@ -0,0 +1 @@
+DIST cluster-2.03.09.tar.gz 1784357 SHA256 b6d6f35f58b2f8628c369391e0fd01b1803af40029ec1e6ef88865dda38b855f
diff --git a/sys-cluster/cman-lib/cman-lib-2.03.09-r1.ebuild b/sys-cluster/cman-lib/cman-lib-2.03.09-r1.ebuild
new file mode 100644
index 00000000000..19b3d9ad105
--- /dev/null
+++ b/sys-cluster/cman-lib/cman-lib-2.03.09-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator multilib
+
+MY_P=cluster-${PV}
+
+MAJ_PV=$(get_major_version)
+MIN_PV=$(get_version_component_range 2).$(get_version_component_range 3)
+
+DESCRIPTION="A library for cluster management common to the various pieces of Cluster Suite"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="!sys-cluster/cman-headers
+ !sys-cluster/cman-kernel
+ !=sys-cluster/cman-1*"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/${PN/-//}
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --libdir=/usr/$(get_libdir) \
+ --cflags="-Wall" \
+ --disable_kernel_check \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ ) || die "configure problem"
+
+ sed -e 's:\($(CC)\):\1 $(LDFLAGS):' \
+ -i Makefile "${WORKDIR}/${MY_P}/make/cobj.mk" || die
+
+ emake clean all || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/sys-cluster/cman-lib/cman-lib-2.03.09.ebuild b/sys-cluster/cman-lib/cman-lib-2.03.09.ebuild
new file mode 100644
index 00000000000..fc3290a6f30
--- /dev/null
+++ b/sys-cluster/cman-lib/cman-lib-2.03.09.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="A library for cluster management common to the various pieces of Cluster Suite"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="!sys-cluster/cman-headers
+ !sys-cluster/cman-kernel
+ !=sys-cluster/cman-1*
+ "
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/${PN/-//}"
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --disable_kernel_check \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ ) || die "configure problem"
+
+ sed -e 's:\($(CC)\):\1 $(LDFLAGS):' -i Makefile
+ sed -e 's:\($(CC)\):\1 $(LDFLAGS):' -i "${WORKDIR}/${MY_P}/make/cobj.mk"
+
+ emake clean || die "clean problem"
+ emake || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install problem"
+}
diff --git a/sys-cluster/cman-lib/metadata.xml b/sys-cluster/cman-lib/metadata.xml
new file mode 100644
index 00000000000..348e6c4de81
--- /dev/null
+++ b/sys-cluster/cman-lib/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+</pkgmetadata>
diff --git a/sys-cluster/cman/Manifest b/sys-cluster/cman/Manifest
new file mode 100644
index 00000000000..0e8513fbb08
--- /dev/null
+++ b/sys-cluster/cman/Manifest
@@ -0,0 +1,2 @@
+DIST cluster-3.1.5.tar.gz 651449 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e
+DIST cluster-3.2.0.tar.gz 688411 SHA256 96651381645cde0e32b06f83e180b1664232a5c589c72f06206e0539e0036cfb SHA512 00620b89564c4f9b67b679695749cd7515f49af43ace6a565e32e020ee66db219f3db3f53420d6460ea8c1cab03258305735fe5db81aab3953777015119533e9 WHIRLPOOL cc468ac8e879dadc157d585b22615d6ffcf0b38a5c93196f8aa9564467e8b8aae6c2688faa9d9e8a98e68a605b86d84b6a79edb474d0cde231e5a78729ebb4e4
diff --git a/sys-cluster/cman/cman-3.1.5-r1.ebuild b/sys-cluster/cman/cman-3.1.5-r1.ebuild
new file mode 100644
index 00000000000..dfb53125343
--- /dev/null
+++ b/sys-cluster/cman/cman-3.1.5-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-info multilib toolchain-funcs versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2-3)"
+
+DESCRIPTION="Cluster Manager"
+HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage"
+SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="dbus ldap"
+
+RDEPEND="dev-libs/libxml2
+ dev-libs/libxslt
+ dbus? ( sys-apps/dbus )
+ ldap? ( net-nds/openldap )
+ sys-cluster/corosync
+ sys-cluster/openais
+ ~sys-cluster/libccs-${PV}
+ ~sys-cluster/libfence-${PV}
+ ~sys-cluster/libcman-${PV}
+ ~sys-cluster/libdlm-${PV}
+ ~sys-cluster/liblogthread-${PV}
+ !sys-cluster/dlm
+"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.24"
+
+S="${WORKDIR}/${MY_P}"
+
+# TODO:
+# * Gentoo'ise the init script
+
+src_configure() {
+ # cluster libs have their own separate packages
+ sed -i -e 's|lib||' "${S}/cman/Makefile" || die
+ sed -i -e 's|liblogthread||' "${S}/common/Makefile" || die
+ sed -i -e 's|libs||' "${S}/config/Makefile" || die
+ sed -i -e 's|libdlm libdlmcontrol||' "${S}/dlm/Makefile" || die
+ sed -i -e 's|libfence libfenced||' "${S}/fence/Makefile" || die
+ sed -i -e 's|fence/libfenced||' "${S}/Makefile" || die
+
+ sed -i \
+ -e 's|\(^all:.*\)depends |\1|' \
+ config/tools/ccs_tool/Makefile \
+ fence/fence{d,_node,_tool}/Makefile \
+ cman/{cman_tool,daemon,tests,qdisk,notifyd}/Makefile \
+ dlm/{tool,tests/usertest}/Makefile \
+ || die "sed failed"
+
+ if ! use ldap ; then
+ sed -i -e 's|ldap||' config/plugins/Makefile || die "sed failed"
+ fi
+ local myopts=""
+ use dbus || myopts="--disable_dbus"
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --libdir=/usr/$(get_libdir) \
+ --disable_kernel_check \
+ --kernel_src=${KERNEL_DIR} \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ --without_rgmanager \
+ --without_bindings \
+ ${myopts} \
+ || die "configure problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # we have to create it in the init.d script anyway
+ rmdir "${D}"/var/run/{cluster,}
+
+ keepdir /var/{lib,log}/cluster
+ keepdir /etc/cluster/cman-notify.d
+
+ rm -rf "${D}/usr/share/doc"
+ dodoc \
+ doc/{usage.txt,cman_notify_template.sh} \
+ config/plugins/ldap/*.ldif
+ dohtml doc/*.html
+
+ # lib-specific man pages are provided by the corresponding packages
+ rm "${D}/usr/share/man/man3/libdlm.3"
+
+ newinitd "${FILESDIR}/${PN}.initd-3.1.5-r1" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+}
diff --git a/sys-cluster/cman/cman-3.1.5.ebuild b/sys-cluster/cman/cman-3.1.5.ebuild
new file mode 100644
index 00000000000..050c7bf4b55
--- /dev/null
+++ b/sys-cluster/cman/cman-3.1.5.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-info multilib toolchain-funcs versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2-3)"
+
+DESCRIPTION="Cluster Manager"
+HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage"
+SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="dbus ldap"
+
+RDEPEND="dev-libs/libxml2
+ dev-libs/libxslt
+ dbus? ( sys-apps/dbus )
+ ldap? ( net-nds/openldap )
+ sys-cluster/corosync
+ sys-cluster/openais
+ ~sys-cluster/libccs-${PV}
+ ~sys-cluster/libfence-${PV}
+ ~sys-cluster/libcman-${PV}
+ ~sys-cluster/libdlm-${PV}
+ ~sys-cluster/liblogthread-${PV}
+ !sys-cluster/dlm
+"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.24"
+
+S="${WORKDIR}/${MY_P}"
+
+# TODO:
+# * Gentoo'ise the init script
+
+src_configure() {
+ # cluster libs have their own separate packages
+ sed -i -e 's|lib||' "${S}/cman/Makefile" || die
+ sed -i -e 's|liblogthread||' "${S}/common/Makefile" || die
+ sed -i -e 's|libs||' "${S}/config/Makefile" || die
+ sed -i -e 's|libdlm libdlmcontrol||' "${S}/dlm/Makefile" || die
+ sed -i -e 's|libfence libfenced||' "${S}/fence/Makefile" || die
+ sed -i -e 's|fence/libfenced||' "${S}/Makefile" || die
+
+ sed -i \
+ -e 's|\(^all:.*\)depends |\1|' \
+ config/tools/ccs_tool/Makefile \
+ fence/fence{d,_node,_tool}/Makefile \
+ cman/{cman_tool,daemon,tests,qdisk,notifyd}/Makefile \
+ dlm/{tool,tests/usertest}/Makefile \
+ || die "sed failed"
+
+ if ! use ldap ; then
+ sed -i -e 's|ldap||' config/plugins/Makefile || die "sed failed"
+ fi
+ local myopts=""
+ use dbus || myopts="--disable_dbus"
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --libdir=/usr/$(get_libdir) \
+ --disable_kernel_check \
+ --kernel_src=${KERNEL_DIR} \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ --without_rgmanager \
+ --without_bindings \
+ ${myopts} \
+ || die "configure problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # we have to create it in the init.d script anyway
+ rmdir "${D}"/var/run/{cluster,}
+
+ keepdir /var/{lib,log}/cluster
+ keepdir /etc/cluster/cman-notify.d
+
+ rm -rf "${D}/usr/share/doc"
+ dodoc \
+ doc/{usage.txt,cman_notify_template.sh} \
+ config/plugins/ldap/*.ldif
+ dohtml doc/*.html
+
+ # lib-specific man pages are provided by the corresponding packages
+ rm "${D}/usr/share/man/man3/libdlm.3"
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+}
diff --git a/sys-cluster/cman/cman-3.2.0.ebuild b/sys-cluster/cman/cman-3.2.0.ebuild
new file mode 100644
index 00000000000..b6ed94b4eae
--- /dev/null
+++ b/sys-cluster/cman/cman-3.2.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-info multilib toolchain-funcs versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2-3)"
+
+DESCRIPTION="Cluster Manager"
+HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage"
+SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="dbus ldap"
+
+RDEPEND="dev-libs/libxml2
+ dev-libs/libxslt
+ dbus? ( sys-apps/dbus )
+ ldap? ( net-nds/openldap )
+ sys-cluster/corosync
+ sys-cluster/openais
+ ~sys-cluster/libccs-${PV}
+ ~sys-cluster/libfence-${PV}
+ ~sys-cluster/libcman-${PV}
+ ~sys-cluster/libdlm-${PV}
+ ~sys-cluster/liblogthread-${PV}
+ !sys-cluster/dlm
+"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.24"
+
+S="${WORKDIR}/${MY_P}"
+
+# TODO:
+# * Gentoo'ise the init script
+
+src_configure() {
+ # cluster libs have their own separate packages
+ sed -i -e 's|lib||' "${S}/cman/Makefile" || die
+ sed -i -e 's|liblogthread||' "${S}/common/Makefile" || die
+ sed -i -e 's|libs||' "${S}/config/Makefile" || die
+ sed -i -e 's|libdlm libdlmcontrol||' "${S}/dlm/Makefile" || die
+ sed -i -e 's|libfence libfenced||' "${S}/fence/Makefile" || die
+ sed -i -e 's|fence/libfenced||' "${S}/Makefile" || die
+
+ sed -i \
+ -e 's|\(^all:.*\)depends |\1|' \
+ config/tools/ccs_tool/Makefile \
+ fence/fence{d,_node,_tool}/Makefile \
+ cman/{cman_tool,daemon,tests,qdisk,notifyd}/Makefile \
+ dlm/{tool,tests/usertest}/Makefile \
+ || die "sed failed"
+
+ if ! use ldap ; then
+ sed -i -e 's|ldap||' config/plugins/Makefile || die "sed failed"
+ fi
+ local myopts=""
+ use dbus || myopts="--disable_dbus"
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --libdir=/usr/$(get_libdir) \
+ --disable_kernel_check \
+ --kernel_src=${KERNEL_DIR} \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ --without_rgmanager \
+ --without_bindings \
+ ${myopts} \
+ || die "configure problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # we have to create it in the init.d script anyway
+ rmdir "${D}"/var/run/{cluster,}
+
+ keepdir /var/{lib,log}/cluster
+ keepdir /etc/cluster/cman-notify.d
+
+ rm -rf "${D}/usr/share/doc"
+ dodoc \
+ doc/{usage.txt,cman_notify_template.sh} \
+ config/plugins/ldap/*.ldif
+ dohtml doc/*.html
+
+ # lib-specific man pages are provided by the corresponding packages
+ rm "${D}/usr/share/man/man3/libdlm.3"
+
+ newinitd "${FILESDIR}/${PN}.initd-3.1.5-r1" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+}
diff --git a/sys-cluster/cman/files/cman.confd b/sys-cluster/cman/files/cman.confd
new file mode 100644
index 00000000000..14b7ea79161
--- /dev/null
+++ b/sys-cluster/cman/files/cman.confd
@@ -0,0 +1,67 @@
+CCSD_OPTS=
+
+# CMAN_CLUSTER_TIMEOUT -- amount of time to wait for joinging a cluster
+# before giving up. If CMAN_CLUSTER_TIMEOUT is positive, then we will
+# wait CMAN_CLUSTER_TIMEOUT seconds before giving up and failing when
+# a cluster is not joined. If CMAN_CLUSTER_TIMEOUT is zero, then
+# wait indefinately for a cluster join. If CMAN_CLUSTER_TIMEOUT is
+# negative, do not check to see that the cluster has been joined
+CMAN_CLUSTER_TIMEOUT=120
+
+# CMAN_QUORUM_TIMEOUT -- amount of time to wait for a quorate cluster on
+# startup quorum is needed by many other applications, so we may as
+# well wait here. If CMAN_QUORUM_TIMEOUT is less than 1, quorum will
+# be ignored.
+CMAN_QUORUM_TIMEOUT=300
+
+# CMAN_SHUTDOWN_TIMEOUT -- amount of time to wait for cman to become a
+# cluster member before calling cman_tool leave during shutdown.
+# default is 60 seconds
+CMAN_SHUTDOWN_TIMEOUT=60
+
+# CMAN_JOIN_OPTIONS
+#CMAN_JOIN_OPTS="-c ...."
+
+# CMAN_LEAVE_OPTIONS
+#CMAN_LEAVE_OPTS=""
+
+
+# ex: FENCED_OPTS="-w -t 300"
+FENCED_OPTS=""
+
+
+# TODO ?
+# CMAN_NOTIFYD_START - control the startup behaviour for cmannotifyd
+# the variable can take 3 values:
+# yes | will always start cmannotifyd
+# no | will never start cmannotifyd
+# conditional (default) | will start cmannotifyd only if scriptlets
+# are found in @NOTIFYDDIR@
+[ -z "$CMAN_NOTIFYD_START" ] && CMAN_NOTIFYD_START=conditional
+
+# CMAN_SSHD_START - control sshd startup behaviour
+# the variable can take 2 values:
+# yes | cman will start sshd as early as possible
+# no (default) | cman will not start sshd
+[ -z "$CMAN_SSHD_START" ] && CMAN_SSHD_START=no
+
+# FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
+# complete. If the join hasn't completed in this time, fence_tool join
+# exits with an error, and this script exits with an error. To wait
+# indefinitely set the value to -1.
+[ -z "$FENCE_JOIN_TIMEOUT" ] && FENCE_JOIN_TIMEOUT=20
+
+# FENCED_MEMBER_DELAY -- amount of time to delay fence_tool join to allow
+# all nodes in cluster.conf to become cluster members. In seconds.
+[ -z "$FENCED_MEMBER_DELAY" ] && FENCED_MEMBER_DELAY=45
+
+# FENCE_JOIN -- boolean value used to control whether or not this node
+# should join the fence domain. If FENCE_JOIN is set to "no", then
+# the script will not attempt to the fence domain. If FENCE_JOIN is
+# set to "yes", then the script will attempt to join the fence domain.
+# If FENCE_JOIN is set to any other value, the default behavior is
+# to join the fence domain (equivalent to "yes").
+[ -z "$FENCE_JOIN" ] && FENCE_JOIN="yes"
+
+# FENCED_OPTS -- allow extra options to be passed to fence daemon.
+[ -z "$FENCED_OPTS" ] && FENCED_OPTS="" \ No newline at end of file
diff --git a/sys-cluster/cman/files/cman.initd b/sys-cluster/cman/files/cman.initd
new file mode 100644
index 00000000000..4aa4592e082
--- /dev/null
+++ b/sys-cluster/cman/files/cman.initd
@@ -0,0 +1,319 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CMAN_TOOL="/usr/sbin/cman_tool"
+FENCE_TOOL="/usr/sbin/fence_tool"
+GFS_CONTROLD="/usr/sbin/gfs_controld"
+DLM_CONTROLD="/usr/sbin/dlm_controld"
+GROUPD="/usr/sbin/groupd"
+FENCED="/usr/sbin/fenced"
+CCSD="/usr/sbin/ccsd"
+
+[ -z "$CCSD_OPTS" ] && CCSD_OPTS=""
+[ -z "$CMAN_CLUSTER_TIMEOUT" ] && CMAN_CLUSTER_TIMEOUT=120
+[ -z "$CMAN_QUORUM_TIMEOUT" ] && CMAN_QUORUM_TIMEOUT=0
+[ -z "$CMAN_SHUTDOWN_TIMEOUT" ] && CMAN_SHUTDOWN_TIMEOUT=60
+[ -z "$FENCED_START_TIMEOUT" ] && FENCED_START_TIMEOUT=300
+[ -z "$FENCED_MEMBER_DELAY" ] && FENCED_MEMBER_DELAY=300
+
+depend() {
+ use net
+ after xend
+ after xendomains
+ provide cman
+}
+
+load_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Loading ${module} kernel module"
+ modprobe ${module} > /dev/null
+ eend $? "Failed to load ${module} kernel module"
+ done
+}
+
+unload_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Unloading ${module} kernel module"
+ modprobe -r ${module} > /dev/null
+ eend $? "Failed to unload ${module} kernel module"
+ done
+}
+
+check_configfs() {
+ awk '{ print $2 }' /etc/mtab | grep "/sys/kernel/config" &> /dev/null\
+ && awk '{ print $3 }' /etc/mtab | grep "configfs" &> /dev/null
+
+ if [ $? -ne 0 ]; then
+ ewarn "Please add the following line to /etc/fstab:"
+ ewarn "none configfs /sys/kernel/config defaults 0 0"
+ eend 1 "configfs not mounted at /sys/kernel/config"
+ fi
+}
+
+mount_configfs()
+{
+ local module=$(awk '$2 == "configfs" { print $2 }' /proc/filesystems)
+
+ if [ -z "${module}" ]; then
+ load_modules "configfs"
+ sleep 1s
+ fi
+
+ # configfs
+ awk '{ print $2 }' /etc/mtab | grep "/sys/kernel/config" &> /dev/null \
+ && awk '{ print $3 }' /etc/mtab | grep "configfs" &> /dev/null
+
+ if [ $? -ne 0 ]
+ then
+ ebegin "Mounting ConfigFS"
+ /bin/mount -t configfs none /sys/kernel/config 2>&1
+ eend $?
+ fi
+ return 0
+}
+
+umount_configfs() {
+ local sig retry
+ local entry entries
+
+ entries="$(awk '$3 == "configfs" { print $2 }' /proc/mounts | sort -r)"
+
+ for entry in $entries; do
+ ebegin "Unmounting ConfigFS"
+ umount $entry &>/dev/null
+ eend $?
+ done
+
+ local module=$(awk '$1 == "configfs" { print $1 }' /proc/modules)
+
+ if [ ! -z "${module}" ]; then
+ unload_modules "configfs"
+ sleep 1s
+ fi
+}
+
+umount_gfs_filesystems() {
+ local sig retry
+ local remaining="$(awk '$3 == "gfs" || $3 == "gfs2" { print $2 }' /proc/mounts | sort -r)"
+
+ if [ -n "${remaining}" ]
+ then
+ sig=
+ retry=3
+ while [ -n "${remaining}" -a "${retry}" -gt 0 ]
+ do
+ if [ "${retry}" -lt 3 ]
+ then
+ ebegin "Unmounting GFS filesystems (retry)"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems this retry"
+ else
+ ebegin "Unmounting GFS filesystems"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems"
+ fi
+ remaining="$(awk '$3 == "gfs" || $3 == "gfs2" { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+ [ -z "${remaining}" ] && break
+ /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
+ sleep 5
+ retry=$((${retry} -1))
+ sig=-9
+ done
+ fi
+}
+
+unload_allmodules() {
+ local modules
+
+ modules=$(awk '$1 == "lock_gulm" || \
+ $1 == "lock_dlm" || $1 == "dlm" || \
+ $1 == "lock_harness" || $1 == "gfs2" || \
+ $1 == "gfs" { print $1 }' /proc/modules)
+
+ #modules=$(awk '$1 == "lock_harness" || \
+ # $1 == "gfs" { print $1 }' /proc/modules)
+
+ unload_modules "${modules}"
+}
+
+start_ccsd() {
+ ebegin "Starting ccsd"
+ start-stop-daemon --start --quiet --exec ${CCSD} -- ${CCSD_OPTS}
+ eend $?
+}
+
+stop_ccsd() {
+ ebegin "Stopping ccsd"
+ start-stop-daemon --stop --quiet -s 9 --exec ${CCSD}
+ eend $?
+}
+
+start_cman() {
+ ${CMAN_TOOL} status &> /dev/null
+ if [ $? -ne 0 ]
+ then
+ ebegin "Starting cman"
+ ${CMAN_TOOL} -t ${CMAN_CLUSTER_TIMEOUT} \
+ -w join ${CMAN_JOIN_OPTS} &> /dev/null
+
+ if [ "$?" -ne 0 ]
+ then
+ eend 1 "Failed to start cman"
+ else
+ eend 0
+
+ # make sure that we are quorate?
+ if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ]
+ then
+ ebegin "Waiting for quorum (${CMAN_QUORUM_TIMEOUT} secs)"
+ ${CMAN_TOOL} -t ${CMAN_QUORUM_TIMEOUT} -q wait
+ eend $?
+ fi
+ fi
+ else
+ einfo "cman already running"
+ fi
+}
+
+stop_cman() {
+ ebegin "Stopping cman"
+ local stat=0
+ ${CMAN_TOOL} status > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ retry=3
+ stat=1
+ while [ "${stat}" -eq 1 -a "${retry}" -gt 0 ]
+ do
+ #sleep 2
+ #${CMAN_TOOL} -w -t ${CMAN_SHUTDOWN_TIMEOUT} \
+ # leave remove ${CMAN_LEAVE_OPTS} > /dev/null
+ ${CMAN_TOOL} leave -t ${CMAN_SHUTDOWN_TIMEOUT} ${CMAN_LEAVE_OPTS} \
+ remove &> /dev/null
+ stat=$?
+ retry=$((${retry} -1))
+ done
+ fi
+ eend ${stat}
+}
+
+start_groupd() {
+ ebegin "Starting groupd"
+ start-stop-daemon --start --exec ${GROUPD} --name groupd
+ eend $?
+}
+
+stop_groupd() {
+ ebegin "Stopping groupd"
+ start-stop-daemon --stop --exec ${GROUPD} --name groupd
+ eend $?
+}
+
+start_fenced() {
+ ebegin "Starting fenced"
+ start-stop-daemon --start --exec ${FENCED} --name fenced
+ eend $?
+
+ ${CMAN_TOOL} status | grep Flags | grep 2node &> /dev/null
+ local errmsg=$?
+
+ ebegin "Joining fence domain"
+ if [ "${errmsg}" -ne 0 ]
+ then
+ ${FENCE_TOOL} join -t $FENCED_START_TIMEOUT &> /dev/null
+ [ $? -eq 0 ] && errmsg=$? || errmsg=1
+ else
+ ${FENCE_TOOL} join -m $FENCED_MEMBER_DELAY &> /dev/null
+ [ $? -eq 0 ] && errmsg=$? || errmsg=1
+ fi
+ eend $errmsg
+}
+
+stop_fenced() {
+ # fenced services
+# local fence_status="$( ${CMAN_TOOL} services | awk '$1 ~ /fence/ { print $3 }')"
+# if [ -n "${fence_status}" ]; then
+# if [ -x ${FENCE_TOOL} ]; then
+# ebegin "Leaving fence domain"
+# ${FENCE_TOOL} leave > /dev/null 2>&1
+# eend $?
+# fi
+# fi
+
+ if [ -x ${FENCE_TOOL} ]; then
+ if ${FENCE_TOOL} ls >/dev/null 2>&1; then
+ ebegin "Leaving fence domain"
+ ${FENCE_TOOL} leave > /dev/null 2>&1
+ eend $?
+ fi
+ fi
+
+ ebegin "Stopping fenced"
+ start-stop-daemon --stop --exec ${FENCED} --name fenced
+ eend $?
+}
+
+start_gfs_controld() {
+ ebegin "Starting gfs_controld"
+ start-stop-daemon --start --exec ${GFS_CONTROLD} --name gfs_controld
+ eend $?
+}
+
+stop_gfs_controld() {
+ ebegin "Stopping gfs_controld"
+ start-stop-daemon --stop --exec ${GFS_CONTROLD} --name gfs_controld
+ eend $?
+}
+
+start_dlm_controld() {
+ ebegin "Starting dlm_controld"
+ start-stop-daemon --start --exec ${DLM_CONTROLD} --name dlm_controld
+ eend $?
+}
+
+stop_dlm_controld() {
+ ebegin "Stopping dlm_controld"
+ start-stop-daemon --stop --exec ${DLM_CONTROLD} --name dlm_controld
+ eend $?
+}
+
+start() {
+ load_modules "dlm"
+
+ mkdir -p /var/run/cluster
+
+ mount_configfs
+# start_ccsd
+ start_cman
+ start_fenced
+ start_groupd
+ start_dlm_controld
+# start_gfs_controld
+}
+
+stop() {
+
+# umount GFS filesystems
+# umount_gfs_filesystems
+
+ stop_dlm_controld
+ stop_groupd
+ stop_fenced
+ stop_cman
+
+ #stop_gfs_controld
+ #stop_dlm_controld
+ #stop_groupd
+
+ unload_modules "dlm"
+# stop_ccsd
+# unload_allmodules
+ umount_configfs
+}
diff --git a/sys-cluster/cman/files/cman.initd-3.1.5-r1 b/sys-cluster/cman/files/cman.initd-3.1.5-r1
new file mode 100644
index 00000000000..c8be27f575d
--- /dev/null
+++ b/sys-cluster/cman/files/cman.initd-3.1.5-r1
@@ -0,0 +1,350 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CMAN_TOOL="/usr/sbin/cman_tool"
+FENCE_TOOL="/usr/sbin/fence_tool"
+GFS_CONTROLD="/usr/sbin/gfs_controld"
+DLM_CONTROLD="/usr/sbin/dlm_controld"
+GROUPD="/usr/sbin/groupd"
+FENCED="/usr/sbin/fenced"
+CCSD="/usr/sbin/ccsd"
+
+[ -z "$CCSD_OPTS" ] && CCSD_OPTS=""
+[ -z "$CMAN_CLUSTER_TIMEOUT" ] && CMAN_CLUSTER_TIMEOUT=120
+[ -z "$CMAN_QUORUM_TIMEOUT" ] && CMAN_QUORUM_TIMEOUT=0
+[ -z "$CMAN_SHUTDOWN_TIMEOUT" ] && CMAN_SHUTDOWN_TIMEOUT=60
+[ -z "$FENCED_START_TIMEOUT" ] && FENCED_START_TIMEOUT=300
+[ -z "$FENCED_MEMBER_DELAY" ] && FENCED_MEMBER_DELAY=300
+
+depend() {
+ use net
+ after xend
+ after xendomains
+ provide cman
+}
+
+load_modules() {
+ local module modules
+ modules=$1
+
+ rcS=0 # catch the first error here
+ [ -f /proc/modules ] && for module in ${modules}; do
+ ebegin "Loading ${module} kernel module"
+ modprobe -q ${module}
+ rc=$? # error for this modprobe call
+ eend $rc "Failed to load ${module} kernel module"
+ [ $rc -ne 0 ] && rcS=$rc
+ done
+ return $rcS
+}
+
+unload_modules() {
+ local module modules
+ modules=$1
+
+ [ -f /proc/modules ] && for module in ${modules}; do
+ ebegin "Unloading ${module} kernel module"
+ modprobe -r ${module} > /dev/null
+ eend $? "Failed to unload ${module} kernel module"
+ done
+}
+
+check_configfs() {
+ awk '{ print $2 }' /proc/mounts | grep -sq "/sys/kernel/config" \
+ && awk '{ print $3 }' /proc/mounts | grep -sq "configfs"
+
+ if [ $? -ne 0 ]; then
+ ewarn "Please add the following line to /etc/fstab:"
+ ewarn "none configfs /sys/kernel/config defaults 0 0"
+ eend 1 "configfs not mounted at /sys/kernel/config"
+ fi
+}
+
+mount_configfs()
+{
+ local module=$(awk '$2 == "configfs" { print $2 }' /proc/filesystems)
+
+ if [ -z "${module}" ]; then
+ load_modules "configfs"
+ rc=$?
+ sleep 1s
+ [ $rc -ne 0 ] && return 1
+ fi
+
+ # configfs
+ awk '{ print $2 }' /proc/mounts | grep -sq "/sys/kernel/config" \
+ && awk '{ print $3 }' /proc/mounts | grep -sq "configfs"
+ rc=$?
+
+ if [ $rc -ne 0 ]
+ then
+ ebegin "Mounting ConfigFS"
+ /bin/mount -t configfs none /sys/kernel/config 2>&1
+ rc=$?
+ eend $rc
+ fi
+
+ return $rc
+}
+
+umount_configfs() {
+ local sig retry
+ local entry entries
+
+ entries="$(awk '$3 == "configfs" { print $2 }' /proc/mounts | sort -r)"
+
+ for entry in $entries; do
+ ebegin "Unmounting ConfigFS"
+ umount $entry >/dev/null 2>&1
+ eend $?
+ done
+
+ local module=$(awk '$1 == "configfs" { print $1 }' /proc/modules)
+
+ if [ ! -z "${module}" ]; then
+ unload_modules "configfs"
+ sleep 1s
+ fi
+}
+
+umount_gfs_filesystems() {
+ local sig retry
+ local remaining="$(awk '$3 == "gfs" || $3 == "gfs2" { print $2 }' /proc/mounts | sort -r)"
+
+ if [ -n "${remaining}" ]
+ then
+ sig=
+ retry=3
+ while [ -n "${remaining}" -a "${retry}" -gt 0 ]
+ do
+ if [ "${retry}" -lt 3 ]
+ then
+ ebegin "Unmounting GFS filesystems (retry)"
+ umount ${remaining} >/dev/null 2>&1
+ eend $? "Failed to unmount GFS filesystems this retry"
+ else
+ ebegin "Unmounting GFS filesystems"
+ umount ${remaining} >/dev/null 2>&1
+ eend $? "Failed to unmount GFS filesystems"
+ fi
+ remaining="$(awk '$3 == "gfs" || $3 == "gfs2" { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+ [ -z "${remaining}" ] && break
+ /bin/fuser -k -m ${sig} ${remaining} >/dev/null 2>&1
+ sleep 5
+ retry=$((${retry} -1))
+ sig=-9
+ done
+ fi
+}
+
+unload_allmodules() {
+ local modules
+
+ modules=$(awk '$1 == "lock_gulm" || \
+ $1 == "lock_dlm" || $1 == "dlm" || \
+ $1 == "lock_harness" || $1 == "gfs2" || \
+ $1 == "gfs" { print $1 }' /proc/modules)
+
+ #modules=$(awk '$1 == "lock_harness" || \
+ # $1 == "gfs" { print $1 }' /proc/modules)
+
+ unload_modules "${modules}"
+}
+
+start_ccsd() {
+ ebegin "Starting ccsd"
+ start-stop-daemon --start --quiet --exec ${CCSD} -- ${CCSD_OPTS}
+ eend $?
+}
+
+stop_ccsd() {
+ ebegin "Stopping ccsd"
+ start-stop-daemon --stop --quiet -s 9 --exec ${CCSD}
+ eend $?
+}
+
+start_cman() {
+ ${CMAN_TOOL} status >/dev/null 2>&1
+ if [ $? -ne 0 ]
+ then
+ ebegin "Starting cman"
+ ${CMAN_TOOL} -t ${CMAN_CLUSTER_TIMEOUT} \
+ -w join ${CMAN_JOIN_OPTS} >/dev/null 2>&1
+
+ if [ "$?" -ne 0 ]
+ then
+ eend 1 "Failed to start cman"
+ return 1
+ else
+ eend 0
+
+ # make sure that we are quorate?
+ if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ]
+ then
+ ebegin "Waiting for quorum (${CMAN_QUORUM_TIMEOUT} secs)"
+ ${CMAN_TOOL} -t ${CMAN_QUORUM_TIMEOUT} -q wait
+ rc=$?
+ eend $rc
+ return $rc
+ fi
+ fi
+ else
+ einfo "cman already running"
+ fi
+}
+
+stop_cman() {
+ ebegin "Stopping cman"
+ local stat=0
+ ${CMAN_TOOL} status > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ retry=3
+ stat=1
+ while [ "${stat}" -eq 1 -a "${retry}" -gt 0 ]
+ do
+ #sleep 2
+ #${CMAN_TOOL} -w -t ${CMAN_SHUTDOWN_TIMEOUT} \
+ # leave remove ${CMAN_LEAVE_OPTS} > /dev/null
+ ${CMAN_TOOL} leave -t ${CMAN_SHUTDOWN_TIMEOUT} ${CMAN_LEAVE_OPTS} \
+ remove >/dev/null 2>&1
+ stat=$?
+ retry=$((${retry} -1))
+ done
+ fi
+ eend ${stat}
+}
+
+start_groupd() {
+ ebegin "Starting groupd"
+ start-stop-daemon --start --exec ${GROUPD} --name groupd
+ eend $?
+}
+
+stop_groupd() {
+ ebegin "Stopping groupd"
+ start-stop-daemon --stop --exec ${GROUPD} --name groupd
+ eend $?
+}
+
+start_fenced() {
+ ebegin "Starting fenced"
+ start-stop-daemon --start --exec ${FENCED} --name fenced
+ eend $?
+
+ ${CMAN_TOOL} status | grep Flags | grep 2node >/dev/null 2>&1
+ local errmsg=$?
+
+ ebegin "Joining fence domain"
+ if [ "${errmsg}" -ne 0 ]
+ then
+ ${FENCE_TOOL} join -t $FENCED_START_TIMEOUT >/dev/null 2>&1
+ [ $? -eq 0 ] && errmsg=$? || errmsg=1
+ else
+ ${FENCE_TOOL} join -m $FENCED_MEMBER_DELAY >/dev/null 2>&1
+ [ $? -eq 0 ] && errmsg=$? || errmsg=1
+ fi
+ eend $errmsg
+}
+
+stop_fenced() {
+ # fenced services
+# local fence_status="$( ${CMAN_TOOL} services | awk '$1 ~ /fence/ { print $3 }')"
+# if [ -n "${fence_status}" ]; then
+# if [ -x ${FENCE_TOOL} ]; then
+# ebegin "Leaving fence domain"
+# ${FENCE_TOOL} leave > /dev/null 2>&1
+# eend $?
+# fi
+# fi
+
+ if [ -x ${FENCE_TOOL} ]; then
+ if ${FENCE_TOOL} ls >/dev/null 2>&1; then
+ ebegin "Leaving fence domain"
+ ${FENCE_TOOL} leave > /dev/null 2>&1
+ eend $?
+ fi
+ fi
+
+ ebegin "Stopping fenced"
+ start-stop-daemon --stop --exec ${FENCED} --name fenced
+ eend $?
+}
+
+start_gfs_controld() {
+ ebegin "Starting gfs_controld"
+ start-stop-daemon --start --exec ${GFS_CONTROLD} --name gfs_controld
+ eend $?
+}
+
+stop_gfs_controld() {
+ ebegin "Stopping gfs_controld"
+ start-stop-daemon --stop --exec ${GFS_CONTROLD} --name gfs_controld
+ eend $?
+}
+
+start_dlm_controld() {
+ ebegin "Starting dlm_controld"
+ start-stop-daemon --start --exec ${DLM_CONTROLD} --name dlm_controld
+ eend $?
+}
+
+stop_dlm_controld() {
+ ebegin "Stopping dlm_controld"
+ start-stop-daemon --stop --exec ${DLM_CONTROLD} --name dlm_controld
+ eend $?
+}
+
+start() {
+ if ! mount_configfs ; then
+ eerror "ConfigFS & DLM are required to use cman"
+ return 1
+ fi
+
+ [ -e /sys/module/dlm ] || [ -e /sys/kernel/dlm ] || load_modules "dlm"
+ if [ ! -e /sys/kernel/dlm ]; then
+ eerror "ConfigFS & DLM are required to use cman"
+ return 1
+ fi
+ mkdir -p /var/run/cluster
+
+# start_ccsd
+ if ! start_cman ; then
+ eerror "Failed to start cman"
+ return 1
+ fi
+ if ! start_fenced; then
+ eerror "Failed to start fenced"
+ return 1
+ fi
+ if ! start_groupd; then
+ eerror "Failed to start groupd"
+ return 1
+ fi
+ if ! start_dlm_controld; then
+ eerror "Failed to start dlm_controld"
+ return 1
+ fi
+# start_gfs_controld
+}
+
+stop() {
+
+# umount GFS filesystems
+# umount_gfs_filesystems
+
+ stop_dlm_controld
+ stop_groupd
+ stop_fenced
+ stop_cman
+
+ #stop_gfs_controld
+ #stop_dlm_controld
+ #stop_groupd
+
+ unload_modules "dlm"
+# stop_ccsd
+# unload_allmodules
+ umount_configfs
+}
diff --git a/sys-cluster/cman/files/qdiskd.initd b/sys-cluster/cman/files/qdiskd.initd
new file mode 100644
index 00000000000..0a01281a566
--- /dev/null
+++ b/sys-cluster/cman/files/qdiskd.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+depend() {
+ use net
+ need cman
+}
+
+start() {
+ ebegin "Starting the Quorum Disk Daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/qdiskd -- -Q
+ eend $? "Failed to start qdiskd"
+}
+
+stop() {
+ ebegin "Stopping the Quorum Disk Daemon"
+ start-stop-daemon --stop --pidfile /var/run/qdiskd.pid
+ eend $? "Failed to stop qdiskd"
+}
diff --git a/sys-cluster/cman/metadata.xml b/sys-cluster/cman/metadata.xml
new file mode 100644
index 00000000000..13ca99f343a
--- /dev/null
+++ b/sys-cluster/cman/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <longdescription>Cluster Manager</longdescription>
+</pkgmetadata>
diff --git a/sys-cluster/corosync/Manifest b/sys-cluster/corosync/Manifest
new file mode 100644
index 00000000000..dee0a62ad3c
--- /dev/null
+++ b/sys-cluster/corosync/Manifest
@@ -0,0 +1,5 @@
+DIST corosync-1.3.0.tar.gz 683458 SHA256 4f9e399befcb595a1671f7ddb54dbf53e1faad6416da1415e2d787e6d2eb94a5 SHA512 30c8b6f3f8b82101e2cf65f2ecd2dd43f6dd2ab79585e713f23786be7732707395c161d1a57c7401dd05f4751ccc051ccaab81461be9bc964ef0543ef4699114 WHIRLPOOL 42c32e3d3fa05ea7bfcce7b930d5da5c27aef1454e5ba21a97f57f8f6035341439ce97917e20bc9f19f4226f0bdc124e4ffc7ee375c78617deca804a6414cbd3
+DIST corosync-1.3.5.tar.gz 698897 SHA256 7177914dff0ee16ace7a93f566c4fab06ea79400886d4d095e105a4b6bae1cd1 SHA512 74920fed67af72517076d5a85688f59f3ef81b4aa773147a96f58cbd57b3b150365b7eea4ef14c4e43c0961d9d9939d734526318b1af462e22329077a0cdbc3e WHIRLPOOL 1b66ec3caafb3623335f1eb6f8dedb04d54baffff5e26531319f4fcd9e69b7ec4d186118da2919eda6fa96edd5769a35e11cf258e4ad64fda504c465001753f3
+DIST corosync-1.4.7.tar.gz 420596 SHA256 89d82641e3ddf28d906b74c7fd220844d617a8415bf5e24802abfbb09acd905f SHA512 275a4372cac13789d93e224e4a7853953d6111afc534f9e897deaf064d5d96bb0db932a02a9212b5a0d2ca53d3f56133073f519460a9ca3573f5403642db34e1 WHIRLPOOL 7b7a2e6c7e032196099dcc827c6b343bb72c803886d005c4dee6ae402f62cc1862a276575edcbb3bbcfa248d51788a6d5953265e0d911cbe9174fd7d64170906
+DIST corosync-2.3.3.tar.gz 411784 SHA256 36a13f50e5f653837ab84e91676f001c2aedbc81ea84d3c7e017e740ea6f5a0a SHA512 66b479b2114641f02cd910f1bc3458948d5634b82e2019d7b1ea919f5bbb4817e91dddc33de061ff01dc4f12a3622b3418b7787e81a6f340d23043857cc9442f WHIRLPOOL 0cfdfcebf0956b420b81e6d9e04a12bdfbe639d07f793037f3ab7ee733508a1d48c53a00edcb78fab5700e00db07e150c1b4c12440394f1496d29238ba4615b5
+DIST corosync-2.3.4.tar.gz 420184 SHA256 e5e9ee995dfabba4d2347f7d9a5ff85bde1e62f96e1c79dbd7022be2c5b425f4 SHA512 30914552b8af69ce37a5ea98f17a41f30fa01204ca8beee8218d94b8421769504b90c8e62f1e7222afb6429ead8a2d09ca36e71461c767a2b9bf662637f78bb0 WHIRLPOOL 39338ae185c7b97ca33d948f806f720bd9296bbbbff605b1bbd0a2eb6c595c5dee37ebe144d51eca0a049a0d0fa874c93b7110b222adc19008b1469d827be282
diff --git a/sys-cluster/corosync/corosync-1.3.0.ebuild b/sys-cluster/corosync/corosync-1.3.0.ebuild
new file mode 100644
index 00000000000..c4f6f5c4cef
--- /dev/null
+++ b/sys-cluster/corosync/corosync-1.3.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit base autotools
+
+DESCRIPTION="OSI Certified implementation of a complete cluster engine"
+HOMEPAGE="http://www.corosync.org/"
+SRC_URI="ftp://ftp:${PN}.org@${PN}.org/downloads/${P}/${P}.tar.gz"
+
+LICENSE="BSD-2 public-domain"
+SLOT="0"
+KEYWORDS="amd64 hppa x86"
+IUSE="doc infiniband ssl"
+
+RDEPEND="!sys-cluster/heartbeat
+ ssl? ( dev-libs/nss )
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( sys-apps/groff )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-docs.patch"
+)
+
+DOCS=( "README.recovery" "README.devmap" "SECURITY" "TODO" "AUTHORS" )
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ # appends lib to localstatedir automatically
+ # FIXME: install both static and shared libs
+ econf \
+ --localstatedir=/var \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable ssl nss) \
+ $(use_enable infiniband rdma)
+}
+
+src_install() {
+ base_src_install
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} || die
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN} || die
+
+ keepdir /var/lib/corosync
+}
diff --git a/sys-cluster/corosync/corosync-1.3.5.ebuild b/sys-cluster/corosync/corosync-1.3.5.ebuild
new file mode 100644
index 00000000000..42e345bbd1e
--- /dev/null
+++ b/sys-cluster/corosync/corosync-1.3.5.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base autotools
+
+DESCRIPTION="OSI Certified implementation of a complete cluster engine"
+HOMEPAGE="http://www.corosync.org/"
+SRC_URI="ftp://ftp:${PN}.org@${PN}.org/downloads/${P}/${P}.tar.gz"
+
+LICENSE="BSD-2 public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86 ~x86-fbsd"
+IUSE="doc infiniband ssl static-libs"
+
+RDEPEND="!sys-cluster/heartbeat
+ ssl? ( dev-libs/nss )
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( sys-apps/groff )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-docs.patch"
+)
+
+DOCS=( README.recovery README.devmap SECURITY TODO AUTHORS )
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ # appends lib to localstatedir automatically
+ # FIXME: install just shared libs --disable-static does not work
+ econf \
+ --localstatedir=/var \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable ssl nss) \
+ $(use_enable infiniband rdma)
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ keepdir /var/lib/corosync
+ use static-libs || rm -rf "${D}"/usr/$(get_libdir)/*.a || die
+}
diff --git a/sys-cluster/corosync/corosync-1.4.7.ebuild b/sys-cluster/corosync/corosync-1.4.7.ebuild
new file mode 100644
index 00000000000..988f02a2733
--- /dev/null
+++ b/sys-cluster/corosync/corosync-1.4.7.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools base
+
+MY_TREE="bf8ff17"
+
+DESCRIPTION="OSI Certified implementation of a complete cluster engine"
+HOMEPAGE="http://www.corosync.org/"
+SRC_URI="https://github.com/corosync/corosync/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD-2 public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86 ~x86-fbsd"
+IUSE="doc infiniband ssl static-libs"
+
+RDEPEND="!sys-cluster/heartbeat
+ ssl? ( dev-libs/nss )
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( sys-apps/groff )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-docs.patch"
+)
+
+DOCS=( README.recovery README.devmap SECURITY TODO AUTHORS )
+
+S="${WORKDIR}/${PN}-${PN}-${MY_TREE}"
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ # appends lib to localstatedir automatically
+ # FIXME: install just shared libs --disable-static does not work
+ econf \
+ --localstatedir=/var \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable ssl nss) \
+ $(use_enable infiniband rdma)
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ rm "${D}"/etc/init.d/corosync-notifyd || die
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ keepdir /var/lib/corosync
+ use static-libs || rm -rf "${D}"/usr/$(get_libdir)/*.a || die
+}
diff --git a/sys-cluster/corosync/corosync-2.3.3.ebuild b/sys-cluster/corosync/corosync-2.3.3.ebuild
new file mode 100644
index 00000000000..358dea9ea60
--- /dev/null
+++ b/sys-cluster/corosync/corosync-2.3.3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools base
+
+MY_TREE="32ec81c"
+
+DESCRIPTION="OSI Certified implementation of a complete cluster engine"
+HOMEPAGE="http://www.corosync.org/"
+SRC_URI="https://github.com/corosync/corosync/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD-2 public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="doc infiniband static-libs"
+
+# TODO: support those new configure flags
+# --enable-watchdog : Watchdog support
+# --enable-augeas : Install the augeas lens for corosync.conf
+# --enable-snmp : SNMP protocol support
+# --enable-xmlconf : XML configuration support
+# --enable-systemd : Install systemd service files
+RDEPEND="!sys-cluster/heartbeat
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )
+ dev-libs/nss
+ >=sys-cluster/libqb-0.14.4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( sys-apps/groff )"
+
+PATCHES=( "${FILESDIR}/${PN}-2.0.0-docs.patch" )
+
+DOCS=( README.recovery SECURITY TODO AUTHORS )
+
+S="${WORKDIR}/${PN}-${PN}-${MY_TREE}"
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ # appends lib to localstatedir automatically
+ # FIXME: install just shared libs --disable-static does not work
+ econf \
+ --localstatedir=/var \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable infiniband rdma)
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ rm "${D}"/etc/init.d/corosync-notifyd || die
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ keepdir /var/lib/corosync
+ use static-libs || rm -rf "${D}"/usr/$(get_libdir)/*.a || die
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} < 2.0 ]]; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "Migrating from a previous version of corosync can be dangerous !"
+ ewarn " "
+ ewarn "Make sure you backup your cluster configuration before proceeding"
+ ewarn " "
+ fi
+}
diff --git a/sys-cluster/corosync/corosync-2.3.4-r1.ebuild b/sys-cluster/corosync/corosync-2.3.4-r1.ebuild
new file mode 100644
index 00000000000..1b4b0cffcb1
--- /dev/null
+++ b/sys-cluster/corosync/corosync-2.3.4-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools base
+
+MY_TREE="4dc01e3"
+
+DESCRIPTION="OSI Certified implementation of a complete cluster engine"
+HOMEPAGE="http://www.corosync.org/"
+SRC_URI="https://github.com/corosync/corosync/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD-2 public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="doc infiniband static-libs"
+
+# TODO: support those new configure flags
+# --enable-watchdog : Watchdog support
+# --enable-augeas : Install the augeas lens for corosync.conf
+# --enable-snmp : SNMP protocol support
+# --enable-xmlconf : XML configuration support
+# --enable-systemd : Install systemd service files
+RDEPEND="!sys-cluster/heartbeat
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )
+ dev-libs/nss
+ >=sys-cluster/libqb-0.14.4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( sys-apps/groff )"
+
+PATCHES=( "${FILESDIR}/${PN}-2.3.4-docs.patch" )
+
+DOCS=( README.recovery SECURITY AUTHORS )
+
+S="${WORKDIR}/${PN}-${PN}-${MY_TREE}"
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ # appends lib to localstatedir automatically
+ # FIXME: install just shared libs --disable-static does not work
+ econf \
+ --localstatedir=/var \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable infiniband rdma)
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ rm "${D}"/etc/init.d/corosync-notifyd || die
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ keepdir /var/lib/corosync
+ use static-libs || rm -rf "${D}"/usr/$(get_libdir)/*.{,l}a || die
+
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} < 2.0 ]]; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "Migrating from a previous version of corosync can be dangerous !"
+ ewarn " "
+ ewarn "Make sure you backup your cluster configuration before proceeding"
+ ewarn " "
+ fi
+}
diff --git a/sys-cluster/corosync/files/corosync-2.0.0-docs.patch b/sys-cluster/corosync/files/corosync-2.0.0-docs.patch
new file mode 100644
index 00000000000..66eacb821e5
--- /dev/null
+++ b/sys-cluster/corosync/files/corosync-2.0.0-docs.patch
@@ -0,0 +1,34 @@
+--- a/configure.ac 2012-10-29 14:34:48.200093085 +0100
++++ b/configure.ac 2012-10-29 14:37:05.997077034 +0100
+@@ -591,7 +591,7 @@
+ INCLUDE_DIRS="$INCLUDE_DIRS -I\$(top_builddir)/include/corosync -I\$(top_srcdir)/include/corosync"
+
+ # final build of *FLAGS
+-CFLAGS="$ENV_CFLAGS $lt_prog_compiler_pic $SEC_FLAGS $OPT_CFLAGS $GDB_FLAGS \
++CFLAGS="$ENV_CFLAGS $lt_prog_compiler_pic $OS_CFLAGS \
+ $COVERAGE_CFLAGS $EXTRA_WARNINGS \
+ $WERROR_CFLAGS $NSS_CFLAGS $LIBQB_CFLAGS \
+ $SNMP_INCLUDES"
+@@ -616,7 +616,10 @@
+ AM_CONDITIONAL(AUGTOOL, test -n "${AUGTOOL}")
+ AC_SUBST([NSS_LDFLAGS])
+
+-AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}")
++AC_ARG_ENABLE([doc],
++ AS_HELP_STRING([--enable-doc],[Build html documentation])
++)
++AM_CONDITIONAL(BUILD_HTML_DOCS, [test -n "${GROFF}" && test "x$enable_doc" = "xyes"] )
+
+ AC_SUBST([LINT_FLAGS])
+
+--- a/Makefile.am 2012-10-29 14:34:48.200093085 +0100
++++ b/Makefile.am 2012-10-29 14:37:16.236853385 +0100
+@@ -48,8 +48,6 @@
+ autoheader automake autoconf test_lense.sh \
+ autoscan.log configure.scan ltmain.sh
+
+-dist_doc_DATA = LICENSE INSTALL README.recovery SECURITY TODO AUTHORS
+-
+ SUBDIRS = include common_lib lib exec tools test cts pkgconfig \
+ man init conf qdevices
+
diff --git a/sys-cluster/corosync/files/corosync-2.3.4-docs.patch b/sys-cluster/corosync/files/corosync-2.3.4-docs.patch
new file mode 100644
index 00000000000..53dbd7d29c7
--- /dev/null
+++ b/sys-cluster/corosync/files/corosync-2.3.4-docs.patch
@@ -0,0 +1,23 @@
+--- a/configure.ac 2014-12-02 15:21:35.511819113 +0100
++++ b/configure.ac 2014-12-02 15:23:02.162487868 +0100
+@@ -655,7 +655,7 @@
+ INCLUDE_DIRS="$INCLUDE_DIRS -I\$(top_builddir)/include/corosync -I\$(top_srcdir)/include/corosync"
+
+ # final build of *FLAGS
+-CFLAGS="$ENV_CFLAGS $lt_prog_compiler_pic $SEC_FLAGS $OPT_CFLAGS $GDB_FLAGS \
++CFLAGS="$ENV_CFLAGS $lt_prog_compiler_pic $OS_CFLAGS \
+ $COVERAGE_CFLAGS $EXTRA_WARNINGS \
+ $WERROR_CFLAGS $NSS_CFLAGS $LIBQB_CFLAGS \
+ $SNMP_INCLUDES"
+@@ -685,7 +685,10 @@
+ AM_CONDITIONAL(AUGTOOL, test -n "${AUGTOOL}")
+ AC_SUBST([NSS_LDFLAGS])
+
+-AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}")
++AC_ARG_ENABLE([doc],
++ AS_HELP_STRING([--enable-doc],[Build html documentation])
++)
++AM_CONDITIONAL(BUILD_HTML_DOCS, [test -n "${GROFF}" && test "x$enable_doc" = "xyes"] )
+
+ AC_SUBST([LINT_FLAGS])
+
diff --git a/sys-cluster/corosync/files/corosync-docs.patch b/sys-cluster/corosync/files/corosync-docs.patch
new file mode 100644
index 00000000000..198db980ae4
--- /dev/null
+++ b/sys-cluster/corosync/files/corosync-docs.patch
@@ -0,0 +1,37 @@
+Make docs optional
+
+--- configure.ac
++++ configure.ac
+@@ -432,7 +432,7 @@
+ fi
+
+ # final build of *FLAGS
+-CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS $OS_CFLAGS \
++CFLAGS="$ENV_CFLAGS $OS_CFLAGS \
+ $COVERAGE_CFLAGS $EXTRA_WARNINGS $WERROR_CFLAGS $NSS_CFLAGS"
+ CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $OS_CPPFLAGS"
+ LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS"
+@@ -458,7 +458,10 @@
+ AC_SUBST([DARWIN_OPTS])
+ AC_SUBST([SOLARIS_OPTS])
+
+-AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}")
++AC_ARG_ENABLE([doc],
++ AS_HELP_STRING([--enable-doc],[Build html documentation])
++)
++AM_CONDITIONAL(BUILD_HTML_DOCS, [test -n "${GROFF}" && test "x$enable_doc" = "xyes"] )
+
+ AC_SUBST([LINT_FLAGS])
+
+--- Makefile.am
++++ Makefile.am
+@@ -41,9 +41,6 @@
+ config.guess config.sub missing install-sh \
+ autoheader automake autoconf
+
+-dist_doc_DATA = LICENSE INSTALL README.devmap \
+- README.recovery SECURITY TODO AUTHORS
+-
+ corosysconfdir = ${COROSYSCONFDIR}
+
+ corosysconf_DATA = conf/corosync.conf.example
diff --git a/sys-cluster/corosync/files/corosync.initd b/sys-cluster/corosync/files/corosync.initd
new file mode 100644
index 00000000000..b88f11b1d6d
--- /dev/null
+++ b/sys-cluster/corosync/files/corosync.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ configtest || return 1
+ ebegin "Starting Corosync Cluster Engine"
+ start-stop-daemon --start -q --exec /usr/sbin/corosync \
+ --pidfile /var/run/corosync.pid --make-pidfile --background \
+ -- -f
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Corosync Cluster Engine"
+ start-stop-daemon --stop -q --pidfile /var/run/corosync.pid
+ eend $?
+}
+
+configtest() {
+ ebegin "Checking corosync configuration"
+ test -f /etc/corosync/corosync.conf
+ eend $? "failed, please create the corosync configuration file"
+}
diff --git a/sys-cluster/corosync/files/corosync.logrotate b/sys-cluster/corosync/files/corosync.logrotate
new file mode 100644
index 00000000000..6c0952dcb52
--- /dev/null
+++ b/sys-cluster/corosync/files/corosync.logrotate
@@ -0,0 +1,5 @@
+/var/log/cluster/corosync.log {
+ missingok
+ notifempty
+ sharedscripts
+}
diff --git a/sys-cluster/corosync/metadata.xml b/sys-cluster/corosync/metadata.xml
new file mode 100644
index 00000000000..08d3ba8b730
--- /dev/null
+++ b/sys-cluster/corosync/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>cardoe@gentoo.org</email>
+ <name>Doug Goldstein</name>
+ </maintainer>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin Johnson</name>
+ </maintainer>
+ <use>
+ <flag name="infiniband">Enable Infiniband RDMA transport support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">corosync/corosync</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/crmsh/Manifest b/sys-cluster/crmsh/Manifest
new file mode 100644
index 00000000000..021059b0817
--- /dev/null
+++ b/sys-cluster/crmsh/Manifest
@@ -0,0 +1 @@
+DIST crmsh-2.1.1.tar.gz 733302 SHA256 11dea68a2fea9d069ff31a35e4ab2fc29b279dbe1fa0d1958f942830400bdb7e SHA512 556190e4e8da009d5f84f6356eeae2f5a18d8ca19d8c384c01d4d8526f7a20bb9545a08a6abe7cb6d9c33d9ae62ba0ea5df9ff0ae90341a53d9f7b201f5788ae WHIRLPOOL 731339a7309b6351f1227b9b83f35d172bf8cdc4a8cde7884b43c6f0169746ad60932ded43739a6070936ef44fd518f2d1a90a61e82be191e9c6a855fcc24caf
diff --git a/sys-cluster/crmsh/crmsh-2.1.1.ebuild b/sys-cluster/crmsh/crmsh-2.1.1.ebuild
new file mode 100644
index 00000000000..8dda3f2c593
--- /dev/null
+++ b/sys-cluster/crmsh/crmsh-2.1.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+AUTOTOOLS_AUTORECONF=true
+KEYWORDS=""
+SRC_URI=""
+
+if [[ ${PV} == *9999 ]]; then
+ EGIT_REPO_URI="git://github.com/crmsh/crmsh"
+ inherit git-2
+ S="${WORKDIR}/${PN}-${MY_TREE}"
+else
+ SRC_URI="https://github.com/crmsh/crmsh/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~hppa ~x86"
+fi
+
+inherit autotools-utils python-r1
+
+DESCRIPTION="Pacemaker command line interface for management and configuration"
+HOMEPAGE="http://crmsh.github.io/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ >=sys-cluster/pacemaker-1.1.8"
+RDEPEND="${DEPEND}
+ dev-python/lxml[${PYTHON_USEDEP}]"
+
+src_prepare() {
+ sed \
+ -e 's@CRM_CACHE_DIR=${localstatedir}/cache/crm@CRM_CACHE_DIR=${localstatedir}/crmsh@g' \
+ -i configure.ac || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ python_foreach_impl autotools-utils_src_configure
+}
+
+src_compile() {
+ python_foreach_impl autotools-utils_src_compile
+}
+
+src_install() {
+ python_foreach_impl autotools-utils_src_install
+ python_replicate_script "${ED}"/usr/sbin/crm
+}
diff --git a/sys-cluster/crmsh/metadata.xml b/sys-cluster/crmsh/metadata.xml
new file mode 100644
index 00000000000..3aadfb53ff2
--- /dev/null
+++ b/sys-cluster/crmsh/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <upstream>
+ <remote-id type="github">crmsh/crmsh</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/csync2/Manifest b/sys-cluster/csync2/Manifest
new file mode 100644
index 00000000000..3d811b314da
--- /dev/null
+++ b/sys-cluster/csync2/Manifest
@@ -0,0 +1,2 @@
+DIST csync2-1.34.tar.gz 222765 SHA256 32b250dd4a0353f71015c5c3961174b975dd5e799e4a084e8f6d00792bd8c833 SHA512 a24154446740f3362c10a23d526c29e96292f2ad56a9ed2f11ca0a6d7afed3730d0e96f8ebc2c6cdcc17031aa0e368f6ba93084ad3cf5f4828fbc279e6f004d8 WHIRLPOOL 795be9f3a5451a065993911ff84215cf144ba5d5fd9c81060491f6c247937c96f1a7a362b2547ffa6753201d5afd31fb56afb3edf363210f6c53bcdb55f16233
+DIST csync2-2.0.tar.gz 411013 SHA256 11cb37380fb185bce0c22b804fec9b01c385d9d83cc528cfd48d748453834fa2 SHA512 f91fd222f67affe9634471d341b43ff67854a6ed25b620301a454e98a79a9fb80b2a66eb8713546758fd08300d52751e5ca7472c696daa20ee11779b87a830f8 WHIRLPOOL 6cbe49b5dd36d455d2c2b15089cc8e766aa3f9ebc2d5ebbd0528379123ae280850972b07279075a38dc328391633bd63f1a5dc8a2403b1d4faac295e27d1d920
diff --git a/sys-cluster/csync2/csync2-1.34-r2.ebuild b/sys-cluster/csync2/csync2-1.34-r2.ebuild
new file mode 100644
index 00000000000..5d3672ebed5
--- /dev/null
+++ b/sys-cluster/csync2/csync2-1.34-r2.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Cluster synchronization tool"
+HOMEPAGE="http://oss.linbit.com/csync2/"
+SRC_URI="http://oss.linbit.com/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+
+IUSE="ssl xinetd"
+
+RDEPEND=">=net-libs/librsync-0.9.5
+ =dev-db/sqlite-2.8*
+ ssl? ( >=net-libs/gnutls-2.7.3 )
+ xinetd? ( sys-apps/xinetd )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+SLOT="0"
+
+src_prepare() {
+ if use ssl; then
+ epatch "${FILESDIR}"/${P}-gnutls.patch #274213
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --sysconfdir=/etc/csync2 \
+ $(use_enable ssl gnutls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/${PN}.xinetd ${PN}
+ fi
+
+ keepdir /var/lib/csync2
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO csync2_locheck.sh
+}
+
+pkg_postinst() {
+ if use xinetd; then
+ echo
+ einfo "After you setup your conf file, edit the xinetd"
+ einfo "entry in /etc/xinetd.d/${PN} to enable, then"
+ einfo "start xinetd: /etc/init.d/xinetd start"
+ fi
+ echo
+ einfo "To add ${PN} to your services file"
+ if use ssl; then
+ einfo "and to generate the SSL certificates,"
+ fi
+ einfo "just run this command after you install:"
+ echo
+ einfo "emerge --config =${PF}"
+ echo
+ einfo "Now you can find csync2.cfg under /etc/${PN}"
+ einfo "Please move you old config to the right location"
+ echo
+ einfo "To start csync2 as a standalone daemon, simply run:"
+ einfo "/etc/init.d/csync2 start"
+ echo
+}
+
+pkg_config() {
+ einfo "Updating ${ROOT}/etc/services"
+ { grep -v ^${PN} "${ROOT}"/etc/services;
+ echo "csync2 30865/tcp"
+ } > "${ROOT}"/etc/services.new
+ mv -f "${ROOT}"/etc/services.new "${ROOT}"/etc/services
+
+ if use ssl; then
+ if [ ! -f "${ROOT}"/etc/${PN}/csync2_ssl_key.pem ]; then
+ einfo "Creating default certificate in ${ROOT}/etc/${PN}"
+
+ openssl genrsa -out "${ROOT}"/etc/${PN}/csync2_ssl_key.pem 1024 &> /dev/null
+
+ yes '' | \
+ openssl req -new \
+ -key "${ROOT}"/etc/${PN}/csync2_ssl_key.pem \
+ -out "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr \
+ &> "${ROOT}"/dev/null
+
+ openssl x509 -req -days 600 \
+ -in "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr \
+ -signkey "${ROOT}"/etc/${PN}/csync2_ssl_key.pem \
+ -out "${ROOT}"/etc/${PN}/csync2_ssl_cert.pem \
+ &> "${ROOT}"/dev/null
+
+ rm "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr
+ chmod 400 "${ROOT}"/etc/${PN}/csync2_ssl_key.pem "${ROOT}"/etc/${PN}/csync2_ssl_cert.pem
+ fi
+ fi
+}
diff --git a/sys-cluster/csync2/csync2-2.0.ebuild b/sys-cluster/csync2/csync2-2.0.ebuild
new file mode 100644
index 00000000000..3c9e9370fbe
--- /dev/null
+++ b/sys-cluster/csync2/csync2-2.0.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Cluster synchronization tool"
+HOMEPAGE="http://oss.linbit.com/csync2/"
+SRC_URI="http://oss.linbit.com/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="mysql postgres sqlite ssl xinetd"
+
+RDEPEND=">=net-libs/librsync-0.9.5
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( >=dev-db/sqlite-3.0 )
+ ssl? ( >=net-libs/gnutls-2.7.3 )
+ xinetd? ( sys-apps/xinetd )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+REQUIRED_USE="|| ( mysql postgres sqlite )"
+SLOT="0"
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${P} \
+ --localstatedir=/var \
+ --sysconfdir=/etc/csync2 \
+ $(use_enable mysql) \
+ $(use_enable postgres) \
+ $(use_enable sqlite sqlite3) \
+ $(use_enable ssl gnutls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/${PN}.xinetd ${PN}
+ fi
+
+ keepdir /var/lib/csync2
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+}
+
+pkg_postinst() {
+ if use xinetd; then
+ echo
+ einfo "After you setup your conf file, edit the xinetd"
+ einfo "entry in /etc/xinetd.d/${PN} to enable, then"
+ einfo "start xinetd: /etc/init.d/xinetd start"
+ fi
+ echo
+ einfo "To add ${PN} to your services file"
+ if use ssl; then
+ einfo "and to generate the SSL certificates,"
+ fi
+ einfo "just run this command after you install:"
+ echo
+ einfo "emerge --config =${PF}"
+ echo
+ einfo "Now you can find csync2.cfg under /etc/${PN}"
+ einfo "Please move you old config to the right location"
+ echo
+ einfo "To start csync2 as a standalone daemon, simply run:"
+ einfo "/etc/init.d/csync2 start"
+ echo
+}
+
+pkg_config() {
+ einfo "Updating ${ROOT}/etc/services"
+ { grep -v ^${PN} "${ROOT}"/etc/services;
+ echo "csync2 30865/tcp"
+ } > "${ROOT}"/etc/services.new
+ mv -f "${ROOT}"/etc/services.new "${ROOT}"/etc/services
+
+ if use ssl; then
+ if [ ! -f "${ROOT}"/etc/${PN}/csync2_ssl_key.pem ]; then
+ einfo "Creating default certificate in ${ROOT}/etc/${PN}"
+
+ openssl genrsa -out "${ROOT}"/etc/${PN}/csync2_ssl_key.pem 1024 &> /dev/null
+
+ yes '' | \
+ openssl req -new \
+ -key "${ROOT}"/etc/${PN}/csync2_ssl_key.pem \
+ -out "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr \
+ &> "${ROOT}"/dev/null
+
+ openssl x509 -req -days 600 \
+ -in "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr \
+ -signkey "${ROOT}"/etc/${PN}/csync2_ssl_key.pem \
+ -out "${ROOT}"/etc/${PN}/csync2_ssl_cert.pem \
+ &> "${ROOT}"/dev/null
+
+ rm "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr
+ chmod 400 "${ROOT}"/etc/${PN}/csync2_ssl_key.pem "${ROOT}"/etc/${PN}/csync2_ssl_cert.pem
+ fi
+ fi
+}
diff --git a/sys-cluster/csync2/files/csync2-1.34-gnutls.patch b/sys-cluster/csync2/files/csync2-1.34-gnutls.patch
new file mode 100644
index 00000000000..64af5229be7
--- /dev/null
+++ b/sys-cluster/csync2/files/csync2-1.34-gnutls.patch
@@ -0,0 +1,279 @@
+Fixes build with >=net-libs/gnutls-2.7.1
+
+http://bugs.gentoo.org/show_bug.cgi?id=274213
+
+--- conn.c
++++ conn.c
+@@ -32,7 +32,7 @@
+
+ #ifdef HAVE_LIBGNUTLS_OPENSSL
+ # include <gnutls/gnutls.h>
+-# include <gnutls/openssl.h>
++# include <gnutls/x509.h>
+ #endif
+
+ int conn_fd_in = -1;
+@@ -42,9 +42,8 @@
+ #ifdef HAVE_LIBGNUTLS_OPENSSL
+ int csync_conn_usessl = 0;
+
+-SSL_METHOD *conn_ssl_meth;
+-SSL_CTX *conn_ssl_ctx;
+-SSL *conn_ssl;
++static gnutls_session_t conn_tls_session;
++static gnutls_certificate_credentials_t conn_x509_cred;
+ #endif
+
+ int conn_open(const char *peername)
+@@ -112,41 +111,104 @@
+
+ #ifdef HAVE_LIBGNUTLS_OPENSSL
+
+-char *ssl_keyfile = ETCDIR "/csync2_ssl_key.pem";
+-char *ssl_certfile = ETCDIR "/csync2_ssl_cert.pem";
++static void ssl_log(int level, const char* msg)
++{ csync_debug(level, "%s", msg); }
++
++static const char *ssl_keyfile = ETCDIR "/csync2_ssl_key.pem";
++static const char *ssl_certfile = ETCDIR "/csync2_ssl_cert.pem";
+
+ int conn_activate_ssl(int server_role)
+ {
+- static int sslinit = 0;
++ gnutls_alert_description_t alrt;
++ int err;
+
+ if (csync_conn_usessl)
+ return 0;
+
+- if (!sslinit) {
+- SSL_load_error_strings();
+- SSL_library_init();
+- sslinit=1;
++ gnutls_global_init();
++ gnutls_global_set_log_function(ssl_log);
++ gnutls_global_set_log_level(10);
++
++ gnutls_certificate_allocate_credentials(&conn_x509_cred);
++
++ err = gnutls_certificate_set_x509_key_file(conn_x509_cred, ssl_certfile, ssl_keyfile, GNUTLS_X509_FMT_PEM);
++ if(err != GNUTLS_E_SUCCESS) {
++ gnutls_certificate_free_credentials(conn_x509_cred);
++ gnutls_global_deinit();
++
++ csync_fatal(
++ "SSL: failed to use key file %s and/or certificate file %s: %s (%s)\n",
++ ssl_keyfile,
++ ssl_certfile,
++ gnutls_strerror(err),
++ gnutls_strerror_name(err)
++ );
+ }
+
+- conn_ssl_meth = (server_role ? SSLv23_server_method : SSLv23_client_method)();
+- conn_ssl_ctx = SSL_CTX_new(conn_ssl_meth);
+-
+- if (SSL_CTX_use_PrivateKey_file(conn_ssl_ctx, ssl_keyfile, SSL_FILETYPE_PEM) <= 0)
+- csync_fatal("SSL: failed to use key file %s.\n", ssl_keyfile);
+-
+- if (SSL_CTX_use_certificate_file(conn_ssl_ctx, ssl_certfile, SSL_FILETYPE_PEM) <= 0)
+- csync_fatal("SSL: failed to use certificate file %s.\n", ssl_certfile);
++ if(server_role) {
++ gnutls_certificate_free_cas(conn_x509_cred);
+
+- if (! (conn_ssl = SSL_new(conn_ssl_ctx)) )
+- csync_fatal("Creating a new SSL handle failed.\n");
+-
+- gnutls_certificate_server_set_request(conn_ssl->gnutls_state, GNUTLS_CERT_REQUIRE);
++ if(gnutls_certificate_set_x509_trust_file(conn_x509_cred, ssl_certfile, GNUTLS_X509_FMT_PEM) < 1) {
++ gnutls_certificate_free_credentials(conn_x509_cred);
++ gnutls_global_deinit();
++
++ csync_fatal(
++ "SSL: failed to use certificate file %s as CA.\n",
++ ssl_certfile
++ );
++ }
++ } else
++ gnutls_certificate_free_ca_names(conn_x509_cred);
+
+- SSL_set_rfd(conn_ssl, conn_fd_in);
+- SSL_set_wfd(conn_ssl, conn_fd_out);
++ gnutls_init(&conn_tls_session, (server_role ? GNUTLS_SERVER : GNUTLS_CLIENT));
++ gnutls_priority_set_direct(conn_tls_session, "PERFORMANCE", NULL);
++ gnutls_credentials_set(conn_tls_session, GNUTLS_CRD_CERTIFICATE, conn_x509_cred);
++
++ if(server_role) {
++ gnutls_certificate_send_x509_rdn_sequence(conn_tls_session, 0);
++ gnutls_certificate_server_set_request(conn_tls_session, GNUTLS_CERT_REQUIRE);
++ }
+
+- if ( (server_role ? SSL_accept : SSL_connect)(conn_ssl) < 1 )
+- csync_fatal("Establishing SSL connection failed.\n");
++ gnutls_transport_set_ptr2(
++ conn_tls_session,
++ (gnutls_transport_ptr_t)conn_fd_in,
++ (gnutls_transport_ptr_t)conn_fd_out
++ );
++
++ err = gnutls_handshake(conn_tls_session);
++ switch(err) {
++ case GNUTLS_E_SUCCESS:
++ break;
++
++ case GNUTLS_E_WARNING_ALERT_RECEIVED:
++ alrt = gnutls_alert_get(conn_tls_session);
++ fprintf(
++ csync_debug_out,
++ "SSL: warning alert received from peer: %d (%s).\n",
++ alrt, gnutls_alert_get_name(alrt)
++ );
++ break;
++
++ case GNUTLS_E_FATAL_ALERT_RECEIVED:
++ alrt = gnutls_alert_get(conn_tls_session);
++ fprintf(
++ csync_debug_out,
++ "SSL: fatal alert received from peer: %d (%s).\n",
++ alrt, gnutls_alert_get_name(alrt)
++ );
++
++ default:
++ gnutls_bye(conn_tls_session, GNUTLS_SHUT_RDWR);
++ gnutls_deinit(conn_tls_session);
++ gnutls_certificate_free_credentials(conn_x509_cred);
++ gnutls_global_deinit();
++
++ csync_fatal(
++ "SSL: handshake failed: %s (%s)\n",
++ gnutls_strerror(err),
++ gnutls_strerror_name(err)
++ );
++ }
+
+ csync_conn_usessl = 1;
+
+@@ -155,15 +217,15 @@
+
+ int conn_check_peer_cert(const char *peername, int callfatal)
+ {
+- const X509 *peercert;
++ const gnutls_datum_t *peercerts;
++ unsigned npeercerts;
+ int i, cert_is_ok = -1;
+
+ if (!csync_conn_usessl)
+ return 1;
+
+- peercert = SSL_get_peer_certificate(conn_ssl);
+-
+- if (!peercert || peercert->size <= 0) {
++ peercerts = gnutls_certificate_get_peers(conn_tls_session, &npeercerts);
++ if(peercerts == NULL || npeercerts == 0) {
+ if (callfatal)
+ csync_fatal("Peer did not provide an SSL X509 cetrificate.\n");
+ csync_debug(1, "Peer did not provide an SSL X509 cetrificate.\n");
+@@ -171,11 +233,11 @@
+ }
+
+ {
+- char certdata[peercert->size*2 + 1];
++ char certdata[2*peercerts[0].size + 1];
+
+- for (i=0; i<peercert->size; i++)
+- sprintf(certdata+i*2, "%02X", peercert->data[i]);
+- certdata[peercert->size*2] = 0;
++ for (i=0; i<peercerts[0].size; i++)
++ sprintf(&certdata[2*i], "%02X", peercerts[0].data[i]);
++ certdata[2*i] = 0;
+
+ SQL_BEGIN("Checking peer x509 certificate.",
+ "SELECT certdata FROM x509_cert WHERE peername = '%s'",
+@@ -222,7 +284,12 @@
+ if ( !conn_clisok ) return -1;
+
+ #ifdef HAVE_LIBGNUTLS_OPENSSL
+- if ( csync_conn_usessl ) SSL_free(conn_ssl);
++ if ( csync_conn_usessl ) {
++ gnutls_bye(conn_tls_session, GNUTLS_SHUT_RDWR);
++ gnutls_deinit(conn_tls_session);
++ gnutls_certificate_free_credentials(conn_x509_cred);
++ gnutls_global_deinit();
++ }
+ #endif
+
+ if ( conn_fd_in != conn_fd_out) close(conn_fd_in);
+@@ -239,7 +306,7 @@
+ {
+ #ifdef HAVE_LIBGNUTLS_OPENSSL
+ if (csync_conn_usessl)
+- return SSL_read(conn_ssl, buf, count);
++ return gnutls_record_recv(conn_tls_session, buf, count);
+ else
+ #endif
+ return read(conn_fd_in, buf, count);
+@@ -251,7 +318,7 @@
+
+ #ifdef HAVE_LIBGNUTLS_OPENSSL
+ if (csync_conn_usessl)
+- return SSL_write(conn_ssl, buf, count);
++ return gnutls_record_send(conn_tls_session, buf, count);
+ else
+ #endif
+ {
+--- configure.ac
++++ configure.ac
+@@ -17,11 +17,10 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ # Process this file with autoconf to produce a configure script.
+-AC_INIT(csync2, 1.34, clifford@clifford.at)
++AC_INIT([csync2], [1.34], clifford@clifford.at)
+ AM_INIT_AUTOMAKE
+
+ AC_CONFIG_SRCDIR(csync2.c)
+-AM_CONFIG_HEADER(config.h)
+
+ # Use /etc and /var instead of $prefix/...
+ test "$localstatedir" = '${prefix}/var' && localstatedir=/var
+@@ -32,6 +31,7 @@
+ AC_PROG_INSTALL
+ AC_PROG_YACC
+ AM_PROG_LEX
++PKG_PROG_PKG_CONFIG
+
+ # Check for librsync.
+ AC_ARG_WITH([librsync-source],
+@@ -58,19 +58,10 @@
+
+ if test "$enable_gnutls" != no
+ then
+-
+- # Check for gnuTLS.
+- AM_PATH_LIBGNUTLS(1.0.0, , [ AC_MSG_ERROR([[gnutls not found; install gnutls, gnutls-openssl and libtasn1 packages for your system or run configure with --disable-gnutls]]) ])
+-
+- # This is a bloody hack for fedora core
+- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
+- LIBS="$LIBS $LIBGNUTLS_LIBS -ltasn1"
+-
+- # Check gnuTLS SSL compatibility lib.
+- AC_CHECK_LIB([gnutls-openssl], [SSL_new], , [AC_MSG_ERROR([[gnutls-openssl not found; install gnutls, gnutls-openssl and libtasn1 packages for your system or run configure with --disable-gnutls]])])
+-
++ PKG_CHECK_MODULES([LIBGNUTLS], [gnutls] , [AC_DEFINE(HAVE_LIBGNUTLS_OPENSSL, 1, [Define to 1 if GnuTLS is available])])
+ fi
+
++AM_CONFIG_HEADER([config.h])
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
+
+--- Makefile.am
++++ Makefile.am
+@@ -24,6 +24,8 @@
+ csync2_SOURCES = action.c cfgfile_parser.y cfgfile_scanner.l check.c \
+ checktxt.c csync2.c daemon.c db.c error.c getrealfn.c \
+ groups.c rsync.c update.c urlencode.c conn.c prefixsubst.c
++csync2_LDADD = @LIBGNUTLS_LIBS@
++csync2_CFLAGS = @LIBGNUTLS_CFLAGS@
+
+ AM_YFLAGS = -d
+ BUILT_SOURCES = cfgfile_parser.h
diff --git a/sys-cluster/csync2/files/csync2.initd b/sys-cluster/csync2/files/csync2.initd
new file mode 100755
index 00000000000..6509dbad12c
--- /dev/null
+++ b/sys-cluster/csync2/files/csync2.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PIDFILE=/var/run/csync2.pid
+BINARY=/usr/sbin/csync2
+
+start() {
+ ebegin "Starting csync2"
+ start-stop-daemon --start --pidfile "${PIDFILE}" -m -x ${BINARY} -b -- -ii
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping csync2"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
+
+restart() {
+ ebegin "Restarting csync2"
+ svc_stop
+ svc_start
+ eend $?
+}
diff --git a/sys-cluster/csync2/files/csync2.xinetd b/sys-cluster/csync2/files/csync2.xinetd
new file mode 100644
index 00000000000..d2a7adb8f5b
--- /dev/null
+++ b/sys-cluster/csync2/files/csync2.xinetd
@@ -0,0 +1,15 @@
+# default: on
+# description: csync2
+service csync2
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ group = root
+ server = /usr/sbin/csync2
+ server_args = -i
+ #log_on_failure += USERID
+ disable = yes
+ only_from = 192.168.199.3 192.168.199.4
+}
diff --git a/sys-cluster/csync2/metadata.xml b/sys-cluster/csync2/metadata.xml
new file mode 100644
index 00000000000..55dd68aadc9
--- /dev/null
+++ b/sys-cluster/csync2/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+</pkgmetadata>
diff --git a/sys-cluster/dlm-lib/Manifest b/sys-cluster/dlm-lib/Manifest
new file mode 100644
index 00000000000..d39a905e372
--- /dev/null
+++ b/sys-cluster/dlm-lib/Manifest
@@ -0,0 +1,2 @@
+DIST cluster-2.03.09.tar.gz 1784357 RMD160 9ac5c3fd0fece8ec17bd31d116c43b33612741d0 SHA1 c2cdbc657da2a9efde4b1e6d2657170e1c09b5b8 SHA256 b6d6f35f58b2f8628c369391e0fd01b1803af40029ec1e6ef88865dda38b855f
+DIST cluster-2.03.11.tar.gz 1790532 RMD160 5928da5a4402f0d96f316ce2e4fa7aaa7c2704a6 SHA1 2b817e87918a630ad50c1702b2a951ba35005cf5 SHA256 2597e7cbcbc6b272fd21aa2468f0810a097efd996128fcd672a786d106b1124d
diff --git a/sys-cluster/dlm-lib/dlm-lib-2.03.09.ebuild b/sys-cluster/dlm-lib/dlm-lib-2.03.09.ebuild
new file mode 100644
index 00000000000..e6c4644a7de
--- /dev/null
+++ b/sys-cluster/dlm-lib/dlm-lib-2.03.09.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils linux-mod multilib versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="General-purpose Distributed Lock Manager"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=sys-kernel/linux-headers-2.6.24
+ !sys-cluster/dlm-headers
+ !sys-cluster/dlm-kernel
+ "
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/${PN/-//}"
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --libdir="/usr/$(get_libdir)" \
+ --disable_kernel_check \
+ --kernel_src=${KERNEL_DIR} \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ --cmanlibdir="/usr/$(get_libdir)" \
+ --cmanincdir=/usr/include \
+ ) || die "configure problem"
+
+ #emake clean || die "clean problem"
+ emake -j1 || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install problem"
+}
diff --git a/sys-cluster/dlm-lib/dlm-lib-2.03.11.ebuild b/sys-cluster/dlm-lib/dlm-lib-2.03.11.ebuild
new file mode 100644
index 00000000000..2efe5a65879
--- /dev/null
+++ b/sys-cluster/dlm-lib/dlm-lib-2.03.11.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils linux-mod multilib versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="General-purpose Distributed Lock Manager"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=sys-kernel/linux-headers-2.6.24
+ !sys-cluster/dlm-headers
+ !sys-cluster/dlm-kernel
+ "
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/${PN/-//}"
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --libdir="/usr/$(get_libdir)" \
+ --disable_kernel_check \
+ --kernel_src=${KERNEL_DIR} \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ --cmanlibdir="/usr/$(get_libdir)" \
+ --cmanincdir=/usr/include \
+ ) || die "configure problem"
+
+ #emake clean || die "clean problem"
+ emake -j1 || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install problem"
+}
diff --git a/sys-cluster/dlm-lib/metadata.xml b/sys-cluster/dlm-lib/metadata.xml
new file mode 100644
index 00000000000..348e6c4de81
--- /dev/null
+++ b/sys-cluster/dlm-lib/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+</pkgmetadata>
diff --git a/sys-cluster/dlm/Manifest b/sys-cluster/dlm/Manifest
new file mode 100644
index 00000000000..d39a905e372
--- /dev/null
+++ b/sys-cluster/dlm/Manifest
@@ -0,0 +1,2 @@
+DIST cluster-2.03.09.tar.gz 1784357 RMD160 9ac5c3fd0fece8ec17bd31d116c43b33612741d0 SHA1 c2cdbc657da2a9efde4b1e6d2657170e1c09b5b8 SHA256 b6d6f35f58b2f8628c369391e0fd01b1803af40029ec1e6ef88865dda38b855f
+DIST cluster-2.03.11.tar.gz 1790532 RMD160 5928da5a4402f0d96f316ce2e4fa7aaa7c2704a6 SHA1 2b817e87918a630ad50c1702b2a951ba35005cf5 SHA256 2597e7cbcbc6b272fd21aa2468f0810a097efd996128fcd672a786d106b1124d
diff --git a/sys-cluster/dlm/dlm-2.03.09.ebuild b/sys-cluster/dlm/dlm-2.03.09.ebuild
new file mode 100644
index 00000000000..ebf4caed3d7
--- /dev/null
+++ b/sys-cluster/dlm/dlm-2.03.09.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils linux-mod versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="General-purpose Distributed Lock Manager"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=sys-kernel/linux-headers-2.6.24
+ !sys-cluster/dlm-headers
+ !sys-cluster/dlm-kernel
+ =sys-cluster/dlm-lib-${CLUSTER_RELEASE}*
+ "
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # fix the manual pages have executable bit
+ sed -i -e '
+ /\tinstall -d/s/install/& -m 0755/; t
+ /\tinstall/s/install/& -m 0644/' \
+ man/Makefile || die "failed patching man pages permission"
+
+}
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --disable_kernel_check \
+ --kernel_src=${KERNEL_DIR} \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ --cmanlibdir=/usr/lib \
+ --dlmlibdir=/usr/lib \
+ --dlmincdir=/usr/include \
+ ) || die "configure problem"
+
+ emake clean || die "clean problem"
+ for i in tool man; do
+ emake -C $i || die "compile problem"
+ done
+}
+
+src_install() {
+ for i in tool man; do
+ emake DESTDIR="${D}" -C $i install || die "install problem"
+ done
+
+ dodoc doc/*.txt
+}
diff --git a/sys-cluster/dlm/dlm-2.03.11.ebuild b/sys-cluster/dlm/dlm-2.03.11.ebuild
new file mode 100644
index 00000000000..ce630c044c0
--- /dev/null
+++ b/sys-cluster/dlm/dlm-2.03.11.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils linux-mod versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="General-purpose Distributed Lock Manager"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=sys-kernel/linux-headers-2.6.24
+ !sys-cluster/dlm-headers
+ !sys-cluster/dlm-kernel
+ =sys-cluster/dlm-lib-${CLUSTER_RELEASE}*
+ "
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # fix the manual pages have executable bit
+ sed -i -e '
+ /\tinstall -d/s/install/& -m 0755/; t
+ /\tinstall/s/install/& -m 0644/' \
+ man/Makefile || die "failed patching man pages permission"
+
+}
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --disable_kernel_check \
+ --kernel_src=${KERNEL_DIR} \
+ --somajor="$MAJ_PV" \
+ --sominor="$MIN_PV" \
+ --cmanlibdir=/usr/lib \
+ --dlmlibdir=/usr/lib \
+ --dlmincdir=/usr/include \
+ ) || die "configure problem"
+
+ emake clean || die "clean problem"
+ for i in tool man; do
+ emake -C $i || die "compile problem"
+ done
+}
+
+src_install() {
+ for i in tool man; do
+ emake DESTDIR="${D}" -C $i install || die "install problem"
+ done
+
+ dodoc doc/*.txt
+}
diff --git a/sys-cluster/dlm/files/dlm.rc b/sys-cluster/dlm/files/dlm.rc
new file mode 100755
index 00000000000..120e5adfb2e
--- /dev/null
+++ b/sys-cluster/dlm/files/dlm.rc
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+ need cluster-manager
+ provide cluster-locking-manager
+}
+
+load_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Loading ${module} kernel module"
+ modprobe ${module}
+ eend $? "Failed to load ${module} kernel module"
+ done
+}
+
+unload_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Unloading ${module} kernel module"
+ modprobe -r ${module}
+ eend $? "Failed to unload ${module} kernel module"
+ done
+}
+
+start() {
+ ebegin "Loading dlm module"
+ load_modules dlm
+ eend $?
+}
+
+stop() {
+
+ local modules
+
+ if [ -d /proc/cluster/lock_dlm ]; then
+ modules="${modules} lock_dlm"
+ fi
+ if [ -d /proc/cluster/config/dlm ]; then
+ modules="${modules} dlm"
+ fi
+ unload_modules ${modules}
+
+}
+
diff --git a/sys-cluster/dlm/metadata.xml b/sys-cluster/dlm/metadata.xml
new file mode 100644
index 00000000000..348e6c4de81
--- /dev/null
+++ b/sys-cluster/dlm/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+</pkgmetadata>
diff --git a/sys-cluster/drbd-kernel/Manifest b/sys-cluster/drbd-kernel/Manifest
new file mode 100644
index 00000000000..8527f3b3339
--- /dev/null
+++ b/sys-cluster/drbd-kernel/Manifest
@@ -0,0 +1,3 @@
+DIST drbd-8.0.16.tar.gz 322758 SHA256 3bdb662663d308da9d871cc66ddc9e807a10ad5ab510a33b62877231150bc059
+DIST drbd-8.3.6.tar.gz 457469 SHA256 ea1220705845df6f6490624698904f28854fe74caf047a5d01454b9abd892ce3
+DIST drbd-8.3.8.1.tar.gz 482582 SHA256 2b7e8a3895e89824d41d7dce8d55d127baba857c509bc2477925b0aecaf5689b SHA512 c43c6d065328058db66f708d47ce082603b766deb1530c57aa736a42b4908f780ede41f76395ca45c2691ef1dfd142147a4c98a7bcdb26ba7de73b149d8f9f5f WHIRLPOOL af4f6a1a8a7d51626d508e834e1465c079bd386f24ecdd3495221bafc3f9c766d6d583934995b88372bbed8e1e7bd3d19186c4eab40c123c5c700fc3de7742e9
diff --git a/sys-cluster/drbd-kernel/drbd-kernel-8.0.16.ebuild b/sys-cluster/drbd-kernel/drbd-kernel-8.0.16.ebuild
new file mode 100644
index 00000000000..2ad9f5fa86c
--- /dev/null
+++ b/sys-cluster/drbd-kernel/drbd-kernel-8.0.16.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator linux-mod
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+
+MY_PN="${PN/-kernel/}"
+MY_P="${MY_PN}-${PV}"
+MY_MAJ_PV="$(get_version_component_range 1-2 ${PV})"
+
+HOMEPAGE="http://www.drbd.org"
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/${MY_MAJ_PV}/${MY_PN}-${PV}.tar.gz"
+
+IUSE=""
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+SLOT="0"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if ! kernel_is -ge 2 6; then
+ die "Unsupported kernel, drbd-8.0.x needs kernel 2.6.x ."
+ fi
+
+ MODULE_NAMES="drbd(block:${S}/drbd)"
+ BUILD_TARGETS="default"
+ CONFIG_CHECK="CONNECTOR"
+ CONNECTOR_ERROR="You must enable \"CONNECTOR - unified userspace <-> kernelspace linker\" in your kernel configuration, because drbd needs it."
+ linux-mod_pkg_setup
+ BUILD_PARAMS="-j1 KDIR=${KERNEL_DIR} O=${KBUILD_OUTPUT}"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-8.0.0-scripts.adjust_drbd_config_h.sh.patch || die
+ epatch "${FILESDIR}"/${MY_P}-kernel-2.6.30-compile-fix.patch || die
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ einfo ""
+ einfo "Please remember to re-emerge drbd when you upgrade your kernel!"
+ einfo ""
+}
diff --git a/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild b/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild
new file mode 100644
index 00000000000..6f348cd8c13
--- /dev/null
+++ b/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils versionator linux-mod
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 x86"
+
+MY_PN="${PN/-kernel/}"
+MY_P="${MY_PN}-${PV}"
+MY_MAJ_PV="$(get_version_component_range 1-2 ${PV})"
+
+HOMEPAGE="http://www.drbd.org"
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/${MY_MAJ_PV}/${MY_PN}-${PV}.tar.gz"
+
+IUSE=""
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+SLOT="0"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-linux-2.6.32.patch
+}
+
+pkg_setup() {
+ if ! kernel_is -ge 2 6; then
+ die "Unsupported kernel, drbd-${PV} needs kernel 2.6.x ."
+ fi
+
+ MODULE_NAMES="drbd(block:${S}/drbd)"
+ BUILD_TARGETS="default"
+ CONFIG_CHECK="CONNECTOR"
+ CONNECTOR_ERROR="You must enable \"CONNECTOR - unified userspace <-> kernelspace linker\" in your kernel configuration, because drbd needs it."
+ linux-mod_pkg_setup
+ BUILD_PARAMS="-j1 KDIR=${KV_DIR} O=${KV_OUT_DIR}"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ einfo ""
+ einfo "Please remember to re-emerge drbd when you upgrade your kernel!"
+ einfo ""
+}
diff --git a/sys-cluster/drbd-kernel/drbd-kernel-8.3.8.1.ebuild b/sys-cluster/drbd-kernel/drbd-kernel-8.3.8.1.ebuild
new file mode 100644
index 00000000000..7c0ccb89556
--- /dev/null
+++ b/sys-cluster/drbd-kernel/drbd-kernel-8.3.8.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils versionator linux-mod
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+
+MY_PN=${PN/-kernel/}
+MY_P=${MY_PN}-${PV}
+MY_MAJ_PV=$(get_version_component_range 1-2 ${PV})
+
+HOMEPAGE="http://www.drbd.org"
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/${MY_MAJ_PV}/${MY_PN}-${PV}.tar.gz"
+
+IUSE=""
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+SLOT="0"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ if ! kernel_is -ge 2 6; then
+ die "Unsupported kernel, drbd-${PV} needs kernel 2.6.x ."
+ elif [ ${KV_PATCH} -ge 33 ]; then
+ ewarn "Your kernel (${KV_FULL}) is too new to use this package."
+ ewarn "The DRBD module has been merged into kernel >= 2.6.33."
+ ewarn "Please compile the DRBD module from your current kernel."
+ die "${PN} is obsolete with kernel >= 2.6.33."
+ fi
+
+ MODULE_NAMES="drbd(block:${S}/drbd)"
+ BUILD_TARGETS="default"
+ CONFIG_CHECK="CONNECTOR"
+ CONNECTOR_ERROR="You must enable \"CONNECTOR - unified userspace <-> kernelspace linker\" in your kernel configuration, because drbd needs it."
+ linux-mod_pkg_setup
+ BUILD_PARAMS="-j1 KDIR=${KV_DIR} O=${KV_OUT_DIR}"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ einfo ""
+ einfo "Please remember to re-emerge drbd-kernel when you upgrade your kernel!"
+ einfo ""
+}
diff --git a/sys-cluster/drbd-kernel/files/drbd-8.0.16-kernel-2.6.30-compile-fix.patch b/sys-cluster/drbd-kernel/files/drbd-8.0.16-kernel-2.6.30-compile-fix.patch
new file mode 100644
index 00000000000..c7b4f814077
--- /dev/null
+++ b/sys-cluster/drbd-kernel/files/drbd-8.0.16-kernel-2.6.30-compile-fix.patch
@@ -0,0 +1,12 @@
+--- drbd-8.0.16/drbd/drbd_main.c.orig 2009-08-04 17:55:52.000000000 +0300
++++ drbd-8.0.16/drbd/drbd_main.c 2009-08-04 17:56:35.000000000 +0300
+@@ -2770,7 +2770,9 @@
+ }
+
+ drbd_proc->proc_fops = &drbd_proc_fops;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ drbd_proc->owner = THIS_MODULE;
++#endif
+ #else
+ # error "Currently drbd depends on the proc file system (CONFIG_PROC_FS)"
+ #endif
diff --git a/sys-cluster/drbd-kernel/files/drbd-kernel-8.0.0-scripts.adjust_drbd_config_h.sh.patch b/sys-cluster/drbd-kernel/files/drbd-kernel-8.0.0-scripts.adjust_drbd_config_h.sh.patch
new file mode 100644
index 00000000000..beb07fbdaeb
--- /dev/null
+++ b/sys-cluster/drbd-kernel/files/drbd-kernel-8.0.0-scripts.adjust_drbd_config_h.sh.patch
@@ -0,0 +1,23 @@
+--- drbd-8.0.0/scripts/adjust_drbd_config_h.sh.orig 2007-02-05 01:20:58.000000000 +0100
++++ drbd-8.0.0/scripts/adjust_drbd_config_h.sh 2007-02-05 01:21:28.000000000 +0100
+@@ -26,19 +26,7 @@
+ pushd $KDIR
+
+ KDIR=${KDIR%/}
+-if test -z "$O"; then
+- ## just in case...
+- ## detect if $KDIR points to something which is actually $O ...
+- X=$( make help | sed -ne '/ -C .* O=.* help$/p' | tr -s ' ' )
+- if [[ -n $X ]]; then
+- KDIR=${X##* -C }; KDIR=${KDIR%% *}; KDIR=$(cd $KDIR && pwd)
+- O=${X##* O=}; O=${O%% *}; O=$(cd $KDIR && cd $O && pwd)
+- else
+- O=$KDIR;
+- fi
+-else
+- O=${O%/}
+-fi
++O=$KDIR;
+
+ # some paranoia: check that all files are where we expect them
+ ls > /dev/null \
diff --git a/sys-cluster/drbd-kernel/files/drbd-kernel-8.3.6-linux-2.6.32.patch b/sys-cluster/drbd-kernel/files/drbd-kernel-8.3.6-linux-2.6.32.patch
new file mode 100644
index 00000000000..893f9c2e21f
--- /dev/null
+++ b/sys-cluster/drbd-kernel/files/drbd-kernel-8.3.6-linux-2.6.32.patch
@@ -0,0 +1,46 @@
+--- drbd-8.3.6/drbd/drbd_req.c
++++ drbd-8.3.6/drbd/drbd_req.c
+@@ -55,13 +55,21 @@
+ __disk_stat_inc(mdev->vdisk, ios[rw]);
+ __disk_stat_add(mdev->vdisk, sectors[rw], bio_sectors(bio));
+ disk_round_stats(mdev->vdisk);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ mdev->vdisk->in_flight[rw]++;
++#else
+ mdev->vdisk->in_flight++;
++#endif
+ #else
+ cpu = part_stat_lock();
+ part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
+ part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio));
+ part_stat_unlock();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ mdev->vdisk->part0.in_flight[rw]++;
++#else
+ mdev->vdisk->part0.in_flight++;
++#endif
+ #endif
+ }
+
+@@ -77,13 +85,21 @@
+ #ifdef __disk_stat_add
+ __disk_stat_add(mdev->vdisk, ticks[rw], duration);
+ disk_round_stats(mdev->vdisk);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ mdev->vdisk->in_flight[rw]--;
++#else
+ mdev->vdisk->in_flight--;
++#endif
+ #else
+ cpu = part_stat_lock();
+ part_stat_add(cpu, &mdev->vdisk->part0, ticks[rw], duration);
+ part_round_stats(cpu, &mdev->vdisk->part0);
+ part_stat_unlock();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ mdev->vdisk->part0.in_flight[rw]--;
++#else
+ mdev->vdisk->part0.in_flight--;
++#endif
+ #endif
+ }
+
diff --git a/sys-cluster/drbd-kernel/metadata.xml b/sys-cluster/drbd-kernel/metadata.xml
new file mode 100644
index 00000000000..348e6c4de81
--- /dev/null
+++ b/sys-cluster/drbd-kernel/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+</pkgmetadata>
diff --git a/sys-cluster/drbd/Manifest b/sys-cluster/drbd/Manifest
new file mode 100644
index 00000000000..fae48031710
--- /dev/null
+++ b/sys-cluster/drbd/Manifest
@@ -0,0 +1,11 @@
+DIST drbd-8.0.16.tar.gz 322758 SHA256 3bdb662663d308da9d871cc66ddc9e807a10ad5ab510a33b62877231150bc059
+DIST drbd-8.3.10.tar.gz 521798 SHA256 5dd0e4bda615784bc45b8078c4d44b2d4b4b074f12e98c9bdfd7d40b13f2511a
+DIST drbd-8.3.11.tar.gz 526056 SHA256 bb5d3d0740788e779ba3b3a78c21362969dd0648eaced3ff37d9e52fff1df883
+DIST drbd-8.3.12.tar.gz 530923 SHA256 7385f941bafaebb18da1dadb07e2a8ee06117322bc37fc60a6c35b05f6f91087
+DIST drbd-8.3.13.tar.gz 541477 SHA256 ec3f2a37bd0aaa6783a8935d857bec1fbe55c1fa621fdb47ca9434384c84dbdd SHA512 fff72545ae569dad37d202bd7dcb075e443964e4d2e95ae124bbcac098762bee78f91e4863b56abfca2bdce2baa42bb3fdbdf9bb489f498d84aa679fa43ae702 WHIRLPOOL 21876ee5cb27609a115c852cae262dc233cbaa0d891769eb0704d057e071194928952650e4a6cc676e1facd405942f58db331c0abdc2d5000051da6bfcf1e506
+DIST drbd-8.3.15.tar.gz 550130 SHA256 1f1d35793c77c1356a82cf0c174346925802be73270abfb788cc27cc70646307 SHA512 ca78cddbbb614e90d63cdb3b5ec64ecc6b9c0730aced4348d1464edb5fe9b0f2c0e75fccc2c7cbe18daea454482cf46c847b55fb23e00f364b4f32ae0a3d8dca WHIRLPOOL 625ac74e1fe82f3a57ef183d9ece202c4c806d6600da2f690c9cf2e994d17bcbfcfa943a17d622cacce279ac53fde173987a7ace93cb346a9ef23d16908cec30
+DIST drbd-8.3.7.tar.gz 462659 SHA256 a01a07df88ebdbc20891fcb45c4d0e89b617a89dc19d5cbc8d0bd62bd562d36a
+DIST drbd-8.3.8.1.tar.gz 482582 SHA256 2b7e8a3895e89824d41d7dce8d55d127baba857c509bc2477925b0aecaf5689b
+DIST drbd-8.4.0.tar.gz 650733 SHA256 6f1f91ba2c296258c07cdb67552050cb64604d6606f7978aa076f32b3b97d624
+DIST drbd-8.4.2.tar.gz 675803 SHA256 f3d86bb5645c067bc61e9461a5d570a184912daedfe6f88623bbd920f8b5b5fa SHA512 c32371e1fb89b479bf5136ee1c00d8e07dd15769654977dfcde71fcc24264c1dae2feda82e8f61b4caf57b9ac88e2861ee7270aa8c867f6245b52d65c45ada46 WHIRLPOOL 11f1025f660f00c2e5741590665d27a581682169e4b40b61f053a8634b8419c1d94b93462696008090da9dd45c814dfe8fc8bc326170d016a19b6eaa751ead31
+DIST drbd-8.4.3.tar.gz 688328 SHA256 abeb09309b77b533b8e738a601d703b338dce6e4d6cf59741e2f0693fbf94527 SHA512 cdc90bdd9491fe6d29e3b779d69ba2aac1aacdb336586f1ef414d0a0195d922dbefa8b2d9c4868a2476998a713c893403344a2934c7768ff6f4ba9f13bb7277a WHIRLPOOL 90b8d3295aba124de9092585c5e5f77f50bc7338a943bbcbfa9726abce4aea3655e06bbf2523afb66a58abd3175d361f112e20c9e3b8fd809f3b7b03d0a0ea25
diff --git a/sys-cluster/drbd/drbd-8.0.16.ebuild b/sys-cluster/drbd/drbd-8.0.16.ebuild
new file mode 100644
index 00000000000..519a52eeea5
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.0.16.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+
+MY_PV="${PV/_/}"
+MY_MAJ_PV="$(get_version_component_range 1-2 ${PV})"
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/${MY_MAJ_PV}/${PN}-${MY_PV}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+PDEPEND="~sys-cluster/drbd-kernel-${PV}"
+
+SLOT="0"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_compile() {
+ emake -j1 tools || die "compile problem"
+}
+
+src_install() {
+ emake PREFIX="${D}" install-tools || die "install problem"
+
+ # gentoo-ish init-script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ # docs
+ dodoc README ChangeLog ROADMAP
+
+ # we put drbd.conf into docs
+ # it doesnt make sense to install a default conf in /etc
+ # put it to the docs
+ rm -f "${D}"/etc/drbd.conf
+ dodoc scripts/drbd.conf || die
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "Please copy and gunzip the configuration file"
+ einfo "drbd.conf from /usr/share/doc/${PF} to /etc"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo ""
+}
diff --git a/sys-cluster/drbd/drbd-8.3.10.ebuild b/sys-cluster/drbd/drbd-8.3.10.ebuild
new file mode 100644
index 00000000000..3a60ac67a58
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.10.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools || die
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools || die
+ dodoc README ChangeLog || die
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ dodoc scripts/drbd.conf.example || die
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.11-r1.ebuild b/sys-cluster/drbd/drbd-8.3.11-r1.ebuild
new file mode 100644
index 00000000000..e9c994f1370
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.11-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.12.ebuild b/sys-cluster/drbd/drbd-8.3.12.ebuild
new file mode 100644
index 00000000000..0b91cb7a74e
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.12.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.13.ebuild b/sys-cluster/drbd/drbd-8.3.13.ebuild
new file mode 100644
index 00000000000..9a4653ca39e
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.13.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator udev
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/Makefile.in || die
+ # correct install paths
+ sed -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ -e "s:\$(sysconfdir)/udev:$(get_udevdir):g" \
+ -i scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.15.ebuild b/sys-cluster/drbd/drbd-8.3.15.ebuild
new file mode 100644
index 00000000000..fb6fab1be8e
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.15.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ #epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.7.ebuild b/sys-cluster/drbd/drbd-8.3.7.ebuild
new file mode 100644
index 00000000000..bf8f76e7e58
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.7.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools || die
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools || die
+ dodoc README ChangeLog || die
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ # it doesnt make sense to install a default conf in /etc,
+ # so we put it to the docs
+ rm -f "${D}"/etc/drbd.conf
+ dodoc scripts/drbd.conf || die
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file"
+ einfo "from /usr/share/doc/${PF}/drbd.conf.bz2 to /etc"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+ elog "Or alternatively emerge sys-cluster/drbd-kernel package."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.8.1-r1.ebuild b/sys-cluster/drbd/drbd-8.3.8.1-r1.ebuild
new file mode 100644
index 00000000000..325af29ec63
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.8.1-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ epatch "${FILESDIR}"/${P}-implicits.patch
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools || die
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools || die
+ dodoc README ChangeLog || die
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ dodoc scripts/drbd.conf.example || die
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file"
+ einfo "from /usr/share/doc/${PF}/drbd.conf.bz2 to /etc"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+ elog "Or alternatively emerge sys-cluster/drbd-kernel package."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.8.1.ebuild b/sys-cluster/drbd/drbd-8.3.8.1.ebuild
new file mode 100644
index 00000000000..140455671d6
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.8.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools || die
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools || die
+ dodoc README ChangeLog || die
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ # it doesnt make sense to install a default conf in /etc,
+ # so we put it to the docs
+ rm -f "${D}"/etc/drbd.conf
+ dodoc scripts/drbd.conf || die
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file"
+ einfo "from /usr/share/doc/${PF}/drbd.conf.bz2 to /etc"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+ elog "Or alternatively emerge sys-cluster/drbd-kernel package."
+}
diff --git a/sys-cluster/drbd/drbd-8.4.0.ebuild b/sys-cluster/drbd/drbd-8.4.0.ebuild
new file mode 100644
index 00000000000..741ac75b3cd
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.4.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/{,legacy/}Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.4.2.ebuild b/sys-cluster/drbd/drbd-8.4.2.ebuild
new file mode 100644
index 00000000000..f21f0d07823
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.4.2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator udev
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ #epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/{,legacy/}Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+ sed -i -e "s:\$(sysconfdir)/udev:$(get_udevdir):" scripts/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.4.3.ebuild b/sys-cluster/drbd/drbd-8.4.3.ebuild
new file mode 100644
index 00000000000..f80504c35bc
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.4.3.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit bash-completion-r1 eutils multilib versionator udev
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS, #453442
+ sed -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" \
+ -e "/\$(DESTDIR)\$(localstatedir)\/lock/d" \
+ -i user{,/legacy}/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/{,legacy/}Makefile.in || die
+ # correct install paths (really correct this time)
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:$(get_bashcompdir):" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+ sed -i -e "s:\$(sysconfdir)/udev:$(get_udevdir):" scripts/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ --with-bashcompletion \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/files/drbd-8.0.rc b/sys-cluster/drbd/files/drbd-8.0.rc
new file mode 100644
index 00000000000..ed5abe98d78
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-8.0.rc
@@ -0,0 +1,158 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ use logger
+ need net
+ before heartbeat
+ after sshd
+}
+
+DEFAULTFILE="/etc/conf.d/drbd"
+DRBDADM="/sbin/drbdadm"
+PROC_DRBD="/proc/drbd"
+MODPROBE="/sbin/modprobe"
+RMMOD="/sbin/rmmod"
+UDEV_TIMEOUT=10
+ADD_MOD_PARAM=""
+
+if [ -f $DEFAULTFILE ]; then
+ . $DEFAULTFILE
+fi
+
+# Just in case drbdadm want to display any errors in the configuration
+# file, or we need to ask the user about registering this installation
+# at http://usage.drbd.org, we call drbdadm here without any IO
+# redirection.
+$DRBDADM sh-nop
+
+assure_module_is_loaded() {
+ [ -e "$PROC_DRBD" ] && return
+ ebegin "Loading drbd module"
+ ret=0
+
+ $MODPROBE -s drbd `$DRBDADM sh-mod-parms` $ADD_MOD_PARAM || ret=20
+ eend $ret
+ return $ret
+}
+
+adjust_with_progress() {
+ IFS_O=$IFS
+ NEWLINE='
+'
+ IFS=$NEWLINE
+ local D=0
+ local S=0
+ local N=0
+
+ einfon "Setting drbd parameters "
+ COMMANDS=`$DRBDADM -d adjust all` || {
+ eend 20 "Error executing drbdadm"
+ return 20
+ }
+ echo -n "[ "
+
+ for CMD in $COMMANDS; do
+ if echo $CMD | grep -q disk; then echo -n "d$D "; D=$(( D+1 ));
+ elif echo $CMD | grep -q syncer; then echo -n "s$S "; S=$(( S+1 ));
+ elif echo $CMD | grep -q net; then echo -n "n$N "; N=$(( N+1 ));
+ else echo echo -n ".. ";
+ fi
+ IFS=$IFS_O
+ $CMD || {
+ echo
+ eend 20 "cmd $CMD failed!"
+ return 20
+ }
+ IFS=$NEWLINE
+ done
+ echo "]"
+ eend 0
+
+ IFS=$IFS_O
+}
+
+start() {
+ einfo "Starting DRBD resources:"
+ eindent
+ assure_module_is_loaded || return $?
+ adjust_with_progress || return $?
+
+ # make sure udev has time to create the device files
+ ebegin "Waiting for udev device creation ..."
+ for RESOURCE in `$DRBDADM sh-resources`; do
+ for DEVICE in `$DRBDADM sh-dev $RESOURCE`; do
+ UDEV_TIMEOUT_LOCAL=$UDEV_TIMEOUT
+ while [ ! -e $DEVICE ] && [ $UDEV_TIMEOUT_LOCAL -gt 0 ] ; do
+ sleep 1
+ UDEV_TIMEOUT_LOCAL=$(( $UDEV_TIMEOUT_LOCAL-1 ))
+ done
+ done
+ done
+ eend 0
+
+ einfon "Waiting for connection "
+ $DRBDADM wait-con-int
+ ret=$?
+ echo
+
+ sleep 5
+
+ einfon "Become primary if configured "
+ $DRBDADM sh-b-pri all
+ echo
+
+ eend $ret
+ return $ret
+}
+
+stop() {
+ ebegin "Stopping all DRBD resources"
+
+ # Check for mounted drbd devices
+ if ! grep -q '^/dev/drbd' /proc/mounts &>/dev/null; then
+ if [ -e ${PROC_DRBD} ]; then
+ ${DRBDADM} down all
+ ret=$?
+ sleep 3
+ if [ -e /proc/modules ] && grep -q '^drbd' /proc/modules ; then
+ ${RMMOD} drbd
+ fi
+ fi
+ eend $ret
+ return $ret
+ else
+ einfo "drbd devices mounted, please umount them before trying to stop drbd!"
+ eend 1
+ return 1
+ fi
+}
+
+status() {
+ # NEEDS to be heartbeat friendly...
+ # so: put some "OK" in the output.
+
+ if [ -e $PROC_DRBD ]; then
+ ret=0
+ ebegin "drbd driver loaded OK; device status:"
+ eend $ret
+ cat $PROC_DRBD
+ else
+ ebegin "drbd not loaded"
+ ret=3
+ eend $ret
+ fi
+ return $ret
+}
+
+reload() {
+ ebegin "Reloading DRBD"
+ ${DRBDADM} adjust all
+ ret=$?
+ eend $ret
+ return $ret
+}
diff --git a/sys-cluster/drbd/files/drbd-8.3.11-kernel3.patch b/sys-cluster/drbd/files/drbd-8.3.11-kernel3.patch
new file mode 100644
index 00000000000..1eeca1b1b0f
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-8.3.11-kernel3.patch
@@ -0,0 +1,17 @@
+--- a/drbd/Makefile 2011-07-07 12:55:39.000000000 +0200
++++ b/drbd/Makefile 2011-11-03 12:56:42.280603057 +0100
+@@ -77,9 +77,12 @@
+ endif
+ endif
+
++ KDIR_Makefile_VERSION = $(shell test -e $(KDIR)/Makefile && grep "^VERSION = " $(KDIR)/Makefile | cut -d " " -f 3)
+ KDIR_Makefile_PATCHLEVEL = $(shell test -e $(KDIR)/Makefile && grep "^PATCHLEVEL = " $(KDIR)/Makefile | cut -d " " -f 3)
+- ifneq ($(findstring $(KDIR_Makefile_PATCHLEVEL),12345),)
+- $(error "won't compile with this kernel version")
++ ifneq ($(KDIR_Makefile_VERSION),3)
++ ifneq ($(findstring $(KDIR_Makefile_PATCHLEVEL),12345),)
++ $(error "ici won't compile with this kernel version")
++ endif
+ endif
+
+ .PHONY: drbd.o default all greeting clean kbuild install dep tags
diff --git a/sys-cluster/drbd/files/drbd-8.3.8.1-implicits.patch b/sys-cluster/drbd/files/drbd-8.3.8.1-implicits.patch
new file mode 100644
index 00000000000..0fbbb92a2c3
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-8.3.8.1-implicits.patch
@@ -0,0 +1,12 @@
+drbdadm_main.c:2525:2: warning: implicit declaration of function ‘stat’
+
+--- a/user/drbdadm_main.c
++++ b/user/drbdadm_main.c
+@@ -33,6 +33,7 @@
+ #include <search.h>
+
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <sys/poll.h>
+ #include <sys/socket.h>
diff --git a/sys-cluster/drbd/metadata.xml b/sys-cluster/drbd/metadata.xml
new file mode 100644
index 00000000000..cbfbad5934a
--- /dev/null
+++ b/sys-cluster/drbd/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <use>
+ <flag name='xen'>Enable Xen integration</flag>
+ <flag name='pacemaker'>Enable Pacemaker integration</flag>
+ <flag name='heartbeat'>Enable Heartbeat integration</flag>
+ </use>
+ <longdescription>
+ The user space tools to control, configure the DRBD driver, as well as integration programs and scripts
+ that glues the DRBD system to cluster management software and other system components.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-cluster/fake/Manifest b/sys-cluster/fake/Manifest
new file mode 100644
index 00000000000..b0dd55d227a
--- /dev/null
+++ b/sys-cluster/fake/Manifest
@@ -0,0 +1 @@
+DIST fake-1.1.10.tar.gz 137697 SHA256 1524651fe54f94aac5b3553a90d2255097862f41258f98873bb2768ad20ca676 SHA512 f8971d164d5b41ed34af7c08cb90f68bb1d1331f402b2ad2c39d459f60a64c7b9abfa7d011618d7efadeda3022d837c30b15fc540e020b423166f6829585d298 WHIRLPOOL 70dc164073bb09de22e710a89340904532808111ebaa8de27d44efb3391cf020a0241d842ae6e1d7d352b95837683113970c210b4f476a57bffc916326df6259
diff --git a/sys-cluster/fake/fake-1.1.10.ebuild b/sys-cluster/fake/fake-1.1.10.ebuild
new file mode 100644
index 00000000000..1dd42442c94
--- /dev/null
+++ b/sys-cluster/fake/fake-1.1.10.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Fake has been designed to switch in backup servers on a LAN"
+SRC_URI="http://www.vergenet.net/linux/${PN}/download/${PV}/${P}.tar.gz"
+HOMEPAGE="http://www.vergenet.net/linux/fake/"
+
+SLOT="0"
+KEYWORDS="~amd64 x86"
+LICENSE="GPL-2"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_unpack(){
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/fix-ldflags.patch"
+}
+
+src_compile(){
+ make patch || die "patching failed"
+ emake || die "make failed"
+}
+
+src_install(){
+ emake \
+ ROOT_DIR="${D}" \
+ MAN8_DIR="${D}/usr/share/man/man8" \
+ DOC_DIR="${D}/usr/share/doc/${P}" \
+ install || die "install failed"
+ dodoc AUTHORS ChangeLog README docs/*
+}
diff --git a/sys-cluster/fake/files/fix-ldflags.patch b/sys-cluster/fake/files/fix-ldflags.patch
new file mode 100644
index 00000000000..e788b18c645
--- /dev/null
+++ b/sys-cluster/fake/files/fix-ldflags.patch
@@ -0,0 +1,12 @@
+diff -Naur fake-1.1.10.old/send_arp.patch fake-1.1.10/send_arp.patch
+--- fake-1.1.10.old/send_arp.patch 2002-10-21 08:06:12.000000000 +0200
++++ fake-1.1.10/send_arp.patch 2010-09-27 13:17:02.000000000 +0200
+@@ -29,7 +29,7 @@
+ +all: $(BIN)
+ +
+ +$(BIN): $(SRC)
+-+ $(CC) $(SRC) -o $(BIN)
+++ $(CC) $(LDFLAGS) $(SRC) -o $(BIN)
+ +
+ +clean:
+ + rm -f $(BIN) core $(SRC).*
diff --git a/sys-cluster/fake/metadata.xml b/sys-cluster/fake/metadata.xml
new file mode 100644
index 00000000000..0d325191f88
--- /dev/null
+++ b/sys-cluster/fake/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+<longdescription>
+Fake has been designed to switch in backup servers on a LAN. In particular it has
+been designed to backup Mail, Web and Proxy servers during periods of both
+unscheduled and scheduled down time. Fake allows you to take over the IP address of
+another machine in the LAN by bringing up an additional interface and making use of
+ARP spoofing. The additional interface can be either a physical interface or an IP
+alias.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-cluster/feedbackd-agent/Manifest b/sys-cluster/feedbackd-agent/Manifest
new file mode 100644
index 00000000000..ffe75d01001
--- /dev/null
+++ b/sys-cluster/feedbackd-agent/Manifest
@@ -0,0 +1 @@
+DIST feedbackd-agent-0.4.tar.gz 69078 SHA256 0e1cf74d26387e5ce2591f29b92a19dfcd29b005585d363baa717c03705e49c8
diff --git a/sys-cluster/feedbackd-agent/feedbackd-agent-0.4.ebuild b/sys-cluster/feedbackd-agent/feedbackd-agent-0.4.ebuild
new file mode 100644
index 00000000000..c75714ee74f
--- /dev/null
+++ b/sys-cluster/feedbackd-agent/feedbackd-agent-0.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="system for dynamic feedback of server loads in a Linux Virtual Server (LVS)-based cluster"
+HOMEPAGE="http://ozlabs.org/~jk/projects/feedbackd/"
+SRC_URI="mirror://sourceforge/feedbackd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+DEPEND="dev-libs/libxml2
+ dev-lang/perl"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+}
+
+src_compile() {
+ econf \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-xml-config=/usr/bin/xml2-config \
+ --with-perl=/usr/bin/perl \
+ || die "bad ./configure"
+
+ emake || die
+}
+
+src_install() {
+ #make DESTDIR=${D} install || die
+ einstall || die
+ dodoc ChangeLog NEWS README
+}
diff --git a/sys-cluster/feedbackd-agent/files/feedbackd-agent-0.4-asneeded.patch b/sys-cluster/feedbackd-agent/files/feedbackd-agent-0.4-asneeded.patch
new file mode 100644
index 00000000000..9a29a3fa59e
--- /dev/null
+++ b/sys-cluster/feedbackd-agent/files/feedbackd-agent-0.4-asneeded.patch
@@ -0,0 +1,40 @@
+--- Makefile.in
++++ Makefile.in
+@@ -34,13 +34,16 @@
+ # build flags
+ CFLAGS = @CFLAGS@
+ CPPFLAGS = @CPPFLAGS@ @DEFS@ -I.
+-LDFLAGS = @LDFLAGS@ @LIBS@
++LDFLAGS = @LDFLAGS@
++LIBS = @LIBS@
+
+ XML_CFLAGS = @XML_CFLAGS@
+-XML_LDFLAGS = @XML_LDFLAGS@ @XML_LIBS@
++XML_LDFLAGS = @XML_LDFLAGS@
++LIBS += @XML_LIBS@
+
+ PERL_CFLAGS = @PERL_CFLAGS@
+-PERL_LDFLAGS = @PERL_LDFLAGS@ @PERL_LIBS@
++PERL_LDFLAGS = @PERL_LDFLAGS@
++LIBS += @PERL_LIBS@
+
+ # build targets
+ PLUGINS = @PLUGINS@
+@@ -63,7 +66,7 @@
+ # feedbackd-agent main program
+ $(AGENT): src/feedbackd-agent
+
+-src/feedbackd-agent: $(foreach f, $($(AGENT)_objs), src/$(f).o)
++src/feedbackd-agent: $(foreach f, $($(AGENT)_objs), src/$(f).o) $(LIBS)
+
+ src/feedbackd-agent: CFLAGS += $(XML_CFLAGS)
+ src/feedbackd-agent: LDFLAGS += $(XML_LDFLAGS)
+@@ -75,7 +78,7 @@
+ $(PLUGINS) : % : src/plugins/%.so
+
+ src/plugins/%.so: src/plugins/%.o
+- $(CC) -shared -nostartfiles $(LDFLAGS) -o $@ $^
++ $(CC) -shared -nostartfiles $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ src/plugins/%.so: CFLAGS+=-fPIC $(XML_CFLAGS)
+ src/plugins/%.so: LDFLAGS+=$(XML_LDFLAGS)
diff --git a/sys-cluster/feedbackd-agent/metadata.xml b/sys-cluster/feedbackd-agent/metadata.xml
new file mode 100644
index 00000000000..dfc0fe50281
--- /dev/null
+++ b/sys-cluster/feedbackd-agent/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <upstream>
+ <remote-id type="sourceforge">feedbackd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/feedbackd-master/Manifest b/sys-cluster/feedbackd-master/Manifest
new file mode 100644
index 00000000000..ddfa3726427
--- /dev/null
+++ b/sys-cluster/feedbackd-master/Manifest
@@ -0,0 +1 @@
+DIST feedbackd-master-0.4.tar.gz 73715 SHA256 9e8504a8314d99f7b2be95e1f39a5aed9f8f86d4cd21bedfca7af6e7f3d6f401
diff --git a/sys-cluster/feedbackd-master/feedbackd-master-0.4.ebuild b/sys-cluster/feedbackd-master/feedbackd-master-0.4.ebuild
new file mode 100644
index 00000000000..26e0d49c067
--- /dev/null
+++ b/sys-cluster/feedbackd-master/feedbackd-master-0.4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Linux Virtual Server (LVS) addon for dynamic server health feedback"
+
+HOMEPAGE="http://ozlabs.org/~jk/projects/feedbackd/"
+LICENSE="GPL-2"
+DEPEND="dev-libs/libxml2
+ >=sys-cluster/ipvsadm-1.24
+ dev-lang/perl"
+
+SRC_URI="mirror://sourceforge/feedbackd/${P}.tar.gz"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="x86"
+
+src_compile() {
+ einfo "Note: feedbackd-master needs a kernel with ipvs support and with ipvs enabled"
+
+ econf \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ || die "bad ./configure"
+
+ emake || die
+}
+
+src_install() {
+ einstall || die
+ dodoc ChangeLog NEWS README
+}
diff --git a/sys-cluster/feedbackd-master/metadata.xml b/sys-cluster/feedbackd-master/metadata.xml
new file mode 100644
index 00000000000..17c73f3b8f2
--- /dev/null
+++ b/sys-cluster/feedbackd-master/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <longdescription>
+ Feedbackd is an add-on to the Linux Virtual Server project (LVS) to provide dynamic feedback of server health.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">feedbackd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/fence-agents/Manifest b/sys-cluster/fence-agents/Manifest
new file mode 100644
index 00000000000..f43f97066a3
--- /dev/null
+++ b/sys-cluster/fence-agents/Manifest
@@ -0,0 +1 @@
+DIST fence-agents-3.1.5.tar.gz 897416 SHA256 cc822f793dac2d86778982716bd5bd482daf4ac33f0726c47e638f70bcaa3ba7 SHA512 3941e2ec9f7db8dfe9fbf8aa360359fa1ff4f3c2d3e6e778289f0bbc39481a54915dbf93d9a9b66f6953ddd2c81562daa7c90e6c0f59ec42e9bfb779ae242992 WHIRLPOOL 19f7e681544affcca907325e999bf97b487debbb0134d96a2e99a8e2371d98e8718fcaba5bd74832ae64bcffc2f0f93f2493211ccbe1868fb31e68845ada7b07
diff --git a/sys-cluster/fence-agents/fence-agents-3.1.5-r1.ebuild b/sys-cluster/fence-agents/fence-agents-3.1.5-r1.ebuild
new file mode 100644
index 00000000000..7e624d8d2e0
--- /dev/null
+++ b/sys-cluster/fence-agents/fence-agents-3.1.5-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2-3)"
+
+DESCRIPTION="Cluster Fencing Agents"
+HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage"
+SRC_URI="https://fedorahosted.org/releases/f/e/${PN}/${PN}-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="~sys-cluster/libccs-${PV}"
+DEPEND="${RDEPEND}
+ dev-python/pexpect
+ dev-libs/libxslt
+ dev-python/pexpect
+ dev-python/pycurl
+ dev-python/suds"
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${P} \
+ --libdir=/usr/$(get_libdir) \
+ --localstatedir=/var
+}
+
+src_install() {
+ default
+ # dont force /var/run creation on installation wrt #451798
+ rm -rf "${D}"/var/run
+}
+
+pkg_postinst() {
+ if [[ "${ROOT}" != "/" ]] ; then
+ ewarn "You have to run 'ccs_update_schema' in the chroot-environment"
+ ewarn "to update the schema file for the cluster configuration."
+ ewarn "Otherwise you will not be able to define ressources."
+ else
+ elog "Running ccs_update_schema to update the configuration file schema"
+ /usr/sbin/ccs_update_schema -v -f
+ fi
+}
+
+pkg_postrm() {
+ if [[ "${ROOT}" != "/" ]] ; then
+ ewarn "You have to run 'ccs_update_schema' in the chroot-environment"
+ ewarn "to update the schema file for the cluster configuration."
+ ewarn "Otherwise you may be able to define ressources even though they"
+ ewarn "are not present anymore."
+ else
+ elog "Running ccs_update_schema to update the configuration file schema"
+ /usr/sbin/ccs_update_schema -v -f
+ fi
+}
diff --git a/sys-cluster/fence-agents/fence-agents-3.1.5-r2.ebuild b/sys-cluster/fence-agents/fence-agents-3.1.5-r2.ebuild
new file mode 100644
index 00000000000..ff9a2d941a9
--- /dev/null
+++ b/sys-cluster/fence-agents/fence-agents-3.1.5-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit multilib python-any-r1 versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2-3)"
+
+DESCRIPTION="Cluster Fencing Agents"
+HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage"
+SRC_URI="https://fedorahosted.org/releases/f/e/${PN}/${PN}-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="~sys-cluster/libccs-${PV}"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-libs/libxslt
+ $(python_gen_any_dep '
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ dev-python/suds[${PYTHON_USEDEP}]
+ ')"
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${P} \
+ --libdir=/usr/$(get_libdir) \
+ --localstatedir=/var
+}
+
+src_install() {
+ default
+ # dont force /var/run creation on installation wrt #451798
+ rm -rf "${ED}"/var/run || die
+}
+
+pkg_postinst() {
+ if [[ "${EROOT}" != "/" ]] ; then
+ ewarn "You have to run 'ccs_update_schema' in the chroot-environment"
+ ewarn "to update the schema file for the cluster configuration."
+ ewarn "Otherwise you will not be able to define ressources."
+ else
+ elog "Running ccs_update_schema to update the configuration file schema"
+ ccs_update_schema -v -f
+ fi
+}
+
+pkg_postrm() {
+ if [[ "${EROOT}" != "/" ]] ; then
+ ewarn "You have to run 'ccs_update_schema' in the chroot-environment"
+ ewarn "to update the schema file for the cluster configuration."
+ ewarn "Otherwise you may be able to define ressources even though they"
+ ewarn "are not present anymore."
+ else
+ elog "Running ccs_update_schema to update the configuration file schema"
+ ccs_update_schema -v -f
+ fi
+}
diff --git a/sys-cluster/fence-agents/metadata.xml b/sys-cluster/fence-agents/metadata.xml
new file mode 100644
index 00000000000..392a5958b59
--- /dev/null
+++ b/sys-cluster/fence-agents/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <longdescription>Cluster Fencing Agents</longdescription>
+</pkgmetadata>
diff --git a/sys-cluster/galera/Manifest b/sys-cluster/galera/Manifest
new file mode 100644
index 00000000000..c23d3fc9a5b
--- /dev/null
+++ b/sys-cluster/galera/Manifest
@@ -0,0 +1,2 @@
+DIST galera-25.3.10.tar.gz 2950372 SHA256 33a749f71e478d068982845524a44fe18d1c59c168e1fee8b92baca763982b2d SHA512 c08420b72e446c93645012ec04465c4cb65152bd3eaa840142fafdcb6945f76e77e2be00cf68930227656b78c25cd5ce36ebe823d6fcbcd320e6ae91b3b38a5c WHIRLPOOL 87a271f3e03de3da70cb302ff6559c70d65097b1b639b8ae1501afe0ef9328bc746ae828daac8cc5cbd4ef0f8cd861a72739d7154709f3122d7bb4e1f3ab57bd
+DIST galera-25.3.5-src.tar.gz 3820268 SHA256 9e6d718bac9608c69cbfc0662963b29c13659c576aaa8469b6a325d75603f7a3 SHA512 34bd01c46b080219106e140a7ff011c39ce2c9afaf6b8205daca91347ac3979a3af61bcddaf9c5cc63748b19236a2e4efa88532760b347fefa38e037f90b0995 WHIRLPOOL 055a59cc3631ccb0501c2ce4c5812ae0e001104254a97540f78a3f8feaed94b85bd82ecc3e1e4a3c2e477ab6f02d638dc8e8ea1471b8a63ca603f3a9ecd6403d
diff --git a/sys-cluster/galera/files/disable-tests.patch b/sys-cluster/galera/files/disable-tests.patch
new file mode 100644
index 00000000000..b82294b3224
--- /dev/null
+++ b/sys-cluster/galera/files/disable-tests.patch
@@ -0,0 +1,80 @@
+diff -aurN a/galera/SConscript b/galera/SConscript
+--- a/galera/SConscript 2013-03-11 02:44:50.000000000 -0400
++++ b/galera/SConscript 2013-05-13 13:13:20.851827437 -0400
+@@ -1,2 +1,2 @@
+
+-SConscript(['src/SConscript', 'tests/SConscript'])
++SConscript(['src/SConscript'])
+diff -aurN a/galerautils/SConscript b/galerautils/SConscript
+--- a/galerautils/SConscript 2013-03-11 02:44:50.000000000 -0400
++++ b/galerautils/SConscript 2013-05-13 13:15:37.010071765 -0400
+@@ -1,3 +1,3 @@
+ # SConscript for building galerautils
+
+-SConscript(Split('''src/SConscript tests/SConscript'''))
++SConscript(Split('''src/SConscript'''))
+diff -aurN a/gcache/SConscript b/gcache/SConscript
+--- a/gcache/SConscript 2013-03-11 02:44:50.000000000 -0400
++++ b/gcache/SConscript 2013-05-13 13:15:55.179837389 -0400
+@@ -1,3 +1,3 @@
+ # SConscript for building galerautils
+
+-SConscript(Split('''src/SConscript tests/SConscript'''))
++SConscript(Split('''src/SConscript'''))
+diff -aurN a/gcomm/SConscript b/gcomm/SConscript
+--- a/gcomm/SConscript 2013-03-11 02:44:50.000000000 -0400
++++ b/gcomm/SConscript 2013-05-13 13:16:08.979659369 -0400
+@@ -1,3 +1,3 @@
+ # SCons build script for building gcomm
+
+-SConscript(Split('''src/SConscript test/SConscript'''))
++SConscript(Split('''src/SConscript'''))
+diff -aurN a/gcs/src/SConscript b/gcs/src/SConscript
+--- a/gcs/src/SConscript 2013-03-11 02:44:50.000000000 -0400
++++ b/gcs/src/SConscript 2013-05-13 13:12:53.122184848 -0400
+@@ -46,8 +46,6 @@
+ source = 'gcs_test.c',
+ LINK = libgcs_env['CXX'])
+
+-SConscript('unit_tests/SConscript')
+-
+ #
+ env.Append(LIBGALERA_OBJS = libgcs_env.SharedObject(libgcs_sources))
+
+diff -aurN a/SConstruct b/SConstruct
+--- a/SConstruct 2013-03-11 02:44:50.000000000 -0400
++++ b/SConstruct 2013-05-13 13:11:03.493597370 -0400
+@@ -305,20 +305,6 @@
+ # Clone base from default environment
+ check_env = env.Clone()
+
+-conf = Configure(check_env)
+-
+-# Check header and library
+-
+-if not conf.CheckHeader('check.h'):
+- print 'Error: check header file not found or not usable'
+- Exit(1)
+-
+-if not conf.CheckLib('check'):
+- print 'Error: check library not found or not usable'
+- Exit(1)
+-
+-conf.Finish()
+-
+ # Note: Don't do this, glibc does not like static linking
+ # Link unit tests statically
+ # check_env.Append(LINKFLAGS = ' -static')
+@@ -328,11 +314,7 @@
+ #
+
+ def builder_unit_test(target, source, env):
+- app = str(source[0].abspath)
+- if os.spawnl(os.P_WAIT, app, app)==0:
+- open(str(target[0]),'w').write("PASSED\n")
+- else:
+- return 1
++ print("Disabled\n")
+ # Create a builder for tests
+ bld = Builder(action = builder_unit_test)
+ check_env.Append(BUILDERS = {'Test' : bld})
diff --git a/sys-cluster/galera/files/galera-strip-machine-cflags.patch b/sys-cluster/galera/files/galera-strip-machine-cflags.patch
new file mode 100644
index 00000000000..5aca0f709f4
--- /dev/null
+++ b/sys-cluster/galera/files/galera-strip-machine-cflags.patch
@@ -0,0 +1,62 @@
+diff -aurN a/galerautils/src/SConscript b/galerautils/src/SConscript
+--- a/galerautils/src/SConscript 2015-03-16 07:18:42.000000000 -0400
++++ b/galerautils/src/SConscript 2015-04-07 15:03:21.661301200 -0400
+@@ -1,4 +1,4 @@
+-Import('env', 'x86', 'sysname')
++Import('env', 'sysname')
+
+ libgalerautils_env = env.Clone()
+
+@@ -33,21 +33,6 @@
+ crc32c_sources = [ '#/www.evanjones.ca/crc32c.c' ]
+ crc32c_objs = crc32c_env.SharedObject(crc32c_sources)
+
+-if x86 != 0:
+- crc32c_env.Append(CFLAGS = ' -msse4.2')
+- if sysname == 'sunos':
+- # Ideally we want to simply strip SSE4.2 flag from the resulting
+- # crc32.pic.o
+- # (see http://ffmpeg.org/pipermail/ffmpeg-user/2013-March/013977.html)
+- # but that requires some serious scons-fu, so we just don't
+- # compile hardware support in if host CPU does not have it.
+- from subprocess import check_call
+- try:
+- check_call("isainfo -v | grep sse4.2 >/dev/null 2>&1", shell=True);
+- except:
+- libgalerautils_env.Append(CPPFLAGS = ' -DCRC32C_NO_HARDWARE')
+- crc32c_env.Append(CPPFLAGS = ' -DCRC32C_NO_HARDWARE')
+-
+ libgalerautils_env.StaticLibrary('galerautils',
+ libgalerautils_objs + crc32c_objs)
+
+diff -aurN a/SConstruct b/SConstruct
+--- a/SConstruct 2015-04-07 14:53:59.810301200 -0400
++++ b/SConstruct 2015-04-07 14:54:48.700301200 -0400
+@@ -87,27 +87,6 @@
+ opt_flags = opt_flags + ' -DGU_DBUG_ON'
+
+
+-if x86 == 32:
+- compile_arch = ' -m32 -march=i686'
+- link_arch = compile_arch
+- if sysname == 'linux':
+- link_arch = link_arch + ' -Wl,-melf_i386'
+-elif x86 == 64 and sysname != 'sunos':
+- compile_arch = ' -m64'
+- link_arch = compile_arch
+- if sysname == 'linux':
+- link_arch = link_arch + ' -Wl,-melf_x86_64'
+-elif machine == 'ppc64':
+- compile_arch = ' -mtune=native'
+- link_arch = ''
+-elif sysname == 'sunos':
+- compile_arch = ' -mtune=native'
+- link_arch = ''
+-else:
+- compile_arch = ''
+- link_arch = ''
+-
+-
+ boost = int(ARGUMENTS.get('boost', 1))
+ boost_pool = int(ARGUMENTS.get('boost_pool', 0))
+ ssl = int(ARGUMENTS.get('ssl', 1))
diff --git a/sys-cluster/galera/files/garb.cnf b/sys-cluster/galera/files/garb.cnf
new file mode 100644
index 00000000000..4f0047a02c2
--- /dev/null
+++ b/sys-cluster/galera/files/garb.cnf
@@ -0,0 +1,17 @@
+# Copyright (C) 2012 Coedership Oy
+# This config file is to be sourced by garbd service script.
+
+# A space-separated list of node addresses (address[:port]) in the cluster
+# GALERA_NODES=""
+
+# Galera cluster name, should be the same as on the rest of the nodes.
+# GALERA_GROUP=""
+
+# Optional Galera internal options string (e.g. SSL settings)
+# see http://www.codership.com/wiki/doku.php?id=galera_parameters
+# GALERA_OPTIONS=""
+
+# Log file for garbd. Optional, by default logs to syslog
+# LOG_FILE=""
+
+PIDFILE=/var/run/garbd
diff --git a/sys-cluster/galera/files/garb.sh b/sys-cluster/galera/files/garb.sh
new file mode 100644
index 00000000000..63e88dff5cd
--- /dev/null
+++ b/sys-cluster/galera/files/garb.sh
@@ -0,0 +1,63 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+ after mysql
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+
+ if [ -z "${GALERA_NODES}" ]; then
+ eerror "List of GALERA_NODES is not configured"
+ return 1
+ fi
+
+ if [ -z "${GALERA_GROUP}" ]; then
+ eerror "GALERA_GROUP name is not configured"
+ return 1
+ fi
+
+ GALERA_PORT="${GALERA_PORT:-4567}"
+
+ for ADDRESS in ${GALERA_NODES} 0; do
+ HOST=$(echo $ADDRESS | cut -d \: -f 1 )
+ PORT=$(echo $ADDRESS | cut -d \: -f 2 )
+ if [ "x${HOST}" = "x${PORT}" ]; then
+ PORT=${GALERA_PORT}
+ fi
+ PORT=${PORT:-$GALERA_PORT}
+ nc -z ${HOST} ${PORT} > /dev/null && break
+ done
+ if [ ${ADDRESS} = "0" ]; then
+ eerror "None of the nodes in GALERA_NODES is accessible"
+ return 1
+ fi
+
+ OPTIONS="-a gcomm://${ADDRESS} -g ${GALERA_GROUP}"
+ [ -n "${GALERA_OPTIONS}" ] && OPTIONS="${OPTIONS} -o ${GALERA_OPTIONS}"
+ [ -n "${LOG_FILE}" ] && OPTIONS="${OPTIONS} -l ${LOG_FILE}"
+
+ start-stop-daemon \
+ --start \
+ --exec /usr/bin/garbd \
+ --pidfile "${PIDFILE}" \
+ --make-pidfile \
+ --user garbd \
+ --group garbd \
+ --background \
+ -- ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon \
+ --stop \
+ --exec /usr/bin/garbd \
+ --pidfile "${PIDFILE}"
+ eend $?
+}
+
diff --git a/sys-cluster/galera/files/respect-flags.patch b/sys-cluster/galera/files/respect-flags.patch
new file mode 100644
index 00000000000..d7e5f37817e
--- /dev/null
+++ b/sys-cluster/galera/files/respect-flags.patch
@@ -0,0 +1,35 @@
+--- a/SConstruct 2014-03-07 14:27:26.797904671 -0500
++++ b/SConstruct 2014-03-07 14:31:18.672478115 -0500
+@@ -49,7 +49,7 @@
+ build_target = 'all'
+
+ # Optimization level
+-opt_flags = ' -g -O3 -DNDEBUG'
++opt_flags = ' -DNDEBUG'
+
+ # Architecture (defaults to build host type)
+ compile_arch = ''
+@@ -214,12 +214,12 @@
+ ' -Wall -Wextra -Wno-unused-parameter')
+
+ # C-specific flags
+-env.Replace(CFLAGS = ' -std=c99 -fno-strict-aliasing -pipe')
++env.Replace(CFLAGS = os.getenv('CFLAGS','') + ' -std=c99 -fno-strict-aliasing -pipe')
+
+ # CXX-specific flags
+ # Note: not all 3rd-party libs like '-Wold-style-cast -Weffc++'
+ # adding those after checks
+-env.Replace(CXXFLAGS = ' -Wno-long-long -Wno-deprecated -ansi')
++env.Replace(CXXFLAGS = os.getenv('CXXFLAGS','') + ' -Wno-long-long -Wno-deprecated -ansi')
+ if sysname != 'sunos':
+ env.Append(CXXFLAGS = ' -pipe')
+
+@@ -228,7 +228,7 @@
+ # TODO: enable '-Wl,--warn-common -Wl,--fatal-warnings' after warnings from
+ # static linking have beed addressed
+ #
+-env.Append(LINKFLAGS = link_arch)
++env.Append(LINKFLAGS = link_arch + ' ' + os.getenv('LDFLAGS',''))
+
+ #
+ # Check required headers and libraries (autoconf functionality)
diff --git a/sys-cluster/galera/galera-25.3.10.ebuild b/sys-cluster/galera/galera-25.3.10.ebuild
new file mode 100644
index 00000000000..91d7bbb18b0
--- /dev/null
+++ b/sys-cluster/galera/galera-25.3.10.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit scons-utils multilib toolchain-funcs eutils user flag-o-matic
+
+MY_PV="release_${PV}"
+DESCRIPTION="Synchronous multi-master replication engine that provides its service through wsrep API"
+HOMEPAGE="http://www.galeracluster.com/"
+SRC_URI="https://github.com/codership/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_sse4_2 garbd ssl test"
+
+CDEPEND="
+ ssl? ( dev-libs/openssl:0= )
+ >=dev-libs/boost-1.41:0=
+ "
+DEPEND="${DEPEND}
+ ${CDEPEND}
+ dev-libs/check
+ >=sys-devel/gcc-4.4
+ >=dev-cpp/asio-1.4.8[ssl?]
+ "
+#Run time only
+RDEPEND="${CDEPEND}
+ garbd? ( || (
+ net-analyzer/netcat
+ net-analyzer/netcat6
+ net-analyzer/gnu-netcat
+ net-analyzer/openbsd-netcat
+ ) )"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+pkg_preinst() {
+ if use garbd ; then
+ enewgroup garbd
+ enewuser garbd -1 -1 -1 garbd
+ fi
+}
+
+src_prepare() {
+ # Remove bundled dev-cpp/asio
+ rm -r "${S}/asio" || die
+
+ # Respect {C,LD}FLAGS and remove machine specific CFLAGS
+ epatch "${FILESDIR}/respect-flags.patch" \
+ "${FILESDIR}/galera-strip-machine-cflags.patch"
+
+ #Remove optional garbd daemon
+ if ! use garbd ; then
+ rm -r "${S}/garb" || die
+ fi
+
+ epatch_user
+}
+
+src_configure() {
+ tc-export CC CXX
+ # Uses hardware specific code that seems to depend on SSE4.2
+ if use cpu_flags_x86_sse4_2 ; then
+ append-cflags -msse4.2
+ else
+ append-cflags -DCRC32C_NO_HARDWARE
+ fi
+ # strict_build_flags=0 disables -Werror, -pedantic, -Weffc++,
+ # and -Wold-style-cast
+ myesconsargs=(
+ $(use_scons ssl ssl 1 0)
+ $(use_scons test tests 1 0)
+ strict_build_flags=0
+ )
+}
+
+src_compile() {
+ escons --warn=no-missing-sconscript
+}
+
+src_install() {
+ dodoc scripts/packages/README scripts/packages/README-MySQL
+ if use garbd ; then
+ dobin garb/garbd
+ newconfd "${FILESDIR}/garb.cnf" garbd
+ newinitd "${FILESDIR}/garb.sh" garbd
+ doman man/garbd.8
+ fi
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe libgalera_smm.so
+}
diff --git a/sys-cluster/galera/galera-25.3.5.ebuild b/sys-cluster/galera/galera-25.3.5.ebuild
new file mode 100644
index 00000000000..5a3472d3563
--- /dev/null
+++ b/sys-cluster/galera/galera-25.3.5.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P="${PN}-${PV}-src"
+
+inherit scons-utils multilib toolchain-funcs base versionator eutils user flag-o-matic
+DESCRIPTION="Synchronous multi-master replication engine that provides its service through wsrep API"
+HOMEPAGE="http://www.codership.org/"
+SRC_URI="https://launchpad.net/${PN}/$(get_version_component_range 2).x/${PV}/+download/${MY_P}.tar.gz"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="garbd ssl test"
+
+CDEPEND="
+ ssl? ( dev-libs/openssl:0= )
+ >=dev-libs/boost-1.41
+ "
+DEPEND="${DEPEND}
+ ${CDEPEND}
+ dev-libs/check
+ >=sys-devel/gcc-4.4
+ >=dev-cpp/asio-1.4.8[ssl?]
+ "
+#Run time only
+RDEPEND="${CDEPEND}
+ garbd? ( || (
+ net-analyzer/netcat
+ net-analyzer/netcat6
+ net-analyzer/gnu-netcat
+ net-analyzer/openbsd-netcat
+ ) )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_preinst() {
+ if use garbd ; then
+ enewgroup garbd
+ enewuser garbd -1 -1 -1 garbd
+ fi
+}
+
+src_prepare() {
+ # Remove bundled dev-cpp/asio
+ rm -r "${S}/asio" || die
+
+ # Respect {C,LD}FLAGS.
+ epatch "${FILESDIR}/respect-flags.patch"
+
+ #Remove optional garbd daemon
+ if ! use garbd ; then
+ rm -r "${S}/garb" || die
+ fi
+
+ epatch_user
+}
+
+src_configure() {
+ tc-export CC CXX
+ # strict_build_flags=0 disables -Werror, -pedantic, -Weffc++,
+ # and -Wold-style-cast
+ myesconsargs=(
+ $(use_scons ssl ssl 1 0)
+ $(use_scons test tests 1 0)
+ strict_build_flags=0
+ )
+}
+
+src_compile() {
+ escons --warn=no-missing-sconscript
+}
+
+src_install() {
+ dodoc scripts/packages/README scripts/packages/README-MySQL
+ if use garbd ; then
+ dobin garb/garbd
+ newconfd "${FILESDIR}/garb.cnf" garbd
+ newinitd "${FILESDIR}/garb.sh" garbd
+ fi
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe libgalera_smm.so
+}
diff --git a/sys-cluster/galera/metadata.xml b/sys-cluster/galera/metadata.xml
new file mode 100644
index 00000000000..b4af621f040
--- /dev/null
+++ b/sys-cluster/galera/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mysql</herd>
+ <use>
+ <flag name="garbd">Install Galera Arbitrator - a stateless daemon which acts as a lightweight group member</flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">galera</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/ganglia-web/Manifest b/sys-cluster/ganglia-web/Manifest
new file mode 100644
index 00000000000..0362a0fa9ba
--- /dev/null
+++ b/sys-cluster/ganglia-web/Manifest
@@ -0,0 +1,2 @@
+DIST ganglia-web-3.5.10.tar.gz 1431977 SHA256 cd6948d4a08a65c3f4f042fa22f04948e089b2b1f970ba1f9f3d91c31bc0ca02 SHA512 9f035c27e7afe944d854a701fc70869940c9cacef5b58b92493241a817f4f5b80103191ab6e9c062ade4c92288fdd25097c95f6d57f409d4840cab2c5ee66efd WHIRLPOOL 6a9dad89961f1cb6c7e63a20f8b79eff2c5758795fe4eac89c9c6ea02f3aef0ade7b4b1851c78c0a0f901825883c0bc08419379b81977f532aa56db04a2564c9
+DIST ganglia-web-3.5.8.tar.gz 1431184 SHA256 c1728c6a073a9d4dd66e10a77b0ab34ccf5d7f3ce0d553888390734bc0b79e4c SHA512 1ba5df64801b28a3e412acd6c63301c7911b24d21dc261c9d970bdabeb3c47102ab47e5de89fd5fdcaa6b79a2e9c3421e7abaf0641e25d1f5821c54a232b0933 WHIRLPOOL 739f7873da4a9a559a2e86d98bc24887cf96b120fb9ae03a59a81cc68aea1c72d9c63a0a62bda85578406454b944f805ced6918d2e7fc68e3491f5178f8b47b6
diff --git a/sys-cluster/ganglia-web/files/CVE-2013-6395-fix-xss.patch b/sys-cluster/ganglia-web/files/CVE-2013-6395-fix-xss.patch
new file mode 100644
index 00000000000..6f49bbedb7c
--- /dev/null
+++ b/sys-cluster/ganglia-web/files/CVE-2013-6395-fix-xss.patch
@@ -0,0 +1,27 @@
+From a014c9542710ad50fd1a7fd1eb39b44261edf3a2 Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Mon, 23 Dec 2013 11:39:03 -0500
+Subject: [PATCH] CVE-2013-6395 fix xss
+
+https://bugs.gentoo.org/show_bug.cgi?id=492580
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-6395
+---
+ header.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/header.php b/header.php
+index d0a30c2..e1cb0e8 100755
+--- a/header.php
++++ b/header.php
+@@ -485,7 +485,7 @@ $data->assign("custom_time", $custom_time);
+ /////////////////////////////////////////////////////////////////////////
+ if ( $context == "cluster" ) {
+ if ( isset($user['host_regex']) && $user['host_regex'] != "" )
+- $set_host_regex_value="value='" . $user['host_regex'] . "'";
++ $set_host_regex_value="value='" . htmlentities($user['host_regex'], ENT_QUOTES) . "'";
+ else
+ $set_host_regex_value="";
+
+--
+1.8.3.2
+
diff --git a/sys-cluster/ganglia-web/ganglia-web-3.5.10-r1.ebuild b/sys-cluster/ganglia-web/ganglia-web-3.5.10-r1.ebuild
new file mode 100644
index 00000000000..bba2fa8abee
--- /dev/null
+++ b/sys-cluster/ganglia-web/ganglia-web-3.5.10-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+WEBAPP_MANUAL_SLOT="yes"
+inherit webapp eutils
+
+DESCRIPTION="Web frontend for sys-cluster/ganglia"
+HOMEPAGE="http://ganglia.sourceforge.net"
+SRC_URI="mirror://sourceforge/ganglia/${PN}/${PV}/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="vhosts"
+
+DEPEND="net-misc/rsync"
+RDEPEND="
+ ${DEPEND}
+ ${WEBAPP_DEPEND}
+ >=sys-cluster/ganglia-3.3.7[-minimal]
+ dev-lang/php[gd,xml,ctype,cgi]
+ media-fonts/dejavu"
+
+src_configure() {
+ return 0
+}
+
+src_compile() {
+ return 0
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/CVE-2013-6395-fix-xss.patch
+}
+
+src_install() {
+ webapp_src_preinst
+ cd "${S}"
+ emake \
+ GDESTDIR="${MY_HTDOCSDIR}" \
+ DESTDIR="${D}" \
+ APACHE_USER=nobody \
+ install || die
+ webapp_configfile "${MY_HTDOCSDIR}"/conf_default.php
+ webapp_src_install
+
+ fowners -R nobody:nobody /var/lib/ganglia-web/dwoo
+ fperms -R 777 /var/lib/ganglia-web/dwoo
+
+ dodoc AUTHORS README TODO || die
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+
+ # upgrade from < 3.5.6
+ if [ -d "${ROOT}"/var/lib/ganglia/dwoo ]; then
+ rm -rf "${ROOT}"/var/lib/ganglia/dwoo || die
+ fi
+}
diff --git a/sys-cluster/ganglia-web/ganglia-web-3.5.8-r1.ebuild b/sys-cluster/ganglia-web/ganglia-web-3.5.8-r1.ebuild
new file mode 100644
index 00000000000..1a2c10828c4
--- /dev/null
+++ b/sys-cluster/ganglia-web/ganglia-web-3.5.8-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+WEBAPP_MANUAL_SLOT="yes"
+inherit webapp eutils
+
+DESCRIPTION="Web frontend for sys-cluster/ganglia"
+HOMEPAGE="http://ganglia.sourceforge.net"
+SRC_URI="mirror://sourceforge/ganglia/${PN}/${PV}/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="vhosts"
+
+DEPEND="net-misc/rsync"
+RDEPEND="
+ ${DEPEND}
+ ${WEBAPP_DEPEND}
+ >=sys-cluster/ganglia-3.3.7[-minimal]
+ dev-lang/php[gd,xml,ctype,cgi]
+ media-fonts/dejavu"
+
+src_configure() {
+ return 0
+}
+
+src_compile() {
+ return 0
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/CVE-2013-6395-fix-xss.patch
+}
+
+src_install() {
+ webapp_src_preinst
+ cd "${S}"
+ emake \
+ GDESTDIR="${MY_HTDOCSDIR}" \
+ DESTDIR="${D}" \
+ APACHE_USER=nobody \
+ install || die
+ webapp_configfile "${MY_HTDOCSDIR}"/conf_default.php
+ webapp_src_install
+
+ fowners -R nobody:nobody /var/lib/ganglia-web/dwoo
+ fperms -R 777 /var/lib/ganglia-web/dwoo
+
+ dodoc AUTHORS README TODO || die
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+
+ # upgrade from < 3.5.6
+ if [ -d "${ROOT}"/var/lib/ganglia/dwoo ]; then
+ rm -rf "${ROOT}"/var/lib/ganglia/dwoo || die
+ fi
+}
diff --git a/sys-cluster/ganglia-web/metadata.xml b/sys-cluster/ganglia-web/metadata.xml
new file mode 100644
index 00000000000..e6685629582
--- /dev/null
+++ b/sys-cluster/ganglia-web/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>jsbronder@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ganglia</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/ganglia/Manifest b/sys-cluster/ganglia/Manifest
new file mode 100644
index 00000000000..37e24444b3c
--- /dev/null
+++ b/sys-cluster/ganglia/Manifest
@@ -0,0 +1,3 @@
+DIST ganglia-3.5.0.tar.gz 1234790 SHA256 43a9a6349e2c04cd106a41f89d4cf544de05d4afe5d3be9918dd187485c7e691 SHA512 0d1e547cdfd8eb0ac57b9b8bb4c0f2d9dc67d30de08201f1c4935c356e4ae8fc283e1ce63c16aafeb8f74b1b837c336f66d42cb65b24083933ef03f44139dc24 WHIRLPOOL 118bc8d6f830cd26bbdb0f4309cf9312d1aa78f36fee58e0fa92e9c9504a244c7bbf3d1a3aab445fa5fe3bc93325acd55bf91b2673b95c7fc58866619b0c0f0f
+DIST ganglia-3.6.0.tar.gz 1248273 SHA256 89eae02e1a117040d60b3b561fe55f88d7f8cf41b94af1492969ef68e6797886 SHA512 2a05d37787f1440c0c4aa91cdf0f4f4cb39c840b3b0fdcd6fe58cfb5892a75f81d36f6191c83c17558c37154298268df74fa255d2c940a8b84a7bf3ddb102394 WHIRLPOOL 7d62d13231247e5f8a56263f3c1ef10cd6f2bb84fe614ae47a633d5f2f212eceb3a461f642572e18173ac7c71160b6463dab8911d381944f262b651b8b9feda9
+DIST ganglia-3.7.1.tar.gz 1311019 SHA256 e735a6218986a0ff77c737e5888426b103196c12dc2d679494ca9a4269ca69a3 SHA512 1c3519cec0015cc967536a8c72cedd1b1bc268e0e238538756b1f46fd741b56ebaacc6f518c57eb111c30fd2e56372cba4593e4487c9ed68472aa59d24ce66a8 WHIRLPOOL 7d37d1c6b23d417d2a24b654393b32b1c3bf7dcdfd18c960994a2b8f226559e7e5d5149bc87d5072bb1d9b48e4a871775334e2af22d7567a124519d1aa120a78
diff --git a/sys-cluster/ganglia/files/ganglia-3.1.1-ctype-c99.patch b/sys-cluster/ganglia/files/ganglia-3.1.1-ctype-c99.patch
new file mode 100644
index 00000000000..e462de57a94
--- /dev/null
+++ b/sys-cluster/ganglia/files/ganglia-3.1.1-ctype-c99.patch
@@ -0,0 +1,13 @@
+diff -urN a/ganglia-3.1.1/libmetrics/linux/metrics.c b/ganglia-3.1.1/libmetrics/linux/metrics.c
+--- a/ganglia-3.1.1/libmetrics/linux/metrics.c 2008-08-25 13:44:57.000000000 -0400
++++ b/ganglia-3.1.1/libmetrics/linux/metrics.c 2008-11-18 21:33:01.370635031 -0500
+@@ -3,6 +3,9 @@
+ #ifndef __USE_GNU
+ #define __USE_GNU
+ #endif
++#ifndef __USE_ISOC99
++#define __USE_ISOC99
++#endif
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
diff --git a/sys-cluster/ganglia/files/ganglia-3.1.1-multidisk-group.patch b/sys-cluster/ganglia/files/ganglia-3.1.1-multidisk-group.patch
new file mode 100644
index 00000000000..e908764131e
--- /dev/null
+++ b/sys-cluster/ganglia/files/ganglia-3.1.1-multidisk-group.patch
@@ -0,0 +1,11 @@
+diff -urN a/ganglia-3.1.1/gmond/python_modules/disk/multidisk.py b/ganglia-3.1.1/gmond/python_modules/disk/multidisk.py
+--- a/ganglia-3.1.1/gmond/python_modules/disk/multidisk.py 2008-08-25 13:44:57.000000000 -0400
++++ b/ganglia-3.1.1/gmond/python_modules/disk/multidisk.py 2008-11-18 21:40:41.768077035 -0500
+@@ -92,6 +92,7 @@
+ 'slope': slope,
+ 'format': fmt,
+ 'description': desc,
++ 'groups': 'disk',
+ 'mount': line[1]}
+ return d
+
diff --git a/sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow-r1.patch b/sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow-r1.patch
new file mode 100644
index 00000000000..c8858e81ad1
--- /dev/null
+++ b/sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow-r1.patch
@@ -0,0 +1,48 @@
+Index: gmetad/server.c
+===================================================================
+--- gmetad/server.c (revision 1953)
++++ gmetad/server.c (working copy)
+@@ -370,14 +370,13 @@
+
+ /* sacerdoti: This function does a tree walk while respecting the filter path.
+ * Will return valid XML even if we have chosen a subtree. Since tree depth is
+- * bounded, this function guarantees O(1) search time. The recursive structure
+- * does not require any memory allocations.
++ * bounded, this function guarantees O(1) search time.
+ */
+ static int
+ process_path (client_t *client, char *path, datum_t *myroot, datum_t *key)
+ {
+ char *p, *q, *pathend;
+- char element[256];
++ char *element;
+ int rc, len;
+ datum_t *found;
+ datum_t findkey;
+@@ -419,6 +418,9 @@
+ if (!q) q=pathend;
+
+ len = q-p;
++ element = malloc(len + 1);
++ if ( element == NULL )
++ return 1;
+ strncpy(element, p, len);
+ element[len] = '\0';
+
+@@ -440,6 +442,7 @@
+ {
+ rc = process_path(client, 0, myroot, NULL);
+ }
++ free(element);
+ }
+ if (rc) return 1;
+
+@@ -537,7 +540,7 @@
+ socklen_t len;
+ client_t client;
+ char remote_ip[16];
+- char request[REQUESTLEN];
++ char request[REQUESTLEN + 1];
+ llist_entry *le;
+ datum_t rootdatum;
+
diff --git a/sys-cluster/ganglia/files/gmetad-python.rc b/sys-cluster/ganglia/files/gmetad-python.rc
new file mode 100644
index 00000000000..fe8d70f6fce
--- /dev/null
+++ b/sys-cluster/ganglia/files/gmetad-python.rc
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PIDFILE=/var/run/gmetad-python.pid
+
+depend() {
+ need net
+ after ntp-client ntpd
+}
+
+start() {
+ ebegin "Starting GANGLIA gmetad-python: "
+ start-stop-daemon \
+ --start --quiet \
+ --exec /usr/bin/gmetad.py \
+ --pidfile ${PIDFILE} \
+ -- \
+ -p ${PIDFILE}
+ eend $? "Failed to start gmetad-python"
+}
+
+stop() {
+ ebegin "Shutting down GANGLIA gmetad-python: "
+ start-stop-daemon \
+ --stop --quiet \
+ --pidfile ${PIDFILE} \
+ --exec /usr/bin/gmetad.py
+ eend $? "Failed to stop gmetad-python"
+}
diff --git a/sys-cluster/ganglia/files/gmetad.rc b/sys-cluster/ganglia/files/gmetad.rc
new file mode 100755
index 00000000000..3ca5f36121f
--- /dev/null
+++ b/sys-cluster/ganglia/files/gmetad.rc
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after ntp-client ntpd
+}
+
+start() {
+ ebegin "Starting GANGLIA gmetad: "
+ start-stop-daemon --start --quiet --exec /usr/sbin/gmetad
+ eend $? "Failed to start gmetad"
+}
+
+stop() {
+ ebegin "Shutting down GANGLIA gmetad: "
+ start-stop-daemon --stop --quiet --exec /usr/sbin/gmetad
+ eend $? "Failed to stop gmetad"
+}
diff --git a/sys-cluster/ganglia/files/gmetad.rc-2 b/sys-cluster/ganglia/files/gmetad.rc-2
new file mode 100755
index 00000000000..9cd10087b93
--- /dev/null
+++ b/sys-cluster/ganglia/files/gmetad.rc-2
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+PIDFILE=/var/run/gmetad.pid
+
+depend() {
+ need net
+ after ntp-client ntpd
+}
+
+start() {
+ ebegin "Starting GANGLIA gmetad: "
+ start-stop-daemon \
+ --start --quiet \
+ --exec /usr/sbin/gmetad \
+ --pidfile ${PIDFILE} \
+ -- \
+ --pid-file=${PIDFILE}
+ eend $? "Failed to start gmetad"
+}
+
+stop() {
+ ebegin "Shutting down GANGLIA gmetad: "
+ start-stop-daemon \
+ --stop --quiet \
+ --pidfile ${PIDFILE} \
+ --exec /usr/sbin/gmetad
+ eend $? "Failed to stop gmetad"
+}
diff --git a/sys-cluster/ganglia/files/gmond.rc b/sys-cluster/ganglia/files/gmond.rc
new file mode 100755
index 00000000000..276972fe2d0
--- /dev/null
+++ b/sys-cluster/ganglia/files/gmond.rc
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after ntp-client ntpd
+}
+
+start() {
+ ebegin "Starting GANGLIA gmond: "
+ start-stop-daemon --start --quiet --exec /usr/sbin/gmond
+ eend $? "Failed to start gmond"
+}
+
+stop() {
+ ebegin "Shutting down GANGLIA gmond: "
+ start-stop-daemon --stop --quiet --exec /usr/sbin/gmond
+ eend $? "Failed to stop gmond"
+}
diff --git a/sys-cluster/ganglia/files/gmond.rc-2 b/sys-cluster/ganglia/files/gmond.rc-2
new file mode 100755
index 00000000000..c49f8fc512e
--- /dev/null
+++ b/sys-cluster/ganglia/files/gmond.rc-2
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+PIDFILE=/var/run/gmond.pid
+
+depend() {
+ need net
+ after ntp-client ntpd
+}
+
+start() {
+ ebegin "Starting GANGLIA gmond: "
+ start-stop-daemon \
+ --start --quiet \
+ --exec /usr/sbin/gmond \
+ --pidfile ${PIDFILE} \
+ -- \
+ --pid-file=${PIDFILE}
+ eend $? "Failed to start gmond"
+}
+
+stop() {
+ ebegin "Shutting down GANGLIA gmond: "
+ start-stop-daemon \
+ --stop --quiet \
+ --pidfile ${PIDFILE} \
+ --exec /usr/sbin/gmond
+ eend $? "Failed to stop gmond"
+}
diff --git a/sys-cluster/ganglia/ganglia-3.5.0-r1.ebuild b/sys-cluster/ganglia/ganglia-3.5.0-r1.ebuild
new file mode 100644
index 00000000000..40608e52820
--- /dev/null
+++ b/sys-cluster/ganglia/ganglia-3.5.0-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib python-single-r1
+
+DESCRIPTION="A scalable distributed monitoring system for clusters and grids"
+HOMEPAGE="http://ganglia.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ganglia/${P}.tar.gz"
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="minimal pcre python examples"
+
+DEPEND="dev-libs/confuse
+ dev-libs/expat
+ >=dev-libs/apr-1.0
+ !dev-db/firebird
+ pcre? ( dev-libs/libpcre )
+ python? ( ${PYTHON_DEPS} )"
+
+RDEPEND="
+ ${DEPEND}
+ !minimal? ( net-analyzer/rrdtool )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ econf \
+ --enable-gexec \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --enable-static=no \
+ $(use_enable python) \
+ $(use_with pcre libpcre) \
+ $(use_with !minimal gmetad)
+}
+
+src_install() {
+ local exdir=/usr/share/doc/${P}
+
+ emake DESTDIR="${D}" install || die
+
+ newinitd "${FILESDIR}"/gmond.rc-2 gmond
+ doman {mans/*.1,gmond/*.5} || die "Failed to install manpages"
+ dodoc AUTHORS INSTALL NEWS README || die
+
+ dodir /etc/ganglia/conf.d
+ use python && dodir /usr/$(get_libdir)/ganglia/python_modules
+ gmond/gmond -t > "${ED}"/etc/ganglia/gmond.conf
+
+ if use examples; then
+ insinto ${exdir}/cmod-examples
+ doins gmond/modules/example/*.c
+ if use python; then
+ # Installing as an examples per upstream.
+ insinto ${exdir}/pymod-examples
+ doins gmond/python_modules/*/*.py
+ insinto ${exdir}/pymod-examples/conf.d
+ doins gmond/python_modules/conf.d/*.pyconf
+ fi
+ fi
+
+ if ! use minimal; then
+ insinto /etc/ganglia
+ doins gmetad/gmetad.conf
+ doman mans/gmetad.1
+
+ newinitd "${FILESDIR}"/gmetad.rc-2 gmetad
+ keepdir /var/lib/ganglia/rrds
+ fowners nobody:nobody /var/lib/ganglia/rrds
+ fi
+}
+
+pkg_postinst() {
+ elog "A default configuration file for gmond has been generated"
+ elog "for you as a template by running:"
+ elog " /usr/sbin/gmond -t > /etc/ganglia/gmond.conf"
+
+ elog "The web frontend for Ganglia has been split off. Emerge"
+ elog "sys-cluster/ganglia-web if you need it."
+}
diff --git a/sys-cluster/ganglia/ganglia-3.5.0.ebuild b/sys-cluster/ganglia/ganglia-3.5.0.ebuild
new file mode 100644
index 00000000000..2f2bd3b88ec
--- /dev/null
+++ b/sys-cluster/ganglia/ganglia-3.5.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="python? 2"
+
+inherit eutils multilib python
+
+DESCRIPTION="A scalable distributed monitoring system for clusters and grids"
+HOMEPAGE="http://ganglia.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ganglia/${P}.tar.gz"
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="minimal pcre python examples"
+
+DEPEND="dev-libs/confuse
+ dev-libs/expat
+ >=dev-libs/apr-1.0
+ !dev-db/firebird
+ pcre? ( dev-libs/libpcre )"
+
+RDEPEND="
+ ${DEPEND}
+ !minimal? ( net-analyzer/rrdtool )"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_configure() {
+ econf \
+ --enable-gexec \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --enable-static=no \
+ $(use_enable python) \
+ $(use_with pcre libpcre) \
+ $(use_with !minimal gmetad)
+}
+
+src_install() {
+ local exdir=/usr/share/doc/${P}
+
+ emake DESTDIR="${D}" install || die
+
+ newinitd "${FILESDIR}"/gmond.rc-2 gmond
+ doman {mans/*.1,gmond/*.5} || die "Failed to install manpages"
+ dodoc AUTHORS INSTALL NEWS README || die
+
+ dodir /etc/ganglia/conf.d
+ use python && dodir /usr/$(get_libdir)/ganglia/python_modules
+ gmond/gmond -t > "${ED}"/etc/ganglia/gmond.conf
+
+ if use examples; then
+ insinto ${exdir}/cmod-examples
+ doins gmond/modules/example/*.c
+ if use python; then
+ # Installing as an examples per upstream.
+ insinto ${exdir}/pymod-examples
+ doins gmond/python_modules/*/*.py
+ insinto ${exdir}/pymod-examples/conf.d
+ doins gmond/python_modules/conf.d/*.pyconf
+ fi
+ fi
+
+ if ! use minimal; then
+ insinto /etc/ganglia
+ doins gmetad/gmetad.conf
+ doman mans/gmetad.1
+
+ newinitd "${FILESDIR}"/gmetad.rc-2 gmetad
+ keepdir /var/lib/ganglia/rrds
+ fowners nobody:nobody /var/lib/ganglia/rrds
+ fi
+}
+
+pkg_postinst() {
+ elog "A default configuration file for gmond has been generated"
+ elog "for you as a template by running:"
+ elog " /usr/sbin/gmond -t > /etc/ganglia/gmond.conf"
+
+ elog "The web frontend for Ganglia has been split off. Emerge"
+ elog "sys-cluster/ganglia-web if you need it."
+}
diff --git a/sys-cluster/ganglia/ganglia-3.6.0-r1.ebuild b/sys-cluster/ganglia/ganglia-3.6.0-r1.ebuild
new file mode 100644
index 00000000000..40108cedcf5
--- /dev/null
+++ b/sys-cluster/ganglia/ganglia-3.6.0-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib python-single-r1
+
+DESCRIPTION="A scalable distributed monitoring system for clusters and grids"
+HOMEPAGE="http://ganglia.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ganglia/${P}.tar.gz"
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="minimal pcre python examples"
+
+DEPEND="dev-libs/confuse
+ dev-libs/expat
+ >=dev-libs/apr-1.0
+ !dev-db/firebird
+ pcre? ( dev-libs/libpcre )
+ python? ( ${PYTHON_DEPS} )"
+
+RDEPEND="
+ ${DEPEND}
+ !minimal? ( net-analyzer/rrdtool )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ # systemd unit building fails, this can probably be re-enabled in the next
+ # release (#533598)
+ econf \
+ --without-systemdsystemunitdir \
+ --enable-gexec \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --enable-static=no \
+ $(use_enable python) \
+ $(use_with pcre libpcre) \
+ $(use_with !minimal gmetad)
+}
+
+src_install() {
+ local exdir=/usr/share/doc/${P}
+
+ emake DESTDIR="${D}" install || die
+
+ newinitd "${FILESDIR}"/gmond.rc-2 gmond
+ doman {mans/*.1,gmond/*.5} || die "Failed to install manpages"
+ dodoc AUTHORS INSTALL NEWS README || die
+
+ dodir /etc/ganglia/conf.d
+ use python && dodir /usr/$(get_libdir)/ganglia/python_modules
+ gmond/gmond -t > "${ED}"/etc/ganglia/gmond.conf
+
+ if use examples; then
+ insinto ${exdir}/cmod-examples
+ doins gmond/modules/example/*.c
+ if use python; then
+ # Installing as an examples per upstream.
+ insinto ${exdir}/pymod-examples
+ doins gmond/python_modules/*/*.py
+ insinto ${exdir}/pymod-examples/conf.d
+ doins gmond/python_modules/conf.d/*.pyconf
+ fi
+ fi
+
+ if ! use minimal; then
+ insinto /etc/ganglia
+ doins gmetad/gmetad.conf
+ doman mans/gmetad.1
+
+ newinitd "${FILESDIR}"/gmetad.rc-2 gmetad
+ keepdir /var/lib/ganglia/rrds
+ fowners nobody:nobody /var/lib/ganglia/rrds
+ fi
+}
+
+pkg_postinst() {
+ elog "A default configuration file for gmond has been generated"
+ elog "for you as a template by running:"
+ elog " /usr/sbin/gmond -t > /etc/ganglia/gmond.conf"
+
+ elog "The web frontend for Ganglia has been split off. Emerge"
+ elog "sys-cluster/ganglia-web if you need it."
+}
diff --git a/sys-cluster/ganglia/ganglia-3.7.1-r1.ebuild b/sys-cluster/ganglia/ganglia-3.7.1-r1.ebuild
new file mode 100644
index 00000000000..babd14ca2d6
--- /dev/null
+++ b/sys-cluster/ganglia/ganglia-3.7.1-r1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="A scalable distributed monitoring system for clusters and grids"
+HOMEPAGE="http://ganglia.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ganglia/${P}.tar.gz"
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="minimal pcre python examples"
+
+DEPEND="dev-libs/confuse
+ dev-libs/expat
+ >=dev-libs/apr-1.0
+ !dev-db/firebird
+ pcre? ( dev-libs/libpcre )
+ python? ( ${PYTHON_DEPS} )"
+
+RDEPEND="
+ ${DEPEND}
+ !minimal? ( net-analyzer/rrdtool )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+src_prepare() {
+ if use python && ! use minimal; then
+ pushd gmetad-python >/dev/null || die
+ distutils-r1_src_prepare
+ popd >/dev/null || die
+ fi
+}
+
+src_configure() {
+ if use python; then
+ python_setup
+ fi
+
+ econf \
+ --with-systemdsystemunitdir=$(systemd_get_unitdir) \
+ --enable-gexec \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --enable-static=no \
+ $(use_enable python) \
+ $(use_with pcre libpcre) \
+ $(use_with !minimal gmetad)
+}
+
+src_compile() {
+ default_src_compile
+
+ if use python && ! use minimal; then
+ pushd gmetad-python >/dev/null || die
+ distutils-r1_src_compile
+ popd >/dev/null || die
+ fi
+}
+
+src_install() {
+ local exdir=/usr/share/doc/${P}
+
+ emake DESTDIR="${D}" install || die
+
+ newinitd "${FILESDIR}"/gmond.rc-2 gmond
+ doman {mans/*.1,gmond/*.5} || die "Failed to install manpages"
+ dodoc AUTHORS INSTALL NEWS README || die
+
+ dodir /etc/ganglia/conf.d
+ use python && dodir /usr/$(get_libdir)/ganglia/python_modules
+ gmond/gmond -t > "${ED}"/etc/ganglia/gmond.conf
+
+ if use examples; then
+ insinto ${exdir}/cmod-examples
+ doins gmond/modules/example/*.c
+ if use python; then
+ # Installing as an examples per upstream.
+ insinto ${exdir}/pymod-examples
+ doins gmond/python_modules/*/*.py
+ insinto ${exdir}/pymod-examples/conf.d
+ doins gmond/python_modules/conf.d/*.pyconf
+ fi
+ fi
+
+ if ! use minimal; then
+ insinto /etc/ganglia
+ doins gmetad/gmetad.conf
+ doman mans/gmetad.1
+
+ newinitd "${FILESDIR}"/gmetad.rc-2 gmetad
+ keepdir /var/lib/ganglia/rrds
+ fowners nobody:nobody /var/lib/ganglia/rrds
+
+ if use python; then
+ pushd gmetad-python >/dev/null || die
+ distutils-r1_src_install
+ popd >/dev/null || die
+ newinitd "${FILESDIR}"/gmetad-python.rc gmetad-python
+ fi
+ fi
+}
+
+src_test() {
+ default_src_test
+
+ if use python && ! use minimal; then
+ pushd gmetad-python >/dev/null || die
+ distutils-r1_src_test
+ popd >/dev/null || die
+ fi
+}
+
+pkg_postinst() {
+ elog "A default configuration file for gmond has been generated"
+ elog "for you as a template by running:"
+ elog " /usr/sbin/gmond -t > /etc/ganglia/gmond.conf"
+
+ elog "The web frontend for Ganglia has been split off. Emerge"
+ elog "sys-cluster/ganglia-web if you need it."
+}
diff --git a/sys-cluster/ganglia/ganglia-3.7.1.ebuild b/sys-cluster/ganglia/ganglia-3.7.1.ebuild
new file mode 100644
index 00000000000..8a9f4c86fbe
--- /dev/null
+++ b/sys-cluster/ganglia/ganglia-3.7.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib python-single-r1 systemd
+
+DESCRIPTION="A scalable distributed monitoring system for clusters and grids"
+HOMEPAGE="http://ganglia.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ganglia/${P}.tar.gz"
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="minimal pcre python examples"
+
+DEPEND="dev-libs/confuse
+ dev-libs/expat
+ >=dev-libs/apr-1.0
+ !dev-db/firebird
+ pcre? ( dev-libs/libpcre )
+ python? ( ${PYTHON_DEPS} )"
+
+RDEPEND="
+ ${DEPEND}
+ !minimal? ( net-analyzer/rrdtool )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ econf \
+ --with-systemdsystemunitdir=$(systemd_get_unitdir) \
+ --enable-gexec \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --enable-static=no \
+ $(use_enable python) \
+ $(use_with pcre libpcre) \
+ $(use_with !minimal gmetad)
+}
+
+src_install() {
+ local exdir=/usr/share/doc/${P}
+
+ emake DESTDIR="${D}" install || die
+
+ newinitd "${FILESDIR}"/gmond.rc-2 gmond
+ doman {mans/*.1,gmond/*.5} || die "Failed to install manpages"
+ dodoc AUTHORS INSTALL NEWS README || die
+
+ dodir /etc/ganglia/conf.d
+ use python && dodir /usr/$(get_libdir)/ganglia/python_modules
+ gmond/gmond -t > "${ED}"/etc/ganglia/gmond.conf
+
+ if use examples; then
+ insinto ${exdir}/cmod-examples
+ doins gmond/modules/example/*.c
+ if use python; then
+ # Installing as an examples per upstream.
+ insinto ${exdir}/pymod-examples
+ doins gmond/python_modules/*/*.py
+ insinto ${exdir}/pymod-examples/conf.d
+ doins gmond/python_modules/conf.d/*.pyconf
+ fi
+ fi
+
+ if ! use minimal; then
+ insinto /etc/ganglia
+ doins gmetad/gmetad.conf
+ doman mans/gmetad.1
+
+ newinitd "${FILESDIR}"/gmetad.rc-2 gmetad
+ keepdir /var/lib/ganglia/rrds
+ fowners nobody:nobody /var/lib/ganglia/rrds
+ fi
+}
+
+pkg_postinst() {
+ elog "A default configuration file for gmond has been generated"
+ elog "for you as a template by running:"
+ elog " /usr/sbin/gmond -t > /etc/ganglia/gmond.conf"
+
+ elog "The web frontend for Ganglia has been split off. Emerge"
+ elog "sys-cluster/ganglia-web if you need it."
+}
diff --git a/sys-cluster/ganglia/metadata.xml b/sys-cluster/ganglia/metadata.xml
new file mode 100644
index 00000000000..e6685629582
--- /dev/null
+++ b/sys-cluster/ganglia/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>jsbronder@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ganglia</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/gearmand/Manifest b/sys-cluster/gearmand/Manifest
new file mode 100644
index 00000000000..af094dd2335
--- /dev/null
+++ b/sys-cluster/gearmand/Manifest
@@ -0,0 +1 @@
+DIST gearmand-0.34.tar.gz 842579 SHA256 968d701233f2376060274a69fa7c1b8e99f34b454a401805a2bd62067c13bca1 SHA512 8263cd19337f56cb692209efb4867b54954081a907c109b4828c1a7dfd8e1dec803f9c06e0f09e1ec6cc4271299bf77bcd5069b765647b31559480b4e7e756ba WHIRLPOOL 19e3c8b6e5f5c4edb15413901fb9c250a3d85a4ad0f9a13a7e3165732733c6e8e1072be593ba0820cd34e837e83638464b079dd9c840ffb336d67aee13a6bd86
diff --git a/sys-cluster/gearmand/files/gearmand.conf.d b/sys-cluster/gearmand/files/gearmand.conf.d
new file mode 100644
index 00000000000..aeb49d5c6b9
--- /dev/null
+++ b/sys-cluster/gearmand/files/gearmand.conf.d
@@ -0,0 +1,39 @@
+# /etc/conf.d/gearmand: config file for /etc/init.d/gearmand
+
+# Persistent queue store
+# The following queue stores are available:
+# drizzle|memcache|mysql|postgre|sqlite|tokyocabinet|none
+# If you do not wish to use persistent queues, leave this option commented out.
+# Note that persistent queue mechanisms are mutally exclusive.
+#PERSISTENT=""
+
+# Persistent queue settings for drizzle, mysql and postgre
+#PERSISTENT_SOCKET=""
+#PERSISTENT_HOST=""
+#PERSISTENT_PORT=""
+#PERSISTENT_USER=""
+#PERSISTENT_PASS=""
+#PERSISTENT_DB=""
+#PERSISTENT_TABLE=""
+
+# Persistent queue settings for sqlite
+#PERSISTENT_FILE=""
+
+# Persistent queue settings for memcache
+#PERSISTENT_SERVERLIST=""
+
+# General settings
+#
+# -j, --job-retries=RETRIES Number of attempts to run the job before the job
+# server removes it. Thisis helpful to ensure a bad
+# job does not crash all available workers. Default
+# is no limit.
+# -L, --listen=ADDRESS Address the server should listen on. Default is
+# INADDR_ANY.
+# -p, --port=PORT Port the server should listen on. Default=4730.
+# -r, --protocol=PROTOCOL Load protocol module.
+# -t, --threads=THREADS Number of I/O threads to use. Default=0.
+# -v, --verbose Increase verbosity level by one.
+# -w, --worker-wakeup=WORKERS Number of workers to wakeup for each job received.
+# The default is to wakeup all available workers.
+GEARMAND_PARAMS=""
diff --git a/sys-cluster/gearmand/files/gearmand.init.d.2 b/sys-cluster/gearmand/files/gearmand.init.d.2
new file mode 100644
index 00000000000..bf7d681c90e
--- /dev/null
+++ b/sys-cluster/gearmand/files/gearmand.init.d.2
@@ -0,0 +1,78 @@
+#!/sbin/runscript
+# Copyright 2009-2012 Pavel Stratil, senbonzakura.eu
+# Distributed under the terms of the MIT license
+
+pidfile=/var/run/gearmand/gearmand.pid
+command=/usr/sbin/gearmand
+
+depend() {
+ use localmount
+
+ case $PERSISTENT in
+ drizzle)
+ use drizzle
+ ;;
+ memcache)
+ use memcache
+ ;;
+ mysql)
+ use mysql
+ ;;
+ postgre)
+ use postgresql
+ ;;
+ *)
+ ;;
+ esac
+}
+
+start() {
+ case ${PERSISTENT:-none} in
+ drizzle|mysql)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libdrizzle"
+ [ ${PERSISTENT_HOST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-host=${PERSISTENT_HOST}"
+ [ ${PERSISTENT_USER} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-user=${PERSISTENT_USER}"
+ [ ${PERSISTENT_PASS} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-password=${PERSISTENT_PASS}"
+ [ ${PERSISTENT_DB} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-db=${PERSISTENT_DB}"
+ [ ${PERSISTENT_TABLE} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-table=${PERSISTENT_TABLE}"
+ [ ${PERSISTENT_PORT} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-port=${PERSISTENT_PORT}"
+ [ ${PERSISTENT_SOCKET} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-uds=${PERSISTENT_SOCKET}"
+ [ ${PERSISTENT} == "mysql" ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-mysql"
+ ;;
+ memcache)
+ [ ${PERSISTENT_SERVERLIST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libmemcached --libmemcached-servers=${PERSISTENT_SERVERLIST}"
+ ;;
+ postgre)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libpq"
+ [ ${PERSISTENT_HOST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-host=${PERSISTENT_HOST}"
+ [ ${PERSISTENT_USER} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-user=${PERSISTENT_USER}"
+ [ ${PERSISTENT_PASS} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-password=${PERSISTENT_PASS}"
+ [ ${PERSISTENT_DB} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-dbname=${PERSISTENT_DB}"
+ [ ${PERSISTENT_PORT} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-port=${PERSISTENT_PORT}"
+ [ ${PERSISTENT_TABLE} ] && ewarn "Libpq doesn't recognise 'table' parameter."
+ [ ${PERSISTENT_SOCKET} ] && ewarn "Libpq doesn't recognise 'socket' parameter. If no host is set, it automatically falls back to a socket."
+ ;;
+ tokyocabinet)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libtokyocabinet --libtokyocabinet-file=${PERSISTENT_FILE}"
+ ;;
+ sqlite)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libsqlite3 --libsqlite3-db=${PERSISTENT_FILE}"
+ ;;
+ none)
+ ;;
+ *)
+ eerror "Wrong persistent queue store setting in /etc/conf.d/gearmand."
+ return 1
+ ;;
+ esac
+
+
+ checkpath -d -m 0755 -o gearmand:nogroup /var/run/gearmand /var/log/gearmand
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --pidfile /var/run/gearmand/gearmand.pid --start \
+ --exec /usr/sbin/gearmand -- --pid-file=/var/run/gearmand/gearmand.pid \
+ --user=gearmand --daemon \
+ --log-file=/var/log/gearmand/gearmand.log ${GEARMAND_PARAMS}
+ eend $?
+}
diff --git a/sys-cluster/gearmand/gearmand-0.34-r1.ebuild b/sys-cluster/gearmand/gearmand-0.34-r1.ebuild
new file mode 100644
index 00000000000..8145a81b304
--- /dev/null
+++ b/sys-cluster/gearmand/gearmand-0.34-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic libtool user autotools-utils
+
+DESCRIPTION="Generic framework to farm out work to other machines"
+HOMEPAGE="http://www.gearman.org/"
+SRC_URI="http://launchpad.net/gearmand/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug tcmalloc +memcache drizzle sqlite tokyocabinet postgres"
+
+RDEPEND="dev-libs/libevent
+ >=dev-libs/boost-1.39:=[threads(+)]
+ || ( >=sys-apps/util-linux-2.16 <sys-libs/e2fsprogs-libs-1.41.8 )
+ tcmalloc? ( dev-util/google-perftools )
+ memcache? ( >=dev-libs/libmemcached-0.47 )
+ drizzle? ( dev-db/drizzle )
+ sqlite? ( dev-db/sqlite:3 )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ postgres? ( >=dev-db/postgresql-9.0 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ enewuser gearmand -1 -1 /dev/null nogroup
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable drizzle libdrizzle)
+ $(use_enable memcache libmemcached)
+ $(use_enable postgres libpq)
+ $(use_enable tcmalloc)
+ $(use_enable tokyocabinet libtokyocabinet)
+ $(use_with sqlite sqlite3)
+ --disable-mtmalloc
+ --disable-static
+ )
+
+ # Don't ever use --enable-assert since configure.ac is broken, and
+ # only does --disable-assert correctly.
+ if use debug; then
+ # Since --with-debug would turn off optimisations as well as
+ # enabling debug, we just enable debug through the
+ # preprocessor then.
+ append-cppflags -DDEBUG
+ fi
+
+ autotools-utils_src_configure
+}
+
+src_test() {
+ # Since libtool is stupid and doesn't discard /usr/lib64 from the
+ # load path, we'd end up testing against the installed copy of
+ # gearmand (bad).
+ #
+ # We thus cheat and "fix" the scripts by hand.
+ sed -i -e '/LD_LIBRARY_PATH=/s|/usr/lib64:||' "${BUILD_DIR}"/tests/*_test \
+ || die "test fixing failed"
+
+ autotools-utils_src_test
+}
+
+DOCS=( README AUTHORS ChangeLog )
+
+src_install() {
+ autotools-utils_src_install
+
+ newinitd "${FILESDIR}"/gearmand.init.d.2 gearmand
+ newconfd "${FILESDIR}"/gearmand.conf.d gearmand
+}
+
+pkg_postinst() {
+ elog ""
+ elog "Unless you set the PERSISTENT_TABLE option in"
+ elog "/etc/conf.d/gearmand, Gearmand will use table 'queue'."
+ elog "If such table doesn't exist, Gearmand will create it for you"
+ elog ""
+}
diff --git a/sys-cluster/gearmand/metadata.xml b/sys-cluster/gearmand/metadata.xml
new file mode 100644
index 00000000000..9efee359909
--- /dev/null
+++ b/sys-cluster/gearmand/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>pavel.stratil-jun@fenix.cz</email>
+ <description>Proxied co-maintainer, assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="memcache">
+ Support memcache daemon (via <pkg>dev-libs/libmemcached</pkg>)
+ for the queue storage.
+ </flag>
+ <flag name="drizzle">
+ Support <pkg>dev-db/libdrizzle</pkg> for the queue storage. This
+ also adds support for MySQL storage.
+ </flag>
+ <flag name="tokyocabinet">
+ Support <pkg>dev-db/tokyocabinet</pkg> for the queue storage.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">gearmand</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-cluster/gfs-kernel/Manifest b/sys-cluster/gfs-kernel/Manifest
new file mode 100644
index 00000000000..73196da78bf
--- /dev/null
+++ b/sys-cluster/gfs-kernel/Manifest
@@ -0,0 +1 @@
+DIST cluster-2.03.09.tar.gz 1784357 RMD160 9ac5c3fd0fece8ec17bd31d116c43b33612741d0 SHA1 c2cdbc657da2a9efde4b1e6d2657170e1c09b5b8 SHA256 b6d6f35f58b2f8628c369391e0fd01b1803af40029ec1e6ef88865dda38b855f
diff --git a/sys-cluster/gfs-kernel/gfs-kernel-2.03.09.ebuild b/sys-cluster/gfs-kernel/gfs-kernel-2.03.09.ebuild
new file mode 100644
index 00000000000..c97698709be
--- /dev/null
+++ b/sys-cluster/gfs-kernel/gfs-kernel-2.03.09.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils linux-mod versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="GFS kernel module"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE=""
+
+DEPEND="virtual/linux-sources"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/${PN}"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ case ${KV_FULL} in
+ 2.2.*|2.4.*) die "${P} supports only 2.6 kernels";;
+ esac
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+}
+
+src_compile() {
+ set_arch_to_kernel
+
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --kernel_src="${KERNEL_DIR}" \
+ --disable_kernel_check \
+ ) || die "configure problem"
+
+ (cd "${S}"/src/gfs;
+ emake clean all \
+ ) || die "compile problem"
+}
+
+src_install() {
+ (cd "${S}"/src/gfs;
+ emake DESTDIR="${D}" module_dir="${D}"/lib/modules/${KV_FULL} install \
+ ) || die "install problem"
+
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ einfo ""
+ einfo "Please remember to re-emerge ${PN} when you upgrade your kernel!"
+ einfo ""
+}
diff --git a/sys-cluster/gfs-kernel/metadata.xml b/sys-cluster/gfs-kernel/metadata.xml
new file mode 100644
index 00000000000..348e6c4de81
--- /dev/null
+++ b/sys-cluster/gfs-kernel/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cluster</herd>
+</pkgmetadata>
diff --git a/sys-cluster/glusterfs/Manifest b/sys-cluster/glusterfs/Manifest
new file mode 100644
index 00000000000..e08b3507491
--- /dev/null
+++ b/sys-cluster/glusterfs/Manifest
@@ -0,0 +1,4 @@
+DIST glusterfs-3.1.2.tar.gz 2086469 SHA256 9a4e910431f572aa180a3ad1821f7524773ec1e8f06342c4040f26619f832838 SHA512 69b61af7c6cd9f54f615f7cd50c6ffda670800c6045604449b130eaa43c90c9adcb518c1312134890cccf3a301066a5af3e97bd7ec9775b7f70ea6d0a4a67cd6 WHIRLPOOL 0ecc86ac943f4c8d9575b8b0ae2ef72002d6510945e1a687409277165eb7688c2e4db50532ae10777828646b782561dfd4314fa766d7a3bcf4762e8be7c34c79
+DIST glusterfs-3.2.7.tar.gz 2424292 SHA256 464c089ff9da5a8e17f7caeae48f1cad59973489dfe940a9f0d8db8bc14cd6c4 SHA512 c4a286e1ddfec6c92d011b5abe4f96321e39dff57294141fc44cda4578fa11582095362733092af9042b38528cb328208e9e46a33c40c70e672ffb4e38dcc013 WHIRLPOOL 843a615b334e1ee84c3bcef1a8aceb113eb6976656ae09c6cbf4dcb201f4d37d9cc8ef3ccd3cc4aeb879bffde556b9f6f7105c3c39afed94a19b9613cd8c4284
+DIST glusterfs-3.3.1.tar.gz 2636698 SHA256 19aaefe3a0f9059ae831b44c92944503cf439da82da23467101ac13da8b77519 SHA512 c32e95a0e4568a62fabcf0c52ad3d6a173b62c5536006c3680e3efd1240e2a68177e14891e11d1d16eff5eb67bf60108dbd44151c26241203d8ddb58f0270c69 WHIRLPOOL 30316bbdb7087dd32d35f0f017ea461711830f5450984edb6d6c527d7f9cae5ee307601887cf489a2d675180d1f21a77ac7901f37f44cc860cccbe510c5a18bf
+DIST glusterfs-3.5.3.tar.gz 5021529 SHA256 d805d77da721e6fcb839f1208a9315b4f37b9d2a12c375dd47e5db4a60f5b6c2 SHA512 5a360c9d5180d1e59b8cac9900e4cf776aebf59fd59cca6a0ef27a84cae3781c8c5640b253c73888af751344dce9fd19c1b26bd9aa590ba4fc860143c990f30a WHIRLPOOL a08d3fc6f66dd4191d95611e1b626d8b393e2b8620800039cde20fcebe1643dc2cfe9e7eb3ce3be31aa4f17b8fc881060d40e3493ce189b93668716e2c7ae86d
diff --git a/sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el b/sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el
new file mode 100644
index 00000000000..c14b0d8de33
--- /dev/null
+++ b/sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el
@@ -0,0 +1,5 @@
+
+;;; puppet-mode site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'glusterfs-mode "glusterfs-mode" "Major mode for editing glusterfs manifests")
diff --git a/sys-cluster/glusterfs/files/glusterd-3.2.0-workdir.patch b/sys-cluster/glusterfs/files/glusterd-3.2.0-workdir.patch
new file mode 100644
index 00000000000..a312bdbc64d
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterd-3.2.0-workdir.patch
@@ -0,0 +1,49 @@
+Change the default workdir of the glusterd daemon to /var/lib/glusterd instead of /etc/glusterd.
+This directory is dynamically populated by glusterd via the gluster CLI so it does better
+belong into /var/lib/.
+
+Patch by Ultrabug.
+
+--- a/xlators/mgmt/glusterd/src/glusterd.h 2010-10-13 06:20:37.000000000 +0200
++++ b/xlators/mgmt/glusterd/src/glusterd.h 2010-10-26 10:47:52.747265444 +0200
+@@ -204,7 +204,7 @@
+ GLUSTERD_VOL_COMP_RJT,
+ };
+
+-#define GLUSTERD_DEFAULT_WORKDIR "/etc/glusterd"
++#define GLUSTERD_DEFAULT_WORKDIR "/var/lib/glusterd"
+ #define GLUSTERD_DEFAULT_PORT GF_DEFAULT_BASE_PORT
+ #define GLUSTERD_INFO_FILE "glusterd.info"
+ #define GLUSTERD_VOLUME_DIR_PREFIX "vols"
+--- a/doc/glusterd.vol 2010-10-13 06:20:36.000000000 +0200
++++ b/doc/glusterd.vol 2010-10-26 10:48:16.487931870 +0200
+@@ -1,6 +1,6 @@
+ volume management
+ type mgmt/glusterd
+- option working-directory /etc/glusterd
++ option working-directory /var/lib/glusterd
+ option transport-type socket,rdma
+ option transport.socket.keepalive-time 10
+ option transport.socket.keepalive-interval 2
+--- a/doc/glusterd.8 2010-10-13 06:20:36.000000000 +0200
++++ b/doc/glusterd.8 2010-10-26 10:48:44.898729373 +0200
+@@ -70,7 +70,7 @@
+
+ .PP
+ .SH FILES
+-/etc/glusterd/*
++/var/lib/glusterd/*
+
+ .SH SEE ALSO
+ .nf
+--- a/doc/gluster.8 2011-04-22 19:37:28.000000000 +0200
++++ b/doc/gluster.8 2011-05-16 11:56:14.318682346 +0200
+@@ -121,7 +121,7 @@
+ Exit the gluster command line interface.
+
+ .SH FILES
+-/etc/glusterd/*
++/var/lib/glusterd/*
+ .SH SEE ALSO
+ .nf
+ \fBfusermount\fR(1), \fBmount.glusterfs\fR(8), \fBglusterfs\fR(8), \fBglusterd\fR(8) \ No newline at end of file
diff --git a/sys-cluster/glusterfs/files/glusterd-r1.initd b/sys-cluster/glusterfs/files/glusterd-r1.initd
new file mode 100644
index 00000000000..3cb7c637163
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterd-r1.initd
@@ -0,0 +1,16 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Gluster elastic volume management daemon"
+command="/usr/sbin/glusterd"
+pidfile="/var/run/${SVCNAME}.pid"
+command_args="-N"
+
+command_background="yes"
+
+depend() {
+ need net
+ before netmount
+}
diff --git a/sys-cluster/glusterfs/files/glusterd-r2.initd b/sys-cluster/glusterfs/files/glusterd-r2.initd
new file mode 100644
index 00000000000..8d4d7b8257a
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterd-r2.initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Gluster elastic volume management daemon"
+command="/usr/sbin/glusterd"
+pidfile="/var/run/${SVCNAME}.pid"
+command_args="-N"
+
+command_background="yes"
+
+depend() {
+ need net
+ before netmount
+}
+
+start_pre() {
+ # Ensure that the GlusterFS auxiliary mount parent directory exists
+ checkpath --directory --owner root:root --mode 0700 /var/run/gluster
+}
+
+start_post() {
+ local c=0
+ ebegin "Waiting for glusterd to start up"
+ while ! /usr/sbin/gluster volume list &>/dev/null && [ "${c}" -lt "${glusterd_max_wait_start-60}" ]; do
+ (( ++c ))
+ done
+ [ "${c}" -lt "${glusterd_max_wait_start-60}" ]
+ eend $?
+
+ return 0
+}
diff --git a/sys-cluster/glusterfs/files/glusterd-workdir.patch b/sys-cluster/glusterfs/files/glusterd-workdir.patch
new file mode 100644
index 00000000000..285136373d8
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterd-workdir.patch
@@ -0,0 +1,49 @@
+Change the default workdir of the glusterd daemon to /var/lib/glusterd instead of /etc/glusterd.
+This directory is dynamically populated by glusterd via the gluster CLI so it does better
+belong into /var/lib/.
+
+Patch by Ultrabug.
+
+--- a/xlators/mgmt/glusterd/src/glusterd.h 2010-10-13 06:20:37.000000000 +0200
++++ b/xlators/mgmt/glusterd/src/glusterd.h 2010-10-26 10:47:52.747265444 +0200
+@@ -204,7 +204,7 @@
+ GLUSTERD_VOL_COMP_RJT,
+ };
+
+-#define GLUSTERD_DEFAULT_WORKDIR "/etc/glusterd"
++#define GLUSTERD_DEFAULT_WORKDIR "/var/lib/glusterd"
+ #define GLUSTERD_DEFAULT_PORT GF_DEFAULT_BASE_PORT
+ #define GLUSTERD_INFO_FILE "glusterd.info"
+ #define GLUSTERD_VOLUME_DIR_PREFIX "vols"
+--- a/doc/glusterd.vol 2010-10-13 06:20:36.000000000 +0200
++++ b/doc/glusterd.vol 2010-10-26 10:48:16.487931870 +0200
+@@ -1,6 +1,6 @@
+ volume management
+ type mgmt/glusterd
+- option working-directory /etc/glusterd
++ option working-directory /var/lib/glusterd
+ option transport-type socket,rdma
+ option transport.socket.keepalive-time 10
+ option transport.socket.keepalive-interval 2
+--- a/doc/gluster.8 2010-10-13 06:20:36.000000000 +0200
++++ b/doc/gluster.8 2010-10-26 10:48:36.738500314 +0200
+@@ -118,7 +118,7 @@
+ .TP
+ .PP
+ .SH FILES
+-/etc/glusterd/*
++/var/lib/glusterd/*
+
+ .SH SEE ALSO
+ .nf
+--- a/doc/glusterd.8 2010-10-13 06:20:36.000000000 +0200
++++ b/doc/glusterd.8 2010-10-26 10:48:44.898729373 +0200
+@@ -70,7 +70,7 @@
+
+ .PP
+ .SH FILES
+-/etc/glusterd/*
++/var/lib/glusterd/*
+
+ .SH SEE ALSO
+ .nf
diff --git a/sys-cluster/glusterfs/files/glusterd.initd b/sys-cluster/glusterfs/files/glusterd.initd
new file mode 100644
index 00000000000..bbb28a736d4
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterd.initd
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PIDFILE=/var/run/glusterd.pid
+
+depend() {
+ need net
+ before netmount
+}
+
+start() {
+ ebegin "Starting glusterd"
+ start-stop-daemon --start -q --exec /usr/sbin/glusterd \
+ --pidfile "${PIDFILE}" --make-pidfile --background \
+ -- -N
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping glusterd"
+ start-stop-daemon --stop -q --pidfile "${PIDFILE}"
+ eindent
+
+ einfo "Unmounting GlusterFS filesystems"
+ umount -t fuse.glusterfs -a
+
+ einfo "Killing remaining GlusterFS processes"
+ for PID in $(find /var/lib/glusterd/ -type f -name "*.pid" -exec cat {} \;); do
+ kill "${PID}"
+ done
+
+ eoutdent
+ eend $?
+}
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.1.0-parallel-build.patch b/sys-cluster/glusterfs/files/glusterfs-3.1.0-parallel-build.patch
new file mode 100644
index 00000000000..9320c12ea7b
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.1.0-parallel-build.patch
@@ -0,0 +1,22 @@
+--- glusterfsd/src/Makefile.am
++++ glusterfsd/src/Makefile.am
+@@ -20,5 +20,6 @@ uninstall-local:
+ install-data-local:
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs
++ $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
+ rm -f $(DESTDIR)$(sbindir)/glusterfs
+ ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs
+--- libglusterfs/src/Makefile.am
++++ libglusterfs/src/Makefile.am
+@@ -15,7 +15,9 @@
+ graph.lex.c: graph.l y.tab.h
+ $(LEX) -t $(srcdir)/graph.l > $@
+
+-y.tab.c y.tab.h: graph.y
++y.tab.c: y.tab.h
++
++y.tab.h: graph.y
+ $(YACC) -d $(srcdir)/graph.y
+
+ CLEANFILES = graph.lex.c y.tab.c y.tab.h
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.3.0-avoid-version.patch b/sys-cluster/glusterfs/files/glusterfs-3.3.0-avoid-version.patch
new file mode 100644
index 00000000000..2af2d502fc9
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.3.0-avoid-version.patch
@@ -0,0 +1,431 @@
+diff --git a/rpc/rpc-transport/rdma/src/Makefile.am b/rpc/rpc-transport/rdma/src/Makefile.am
+index b4b940b..80f7a22 100644
+--- a/rpc/rpc-transport/rdma/src/Makefile.am
++++ b/rpc/rpc-transport/rdma/src/Makefile.am
+@@ -3,7 +3,7 @@
+ transport_LTLIBRARIES = rdma.la
+ transportdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport
+
+-rdma_la_LDFLAGS = -module -avoidversion
++rdma_la_LDFLAGS = -module -avoid-version -shared
+
+ rdma_la_SOURCES = rdma.c name.c
+ rdma_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+diff --git a/rpc/rpc-transport/socket/src/Makefile.am b/rpc/rpc-transport/socket/src/Makefile.am
+index 2c918c7..b07db72 100644
+--- a/rpc/rpc-transport/socket/src/Makefile.am
++++ b/rpc/rpc-transport/socket/src/Makefile.am
+@@ -3,7 +3,7 @@ noinst_HEADERS = socket.h name.h
+ rpctransport_LTLIBRARIES = socket.la
+ rpctransportdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport
+
+-socket_la_LDFLAGS = -module -avoidversion
++socket_la_LDFLAGS = -module -avoid-version -shared
+
+ socket_la_SOURCES = socket.c name.c
+ socket_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/cluster/afr/src/Makefile.am b/xlators/cluster/afr/src/Makefile.am
+index 95db5dd..cdecea1 100644
+--- a/xlators/cluster/afr/src/Makefile.am
++++ b/xlators/cluster/afr/src/Makefile.am
+@@ -7,11 +7,11 @@ afr_common_source = afr-dir-read.c afr-dir-write.c afr-inode-read.c \
+ afr-self-heal-algorithm.c afr-lk-common.c afr-self-heald.c \
+ $(top_builddir)/xlators/lib/src/libxlator.c
+
+-afr_la_LDFLAGS = -module -avoidversion
++afr_la_LDFLAGS = -module -avoid-version -shared
+ afr_la_SOURCES = $(afr_common_source) afr.c
+ afr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-pump_la_LDFLAGS = -module -avoidversion
++pump_la_LDFLAGS = -module -avoid-version -shared
+ pump_la_SOURCES = $(afr_common_source) pump.c
+ pump_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+diff --git a/xlators/cluster/dht/src/Makefile.am b/xlators/cluster/dht/src/Makefile.am
+index e35058d..127a023 100644
+--- a/xlators/cluster/dht/src/Makefile.am
++++ b/xlators/cluster/dht/src/Makefile.am
+@@ -12,13 +12,13 @@ dht_la_SOURCES = $(dht_common_source) dht.c
+ nufa_la_SOURCES = $(dht_common_source) nufa.c
+ switch_la_SOURCES = $(dht_common_source) switch.c
+
+-dht_la_LDFLAGS = -module -avoidversion
++dht_la_LDFLAGS = -module -avoid-version -shared
+ dht_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-nufa_la_LDFLAGS = -module -avoidversion
++nufa_la_LDFLAGS = -module -avoid-version -shared
+ nufa_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-switch_la_LDFLAGS = -module -avoidversion
++switch_la_LDFLAGS = -module -avoid-version -shared
+ switch_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+ noinst_HEADERS = dht-common.h dht-mem-types.h \
+diff --git a/xlators/cluster/stripe/src/Makefile.am b/xlators/cluster/stripe/src/Makefile.am
+index 8c48d34..18aba97 100644
+--- a/xlators/cluster/stripe/src/Makefile.am
++++ b/xlators/cluster/stripe/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = stripe.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/cluster
+
+-stripe_la_LDFLAGS = -module -avoidversion
++stripe_la_LDFLAGS = -module -avoid-version -shared
+
+ stripe_la_SOURCES = stripe.c stripe-helpers.c \
+ $(top_builddir)/xlators/lib/src/libxlator.c
+diff --git a/xlators/debug/error-gen/src/Makefile.am b/xlators/debug/error-gen/src/Makefile.am
+index df90803..cce10c0 100644
+--- a/xlators/debug/error-gen/src/Makefile.am
++++ b/xlators/debug/error-gen/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = error-gen.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-error_gen_la_LDFLAGS = -module -avoidversion
++error_gen_la_LDFLAGS = -module -avoid-version -shared
+
+ error_gen_la_SOURCES = error-gen.c
+ error_gen_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/debug/io-stats/src/Makefile.am b/xlators/debug/io-stats/src/Makefile.am
+index b894e79..cff914a 100644
+--- a/xlators/debug/io-stats/src/Makefile.am
++++ b/xlators/debug/io-stats/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = io-stats.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-io_stats_la_LDFLAGS = -module -avoidversion
++io_stats_la_LDFLAGS = -module -avoid-version -shared
+
+ io_stats_la_SOURCES = io-stats.c
+ io_stats_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/debug/trace/src/Makefile.am b/xlators/debug/trace/src/Makefile.am
+index 0f1679a..a0eb5a6 100644
+--- a/xlators/debug/trace/src/Makefile.am
++++ b/xlators/debug/trace/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = trace.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-trace_la_LDFLAGS = -module -avoidversion
++trace_la_LDFLAGS = -module -avoid-version -shared
+
+ trace_la_SOURCES = trace.c
+ trace_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/encryption/rot-13/src/Makefile.am b/xlators/encryption/rot-13/src/Makefile.am
+index ba5e623..45573aa 100644
+--- a/xlators/encryption/rot-13/src/Makefile.am
++++ b/xlators/encryption/rot-13/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = rot-13.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/encryption
+
+-rot_13_la_LDFLAGS = -module -avoidversion
++rot_13_la_LDFLAGS = -module -avoid-version -shared
+
+ rot_13_la_SOURCES = rot-13.c
+ rot_13_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/index/src/Makefile.am b/xlators/features/index/src/Makefile.am
+index 5d037c7..c43c936 100644
+--- a/xlators/features/index/src/Makefile.am
++++ b/xlators/features/index/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = index.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-index_la_LDFLAGS = -module -avoidversion
++index_la_LDFLAGS = -module -avoid-version -shared
+
+ index_la_SOURCES = index.c
+ index_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/locks/src/Makefile.am b/xlators/features/locks/src/Makefile.am
+index e396768..5181e28 100644
+--- a/xlators/features/locks/src/Makefile.am
++++ b/xlators/features/locks/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = locks.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-locks_la_LDFLAGS = -module -avoidversion
++locks_la_LDFLAGS = -module -avoid-version -shared
+
+ locks_la_SOURCES = common.c posix.c entrylk.c inodelk.c reservelk.c \
+ clear.c
+diff --git a/xlators/features/mac-compat/src/Makefile.am b/xlators/features/mac-compat/src/Makefile.am
+index 915c13e..698b990 100644
+--- a/xlators/features/mac-compat/src/Makefile.am
++++ b/xlators/features/mac-compat/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = mac-compat.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-mac_compat_la_LDFLAGS = -module -avoidversion
++mac_compat_la_LDFLAGS = -module -avoid-version -shared
+
+ mac_compat_la_SOURCES = mac-compat.c
+ mac_compat_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/marker/src/Makefile.am b/xlators/features/marker/src/Makefile.am
+index 501586a..630ae96 100644
+--- a/xlators/features/marker/src/Makefile.am
++++ b/xlators/features/marker/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = marker.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-marker_la_LDFLAGS = -module -avoidversion
++marker_la_LDFLAGS = -module -avoid-version -shared
+
+ marker_la_SOURCES = marker.c marker-quota.c marker-quota-helper.c marker-common.c
+ marker_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/quiesce/src/Makefile.am b/xlators/features/quiesce/src/Makefile.am
+index e8ab4cb..4234269 100644
+--- a/xlators/features/quiesce/src/Makefile.am
++++ b/xlators/features/quiesce/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = quiesce.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-quiesce_la_LDFLAGS = -module -avoidversion
++quiesce_la_LDFLAGS = -module -avoid-version -shared
+
+ quiesce_la_SOURCES = quiesce.c
+ quiesce_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am
+index 4baa5f0..cd687bc 100644
+--- a/xlators/features/quota/src/Makefile.am
++++ b/xlators/features/quota/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = quota.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-quota_la_LDFLAGS = -module -avoidversion
++quota_la_LDFLAGS = -module -avoid-version -shared
+
+ quota_la_SOURCES = quota.c
+ quota_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/read-only/src/Makefile.am b/xlators/features/read-only/src/Makefile.am
+index 31ae4f3..45dcef5 100644
+--- a/xlators/features/read-only/src/Makefile.am
++++ b/xlators/features/read-only/src/Makefile.am
+@@ -4,12 +4,12 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+ noinst_HEADERS = read-only-common.h
+
+-read_only_la_LDFLAGS = -module -avoidversion
++read_only_la_LDFLAGS = -module -avoid-version -shared
+
+ read_only_la_SOURCES = read-only.c read-only-common.c
+ read_only_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-worm_la_LDFLAGS = -module -avoidversion
++worm_la_LDFLAGS = -module -avoid-version -shared
+
+ worm_la_SOURCES = read-only-common.c worm.c
+ worm_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
+index 485350b..7facc66 100644
+--- a/xlators/mgmt/glusterd/src/Makefile.am
++++ b/xlators/mgmt/glusterd/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = glusterd.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/mgmt
+ glusterd_la_CPPFLAGS = "-DFILTERDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/filter\""
+-glusterd_la_LDFLAGS = -module -avoidversion $(LIBXML2_LIBS) -lcrypto
++glusterd_la_LDFLAGS = -module -avoid-version -shared
+ glusterd_la_SOURCES = glusterd.c glusterd-handler.c glusterd-sm.c \
+ glusterd-op-sm.c glusterd-utils.c glusterd-rpc-ops.c \
+ glusterd-store.c glusterd-handshake.c glusterd-pmap.c \
+@@ -12,7 +12,8 @@ glusterd_la_SOURCES = glusterd.c glusterd-handler.c glusterd-sm.c \
+
+ glusterd_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(top_builddir)/rpc/xdr/src/libgfxdr.la \
+- $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
++ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
++ $(LIBXML2_LIBS) -lcrypto
+
+ noinst_HEADERS = glusterd.h glusterd-utils.h glusterd-op-sm.h \
+ glusterd-sm.h glusterd-store.h glusterd-mem-types.h \
+diff --git a/xlators/nfs/server/src/Makefile.am b/xlators/nfs/server/src/Makefile.am
+index ef3b672..48cca34 100644
+--- a/xlators/nfs/server/src/Makefile.am
++++ b/xlators/nfs/server/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = server.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/nfs
+ nfsrpclibdir = $(top_srcdir)/rpc/rpc-lib/src
+-server_la_LDFLAGS = -module -avoidversion
++server_la_LDFLAGS = -module -avoid-version -shared
+ server_la_SOURCES = nfs.c nfs-common.c nfs-fops.c nfs-inodes.c \
+ nfs-generics.c mount3.c nfs3-fh.c nfs3.c nfs3-helpers.c nlm4.c \
+ nlmcbk_svc.c mount3udp_svc.c
+diff --git a/xlators/performance/io-cache/src/Makefile.am b/xlators/performance/io-cache/src/Makefile.am
+index 6dd270e..f066519 100644
+--- a/xlators/performance/io-cache/src/Makefile.am
++++ b/xlators/performance/io-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = io-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-io_cache_la_LDFLAGS = -module -avoidversion
++io_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ io_cache_la_SOURCES = io-cache.c page.c ioc-inode.c
+ io_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/io-threads/src/Makefile.am b/xlators/performance/io-threads/src/Makefile.am
+index 72f9a80..2de6cbb 100644
+--- a/xlators/performance/io-threads/src/Makefile.am
++++ b/xlators/performance/io-threads/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = io-threads.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-io_threads_la_LDFLAGS = -module -avoidversion
++io_threads_la_LDFLAGS = -module -avoid-version -shared
+
+ io_threads_la_SOURCES = io-threads.c
+ io_threads_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/md-cache/src/Makefile.am b/xlators/performance/md-cache/src/Makefile.am
+index 150e724..dc6fb54 100644
+--- a/xlators/performance/md-cache/src/Makefile.am
++++ b/xlators/performance/md-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = md-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-md_cache_la_LDFLAGS = -module -avoidversion
++md_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ md_cache_la_SOURCES = md-cache.c
+ md_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/quick-read/src/Makefile.am b/xlators/performance/quick-read/src/Makefile.am
+index db917f8..1da51b2 100644
+--- a/xlators/performance/quick-read/src/Makefile.am
++++ b/xlators/performance/quick-read/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = quick-read.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-quick_read_la_LDFLAGS = -module -avoidversion
++quick_read_la_LDFLAGS = -module -avoid-version -shared
+
+ quick_read_la_SOURCES = quick-read.c
+ quick_read_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/read-ahead/src/Makefile.am b/xlators/performance/read-ahead/src/Makefile.am
+index b46020a..1e17a3a 100644
+--- a/xlators/performance/read-ahead/src/Makefile.am
++++ b/xlators/performance/read-ahead/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = read-ahead.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-read_ahead_la_LDFLAGS = -module -avoidversion
++read_ahead_la_LDFLAGS = -module -avoid-version -shared
+
+ read_ahead_la_SOURCES = read-ahead.c page.c
+ read_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/symlink-cache/src/Makefile.am b/xlators/performance/symlink-cache/src/Makefile.am
+index 06e85fc..2f893ce 100644
+--- a/xlators/performance/symlink-cache/src/Makefile.am
++++ b/xlators/performance/symlink-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = symlink-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/testing/performance
+
+-symlink_cache_la_LDFLAGS = -module -avoidversion
++symlink_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ symlink_cache_la_SOURCES = symlink-cache.c
+ symlink_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/write-behind/src/Makefile.am b/xlators/performance/write-behind/src/Makefile.am
+index a5ebc90..838d6da 100644
+--- a/xlators/performance/write-behind/src/Makefile.am
++++ b/xlators/performance/write-behind/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = write-behind.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-write_behind_la_LDFLAGS = -module -avoidversion
++write_behind_la_LDFLAGS = -module -avoid-version -shared
+
+ write_behind_la_SOURCES = write-behind.c
+ write_behind_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/auth/addr/src/Makefile.am b/xlators/protocol/auth/addr/src/Makefile.am
+index f09d1c5..c77fce3 100644
+--- a/xlators/protocol/auth/addr/src/Makefile.am
++++ b/xlators/protocol/auth/addr/src/Makefile.am
+@@ -1,7 +1,7 @@
+ auth_LTLIBRARIES = addr.la
+ authdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/auth
+
+-addr_la_LDFLAGS = -module -avoidversion
++addr_la_LDFLAGS = -module -avoid-version -shared
+
+ addr_la_SOURCES = addr.c
+ addr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/auth/login/src/Makefile.am b/xlators/protocol/auth/login/src/Makefile.am
+index b4719d1..5a5db4d 100644
+--- a/xlators/protocol/auth/login/src/Makefile.am
++++ b/xlators/protocol/auth/login/src/Makefile.am
+@@ -1,7 +1,7 @@
+ auth_LTLIBRARIES = login.la
+ authdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/auth
+
+-login_la_LDFLAGS = -module -avoidversion
++login_la_LDFLAGS = -module -avoid-version -shared
+
+ login_la_SOURCES = login.c
+ login_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/client/src/Makefile.am b/xlators/protocol/client/src/Makefile.am
+index 29c6e9d..19d2ed5 100644
+--- a/xlators/protocol/client/src/Makefile.am
++++ b/xlators/protocol/client/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = client.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/protocol
+
+-client_la_LDFLAGS = -module -avoidversion
++client_la_LDFLAGS = -module -avoid-version -shared
+
+ client_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
+diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am
+index 0df5894..6eae10d 100644
+--- a/xlators/protocol/server/src/Makefile.am
++++ b/xlators/protocol/server/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = server.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/protocol
+
+-server_la_LDFLAGS = -module -avoidversion
++server_la_LDFLAGS = -module -avoid-version -shared
+
+ server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
+diff --git a/xlators/storage/posix/src/Makefile.am b/xlators/storage/posix/src/Makefile.am
+index 408dcb8..3f6a4b6 100644
+--- a/xlators/storage/posix/src/Makefile.am
++++ b/xlators/storage/posix/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = posix.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/storage
+
+-posix_la_LDFLAGS = -module -avoidversion
++posix_la_LDFLAGS = -module -avoid-version -shared
+
+ posix_la_SOURCES = posix.c posix-helpers.c posix-handle.c
+ posix_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/system/posix-acl/src/Makefile.am b/xlators/system/posix-acl/src/Makefile.am
+index c095569..b799eb9 100644
+--- a/xlators/system/posix-acl/src/Makefile.am
++++ b/xlators/system/posix-acl/src/Makefile.am
+@@ -1,6 +1,6 @@
+ xlator_LTLIBRARIES = posix-acl.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/system
+-posix_acl_la_LDFLAGS = -module -avoidversion
++posix_acl_la_LDFLAGS = -module -avoid-version -shared
+ posix_acl_la_SOURCES = posix-acl.c posix-acl-xattr.c
+ posix_acl_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.3.0-docdir.patch b/sys-cluster/glusterfs/files/glusterfs-3.3.0-docdir.patch
new file mode 100644
index 00000000000..83f3043d4ef
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.3.0-docdir.patch
@@ -0,0 +1,26 @@
+From 6a17bb8523c4c7810bf7797371df22cfb259f7a7 Mon Sep 17 00:00:00 2001
+From: MATSUU Takuto <matsuu@gentoo.org>
+Date: Sat, 16 May 2009 07:01:53 +0900
+Subject: [PATCH] Use the standard autoconf $docdir variable.
+
+--- a/extras/Makefile.am
++++ b/extras/Makefile.am
+@@ -1,6 +1,5 @@
+
+-docdir = $(datadir)/doc/glusterfs/
+-EditorModedir = $(docdir)/
++EditorModedir = $(docdir)
+ EditorMode_DATA = glusterfs-mode.el glusterfs.vim
+
+ SUBDIRS = init.d benchmarking
+--- a/extras/benchmarking/Makefile.am
++++ b/extras/benchmarking/Makefile.am
+@@ -1,7 +1,5 @@
+
+-docdir = $(datadir)/doc/$(PACKAGE_NAME)/benchmarking
+-
+-benchmarkingdir = $(docdir)
++benchmarkingdir = $(docdir)/benchmarking
+
+ benchmarking_DATA = rdd.c glfs-bm.c README launch-script.sh local-script.sh
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.3.0-parallel-build.patch b/sys-cluster/glusterfs/files/glusterfs-3.3.0-parallel-build.patch
new file mode 100644
index 00000000000..ab3a3d1547c
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.3.0-parallel-build.patch
@@ -0,0 +1,20 @@
+--- a/glusterfsd/src/Makefile.am
++++ b/glusterfsd/src/Makefile.am
+@@ -25,6 +25,7 @@
+ install-data-local:
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs
++ $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
+ rm -f $(DESTDIR)$(sbindir)/glusterfs
+ rm -f $(DESTDIR)$(sbindir)/glusterd
+ ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs
+--- a/libglusterfs/src/Makefile.am
++++ b/libglusterfs/src/Makefile.am
+@@ -43,6 +43,7 @@
+ graph.lex.c: graph.l y.tab.h
+ $(LEX) -t $(srcdir)/graph.l > $@
+
++y.tab.c: y.tab.h
+ y.tab.h: graph.y
+ $(YACC) -d $(srcdir)/graph.y
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.3.0-silent_rules.patch b/sys-cluster/glusterfs/files/glusterfs-3.3.0-silent_rules.patch
new file mode 100644
index 00000000000..d9e25494b64
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.3.0-silent_rules.patch
@@ -0,0 +1,25 @@
+diff --git a/configure.ac b/configure.ac
+index 4551fcf..a30c62e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,20 +19,6 @@ AC_INIT([glusterfs],[3.3.0],[gluster-users@gluster.org])
+
+ AM_INIT_AUTOMAKE
+
+-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
+-
+-if make --help 2>&1 | grep -q no-print-directory; then
+- AM_MAKEFLAGS="$AM_MAKEFLAGS --no-print-directory";
+-fi
+-
+-if make --help 2>&1 | grep -q quiet; then
+- AM_MAKEFLAGS="$AM_MAKEFLAGS --quiet"
+-fi
+-
+-if libtool --help 2>&1 | grep -q quiet; then
+- AM_LIBTOOLFLAGS="--quiet";
+-fi
+-
+ AM_CONFIG_HEADER([config.h])
+
+ AC_CONFIG_FILES([Makefile
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.4.0-build-shared-only.patch b/sys-cluster/glusterfs/files/glusterfs-3.4.0-build-shared-only.patch
new file mode 100644
index 00000000000..38afa6c4f38
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.4.0-build-shared-only.patch
@@ -0,0 +1,505 @@
+From 96dfc056d9525dd102bd78dc2f25fa51e00fbab5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Fri, 26 Jul 2013 10:28:25 +0200
+Subject: [PATCH 2/2] Build shared plugins only.
+
+---
+ rpc/rpc-transport/rdma/src/Makefile.am | 2 +-
+ rpc/rpc-transport/socket/src/Makefile.am | 2 +-
+ xlators/cluster/afr/src/Makefile.am | 4 ++--
+ xlators/cluster/dht/src/Makefile.am | 6 +++---
+ xlators/cluster/stripe/src/Makefile.am | 2 +-
+ xlators/debug/error-gen/src/Makefile.am | 2 +-
+ xlators/debug/io-stats/src/Makefile.am | 2 +-
+ xlators/debug/trace/src/Makefile.am | 2 +-
+ xlators/encryption/rot-13/src/Makefile.am | 2 +-
+ xlators/features/index/src/Makefile.am | 2 +-
+ xlators/features/locks/src/Makefile.am | 2 +-
+ xlators/features/mac-compat/src/Makefile.am | 2 +-
+ xlators/features/marker/src/Makefile.am | 2 +-
+ xlators/features/quiesce/src/Makefile.am | 2 +-
+ xlators/features/quota/src/Makefile.am | 2 +-
+ xlators/features/read-only/src/Makefile.am | 4 ++--
+ xlators/mgmt/glusterd/src/Makefile.am | 2 +-
+ xlators/mount/fuse/src/Makefile.am | 2 +-
+ xlators/nfs/server/src/Makefile.am | 2 +-
+ xlators/performance/io-cache/src/Makefile.am | 2 +-
+ xlators/performance/io-threads/src/Makefile.am | 2 +-
+ xlators/performance/md-cache/src/Makefile.am | 2 +-
+ xlators/performance/open-behind/src/Makefile.am | 2 +-
+ xlators/performance/quick-read/src/Makefile.am | 2 +-
+ xlators/performance/read-ahead/src/Makefile.am | 2 +-
+ xlators/performance/symlink-cache/src/Makefile.am | 2 +-
+ xlators/performance/write-behind/src/Makefile.am | 2 +-
+ xlators/protocol/auth/addr/src/Makefile.am | 2 +-
+ xlators/protocol/auth/login/src/Makefile.am | 2 +-
+ xlators/protocol/client/src/Makefile.am | 2 +-
+ xlators/protocol/server/src/Makefile.am | 2 +-
+ xlators/storage/bd_map/src/Makefile.am | 2 +-
+ xlators/storage/posix/src/Makefile.am | 2 +-
+ xlators/system/posix-acl/src/Makefile.am | 2 +-
+ 34 files changed, 38 insertions(+), 38 deletions(-)
+
+diff --git a/rpc/rpc-transport/rdma/src/Makefile.am b/rpc/rpc-transport/rdma/src/Makefile.am
+index 2bf7cf2..8e52d70 100644
+--- a/rpc/rpc-transport/rdma/src/Makefile.am
++++ b/rpc/rpc-transport/rdma/src/Makefile.am
+@@ -3,7 +3,7 @@
+ transport_LTLIBRARIES = rdma.la
+ transportdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport
+
+-rdma_la_LDFLAGS = -module -avoid-version
++rdma_la_LDFLAGS = -module -avoid-version -shared
+
+ rdma_la_SOURCES = rdma.c name.c
+ rdma_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+diff --git a/rpc/rpc-transport/socket/src/Makefile.am b/rpc/rpc-transport/socket/src/Makefile.am
+index 71e6ed6..b481fe9 100644
+--- a/rpc/rpc-transport/socket/src/Makefile.am
++++ b/rpc/rpc-transport/socket/src/Makefile.am
+@@ -3,7 +3,7 @@ noinst_HEADERS = socket.h name.h
+ rpctransport_LTLIBRARIES = socket.la
+ rpctransportdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport
+
+-socket_la_LDFLAGS = -module -avoid-version
++socket_la_LDFLAGS = -module -avoid-version -shared
+
+ socket_la_SOURCES = socket.c name.c
+ socket_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lssl
+diff --git a/xlators/cluster/afr/src/Makefile.am b/xlators/cluster/afr/src/Makefile.am
+index 35d18a6..959fea8 100644
+--- a/xlators/cluster/afr/src/Makefile.am
++++ b/xlators/cluster/afr/src/Makefile.am
+@@ -7,11 +7,11 @@ afr_common_source = afr-dir-read.c afr-dir-write.c afr-inode-read.c \
+ afr-self-heal-algorithm.c afr-lk-common.c afr-self-heald.c \
+ $(top_builddir)/xlators/lib/src/libxlator.c
+
+-afr_la_LDFLAGS = -module -avoid-version
++afr_la_LDFLAGS = -module -avoid-version -shared
+ afr_la_SOURCES = $(afr_common_source) afr.c
+ afr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-pump_la_LDFLAGS = -module -avoid-version
++pump_la_LDFLAGS = -module -avoid-version -shared
+ pump_la_SOURCES = $(afr_common_source) pump.c
+ pump_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+diff --git a/xlators/cluster/dht/src/Makefile.am b/xlators/cluster/dht/src/Makefile.am
+index 5324d21..d5f36ea 100644
+--- a/xlators/cluster/dht/src/Makefile.am
++++ b/xlators/cluster/dht/src/Makefile.am
+@@ -12,13 +12,13 @@ dht_la_SOURCES = $(dht_common_source) dht.c
+ nufa_la_SOURCES = $(dht_common_source) nufa.c
+ switch_la_SOURCES = $(dht_common_source) switch.c
+
+-dht_la_LDFLAGS = -module -avoid-version
++dht_la_LDFLAGS = -module -avoid-version -shared
+ dht_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-nufa_la_LDFLAGS = -module -avoid-version
++nufa_la_LDFLAGS = -module -avoid-version -shared
+ nufa_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-switch_la_LDFLAGS = -module -avoid-version
++switch_la_LDFLAGS = -module -avoid-version -shared
+ switch_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+ noinst_HEADERS = dht-common.h dht-mem-types.h \
+diff --git a/xlators/cluster/stripe/src/Makefile.am b/xlators/cluster/stripe/src/Makefile.am
+index 2d15142..6989de9 100644
+--- a/xlators/cluster/stripe/src/Makefile.am
++++ b/xlators/cluster/stripe/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = stripe.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/cluster
+
+-stripe_la_LDFLAGS = -module -avoid-version
++stripe_la_LDFLAGS = -module -avoid-version -shared
+
+ stripe_la_SOURCES = stripe.c stripe-helpers.c \
+ $(top_builddir)/xlators/lib/src/libxlator.c
+diff --git a/xlators/debug/error-gen/src/Makefile.am b/xlators/debug/error-gen/src/Makefile.am
+index 5075c59..a7681c4 100644
+--- a/xlators/debug/error-gen/src/Makefile.am
++++ b/xlators/debug/error-gen/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = error-gen.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-error_gen_la_LDFLAGS = -module -avoid-version
++error_gen_la_LDFLAGS = -module -avoid-version -shared
+
+ error_gen_la_SOURCES = error-gen.c
+ error_gen_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/debug/io-stats/src/Makefile.am b/xlators/debug/io-stats/src/Makefile.am
+index 332d790..bf62017 100644
+--- a/xlators/debug/io-stats/src/Makefile.am
++++ b/xlators/debug/io-stats/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = io-stats.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-io_stats_la_LDFLAGS = -module -avoid-version
++io_stats_la_LDFLAGS = -module -avoid-version -shared
+
+ io_stats_la_SOURCES = io-stats.c
+ io_stats_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/debug/trace/src/Makefile.am b/xlators/debug/trace/src/Makefile.am
+index 7b2597b..2030ed4 100644
+--- a/xlators/debug/trace/src/Makefile.am
++++ b/xlators/debug/trace/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = trace.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-trace_la_LDFLAGS = -module -avoid-version
++trace_la_LDFLAGS = -module -avoid-version -shared
+
+ trace_la_SOURCES = trace.c
+ trace_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/encryption/rot-13/src/Makefile.am b/xlators/encryption/rot-13/src/Makefile.am
+index 94e8d18..d13894e 100644
+--- a/xlators/encryption/rot-13/src/Makefile.am
++++ b/xlators/encryption/rot-13/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = rot-13.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/encryption
+
+-rot_13_la_LDFLAGS = -module -avoid-version
++rot_13_la_LDFLAGS = -module -avoid-version -shared
+
+ rot_13_la_SOURCES = rot-13.c
+ rot_13_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/index/src/Makefile.am b/xlators/features/index/src/Makefile.am
+index 73bb897..5519798 100644
+--- a/xlators/features/index/src/Makefile.am
++++ b/xlators/features/index/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = index.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-index_la_LDFLAGS = -module -avoid-version
++index_la_LDFLAGS = -module -avoid-version -shared
+
+ index_la_SOURCES = index.c
+ index_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/locks/src/Makefile.am b/xlators/features/locks/src/Makefile.am
+index 8908c1f..1a17a0f 100644
+--- a/xlators/features/locks/src/Makefile.am
++++ b/xlators/features/locks/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = locks.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-locks_la_LDFLAGS = -module -avoid-version
++locks_la_LDFLAGS = -module -avoid-version -shared
+
+ locks_la_SOURCES = common.c posix.c entrylk.c inodelk.c reservelk.c \
+ clear.c
+diff --git a/xlators/features/mac-compat/src/Makefile.am b/xlators/features/mac-compat/src/Makefile.am
+index f8567ed..a283eb0 100644
+--- a/xlators/features/mac-compat/src/Makefile.am
++++ b/xlators/features/mac-compat/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = mac-compat.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-mac_compat_la_LDFLAGS = -module -avoid-version
++mac_compat_la_LDFLAGS = -module -avoid-version -shared
+
+ mac_compat_la_SOURCES = mac-compat.c
+ mac_compat_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/marker/src/Makefile.am b/xlators/features/marker/src/Makefile.am
+index a7c6764..477fe0f 100644
+--- a/xlators/features/marker/src/Makefile.am
++++ b/xlators/features/marker/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = marker.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-marker_la_LDFLAGS = -module -avoid-version
++marker_la_LDFLAGS = -module -avoid-version -shared
+
+ marker_la_SOURCES = marker.c marker-quota.c marker-quota-helper.c marker-common.c
+ marker_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/quiesce/src/Makefile.am b/xlators/features/quiesce/src/Makefile.am
+index 15e4662..b3cd9d1 100644
+--- a/xlators/features/quiesce/src/Makefile.am
++++ b/xlators/features/quiesce/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = quiesce.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-quiesce_la_LDFLAGS = -module -avoid-version
++quiesce_la_LDFLAGS = -module -avoid-version -shared
+
+ quiesce_la_SOURCES = quiesce.c
+ quiesce_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am
+index 9546f42..4cfa983 100644
+--- a/xlators/features/quota/src/Makefile.am
++++ b/xlators/features/quota/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = quota.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-quota_la_LDFLAGS = -module -avoid-version
++quota_la_LDFLAGS = -module -avoid-version -shared
+
+ quota_la_SOURCES = quota.c
+ quota_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/read-only/src/Makefile.am b/xlators/features/read-only/src/Makefile.am
+index 4c14621..a3f79fa 100644
+--- a/xlators/features/read-only/src/Makefile.am
++++ b/xlators/features/read-only/src/Makefile.am
+@@ -4,12 +4,12 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+ noinst_HEADERS = read-only-common.h
+
+-read_only_la_LDFLAGS = -module -avoid-version
++read_only_la_LDFLAGS = -module -avoid-version -shared
+
+ read_only_la_SOURCES = read-only.c read-only-common.c
+ read_only_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-worm_la_LDFLAGS = -module -avoid-version
++worm_la_LDFLAGS = -module -avoid-version -shared
+
+ worm_la_SOURCES = read-only-common.c worm.c
+ worm_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
+index df15453..d03d653 100644
+--- a/xlators/mgmt/glusterd/src/Makefile.am
++++ b/xlators/mgmt/glusterd/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = glusterd.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/mgmt
+ glusterd_la_CPPFLAGS = $(AM_CPPFLAGS) "-DFILTERDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/filter\""
+-glusterd_la_LDFLAGS = -module -avoid-version
++glusterd_la_LDFLAGS = -module -avoid-version -shared
+ if ENABLE_BD_XLATOR
+ glusterd_la_LDFLAGS += -llvm2app
+ endif
+diff --git a/xlators/mount/fuse/src/Makefile.am b/xlators/mount/fuse/src/Makefile.am
+index 653121d..3f221d8 100644
+--- a/xlators/mount/fuse/src/Makefile.am
++++ b/xlators/mount/fuse/src/Makefile.am
+@@ -24,7 +24,7 @@ endif
+ fuse_la_SOURCES = fuse-helpers.c fuse-resolve.c fuse-bridge.c \
+ $(CONTRIBDIR)/fuse-lib/misc.c $(mount_source)
+
+-fuse_la_LDFLAGS = -module -avoid-version
++fuse_la_LDFLAGS = -module -avoid-version -shared
+ fuse_la_LIBADD = @GF_FUSE_LDADD@
+
+ AM_CPPFLAGS = $(GF_CPPFLAGS) \
+diff --git a/xlators/nfs/server/src/Makefile.am b/xlators/nfs/server/src/Makefile.am
+index 2795a93..2614822 100644
+--- a/xlators/nfs/server/src/Makefile.am
++++ b/xlators/nfs/server/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = server.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/nfs
+ nfsrpclibdir = $(top_srcdir)/rpc/rpc-lib/src
+-server_la_LDFLAGS = -module -avoid-version
++server_la_LDFLAGS = -module -avoid-version -shared
+ server_la_SOURCES = nfs.c nfs-common.c nfs-fops.c nfs-inodes.c \
+ nfs-generics.c mount3.c nfs3-fh.c nfs3.c nfs3-helpers.c nlm4.c \
+ nlmcbk_svc.c mount3udp_svc.c acl3.c
+diff --git a/xlators/performance/io-cache/src/Makefile.am b/xlators/performance/io-cache/src/Makefile.am
+index 155be99..ba0738c 100644
+--- a/xlators/performance/io-cache/src/Makefile.am
++++ b/xlators/performance/io-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = io-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-io_cache_la_LDFLAGS = -module -avoid-version
++io_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ io_cache_la_SOURCES = io-cache.c page.c ioc-inode.c
+ io_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/io-threads/src/Makefile.am b/xlators/performance/io-threads/src/Makefile.am
+index d63042e..aba1fdb 100644
+--- a/xlators/performance/io-threads/src/Makefile.am
++++ b/xlators/performance/io-threads/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = io-threads.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-io_threads_la_LDFLAGS = -module -avoid-version
++io_threads_la_LDFLAGS = -module -avoid-version -shared
+
+ io_threads_la_SOURCES = io-threads.c
+ io_threads_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/md-cache/src/Makefile.am b/xlators/performance/md-cache/src/Makefile.am
+index 8c9f5a8..4d714fa 100644
+--- a/xlators/performance/md-cache/src/Makefile.am
++++ b/xlators/performance/md-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = md-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-md_cache_la_LDFLAGS = -module -avoid-version
++md_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ md_cache_la_SOURCES = md-cache.c
+ md_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/open-behind/src/Makefile.am b/xlators/performance/open-behind/src/Makefile.am
+index 1252857..568434a 100644
+--- a/xlators/performance/open-behind/src/Makefile.am
++++ b/xlators/performance/open-behind/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = open-behind.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-open_behind_la_LDFLAGS = -module -avoid-version
++open_behind_la_LDFLAGS = -module -avoid-version -shared
+
+ open_behind_la_SOURCES = open-behind.c
+ open_behind_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/quick-read/src/Makefile.am b/xlators/performance/quick-read/src/Makefile.am
+index 4906f40..8d42116 100644
+--- a/xlators/performance/quick-read/src/Makefile.am
++++ b/xlators/performance/quick-read/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = quick-read.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-quick_read_la_LDFLAGS = -module -avoid-version
++quick_read_la_LDFLAGS = -module -avoid-version -shared
+
+ quick_read_la_SOURCES = quick-read.c
+ quick_read_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/read-ahead/src/Makefile.am b/xlators/performance/read-ahead/src/Makefile.am
+index be80ae7..eae0540 100644
+--- a/xlators/performance/read-ahead/src/Makefile.am
++++ b/xlators/performance/read-ahead/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = read-ahead.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-read_ahead_la_LDFLAGS = -module -avoid-version
++read_ahead_la_LDFLAGS = -module -avoid-version -shared
+
+ read_ahead_la_SOURCES = read-ahead.c page.c
+ read_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/symlink-cache/src/Makefile.am b/xlators/performance/symlink-cache/src/Makefile.am
+index 4091c32..0d600d6 100644
+--- a/xlators/performance/symlink-cache/src/Makefile.am
++++ b/xlators/performance/symlink-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = symlink-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/testing/performance
+
+-symlink_cache_la_LDFLAGS = -module -avoid-version
++symlink_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ symlink_cache_la_SOURCES = symlink-cache.c
+ symlink_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/write-behind/src/Makefile.am b/xlators/performance/write-behind/src/Makefile.am
+index 6c829d8..746e5c1 100644
+--- a/xlators/performance/write-behind/src/Makefile.am
++++ b/xlators/performance/write-behind/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = write-behind.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-write_behind_la_LDFLAGS = -module -avoid-version
++write_behind_la_LDFLAGS = -module -avoid-version -shared
+
+ write_behind_la_SOURCES = write-behind.c
+ write_behind_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/auth/addr/src/Makefile.am b/xlators/protocol/auth/addr/src/Makefile.am
+index 426e7c2..fa7234d 100644
+--- a/xlators/protocol/auth/addr/src/Makefile.am
++++ b/xlators/protocol/auth/addr/src/Makefile.am
+@@ -1,7 +1,7 @@
+ auth_LTLIBRARIES = addr.la
+ authdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/auth
+
+-addr_la_LDFLAGS = -module -avoid-version
++addr_la_LDFLAGS = -module -avoid-version -shared
+
+ addr_la_SOURCES = addr.c
+ addr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/auth/login/src/Makefile.am b/xlators/protocol/auth/login/src/Makefile.am
+index d84db91..022739d 100644
+--- a/xlators/protocol/auth/login/src/Makefile.am
++++ b/xlators/protocol/auth/login/src/Makefile.am
+@@ -1,7 +1,7 @@
+ auth_LTLIBRARIES = login.la
+ authdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/auth
+
+-login_la_LDFLAGS = -module -avoid-version
++login_la_LDFLAGS = -module -avoid-version -shared
+
+ login_la_SOURCES = login.c
+ login_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/client/src/Makefile.am b/xlators/protocol/client/src/Makefile.am
+index cf89d42..8f2612c 100644
+--- a/xlators/protocol/client/src/Makefile.am
++++ b/xlators/protocol/client/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = client.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/protocol
+
+-client_la_LDFLAGS = -module -avoid-version
++client_la_LDFLAGS = -module -avoid-version -shared
+
+ client_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
+diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am
+index 25d6706..15a2548 100644
+--- a/xlators/protocol/server/src/Makefile.am
++++ b/xlators/protocol/server/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = server.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/protocol
+
+-server_la_LDFLAGS = -module -avoid-version
++server_la_LDFLAGS = -module -avoid-version -shared
+
+ server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
+diff --git a/xlators/storage/bd_map/src/Makefile.am b/xlators/storage/bd_map/src/Makefile.am
+index 91412e9..5c59626 100644
+--- a/xlators/storage/bd_map/src/Makefile.am
++++ b/xlators/storage/bd_map/src/Makefile.am
+@@ -3,7 +3,7 @@ if ENABLE_BD_XLATOR
+ xlator_LTLIBRARIES = bd_map.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/storage
+
+-bd_map_la_LDFLAGS = -module -avoid-version
++bd_map_la_LDFLAGS = -module -avoid-version -shared
+ LIBBD = -llvm2app -lrt
+ bd_map_la_SOURCES = bd_map.c bd_map_help.c
+ bd_map_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBBD)
+diff --git a/xlators/storage/posix/src/Makefile.am b/xlators/storage/posix/src/Makefile.am
+index 88efcc7..79ca903 100644
+--- a/xlators/storage/posix/src/Makefile.am
++++ b/xlators/storage/posix/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = posix.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/storage
+
+-posix_la_LDFLAGS = -module -avoid-version
++posix_la_LDFLAGS = -module -avoid-version -shared
+
+ posix_la_SOURCES = posix.c posix-helpers.c posix-handle.c posix-aio.c
+ posix_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBAIO)
+diff --git a/xlators/system/posix-acl/src/Makefile.am b/xlators/system/posix-acl/src/Makefile.am
+index 11c939f..561c52d 100644
+--- a/xlators/system/posix-acl/src/Makefile.am
++++ b/xlators/system/posix-acl/src/Makefile.am
+@@ -1,6 +1,6 @@
+ xlator_LTLIBRARIES = posix-acl.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/system
+-posix_acl_la_LDFLAGS = -module -avoid-version
++posix_acl_la_LDFLAGS = -module -avoid-version -shared
+ posix_acl_la_SOURCES = posix-acl.c posix-acl-xattr.c
+ posix_acl_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+--
+1.8.2.1
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.4.0-nfs-exit-when-all-volumes-are-disabled.patch b/sys-cluster/glusterfs/files/glusterfs-3.4.0-nfs-exit-when-all-volumes-are-disabled.patch
new file mode 100644
index 00000000000..5a1bdec89e6
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.4.0-nfs-exit-when-all-volumes-are-disabled.patch
@@ -0,0 +1,42 @@
+From fdc83183263e04bee56672e9d9922cc9457146cb Mon Sep 17 00:00:00 2001
+From: Rajesh Amaravathi <rajesh@redhat.com>
+Date: Fri, 21 Jun 2013 14:58:23 +0530
+Subject: [PATCH 1/1] nfs: exit when all volumes are disabled
+
+Instead of triggering 4-5 error logs, when nfs is
+disabled for all volumes, exit the process.
+
+Change-Id: Ib286f143c4f74ba22f502aca0e7dcd0907db6563
+BUG: 976750
+Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
+Reviewed-on: http://review.gluster.org/5245
+Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
+Tested-by: Gluster Build System <jenkins@build.gluster.com>
+Reviewed-by: Vijay Bellur <vbellur@redhat.com>
+---
+ xlators/nfs/server/src/nfs.c | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
+index 6cd0594..c3a76c6 100644
+--- a/xlators/nfs/server/src/nfs.c
++++ b/xlators/nfs/server/src/nfs.c
+@@ -533,10 +533,11 @@ nfs_init_state (xlator_t *this)
+ if (!this)
+ return NULL;
+
+- if ((!this->children) || (!this->children->xlator)) {
+- gf_log (GF_NFS, GF_LOG_ERROR, "nfs must have at least one"
+- " child subvolume");
+- return NULL;
++ if (!this->children) {
++ gf_log (GF_NFS, GF_LOG_INFO,
++ "NFS is manually disabled: Exiting");
++ /* Nothing for nfs process to do, exit cleanly */
++ kill (getpid (), SIGTERM);
+ }
+
+ nfs = GF_CALLOC (1, sizeof (*nfs), gf_nfs_mt_nfs_state);
+--
+1.7.4.1
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.4.0-silent_rules.patch b/sys-cluster/glusterfs/files/glusterfs-3.4.0-silent_rules.patch
new file mode 100644
index 00000000000..1b79e0d079e
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.4.0-silent_rules.patch
@@ -0,0 +1,23 @@
+--- configure.ac 2013-07-12 19:43:26.000000000 +0200
++++ configure.ac2 2013-07-25 13:58:48.294091861 +0200
+@@ -10,20 +10,6 @@
+
+ AM_INIT_AUTOMAKE
+
+-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
+-
+-if make --help 2>&1 | grep -q no-print-directory; then
+- AM_MAKEFLAGS="$AM_MAKEFLAGS --no-print-directory";
+-fi
+-
+-if make --help 2>&1 | grep -q quiet; then
+- AM_MAKEFLAGS="$AM_MAKEFLAGS --quiet"
+-fi
+-
+-if libtool --help 2>&1 | grep -q quiet; then
+- AM_LIBTOOLFLAGS="--quiet";
+-fi
+-
+ AC_CONFIG_HEADERS([config.h])
+
+ AC_CONFIG_FILES([Makefile
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.4.4-cluster-dht-Don-t-do-extra-unref-in-dht-migration-ch.patch b/sys-cluster/glusterfs/files/glusterfs-3.4.4-cluster-dht-Don-t-do-extra-unref-in-dht-migration-ch.patch
new file mode 100644
index 00000000000..c26085a9dfe
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.4.4-cluster-dht-Don-t-do-extra-unref-in-dht-migration-ch.patch
@@ -0,0 +1,48 @@
+From 2b789331dc933b186360fc8cbffb06289ee60ee9 Mon Sep 17 00:00:00 2001
+From: Vijay Bellur <vbellur@redhat.com>
+Date: Tue, 10 Jun 2014 22:21:28 +0530
+Subject: [PATCH 1/3] cluster/dht: Don't do extra unref in dht-migration checks
+
+Problem:
+syncop_open used to perform a ref in syncop_open_cbk so the extra
+unref was needed but now syncop_open_cbk does not take a ref so no
+need to do extra unref.
+
+Fix:
+remove the extra fd_unref and let dht_local_wipe do the final unref.
+
+Change-Id: Ibe8f9a678d456a0c7bff175306068b5cd297ecc4
+BUG: 961615
+Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
+Signed-off-by: Vijay Bellur <vbellur@redhat.com>
+Reviewed-on: http://review.gluster.org/8029
+Tested-by: Gluster Build System <jenkins@build.gluster.com>
+Tested-by: Joe Julian <joe@julianfamily.org>
+Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
+---
+ xlators/cluster/dht/src/dht-helper.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
+index ef29e3f..dd8dc49 100644
+--- a/xlators/cluster/dht/src/dht-helper.c
++++ b/xlators/cluster/dht/src/dht-helper.c
+@@ -802,13 +802,10 @@ dht_migration_complete_check_task (void *data)
+ if (!local->fd)
+ goto out;
+ /* once we detect the migration complete, the fd-ctx is no more
+- required.. delete the ctx, and do one extra 'fd_unref' for open fd */
++ required.. delete the ctx */
+ ret = fd_ctx_del (local->fd, this, NULL);
+- if (!ret) {
+- fd_unref (local->fd);
+- ret = 0;
++ if (!ret)
+ goto out;
+- }
+
+ /* perform open as root:root. There is window between linkfile
+ * creation(root:root) and setattr with the correct uid/gid
+--
+1.9.2
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.4.4-fuse-fix-memory-leak-in-fuse_getxattr.patch b/sys-cluster/glusterfs/files/glusterfs-3.4.4-fuse-fix-memory-leak-in-fuse_getxattr.patch
new file mode 100644
index 00000000000..316e079322c
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.4.4-fuse-fix-memory-leak-in-fuse_getxattr.patch
@@ -0,0 +1,91 @@
+From 0cf6f0727482b5b8816b5e58cb67ef124eae808e Mon Sep 17 00:00:00 2001
+From: Justin Clift <justin@gluster.org>
+Date: Tue, 24 Jun 2014 20:57:02 +0100
+Subject: [PATCH] fuse: fix memory leak in fuse_getxattr()
+
+The fuse_getxattr() function was not freeing fuse_state_t resulting in a
+memory leak. As a result, when continuous writes (run dd command in a loop)
+were done from a FUSE mount point, the OOM killer killed the client
+process (glusterfs).
+
+Manual backport of: http://review.gluster.org/#/c/5392/, provided
+by Martin Svec <martin.svec@zoner.cz>.
+
+BUG: 1112844
+Change-Id: Ic723675c53384d48c79ad1b11b21c1b17fb56866
+---
+ xlators/mount/fuse/src/fuse-bridge.c | 27 ++++++++++++++-------------
+ 1 file changed, 14 insertions(+), 13 deletions(-)
+
+diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
+index e531970..da5937b 100644
+--- a/xlators/mount/fuse/src/fuse-bridge.c
++++ b/xlators/mount/fuse/src/fuse-bridge.c
+@@ -3207,6 +3207,7 @@ fuse_getxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
+ fuse_state_t *state = NULL;
+ struct fuse_private *priv = NULL;
+ int rv = 0;
++ int op_errno = EINVAL;
+ char *newkey = NULL;
+
+ priv = this->private;
+@@ -3227,26 +3228,23 @@ fuse_getxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
+ "%"PRIu64": GETXATTR %s/%"PRIu64" (%s):"
+ "refusing positioned getxattr",
+ finh->unique, state->loc.path, finh->nodeid, name);
+- send_fuse_err (this, finh, EINVAL);
+- FREE (finh);
+- return;
++ op_errno = EINVAL;
++ goto err;
+ }
+ #endif
+
+ if (!priv->acl) {
+ if ((strcmp (name, "system.posix_acl_access") == 0) ||
+ (strcmp (name, "system.posix_acl_default") == 0)) {
+- send_fuse_err (this, finh, ENOTSUP);
+- GF_FREE (finh);
+- return;
++ op_errno = ENOTSUP;
++ goto err;
+ }
+ }
+
+ if (!priv->selinux) {
+ if (strncmp (name, "security.", 9) == 0) {
+- send_fuse_err (this, finh, ENODATA);
+- GF_FREE (finh);
+- return;
++ op_errno = ENODATA;
++ goto err;
+ }
+ }
+
+@@ -3254,16 +3252,19 @@ fuse_getxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
+
+ rv = fuse_flip_xattr_ns (priv, name, &newkey);
+ if (rv) {
+- send_fuse_err (this, finh, ENOMEM);
+- free_fuse_state (state);
+- goto out;
++ op_errno = ENOMEM;
++ goto err;
+ }
+
+ state->size = fgxi->size;
+ state->name = newkey;
+
+ fuse_resolve_and_resume (state, fuse_getxattr_resume);
+- out:
++
++ return;
++ err:
++ send_fuse_err (this, finh, op_errno);
++ free_fuse_state (state);
+ return;
+ }
+
+--
+1.9.2
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.5.1-Add-libraries-using-LIBADD-instead-of-LDFLAGS.patch b/sys-cluster/glusterfs/files/glusterfs-3.5.1-Add-libraries-using-LIBADD-instead-of-LDFLAGS.patch
new file mode 100644
index 00000000000..5c4df0c9702
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.5.1-Add-libraries-using-LIBADD-instead-of-LDFLAGS.patch
@@ -0,0 +1,54 @@
+From 8bfe3752c3a0a4db49a879048cdd089da6c45ed0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Thu, 26 Jun 2014 19:04:54 +0200
+Subject: [PATCH] Add libraries using LIBADD instead of LDFLAGS
+
+---
+ xlators/encryption/crypt/src/Makefile.am | 6 +++---
+ xlators/features/compress/src/Makefile.am | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/xlators/encryption/crypt/src/Makefile.am b/xlators/encryption/crypt/src/Makefile.am
+index b13f650..d7ebac6 100644
+--- a/xlators/encryption/crypt/src/Makefile.am
++++ b/xlators/encryption/crypt/src/Makefile.am
+@@ -3,10 +3,10 @@ if ENABLE_CRYPT_XLATOR
+ xlator_LTLIBRARIES = crypt.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/encryption
+
+-crypt_la_LDFLAGS = -module -avoid-version -lssl -lcrypto
++crypt_la_LDFLAGS = -module -avoid-version
+
+ crypt_la_SOURCES = keys.c data.c metadata.c atom.c crypt.c
+-crypt_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
++crypt_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lssl -lcrypto
+
+ noinst_HEADERS = crypt-common.h crypt-mem-types.h crypt.h metadata.h
+
+@@ -21,4 +21,4 @@ else
+ noinst_DIST = keys.c data.c metadata.c atom.c crypt.c
+ noinst_HEADERS = crypt-common.h crypt-mem-types.h crypt.h metadata.h
+
+-endif
+\ No newline at end of file
++endif
+diff --git a/xlators/features/compress/src/Makefile.am b/xlators/features/compress/src/Makefile.am
+index 0bf757c..d3abe03 100644
+--- a/xlators/features/compress/src/Makefile.am
++++ b/xlators/features/compress/src/Makefile.am
+@@ -4,10 +4,10 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+ noinst_HEADERS = cdc.h cdc-mem-types.h
+
+-cdc_la_LDFLAGS = -module -avoid-version $(LIBZ_LIBS)
++cdc_la_LDFLAGS = -module -avoid-version
+
+ cdc_la_SOURCES = cdc.c cdc-helper.c
+-cdc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
++cdc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBZ_LIBS)
+
+ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+ -shared -nostartfiles $(LIBZ_CFLAGS)
+--
+1.9.2
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.5.1-build-shared-only.patch b/sys-cluster/glusterfs/files/glusterfs-3.5.1-build-shared-only.patch
new file mode 100644
index 00000000000..9acf0d7526c
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.5.1-build-shared-only.patch
@@ -0,0 +1,576 @@
+diff --git a/rpc/rpc-transport/rdma/src/Makefile.am b/rpc/rpc-transport/rdma/src/Makefile.am
+index 2bf7cf2..8e52d70 100644
+--- a/rpc/rpc-transport/rdma/src/Makefile.am
++++ b/rpc/rpc-transport/rdma/src/Makefile.am
+@@ -3,7 +3,7 @@
+ transport_LTLIBRARIES = rdma.la
+ transportdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport
+
+-rdma_la_LDFLAGS = -module -avoid-version
++rdma_la_LDFLAGS = -module -avoid-version -shared
+
+ rdma_la_SOURCES = rdma.c name.c
+ rdma_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+diff --git a/rpc/rpc-transport/socket/src/Makefile.am b/rpc/rpc-transport/socket/src/Makefile.am
+index 71e6ed6..b481fe9 100644
+--- a/rpc/rpc-transport/socket/src/Makefile.am
++++ b/rpc/rpc-transport/socket/src/Makefile.am
+@@ -3,7 +3,7 @@ noinst_HEADERS = socket.h name.h
+ rpctransport_LTLIBRARIES = socket.la
+ rpctransportdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport
+
+-socket_la_LDFLAGS = -module -avoid-version
++socket_la_LDFLAGS = -module -avoid-version -shared
+
+ socket_la_SOURCES = socket.c name.c
+ socket_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lssl
+diff --git a/xlators/cluster/afr/src/Makefile.am b/xlators/cluster/afr/src/Makefile.am
+index 35d18a6..959fea8 100644
+--- a/xlators/cluster/afr/src/Makefile.am
++++ b/xlators/cluster/afr/src/Makefile.am
+@@ -7,11 +7,11 @@ afr_common_source = afr-dir-read.c afr-dir-write.c afr-inode-read.c \
+ afr-self-heal-algorithm.c afr-lk-common.c afr-self-heald.c \
+ $(top_builddir)/xlators/lib/src/libxlator.c
+
+-afr_la_LDFLAGS = -module -avoid-version
++afr_la_LDFLAGS = -module -avoid-version -shared
+ afr_la_SOURCES = $(afr_common_source) afr.c
+ afr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-pump_la_LDFLAGS = -module -avoid-version
++pump_la_LDFLAGS = -module -avoid-version -shared
+ pump_la_SOURCES = $(afr_common_source) pump.c
+ pump_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+diff --git a/xlators/cluster/dht/src/Makefile.am b/xlators/cluster/dht/src/Makefile.am
+index 174bea8..cab9993 100644
+--- a/xlators/cluster/dht/src/Makefile.am
++++ b/xlators/cluster/dht/src/Makefile.am
+@@ -12,13 +12,13 @@ dht_la_SOURCES = $(dht_common_source) dht.c
+ nufa_la_SOURCES = $(dht_common_source) nufa.c
+ switch_la_SOURCES = $(dht_common_source) switch.c
+
+-dht_la_LDFLAGS = -module -avoid-version
++dht_la_LDFLAGS = -module -avoid-version -shared
+ dht_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-nufa_la_LDFLAGS = -module -avoid-version
++nufa_la_LDFLAGS = -module -avoid-version -shared
+ nufa_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-switch_la_LDFLAGS = -module -avoid-version
++switch_la_LDFLAGS = -module -avoid-version -shared
+ switch_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+ noinst_HEADERS = dht-common.h dht-mem-types.h \
+diff --git a/xlators/cluster/stripe/src/Makefile.am b/xlators/cluster/stripe/src/Makefile.am
+index 2d15142..6989de9 100644
+--- a/xlators/cluster/stripe/src/Makefile.am
++++ b/xlators/cluster/stripe/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = stripe.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/cluster
+
+-stripe_la_LDFLAGS = -module -avoid-version
++stripe_la_LDFLAGS = -module -avoid-version -shared
+
+ stripe_la_SOURCES = stripe.c stripe-helpers.c \
+ $(top_builddir)/xlators/lib/src/libxlator.c
+diff --git a/xlators/debug/error-gen/src/Makefile.am b/xlators/debug/error-gen/src/Makefile.am
+index 5075c59..a7681c4 100644
+--- a/xlators/debug/error-gen/src/Makefile.am
++++ b/xlators/debug/error-gen/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = error-gen.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-error_gen_la_LDFLAGS = -module -avoid-version
++error_gen_la_LDFLAGS = -module -avoid-version -shared
+
+ error_gen_la_SOURCES = error-gen.c
+ error_gen_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/debug/io-stats/src/Makefile.am b/xlators/debug/io-stats/src/Makefile.am
+index 332d790..bf62017 100644
+--- a/xlators/debug/io-stats/src/Makefile.am
++++ b/xlators/debug/io-stats/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = io-stats.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-io_stats_la_LDFLAGS = -module -avoid-version
++io_stats_la_LDFLAGS = -module -avoid-version -shared
+
+ io_stats_la_SOURCES = io-stats.c
+ io_stats_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/debug/trace/src/Makefile.am b/xlators/debug/trace/src/Makefile.am
+index 7b2597b..2030ed4 100644
+--- a/xlators/debug/trace/src/Makefile.am
++++ b/xlators/debug/trace/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = trace.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/debug
+
+-trace_la_LDFLAGS = -module -avoid-version
++trace_la_LDFLAGS = -module -avoid-version -shared
+
+ trace_la_SOURCES = trace.c
+ trace_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/encryption/crypt/src/Makefile.am b/xlators/encryption/crypt/src/Makefile.am
+index d7ebac6..66ae6f5 100644
+--- a/xlators/encryption/crypt/src/Makefile.am
++++ b/xlators/encryption/crypt/src/Makefile.am
+@@ -3,7 +3,7 @@ if ENABLE_CRYPT_XLATOR
+ xlator_LTLIBRARIES = crypt.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/encryption
+
+-crypt_la_LDFLAGS = -module -avoid-version
++crypt_la_LDFLAGS = -module -avoid-version -shared
+
+ crypt_la_SOURCES = keys.c data.c metadata.c atom.c crypt.c
+ crypt_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lssl -lcrypto
+diff --git a/xlators/encryption/rot-13/src/Makefile.am b/xlators/encryption/rot-13/src/Makefile.am
+index 94e8d18..d13894e 100644
+--- a/xlators/encryption/rot-13/src/Makefile.am
++++ b/xlators/encryption/rot-13/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = rot-13.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/encryption
+
+-rot_13_la_LDFLAGS = -module -avoid-version
++rot_13_la_LDFLAGS = -module -avoid-version -shared
+
+ rot_13_la_SOURCES = rot-13.c
+ rot_13_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/changelog/src/Makefile.am b/xlators/features/changelog/src/Makefile.am
+index 54c21ac..d98f43f 100644
+--- a/xlators/features/changelog/src/Makefile.am
++++ b/xlators/features/changelog/src/Makefile.am
+@@ -5,7 +5,7 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+ noinst_HEADERS = changelog-helpers.h changelog-mem-types.h changelog-rt.h \
+ changelog-misc.h changelog-encoders.h changelog-notifier.h
+
+-changelog_la_LDFLAGS = -module -avoid-version
++changelog_la_LDFLAGS = -module -avoid-version -shared
+
+ changelog_la_SOURCES = changelog.c changelog-rt.c changelog-helpers.c \
+ changelog-encoders.c changelog-notifier.c
+diff --git a/xlators/features/compress/src/Makefile.am b/xlators/features/compress/src/Makefile.am
+index d3abe03..659cd49 100644
+--- a/xlators/features/compress/src/Makefile.am
++++ b/xlators/features/compress/src/Makefile.am
+@@ -4,7 +4,7 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+ noinst_HEADERS = cdc.h cdc-mem-types.h
+
+-cdc_la_LDFLAGS = -module -avoid-version
++cdc_la_LDFLAGS = -module -avoid-version -shared
+
+ cdc_la_SOURCES = cdc.c cdc-helper.c
+ cdc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBZ_LIBS)
+diff --git a/xlators/features/gfid-access/src/Makefile.am b/xlators/features/gfid-access/src/Makefile.am
+index db53aff..4eeaa4f 100644
+--- a/xlators/features/gfid-access/src/Makefile.am
++++ b/xlators/features/gfid-access/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = gfid-access.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-gfid_access_la_LDFLAGS = -module -avoid-version
++gfid_access_la_LDFLAGS = -module -avoid-version -shared
+
+ gfid_access_la_SOURCES = gfid-access.c
+ gfid_access_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/index/src/Makefile.am b/xlators/features/index/src/Makefile.am
+index 73bb897..5519798 100644
+--- a/xlators/features/index/src/Makefile.am
++++ b/xlators/features/index/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = index.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-index_la_LDFLAGS = -module -avoid-version
++index_la_LDFLAGS = -module -avoid-version -shared
+
+ index_la_SOURCES = index.c
+ index_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/locks/src/Makefile.am b/xlators/features/locks/src/Makefile.am
+index 0f79731..eda6a05 100644
+--- a/xlators/features/locks/src/Makefile.am
++++ b/xlators/features/locks/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = locks.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-locks_la_LDFLAGS = -module -avoid-version
++locks_la_LDFLAGS = -module -avoid-version -shared
+
+ locks_la_SOURCES = common.c posix.c entrylk.c inodelk.c reservelk.c \
+ clear.c
+diff --git a/xlators/features/mac-compat/src/Makefile.am b/xlators/features/mac-compat/src/Makefile.am
+index f8567ed..a283eb0 100644
+--- a/xlators/features/mac-compat/src/Makefile.am
++++ b/xlators/features/mac-compat/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = mac-compat.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-mac_compat_la_LDFLAGS = -module -avoid-version
++mac_compat_la_LDFLAGS = -module -avoid-version -shared
+
+ mac_compat_la_SOURCES = mac-compat.c
+ mac_compat_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/marker/src/Makefile.am b/xlators/features/marker/src/Makefile.am
+index a7c6764..477fe0f 100644
+--- a/xlators/features/marker/src/Makefile.am
++++ b/xlators/features/marker/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = marker.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-marker_la_LDFLAGS = -module -avoid-version
++marker_la_LDFLAGS = -module -avoid-version -shared
+
+ marker_la_SOURCES = marker.c marker-quota.c marker-quota-helper.c marker-common.c
+ marker_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/protect/src/Makefile.am b/xlators/features/protect/src/Makefile.am
+index 968e88c..84ceec2 100644
+--- a/xlators/features/protect/src/Makefile.am
++++ b/xlators/features/protect/src/Makefile.am
+@@ -2,15 +2,15 @@ xlator_LTLIBRARIES = prot_dht.la prot_client.la prot_server.la
+
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-prot_dht_la_LDFLAGS = -module -avoid-version
++prot_dht_la_LDFLAGS = -module -avoid-version -shared
+ prot_dht_la_SOURCES = prot_dht.c
+ prot_dht_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-prot_client_la_LDFLAGS = -module -avoid-version
++prot_client_la_LDFLAGS = -module -avoid-version -shared
+ prot_client_la_SOURCES = prot_client.c
+ prot_client_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-prot_server_la_LDFLAGS = -module -avoid-version
++prot_server_la_LDFLAGS = -module -avoid-version -shared
+ prot_server_la_SOURCES = prot_server.c
+ prot_server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+diff --git a/xlators/features/qemu-block/src/Makefile.am b/xlators/features/qemu-block/src/Makefile.am
+index 08a7b62..30639e0 100644
+--- a/xlators/features/qemu-block/src/Makefile.am
++++ b/xlators/features/qemu-block/src/Makefile.am
+@@ -2,7 +2,7 @@ if ENABLE_QEMU_BLOCK
+ xlator_LTLIBRARIES = qemu-block.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-qemu_block_la_LDFLAGS = -module -avoid-version
++qemu_block_la_LDFLAGS = -module -avoid-version -shared
+ qemu_block_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(GLIB_LIBS) -lz -lrt
+
+ qemu_block_la_SOURCES_qemu = \
+diff --git a/xlators/features/quiesce/src/Makefile.am b/xlators/features/quiesce/src/Makefile.am
+index 15e4662..b3cd9d1 100644
+--- a/xlators/features/quiesce/src/Makefile.am
++++ b/xlators/features/quiesce/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = quiesce.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-quiesce_la_LDFLAGS = -module -avoid-version
++quiesce_la_LDFLAGS = -module -avoid-version -shared
+
+ quiesce_la_SOURCES = quiesce.c
+ quiesce_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am
+index 7165adc..06905f3 100644
+--- a/xlators/features/quota/src/Makefile.am
++++ b/xlators/features/quota/src/Makefile.am
+@@ -1,8 +1,8 @@
+ xlator_LTLIBRARIES = quota.la quotad.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+-quota_la_LDFLAGS = -module -avoid-version
+-quotad_la_LDFLAGS = -module -avoid-version
++quota_la_LDFLAGS = -module -avoid-version -shared
++quotad_la_LDFLAGS = -module -avoid-version -shared
+
+ quota_la_SOURCES = quota.c quota-enforcer-client.c
+ quota_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/features/read-only/src/Makefile.am b/xlators/features/read-only/src/Makefile.am
+index 4c14621..a3f79fa 100644
+--- a/xlators/features/read-only/src/Makefile.am
++++ b/xlators/features/read-only/src/Makefile.am
+@@ -4,12 +4,12 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+ noinst_HEADERS = read-only-common.h
+
+-read_only_la_LDFLAGS = -module -avoid-version
++read_only_la_LDFLAGS = -module -avoid-version -shared
+
+ read_only_la_SOURCES = read-only.c read-only-common.c
+ read_only_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
+-worm_la_LDFLAGS = -module -avoid-version
++worm_la_LDFLAGS = -module -avoid-version -shared
+
+ worm_la_SOURCES = read-only-common.c worm.c
+ worm_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
+index a6f49ae..b071280 100644
+--- a/xlators/mgmt/glusterd/src/Makefile.am
++++ b/xlators/mgmt/glusterd/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = glusterd.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/mgmt
+ glusterd_la_CPPFLAGS = $(AM_CPPFLAGS) "-DFILTERDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/filter\""
+-glusterd_la_LDFLAGS = -module -avoid-version
++glusterd_la_LDFLAGS = -module -avoid-version -shared
+ if ENABLE_BD_XLATOR
+ glusterd_la_LDFLAGS += -llvm2app
+ endif
+diff --git a/xlators/mount/fuse/src/Makefile.am b/xlators/mount/fuse/src/Makefile.am
+index 653121d..3f221d8 100644
+--- a/xlators/mount/fuse/src/Makefile.am
++++ b/xlators/mount/fuse/src/Makefile.am
+@@ -24,7 +24,7 @@ endif
+ fuse_la_SOURCES = fuse-helpers.c fuse-resolve.c fuse-bridge.c \
+ $(CONTRIBDIR)/fuse-lib/misc.c $(mount_source)
+
+-fuse_la_LDFLAGS = -module -avoid-version
++fuse_la_LDFLAGS = -module -avoid-version -shared
+ fuse_la_LIBADD = @GF_FUSE_LDADD@
+
+ AM_CPPFLAGS = $(GF_CPPFLAGS) \
+diff --git a/xlators/nfs/server/src/Makefile.am b/xlators/nfs/server/src/Makefile.am
+index 62fbf65..1995f67 100644
+--- a/xlators/nfs/server/src/Makefile.am
++++ b/xlators/nfs/server/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = server.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/nfs
+ nfsrpclibdir = $(top_srcdir)/rpc/rpc-lib/src
+-server_la_LDFLAGS = -module -avoid-version
++server_la_LDFLAGS = -module -avoid-version -shared
+ server_la_SOURCES = nfs.c nfs-common.c nfs-fops.c nfs-inodes.c \
+ nfs-generics.c mount3.c nfs3-fh.c nfs3.c nfs3-helpers.c nlm4.c \
+ nlmcbk_svc.c mount3udp_svc.c acl3.c
+diff --git a/xlators/performance/io-cache/src/Makefile.am b/xlators/performance/io-cache/src/Makefile.am
+index 155be99..ba0738c 100644
+--- a/xlators/performance/io-cache/src/Makefile.am
++++ b/xlators/performance/io-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = io-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-io_cache_la_LDFLAGS = -module -avoid-version
++io_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ io_cache_la_SOURCES = io-cache.c page.c ioc-inode.c
+ io_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/io-threads/src/Makefile.am b/xlators/performance/io-threads/src/Makefile.am
+index d63042e..aba1fdb 100644
+--- a/xlators/performance/io-threads/src/Makefile.am
++++ b/xlators/performance/io-threads/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = io-threads.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-io_threads_la_LDFLAGS = -module -avoid-version
++io_threads_la_LDFLAGS = -module -avoid-version -shared
+
+ io_threads_la_SOURCES = io-threads.c
+ io_threads_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/md-cache/src/Makefile.am b/xlators/performance/md-cache/src/Makefile.am
+index 8c9f5a8..4d714fa 100644
+--- a/xlators/performance/md-cache/src/Makefile.am
++++ b/xlators/performance/md-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = md-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-md_cache_la_LDFLAGS = -module -avoid-version
++md_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ md_cache_la_SOURCES = md-cache.c
+ md_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/open-behind/src/Makefile.am b/xlators/performance/open-behind/src/Makefile.am
+index 1252857..568434a 100644
+--- a/xlators/performance/open-behind/src/Makefile.am
++++ b/xlators/performance/open-behind/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = open-behind.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-open_behind_la_LDFLAGS = -module -avoid-version
++open_behind_la_LDFLAGS = -module -avoid-version -shared
+
+ open_behind_la_SOURCES = open-behind.c
+ open_behind_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/quick-read/src/Makefile.am b/xlators/performance/quick-read/src/Makefile.am
+index 4906f40..8d42116 100644
+--- a/xlators/performance/quick-read/src/Makefile.am
++++ b/xlators/performance/quick-read/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = quick-read.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-quick_read_la_LDFLAGS = -module -avoid-version
++quick_read_la_LDFLAGS = -module -avoid-version -shared
+
+ quick_read_la_SOURCES = quick-read.c
+ quick_read_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/read-ahead/src/Makefile.am b/xlators/performance/read-ahead/src/Makefile.am
+index be80ae7..eae0540 100644
+--- a/xlators/performance/read-ahead/src/Makefile.am
++++ b/xlators/performance/read-ahead/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = read-ahead.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-read_ahead_la_LDFLAGS = -module -avoid-version
++read_ahead_la_LDFLAGS = -module -avoid-version -shared
+
+ read_ahead_la_SOURCES = read-ahead.c page.c
+ read_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/readdir-ahead/src/Makefile.am b/xlators/performance/readdir-ahead/src/Makefile.am
+index 539d6ed..020b670 100644
+--- a/xlators/performance/readdir-ahead/src/Makefile.am
++++ b/xlators/performance/readdir-ahead/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = readdir-ahead.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-readdir_ahead_la_LDFLAGS = -module -avoid-version
++readdir_ahead_la_LDFLAGS = -module -avoid-version -shared
+
+ readdir_ahead_la_SOURCES = readdir-ahead.c
+ readdir_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/symlink-cache/src/Makefile.am b/xlators/performance/symlink-cache/src/Makefile.am
+index 4091c32..0d600d6 100644
+--- a/xlators/performance/symlink-cache/src/Makefile.am
++++ b/xlators/performance/symlink-cache/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = symlink-cache.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/testing/performance
+
+-symlink_cache_la_LDFLAGS = -module -avoid-version
++symlink_cache_la_LDFLAGS = -module -avoid-version -shared
+
+ symlink_cache_la_SOURCES = symlink-cache.c
+ symlink_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/performance/write-behind/src/Makefile.am b/xlators/performance/write-behind/src/Makefile.am
+index 6c829d8..746e5c1 100644
+--- a/xlators/performance/write-behind/src/Makefile.am
++++ b/xlators/performance/write-behind/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = write-behind.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
+
+-write_behind_la_LDFLAGS = -module -avoid-version
++write_behind_la_LDFLAGS = -module -avoid-version -shared
+
+ write_behind_la_SOURCES = write-behind.c
+ write_behind_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/playground/template/src/Makefile.am b/xlators/playground/template/src/Makefile.am
+index 21f1c5f..3161bc8 100644
+--- a/xlators/playground/template/src/Makefile.am
++++ b/xlators/playground/template/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = template.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/testing/features
+
+-template_la_LDFLAGS = -module -avoid-version
++template_la_LDFLAGS = -module -avoid-version -shared
+
+ template_la_SOURCES = template.c
+ template_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/auth/addr/src/Makefile.am b/xlators/protocol/auth/addr/src/Makefile.am
+index 426e7c2..fa7234d 100644
+--- a/xlators/protocol/auth/addr/src/Makefile.am
++++ b/xlators/protocol/auth/addr/src/Makefile.am
+@@ -1,7 +1,7 @@
+ auth_LTLIBRARIES = addr.la
+ authdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/auth
+
+-addr_la_LDFLAGS = -module -avoid-version
++addr_la_LDFLAGS = -module -avoid-version -shared
+
+ addr_la_SOURCES = addr.c
+ addr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/auth/login/src/Makefile.am b/xlators/protocol/auth/login/src/Makefile.am
+index d84db91..022739d 100644
+--- a/xlators/protocol/auth/login/src/Makefile.am
++++ b/xlators/protocol/auth/login/src/Makefile.am
+@@ -1,7 +1,7 @@
+ auth_LTLIBRARIES = login.la
+ authdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/auth
+
+-login_la_LDFLAGS = -module -avoid-version
++login_la_LDFLAGS = -module -avoid-version -shared
+
+ login_la_SOURCES = login.c
+ login_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+diff --git a/xlators/protocol/client/src/Makefile.am b/xlators/protocol/client/src/Makefile.am
+index cf89d42..8f2612c 100644
+--- a/xlators/protocol/client/src/Makefile.am
++++ b/xlators/protocol/client/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = client.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/protocol
+
+-client_la_LDFLAGS = -module -avoid-version
++client_la_LDFLAGS = -module -avoid-version -shared
+
+ client_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
+diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am
+index 6a18bf0..9a0393f 100644
+--- a/xlators/protocol/server/src/Makefile.am
++++ b/xlators/protocol/server/src/Makefile.am
+@@ -1,7 +1,7 @@
+ xlator_LTLIBRARIES = server.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/protocol
+
+-server_la_LDFLAGS = -module -avoid-version
++server_la_LDFLAGS = -module -avoid-version -shared
+
+ server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
+diff --git a/xlators/storage/bd/src/Makefile.am b/xlators/storage/bd/src/Makefile.am
+index 3d93f74..589185d 100644
+--- a/xlators/storage/bd/src/Makefile.am
++++ b/xlators/storage/bd/src/Makefile.am
+@@ -2,7 +2,7 @@ if ENABLE_BD_XLATOR
+ xlator_LTLIBRARIES = bd.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/storage
+
+-bd_la_LDFLAGS = -module -avoid-version
++bd_la_LDFLAGS = -module -avoid-version -shared
+ LIBBD = -llvm2app -lrt
+ bd_la_SOURCES = bd.c bd-helper.c bd-aio.c
+ bd_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBBD) $(LIBAIO)
+diff --git a/xlators/storage/posix/src/Makefile.am b/xlators/storage/posix/src/Makefile.am
+index 88efcc7..79ca903 100644
+--- a/xlators/storage/posix/src/Makefile.am
++++ b/xlators/storage/posix/src/Makefile.am
+@@ -2,7 +2,7 @@
+ xlator_LTLIBRARIES = posix.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/storage
+
+-posix_la_LDFLAGS = -module -avoid-version
++posix_la_LDFLAGS = -module -avoid-version -shared
+
+ posix_la_SOURCES = posix.c posix-helpers.c posix-handle.c posix-aio.c
+ posix_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBAIO)
+diff --git a/xlators/system/posix-acl/src/Makefile.am b/xlators/system/posix-acl/src/Makefile.am
+index 11c939f..561c52d 100644
+--- a/xlators/system/posix-acl/src/Makefile.am
++++ b/xlators/system/posix-acl/src/Makefile.am
+@@ -1,6 +1,6 @@
+ xlator_LTLIBRARIES = posix-acl.la
+ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/system
+-posix_acl_la_LDFLAGS = -module -avoid-version
++posix_acl_la_LDFLAGS = -module -avoid-version -shared
+ posix_acl_la_SOURCES = posix-acl.c posix-acl-xattr.c
+ posix_acl_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+
diff --git a/sys-cluster/glusterfs/files/glusterfs-docdir.patch b/sys-cluster/glusterfs/files/glusterfs-docdir.patch
new file mode 100644
index 00000000000..5e26f637b22
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-docdir.patch
@@ -0,0 +1,51 @@
+From 6a17bb8523c4c7810bf7797371df22cfb259f7a7 Mon Sep 17 00:00:00 2001
+From: MATSUU Takuto <matsuu@gentoo.org>
+Date: Sat, 16 May 2009 07:01:53 +0900
+Subject: [PATCH] Use the standard autoconf $docdir variable.
+
+---