diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster | |
download | gentoo-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')
554 files changed, 29563 insertions, 0 deletions
diff --git a/sys-cluster/ampi/Manifest b/sys-cluster/ampi/Manifest new file mode 100644 index 000000000000..d51610a4d2c5 --- /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 000000000000..bed60bd1bbc2 --- /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 000000000000..58ee15ee5ec2 --- /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 000000000000..88d86c55f336 --- /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 000000000000..a38f3c5daae6 --- /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 000000000000..348e6c4de815 --- /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 000000000000..73196da78bfc --- /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 000000000000..41ceeb976da0 --- /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 000000000000..42e2de6ac4ff --- /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 000000000000..64164e7cb0d2 --- /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 000000000000..ad7beca80d74 --- /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 000000000000..348e6c4de815 --- /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 000000000000..855472f063a4 --- /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 000000000000..96e1e7ef70ca --- /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 000000000000..6eaa17a27bac --- /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 000000000000..ec2218fadfa7 --- /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 000000000000..fe924eb3be80 --- /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 000000000000..b0495158ec1d --- /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 000000000000..6d79c178d43e --- /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 000000000000..ca79f0b6f483 --- /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 000000000000..55a49d72f687 --- /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 000000000000..3e2eace394c2 --- /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 000000000000..c28604e3c430 --- /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 000000000000..0172cbeadeee --- /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 000000000000..4f54cc158c5b --- /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 000000000000..e69de29bb2d1 --- /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 000000000000..7bf125f63c78 --- /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 000000000000..959b948c1178 --- /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 000000000000..3bdb8b485ed8 --- /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 000000000000..ca5ab60cc0b7 --- /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 000000000000..881d7ffb43d6 --- /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 000000000000..60734baff689 --- /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 000000000000..fa5832d113b8 --- /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 000000000000..8e46f854b1a2 --- /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 000000000000..240348abb4ed --- /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 000000000000..f16f5aee5282 --- /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 000000000000..f800eaedcfc6 --- /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 000000000000..c3207a373c38 --- /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 000000000000..b05dd5ff790f --- /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 000000000000..5850dba36660 --- /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 000000000000..a49cd62bc92d --- /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 000000000000..ad07fc3aa3bc --- /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 000000000000..f1502ced7d94 --- /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 000000000000..ec71eb27d469 --- /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 000000000000..6ed4c1989b4c --- /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 000000000000..a19a8dba1ff7 --- /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 000000000000..1cc6b432c3d4 --- /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 000000000000..13efb2123b55 --- /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 000000000000..21c49dafe746 --- /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 000000000000..5683eb2761cd --- /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 000000000000..6a7e80227142 --- /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 000000000000..6b1c94c9f6e6 --- /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 000000000000..3cc163370779 --- /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 000000000000..5618bcdfb7f4 --- /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 000000000000..b4ed4b243df3 --- /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 000000000000..d33474f13d75 --- /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 000000000000..5335e5c02ad5 --- /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 000000000000..2e1d31970fc1 --- /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 000000000000..d09928c17c9c --- /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 000000000000..4c6969ec4c46 --- /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 000000000000..f44bab4a5778 --- /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 000000000000..ded44af42b74 --- /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 000000000000..f44bab4a5778 --- /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 000000000000..2ca4745405e9 --- /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 000000000000..f4ee6b20b81d --- /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 000000000000..14968f657b61 --- /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 000000000000..4ef9419cf900 --- /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 000000000000..91f5dbc1c4e9 --- /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 000000000000..57becbdc3bcc --- /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 000000000000..5760c217c337 --- /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 000000000000..b908ffa6f06a --- /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 000000000000..d6e247a62e10 --- /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 000000000000..52a879574ccb --- /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 000000000000..424c529623f0 --- /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 000000000000..f89432fc7eed --- /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 000000000000..fff85b003322 --- /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 000000000000..a2dff8341bfd --- /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 000000000000..60de12026db5 --- /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 000000000000..09a6c407e1c1 --- /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 000000000000..4a73eee8862c --- /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 000000000000..19b3d9ad105e --- /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 000000000000..fc3290a6f308 --- /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 000000000000..348e6c4de815 --- /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 000000000000..0e8513fbb082 --- /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 000000000000..dfb531253432 --- /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 000000000000..050c7bf4b55f --- /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 000000000000..b6ed94b4eae9 --- /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 000000000000..14b7ea791614 --- /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 000000000000..4aa4592e0828 --- /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 000000000000..c8be27f575d5 --- /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 000000000000..0a01281a5669 --- /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 000000000000..13ca99f343a2 --- /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 000000000000..dee0a62ad3cb --- /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 000000000000..c4f6f5c4cefb --- /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 000000000000..42e345bbd1e4 --- /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 000000000000..988f02a27333 --- /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 000000000000..358dea9ea607 --- /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 000000000000..1b4b0cffcb15 --- /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 000000000000..66eacb821e5e --- /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 000000000000..53dbd7d29c75 --- /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 000000000000..198db980ae44 --- /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 000000000000..b88f11b1d6df --- /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 000000000000..6c0952dcb521 --- /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 000000000000..08d3ba8b7302 --- /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 000000000000..021059b08175 --- /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 000000000000..8dda3f2c593f --- /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 000000000000..3aadfb53ff27 --- /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 000000000000..3d811b314dae --- /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 000000000000..5d3672ebed53 --- /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 000000000000..3c9e9370fbe1 --- /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 000000000000..64af5229be74 --- /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 000000000000..6509dbad12cb --- /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 000000000000..d2a7adb8f5b9 --- /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 000000000000..55dd68aadc97 --- /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 000000000000..d39a905e372e --- /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 000000000000..e6c4644a7de5 --- /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 000000000000..2efe5a658792 --- /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 000000000000..348e6c4de815 --- /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 000000000000..d39a905e372e --- /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 000000000000..ebf4caed3d78 --- /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 000000000000..ce630c044c01 --- /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 000000000000..120e5adfb2e7 --- /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 000000000000..348e6c4de815 --- /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 000000000000..8527f3b3339f --- /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 000000000000..2ad9f5fa86c2 --- /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 000000000000..6f348cd8c13d --- /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 000000000000..7c0ccb89556f --- /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 000000000000..c7b4f814077e --- /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 000000000000..beb07fbdaeb9 --- /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 000000000000..893f9c2e21fe --- /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 000000000000..348e6c4de815 --- /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 000000000000..fae480317107 --- /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 000000000000..519a52eeea5e --- /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 000000000000..3a60ac67a580 --- /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 000000000000..e9c994f13708 --- /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 000000000000..0b91cb7a74e3 --- /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 000000000000..9a4653ca39e9 --- /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 000000000000..fb6fab1be8e5 --- /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 000000000000..bf8f76e7e585 --- /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 000000000000..325af29ec636 --- /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 000000000000..140455671d65 --- /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 000000000000..741ac75b3cde --- /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 000000000000..f21f0d078231 --- /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 000000000000..f80504c35bc2 --- /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 000000000000..ed5abe98d78a --- /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 000000000000..1eeca1b1b0ff --- /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 000000000000..0fbbb92a2c3f --- /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 000000000000..cbfbad5934af --- /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 000000000000..b0dd55d227a2 --- /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 000000000000..1dd42442c94a --- /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 000000000000..e788b18c6452 --- /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 000000000000..0d325191f88a --- /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 000000000000..ffe75d010012 --- /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 000000000000..c75714ee74f5 --- /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 000000000000..9a29a3fa59eb --- /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 000000000000..dfc0fe502816 --- /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 000000000000..ddfa37264276 --- /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 000000000000..26e0d49c0673 --- /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 000000000000..17c73f3b8f21 --- /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 000000000000..f43f97066a36 --- /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 000000000000..7e624d8d2e00 --- /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 000000000000..ff9a2d941a99 --- /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 000000000000..392a5958b59d --- /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 000000000000..c23d3fc9a5b0 --- /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 000000000000..b82294b32241 --- /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 000000000000..5aca0f709f44 --- /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 000000000000..4f0047a02c25 --- /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 000000000000..63e88dff5cdf --- /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 000000000000..d7e5f37817ef --- /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 000000000000..91d7bbb18b02 --- /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 000000000000..5a3472d3563f --- /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 000000000000..b4af621f040a --- /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 000000000000..0362a0fa9baf --- /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 000000000000..6f49bbedb7c0 --- /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 000000000000..bba2fa8abee9 --- /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 000000000000..1a2c10828c44 --- /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 000000000000..e6685629582f --- /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 000000000000..37e24444b3c7 --- /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 000000000000..e462de57a941 --- /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 000000000000..e908764131e1 --- /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 000000000000..c8858e81ad10 --- /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 000000000000..fe8d70f6fcec --- /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 000000000000..3ca5f36121fa --- /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 000000000000..9cd10087b939 --- /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 000000000000..276972fe2d01 --- /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 000000000000..c49f8fc512e4 --- /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 000000000000..40608e528201 --- /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 000000000000..2f2bd3b88ec9 --- /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 000000000000..40108cedcf5e --- /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 000000000000..babd14ca2d62 --- /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 000000000000..8a9f4c86fbef --- /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 000000000000..e6685629582f --- /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 000000000000..af094dd23357 --- /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 000000000000..aeb49d5c6b9e --- /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 000000000000..bf7d681c90e8 --- /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 000000000000..8145a81b304a --- /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 000000000000..9efee3599098 --- /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 000000000000..73196da78bfc --- /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 000000000000..c97698709be4 --- /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 000000000000..348e6c4de815 --- /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 000000000000..e08b3507491a --- /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 000000000000..c14b0d8de33b --- /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 000000000000..a312bdbc64d7 --- /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 000000000000..3cb7c637163c --- /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 000000000000..8d4d7b8257af --- /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 000000000000..285136373d8e --- /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 000000000000..bbb28a736d4f --- /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 000000000000..9320c12ea7b1 --- /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 000000000000..2af2d502fc9e --- /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 000000000000..83f3043d4ef5 --- /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 000000000000..ab3a3d1547ca --- /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 000000000000..d9e25494b64c --- /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 000000000000..38afa6c4f387 --- /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 000000000000..5a1bdec89e62 --- /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 000000000000..1b79e0d079e4 --- /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 000000000000..c26085a9dfe7 --- /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 000000000000..316e079322ca --- /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 000000000000..5c4df0c97025 --- /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 000000000000..9acf0d7526cd --- /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 000000000000..5e26f637b22a --- /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. + +--- + doc/examples/Makefile.am | 1 - + extras/Makefile.am | 3 +-- + extras/benchmarking/Makefile.am | 4 +--- + 3 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am +index b4c93f4..5296d83 100644 +--- a/doc/examples/Makefile.am ++++ b/doc/examples/Makefile.am +@@ -1,7 +1,6 @@ + EXTRA = README unify.vol replicate.vol stripe.vol protocol-client.vol protocol-server.vol posix-locks.vol trash.vol write-behind.vol io-threads.vol io-cache.vol read-ahead.vol filter.vol trace.vol + EXTRA_DIST = $(EXTRA) + +-docdir = $(datadir)/doc/$(PACKAGE_NAME) + Examplesdir = $(docdir)/examples + Examples_DATA = $(EXTRA) + +diff --git a/extras/Makefile.am b/extras/Makefile.am +index 9be3973..ea0b33d 100644 +--- 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 +diff --git a/extras/benchmarking/Makefile.am b/extras/benchmarking/Makefile.am +index 04cc061..bfcc592 100644 +--- 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 + +-- +1.6.3 + diff --git a/sys-cluster/glusterfs/files/glusterfs-r1.initd b/sys-cluster/glusterfs/files/glusterfs-r1.initd new file mode 100644 index 000000000000..0a974a8eae34 --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs-r1.initd @@ -0,0 +1,122 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +if [[ "${SVCNAME}" != "glusterfs" ]] +then + GLUSTERFS_NAME="${SVCNAME#glusterfs.}" +else + GLUSTERFS_NAME="glusterfs" +fi + +GLUSTERFS_PIDFILE="/var/run/${SVCNAME}.pid" + +eval 'GLUSTERFS_LOGFILE="${'${GLUSTERFS_NAME}'_log:-/var/log/glusterfs/'${GLUSTERFS_NAME}'.log}"' +eval 'GLUSTERFS_VOLFILE="${'${GLUSTERFS_NAME}'_vol:-/etc/glusterfs/'${GLUSTERFS_NAME}'.vol}"' +eval 'GLUSTERFS_SERVER="${'${GLUSTERFS_NAME}'_server}"' +eval 'GLUSTERFS_PORT="${'${GLUSTERFS_NAME}'_port:-6996}"' +eval 'GLUSTERFS_TRANSPORT="${'${GLUSTERFS_NAME}'_transport:-socket}"' +eval 'GLUSTERFS_OPTS="${'${GLUSTERFS_NAME}'_opts}"' +eval 'GLUSTERFS_MOUNTPOINT="${'${GLUSTERFS_NAME}'_mountpoint}"' + +depend() { + need net + [[ -n "${GLUSTERFS_MOUNTPOINT}" ]] && need fuse + use dns + before netmount + after firewall ntp-client ntpd +} + +checkconfig() { + if [[ -z "${GLUSTERFS_NAME}" ]] + then + eerror "The service name is not properly formatted." + return 1 + fi + + if [[ -z "${GLUSTERFS_SERVER}" ]] + then + if [[ -z "${GLUSTERFS_VOLFILE}" ]] + then + eerror "No GlusterFS volume file source has been defined. Edit /etc/conf.d/glusterfs" + eerror "and configure a volume file source for ${SVCNAME}." + return 1 + else + if [[ ! -f "${GLUSTERFS_VOLFILE}" ]] + then + eerror "Cannot find volume file: ${GLUSTERFS_VOLFILE}" + return 1 + fi + fi + fi + + if [[ -n "${GLUSTERFS_MOUNTPOINT}" && ! -d "${GLUSTERFS_MOUNTPOINT}" ]] + then + eerror "The mountpoint ${GLUSTERFS_MOUNTPOINT} does not exist." + return 1 + fi +} + +start() { + local status daemon + + checkconfig || return 1 + + ebegin "Starting GlusterFS (${SVCNAME})" + eindent + + if [[ -z "${GLUSTERFS_MOUNTPOINT}" ]] + then + einfo "Starting in server mode ..." + daemon="glusterfsd" + else + einfo "Starting in client mode. Mounting filesystem ..." + daemon="glusterfs" + fi + + if [[ -n "${GLUSTERFS_SERVER}" ]] + then + einfo "Using server supplied volume file" + start-stop-daemon --start --pidfile ${GLUSTERFS_PIDFILE} \ + --exec /usr/sbin/${daemon} -- \ + --pid-file=${GLUSTERFS_PIDFILE} \ + --log-file=${GLUSTERFS_LOGFILE} \ + --volfile-server=${GLUSTERFS_SERVER} \ + --volfile-server-port=${GLUSTERFS_PORT} \ + --volfile-server-transport=${GLUSTERFS_TRANSPORT} \ + ${GLUSTERFS_OPTS} ${GLUSTERFS_MOUNTPOINT} + status="$?" + else + einfo "Using local volume file" + start-stop-daemon --start --pidfile ${GLUSTERFS_PIDFILE} \ + --exec /usr/sbin/${daemon} -- \ + --pid-file=${GLUSTERFS_PIDFILE} \ + --log-file=${GLUSTERFS_LOGFILE} \ + --volfile=${GLUSTERFS_VOLFILE} \ + ${GLUSTERFS_OPTS} ${GLUSTERFS_MOUNTPOINT} + status="$?" + fi + + eoutdent + eend ${status} +} + +stop() { + local status + + ebegin "Stopping GlusterFS (${SVCNAME})" + eindent + if [[ -z "${GLUSTERFS_MOUNTPOINT}" ]] + then + einfo "Stopping server process ..." + start-stop-daemon --stop --pidfile ${GLUSTERFS_PIDFILE} + status="$?" + else + einfo "Unmounting ${GLUSTERFS_MOUNTPOINT} ..." + umount "${GLUSTERFS_MOUNTPOINT}" + status="$?" + fi + eoutdent + eend ${status} +} diff --git a/sys-cluster/glusterfs/files/glusterfs.confd b/sys-cluster/glusterfs/files/glusterfs.confd new file mode 100644 index 000000000000..257d0a887cff --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs.confd @@ -0,0 +1,6 @@ +#glusterfsd_mountpoint="" +#glusterfsd_log="" +#glusterfsd_vol="" +#glusterfsd_port="" +#glusterfsd_transport="" +#glusterfsd_opts="" diff --git a/sys-cluster/glusterfs/files/glusterfs.initd b/sys-cluster/glusterfs/files/glusterfs.initd new file mode 100644 index 000000000000..7f8759af594d --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs.initd @@ -0,0 +1,120 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +if [[ "${SVCNAME}" != "glusterfs" ]] +then + GLUSTERFS_NAME="${SVCNAME#glusterfs.}" +else + GLUSTERFS_NAME="glusterfs" +fi + +GLUSTERFS_PIDFILE="/var/run/${SVCNAME}.pid" + +eval 'GLUSTERFS_LOGFILE="${'${GLUSTERFS_NAME}'_log:-/var/log/glusterfs/'${GLUSTERFS_NAME}'.log}"' +eval 'GLUSTERFS_VOLFILE="${'${GLUSTERFS_NAME}'_vol:-/etc/glusterfs/'${GLUSTERFS_NAME}'.vol}"' +eval 'GLUSTERFS_SERVER="${'${GLUSTERFS_NAME}'_server}"' +eval 'GLUSTERFS_PORT="${'${GLUSTERFS_NAME}'_port:-6996}"' +eval 'GLUSTERFS_TRANSPORT="${'${GLUSTERFS_NAME}'_transport:-socket}"' +eval 'GLUSTERFS_OPTS="${'${GLUSTERFS_NAME}'_opts}"' +eval 'GLUSTERFS_MOUNTPOINT="${'${GLUSTERFS_NAME}'_mountpoint}"' + +depend() { + need net + [[ -n "${GLUSTERFS_MOUNTPOINT}" ]] && need fuse + use dns + before netmount + after firewall ntp-client ntpd +} + +checkconfig() { + if [[ -z "${GLUSTERFS_NAME}" ]] + then + eerror "The service name is not properly formatted." + return 1 + fi + + if [[ -z "${GLUSTERFS_SERVER}" ]] + then + if [[ -z "${GLUSTERFS_VOLFILE}" ]] + then + eerror "No GlusterFS volume file source has been defined. Edit /etc/conf.d/glusterfs" + eerror "and configure a volume file source for ${SVCNAME}." + return 1 + else + if [[ ! -f "${GLUSTERFS_VOLFILE}" ]] + then + eerror "Cannot find volume file: ${GLUSTERFS_VOLFILE}" + return 1 + fi + fi + fi + + if [[ -n "${GLUSTERFS_MOUNTPOINT}" && ! -d "${GLUSTERFS_MOUNTPOINT}" ]] + then + eerror "The mountpoint ${GLUSTERFS_MOUNTPOINT} does not exist." + return 1 + fi +} + +start() { + local status + + checkconfig || return 1 + + ebegin "Starting GlusterFS (${SVCNAME})" + eindent + + if [[ -z "${GLUSTERFS_MOUNTPOINT}" ]] + then + einfo "Starting in server mode ..." + else + einfo "Starting in client mode. Mounting filesystem ..." + fi + + if [[ -n "${GLUSTERFS_SERVER}" ]] + then + einfo "Using server supplied volume file" + start-stop-daemon --start --pidfile ${GLUSTERFS_PIDFILE} \ + --exec /usr/sbin/glusterfsd -- \ + --pid-file=${GLUSTERFS_PIDFILE} \ + --log-file=${GLUSTERFS_LOGFILE} \ + --volfile-server=${GLUSTERFS_SERVER} \ + --volfile-server-port=${GLUSTERFS_PORT} \ + --volfile-server-transport=${GLUSTERFS_TRANSPORT} \ + ${GLUSTERFS_OPTS} ${GLUSTERFS_MOUNTPOINT} + status="$?" + else + einfo "Using local volume file" + start-stop-daemon --start --pidfile ${GLUSTERFS_PIDFILE} \ + --exec /usr/sbin/glusterfsd -- \ + --pid-file=${GLUSTERFS_PIDFILE} \ + --log-file=${GLUSTERFS_LOGFILE} \ + --volfile=${GLUSTERFS_VOLFILE} \ + ${GLUSTERFS_OPTS} ${GLUSTERFS_MOUNTPOINT} + status="$?" + fi + + eoutdent + eend ${status} +} + +stop() { + local status + + ebegin "Stopping GlusterFS (${SVCNAME})" + eindent + if [[ -z "${GLUSTERFS_MOUNTPOINT}" ]] + then + einfo "Stopping server process ..." + start-stop-daemon --stop --pidfile ${GLUSTERFS_PIDFILE} + status="$?" + else + einfo "Unmounting ${GLUSTERFS_MOUNTPOINT} ..." + umount "${GLUSTERFS_MOUNTPOINT}" + status="$?" + fi + eoutdent + eend ${status} +} diff --git a/sys-cluster/glusterfs/files/glusterfs.logrotate b/sys-cluster/glusterfs/files/glusterfs.logrotate new file mode 100644 index 000000000000..07ae7b9e54dc --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs.logrotate @@ -0,0 +1,34 @@ +# Rotate client logs +/var/log/glusterfs/*.log { + weekly + rotate 52 + missingok + + # compress the logs, but from the .2 onwards + compress + delaycompress + notifempty + + sharedscripts + postrotate + /usr/bin/killall -HUP glusterfs > /dev/null 2>&1 || true + /usr/bin/killall -HUP glusterd > /dev/null 2>&1 || true + endscript +} + +# Rotate server logs +/var/log/glusterfs/bricks/*.log { + weekly + rotate 52 + missingok + + # compress the logs, but from the .2 onwards + compress + delaycompress + notifempty + + sharedscripts + postrotate + /usr/bin/killall -HUP glusterfsd > /dev/null 2>&1 || true + endscript +} diff --git a/sys-cluster/glusterfs/files/glusterfs.vim b/sys-cluster/glusterfs/files/glusterfs.vim new file mode 100644 index 000000000000..bbb9cb1efa97 --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs.vim @@ -0,0 +1,8 @@ +if &compatible || v:version < 603 + finish +endif + + +" GlusterFS Volume files +au BufNewFile,BufRead *.vol + \ set filetype=glusterfs diff --git a/sys-cluster/glusterfs/glusterfs-3.1.2.ebuild b/sys-cluster/glusterfs/glusterfs-3.1.2.ebuild new file mode 100644 index 000000000000..b21ad7a52608 --- /dev/null +++ b/sys-cluster/glusterfs/glusterfs-3.1.2.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" + +inherit autotools elisp-common eutils multilib versionator + +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem" +HOMEPAGE="http://www.gluster.org/" +SRC_URI="http://ftp.gluster.com/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="amd64 ~ppc ~ppc64 x86" +IUSE="emacs extras +fuse infiniband static-libs vim-syntax" + +RDEPEND="emacs? ( virtual/emacs ) + fuse? ( >=sys-fs/fuse-2.7.0 ) + infiniband? ( sys-infiniband/libibverbs )" +DEPEND="${RDEPEND} + virtual/pkgconfig + sys-devel/bison + sys-devel/flex" + +SITEFILE="50${PN}-mode-gentoo.el" + +src_prepare() { + epatch "${FILESDIR}/${PN}-3.1.0-parallel-build.patch" \ + "${FILESDIR}/${PN}-docdir.patch" \ + "${FILESDIR}/glusterd-workdir.patch" + sed -i -e "s/ -ggdb3//g" argp-standalone/configure.ac || die + eautoreconf +} + +src_configure() { + econf \ + $(use_enable fuse fuse-client) \ + $(use_enable infiniband ibverbs) \ + $(use_enable static-libs static) \ + --disable-bdb \ + --docdir=/usr/share/doc/${PF} \ + --localstatedir=/var +} + +src_compile() { + emake || die + if use emacs ; then + elisp-compile extras/glusterfs-mode.el || die + fi +} + +src_install() { + emake DESTDIR="${D}" install || die + + if use emacs ; then + elisp-install ${PN} extras/glusterfs-mode.el* || die + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}/glusterfs.vim" || die + insinto /usr/share/vim/vimfiles/syntax; doins extras/glusterfs.vim || die + fi + + if use extras ; then + newbin extras/volgen/glusterfs-volgen glusterfs-volgen || die + newbin extras/backend-xattr-sanitize.sh glusterfs-backend-xattr-sanitize || die + newbin extras/migrate-unify-to-distribute.sh glusterfs-migrate-unify-to-distribute || die + fi + + dodoc AUTHORS ChangeLog NEWS README THANKS || die + + newinitd "${FILESDIR}/${PN}.initd" glusterfsd || die + newinitd "${FILESDIR}/glusterd.initd" glusterd || die + newconfd "${FILESDIR}/${PN}.confd" glusterfsd || die + + keepdir /var/log/${PN} || die + keepdir /var/lib/glusterd || die +} + +pkg_postinst() { + elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your" + elog "volumes dynamically. To do so, simply use the gluster CLI after running:" + elog " /etc/init.d/glusterd start" + elog + elog "For static configurations, the glusterfsd startup script can be multiplexed." + elog "The default startup script uses /etc/conf.d/glusterfsd to configure the" + elog "separate service. To create additional instances of the glusterfsd service" + elog "simply create a symlink to the glusterfsd startup script." + elog + elog "Example:" + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2" + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol" + elog "You can now treat glusterfsd2 like any other service" + elog + elog "For more information on how to mount exported GlusterFS filesystems visit:" + elog "http://www.gluster.org/docs/index.php/Mounting_a_GlusterFS_Volume" + elog + elog "If you are upgrading from glusterfs 3.0.x please read:" + elog "http://www.gluster.com/community/documentation/index.php/Gluster_3.0_to_3.1_Upgrade_Guide" + elog + ewarn "You need to use a ntp client to keep the clocks synchronized across all" + ewarn "of your servers. Setup a NTP synchronizing service before attempting to" + ewarn "run GlusterFS." + + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-cluster/glusterfs/glusterfs-3.2.7.ebuild b/sys-cluster/glusterfs/glusterfs-3.2.7.ebuild new file mode 100644 index 000000000000..ffd564e4b2b9 --- /dev/null +++ b/sys-cluster/glusterfs/glusterfs-3.2.7.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +PYTHON_DEPEND="2" +inherit autotools elisp-common eutils multilib python versionator + +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem" +HOMEPAGE="http://www.gluster.org/" +SRC_URI="http://ftp.gluster.com/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="emacs extras +fuse infiniband static-libs vim-syntax" + +RDEPEND="emacs? ( virtual/emacs ) + fuse? ( >=sys-fs/fuse-2.7.0 ) + infiniband? ( sys-infiniband/libibverbs )" +DEPEND="${RDEPEND} + virtual/pkgconfig + sys-devel/bison + sys-devel/flex" + +SITEFILE="50${PN}-mode-gentoo.el" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-3.1.0-parallel-build.patch" \ + "${FILESDIR}/${PN}-docdir.patch" \ + "${FILESDIR}/glusterd-3.2.0-workdir.patch" + sed -i -e "s/ -ggdb3//g" -e "s/ -m64//g" argp-standalone/configure.ac || die + eautoreconf +} + +src_configure() { + econf \ + $(use_enable fuse fuse-client) \ + $(use_enable infiniband ibverbs) \ + $(use_enable static-libs static) \ + --enable-georeplication \ + --disable-bdb \ + --docdir=/usr/share/doc/${PF} \ + --localstatedir=/var +} + +src_compile() { + emake + if use emacs ; then + elisp-compile extras/glusterfs-mode.el || die + fi +} + +src_install() { + emake DESTDIR="${D}" install + + if use emacs ; then + elisp-install ${PN} extras/glusterfs-mode.el* || die + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}/glusterfs.vim" + insinto /usr/share/vim/vimfiles/syntax; doins extras/glusterfs.vim + fi + + if use extras ; then + newbin extras/backend-xattr-sanitize.sh glusterfs-backend-xattr-sanitize + newbin extras/backend-cleanup.sh glusterfs-backend-cleanup + newbin extras/migrate-unify-to-distribute.sh glusterfs-migrate-unify-to-distribute + newbin extras/disk_usage_sync.sh glusterfs-disk-usage-sync + fi + + dodoc AUTHORS ChangeLog NEWS README THANKS + + newinitd "${FILESDIR}/${PN}.initd" glusterfsd + newinitd "${FILESDIR}/glusterd.initd" glusterd + newconfd "${FILESDIR}/${PN}.confd" glusterfsd + + keepdir /var/log/${PN} + keepdir /var/lib/glusterd + + python_convert_shebangs -r 2 "${ED}" +} + +pkg_postinst() { + elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your" + elog "volumes dynamically. To do so, simply use the gluster CLI after running:" + elog " /etc/init.d/glusterd start" + elog + elog "For static configurations, the glusterfsd startup script can be multiplexed." + elog "The default startup script uses /etc/conf.d/glusterfsd to configure the" + elog "separate service. To create additional instances of the glusterfsd service" + elog "simply create a symlink to the glusterfsd startup script." + elog + elog "Example:" + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2" + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol" + elog "You can now treat glusterfsd2 like any other service" + elog + ewarn "You need to use a ntp client to keep the clocks synchronized across all" + ewarn "of your servers. Setup a NTP synchronizing service before attempting to" + ewarn "run GlusterFS." + + if [[ ${REPLACING_VERSIONS} < 3.1 ]]; then + elog + elog "You are upgrading from a previous version of ${PN}, please read:" + elog "http://www.gluster.com/community/documentation/index.php/Gluster_3.0_to_3.2_Upgrade_Guide" + fi + + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-cluster/glusterfs/glusterfs-3.3.1-r2.ebuild b/sys-cluster/glusterfs/glusterfs-3.3.1-r2.ebuild new file mode 100644 index 000000000000..fd8b7dd11614 --- /dev/null +++ b/sys-cluster/glusterfs/glusterfs-3.3.1-r2.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +PYTHON_DEPEND="2" +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils elisp-common eutils multilib python versionator + +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem" +HOMEPAGE="http://www.gluster.org/" +SRC_URI="http://download.gluster.org/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="emacs extras +fuse infiniband static-libs vim-syntax" + +RDEPEND="emacs? ( virtual/emacs ) + fuse? ( >=sys-fs/fuse-2.7.0 ) + infiniband? ( sys-infiniband/libibverbs )" +DEPEND="${RDEPEND} + virtual/pkgconfig + sys-devel/bison + sys-devel/flex" + +SITEFILE="50${PN}-mode-gentoo.el" + +PATCHES=( + "${FILESDIR}/${PN}-3.3.0-parallel-build.patch" + "${FILESDIR}/${PN}-3.3.0-docdir.patch" + "${FILESDIR}/${PN}-3.3.0-silent_rules.patch" + "${FILESDIR}/${PN}-3.3.0-avoid-version.patch" +) + +DOCS=( AUTHORS ChangeLog NEWS README THANKS ) + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + sed -e "s/ -ggdb3//g" \ + -i argp-standalone/configure.ac || die + sed -e "s:\$(PYTHON):${PREFIX}/usr/bin/python2:g" \ + -i xlators/features/marker/utils/src/Makefile.am || die #446330 + sed -e 's:"/usr/local/libexec/glusterfs:GSYNCD_PREFIX":' \ + -i xlators/mgmt/glusterd/src/glusterd.c || die #464196 + autotools-utils_src_prepare + cd argp-standalone && eautoreconf +} + +src_configure() { + local myeconfargs=( + --disable-dependency-tracking + --disable-silent-rules + $(use_enable fuse fuse-client) + $(use_enable infiniband ibverbs) + $(use_enable static-libs static) + --enable-georeplication + --docdir=/usr/share/doc/${PF} + --localstatedir=/var + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + if use emacs ; then + elisp-compile extras/glusterfs-mode.el || die + fi +} + +src_install() { + autotools-utils_src_install + + if use emacs ; then + elisp-install ${PN} extras/glusterfs-mode.el* || die + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}"/${PN}.vim + insinto /usr/share/vim/vimfiles/syntax; doins extras/${PN}.vim + fi + + if use extras ; then + newbin extras/backend-xattr-sanitize.sh ${PN}-backend-xattr-sanitize + newbin extras/backend-cleanup.sh ${PN}-backend-cleanup + newbin extras/migrate-unify-to-distribute.sh ${PN}-migrate-unify-to-distribute + newbin extras/disk_usage_sync.sh ${PN}-disk-usage-sync + fi + + newinitd "${FILESDIR}/${PN}-r1.initd" glusterfsd + newinitd "${FILESDIR}/glusterd.initd" glusterd + newconfd "${FILESDIR}/${PN}.confd" glusterfsd + + keepdir /var/log/${PN} + keepdir /var/lib/glusterd + + python_convert_shebangs -r 2 "${ED}" +} + +pkg_postinst() { + elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your" + elog "volumes dynamically. To do so, simply use the gluster CLI after running:" + elog " /etc/init.d/glusterd start" + elog + elog "For static configurations, the glusterfsd startup script can be multiplexed." + elog "The default startup script uses /etc/conf.d/glusterfsd to configure the" + elog "separate service. To create additional instances of the glusterfsd service" + elog "simply create a symlink to the glusterfsd startup script." + elog + elog "Example:" + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2" + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol" + elog "You can now treat glusterfsd2 like any other service" + elog + ewarn "You need to use a ntp client to keep the clocks synchronized across all" + ewarn "of your servers. Setup a NTP synchronizing service before attempting to" + ewarn "run GlusterFS." + + elog + elog "You are upgrading from a previous version of ${PN}, please read:" + elog "http://vbellur.wordpress.com/2012/05/31/upgrading-to-glusterfs-3-3/" + + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-cluster/glusterfs/glusterfs-3.5.3.ebuild b/sys-cluster/glusterfs/glusterfs-3.5.3.ebuild new file mode 100644 index 000000000000..e818b4129403 --- /dev/null +++ b/sys-cluster/glusterfs/glusterfs-3.5.3.ebuild @@ -0,0 +1,174 @@ +# 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=1 + +inherit autotools-utils elisp-common eutils multilib python-single-r1 versionator + +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem" +HOMEPAGE="http://www.gluster.org/" +SRC_URI="http://download.gluster.org/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz" + +LICENSE="|| ( GPL-2 LGPL-3+ )" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="bd-xlator crypt-xlator debug emacs +fuse +georeplication glupy infiniband qemu-block rsyslog static-libs +syslog systemtap vim-syntax +xml" + +REQUIRED_USE="georeplication? ( ${PYTHON_REQUIRED_USE} ) + glupy? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="bd-xlator? ( sys-fs/lvm2 ) + emacs? ( virtual/emacs ) + fuse? ( >=sys-fs/fuse-2.7.0 ) + georeplication? ( ${PYTHON_DEPS} ) + infiniband? ( sys-infiniband/libibverbs:* sys-infiniband/librdmacm:* ) + qemu-block? ( dev-libs/glib:2 ) + systemtap? ( dev-util/systemtap ) + xml? ( dev-libs/libxml2 ) + sys-libs/readline:= + dev-libs/libaio + dev-libs/openssl:= + || ( sys-libs/glibc sys-libs/argp-standalone )" +DEPEND="${RDEPEND} + virtual/pkgconfig + sys-devel/bison + sys-devel/flex" + +SITEFILE="50${PN}-mode-gentoo.el" + +PATCHES=( + "${FILESDIR}/${PN}-3.4.0-silent_rules.patch" + "${FILESDIR}/${PN}-3.5.1-Add-libraries-using-LIBADD-instead-of-LDFLAGS.patch" + "${FILESDIR}/${PN}-3.5.1-build-shared-only.patch" +) + +DOCS=( AUTHORS ChangeLog NEWS README THANKS ) + +# Maintainer notes: +# * The build system will always configure & build argp-standalone but it'll never use it +# if the argp.h header is found in the system. Which should be the case with +# glibc or if argp-standalone is installed. + +pkg_setup() { + ( use georeplication || use glupy ) && python-single-r1_pkg_setup +} + +src_configure() { + local myeconfargs=( + --disable-dependency-tracking + --disable-silent-rules + --disable-fusermount + $(use_enable debug) + $(use_enable bd-xlator) + $(use_enable crypt-xlator) + $(use_enable fuse fuse-client) + $(use_enable georeplication) + $(use_enable glupy) + $(use_enable infiniband ibverbs) + $(use_enable qemu-block) + $(use_enable static-libs static) + $(use_enable syslog) + $(use_enable systemtap) + $(use_enable xml xml-output) + --docdir=/usr/share/doc/${PF} + --localstatedir=/var + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + + use emacs && elisp-compile extras/glusterfs-mode.el +} + +src_install() { + autotools-utils_src_install + + rm \ + "${D}"/etc/glusterfs/glusterfs-{georep-,}logrotate \ + "${D}"/etc/glusterfs/gluster-rsyslog-*.conf \ + "${D}"/usr/share/doc/${PF}/glusterfs{-mode.el,.vim} || die "removing false files failed" + + insinto /etc/logrotate.d + newins "${FILESDIR}"/glusterfs.logrotate glusterfs + + if use rsyslog ; then + insinto /etc/rsyslog.d + newins extras/gluster-rsyslog-7.2.conf 60-gluster.conf + fi + + if use emacs ; then + elisp-install ${PN} extras/glusterfs-mode.el* + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}"/${PN}.vim + insinto /usr/share/vim/vimfiles/syntax; doins extras/${PN}.vim + fi + + # insert some other tools which might be useful + insinto /usr/share/glusterfs/scripts + doins \ + extras/backend-{cleanup,xattr-sanitize}.sh \ + extras/clear_xattrs.sh \ + extras/migrate-unify-to-distribute.sh + + # correct permissions on installed scripts + # fperms 0755 /usr/share/glusterfs/scripts/*.sh + chmod 0755 "${ED}"/usr/share/glusterfs/scripts/*.sh || die + + if use georeplication ; then + # move the gsync-sync-gfid tool to a binary path + # and set a symlink to be compliant with all other distros + mv "${ED}"/usr/{share/glusterfs/scripts/gsync-sync-gfid,libexec/glusterfs/} || die + dosym ../../../libexec/glusterfs/gsync-sync-gfid /usr/share/glusterfs/scripts/gsync-sync-gfid + fi + + newinitd "${FILESDIR}/${PN}-r1.initd" glusterfsd + newinitd "${FILESDIR}/glusterd-r2.initd" glusterd + newconfd "${FILESDIR}/${PN}.confd" glusterfsd + + keepdir /var/log/${PN} + keepdir /var/lib/glusterd + + # QA + rm -rf "${ED}/var/run/" || die + + use georeplication && python_fix_shebang "${ED}" +} + +pkg_postinst() { + elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your" + elog "volumes dynamically. To do so, simply use the gluster CLI after running:" + elog " /etc/init.d/glusterd start" + echo + elog "For static configurations, the glusterfsd startup script can be multiplexed." + elog "The default startup script uses /etc/conf.d/glusterfsd to configure the" + elog "separate service. To create additional instances of the glusterfsd service" + elog "simply create a symlink to the glusterfsd startup script." + echo + elog "Example:" + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2" + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol" + elog "You can now treat glusterfsd2 like any other service" + echo + ewarn "You need to use a ntp client to keep the clocks synchronized across all" + ewarn "of your servers. Setup a NTP synchronizing service before attempting to" + ewarn "run GlusterFS." + + elog + elog "If you are upgrading from a previous version of ${PN}, please read:" + elog " http://www.gluster.org/community/documentation/index.php/Upgrade_to_3.5" + + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-cluster/glusterfs/metadata.xml b/sys-cluster/glusterfs/metadata.xml new file mode 100644 index 000000000000..7ca776b6ff2c --- /dev/null +++ b/sys-cluster/glusterfs/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cluster</herd> + <longdescription lang="en"> + GlusterFS is a cluster file-system capable of scaling to several peta-bytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system. GlusterFS is based on a stackable user space design without compromising performance. + </longdescription> + <use> + <flag name="bd-xlator">Enable the blockdevice translator (requires <pkg>sys-fs/lvm2</pkg>)</flag> + <flag name="crypt-xlator">Enable the encryption translator</flag> + <flag name="fuse">Add FUSE mount helper</flag> + <flag name="glupy">Enable support for translators written in Python</flag> + <flag name="georeplication">Enable support for georeplication (requires <pkg>dev-lang/python</pkg>)</flag> + <flag name="extras">Install extra helper scripts</flag> + <flag name="infiniband">Add support for Infiniband ibverbs transport. + Libraries can be found in science overlay</flag> + <flag name="rsyslog">Install configuration snippet for <pkg>app-admin/rsyslog</pkg></flag> + <flag name="qemu-block">Transparently create files as QCow2/QED images in the backend, including the possibility to snapshot.</flag> + <flag name="systemtap">Enable support for <pkg>dev-util/systemtap</pkg></flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/heartbeat/Manifest b/sys-cluster/heartbeat/Manifest new file mode 100644 index 000000000000..143d1e5ed195 --- /dev/null +++ b/sys-cluster/heartbeat/Manifest @@ -0,0 +1 @@ +DIST STABLE-3.0.5.tar.bz2 538986 SHA256 fc7b11f9e1f16bc853434208a1ce86803acf1d0fb6f43715209a84c1c34661c3 SHA512 e38083b87c56a72eb8925ac42adeabb92618608e92218a63960ec0d0bca264f92a8e9c3ebfb0589cc4538da1a82b268b5cc9ee5a51ed33057c969e694e16b27d WHIRLPOOL 699c2679c38f17aacbf230dd68203a8967748c086713ad8bf55688b1e8933caf117ec2a8d2be2ec19b0fa077eacaa1cceec0fea14d181510abb24644a486f6c4 diff --git a/sys-cluster/heartbeat/files/3.0.4-docs.patch b/sys-cluster/heartbeat/files/3.0.4-docs.patch new file mode 100644 index 000000000000..9297c31cb037 --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.4-docs.patch @@ -0,0 +1,57 @@ +--- configure.in ++++ configure.in +@@ -505,8 +505,15 @@ + AC_PATH_PROGS(TEST, test) + AC_PATH_PROGS(PKGCONFIG, pkg-config) + +-dnl xsltproc is required for building the man pages +-AC_PATH_PROGS(XSLTPROC, xsltproc) ++AC_ARG_ENABLE([doc], ++ AS_HELP_STRING([--enable-doc],[Build documentation] ++)) ++AS_IF([test "x$enable_doc" = "xyes"], [ ++ AC_PATH_PROGS(XSLTPROC, xsltproc) ++]) ++AM_CONDITIONAL([BUILD_DOC], [test "x$enable_doc" = "xyes"] ) ++AC_SUBST(XSLTPROC) ++ + + dnl ************************************************************************ + dnl Check whether non-root user can chown. +--- doc/Makefile.am ++++ doc/Makefile.am +@@ -33,11 +33,12 @@ + + doc_DATA = $(OTHER_DOCS) + ++if BUILD_DOC + man_MANS = heartbeat.8 apphbd.8 cl_status.1 \ + hb_standby.1 hb_takeover.1 hb_addnode.1 hb_delnode.1 \ + ha.cf.5 authkeys.5 + +-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,6 +48,12 @@ + XSLTPROC_HTML_OPTIONS ?= $(XSLTPROC_OPTIONS) + XSLTPROC_FO_OPTIONS ?= $(XSLTPROC_OPTIONS) + ++%.5 %.8 %.1: %.xml ++ $(XSLTPROC) \ ++ $(XSLTPROC_MANPAGES_OPTIONS) \ ++ $(MANPAGES_STYLESHEET) $< ++endif ++ + EXTRA_DIST = $(txtfiles) $(htmlfiles) $(man_MANS) $(OTHER_DOCS) + + ChangeLog: $(SPECSRC) +@@ -56,7 +63,3 @@ + .html.txt: + if [ "X$(HTML2TXT)" = "X" ]; then echo "Lynx or w3m or user-defined HTML2TXT required to convert $< to $@" >$@ ; else $(HTML2TXT) -dump $< >$@ ; fi + +-%.5 %.8 %.1: %.xml +- $(XSLTPROC) \ +- $(XSLTPROC_MANPAGES_OPTIONS) \ +- $(MANPAGES_STYLESHEET) $< diff --git a/sys-cluster/heartbeat/files/3.0.4-fix_configure.patch b/sys-cluster/heartbeat/files/3.0.4-fix_configure.patch new file mode 100644 index 000000000000..c747592b7baa --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.4-fix_configure.patch @@ -0,0 +1,110 @@ +--- work/Heartbeat-3-0-STABLE-3.0.4/configure.in 2010-12-09 21:09:47.000000000 +0100 ++++ work2/Heartbeat-3-0-STABLE-3.0.4/configure.in 2010-12-28 17:37:45.080773140 +0100 +@@ -243,9 +243,9 @@ + mandir=`var "$mandir" "$exec_prefix/man"` + dnl docdir is available in autoconf 2.60+, for older versions preseed + dnl with the same value that 2.60+ uses +-docdir=`var "$docdir" "${datadir}/doc/${PACKAGE_NAME}"` +-libdir=`var "$libdir" "$exec_prefix/lib"` +-libexecdir=`var "$libexecdir" "$exec_prefix/libexec"` ++dnl docdir=`var "$docdir" "${datadir}/doc/${PACKAGE_NAME}"` ++dnl libdir=`var "$libdir" "$exec_prefix/lib"` ++dnl libexecdir=`var "$libexecdir" "$exec_prefix/libexec"` + noarchlibdir=`var "$noarchlibdir" "$prefix/lib"` + + +@@ -284,59 +284,11 @@ + LIBC=`${LDD} ${tmpOutfile} | grep libc | sed -e 's%.*=> *%%' -e 's% .*$%%'` + LibCdir=`dirname $LIBC` + dirlist=`echo $LibCdir | tr '/' ' '` +- LibDirSuffix=unknown +- for dir in $dirlist +- do +- case $dir in +- *lib*) LibDirSuffix=$dir; break;; +- *);; +- esac +- done +- case $LibDirSuffix in +- unknown) LibDirSuffix=`basename $LibCdir`;; +- esac + OutFileType=`file $tmpOutfile` + rm -f $tmpCfile $tmpOutfile + else + AC_MSG_ERROR([Cannot Compile trivial C program]) + fi +-# +-# The code above doesn't work right everywhere +-# (like Fedora and OpenBSD) +-# +-case ${LibDirSuffix} in +- *lib*) : Cool;; +- *) : Sigh... +- case $OutFileType in +- *64-bit*) +- case $host_os in +- openbsd*) LibDirSuffix=lib;; +- *) LibDirSuffix=lib64;; +- esac;; +- *32-bit*) LibDirSuffix=lib;; +- *) LibDirSuffix=lib;; +- esac;; +-esac +-# +-# This may not yet be quite right for PPC where the default +-# is to produce 32-bit binaries, even though the OS is 64-bit +-# or for that matter for system Z, But, it's a lot better than +-# it used to be. +-# +-AC_MSG_RESULT($LibDirSuffix) +- +-case $libdir in +- */*${LibDirSuffix}) : Cool ;; +- *) : Uh Oh... +- libdir=`dirname $libdir`/$LibDirSuffix +- AC_MSG_WARN([Overriding libdir to: $libdir]);; +-esac +-case $libexecdir in +- */$LibDirSuffix) : Cool ;; +- *) : Uh Oh... +- libexecdir=`dirname $libexecdir`/$LibDirSuffix +- AC_MSG_WARN([Overriding libexecdir to: $libexecdir]);; +-esac + + for j in exec_prefix bindir sbindir datadir sysconfdir localstatedir \ + includedir oldincludedir mandir docdir stdocdir libdir noarchlibdir +@@ -386,7 +338,6 @@ + fi + + AC_CHECK_HEADERS(heartbeat/glue_config.h) +-GLUE_HEADER=none + if test "$ac_cv_header_heartbeat_glue_config_h" = "yes"; then + GLUE_HEADER=heartbeat/glue_config.h + else +@@ -453,15 +404,6 @@ + + dnl We use this in the RPM specfile... + AC_SUBST(ac_configure_args) +-cleaned_configure_args="" +-for j in ${ac_configure_args} +-do +- case $j in +- *--libdir=*|*--libexecdir=*) ;; +- *) cleaned_configure_args="$cleaned_configure_args $j";; +- esac +-done +-AC_SUBST(cleaned_configure_args) + + dnl ************************************************************************* + PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin" +--- work/Heartbeat-3-0-STABLE-3.0.5/configure.in 2011-12-28 11:51:05.601673071 +0100 ++++ work2/Heartbeat-3-0-STABLE-3.0.5/configure.in 2011-12-28 11:54:34.223094385 +0100 +@@ -2002,7 +2002,7 @@ + fi + + if test "$GCC" = yes; then +- CFLAGS="$CFLAGS -ggdb3" ++ CFLAGS="$CFLAGS" + if + cc_supports_flag -funsigned-char + then diff --git a/sys-cluster/heartbeat/files/3.0.4-python_tests.patch b/sys-cluster/heartbeat/files/3.0.4-python_tests.patch new file mode 100644 index 000000000000..a91c7ec3fe2a --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.4-python_tests.patch @@ -0,0 +1,29 @@ +--- cts/Makefile.am ++++ cts/Makefile.am +@@ -21,7 +21,7 @@ + + ctsdir = @HA_NOARCHDATAHBDIR@/cts + +-cts_PYTHON = \ ++cts_SCRIPTS = \ + CM_fs.py \ + CM_hb.py \ + CM_LinuxHAv2.py \ +@@ -32,14 +32,12 @@ + extracttests.py \ + getpeinputs.sh \ + OCFIPraTest.py \ +- CIB.py ++ CIB.py \ ++ CTSproxy.py \ ++ LSBDummy + + cts_DATA = README + +-cts_SCRIPTS = \ +- CTSproxy.py \ +- getpeinputs.sh \ +- LSBDummy + + all-local: $(cts_PYTHON) + diff --git a/sys-cluster/heartbeat/files/3.0.5-fix_ucast.patch b/sys-cluster/heartbeat/files/3.0.5-fix_ucast.patch new file mode 100644 index 000000000000..3bec9c89dd86 --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.5-fix_ucast.patch @@ -0,0 +1,145 @@ + +# HG changeset patch +# User Lars Ellenberg <lars@linbit.com> +# Date 1392200751 -3600 +# Node ID 37f57a36a2dd1abf8461a9b758e62f6fe7a22f77 +# Parent 6d4324633600dc7ae7aa08c56d86c2fcc767977f +Medium: fix usage of SO_REUSEPORT in ucast sockets + +Linux learned SO_REUSEPORT only with kernel 3.9, +but some linux headers already define SO_REUSEPORT. +Which, on older kernels, will result in ENOPROTOOPT, +"Protocol not available". + +Failure to set SO_REUSEPORT is NOT critical in general. +It *may* be a problem on certain BSDs, +with more than two nodes, all using ucast. + +Refusing to start because of failure to set SO_REUSEPORT is +not helpful for the vast majority of the clusters out there. + +While at it, downgrade "critical" log messages to warnings +in non-fatal situations. + +--- a/lib/plugins/HBcomm/ucast.c ++++ b/lib/plugins/HBcomm/ucast.c +@@ -461,12 +461,6 @@ static int HB_make_send_sock(struct hb_m + int sockfd; + struct ip_private *ei; + int tos; +-#if defined(SO_BINDTODEVICE) +- struct ifreq i; +-#endif +-#if defined(SO_REUSEPORT) +- int i = 1; +-#endif + + UCASTASSERT(mp); + ei = (struct ip_private*)mp->pd; +@@ -494,6 +488,7 @@ static int HB_make_send_sock(struct hb_m + + #if defined(SO_BINDTODEVICE) + { ++ struct ifreq i; + /* + * We want to send out this particular interface + * +@@ -515,12 +510,13 @@ static int HB_make_send_sock(struct hb_m + #endif + #if defined(SO_REUSEPORT) + { ++ int one = 1; + /* this is for OpenBSD to allow multiple * + * ucast connections, e.g. a more than * + * two node cluster */ + + if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, +- &i, sizeof(i)) == -1) { ++ &one, sizeof(one)) == -1) { + PILCallLog(LOG, PIL_CRIT, + "ucast: error setting option SO_REUSEPORT(w): %s", strerror(errno)); + close(sockfd); +@@ -548,7 +544,7 @@ static int HB_make_receive_sock(struct h + int sockfd; + int bindtries; + int boundyet = 0; +- int j; ++ int one = 1; + + UCASTASSERT(mp); + ei = (struct ip_private*)mp->pd; +@@ -563,22 +559,19 @@ static int HB_make_receive_sock(struct h + strerror(errno)); + return -1; + } +- /* +- * Set SO_REUSEADDR on the server socket s. Variable j is used +- * as a scratch varable. +- * +- * 16th February 2000 +- * Added by Horms <horms@vergenet.net> +- * with thanks to Clinton Work <work@scripty.com> +- */ +- j = 1; ++ /* ++ * Set SO_REUSEADDR on the server socket s. ++ * Below, also try to set SO_REUSEPORT, ++ * if known and supported. ++ */ + if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, +- (void *)&j, sizeof j) < 0) { ++ &one, sizeof(one)) < 0) { + /* Ignore it. It will almost always be OK anyway. */ +- PILCallLog(LOG, PIL_CRIT, ++ PILCallLog(LOG, PIL_WARN, + "ucast: error setting socket option SO_REUSEADDR: %s", + strerror(errno)); +- } ++ } else ++ PILCallLog(LOG, PIL_INFO, "ucast: set SO_REUSEADDR"); + #if defined(SO_BINDTODEVICE) + { + /* +@@ -600,20 +593,32 @@ static int HB_make_receive_sock(struct h + } + #endif + #if defined(SO_REUSEPORT) +- { ++ /* ++ * Needed for OpenBSD for more than two nodes in a ucast cluster ++ */ ++ if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, ++ &one, sizeof(one)) == -1) { + /* +- * Needed for OpenBSD for more than two nodes in a ucast cluster ++ * Linux learned SO_REUSEPORT only with kernel 3.9, ++ * but some linux headers already define SO_REUSEPORT. ++ * Which will result in ENOPROTOOPT, "Protocol not available" ++ * on older kernels. ++ * Failure to set SO_REUSEPORT is NOT critical in general. ++ * It *may* be a problem on certain BSDs with more than ++ * two nodes all using ucast. ++ * Refusing to start because of failure to set SO_REUSEPORT is ++ * not helpful for the vast majority of the clusters out there. + */ +- int i = 1; +- if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, +- &i, sizeof(i)) == -1) { ++ if (errno == ENOPROTOOPT) { ++ PILCallLog(LOG, PIL_WARN, ++ "ucast: error setting option SO_REUSEPORT: %s", strerror(errno)); ++ } else { + PILCallLog(LOG, PIL_CRIT, +- "ucast: error setting option SO_REUSEPORT(r) %s", strerror(errno)); +- close(sockfd); ++ "ucast: error setting option SO_REUSEPORT: %s", strerror(errno)); + return -1; + } +- PILCallLog(LOG, PIL_INFO, "ucast: set SO_REUSEPORT(w)"); +- } ++ } else ++ PILCallLog(LOG, PIL_INFO, "ucast: set SO_REUSEPORT"); + #endif + + /* Try binding a few times before giving up */ + diff --git a/sys-cluster/heartbeat/files/heartbeat-init b/sys-cluster/heartbeat/files/heartbeat-init new file mode 100644 index 000000000000..56b3765a47eb --- /dev/null +++ b/sys-cluster/heartbeat/files/heartbeat-init @@ -0,0 +1,93 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +HA_DIR=/etc/ha.d +. $HA_DIR/shellfuncs + +depend() { + use logger + need net +} + +opts="start stop status reload restart" + +CheckBool() { + case `echo "$1" | tr A-Z a-z` in + y|yes|enable|on|true|1) true;; + *) false;; + esac +} + +# Run pre-startup script if it exists +RunStartStop() { + [ -f $HA_DIR/resource.d/startstop ] && $HA_DIR/resource.d/startstop "$@" +} + +start() { + checkpath -q -d -m 0755 -o root:root /var/run/heartbeat + + ebegin "Starting heartbeat" + + . $HA_DIR/shellfuncs + + # start the log subsystem + CheckBool "`ha_parameter use_logd`" && \ + ( /usr/lib/heartbeat/ha_logd -s &>/dev/null || \ + /usr/lib/heartbeat/ha_logd -d -c /etc/ha.d/ha_logd.cf) + + RunStartStop pre-start + + CheckBool "`ha_parameter crm`" || \ + /usr/lib/heartbeat/ResourceManager verifyallidle + + /usr/lib/heartbeat/heartbeat &>/dev/null + ret=$? + + RunStartStop post-start + + eend ${ret} +} + +stop() { + ebegin "Stopping heartbeat" + + RunStartStop pre-stop + + /usr/lib/heartbeat/heartbeat -k &>/dev/null + ret=$? + + RunStartStop post-stop ${ret} + + # stop log subsystem + CheckBool "`ha_parameter use_logd`" && \ + ( /usr/lib/heartbeat/ha_logd -s &>/dev/null && \ + /usr/lib/heartbeat/ha_logd -k &>/dev/null ) + + eend ${ret} +} + +status() { + /usr/lib/heartbeat/heartbeat -s +} + +reload() { + ebegin "Reloading heartbeat" + /usr/lib/heartbeat/heartbeat -r &>/dev/null + eend $? +} + +restart() { + . $HA_DIR/shellfuncs + + sleeptime=$(( `ha_parameter deadtime` + 10 )) + + svc_stop + + ebegin " waiting ${sleeptime}s to allow resource takeover to complete" + sleep ${sleeptime} + eend 0 + + svc_start +} diff --git a/sys-cluster/heartbeat/heartbeat-3.0.5-r2.ebuild b/sys-cluster/heartbeat/heartbeat-3.0.5-r2.ebuild new file mode 100644 index 000000000000..87b8f7d84680 --- /dev/null +++ b/sys-cluster/heartbeat/heartbeat-3.0.5-r2.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +PYTHON_DEPEND="2" +inherit python autotools multilib eutils base + +DESCRIPTION="Heartbeat high availability cluster manager" +HOMEPAGE="http://www.linux-ha.org/wiki/Heartbeat" +SRC_URI="http://hg.linux-ha.org/${PN}-STABLE_3_0/archive/STABLE-${PV}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa x86" +IUSE="doc snmp static-libs" + +RDEPEND="sys-cluster/cluster-glue + dev-libs/glib:2 + virtual/ssh + net-libs/gnutls + snmp? ( net-analyzer/net-snmp ) +" +DEPEND="${RDEPEND} + virtual/pkgconfig + dev-lang/swig + doc? ( dev-libs/libxslt app-text/docbook-xsl-stylesheets )" + +PDEPEND="sys-cluster/resource-agents" + +S=${WORKDIR}/Heartbeat-3-0-STABLE-${PV} + +PATCHES=( + "${FILESDIR}/3.0.4-fix_configure.patch" + "${FILESDIR}/3.0.4-docs.patch" + "${FILESDIR}/3.0.4-python_tests.patch" + "${FILESDIR}/3.0.5-fix_ucast.patch" +) + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + + ewarn "If you're upgrading from heartbeat-2.x please follow:" + ewarn "http://www.gentoo.org/proj/en/cluster/ha-cluster/heartbeat-upgrade.xml" +} + +src_prepare() { + base_src_prepare + eautoreconf + + cp "${FILESDIR}"/heartbeat-init "${T}" || die + sed -i \ + -e "/ResourceManager/ s/lib/share/" \ + -e "s:lib:$(get_libdir):g" \ + "${T}"/heartbeat-init || die +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + --disable-fatal-warnings \ + $(use_enable static-libs static) \ + $(use_enable doc) \ + --disable-tipc \ + --enable-dopd \ + --libdir=/usr/$(get_libdir) \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${PF} \ + $(use_enable snmp) +} + +src_install() { + base_src_install + + newinitd "${T}/heartbeat-init" heartbeat || die + + # fix collisions + rm -rf "${D}"/usr/include/heartbeat/{compress,ha_msg}.h + + use static-libs || find "${D}"/usr/$(get_libdir) -name "*.la" -delete + + if use doc ; then + dodoc README doc/*.txt doc/AUTHORS || die + fi +} diff --git a/sys-cluster/heartbeat/metadata.xml b/sys-cluster/heartbeat/metadata.xml new file mode 100644 index 000000000000..25095c392e31 --- /dev/null +++ b/sys-cluster/heartbeat/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>cluster</herd> + + <longdescription> + Heartbeat is a cluster manager to handle failover of 2 nodes. + </longdescription> +</pkgmetadata> diff --git a/sys-cluster/hpl/Manifest b/sys-cluster/hpl/Manifest new file mode 100644 index 000000000000..c6413e6ac5bf --- /dev/null +++ b/sys-cluster/hpl/Manifest @@ -0,0 +1 @@ +DIST hpl-2.0.tar.gz 591087 SHA256 d8d118c310d34a5a2acf5a689270a9f7bea60245552d24af8641599651909bec SHA512 3aa76144526b01ec40d940cae50d47e480e2760a36d1e95bc6e431b216407db190946fc3d99a6a7caf7b61bcc76d805d28da3ef0b141ff467854e1cdf10bb274 WHIRLPOOL 79da0950089d8e7d6128a2af7a44de704c2666aeb74de08e9e0a06fc23f8c4d17da2ab5107b5f6a82ca073800ec2af4f003c7792ae84e1ec032d9572e78bc0b2 diff --git a/sys-cluster/hpl/hpl-2.0-r3.ebuild b/sys-cluster/hpl/hpl-2.0-r3.ebuild new file mode 100644 index 000000000000..0f650e074faa --- /dev/null +++ b/sys-cluster/hpl/hpl-2.0-r3.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils multilib + +DESCRIPTION="A Portable Implementation of the High-Performance Linpack Benchmark for Distributed-Memory Computers" +HOMEPAGE="http://www.netlib.org/benchmark/hpl/" +SRC_URI="http://www.netlib.org/benchmark/hpl/hpl-${PV}.tar.gz" + +SLOT="0" +LICENSE="HPL" +KEYWORDS="~x86 ~amd64" +IUSE="doc" + +RDEPEND=" + virtual/blas + virtual/lapack + virtual/mpi" +DEPEND="${DEPEND} + virtual/pkgconfig" + +src_prepare() { + local a="" + local locallib="${EPREFIX}/usr/$(get_libdir)/lib" + local localblas="$(for i in $($(tc-getPKG_CONFIG) --libs-only-l blas lapack);do a="${a} ${i/-l/${locallib}}.so "; done; echo ${a})" + + cp setup/Make.Linux_PII_FBLAS Make.gentoo_hpl_fblas_x86 || die + sed -i \ + -e "/^TOPdir/s,= .*,= ${S}," \ + -e '/^HPL_OPTS\>/s,=,= -DHPL_DETAILED_TIMING -DHPL_COPY_L,' \ + -e '/^ARCH\>/s,= .*,= gentoo_hpl_fblas_x86,' \ + -e '/^MPdir\>/s,= .*,=,' \ + -e '/^MPlib\>/s,= .*,=,' \ + -e "/^LAlib\>/s,= .*,= ${localblas}," \ + -e '/^LINKER\>/s,= .*,= mpicc,' \ + -e '/^CC\>/s,= .*,= mpicc,' \ + -e '/^CCFLAGS\>/s|= .*|= $(HPL_DEFS) ${CFLAGS}|' \ + -e "/^LINKFLAGS\>/s|= .*|= ${LDFLAGS}|" \ + Make.gentoo_hpl_fblas_x86 || die +} + +src_compile() { + # parallel make failure bug #321539 + HOME=${WORKDIR} emake -j1 arch=gentoo_hpl_fblas_x86 +} + +src_install() { + dobin bin/gentoo_hpl_fblas_x86/xhpl + dolib lib/gentoo_hpl_fblas_x86/libhpl.a + dodoc INSTALL BUGS COPYRIGHT HISTORY README TUNING \ + bin/gentoo_hpl_fblas_x86/HPL.dat + doman man/man3/*.3 + if use doc; then + dohtml -r www/* + fi +} + +pkg_postinst() { + einfo "Remember to copy /usr/share/hpl/HPL.dat to your working directory" + einfo "before running xhpl. Typically one may run hpl by executing:" + einfo "\"mpiexec -np 4 /usr/bin/xhpl\"" + einfo "where -np specifies the number of processes." +} diff --git a/sys-cluster/hpl/metadata.xml b/sys-cluster/hpl/metadata.xml new file mode 100644 index 000000000000..081af556e9a2 --- /dev/null +++ b/sys-cluster/hpl/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/hpx/Manifest b/sys-cluster/hpx/Manifest new file mode 100644 index 000000000000..9948751f96a1 --- /dev/null +++ b/sys-cluster/hpx/Manifest @@ -0,0 +1,3 @@ +DIST hpx-0.9.9.tar.gz 3461235 SHA256 cb17ac303f49795300c6b803725036aa09b434a7a23a610744457d3481be3738 SHA512 95332c924548f7d07e24c56d3d72e8aa5977a1347666fb2a0f3782fec040e83e5760750a1696cf8152d7b3f8b90ce719fe24018086a5165429b3f9851c2f7e1f WHIRLPOOL 370646b98c89133a8fd23cb17ecaefc477e09b07508884f4343526050a12fae117f1fd0e24881b9896beca97ca08d4bad8526b39cfec1cad0ce48d8826ea3c43 +DIST hpx_0.9.10.tar.gz 3016064 SHA256 af84455003bbf49fd81477138e6c7e699b7c24a4933de04d709c1437a9ad6aad SHA512 4c5ce7014d781c47415818898b99e5379e1547dd5f54fdefc9202de149ca4a0e3bf13c863cdea9ef70f7e3eb2c808cfda35d723a7f681745b8514a1887cbbb75 WHIRLPOOL 2fbc2c32532eb8141e6eb86a8e99ed4a7d4a6bb87bff9b383c4e4b5b0628fb5d6975672eaf5423f87b13f2f1d07e039362450b0276fa120f5a5abc8d7077408c +DIST hpx_0.9.8.7z 2089649 SHA256 9e04685b07e4155e6d3e00c944e5fe91c0c815a2b3bc7bc345eb59d8708bac91 SHA512 1789582ee776173d4aa67b512d2df225c734b98ffe59a8f1eee38b5112ac7c02e0c7c478f72062e5b6a5d5053ce1848729c374093378f63200acf51a208fb3c7 WHIRLPOOL b4b5a8a83aa4d07466ee0570b9fdadd906281e626eed2ce82e3a8e03681de1591a46af2254cbd387eb2d0bfac22c6796537fbbb37764be7dd424b97dd0d433c7 diff --git a/sys-cluster/hpx/files/hpx-0.9.8-cmake_dir.patch b/sys-cluster/hpx/files/hpx-0.9.8-cmake_dir.patch new file mode 100644 index 000000000000..b5c66c284752 --- /dev/null +++ b/sys-cluster/hpx/files/hpx-0.9.8-cmake_dir.patch @@ -0,0 +1,27 @@ +From e565c2cce934f2d6fa6e80061c416a2e7df0f311 Mon Sep 17 00:00:00 2001 +From: Christoph Junghans <junghans@lanl.gov> +Date: Tue, 20 May 2014 11:18:21 -0600 +Subject: [PATCH] make cmake_dir configure-able + +--- + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8ad79cb..e6f392a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1981,7 +1981,9 @@ endforeach() + # Make list unique + list(REMOVE_DUPLICATES external_definitions) + +-set(cmake_dir cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) ++if (NOT DEFINED cmake_dir) ++ set(cmake_dir cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) ++endif(NOT DEFINED cmake_dir) + + if(MSVC) + set(output_dir "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}") +-- +1.8.5.5 + diff --git a/sys-cluster/hpx/files/hpx-0.9.8-install-path.patch b/sys-cluster/hpx/files/hpx-0.9.8-install-path.patch new file mode 100644 index 000000000000..f5c867b9b4a2 --- /dev/null +++ b/sys-cluster/hpx/files/hpx-0.9.8-install-path.patch @@ -0,0 +1,69 @@ +From 5c04f9c2d47a41f6113f45eeb4dd9f7968f2cd52 Mon Sep 17 00:00:00 2001 +From: Christoph Junghans <junghans@lanl.gov> +Date: Tue, 20 May 2014 09:27:47 -0600 +Subject: [PATCH] fix make install non-empty DESTDIR + +Symlinks were created even when make install was called with a +non-empty DESTDIR variable. Fixed by creating the symlinks in build +directory first and then install them using common install. +DESTDIR installation is needed for binary packages. +--- + CMakeLists.txt | 31 +++++++++++++++++++------------ + 1 file changed, 19 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 00a71c7..8d5df19 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1762,15 +1762,22 @@ if(NOT HPX_NO_INSTALL) + + if(UNIX) + file(GLOB scripts "${CMAKE_SOURCE_DIR}/python/scripts/*.py") ++ execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory ++ "${CMAKE_BINARY_DIR}/python/scripts" ) + foreach(script ${scripts}) + get_filename_component(script_name ${script} NAME) + get_filename_component(script_name_we ${script} NAME_WE) +- install(CODE +- "set(bindir \"${CMAKE_INSTALL_PREFIX}/bin/\") +- execute_process( +- COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink +- \"${script_name}\" \"${script_name_we}\" +- WORKING_DIRECTORY \"\${bindir}\")") ++ ++ #make copy, so that we have intact symlink in CMAKE_BINARY_DIR ++ execute_process( ++ COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${script}" "${script_name}" ++ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/python/scripts") ++ ++ execute_process( ++ COMMAND "${CMAKE_COMMAND}" -E create_symlink "${script_name}" "${script_name_we}" ++ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/python/scripts") ++ ++ install(FILES "${CMAKE_BINARY_DIR}/python/scripts/${script_name_we}" DESTINATION "bin") + endforeach() + endif() + +@@ -1781,13 +1788,13 @@ if(NOT HPX_NO_INSTALL) + FILES_MATCHING PATTERN "*.py" + PATTERN ".git" EXCLUDE) + ++ execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_BINARY_DIR}/python" ) ++ #make symlink, so that we have intact hpx symlink in CMAKE_BINARY_DIR ++ execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_SOURCE_DIR}/python/hpx" ++ "hpx-${HPX_VERSION}" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/python") + # create a symlink in share pointing to the latest HPX installation +- install(CODE +- "set(sharedir \"${CMAKE_INSTALL_PREFIX}/share/\") +- execute_process( +- COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink +- \"hpx-${HPX_VERSION}\" \"hpx\" +- WORKING_DIRECTORY \"\${sharedir}\")") ++ execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "hpx-${HPX_VERSION}" "hpx" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/python") ++ install(DIRECTORY "${CMAKE_BINARY_DIR}/python/hpx" DESTINATION "share") + + install( # Install external dependencies + DIRECTORY external/cache/boost +-- +1.8.5.5 + diff --git a/sys-cluster/hpx/files/hpx-0.9.8-multilib.patch b/sys-cluster/hpx/files/hpx-0.9.8-multilib.patch new file mode 100644 index 000000000000..470e76e3b800 --- /dev/null +++ b/sys-cluster/hpx/files/hpx-0.9.8-multilib.patch @@ -0,0 +1,163 @@ +From 383acb45e75406fb94bb4fa86c162a78c05ab840 Mon Sep 17 00:00:00 2001 +From: Christoph Junghans <junghans@lanl.gov> +Date: Tue, 20 May 2014 11:03:16 -0600 +Subject: [PATCH] added LIB cmake option to configure lib directory + +for multiarch distributions the lib directory needs to changed +from 'lib' to 'lib64'/'lib32'. Add an cmake option to do this. +--- + CMakeLists.txt | 11 +++++++---- + cmake/HPX_AddComponent.cmake | 2 +- + cmake/HPX_AddLibrary.cmake | 2 +- + plugins/binary_filter/bzip2/CMakeLists.txt | 2 +- + plugins/binary_filter/snappy/CMakeLists.txt | 2 +- + plugins/binary_filter/zlib/CMakeLists.txt | 2 +- + plugins/parcel/coalescing/CMakeLists.txt | 2 +- + src/CMakeLists.txt | 6 +++--- + 8 files changed, 16 insertions(+), 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d5df19..8ad79cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -192,6 +192,9 @@ else() + "64" ADVANCED) + endif() + ++if (NOT DEFINED LIB) ++ set(LIB "lib") ++endif(NOT DEFINED LIB) + ############################################################################### + if(UNIX) + hpx_link_directories("${CMAKE_BINARY_DIR}/lib/hpx") +@@ -2027,14 +2030,14 @@ + if(NOT HPX_NO_INSTALL) + if(NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")) + install(FILES ${output_dir}/lib/pkgconfig/hpx_application.pc +- DESTINATION lib/pkgconfig) ++ DESTINATION ${LIB}/pkgconfig) + install(FILES ${output_dir}/lib/pkgconfig/hpx_component.pc +- DESTINATION lib/pkgconfig) ++ DESTINATION ${LIB}/pkgconfig) + else() + install(FILES ${output_dir}/lib/pkgconfig/hpx_application_debug.pc +- DESTINATION lib/pkgconfig) ++ DESTINATION ${LIB}/pkgconfig) + install(FILES ${output_dir}/lib/pkgconfig/hpx_component_debug.pc +- DESTINATION lib/pkgconfig) ++ DESTINATION ${LIB}/pkgconfig) + endif() + endif() + +diff --git a/cmake/HPX_AddComponent.cmake b/cmake/HPX_AddComponent.cmake +index afbee24..babca54 100644 +--- a/cmake/HPX_AddComponent.cmake ++++ b/cmake/HPX_AddComponent.cmake +@@ -258,7 +258,7 @@ macro(add_hpx_component name) + if(${name}_INSTALL_SUFFIX) + hpx_library_install("${name}_component" "${${name}_INSTALL_SUFFIX}") + else() +- hpx_library_install(${name}_component lib/hpx) ++ hpx_library_install(${name}_component ${LIB}/hpx) + endif() + + foreach(target ${${name}_INI}) +diff --git a/cmake/HPX_AddLibrary.cmake b/cmake/HPX_AddLibrary.cmake +index 7f39700..8524a45 100644 +--- a/cmake/HPX_AddLibrary.cmake ++++ b/cmake/HPX_AddLibrary.cmake +@@ -248,7 +248,7 @@ macro(add_hpx_library name) + if(${name}_INSTALL_SUFFIX) + hpx_library_install("${name}_lib" "${${name}_INSTALL_SUFFIX}") + else() +- hpx_library_install(${name}_lib lib/hpx) ++ hpx_library_install(${name}_lib ${LIB}/hpx) + endif() + endif() + endmacro() +diff --git a/plugins/binary_filter/bzip2/CMakeLists.txt b/plugins/binary_filter/bzip2/CMakeLists.txt +index 2580164..b2fbf40 100644 +--- a/plugins/binary_filter/bzip2/CMakeLists.txt ++++ b/plugins/binary_filter/bzip2/CMakeLists.txt +@@ -38,7 +38,7 @@ macro(add_bzip2_module) + add_hpx_pseudo_dependencies(plugins.compression.bzip2 compress_bzip2_lib) + + if(NOT HPX_NO_INSTALL) +- hpx_library_install(compress_bzip2_lib lib/hpx) ++ hpx_library_install(compress_bzip2_lib ${LIB}/hpx) + endif() + endif() + endmacro() +diff --git a/plugins/binary_filter/snappy/CMakeLists.txt b/plugins/binary_filter/snappy/CMakeLists.txt +index 6a7bbac..47e5966 100644 +--- a/plugins/binary_filter/snappy/CMakeLists.txt ++++ b/plugins/binary_filter/snappy/CMakeLists.txt +@@ -30,7 +30,7 @@ macro(add_snappy_module) + add_hpx_pseudo_dependencies(plugins.compression.snappy compress_snappy_lib) + + if(NOT HPX_NO_INSTALL) +- hpx_library_install(compress_snappy_lib lib/hpx) ++ hpx_library_install(compress_snappy_lib ${LIB}/hpx) + endif() + endif() + endmacro() +diff --git a/plugins/binary_filter/zlib/CMakeLists.txt b/plugins/binary_filter/zlib/CMakeLists.txt +index 4a188ca..e4485f7 100644 +--- a/plugins/binary_filter/zlib/CMakeLists.txt ++++ b/plugins/binary_filter/zlib/CMakeLists.txt +@@ -38,7 +38,7 @@ macro(add_zlib_module) + add_hpx_pseudo_dependencies(plugins.compression.zlib compress_zlib_lib) + + if(NOT HPX_NO_INSTALL) +- hpx_library_install(compress_zlib_lib lib/hpx) ++ hpx_library_install(compress_zlib_lib ${LIB}/hpx) + endif() + endif() + endmacro() +diff --git a/plugins/parcel/coalescing/CMakeLists.txt b/plugins/parcel/coalescing/CMakeLists.txt +index 093e427..889c10c 100644 +--- a/plugins/parcel/coalescing/CMakeLists.txt ++++ b/plugins/parcel/coalescing/CMakeLists.txt +@@ -22,7 +22,7 @@ macro(add_coalescing_module) + add_hpx_pseudo_dependencies(plugins.parcel.coalescing parcel_coalescing_lib) + + if(NOT HPX_NO_INSTALL) +- hpx_library_install(parcel_coalescing_lib lib/hpx) ++ hpx_library_install(parcel_coalescing_lib ${LIB}/hpx) + endif() + endmacro() + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 4f4c79c..6190839 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -312,7 +312,7 @@ set_property(TARGET hpx_serialization APPEND + "HPX_COROUTINE_EXPORTS") + + if(NOT HPX_NO_INSTALL) +- hpx_library_install(hpx_serialization lib/hpx) ++ hpx_library_install(hpx_serialization ${LIB}/hpx) + endif() + + ################################################################################ +@@ -403,7 +403,7 @@ set_property(TARGET hpx APPEND + "HPX_COROUTINE_EXPORTS") # Do we still need this? + + if(NOT HPX_NO_INSTALL) +- hpx_library_install(hpx lib/hpx) ++ hpx_library_install(hpx ${LIB}/hpx) + endif() + + ################################################################################ +@@ -436,7 +436,7 @@ endif() + set_property(TARGET hpx_init PROPERTY FOLDER "Core") + + if(NOT HPX_NO_INSTALL) +- hpx_archive_install(hpx_init lib/hpx) ++ hpx_archive_install(hpx_init ${LIB}/hpx) + endif() + + set(HPX_CONFIG_DEFINITIONS ${HPX_CONFIG_DEFINITIONS} PARENT_SCOPE) +-- +1.8.5.5 + diff --git a/sys-cluster/hpx/hpx-0.9.10.ebuild b/sys-cluster/hpx/hpx-0.9.10.ebuild new file mode 100644 index 000000000000..b481d7d9ba67 --- /dev/null +++ b/sys-cluster/hpx/hpx-0.9.10.ebuild @@ -0,0 +1,78 @@ +# 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,3_4} ) + +inherit cmake-utils fortran-2 multilib python-single-r1 versionator + +SRC_URI="http://stellar.cct.lsu.edu/files/${PN}_${PV}.tar.gz" +KEYWORDS="~amd64 ~x86" +S="${WORKDIR}/${PN}_${PV}" + +DESCRIPTION="C++ runtime system for parallel and distributed applications" +HOMEPAGE="http://stellar.cct.lsu.edu/tag/hpx/" + +SLOT="0" +LICENSE="Boost-1.0" +IUSE="doc examples jemalloc papi +perftools tbb test" + +RDEPEND=" + tbb? ( dev-cpp/tbb ) + >=dev-libs/boost-1.49 + papi? ( dev-libs/papi ) + perftools? ( >=dev-util/google-perftools-1.7.1 ) + >=sys-apps/hwloc-1.8 + >=sys-libs/libunwind-1 + sys-libs/zlib +" +DEPEND="${RDEPEND} + virtual/pkgconfig + test? ( dev-lang/python ) + doc? ( >=dev-libs/boost-1.56.0-r1[tools] ) +" +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} ) + jemalloc? ( !perftools !tbb ) + perftools? ( !jemalloc !tbb ) + tbb? ( !jemalloc !perftools ) + " + +pkg_setup() { + use test && python-single-r1_pkg_setup +} + +src_configure() { + CMAKE_BUILD_TYPE=Release + local mycmakeargs=( + -DHPX_BUILD_EXAMPLES=OFF + -DHPX_MALLOC=system + -DLIB=$(get_libdir) + -Dcmake_dir=cmake + $(cmake-utils_use doc HPX_BUILD_DOCUMENTATION) + $(cmake-utils_use jemalloc HPX_JEMALLOC) + $(cmake-utils_use test BUILD_TESTING) + $(cmake-utils_use perftools HPX_GOOGLE_PERFTOOLS) + $(cmake-utils_use papi HPX_PAPI) + ) + + use perftools && mycmakeargs+=( -DHPX_MALLOC=tcmalloc ) + use jemalloc && mycmakeargs+=( -DHPX_MALLOC=jemalloc ) + use tbb && mycmakeargs+=( -DHPX_MALLOC=tbbmalloc ) + + cmake-utils_src_configure +} + +src_test() { + # avoid over-suscribing + cmake-utils_src_make -j1 tests +} + +src_install() { + cmake-utils_src_install + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +} diff --git a/sys-cluster/hpx/hpx-0.9.8.ebuild b/sys-cluster/hpx/hpx-0.9.8.ebuild new file mode 100644 index 000000000000..1de22ffc9217 --- /dev/null +++ b/sys-cluster/hpx/hpx-0.9.8.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +SRC_URI="http://stellar.cct.lsu.edu/files/${PN}_${PV}.7z" +KEYWORDS="~amd64 ~x86" +S="${WORKDIR}/${PN}_${PV}" + +inherit cmake-utils fortran-2 multilib python-single-r1 + +DESCRIPTION="C++ runtime system for parallel and distributed applications" +HOMEPAGE="http://stellar.cct.lsu.edu/tag/hpx/" + +SLOT="0" +LICENSE="Boost-1.0" +IUSE="doc examples jemalloc papi +perftools tbb test" + +# TODO: some of the forced deps are may be optional +# it would need to work the automagic +RDEPEND=" + tbb? ( dev-cpp/tbb ) + >=dev-libs/boost-1.51 + dev-libs/libxml2 + papi? ( dev-libs/papi ) + sci-libs/hdf5 + >=sys-apps/hwloc-1.8 + >=sys-libs/libunwind-1 + sys-libs/zlib + perftools? ( >=dev-util/google-perftools-1.7.1 ) +" +DEPEND="${RDEPEND} + app-arch/p7zip + virtual/pkgconfig + test? ( dev-lang/python ) +" +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/hpx-0.9.8-install-path.patch + "${FILESDIR}"/hpx-0.9.8-multilib.patch + "${FILESDIR}"/hpx-0.9.8-cmake_dir.patch +) + +pkg_setup() { + use test && python-single-r1_pkg_setup +} + +src_configure() { + CMAKE_BUILD_TYPE=Release + local mycmakeargs=( + -DHPX_BUILD_EXAMPLES=OFF + -DLIB=$(get_libdir) + -Dcmake_dir=cmake + $(cmake-utils_use doc HPX_BUILD_DOCUMENTATION) + $(cmake-utils_use jemalloc HPX_JEMALLOC) + $(cmake-utils_use test BUILD_TESTING) + $(cmake-utils_use perftools HPX_GOOGLE_PERFTOOLS) + $(cmake-utils_use papi HPX_PAPI) + ) + if use perftools; then + mycmakeargs+=( -DHPX_MALLOC=tcmalloc ) + elif use jemalloc; then + mycmakeargs+=( -DHPX_MALLOC=jemalloc ) + elif use tbb; then + mycmakeargs+=( -DHPX_MALLOC=tbbmalloc ) + else + mycmakeargs+=( -DHPX_MALLOC=system ) + fi + cmake-utils_src_configure +} + +src_test() { + # avoid over-suscribing + cmake-utils_src_make -j1 tests +} + +src_install() { + cmake-utils_src_install + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +} diff --git a/sys-cluster/hpx/hpx-0.9.9.ebuild b/sys-cluster/hpx/hpx-0.9.9.ebuild new file mode 100644 index 000000000000..e6fbac60078b --- /dev/null +++ b/sys-cluster/hpx/hpx-0.9.9.ebuild @@ -0,0 +1,80 @@ +# 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,3_4} ) + +inherit cmake-utils fortran-2 multilib python-single-r1 versionator + +MY_PV="$(replace_version_separator _ -)" + +SRC_URI="https://github.com/STEllAR-GROUP/hpx/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64 ~x86" +S="${WORKDIR}/${PN}-${MY_PV}" + +DESCRIPTION="C++ runtime system for parallel and distributed applications" +HOMEPAGE="http://stellar.cct.lsu.edu/tag/hpx/" + +SLOT="0" +LICENSE="Boost-1.0" +IUSE="doc examples jemalloc papi +perftools tbb test" + +RDEPEND=" + tbb? ( dev-cpp/tbb ) + >=dev-libs/boost-1.49 + papi? ( dev-libs/papi ) + perftools? ( >=dev-util/google-perftools-1.7.1 ) + >=sys-apps/hwloc-1.8 + >=sys-libs/libunwind-1 + sys-libs/zlib +" +DEPEND="${RDEPEND} + virtual/pkgconfig + test? ( dev-lang/python ) + doc? ( >=dev-libs/boost-1.56.0-r1[tools] ) +" +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} ) + jemalloc? ( !perftools !tbb ) + perftools? ( !jemalloc !tbb ) + tbb? ( !jemalloc !perftools ) + " + +pkg_setup() { + use test && python-single-r1_pkg_setup +} + +src_configure() { + CMAKE_BUILD_TYPE=Release + local mycmakeargs=( + -DHPX_BUILD_EXAMPLES=OFF + -DHPX_MALLOC=system + -DLIB=$(get_libdir) + -Dcmake_dir=cmake + $(cmake-utils_use doc HPX_BUILD_DOCUMENTATION) + $(cmake-utils_use jemalloc HPX_JEMALLOC) + $(cmake-utils_use test BUILD_TESTING) + $(cmake-utils_use perftools HPX_GOOGLE_PERFTOOLS) + $(cmake-utils_use papi HPX_PAPI) + ) + + use perftools && mycmakeargs+=( -DHPX_MALLOC=tcmalloc ) + use jemalloc && mycmakeargs+=( -DHPX_MALLOC=jemalloc ) + use tbb && mycmakeargs+=( -DHPX_MALLOC=tbbmalloc ) + + cmake-utils_src_configure +} + +src_test() { + # avoid over-suscribing + cmake-utils_src_make -j1 tests +} + +src_install() { + cmake-utils_src_install + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +} diff --git a/sys-cluster/hpx/metadata.xml b/sys-cluster/hpx/metadata.xml new file mode 100644 index 000000000000..ef651df75ce7 --- /dev/null +++ b/sys-cluster/hpx/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <longdescription> + HPX (High Performance ParalleX) is a general C++ runtime system + for parallel and distributed applications of any scale. It is the + first freely available, open source, feature-complete, modular, + and performance oriented implementation of the ParalleX execution + model. HPX is targeted at conventional architectures and, + currently, Linux based systems, such as SMP nodes and conventional + clusters. +</longdescription> + <maintainer> + <email>slis@gentoo.org</email> + </maintainer> + <use> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for memory allocation</flag> + <flag name="perftools">Use <pkg>dev-util/google-perftools</pkg> for + memory allocation</flag> + <flag name="tbb">Use <pkg>dev-cpp/tbb</pkg> for memory + allocation</flag> + <flag name="papi">Use <pkg>dev-libs/papi</pkg> for NaCl</flag> + </use> + <upstream> + <remote-id type="github">STEllAR-GROUP/hpx</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/ipvsadm/Manifest b/sys-cluster/ipvsadm/Manifest new file mode 100644 index 000000000000..e91a81bd9b73 --- /dev/null +++ b/sys-cluster/ipvsadm/Manifest @@ -0,0 +1,4 @@ +DIST ipvsadm-1.21-11.tar.gz 34030 SHA256 7b85020f84d4648166bce480d747d82ac5c9113f9a222e3de7eb92b7af0598fa +DIST ipvsadm-1.24.tar.gz 32007 SHA256 773cbada48061e3afafaeaa2800d5382b8ff638b2c929293c14a793112a0642a +DIST ipvsadm-1.26.tar.gz 41700 SHA256 6d6c46fecb1c532a892616b4445c73b71730e8790d5630f60269fd9cbee0eb2d SHA512 873e23a6bdaabc153b00f1ede3853c947e8c8cfb4e18364d55197c74f26cc883ca469e074a90f377fbfd5e73e0cd6c1fe414c9f7a5c28b0d4431af58056eced4 WHIRLPOOL 5f62ad434c7da3359adbfae1cdde230769f19f0c82a190d7ef6fc8ba340d5e761875a778ad9a1dd7162d385b8ebda89c589b7179d53d495c79e82056e46bce9a +DIST ipvsadm-1.27.tar.xz 38196 SHA256 d360fb4dcf591e0a8a918831e2c02b1dc03e3c17ee1e60d0d70de9455238b3f8 SHA512 cf982b7981674c91d1b7516de7b55cf378b306ce4a53e13976b8eeb8610015c4fa4aa9d251bc4d329db8e05c1862863160af2d3c63b76263f290087cffdf1b80 WHIRLPOOL fbb69043813ccba929bb044c9d7854b67e8d656ae08209f17e21d3d237ea4690cd8ea7a1e2806ce6b07f847eb9796e93649c7f5231d2356e8519696b5a504b73 diff --git a/sys-cluster/ipvsadm/files/ipvsadm-1.26-buildsystem.patch b/sys-cluster/ipvsadm/files/ipvsadm-1.26-buildsystem.patch new file mode 100644 index 000000000000..ba8e9450eb35 --- /dev/null +++ b/sys-cluster/ipvsadm/files/ipvsadm-1.26-buildsystem.patch @@ -0,0 +1,113 @@ +--- a/Makefile ++++ b/Makefile +@@ -43,14 +43,13 @@ + INIT = $(BUILD_ROOT)/etc/rc.d/init.d + MKDIR = mkdir + INSTALL = install +-STATIC_LIBS = libipvs/libipvs.a + + ifeq "${ARCH}" "sparc64" +- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow ++ CFLAGS := -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow + else +- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g ++ CFLAGS := -g + endif +- ++OPTFLAGS += -Wall -Wunused -Wstrict-prototypes + + ##################################### + # No servicable parts below this line +@@ -94,10 +93,12 @@ + all: libs ipvsadm + + libs: +- make -C libipvs ++ $(MAKE) -C libipvs ++ ++$(OBJS): libs + +-ipvsadm: $(OBJS) $(STATIC_LIBS) +- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) ++ipvsadm: $(OBJS) ++ $(CC) $(LDFLAGS) $(OPTFLAGS) $(CFLAGS) -o $@ $^ -Llibipvs -lipvs $(LIBS) + +-install: all ++install: + if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi +@@ -108,15 +109,13 @@ + $(INSTALL) -m 0644 ipvsadm.8 $(MAN) + $(INSTALL) -m 0644 ipvsadm-save.8 $(MAN) + $(INSTALL) -m 0644 ipvsadm-restore.8 $(MAN) +- [ -d $(INIT) ] || $(MKDIR) -p $(INIT) +- $(INSTALL) -m 0755 ipvsadm.sh $(INIT)/ipvsadm + + clean: + rm -f ipvsadm $(NAME).spec $(NAME)-$(VERSION).tar.gz + rm -rf debian/tmp + find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \ + -o -name "*.rej" -o -name core | xargs rm -f +- make -C libipvs clean ++ $(MAKE) -C libipvs clean + + distclean: clean + +@@ -149,4 +148,4 @@ + dpkg-buildpackage + + %.o: %.c +- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< ++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< +--- a/libipvs/Makefile ++++ b/libipvs/Makefile +@@ -1,32 +1,39 @@ + # Makefile for libipvs + + CC = gcc +-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC ++OPTFLAGS = -Wall -Wunused -Wstrict-prototypes + ifneq (0,$(HAVE_NL)) +-CFLAGS += -DLIBIPVS_USE_NL ++DEFINES += -DLIBIPVS_USE_NL + endif + + INCLUDE += $(shell if [ -f ../../ip_vs.h ]; then \ + echo "-I../../."; fi;) +-DEFINES = $(shell if [ ! -f ../../ip_vs.h ]; then \ ++DEFINES += $(shell if [ ! -f ../../ip_vs.h ]; then \ + echo "-DHAVE_NET_IP_VS_H"; fi;) + + .PHONY = all clean install dist distclean rpm rpms +-STATIC_LIB = libipvs.a +-SHARED_LIB = libipvs.so + +-all: $(STATIC_LIB) $(SHARED_LIB) ++TARGETS = libipvs.so + +-$(STATIC_LIB): libipvs.o ip_vs_nl_policy.o ++ifeq (1,$(STATIC_LIB)) ++TARGETS += libipvs.a ++endif ++ ++all: $(TARGETS) ++ ++libipvs.a: libipvs.o ip_vs_nl_policy.o + ar rv $@ $^ + +-$(SHARED_LIB): libipvs.o ip_vs_nl_policy.o +- $(CC) -shared -Wl,-soname,$@ -o $@ $^ ++libipvs.so: libipvs.lo ip_vs_nl_policy.lo ++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^ ++ ++%.lo: %.c ++ $(CC) -fPIC $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< + + %.o: %.c +- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< ++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< + + clean: +- rm -f *.[ao] *~ *.orig *.rej core *.so ++ rm -f *.[ao] *~ *.orig *.rej core *.so *.lo + + distclean: clean diff --git a/sys-cluster/ipvsadm/files/ipvsadm-1.26-stack_smashing.patch b/sys-cluster/ipvsadm/files/ipvsadm-1.26-stack_smashing.patch new file mode 100644 index 000000000000..d36b0bf8abe4 --- /dev/null +++ b/sys-cluster/ipvsadm/files/ipvsadm-1.26-stack_smashing.patch @@ -0,0 +1,32 @@ +From 81529af388c0f0f4e4b169b7bcb285ef5e798f41 Mon Sep 17 00:00:00 2001 +From: Christian Ruppert <idl0r@gentoo.org> +Date: Sat, 8 Oct 2011 02:05:37 +0200 +Subject: [PATCH] Fix stack smashing because of a typo + +IPVS_CMD_ATTR_MAX was the size of __IPVS_SVC_ATTR_MAX before, which has a +different size and thus it caused trouble. The right enum to use is +__IPVS_CMD_ATTR_MAX. + +Reported-by: Deniss Gaplevsky <slim@inbox.lv> +X-Gentoo-Bug: 371903 +X-Gentoo-Bug-URL: https://bugs.gentoo.org/371903 +--- + libipvs/ip_vs.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libipvs/ip_vs.h b/libipvs/ip_vs.h +index 9726a17..5e1d544 100644 +--- a/libipvs/ip_vs.h ++++ b/libipvs/ip_vs.h +@@ -413,7 +413,7 @@ enum { + __IPVS_CMD_ATTR_MAX, + }; + +-#define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1) ++#define IPVS_CMD_ATTR_MAX (__IPVS_CMD_ATTR_MAX - 1) + + /* + * Attributes used to describe a service +-- +1.7.3.4 + diff --git a/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch b/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch new file mode 100644 index 000000000000..54d2e55c1519 --- /dev/null +++ b/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch @@ -0,0 +1,117 @@ +diff -Nuar -Nuar --exclude '*.orig' --exclude '*.rej' ipvsadm-1.27.orig/libipvs/Makefile ipvsadm-1.27/libipvs/Makefile +--- ipvsadm-1.27.orig/libipvs/Makefile 2013-09-06 01:37:27.000000000 -0700 ++++ ipvsadm-1.27/libipvs/Makefile 2013-11-01 23:45:21.633636401 -0700 +@@ -1,9 +1,9 @@ + # Makefile for libipvs + + CC = gcc +-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC ++#OPTFLAGS = -Wall -Wunused -Wstrict-prototypes + ifneq (0,$(HAVE_NL)) +-CFLAGS += -DLIBIPVS_USE_NL ++DEFINES += -DLIBIPVS_USE_NL + CFLAGS += $(shell \ + if which pkg-config > /dev/null 2>&1; then \ + if pkg-config --cflags libnl-3.0 2> /dev/null; then :; \ +@@ -15,7 +15,7 @@ + + INCLUDE += $(shell if [ -f ../../ip_vs.h ]; then \ + echo "-I../../."; fi;) +-DEFINES = $(shell if [ ! -f ../../ip_vs.h ]; then \ ++DEFINES += $(shell if [ ! -f ../../ip_vs.h ]; then \ + echo "-DHAVE_NET_IP_VS_H"; fi;) + DEFINES += $(shell if which pkg-config > /dev/null 2>&1; then \ + if pkg-config --exists libnl-3.0; then :; \ +@@ -24,21 +24,31 @@ + then echo "-DFALLBACK_LIBNL1"; fi; fi) + + .PHONY = all clean install dist distclean rpm rpms ++ + STATIC_LIB = libipvs.a + SHARED_LIB = libipvs.so + +-all: $(STATIC_LIB) $(SHARED_LIB) ++TARGETS = $(SHARED_LIB) ++ifeq (1,$(STATIC)) ++TARGETS += $(STATIC_LIB) ++endif ++all: $(TARGETS) ++ ++SOURCES = libipvs.c ip_vs_nl_policy.c + +-$(STATIC_LIB): libipvs.o ip_vs_nl_policy.o ++$(STATIC_LIB): $(SOURCES:%.c=%.o) + ar rv $@ $^ + +-$(SHARED_LIB): libipvs.o ip_vs_nl_policy.o +- $(CC) -shared -Wl,-soname,$@ -o $@ $^ ++$(SHARED_LIB): $(SOURCES:%.c=%.lo) ++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^ ++ ++%.lo: %.c ++ $(CC) -fPIC $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< + + %.o: %.c +- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< ++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< + + clean: +- rm -f *.[ao] *~ *.orig *.rej core *.so ++ rm -f *.[ao] *~ *.orig *.rej core *.so *.lo + + distclean: clean +diff -Nuar -Nuar --exclude '*.orig' --exclude '*.rej' ipvsadm-1.27.orig/Makefile ipvsadm-1.27/Makefile +--- ipvsadm-1.27.orig/Makefile 2013-11-01 23:49:36.523225124 -0700 ++++ ipvsadm-1.27/Makefile 2013-11-01 23:49:09.478738760 -0700 +@@ -43,14 +43,13 @@ + INIT = $(BUILD_ROOT)/etc/rc.d/init.d + MKDIR = mkdir + INSTALL = install +-STATIC_LIBS = libipvs/libipvs.a + + ifeq "${ARCH}" "sparc64" +- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow ++ CFLAGS := -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow + else +- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g ++ CFLAGS := -g + endif +- ++OPTFLAGS += -Wall -Wunused -Wstrict-prototypes + + ##################################### + # No servicable parts below this line +@@ -84,12 +83,14 @@ + all: libs ipvsadm + + libs: +- make -C libipvs ++ $(MAKE) -C libipvs CFLAGS="$(CFLAGS)" STATIC="$(STATIC)" OPTFLAGS="$(OPTFLAGS)" ++ ++$(OBJS): libs + +-ipvsadm: $(OBJS) $(STATIC_LIBS) +- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) ++ipvsadm: $(OBJS) ++ $(CC) $(LDFLAGS) $(OPTFLAGS) $(CFLAGS) -o $@ $^ -Llibipvs -lipvs $(LIBS) + +-install: all ++install: all + if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi + $(INSTALL) -m 0755 ipvsadm $(SBIN) + $(INSTALL) -m 0755 ipvsadm-save $(SBIN) +@@ -106,7 +107,7 @@ + rm -rf debian/tmp + find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \ + -o -name "*.rej" -o -name core | xargs rm -f +- make -C libipvs clean ++ $(MAKE) -C libipvs clean + + distclean: clean + +@@ -139,4 +140,4 @@ + dpkg-buildpackage + + %.o: %.c +- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< ++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< diff --git a/sys-cluster/ipvsadm/files/ipvsadm-1.27-fix-daemon-state.patch b/sys-cluster/ipvsadm/files/ipvsadm-1.27-fix-daemon-state.patch new file mode 100644 index 000000000000..e3e5ebec72c6 --- /dev/null +++ b/sys-cluster/ipvsadm/files/ipvsadm-1.27-fix-daemon-state.patch @@ -0,0 +1,56 @@ +From 8c34d5a0d4c763db9b8f1e54be0c6c3ded6c54e0 Mon Sep 17 00:00:00 2001 +From: Alexander Holler <alexander.holler@1und1.de> +Date: Mon, 9 Jan 2012 13:16:55 +0100 +Subject: [PATCH] libipvs: Fix reporting of the state of the backup-daemon. + +ipvsadm -l --daemon didn't report a running ipvs-backup-daemon +(if no master-daemon was run). + +It seems there was some misunderstanding of +how the daemons got reported (without using netlink). The state of +the backup-daemon is always reported (by the kernel) in the second +element of type ip_vs_daemon_user which is returned by the kernel +through IP_VS_SO_GET_DAEMON or IPVS_CMD_GET_DAEMON. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +--- + libipvs/libipvs.c | 11 ++++++----- + 1 files changed, 6 insertions(+), 5 deletions(-) + +Note: patch adjusted slightly to apply against ipvsadm (was spun for keepalived) - robbat2 + +diff --git a/libipvs/libipvs.c b/libipvs/libipvs.c +index ea5e851..6bee837 100644 +--- a/libipvs/libipvs.c ++++ b/libipvs/libipvs.c +@@ -1003,12 +1003,9 @@ static int ipvs_daemon_parse_cb(struct nl_msg *msg, void *arg) + struct nlattr *attrs[IPVS_CMD_ATTR_MAX + 1]; + struct nlattr *daemon_attrs[IPVS_DAEMON_ATTR_MAX + 1]; + ipvs_daemon_t *u = (ipvs_daemon_t *)arg; ++ __u32 state; + int i = 0; + +- /* We may get two daemons. If we've already got one, this is the second */ +- if (u[0].state) +- i = 1; +- + if (genlmsg_parse(nlh, 0, attrs, IPVS_CMD_ATTR_MAX, ipvs_cmd_policy) != 0) + return -1; + +@@ -1021,7 +1018,11 @@ static int ipvs_daemon_parse_cb(struct nl_msg *msg, void *arg) + daemon_attrs[IPVS_DAEMON_ATTR_SYNC_ID])) + return -1; + +- u[i].state = nla_get_u32(daemon_attrs[IPVS_DAEMON_ATTR_STATE]); ++ state = nla_get_u32(daemon_attrs[IPVS_DAEMON_ATTR_STATE]); ++ /* The second element is used for the state of the backup daemon. */ ++ if (state == IP_VS_STATE_BACKUP) ++ i = 1; ++ u[i].state = state; + strncpy(u[i].mcast_ifn, + nla_get_string(daemon_attrs[IPVS_DAEMON_ATTR_MCAST_IFN]), + IP_VS_IFNAME_MAXLEN); +-- +1.7.6.5 + diff --git a/sys-cluster/ipvsadm/files/ipvsadm-init b/sys-cluster/ipvsadm/files/ipvsadm-init new file mode 100644 index 000000000000..a365524039a4 --- /dev/null +++ b/sys-cluster/ipvsadm/files/ipvsadm-init @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="save" + +depend() { + need net +} + +checkconfig() { + if [ ! -f /var/lib/ipvsadm/rules-save ] ; then + eerror "Not starting ipvsadm. First create some rules then run" + eerror "/etc/init.d/ipvsadm save" + return 1 + fi +} + +start() { + ebegin "Starting ipvsadm" + einfo "Clearing previous rules" + ipvsadm -C + ipvsadm-restore < /var/lib/ipvsadm/rules-save + eend $? +} + +stop() { + ebegin "Stopping ipvsadm" + eend $? +} + +save() { + ebegin "Saving ipvsadm state" + ipvsadm-save > /var/lib/ipvsadm/rules-save + eend $? +} diff --git a/sys-cluster/ipvsadm/ipvsadm-1.21-r1.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.21-r1.ebuild new file mode 100644 index 000000000000..c5be3b2388eb --- /dev/null +++ b/sys-cluster/ipvsadm/ipvsadm-1.21-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit linux-info + +PATCHLEVEL="11" +MY_PV="${PV}-${PATCHLEVEL}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="utility to administer the IP virtual server services" +HOMEPAGE="http://linuxvirtualserver.org" +LICENSE="GPL-2" +DEPEND=">=sys-libs/ncurses-5.2" + +SRC_URI="http://www.linuxvirtualserver.org/software/kernel-2.4/${MY_P}.tar.gz" + +SLOT="0" +KEYWORDS="~ppc ~ppc64 x86" +IUSE="" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if kernel_is -ge 2 6; then + eerror "${P} does not support 2.6 kernels, please try newer versions" + die "wrong kernel version" + fi +} + +src_compile() { + emake || die "error compiling source" +} + +src_install() { + into / + dosbin ipvsadm ipvsadm-save ipvsadm-restore || die + + doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8 + + newinitd "${FILESDIR}"/ipvsadm-init ipvsadm || die + keepdir /var/lib/ipvsadm + + dolib.a libipvs/libipvs.a || die + + insinto /usr/include/ipvs + newins libipvs/libipvs.h ipvs.h || die + + einfo "You will need a kernel that has ipvs patches to use LVS" +} diff --git a/sys-cluster/ipvsadm/ipvsadm-1.24.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.24.ebuild new file mode 100644 index 000000000000..6cd5698cece3 --- /dev/null +++ b/sys-cluster/ipvsadm/ipvsadm-1.24.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit linux-info toolchain-funcs + +DESCRIPTION="utility to administer the IP virtual server services offered by the Linux kernel" +HOMEPAGE="http://linuxvirtualserver.org/" +SRC_URI="http://www.linuxvirtualserver.org/software/kernel-2.5/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ia64 ~ppc64 s390 sparc x86" +IUSE="" + +RDEPEND=">=sys-libs/ncurses-5.2" +DEPEND="${RDEPEND}" + +pkg_setup() { + if kernel_is 2 4; then + eerror "${P} supports only 2.6 kernels, please try ${PN}-1.21 for 2.4 kernels" + die "wrong kernel version" + fi +} + +src_compile() { + emake \ + -j1 \ + INCLUDE="-I${KV_DIR}/include -I.. -I." \ + CFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + || die "error compiling source" +} + +src_install() { + into / + dosbin ipvsadm ipvsadm-save ipvsadm-restore || die + + doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8 || die + + newinitd "${FILESDIR}"/ipvsadm-init ipvsadm + keepdir /var/lib/ipvsadm + + dolib.a libipvs/libipvs.a || die + + insinto /usr/include/ipvs + newins libipvs/libipvs.h ipvs.h || die +} + +pkg_postinst() { + einfo "You will need a kernel that has ipvs patches to use LVS." + einfo "This version is specifically for 2.6 kernels." +} diff --git a/sys-cluster/ipvsadm/ipvsadm-1.26-r2.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.26-r2.ebuild new file mode 100644 index 000000000000..0a12957158b6 --- /dev/null +++ b/sys-cluster/ipvsadm/ipvsadm-1.26-r2.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils linux-info toolchain-funcs + +DESCRIPTION="utility to administer the IP virtual server services" +HOMEPAGE="http://linuxvirtualserver.org/" +SRC_URI="http://www.linuxvirtualserver.org/software/kernel-2.6/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ia64 ppc ppc64 s390 sparc x86" +IUSE="static-libs" + +RDEPEND=">=sys-libs/ncurses-5.2 + dev-libs/libnl:1.1 + >=dev-libs/popt-1.16" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +pkg_pretend() { + if kernel_is 2 4; then + eerror "${P} supports only 2.6 series and later kernels, please try ${PN}-1.21 for 2.4 kernels" + die "wrong kernel version" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-buildsystem.patch + epatch "${FILESDIR}/${P}-stack_smashing.patch" # bug 371903 + use static-libs && export STATIC=1 +} + +src_compile() { + emake -e \ + INCLUDE="-I.. -I." \ + CC="$(tc-getCC)" \ + HAVE_NL=1 \ + STATIC_LIB=${STATIC} \ + POPT_LIB="$(pkg-config --libs popt)" +} + +src_install() { + into / + dosbin ipvsadm ipvsadm-save ipvsadm-restore + + into /usr + doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8 + + newinitd "${FILESDIR}"/ipvsadm-init ipvsadm + keepdir /var/lib/ipvsadm + + use static-libs && dolib.a libipvs/libipvs.a + dolib.so libipvs/libipvs.so + + insinto /usr/include/ipvs + newins libipvs/libipvs.h ipvs.h +} + +pkg_postinst() { + einfo "You will need a kernel that has ipvs patches to use LVS." +} diff --git a/sys-cluster/ipvsadm/ipvsadm-1.27-r1.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.27-r1.ebuild new file mode 100644 index 000000000000..3ff6de56459a --- /dev/null +++ b/sys-cluster/ipvsadm/ipvsadm-1.27-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils linux-info toolchain-funcs + +DESCRIPTION="utility to administer the IP virtual server services" +HOMEPAGE="http://linuxvirtualserver.org/" +SRC_URI="https://kernel.org/pub/linux/utils/kernel/ipvsadm/ipvsadm-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="static-libs" + +RDEPEND=">=sys-libs/ncurses-5.2 + dev-libs/libnl + >=dev-libs/popt-1.16" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +pkg_pretend() { + if kernel_is 2 4; then + eerror "${P} supports only 2.6 series and later kernels, please try ${PN}-1.21 for 2.4 kernels" + die "wrong kernel version" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.27-buildsystem.patch + # Merged upstream in 1.27 + #epatch "${FILESDIR}"/${PN}-1.26-stack_smashing.patch # bug 371903 + epatch "${FILESDIR}"/${PN}-1.27-fix-daemon-state.patch + use static-libs && export STATIC=1 +} + +src_compile() { + emake -e \ + INCLUDE="-I.. -I." \ + CC="$(tc-getCC)" \ + HAVE_NL=1 \ + STATIC=${STATIC} \ + POPT_LIB="$(pkg-config --libs popt)" +} + +src_install() { + into / + dosbin ipvsadm ipvsadm-save ipvsadm-restore + + into /usr + doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8 + + newinitd "${FILESDIR}"/ipvsadm-init ipvsadm + keepdir /var/lib/ipvsadm + + use static-libs && dolib.a libipvs/libipvs.a + dolib.so libipvs/libipvs.so + + insinto /usr/include/ipvs + newins libipvs/libipvs.h ipvs.h +} + +pkg_postinst() { + einfo "You will need a kernel that has ipvs patches to use LVS." +} diff --git a/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild new file mode 100644 index 000000000000..5718b3b52f3f --- /dev/null +++ b/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils linux-info toolchain-funcs + +DESCRIPTION="utility to administer the IP virtual server services" +HOMEPAGE="http://linuxvirtualserver.org/" +SRC_URI="https://kernel.org/pub/linux/utils/kernel/ipvsadm/ipvsadm-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="static-libs" + +RDEPEND=">=sys-libs/ncurses-5.2 + dev-libs/libnl + >=dev-libs/popt-1.16" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +pkg_pretend() { + if kernel_is 2 4; then + eerror "${P} supports only 2.6 series and later kernels, please try ${PN}-1.21 for 2.4 kernels" + die "wrong kernel version" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.27-buildsystem.patch + # Merged upstream in 1.27 + #epatch "${FILESDIR}"/${PN}-1.26-stack_smashing.patch # bug 371903 + + use static-libs && export STATIC=1 +} + +src_compile() { + emake -e \ + INCLUDE="-I.. -I." \ + CC="$(tc-getCC)" \ + HAVE_NL=1 \ + STATIC=${STATIC} \ + POPT_LIB="$(pkg-config --libs popt)" +} + +src_install() { + into / + dosbin ipvsadm ipvsadm-save ipvsadm-restore + + into /usr + doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8 + + newinitd "${FILESDIR}"/ipvsadm-init ipvsadm + keepdir /var/lib/ipvsadm + + use static-libs && dolib.a libipvs/libipvs.a + dolib.so libipvs/libipvs.so + + insinto /usr/include/ipvs + newins libipvs/libipvs.h ipvs.h +} + +pkg_postinst() { + einfo "You will need a kernel that has ipvs patches to use LVS." +} diff --git a/sys-cluster/ipvsadm/metadata.xml b/sys-cluster/ipvsadm/metadata.xml new file mode 100644 index 000000000000..c59d5f8c5323 --- /dev/null +++ b/sys-cluster/ipvsadm/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>cluster</herd> + + <longdescription> + Administration tools for linux virtual server clusters + </longdescription> +</pkgmetadata> diff --git a/sys-cluster/keepalived/Manifest b/sys-cluster/keepalived/Manifest new file mode 100644 index 000000000000..c27a23411165 --- /dev/null +++ b/sys-cluster/keepalived/Manifest @@ -0,0 +1,7 @@ +DIST keepalived-1.2.15.tar.gz 345471 SHA256 47db44d78549da704e0794198bfc874be65ca570d15429a6a5c23b8d91109aa9 SHA512 f640e3f2694d359ebb24addb55c48c9ca877fa64daac5e73b4a251bf2a531705a8e02a34d7ee95cd96ad70a282c96f5102d3ce4baa2be90e6df2c8d910551b78 WHIRLPOOL 3273e2d1cdaf8c5ca468e536472c6c781ed4cf78035b559f68693b935eeae04b28204f51e983d9066f294f63dbb05b9d8d77f8c7cb647c77abbd99c6a8f65561 +DIST keepalived-1.2.16.tar.gz 346920 SHA256 5c4f444697374f2de14e7c74c56e28a212047050abbb3e66439534a5516b3665 SHA512 60aaad164dab07ebf842eb5e9b0406ea8c777788cdc98abb5038093cfce6c35567bf975881e9fb002c9bbb219250e65e1450534edd0f5fef277aeb92b47874f0 WHIRLPOOL 0d9dc2538c9e466bab6f6377d1f9954292ad31332d3f84415fc0f4acb44f4f7984e6d06dc5e2a3e45b81f91036240d43f81dc5607b3761bb16263c741a49c910 +DIST keepalived-1.2.18.tar.gz 330361 SHA256 e5cda97e2c3b1606aa8569e080cd7d0c30b6f0f106d664f9d0427e421ef7811e SHA512 5a7ab7a883e92f8567fdedd7e7e9dcb0382516efebbfc7510a6acd96ccdcbd85cb576eee5ccf93b3077fb237bfd0fc5eda17943f3d3373296f688f6182575032 WHIRLPOOL 4d4bdbe1a05193c32df29f93a9c48e871134dc20763a7ce08c39ee2e3e0dadd77ba12739b64d0a4bc1f2d5f14b278a7dc0951d2a20b4c5416ab75cbebc6ca148 +DIST keepalived-1.2.19.tar.gz 330164 SHA256 32fbae732c1cd854cacd7a930d4a26f5bad6372cdecb5e3139f0c17e87493853 SHA512 d2848726aa97bbd5a3be3e667314a453d26572ef6d14f5f606395a203ceab7bce8a6c63e3b5ebb05c83d75a5491b77f1fa4e3042cd919d7d673c3595ec829974 WHIRLPOOL d99f2ec52b952d8f5d79486e01c58fe6b15e22fe8279a56384958c5597ed031d217495518388efb33ece3170c56220836bcda7c998777deb81d348d0e9fd146a +DIST keepalived-1.2.2.tar.gz 249557 SHA256 4c05dbd149af120506b4f3a66b4016e30d9ad112e4c26a602e28c366705de8c0 SHA512 1ac581c94be846822ef0ea7f3d2084b4a64ebc2cf77f9e41248169daa3319adcdeb8bd2bef2b3ce6630ae620f4b2ab7e9e949881d7efcc3d359004f0ff316ae8 WHIRLPOOL 13ad7a3f97619951f40dd3a7e43253d218b8bb9515c4b9c551125df2d6d6fe1cbf2761e88b54733498adf782aeae10f55ee267c58c297f1765fa86939edc1a00 +DIST keepalived-1.2.9.tar.gz 330779 SHA256 fb711dacce95b60eee18f2b89938a9fbebc5096022f17850fd2284f207e41d9d SHA512 042c2b43c6f71d89d510b3514c8110e6057eb7b01d566f4c39a45131e79b12d8376dc6b330b1f0339e8a49507cc8b112e61a98f46116ce7c6d859d05b4d8d717 WHIRLPOOL 255887a26f9c561f9229961c835edf3e22563def594ce55af6d81105db5512ea31484efbfc0fb77234368f55bbbb4994edecf6b00af8399c3fc10f6903e1b6d2 +DIST keepalived_1.2.2-3.diff.gz 9856 SHA256 104213b98e80c5de7c04ff0a409b88c6aad30f727516f26871fa77dcbdc74aa6 SHA512 d42dc7c591e4134e155e4e8db3cb7ccbf5098f02f09cb9ecfc5b18c43f8c497360018e4584b7f77169b15ca0b28ec84f340dd5c336fc53e3338c62bce0fe1478 WHIRLPOOL 4eefb8765fc78365472687af6d2742c1cdb3eb2ee0e3d0570e5c82e478054547797aaa823786bae73a31bc4b752c334ab6e4784f86f457b140b01ef9a72336aa diff --git a/sys-cluster/keepalived/files/conf-keepalived b/sys-cluster/keepalived/files/conf-keepalived new file mode 100644 index 000000000000..b8e4d6592f0b --- /dev/null +++ b/sys-cluster/keepalived/files/conf-keepalived @@ -0,0 +1,7 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Keepalived options +# Increase logging: +#opts="-D" diff --git a/sys-cluster/keepalived/files/init-keepalived b/sys-cluster/keepalived/files/init-keepalived new file mode 100644 index 000000000000..5f3053358d5d --- /dev/null +++ b/sys-cluster/keepalived/files/init-keepalived @@ -0,0 +1,44 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +opts="reload" + +depend() { + use logger + # The interfaces do not actually need to exist to start, it handles them gracefully. + use net +} + +extra_commands="checkconfig" + +PIDFILE=/var/run/keepalived.pid + +checkconfig() { + # keepalived has a config check command, but it does not work while the daemon is running! + if [ ! -e /etc/keepalived/keepalived.conf ] ; then + eerror "You need an /etc/keepalived/keepalived.conf file to run keepalived" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting Keepalived" + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec /usr/sbin/keepalived -- $opts + eend $? +} + +stop() { + ebegin "Stopping Keepalived" + start-stop-daemon --stop --quiet --pidfile $PIDFILE + eend $? +} + +reload() { + ebegin "Reloading keepalived.conf" + start-stop-daemon --pidfile $PIDFILE --signal HUP + eend $? +} diff --git a/sys-cluster/keepalived/files/keepalived-1.1.20-do-not-need-kernel-sources.patch b/sys-cluster/keepalived/files/keepalived-1.1.20-do-not-need-kernel-sources.patch new file mode 100644 index 000000000000..e56cc635907b --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived-1.1.20-do-not-need-kernel-sources.patch @@ -0,0 +1,110 @@ +diff -urN keepalived-1.1.20-orig/configure.in keepalived-1.1.20/configure.in +--- keepalived-1.1.20-orig/configure.in 2009-11-05 18:23:04.000000000 +0100 ++++ keepalived-1.1.20/configure.in 2010-05-31 11:42:05.000000000 +0200 +@@ -51,103 +51,18 @@ + AC_CHECK_LIB(popt, poptGetContext,,AC_MSG_ERROR([Popt libraries is required])) + + dnl ----[ Kernel version check ]---- +-CPPFLAGS="$CPPFLAGS -I$kernelinc" +-AC_MSG_CHECKING([for kernel version]) +-AC_TRY_RUN([ +- #include <stdlib.h> +- #include <stdio.h> +- #include <linux/version.h> +- #if !defined(UTS_RELEASE) && !defined(LINUX_VERSION_CODE) +- #include <linux/utsrelease.h> +- #endif +- int main (void) { +- FILE *fp = fopen ("linuxinfo", "w"); +- if (!fp) return 1; +- #if defined(UTS_RELEASE) +- fprintf (fp, "%s\n", UTS_RELEASE); +- #elif defined(LINUX_VERSION_CODE) +- fprintf (fp, "%d.%d.%d\n", LINUX_VERSION_CODE >> 16, (LINUX_VERSION_CODE >> 8) & 0xFF, LINUX_VERSION_CODE & 0xFF); +- #else +- fprintf (fp, "0.0.0\n"); /* Let's fail gently */ +- #endif +- fclose (fp); +- return 0; +- } +- ], [ +- LINUX_MAJOR=`cat linuxinfo | cut -d'.' -f1` +- LINUX_MINOR=`cat linuxinfo | cut -d'.' -f2` +- LINUX_PATCH=`cat linuxinfo | cut -d'.' -f3` +- ], [ +- LINUX_MAJOR="0" +- LINUX_MINOR="0" +- LINUX_PATCH="0" +- ], [ +- LINUX_MAJOR="0" +- LINUX_MINOR="0" +- LINUX_PATCH="0" +- ]) +- rm -f linuxinfo +- +- if test "$kernelversion" = "2.4"; then +- KERN="_KRNL_2_4_" +- AC_MSG_RESULT([2.4]) +- elif test "$kernelversion" = "2.6"; then +- KERN="_KRNL_2_6_" +- AC_MSG_RESULT([2.6]) +- else +- AC_MSG_RESULT([$LINUX_MAJOR.$LINUX_MINOR.$LINUX_PATCH]) +- if test "$LINUX_MINOR" = "6"; then +- KERN="_KRNL_2_6_" +- elif test "$LINUX_MINOR" = "4"; then +- KERN="_KRNL_2_4_" +- else +- KERN="_KRNL_2_6_" +- fi +- if test "$LINUX_MAJOR" = "0" -a "$LINUX_MINOR" = "0" -a "$LINUX_PATCH" = "0"; then +- AC_MSG_WARN([Cannot determine Linux Kernel version.]) +- fi +- fi +- ++KERN="_KRNL_2_6_" + AC_SUBST(KERN) + + dnl ----[ Checks for LVS and VRRP support ]---- +-IPVS_SUPPORT="_WITHOUT_LVS_" +-if test "$enable_lvs" != "no"; then +- AC_CHECK_HEADER([net/ip_vs.h], +- [IPVS_SUPPORT="_WITH_LVS_"], +- [ +- IPVS_SUPPORT="_WITHOUT_LVS_" +- AC_MSG_WARN([keepalived will be built without LVS support.]) +- ]) +-fi ++IPVS_SUPPORT="_WITH_LVS_" + + if test "$IPVS_SUPPORT" = "_WITHOUT_LVS_" -a "$enable_vrrp" = "no"; then + AC_MSG_ERROR([keepalived MUST be compiled at least with LVS or VRRP framework]) + fi + + dnl ----[ IPVS syncd support probe ]--- +-IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_" +-if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then +- AC_MSG_CHECKING([for IPVS syncd support]) +- if test "$KERN" = "_KRNL_2_6_"; then +- IPVS_SYNCD="_HAVE_IPVS_SYNCD_" +- elif test "_KRNL_2_4_"; then +- IPVS_SYNCD="_HAVE_IPVS_SYNCD_" +- else +- IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_" +- fi +- +- if test "${IPVS_SUPPORT}" = "_WITHOUT_LVS_" -o "$enable_lvs_syncd" = "no"; then +- IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_" +- fi +- +- if test "$IPVS_SYNCD" = "_HAVE_IPVS_SYNCD_"; then +- AC_MSG_RESULT([yes]) +- else +- AC_MSG_RESULT([no]) +- fi +-fi +- ++IPVS_SYNCD="_HAVE_IPVS_SYNCD_" + AC_SUBST(IPVS_SYNCD) + + dnl ----[ Checks for kernel netlink support ]---- diff --git a/sys-cluster/keepalived/files/keepalived-1.2.2-bind-afunspec.patch b/sys-cluster/keepalived/files/keepalived-1.2.2-bind-afunspec.patch new file mode 100644 index 000000000000..1f365d26e517 --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived-1.2.2-bind-afunspec.patch @@ -0,0 +1,13 @@ +diff --git a/keepalived/core/layer4.c b/keepalived/core/layer4.c +index 5725500..5b33417 100644 +--- a/keepalived/core/layer4.c ++++ b/keepalived/core/layer4.c +@@ -43,7 +43,7 @@ tcp_bind_connect(int fd, struct sockaddr_storage *addr, struct sockaddr_storage + fcntl(fd, F_SETFL, val | O_NONBLOCK); + + /* Bind socket */ +- if (bind_addr) { ++ if (bind_addr && ((struct sockaddr *) bind_addr)->sa_family != AF_UNSPEC) { + addrlen = sizeof(*bind_addr); + if (bind(fd, (struct sockaddr *) bind_addr, addrlen) != 0) + return connect_error;
\ No newline at end of file diff --git a/sys-cluster/keepalived/files/keepalived-1.2.2-fix-ipv4-addr-compare.patch b/sys-cluster/keepalived/files/keepalived-1.2.2-fix-ipv4-addr-compare.patch new file mode 100644 index 000000000000..692f042218fc --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived-1.2.2-fix-ipv4-addr-compare.patch @@ -0,0 +1,23 @@ +From bc49a46989c98eb6ee72a379b18b77e87ed624fa Mon Sep 17 00:00:00 2001 +From: Vincent Bernat <bernat@luffy.cx> +Date: Wed, 07 Dec 2011 09:17:55 +0000 +Subject: Fix IPv4 address comparison routine. + +Two different IPv4 addresses were returned to be equal while this was +not the case. Thanks to Ronie Gilberto Henrich for spotting this bug. +--- +diff --git a/keepalived/include/check_data.h b/keepalived/include/check_data.h +index 50a4757..e3ff458 100644 +--- a/keepalived/include/check_data.h ++++ b/keepalived/include/check_data.h +@@ -163,7 +163,7 @@ static inline int sockstorage_equal(const struct sockaddr_storage *s1, + struct sockaddr_in *a1 = (struct sockaddr_in *) s1; + struct sockaddr_in *a2 = (struct sockaddr_in *) s2; + +- if ((a1->sin_addr.s_addr == a1->sin_addr.s_addr) && ++ if ((a1->sin_addr.s_addr == a2->sin_addr.s_addr) && + (a1->sin_port == a2->sin_port)) + return 1; + } +-- +cgit v0.8.3.4 diff --git a/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-backup-daemon.patch b/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-backup-daemon.patch new file mode 100644 index 000000000000..9898122e4d25 --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-backup-daemon.patch @@ -0,0 +1,51 @@ +From 8c34d5a0d4c763db9b8f1e54be0c6c3ded6c54e0 Mon Sep 17 00:00:00 2001 +From: Alexander Holler <alexander.holler@1und1.de> +Date: Mon, 9 Jan 2012 13:16:55 +0100 +Subject: [PATCH] libipvs: Fix reporting of the state of the backup-daemon. + +ipvsadm -l --daemon didn't report a running ipvs-backup-daemon +(if no master-daemon was run). + +It seems there was some misunderstanding of +how the daemons got reported (without using netlink). The state of +the backup-daemon is always reported (by the kernel) in the second +element of type ip_vs_daemon_user which is returned by the kernel +through IP_VS_SO_GET_DAEMON or IPVS_CMD_GET_DAEMON. +--- + keepalived/libipvs-2.6/libipvs.c | 11 ++++++----- + 1 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/keepalived/libipvs-2.6/libipvs.c b/keepalived/libipvs-2.6/libipvs.c +index ea5e851..6bee837 100644 +--- a/keepalived/libipvs-2.6/libipvs.c ++++ b/keepalived/libipvs-2.6/libipvs.c +@@ -1003,12 +1003,9 @@ static int ipvs_daemon_parse_cb(struct nl_msg *msg, void *arg) + struct nlattr *attrs[IPVS_CMD_ATTR_MAX + 1]; + struct nlattr *daemon_attrs[IPVS_DAEMON_ATTR_MAX + 1]; + ipvs_daemon_t *u = (ipvs_daemon_t *)arg; ++ __u32 state; + int i = 0; + +- /* We may get two daemons. If we've already got one, this is the second */ +- if (u[0].state) +- i = 1; +- + if (genlmsg_parse(nlh, 0, attrs, IPVS_CMD_ATTR_MAX, ipvs_cmd_policy) != 0) + return -1; + +@@ -1021,7 +1018,11 @@ static int ipvs_daemon_parse_cb(struct nl_msg *msg, void *arg) + daemon_attrs[IPVS_DAEMON_ATTR_SYNC_ID])) + return -1; + +- u[i].state = nla_get_u32(daemon_attrs[IPVS_DAEMON_ATTR_STATE]); ++ state = nla_get_u32(daemon_attrs[IPVS_DAEMON_ATTR_STATE]); ++ /* The second element is used for the state of the backup daemon. */ ++ if (state == IP_VS_STATE_BACKUP) ++ i = 1; ++ u[i].state = state; + strncpy(u[i].mcast_ifn, + nla_get_string(daemon_attrs[IPVS_DAEMON_ATTR_MCAST_IFN]), + IP_VS_IFNAME_MAXLEN); +-- +1.7.6.5 + diff --git a/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-ipv6.patch b/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-ipv6.patch new file mode 100644 index 000000000000..f9435b026242 --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-ipv6.patch @@ -0,0 +1,33 @@ +From cf8ff745812b7fe00d509fb50592348b6f60b433 Mon Sep 17 00:00:00 2001 +From: Alexander Holler <alexander.holler@1und1.de> +Date: Mon, 9 Jan 2012 12:58:12 +0100 +Subject: [PATCH] libipvs: Fix initialization of netlink (needed for IPv6) + when the module ip_vs wasn't loaded. + +The following happened when keepalived was started before the module for IPVS was loaded: + +ipvs_init() failed => netlink got disabled. +modprobe_ipvs() +ipvs_init() => netlink was not tested again => no netlink => no IPv6 + +Fixed through testing netlink always in ipvs_init(). +--- + keepalived/libipvs-2.6/libipvs.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/keepalived/libipvs-2.6/libipvs.c b/keepalived/libipvs-2.6/libipvs.c +index 2c75118..ea5e851 100644 +--- a/keepalived/libipvs-2.6/libipvs.c ++++ b/keepalived/libipvs-2.6/libipvs.c +@@ -114,6 +114,8 @@ int ipvs_init(void) + ipvs_func = ipvs_init; + + #ifdef LIBIPVS_USE_NL ++ try_nl = 1; ++ + if (ipvs_nl_send_message(NULL, NULL, NULL) == 0) { + return ipvs_getinfo(); + } +-- +1.7.6.5 + diff --git a/sys-cluster/keepalived/files/keepalived.confd b/sys-cluster/keepalived/files/keepalived.confd new file mode 100644 index 000000000000..93b0092dfb87 --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived.confd @@ -0,0 +1,7 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Keepalived options +# Increase logging: +#KEEPALIVED_OPTS="-D" diff --git a/sys-cluster/keepalived/files/keepalived.init b/sys-cluster/keepalived/files/keepalived.init new file mode 100644 index 000000000000..9bafc01fe38b --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived.init @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use logger + # The interfaces do not actually need to exist to start, it handles them gracefully. + use net +} + +command="/usr/sbin/keepalived" +command_args="${KEEPALIVED_OPTS}" +pidfile="/var/run/keepalived.pid" + +extra_commands="checkconfig reload" + +checkconfig() { + # keepalived has a config check command, but it does not work while the daemon is running! + if [ ! -e /etc/keepalived/keepalived.conf ] ; then + eerror "You need an /etc/keepalived/keepalived.conf file to run keepalived" + return 1 + fi +} + +start_pre() { + checkconfig || return 1 +} + +reload() { + ebegin "Reloading keepalived.conf" + start-stop-daemon --pidfile $pidfile --signal HUP + eend $? +} diff --git a/sys-cluster/keepalived/keepalived-1.2.15.ebuild b/sys-cluster/keepalived/keepalived-1.2.15.ebuild new file mode 100644 index 000000000000..9680303d3cfd --- /dev/null +++ b/sys-cluster/keepalived/keepalived-1.2.15.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools base + +DESCRIPTION="A strong & robust keepalive facility to the Linux Virtual Server project" +HOMEPAGE="http://www.keepalived.org/" +SRC_URI="http://www.keepalived.org/software/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 ~s390 sparc x86" +IUSE="debug ipv6 snmp" + +RDEPEND="dev-libs/popt + sys-apps/iproute2 + dev-libs/libnl + dev-libs/openssl + snmp? ( net-analyzer/net-snmp )" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.30" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-backup-daemon.patch +) + +DOCS=( README CONTRIBUTORS INSTALL VERSION ChangeLog AUTHOR TODO + doc/keepalived.conf.SYNOPSIS doc/NOTE_vrrp_vmac.txt ) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + STRIP=/bin/true \ + econf \ + --with-kernel-dir=/usr \ + --enable-vrrp \ + $(use_enable debug) \ + $(use_enable snmp) +} + +src_install() { + default + + newinitd "${FILESDIR}"/keepalived.init keepalived + newconfd "${FILESDIR}"/keepalived.confd keepalived + + use snmp && dodoc doc/KEEPALIVED-MIB + + docinto genhash + dodoc genhash/README genhash/AUTHOR genhash/ChangeLog genhash/VERSION || die + # This was badly named by upstream, it's more HOWTO than anything else. + newdoc INSTALL INSTALL+HOWTO + + # Security risk to bundle SSL certs + rm -f "${ED}"/etc/keepalived/samples/*.pem + # Clean up sysvinit files + rm -rf "${ED}"/etc/sysconfig "${ED}"/etc/rc.d/ +} diff --git a/sys-cluster/keepalived/keepalived-1.2.16.ebuild b/sys-cluster/keepalived/keepalived-1.2.16.ebuild new file mode 100644 index 000000000000..e7a8323d492d --- /dev/null +++ b/sys-cluster/keepalived/keepalived-1.2.16.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools base + +DESCRIPTION="A strong & robust keepalive facility to the Linux Virtual Server project" +HOMEPAGE="http://www.keepalived.org/" +SRC_URI="http://www.keepalived.org/software/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="debug ipv6 snmp" + +RDEPEND="dev-libs/popt + sys-apps/iproute2 + dev-libs/libnl + dev-libs/openssl + snmp? ( net-analyzer/net-snmp )" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.30" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-backup-daemon.patch +) + +DOCS=( README CONTRIBUTORS INSTALL VERSION ChangeLog AUTHOR TODO + doc/keepalived.conf.SYNOPSIS doc/NOTE_vrrp_vmac.txt ) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + STRIP=/bin/true \ + econf \ + --with-kernel-dir=/usr \ + --enable-vrrp \ + $(use_enable debug) \ + $(use_enable snmp) +} + +src_install() { + default + + newinitd "${FILESDIR}"/keepalived.init keepalived + newconfd "${FILESDIR}"/keepalived.confd keepalived + + use snmp && dodoc doc/KEEPALIVED-MIB + + docinto genhash + dodoc genhash/README genhash/AUTHOR genhash/ChangeLog genhash/VERSION || die + # This was badly named by upstream, it's more HOWTO than anything else. + newdoc INSTALL INSTALL+HOWTO + + # Security risk to bundle SSL certs + rm -f "${ED}"/etc/keepalived/samples/*.pem + # Clean up sysvinit files + rm -rf "${ED}"/etc/sysconfig "${ED}"/etc/rc.d/ +} diff --git a/sys-cluster/keepalived/keepalived-1.2.18.ebuild b/sys-cluster/keepalived/keepalived-1.2.18.ebuild new file mode 100644 index 000000000000..e7a8323d492d --- /dev/null +++ b/sys-cluster/keepalived/keepalived-1.2.18.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools base + +DESCRIPTION="A strong & robust keepalive facility to the Linux Virtual Server project" +HOMEPAGE="http://www.keepalived.org/" +SRC_URI="http://www.keepalived.org/software/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="debug ipv6 snmp" + +RDEPEND="dev-libs/popt + sys-apps/iproute2 + dev-libs/libnl + dev-libs/openssl + snmp? ( net-analyzer/net-snmp )" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.30" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-backup-daemon.patch +) + +DOCS=( README CONTRIBUTORS INSTALL VERSION ChangeLog AUTHOR TODO + doc/keepalived.conf.SYNOPSIS doc/NOTE_vrrp_vmac.txt ) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + STRIP=/bin/true \ + econf \ + --with-kernel-dir=/usr \ + --enable-vrrp \ + $(use_enable debug) \ + $(use_enable snmp) +} + +src_install() { + default + + newinitd "${FILESDIR}"/keepalived.init keepalived + newconfd "${FILESDIR}"/keepalived.confd keepalived + + use snmp && dodoc doc/KEEPALIVED-MIB + + docinto genhash + dodoc genhash/README genhash/AUTHOR genhash/ChangeLog genhash/VERSION || die + # This was badly named by upstream, it's more HOWTO than anything else. + newdoc INSTALL INSTALL+HOWTO + + # Security risk to bundle SSL certs + rm -f "${ED}"/etc/keepalived/samples/*.pem + # Clean up sysvinit files + rm -rf "${ED}"/etc/sysconfig "${ED}"/etc/rc.d/ +} diff --git a/sys-cluster/keepalived/keepalived-1.2.19.ebuild b/sys-cluster/keepalived/keepalived-1.2.19.ebuild new file mode 100644 index 000000000000..e7a8323d492d --- /dev/null +++ b/sys-cluster/keepalived/keepalived-1.2.19.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools base + +DESCRIPTION="A strong & robust keepalive facility to the Linux Virtual Server project" +HOMEPAGE="http://www.keepalived.org/" +SRC_URI="http://www.keepalived.org/software/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="debug ipv6 snmp" + +RDEPEND="dev-libs/popt + sys-apps/iproute2 + dev-libs/libnl + dev-libs/openssl + snmp? ( net-analyzer/net-snmp )" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.30" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-backup-daemon.patch +) + +DOCS=( README CONTRIBUTORS INSTALL VERSION ChangeLog AUTHOR TODO + doc/keepalived.conf.SYNOPSIS doc/NOTE_vrrp_vmac.txt ) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + STRIP=/bin/true \ + econf \ + --with-kernel-dir=/usr \ + --enable-vrrp \ + $(use_enable debug) \ + $(use_enable snmp) +} + +src_install() { + default + + newinitd "${FILESDIR}"/keepalived.init keepalived + newconfd "${FILESDIR}"/keepalived.confd keepalived + + use snmp && dodoc doc/KEEPALIVED-MIB + + docinto genhash + dodoc genhash/README genhash/AUTHOR genhash/ChangeLog genhash/VERSION || die + # This was badly named by upstream, it's more HOWTO than anything else. + newdoc INSTALL INSTALL+HOWTO + + # Security risk to bundle SSL certs + rm -f "${ED}"/etc/keepalived/samples/*.pem + # Clean up sysvinit files + rm -rf "${ED}"/etc/sysconfig "${ED}"/etc/rc.d/ +} diff --git a/sys-cluster/keepalived/keepalived-1.2.2-r4.ebuild b/sys-cluster/keepalived/keepalived-1.2.2-r4.ebuild new file mode 100644 index 000000000000..0e6cdfd809a4 --- /dev/null +++ b/sys-cluster/keepalived/keepalived-1.2.2-r4.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools base + +DESCRIPTION="A strong & robust keepalive facility to the Linux Virtual Server project" +HOMEPAGE="http://www.keepalived.org/" +DEBIAN_PATCH=3 +DEBIAN_A="${P/-/_}-${DEBIAN_PATCH}.diff.gz" +SRC_URI="http://www.keepalived.org/software/${P}.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${DEBIAN_A}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 s390 sparc x86" +IUSE="debug ipv6" + +RDEPEND="dev-libs/popt + sys-apps/iproute2 + dev-libs/libnl:1.1 + dev-libs/openssl" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.30" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.20-do-not-need-kernel-sources.patch + "${FILESDIR}"/${PN}-1.2.2-bind-afunspec.patch + "${FILESDIR}"/${PN}-1.2.2-fix-ipv4-addr-compare.patch + "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-backup-daemon.patch +) + +DOCS=( README CONTRIBUTORS INSTALL VERSION ChangeLog AUTHOR TODO doc/keepalived.conf.SYNOPSIS ) + +src_prepare() { + base_src_prepare + EPATCH_OPTS="-p1" epatch "${DISTDIR}"/"${DEBIAN_A}" + epatch "${S}"/debian/patches/*patch + use ipv6 && epatch "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-ipv6.patch + eautoreconf +} + +src_configure() { + STRIP=/bin/true \ + econf \ + --enable-vrrp \ + $(use_enable debug) +} + +src_install() { + default + + newinitd "${FILESDIR}"/init-keepalived keepalived + newconfd "${FILESDIR}"/conf-keepalived keepalived + + docinto genhash + dodoc genhash/README genhash/AUTHOR genhash/ChangeLog genhash/VERSION || die + # This was badly named by upstream, it's more HOWTO than anything else. + newdoc INSTALL INSTALL+HOWTO + + # Security risk to bundle SSL certs + rm -f "${ED}"/etc/keepalived/samples/*.pem + # Clean up sysvinit files + rm -rf "${ED}"/etc/sysconfig "${ED}"/etc/rc.d/ +} diff --git a/sys-cluster/keepalived/keepalived-1.2.9.ebuild b/sys-cluster/keepalived/keepalived-1.2.9.ebuild new file mode 100644 index 000000000000..86dc8f2652f9 --- /dev/null +++ b/sys-cluster/keepalived/keepalived-1.2.9.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools base + +DESCRIPTION="A strong & robust keepalive facility to the Linux Virtual Server project" +HOMEPAGE="http://www.keepalived.org/" +SRC_URI="http://www.keepalived.org/software/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ~ppc ~ppc64 ~s390 sparc x86" +IUSE="debug ipv6 snmp" + +RDEPEND="dev-libs/popt + sys-apps/iproute2 + dev-libs/libnl:1.1 + dev-libs/openssl + snmp? ( net-analyzer/net-snmp )" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.30" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-backup-daemon.patch + "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-ipv6.patch +) + +DOCS=( README CONTRIBUTORS INSTALL VERSION ChangeLog AUTHOR TODO + doc/keepalived.conf.SYNOPSIS doc/NOTE_vrrp_vmac.txt ) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + STRIP=/bin/true \ + econf \ + --with-kernel-dir=/usr \ + --enable-vrrp \ + $(use_enable debug) \ + $(use_enable snmp) +} + +src_install() { + default + + newinitd "${FILESDIR}"/keepalived.init keepalived + newconfd "${FILESDIR}"/keepalived.confd keepalived + + use snmp && dodoc doc/KEEPALIVED-MIB + + docinto genhash + dodoc genhash/README genhash/AUTHOR genhash/ChangeLog genhash/VERSION || die + # This was badly named by upstream, it's more HOWTO than anything else. + newdoc INSTALL INSTALL+HOWTO + + # Security risk to bundle SSL certs + rm -f "${ED}"/etc/keepalived/samples/*.pem + # Clean up sysvinit files + rm -rf "${ED}"/etc/sysconfig "${ED}"/etc/rc.d/ +} diff --git a/sys-cluster/keepalived/metadata.xml b/sys-cluster/keepalived/metadata.xml new file mode 100644 index 000000000000..9baee71ae0a4 --- /dev/null +++ b/sys-cluster/keepalived/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> + <longdescription> + VRRP2 implementation. Used for setting up high availability clusters. + </longdescription> +</pkgmetadata> diff --git a/sys-cluster/knem/Manifest b/sys-cluster/knem/Manifest new file mode 100644 index 000000000000..fdb9c2a8040c --- /dev/null +++ b/sys-cluster/knem/Manifest @@ -0,0 +1 @@ +DIST knem-1.1.1.tar.gz 321401 SHA256 4bfbb4c237022cfebbe6b80c9d181252ee3a09cd42bc9dd1e90a81575fbbbef6 SHA512 6b53748df8ffcfa400870657d5c121f51e132d2b724bca832b00d7c16c546299d1dd29739fe1d4b00cc33010558ae584e7c0078de2c56d8ea92ce7880b4bfedc WHIRLPOOL 74908664d734d880082e35ec5707887dd17745b0edc161926906fcab9767bdc59d98bd710463188a6d73da781265d8ab83a8dd15beae57058455e734480a46d5 diff --git a/sys-cluster/knem/files/45-knem.rules b/sys-cluster/knem/files/45-knem.rules new file mode 100644 index 000000000000..1b87b1eb7a64 --- /dev/null +++ b/sys-cluster/knem/files/45-knem.rules @@ -0,0 +1 @@ +KERNEL=="knem", MODE="0666" diff --git a/sys-cluster/knem/knem-1.1.1.ebuild b/sys-cluster/knem/knem-1.1.1.ebuild new file mode 100644 index 000000000000..846b974924eb --- /dev/null +++ b/sys-cluster/knem/knem-1.1.1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools linux-mod linux-info toolchain-funcs udev multilib + +DESCRIPTION="High-Performance Intra-Node MPI Communication" +HOMEPAGE="http://runtime.bordeaux.inria.fr/knem/" +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://gforge.inria.fr/git/knem/knem.git" + inherit git-2 + KEYWORDS="" +else + SRC_URI="http://runtime.bordeaux.inria.fr/knem/download/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +IUSE="debug modules" + +DEPEND=" + sys-apps/hwloc + virtual/linux-sources" +RDEPEND=" + sys-apps/hwloc + virtual/modutils" + +MODULE_NAMES="knem(misc:${S}/driver/linux)" +BUILD_TARGETS="all" +BUILD_PARAMS="KDIR=${KERNEL_DIR}" + +pkg_setup() { + linux-info_pkg_setup + linux-mod_pkg_setup + ARCH="$(tc-arch-kernel)" + ABI="${KERNEL_ABI}" +} + +src_prepare() { + sed 's:driver/linux::g' -i Makefile.am + eautoreconf +} + +src_configure() { + econf \ + --enable-hwloc \ + --with-linux="${KERNEL_DIR}" \ + --with-linux-release=${KV_FULL} \ + $(use_enable debug) +} + +src_compile() { + default + if use modules; then + cd "${S}/driver/linux" + linux-mod_src_compile || die "failed to build driver" + fi +} + +src_install() { + default + if use modules; then + cd "${S}/driver/linux" + linux-mod_src_install || die "failed to install driver" + fi + + # Drop funny unneded stuff + rm "${ED}/usr/sbin/knem_local_install" || die + rmdir "${ED}/usr/sbin" || die + # install udev rules + udev_dorules "${FILESDIR}/45-knem.rules" + rm "${ED}/etc/10-knem.rules" || die +} diff --git a/sys-cluster/knem/knem-9999.ebuild b/sys-cluster/knem/knem-9999.ebuild new file mode 100644 index 000000000000..846b974924eb --- /dev/null +++ b/sys-cluster/knem/knem-9999.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools linux-mod linux-info toolchain-funcs udev multilib + +DESCRIPTION="High-Performance Intra-Node MPI Communication" +HOMEPAGE="http://runtime.bordeaux.inria.fr/knem/" +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://gforge.inria.fr/git/knem/knem.git" + inherit git-2 + KEYWORDS="" +else + SRC_URI="http://runtime.bordeaux.inria.fr/knem/download/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +IUSE="debug modules" + +DEPEND=" + sys-apps/hwloc + virtual/linux-sources" +RDEPEND=" + sys-apps/hwloc + virtual/modutils" + +MODULE_NAMES="knem(misc:${S}/driver/linux)" +BUILD_TARGETS="all" +BUILD_PARAMS="KDIR=${KERNEL_DIR}" + +pkg_setup() { + linux-info_pkg_setup + linux-mod_pkg_setup + ARCH="$(tc-arch-kernel)" + ABI="${KERNEL_ABI}" +} + +src_prepare() { + sed 's:driver/linux::g' -i Makefile.am + eautoreconf +} + +src_configure() { + econf \ + --enable-hwloc \ + --with-linux="${KERNEL_DIR}" \ + --with-linux-release=${KV_FULL} \ + $(use_enable debug) +} + +src_compile() { + default + if use modules; then + cd "${S}/driver/linux" + linux-mod_src_compile || die "failed to build driver" + fi +} + +src_install() { + default + if use modules; then + cd "${S}/driver/linux" + linux-mod_src_install || die "failed to install driver" + fi + + # Drop funny unneded stuff + rm "${ED}/usr/sbin/knem_local_install" || die + rmdir "${ED}/usr/sbin" || die + # install udev rules + udev_dorules "${FILESDIR}/45-knem.rules" + rm "${ED}/etc/10-knem.rules" || die +} diff --git a/sys-cluster/knem/metadata.xml b/sys-cluster/knem/metadata.xml new file mode 100644 index 000000000000..a64f2d240d92 --- /dev/null +++ b/sys-cluster/knem/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>cluster</herd> + <maintainer> + <email>alexxy@gentoo.org</email> + <name>Alexey Shvetsov</name> + </maintainer> +</pkgmetadata> diff --git a/sys-cluster/libccs-perl/Manifest b/sys-cluster/libccs-perl/Manifest new file mode 100644 index 000000000000..6d49e1e8dd23 --- /dev/null +++ b/sys-cluster/libccs-perl/Manifest @@ -0,0 +1 @@ +DIST cluster-3.1.5.tar.gz 651449 RMD160 c12dbf38c3e24cbdac23dbfdce6cb96da5c722ff SHA1 884d153ad9545d8abd225744dff5a905e19a6702 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e diff --git a/sys-cluster/libccs-perl/libccs-perl-3.1.5.ebuild b/sys-cluster/libccs-perl/libccs-perl-3.1.5.ebuild new file mode 100644 index 000000000000..560e4afba7cc --- /dev/null +++ b/sys-cluster/libccs-perl/libccs-perl-3.1.5.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit linux-info versionator + +CLUSTER_RELEASE="${PV}" +MY_P="cluster-${CLUSTER_RELEASE}" + +MAJ_PV="$(get_major_version)" +MIN_PV="$(get_version_component_range 2-3)" + +DESCRIPTION="Cluster Configuration System Library Perl-Bindings" +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 ~x86" +IUSE="" + +RDEPEND="sys-cluster/libccs" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}/bindings/perl" + +src_configure() { + 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" \ + --ccslibdir=/usr/$(get_libdir) \ + --ccsincdir=/usr/include \ + || die "configure problem" +} diff --git a/sys-cluster/libccs-perl/metadata.xml b/sys-cluster/libccs-perl/metadata.xml new file mode 100644 index 000000000000..8f013ae296ea --- /dev/null +++ b/sys-cluster/libccs-perl/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 Configuration System Library Perl-Bindings</longdescription> +</pkgmetadata> diff --git a/sys-cluster/libccs/Manifest b/sys-cluster/libccs/Manifest new file mode 100644 index 000000000000..0177b1bf0c34 --- /dev/null +++ b/sys-cluster/libccs/Manifest @@ -0,0 +1,2 @@ +DIST cluster-3.1.5.tar.gz 651449 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e SHA512 692888ed55c6bb7ebf3b3e792ec071b5fcff4c35c181c5b0c9296e8222c62e10f8a6344af391fbae8186b39cb31e674632bde77ebcc1fcab758657ae4264634a WHIRLPOOL 9d511effd14f9644dea11d1aba22878846beaa6bad4686358ad552c918c2cb72bc5a59605ad2dd576f626ea95f48c9d6b0b8c79f75eb4a721f65b8a60d0728cf +DIST cluster-3.2.0.tar.gz 688411 SHA256 96651381645cde0e32b06f83e180b1664232a5c589c72f06206e0539e0036cfb SHA512 00620b89564c4f9b67b679695749cd7515f49af43ace6a565e32e020ee66db219f3db3f53420d6460ea8c1cab03258305735fe5db81aab3953777015119533e9 WHIRLPOOL cc468ac8e879dadc157d585b22615d6ffcf0b38a5c93196f8aa9564467e8b8aae6c2688faa9d9e8a98e68a605b86d84b6a79edb474d0cde231e5a78729ebb4e4 diff --git a/sys-cluster/libccs/libccs-3.1.5.ebuild b/sys-cluster/libccs/libccs-3.1.5.ebuild new file mode 100644 index 000000000000..c5d73c51a655 --- /dev/null +++ b/sys-cluster/libccs/libccs-3.1.5.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 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 Configuration System Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +RDEPEND=" + =sys-cluster/corosync-1.4.7 + dev-libs/libxml2 + !sys-cluster/ccs" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}/config/libs" + +src_configure() { + 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" \ + --ccslibdir=/usr/$(get_libdir) \ + --ccsincdir=/usr/include \ + || die "configure problem" +} + +src_install() { + default + use static-libs || rm -f "${D}"/usr/lib*/*.a +} diff --git a/sys-cluster/libccs/libccs-3.2.0.ebuild b/sys-cluster/libccs/libccs-3.2.0.ebuild new file mode 100644 index 000000000000..c5d73c51a655 --- /dev/null +++ b/sys-cluster/libccs/libccs-3.2.0.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 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 Configuration System Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +RDEPEND=" + =sys-cluster/corosync-1.4.7 + dev-libs/libxml2 + !sys-cluster/ccs" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}/config/libs" + +src_configure() { + 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" \ + --ccslibdir=/usr/$(get_libdir) \ + --ccsincdir=/usr/include \ + || die "configure problem" +} + +src_install() { + default + use static-libs || rm -f "${D}"/usr/lib*/*.a +} diff --git a/sys-cluster/libccs/metadata.xml b/sys-cluster/libccs/metadata.xml new file mode 100644 index 000000000000..70d5e9131e5e --- /dev/null +++ b/sys-cluster/libccs/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 Configuration System Library</longdescription> +</pkgmetadata> diff --git a/sys-cluster/libcircle/Manifest b/sys-cluster/libcircle/Manifest new file mode 100644 index 000000000000..28bac28f1192 --- /dev/null +++ b/sys-cluster/libcircle/Manifest @@ -0,0 +1 @@ +DIST libcircle-0.2.0_rc1.tar.gz 351901 SHA256 59ed75c0bdf2b24f96fbc0230848a5aab57d4eab5a68895489d59a7f68ddd2ee SHA512 1ce07ae012c281fe3e6fbae29bf48e1079768ed5f92f9375c3be02880bed1b1feee6630b31560d7129f76640990e94da1753f55b11a0a8977adaaf9e51144044 WHIRLPOOL 984713d28ee80f686daea7d419a1135360bcda542f904a1aa4ea0ef03b87482e60c2c0858a9e6fd85d7bde1ef557bd61c717ba924f942dfd82d7cbeb9a2e0359 diff --git a/sys-cluster/libcircle/libcircle-0.2.0_rc1.ebuild b/sys-cluster/libcircle/libcircle-0.2.0_rc1.ebuild new file mode 100644 index 000000000000..3dd4c2759e35 --- /dev/null +++ b/sys-cluster/libcircle/libcircle-0.2.0_rc1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools-utils + +if [ "${PV}" = "9999" ]; then + EGIT_REPO_URI="git://github.com/hpc/${PN}.git http://github.com/hpc/${PN}.git" + inherit git-2 + KEYWORDS="" +else + inherit vcs-snapshot + SRC_URI="https://github.com/hpc/${PN}/archive/${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86 ~amd64-linux" +fi + +DESCRIPTION="an API for distributing embarrassingly parallel workloads using self-stabilization" +HOMEPAGE="https://github.com/hpc/libcircle" + +SLOT="0" +LICENSE="BSD" +IUSE="doc test" + +RDEPEND="virtual/mpi" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + test? ( dev-libs/check )" + +DOCS=( HACKING.md README.md ) + +src_configure() { + local myeconfargs=( + $(use_enable test tests) + $(use_enable doc doxygen) + ) + autotools-utils_src_configure +} + +src_install() { + use doc && HTML_DOCS=( "${BUILD_DIR}/doc/html/" ) + autotools-utils_src_install +} diff --git a/sys-cluster/libcircle/metadata.xml b/sys-cluster/libcircle/metadata.xml new file mode 100644 index 000000000000..b3a83b96a3a2 --- /dev/null +++ b/sys-cluster/libcircle/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cluster</herd> + <maintainer> + <email>ottxor@gentoo.org</email> + <name>Christoph Junghans</name> + </maintainer> + <upstream> + <remote-id type="github">hpc/libcircle</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/libcman/Manifest b/sys-cluster/libcman/Manifest new file mode 100644 index 000000000000..0e8513fbb082 --- /dev/null +++ b/sys-cluster/libcman/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/libcman/libcman-3.1.5.ebuild b/sys-cluster/libcman/libcman-3.1.5.ebuild new file mode 100644 index 000000000000..f570f8425f02 --- /dev/null +++ b/sys-cluster/libcman/libcman-3.1.5.ebuild @@ -0,0 +1,47 @@ +# 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 Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +DEPEND=">=sys-kernel/linux-headers-2.6.24" +RDEPEND="!sys-cluster/cman-lib" + +S="${WORKDIR}/${MY_P}/cman/lib" + +src_configure() { + 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 failed" +} + +src_install() { + default + use static-libs || rm -f "${D}"/usr/lib*/*.a +} diff --git a/sys-cluster/libcman/libcman-3.2.0.ebuild b/sys-cluster/libcman/libcman-3.2.0.ebuild new file mode 100644 index 000000000000..058dec9d07f2 --- /dev/null +++ b/sys-cluster/libcman/libcman-3.2.0.ebuild @@ -0,0 +1,47 @@ +# 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 Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +DEPEND=">=sys-kernel/linux-headers-2.6.24" +RDEPEND="!sys-cluster/cman-lib" + +S="${WORKDIR}/${MY_P}/cman/lib" + +src_configure() { + 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 failed" +} + +src_install() { + default + use static-libs || rm -f "${D}"/usr/lib*/*.a +} diff --git a/sys-cluster/libcman/metadata.xml b/sys-cluster/libcman/metadata.xml new file mode 100644 index 000000000000..db8831ecb877 --- /dev/null +++ b/sys-cluster/libcman/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 Library</longdescription> +</pkgmetadata> diff --git a/sys-cluster/libdlm/Manifest b/sys-cluster/libdlm/Manifest new file mode 100644 index 000000000000..0177b1bf0c34 --- /dev/null +++ b/sys-cluster/libdlm/Manifest @@ -0,0 +1,2 @@ +DIST cluster-3.1.5.tar.gz 651449 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e SHA512 692888ed55c6bb7ebf3b3e792ec071b5fcff4c35c181c5b0c9296e8222c62e10f8a6344af391fbae8186b39cb31e674632bde77ebcc1fcab758657ae4264634a WHIRLPOOL 9d511effd14f9644dea11d1aba22878846beaa6bad4686358ad552c918c2cb72bc5a59605ad2dd576f626ea95f48c9d6b0b8c79f75eb4a721f65b8a60d0728cf +DIST cluster-3.2.0.tar.gz 688411 SHA256 96651381645cde0e32b06f83e180b1664232a5c589c72f06206e0539e0036cfb SHA512 00620b89564c4f9b67b679695749cd7515f49af43ace6a565e32e020ee66db219f3db3f53420d6460ea8c1cab03258305735fe5db81aab3953777015119533e9 WHIRLPOOL cc468ac8e879dadc157d585b22615d6ffcf0b38a5c93196f8aa9564467e8b8aae6c2688faa9d9e8a98e68a605b86d84b6a79edb474d0cde231e5a78729ebb4e4 diff --git a/sys-cluster/libdlm/libdlm-3.1.5.ebuild b/sys-cluster/libdlm/libdlm-3.1.5.ebuild new file mode 100644 index 000000000000..66fc618a03e5 --- /dev/null +++ b/sys-cluster/libdlm/libdlm-3.1.5.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit 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="General-purpose Distributed Lock Manager Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +RDEPEND=" + !sys-cluster/dlm-headers + !sys-cluster/dlm-kernel + !sys-cluster/dlm-lib" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.24" + +S=${WORKDIR}/${MY_P}/dlm + +src_configure() { + cd "${WORKDIR}/${MY_P}" + ./configure \ + --cc=$(tc-getCC) \ + --cflags="-Wall" \ + --libdir=/usr/$(get_libdir) \ + --disable_kernel_check \ + --kernel_src=/usr/ \ + --somajor="$MAJ_PV" \ + --sominor="$MIN_PV" \ + --dlmlibdir=/usr/$(get_libdir) \ + --dlmincdir=/usr/include \ + --dlmcontrollibdir=/usr/$(get_libdir) \ + --dlmcontrolincdir=/usr/include \ + || die "configure problem" +} + +src_compile() { + for i in libdlm libdlmcontrol; do + emake -C ${i} + done +} + +src_install() { + for i in libdlm libdlmcontrol; do + emake DESTDIR="${D}" -C ${i} install + done + use static-libs || rm -f "${D}"/usr/lib*/*.a + doman man/libdlm.3 + dodoc doc/{libdlm.txt,example.c,user-dlm-overview.txt} +} diff --git a/sys-cluster/libdlm/libdlm-3.2.0.ebuild b/sys-cluster/libdlm/libdlm-3.2.0.ebuild new file mode 100644 index 000000000000..ba96c34d8a4a --- /dev/null +++ b/sys-cluster/libdlm/libdlm-3.2.0.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit 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="General-purpose Distributed Lock Manager Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +RDEPEND=" + !sys-cluster/dlm-headers + !sys-cluster/dlm-kernel + !sys-cluster/dlm-lib" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}/dlm" + +src_prepare() { + sed -i \ + -e "s|/lib|/$(get_libdir)|g" \ + "${WORKDIR}/${MY_P}/make/install.mk" || die "sed failed" +} + +src_configure() { + cd "${WORKDIR}/${MY_P}" + ./configure \ + --cc=$(tc-getCC) \ + --cflags="-Wall" \ + --libdir=/usr/$(get_libdir) \ + --disable_kernel_check \ + --kernel_src=/usr/ \ + --somajor="$MAJ_PV" \ + --sominor="$MIN_PV" \ + --dlmlibdir=/usr/$(get_libdir) \ + --dlmincdir=/usr/include \ + --dlmcontrollibdir=/usr/$(get_libdir) \ + --dlmcontrolincdir=/usr/include \ + || die "configure problem" +} + +src_compile() { + for i in libdlm libdlmcontrol; do + emake -C ${i} + done +} + +src_install() { + for i in libdlm libdlmcontrol; do + emake DESTDIR="${D}" -C ${i} install + done + mv "${D}"/$(get_libdir) "${D}"/lib + use static-libs || rm -f "${D}"/usr/lib*/*.a + doman man/libdlm.3 + dodoc doc/{libdlm.txt,example.c,user-dlm-overview.txt} +} diff --git a/sys-cluster/libdlm/metadata.xml b/sys-cluster/libdlm/metadata.xml new file mode 100644 index 000000000000..3bc3e23c0cf2 --- /dev/null +++ b/sys-cluster/libdlm/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>General-purpose Distributed Lock Manager Library</longdescription> +</pkgmetadata> diff --git a/sys-cluster/libfence/Manifest b/sys-cluster/libfence/Manifest new file mode 100644 index 000000000000..0177b1bf0c34 --- /dev/null +++ b/sys-cluster/libfence/Manifest @@ -0,0 +1,2 @@ +DIST cluster-3.1.5.tar.gz 651449 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e SHA512 692888ed55c6bb7ebf3b3e792ec071b5fcff4c35c181c5b0c9296e8222c62e10f8a6344af391fbae8186b39cb31e674632bde77ebcc1fcab758657ae4264634a WHIRLPOOL 9d511effd14f9644dea11d1aba22878846beaa6bad4686358ad552c918c2cb72bc5a59605ad2dd576f626ea95f48c9d6b0b8c79f75eb4a721f65b8a60d0728cf +DIST cluster-3.2.0.tar.gz 688411 SHA256 96651381645cde0e32b06f83e180b1664232a5c589c72f06206e0539e0036cfb SHA512 00620b89564c4f9b67b679695749cd7515f49af43ace6a565e32e020ee66db219f3db3f53420d6460ea8c1cab03258305735fe5db81aab3953777015119533e9 WHIRLPOOL cc468ac8e879dadc157d585b22615d6ffcf0b38a5c93196f8aa9564467e8b8aae6c2688faa9d9e8a98e68a605b86d84b6a79edb474d0cde231e5a78729ebb4e4 diff --git a/sys-cluster/libfence/libfence-3.1.5.ebuild b/sys-cluster/libfence/libfence-3.1.5.ebuild new file mode 100644 index 000000000000..709fb9e4d987 --- /dev/null +++ b/sys-cluster/libfence/libfence-3.1.5.ebuild @@ -0,0 +1,60 @@ +# 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 Fencing Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +RDEPEND="~sys-cluster/libccs-${PV}" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}/fence" + +src_configure() { + 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" \ + --fencelibdir=/usr/$(get_libdir) \ + --fenceincdir=/usr/include \ + --fencedlibdir=/usr/$(get_libdir) \ + --fencedincdir=/usr/include \ + --ccslibdir=/usr/$(get_libdir) \ + --ccsincdir=/usr/include \ + || die "configure problem" +} + +src_compile() { + for i in libfence libfenced; do + emake -C ${i} + done +} + +src_install() { + for i in libfence libfenced; do + emake DESTDIR="${D}" -C ${i} install + done + use static-libs || rm -f "${D}"/usr/lib*/*.a +} diff --git a/sys-cluster/libfence/libfence-3.2.0.ebuild b/sys-cluster/libfence/libfence-3.2.0.ebuild new file mode 100644 index 000000000000..d8f1651a6c7f --- /dev/null +++ b/sys-cluster/libfence/libfence-3.2.0.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2013 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 Fencing Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +RDEPEND="~sys-cluster/libccs-${PV}" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}/fence" + +src_configure() { + 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" \ + --fencelibdir=/usr/$(get_libdir) \ + --fenceincdir=/usr/include \ + --fencedlibdir=/usr/$(get_libdir) \ + --fencedincdir=/usr/include \ + --ccslibdir=/usr/$(get_libdir) \ + --ccsincdir=/usr/include \ + || die "configure problem" +} + +src_compile() { + for i in libfence libfenced; do + emake -C ${i} + done +} + +src_install() { + for i in libfence libfenced; do + emake DESTDIR="${D}" -C ${i} install + done + use static-libs || rm -f "${D}"/usr/lib*/*.a +} diff --git a/sys-cluster/libfence/metadata.xml b/sys-cluster/libfence/metadata.xml new file mode 100644 index 000000000000..306b9dcf4bcd --- /dev/null +++ b/sys-cluster/libfence/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 Library</longdescription> +</pkgmetadata> diff --git a/sys-cluster/liblogthread/Manifest b/sys-cluster/liblogthread/Manifest new file mode 100644 index 000000000000..0177b1bf0c34 --- /dev/null +++ b/sys-cluster/liblogthread/Manifest @@ -0,0 +1,2 @@ +DIST cluster-3.1.5.tar.gz 651449 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e SHA512 692888ed55c6bb7ebf3b3e792ec071b5fcff4c35c181c5b0c9296e8222c62e10f8a6344af391fbae8186b39cb31e674632bde77ebcc1fcab758657ae4264634a WHIRLPOOL 9d511effd14f9644dea11d1aba22878846beaa6bad4686358ad552c918c2cb72bc5a59605ad2dd576f626ea95f48c9d6b0b8c79f75eb4a721f65b8a60d0728cf +DIST cluster-3.2.0.tar.gz 688411 SHA256 96651381645cde0e32b06f83e180b1664232a5c589c72f06206e0539e0036cfb SHA512 00620b89564c4f9b67b679695749cd7515f49af43ace6a565e32e020ee66db219f3db3f53420d6460ea8c1cab03258305735fe5db81aab3953777015119533e9 WHIRLPOOL cc468ac8e879dadc157d585b22615d6ffcf0b38a5c93196f8aa9564467e8b8aae6c2688faa9d9e8a98e68a605b86d84b6a79edb474d0cde231e5a78729ebb4e4 diff --git a/sys-cluster/liblogthread/liblogthread-3.1.5.ebuild b/sys-cluster/liblogthread/liblogthread-3.1.5.ebuild new file mode 100644 index 000000000000..bdc39a2c16ec --- /dev/null +++ b/sys-cluster/liblogthread/liblogthread-3.1.5.ebuild @@ -0,0 +1,47 @@ +# 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="Thread-Safe Syslog Logging Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +RDEPEND="" +DEPEND=">=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}/common/${PN}" + +src_configure() { + 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" \ + --logtlibdir=/usr/$(get_libdir) \ + --logtincdir=/usr/include \ + || die "configure problem" +} + +src_install() { + default + use static-libs || rm -f "${D}"/usr/lib*/*.a +} diff --git a/sys-cluster/liblogthread/liblogthread-3.2.0.ebuild b/sys-cluster/liblogthread/liblogthread-3.2.0.ebuild new file mode 100644 index 000000000000..2bb7b6a74e86 --- /dev/null +++ b/sys-cluster/liblogthread/liblogthread-3.2.0.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2013 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="Thread-Safe Syslog Logging Library" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="static-libs" + +RDEPEND="" +DEPEND=">=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}/common/${PN}" + +src_configure() { + 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" \ + --logtlibdir=/usr/$(get_libdir) \ + --logtincdir=/usr/include \ + || die "configure problem" +} + +src_install() { + default + use static-libs || rm -f "${D}"/usr/lib*/*.a +} diff --git a/sys-cluster/liblogthread/metadata.xml b/sys-cluster/liblogthread/metadata.xml new file mode 100644 index 000000000000..cb158c07e52f --- /dev/null +++ b/sys-cluster/liblogthread/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>Thread-Safe Syslog Logging Library</longdescription> +</pkgmetadata> diff --git a/sys-cluster/libqb/Manifest b/sys-cluster/libqb/Manifest new file mode 100644 index 000000000000..3f0eecd810d2 --- /dev/null +++ b/sys-cluster/libqb/Manifest @@ -0,0 +1,5 @@ +DIST libqb-0.13.0.tar.xz 363096 SHA256 2d54c5cd33ee1b7a362ccbc8453f277fa3a350c5302428b24f83073f483a7f33 +DIST libqb-0.14.3.tar.xz 367956 SHA256 c1c80b47c9ad737690461a580ae49dac810743cf94d56dd1f36300c675b68186 SHA512 2494a815cee2ab7e3595e6aec00f3c4950628670e78abd223034414e8f58ac5dbba7b4825f6ad39fd5c68b6e3156e0dfe419ff99ad22782083bf111009cb2075 WHIRLPOOL 6ac42a0bdf70bad0376808922756a85ace5f1a106203a415eb3963de16426c21058824fc6458bb776c3c33bf17374b0612bbf712f2f68ddd0f30ee94c9f91b49 +DIST libqb-0.14.4.tar.xz 370336 SHA256 f518d146cdc6f820e9ed84d35cc3a447ea6fc51a6f2b6b3c2cb030d71eba0d7e SHA512 7437444f688f674fedb962309853418adc21e7aa6b0d3e639cef9e9453419e15535c078d77a7ac293b49adee1225093c15dbaccf44a367f4726e7f6f75ccd9b3 WHIRLPOOL 4d9b562fc6645955d875a39728c15acc593ade5e675961178e4dd7472949c902d6c437a6540da1bbf651ea9894f7de2c8d1f1580f0a4afb2b734f4fbed913266 +DIST libqb-0.17.0.tar.xz 384240 SHA256 555c5c43275f519d323a807652fad863c3528c2644b9b6e29cb9eafbda79d45a SHA512 97ca5e64788c0ec8d8afa14854d245fd0b3bdcfe144e0e3ee9d07d6672c5279d7a91bf647524047375745e28a674658dfb4814a1fbff3b45d538c57469ef31bb WHIRLPOOL c7fb543e928c11c463d6f25bc64e9f4963959d01c26ffd8d10571eeca2716cb360153845517a08e6abb61f40ca414b3efb2f84dfebd988b7dd501ea122f95cfb +DIST libqb-0.17.1.tar.xz 386304 SHA256 7a2115f83bfe20eaa5f2e4ed235e8f2994235d3b87e3e5ca41ba47b320f12e29 SHA512 9705b291a61ca278fd0c9ab631af2cb844cdfc73b19501dd2e12eb162b37f0eded800860127a8a5c5c7c2a0e8db53e4780d3ab9697b099f4560a9a87aa8ec9ca WHIRLPOOL 8b853fd6e26eca02605a49c5b9c0f97a41e98c5667dadd9a9c3ad36024ec1baacf764e40a774c83938d80ea686af61de0474c390337c16673f2abcbe983ec067 diff --git a/sys-cluster/libqb/libqb-0.13.0.ebuild b/sys-cluster/libqb/libqb-0.13.0.ebuild new file mode 100644 index 000000000000..3f128230d092 --- /dev/null +++ b/sys-cluster/libqb/libqb-0.13.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils + +DESCRIPTION="Library providing high performance logging, tracing, ipc, and poll" +HOMEPAGE="https://github.com/asalkeld/libqb" +SRC_URI="http://fedorahosted.org/releases/q/u/quarterback/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc examples static-libs test" + +RDEPEND="dev-libs/glib:2" +DEPEND="${RDEPEND} + app-arch/xz-utils + test? ( dev-libs/check ) + doc? ( app-doc/doxygen[dot] )" + +DOCS=(README.markdown ChangeLog) + +src_prepare() { + sed -e '/dist_doc_DATA/d' -i Makefile.am || die + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable debug) + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + use doc && autotools-utils_src_compile doxygen +} + +src_install() { + use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/docs/html/") + autotools-utils_src_install + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins examples/*.c + fi +} diff --git a/sys-cluster/libqb/libqb-0.14.3.ebuild b/sys-cluster/libqb/libqb-0.14.3.ebuild new file mode 100644 index 000000000000..c7d13ceaa4d4 --- /dev/null +++ b/sys-cluster/libqb/libqb-0.14.3.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils + +DESCRIPTION="Library providing high performance logging, tracing, ipc, and poll" +HOMEPAGE="https://github.com/asalkeld/libqb" +SRC_URI="http://fedorahosted.org/releases/q/u/quarterback/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="debug doc examples static-libs test" + +RDEPEND="dev-libs/glib:2" +DEPEND="${RDEPEND} + app-arch/xz-utils + test? ( dev-libs/check ) + doc? ( app-doc/doxygen[dot] )" + +DOCS=(README.markdown ChangeLog) + +src_prepare() { + sed -e '/dist_doc_DATA/d' -i Makefile.am || die + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable debug) + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + use doc && autotools-utils_src_compile doxygen +} + +src_install() { + use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/docs/html/") + autotools-utils_src_install + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins examples/*.c + fi +} diff --git a/sys-cluster/libqb/libqb-0.14.4.ebuild b/sys-cluster/libqb/libqb-0.14.4.ebuild new file mode 100644 index 000000000000..146081779c39 --- /dev/null +++ b/sys-cluster/libqb/libqb-0.14.4.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils + +DESCRIPTION="Library providing high performance logging, tracing, ipc, and poll" +HOMEPAGE="https://github.com/asalkeld/libqb" +SRC_URI="http://fedorahosted.org/releases/q/u/quarterback/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 hppa ~x86" +IUSE="debug doc examples static-libs test" + +RDEPEND="dev-libs/glib:2" +DEPEND="${RDEPEND} + app-arch/xz-utils + test? ( dev-libs/check ) + doc? ( app-doc/doxygen[dot] )" + +DOCS=(README.markdown ChangeLog) + +src_prepare() { + sed -e '/dist_doc_DATA/d' -i Makefile.am || die + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable debug) + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + use doc && autotools-utils_src_compile doxygen +} + +src_install() { + use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/docs/html/") + autotools-utils_src_install + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins examples/*.c + fi +} diff --git a/sys-cluster/libqb/libqb-0.17.0.ebuild b/sys-cluster/libqb/libqb-0.17.0.ebuild new file mode 100644 index 000000000000..2b3c7ec5b057 --- /dev/null +++ b/sys-cluster/libqb/libqb-0.17.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils + +DESCRIPTION="Library providing high performance logging, tracing, ipc, and poll" +HOMEPAGE="https://github.com/asalkeld/libqb" +SRC_URI="http://fedorahosted.org/releases/q/u/quarterback/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="debug doc examples static-libs test" + +RDEPEND="dev-libs/glib:2" +DEPEND="${RDEPEND} + app-arch/xz-utils + test? ( dev-libs/check ) + doc? ( app-doc/doxygen[dot] )" + +DOCS=(README.markdown ChangeLog) + +src_prepare() { + sed -e '/dist_doc_DATA/d' -i Makefile.am || die + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable debug) + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + use doc && autotools-utils_src_compile doxygen +} + +src_install() { + use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/docs/html/") + autotools-utils_src_install + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins examples/*.c + fi +} diff --git a/sys-cluster/libqb/libqb-0.17.1.ebuild b/sys-cluster/libqb/libqb-0.17.1.ebuild new file mode 100644 index 000000000000..02a8930a03ee --- /dev/null +++ b/sys-cluster/libqb/libqb-0.17.1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils + +DESCRIPTION="Library providing high performance logging, tracing, ipc, and poll" +HOMEPAGE="https://github.com/asalkeld/libqb" +SRC_URI="http://fedorahosted.org/releases/q/u/quarterback/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 hppa x86" +IUSE="debug doc examples static-libs test" + +RDEPEND="dev-libs/glib:2" +DEPEND="${RDEPEND} + app-arch/xz-utils + test? ( dev-libs/check ) + doc? ( app-doc/doxygen[dot] )" + +DOCS=(README.markdown ChangeLog) + +src_prepare() { + sed -e '/dist_doc_DATA/d' -i Makefile.am || die + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable debug) + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + use doc && autotools-utils_src_compile doxygen +} + +src_install() { + use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/docs/html/") + autotools-utils_src_install + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins examples/*.c + fi +} diff --git a/sys-cluster/libqb/metadata.xml b/sys-cluster/libqb/metadata.xml new file mode 100644 index 000000000000..c856cec9fa6a --- /dev/null +++ b/sys-cluster/libqb/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">asalkeld/libqb</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/libquo/Manifest b/sys-cluster/libquo/Manifest new file mode 100644 index 000000000000..63f28a215568 --- /dev/null +++ b/sys-cluster/libquo/Manifest @@ -0,0 +1,3 @@ +DIST libquo-1.2.2.tar.gz 711528 SHA256 fb1231bde16b5e669caf23f5bfed4c77643cd3d4ae2ae755cfe258610a70667a SHA512 1aad84e65ba9167656ba6ffd53859816ea396239781b51846992766be7d01e33af732ac9c2ddda5839ec518bf304b4882a73f884c714c6e8eb9dc6884a9a6b11 WHIRLPOOL c5d28ddebaf98912b7ee92ab9e765cbff91ad1a29b323babc9db2d534f4261127377906ffbf670a4e38e65b248d4a56c8435290f4b64f39aae7e27b3d6ebaeb7 +DIST libquo-1.2.3.tar.gz 727836 SHA256 8f359b6f9efe0d38d2a7b6999b801297d80cebbf74b30de7b124bccbd77ae04e SHA512 d937253f1444723631439a78e5533d9ce4c8772f04f7c3475fe48c63d0dd827d5d73c4a925efec614a36d1c9680e9d93d53617ac12c00fce65b922fa69cd8c5b WHIRLPOOL 4d35a9e806184051ae56fc5c8f1454e73fa4dfb96b181b13753ac09d8f654f7f1154ca8008514aea0fc2b46bad8011d6a27e022c9811eb852d4e6c78b6041951 +DIST libquo-1.2.tar.gz 710465 SHA256 accd7b5fd1d7118897d98929245b8a91baf3d00e477769df66322a7feeed352d SHA512 c9c087490c01af51f47490635dbf42d5433719931afbaa89dfe91bfe812e09e468649cf5a7703b6c3d5b0c0d6d6318731dcff4928a52017505f814750131c75b WHIRLPOOL a209676d6bc8d0b012e8797d5600ec812b35aeae06391b6f3cc5b7bac743198fc17726187d199988fb75e8c5a33706921982b35c8094dee6fef303e57fd5be96 diff --git a/sys-cluster/libquo/libquo-1.2.2.ebuild b/sys-cluster/libquo/libquo-1.2.2.ebuild new file mode 100644 index 000000000000..57ea650ee425 --- /dev/null +++ b/sys-cluster/libquo/libquo-1.2.2.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools-utils + +DESCRIPTION="run-time tuning of process binding policies made easy" +HOMEPAGE="http://losalamos.github.io/libquo/" +SRC_URI="http://losalamos.github.io/${PN}/dists/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="fortran" + +DEPEND=" + virtual/mpi[fortran?] + sys-process/numactl + sys-apps/hwloc[numa,xml] + " +RDEPEND="${DEPEND}" + +AUTOTOOLS_IN_SOURCE_BUILD=1 + +src_configure() { + autotools-utils_src_configure CC=mpicc FC=$(usex fortran mpif90 false) +} diff --git a/sys-cluster/libquo/libquo-1.2.3.ebuild b/sys-cluster/libquo/libquo-1.2.3.ebuild new file mode 100644 index 000000000000..59a780b2e769 --- /dev/null +++ b/sys-cluster/libquo/libquo-1.2.3.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools-utils + +if [ "${PV}" = "9999" ]; then + EGIT_REPO_URI="git://github.com/losalamos/${PN}.git http://github.com/losalamos/${PN}.git" + inherit git-r3 + KEYWORDS="" + AUTOTOOLS_AUTORECONF=1 +else + SRC_URI="http://losalamos.github.io/${PN}/dists/${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="run-time tuning of process binding policies made easy" +HOMEPAGE="http://losalamos.github.io/libquo/" + +LICENSE="BSD" +SLOT="0" +IUSE="fortran static-libs" + +DEPEND=" + virtual/mpi[fortran?] + sys-process/numactl + sys-apps/hwloc[numa,xml] + " +RDEPEND="${DEPEND}" + +src_configure() { + autotools-utils_src_configure CC=mpicc FC=$(usex fortran mpif90 false) +} diff --git a/sys-cluster/libquo/libquo-1.2.ebuild b/sys-cluster/libquo/libquo-1.2.ebuild new file mode 100644 index 000000000000..e188164f4c86 --- /dev/null +++ b/sys-cluster/libquo/libquo-1.2.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools-utils + +DESCRIPTION="run-time tuning of process binding policies made easy" +HOMEPAGE="http://losalamos.github.io/libquo/" +SRC_URI="http://losalamos.github.io/${PN}/dists/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=" + virtual/mpi + sys-process/numactl + sys-apps/hwloc[numa,xml] + " +RDEPEND="${DEPEND}" + +AUTOTOOLS_IN_SOURCE_BUILD=1 + +src_configure() { + autotools-utils_src_configure CC=mpicc +} diff --git a/sys-cluster/libquo/metadata.xml b/sys-cluster/libquo/metadata.xml new file mode 100644 index 000000000000..119d0fde1940 --- /dev/null +++ b/sys-cluster/libquo/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>ottxor@gentoo.org</email> + <name>Christoph Junghans</name> + </maintainer> +</pkgmetadata> diff --git a/sys-cluster/lspbs/Manifest b/sys-cluster/lspbs/Manifest new file mode 100644 index 000000000000..7c5a9fd104ab --- /dev/null +++ b/sys-cluster/lspbs/Manifest @@ -0,0 +1 @@ +DIST lspbs-1.1.tar.gz 69265 SHA256 c22a625578c57c60f2f6d0487b30801b8fce9641bc41603a8559ab3c35b7a9ab diff --git a/sys-cluster/lspbs/lspbs-1.1-r1.ebuild b/sys-cluster/lspbs/lspbs-1.1-r1.ebuild new file mode 100644 index 000000000000..a0d9d10f6b94 --- /dev/null +++ b/sys-cluster/lspbs/lspbs-1.1-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="Displays clear, concise and up-to-date PBS node and CPU usage information" +SRC_URI="http://homepages.inf.ed.ac.uk/s0239160/misc/lspbs/${P}.tar.gz" +HOMEPAGE="http://homepages.inf.ed.ac.uk/s0239160/misc/lspbs/lspbs.html" +IUSE="" + +DEPEND="sys-cluster/torque" +RDEPEND="${DEPEND}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~amd64 ~ppc" + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + + dodoc README || die "dodoc failed" + + doman "${D}"/usr/share/lspbs.1 || die "doman failed" + rm -f "${D}"/usr/share/lspbs.1 || die "failed to remove old man page" +} diff --git a/sys-cluster/lspbs/metadata.xml b/sys-cluster/lspbs/metadata.xml new file mode 100644 index 000000000000..1bd846251ce5 --- /dev/null +++ b/sys-cluster/lspbs/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>cluster</herd> + <herd>proxy-maintainers</herd> + <maintainer> + <email>j.spadavecchia@ed.ac.uk</email> + <name>Joseph Spadavecchia</name> + </maintainer> + <longdescription> + Lspbs is a lightweight alternative to the xpbsmon utility, which + is part of the OpenPBS package. It uses the color xterm to + display clear, concise and up-to-date node and CPU usage + information. Lspbs also supports unformatted printing and can + filter nodes by their properties and current state. This generic + filtering feature extends the simplistic functionality provided by + the pbsnodes utility, which is also part of the OpenPBS + package. This makes lspbs useful for managing PBS-based clusters. + </longdescription> +</pkgmetadata> diff --git a/sys-cluster/maui/Manifest b/sys-cluster/maui/Manifest new file mode 100644 index 000000000000..fefe35a83fb9 --- /dev/null +++ b/sys-cluster/maui/Manifest @@ -0,0 +1,4 @@ +DIST maui-3.2.6p16.tar.gz 900100 SHA256 6b86bd90f9e4339f22fc19e1396a0f4c4f453d0274d711373a993ae3d2bcfffb +DIST maui-3.2.6p21.tar.gz 990182 SHA256 929ffa51aa753f58bcc62de9876c23677895742f63511c2df4b0048b9353b27e +DIST maui-3.3.1.tar.gz 901179 SHA256 033a1ab40da69bc091ce5d01199ac599de0b6bbdfa404b9b1631ee964dc711a1 SHA512 e22a0f08b40d810792175b5bc15a53831e84eeab43ddc79ebc3e10a2d5c0b77a4634ff67975f9dae06fbb84f84cb3a95e9cbfcb8086734dbd41caee3359675b0 WHIRLPOOL 0d3bcb6284b852881b2ac4faf83abf7d8668db53e94938f82ba73e7f8f4ca9e5e3fbb698b984fd1d053ffa1514431bf18d958915e783045a94578767cd675bf6 +DIST maui-3.3.tar.gz 898673 SHA256 3135efd351f48654cb62b04fa2040fdbf76f873e728b4459bf833b4d549e1e42 diff --git a/sys-cluster/maui/files/3.2.6_p16-autoconf-2.60-compat.patch b/sys-cluster/maui/files/3.2.6_p16-autoconf-2.60-compat.patch new file mode 100644 index 000000000000..e22453dc0b1b --- /dev/null +++ b/sys-cluster/maui/files/3.2.6_p16-autoconf-2.60-compat.patch @@ -0,0 +1,17 @@ +--- maui-3.2.6p16.orig/Makefile.in 2006-05-23 15:20:49.000000000 -0700 ++++ maui-3.2.6p16/Makefile.in 2006-09-25 20:42:24.000000000 -0700 +@@ -18,7 +18,13 @@ + # ============================ + # Resource Manager section + # ============================ +-@ll_definitions@@sdr_definitions@@pbs_definitions@@sge_definitions@@lsf_definitions@@mx_definitions@@pcre_definitions@ ++@ll_definitions@ ++@sdr_definitions@ ++@pbs_definitions@ ++@sge_definitions@ ++@lsf_definitions@ ++@mx_definitions@ ++@pcre_definitions@ + + # ============================ + # Master Makefile for @PACKAGE_NAME@-@PACKAGE_VERSION@ diff --git a/sys-cluster/maui/files/3.2.6_p16-link-pbs-after-moab.patch b/sys-cluster/maui/files/3.2.6_p16-link-pbs-after-moab.patch new file mode 100644 index 000000000000..a4675abe304a --- /dev/null +++ b/sys-cluster/maui/files/3.2.6_p16-link-pbs-after-moab.patch @@ -0,0 +1,25 @@ +--- maui-3.2.6p16.orig/src/server/Makefile 2006-09-25 16:08:33.000000000 -0700 ++++ maui-3.2.6p16/src/server/Makefile 2006-09-25 21:12:47.000000000 -0700 +@@ -88,11 +88,11 @@ + $(CC) $(IP) $(DEFS) $(CFLAGS) $(SOURCE) -c $< + + $(SERVER): $(SOBJECTS) +- $(LD) $(SOBJECTS) -o $(BIN)/$@ $(LP) $(LIBS) $(OSLDFLAGS) ++ $(LD) $(SOBJECTS) -o $(BIN)/$@ $(LIBS) $(LP) $(OSLDFLAGS) + chmod 711 $(BIN)/$@ || true + + mclient: mclient.o +- $(LD) mclient.o -o $(BIN)/$@ $(OSLDFLAGS) $(LP) $(LIBS) ++ $(LD) mclient.o -o $(BIN)/$@ $(OSLDFLAGS) $(LIBS) $(LP) + chmod 751 $(BIN)/$@ + for i in $(MCLIENTS); do \ + ln -f $(BIN)/$@ $(BIN)/$$i; \ +@@ -100,7 +100,7 @@ + done + + mprof: $(POBJECTS) +- $(LD) $(POBJECTS) -o $(BIN)/$@ $(OSLDFLAGS) $(LP) $(LIBS) ++ $(LD) $(POBJECTS) -o $(BIN)/$@ $(OSLDFLAGS) $(LIBS) $(LP) + chmod 751 $(BIN)/$@ + + clean: diff --git a/sys-cluster/maui/files/3.2.6_p16-set-pbs-cflags-ldflags.patch b/sys-cluster/maui/files/3.2.6_p16-set-pbs-cflags-ldflags.patch new file mode 100644 index 000000000000..7455350a0dc0 --- /dev/null +++ b/sys-cluster/maui/files/3.2.6_p16-set-pbs-cflags-ldflags.patch @@ -0,0 +1,26 @@ +--- maui-3.2.6p16.orig/configure.ac 2006-09-25 16:08:33.000000000 -0700 ++++ maui-3.2.6p16/configure.ac 2006-09-25 21:29:17.000000000 -0700 +@@ -149,13 +149,19 @@ + else + AC_MSG_ERROR([Only one Resource Manager can be specified (PBS, $RMTYPE)]) + fi +- if test "$OS" = "OSF"; then +- PBSLIBS="$PBSTARGETDIR/ilib/libnet.a -lpbs" ++ if pbs-config --cflags 1>/dev/null 2>&1;then ++ PBSCFLAGS=`pbs-config --cflags` + else +- PBSLIBS="-lnet -lpbs" ++ PBSCFLAGS=-I$PBSTARGETDIR/include + fi ++ if pbs-config --libs 1>/dev/null 2>&1;then ++ PBSLDFLAGS=`pbs-config --libs` ++ else ++ PBSLDFLAGS="-L$PBSTARGETDIR/lib -lnet -lpbs" ++ fi ++ AC_SUBST(PBSCFLAGS) ++ AC_SUBST(PBSLDFLAGS) + AC_SUBST(PBSTARGETDIR) +- AC_SUBST(PBSLIBS) + AC_SUBST_FILE(pbs_definitions) + pbs_definitions=include/Makefile.inc.pbs + fi diff --git a/sys-cluster/maui/files/3.2.6_p21-autoconf-2.60-compat.patch b/sys-cluster/maui/files/3.2.6_p21-autoconf-2.60-compat.patch new file mode 100644 index 000000000000..9b77a27f88df --- /dev/null +++ b/sys-cluster/maui/files/3.2.6_p21-autoconf-2.60-compat.patch @@ -0,0 +1,11 @@ +--- maui-3.2.6p21.orig/Makefile.in 2006-05-23 15:20:49.000000000 -0700 ++++ maui-3.2.6p21/Makefile.in 2006-09-25 20:42:24.000000000 -0700 +@@ -18,7 +18,7 @@ + # ============================ + # Resource Manager section + # ============================ +-@ll_definitions@@sdr_definitions@@pbs_definitions@@sge_definitions@@lsf_definitions@@mx_definitions@@pcre_definitions@ ++@pbs_definitions@ + + # ============================ + # Master Makefile for @PACKAGE_NAME@-@PACKAGE_VERSION@ diff --git a/sys-cluster/maui/files/maui-3.2.6_p21-pbs-nodefile.patch b/sys-cluster/maui/files/maui-3.2.6_p21-pbs-nodefile.patch new file mode 100644 index 000000000000..90bf80ca661a --- /dev/null +++ b/sys-cluster/maui/files/maui-3.2.6_p21-pbs-nodefile.patch @@ -0,0 +1,23 @@ +--- maui-3.2.6p21/src/moab/MPBSI.c.orig 2010-03-16 12:54:09.000000000 +0100 ++++ maui-3.2.6p21/src/moab/MPBSI.c 2010-03-16 12:57:07.000000000 +0100 +@@ -6406,6 +6406,7 @@ + int tindex; + + char tmpHostName[MAX_MLINE]; ++ char tmpTaskList[MAX_MLINE+10]; + + mnode_t *N; + +@@ -6458,10 +6459,10 @@ + } + else + { +- sprintf(TSBuf,"%s%s:ppn=%d", +- TSBuf, ++ snprintf (tmpTaskList,MAX_MLINE+10,"%s:ppn=%d", + tmpHostName, + NL[tindex].TC); ++ MUStrCat(TSBuf,tmpTaskList,BufSize); + } + } /* END for (tindex) */ + diff --git a/sys-cluster/maui/files/maui-3.3.1-torque_4.patch b/sys-cluster/maui/files/maui-3.3.1-torque_4.patch new file mode 100644 index 000000000000..1e0631555736 --- /dev/null +++ b/sys-cluster/maui/files/maui-3.3.1-torque_4.patch @@ -0,0 +1,14 @@ +diff -ur maui-3.3.1.orig/src/moab/MPBSI.c maui-3.3.1/src/moab/MPBSI.c +--- maui-3.3.1.orig/src/moab/MPBSI.c 2013-07-31 09:36:31.831849229 -0700 ++++ maui-3.3.1/src/moab/MPBSI.c 2013-07-31 09:37:12.951107957 -0700 +@@ -174,8 +174,8 @@ + + extern int pbs_errno; + +-extern int get_svrport(const char *,char *,int); +-extern int openrm(char *,int); ++extern unsigned int get_svrport(char *,char *,unsigned int); ++extern int openrm(char *,unsigned int); + extern int addreq(int,char *); + extern int closerm(int); + extern int pbs_stagein(int,char *,char *,char *); diff --git a/sys-cluster/maui/files/maui.initd b/sys-cluster/maui/files/maui.initd new file mode 100644 index 000000000000..fd7b7e0cc3db --- /dev/null +++ b/sys-cluster/maui/files/maui.initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net + after pbs_server slurmctld + before pbs_mom slurmd + after logger +} + +start() { + ebegin "Starting Maui scheduler" + start-stop-daemon --start --exec /usr/sbin/maui + eend ${?} +} + +stop() { + ebegin "Stopping Maui scheduler" + start-stop-daemon --stop -p /var/spool/maui/maui.pid + eend ${?} +} +# vim:ts=4 diff --git a/sys-cluster/maui/maui-3.2.6_p16.ebuild b/sys-cluster/maui/maui-3.2.6_p16.ebuild new file mode 100644 index 000000000000..31004218b3d2 --- /dev/null +++ b/sys-cluster/maui/maui-3.2.6_p16.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit autotools eutils multilib + +DESCRIPTION="Maui Cluster Scheduler" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/maui/" +SRC_URI="http://www.clusterresources.com/downloads/maui/${P/_/}.tar.gz" +IUSE="" +DEPEND="sys-cluster/torque" +RDEPEND="${DEPEND}" +SLOT="0" +LICENSE="maui" +KEYWORDS="~x86 ~amd64" +RESTRICT="fetch mirror" + +S="${WORKDIR}/${P/_/}" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PV}-set-pbs-cflags-ldflags.patch + epatch "${FILESDIR}"/${PV}-autoconf-2.60-compat.patch + epatch "${FILESDIR}"/${PV}-link-pbs-after-moab.patch + sed -i \ + -e "s~BUILDROOT=~BUILDROOT=${D}~" \ + "${S}"/Makefile.in + eautoreconf +} + +src_compile() { + econf \ + --with-spooldir=/usr/spool/maui \ + --with-pbs=/usr/$(get_libdir)/pbs \ + || die "econf failed!" + emake || die "emake failed!" +} + +src_install() { + make install INST_DIR="${D}"/usr + + cd docs + dodoc README mauidocs.html +} diff --git a/sys-cluster/maui/maui-3.2.6_p21-r1.ebuild b/sys-cluster/maui/maui-3.2.6_p21-r1.ebuild new file mode 100644 index 000000000000..2d51a1371e5d --- /dev/null +++ b/sys-cluster/maui/maui-3.2.6_p21-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit autotools eutils multilib + +DESCRIPTION="Maui Cluster Scheduler" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/maui/" +SRC_URI="http://www.clusterresources.com/downloads/maui/${P/_/}.tar.gz" +IUSE="" +DEPEND="sys-cluster/torque" +RDEPEND="${DEPEND}" +SLOT="0" +LICENSE="maui" +KEYWORDS="~x86 ~amd64" +RESTRICT="fetch mirror" + +S="${WORKDIR}/${P/_/}" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PV}-autoconf-2.60-compat.patch + # http://www.supercluster.org/pipermail/mauiusers/2010-March/004174.html + epatch "${FILESDIR}"/maui-3.2.6_p21-pbs-nodefile.patch + sed -i \ + -e "s~BUILDROOT=~BUILDROOT=${D}~" \ + "${S}"/Makefile.in + eautoreconf +} + +src_compile() { + econf --with-spooldir=/usr/spool/maui || die + emake || die +} + +src_install() { + make install INST_DIR="${D}/usr" + cd docs + dodoc README mauidocs.html +} + +pkg_nofetch() { + einfo "Please visit ${HOMEPAGE}, obtain the file" + einfo "${P/_/}.tar.gz and put it in ${DISTDIR}" +} diff --git a/sys-cluster/maui/maui-3.2.6_p21.ebuild b/sys-cluster/maui/maui-3.2.6_p21.ebuild new file mode 100644 index 000000000000..72751b8c686c --- /dev/null +++ b/sys-cluster/maui/maui-3.2.6_p21.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit autotools eutils multilib + +DESCRIPTION="Maui Cluster Scheduler" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/maui/" +SRC_URI="http://www.clusterresources.com/downloads/maui/${P/_/}.tar.gz" +IUSE="" +DEPEND="sys-cluster/torque" +RDEPEND="${DEPEND}" +SLOT="0" +LICENSE="maui" +KEYWORDS="~x86 ~amd64" +RESTRICT="fetch mirror" + +S="${WORKDIR}/${P/_/}" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PV}-autoconf-2.60-compat.patch + sed -i \ + -e "s~BUILDROOT=~BUILDROOT=${D}~" \ + "${S}"/Makefile.in + eautoreconf +} + +src_compile() { + econf --with-spooldir=/usr/spool/maui || die + emake || die +} + +src_install() { + make install INST_DIR="${D}/usr" + cd docs + dodoc README mauidocs.html +} + +pkg_nofetch() { + einfo "Please visit ${HOMEPAGE}, obtain the file" + einfo "${P/_/}.tar.gz and put it in ${DISTDIR}" +} diff --git a/sys-cluster/maui/maui-3.3.1-r2.ebuild b/sys-cluster/maui/maui-3.3.1-r2.ebuild new file mode 100644 index 000000000000..b20236772829 --- /dev/null +++ b/sys-cluster/maui/maui-3.3.1-r2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib + +DESCRIPTION="Maui Cluster Scheduler" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/maui/" +SRC_URI="http://www.adaptivecomputing.com/download/${PN}/${P}.tar.gz" + +LICENSE="maui" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="pbs slurm" + +REQUIRED_USE="^^ ( pbs slurm )" + +DEPEND=" + pbs? ( sys-cluster/torque ) + slurm? ( sys-cluster/slurm )" +RDEPEND="${DEPEND}" + +RESTRICT="fetch mirror" + +pkg_setup() { + if use slurm; then + if [ -z ${MAUI_KEY} ]; then + eerror "You should set MAUI_KEY to any integer value in make.conf" + return 1 + fi + fi +} + +src_prepare() { + sed -e "s:\$(INST_DIR)/lib:\$(INST_DIR)/$(get_libdir):" \ + -i src/{moab,server,mcom}/Makefile || die +} + +src_configure() { + local myconf + use pbs && myconf="--with-pbs=${EPREFIX}/usr" + use slurm && myconf+=" --with-wiki --with-key=${MAUI_KEY}" + econf \ + --with-spooldir="${EPREFIX}"/var/spool/${PN} \ + ${myconf} +} + +src_install() { + emake BUILDROOT="${D}" INST_DIR="${ED}/usr" install || die + dodoc docs/README CHANGELOG || die + dohtml docs/mauidocs.html || die + newinitd "${FILESDIR}/${PN}.initd" ${PN} || die +} + +pkg_nofetch() { + einfo "Please visit ${HOMEPAGE}, obtain the file" + einfo "${P}.tar.gz and put it in ${DISTDIR}" +} diff --git a/sys-cluster/maui/maui-3.3.1-r3.ebuild b/sys-cluster/maui/maui-3.3.1-r3.ebuild new file mode 100644 index 000000000000..43f46c3c57ee --- /dev/null +++ b/sys-cluster/maui/maui-3.3.1-r3.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib + +DESCRIPTION="Maui Cluster Scheduler" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/maui/" +SRC_URI="http://www.adaptivecomputing.com/download/${PN}/${P}.tar.gz" + +LICENSE="maui" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="pbs slurm" + +REQUIRED_USE="^^ ( pbs slurm )" + +DEPEND=" + pbs? ( >=sys-cluster/torque-4 ) + slurm? ( sys-cluster/slurm )" +RDEPEND="${DEPEND}" + +RESTRICT="fetch mirror" + +pkg_setup() { + if use slurm; then + if [ -z ${MAUI_KEY} ]; then + eerror "You should set MAUI_KEY to any integer value in make.conf" + return 1 + fi + fi +} + +src_prepare() { + sed -e "s:\$(INST_DIR)/lib:\$(INST_DIR)/$(get_libdir):" \ + -i src/{moab,server,mcom}/Makefile || die + + epatch "${FILESDIR}"/${P}-torque_4.patch +} + +src_configure() { + local myconf + use pbs && myconf="--with-pbs=${EPREFIX}/usr" + use slurm && myconf+=" --with-wiki --with-key=${MAUI_KEY}" + econf \ + --with-spooldir="${EPREFIX}"/var/spool/${PN} \ + ${myconf} +} + +src_install() { + emake BUILDROOT="${D}" INST_DIR="${ED}/usr" install || die + dodoc docs/README CHANGELOG || die + dohtml docs/mauidocs.html || die + newinitd "${FILESDIR}/${PN}.initd" ${PN} || die +} + +pkg_nofetch() { + einfo "Please visit ${HOMEPAGE}, obtain the file" + einfo "${P}.tar.gz and put it in ${DISTDIR}" +} diff --git a/sys-cluster/maui/maui-3.3.ebuild b/sys-cluster/maui/maui-3.3.ebuild new file mode 100644 index 000000000000..f3e8ec607ebd --- /dev/null +++ b/sys-cluster/maui/maui-3.3.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" + +inherit autotools eutils multilib + +DESCRIPTION="Maui Cluster Scheduler" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/maui/" +SRC_URI="http://www.clusterresources.com/downloads/maui/${P/_/}.tar.gz" + +IUSE="" +SLOT="0" +LICENSE="maui" +KEYWORDS="~amd64 ~x86 ~amd64-linux" + +DEPEND="sys-cluster/torque" +RDEPEND="${DEPEND}" + +RESTRICT="fetch mirror" + +S="${WORKDIR}/${P/_/}" + +src_prepare() { + epatch "${FILESDIR}"/3.2.6_p21-autoconf-2.60-compat.patch + # http://www.supercluster.org/pipermail/mauiusers/2010-March/004174.html + epatch "${FILESDIR}"/maui-3.2.6_p21-pbs-nodefile.patch + sed -i \ + -e "s~BUILDROOT=~BUILDROOT=${D}~" \ + "${S}"/Makefile.in + eautoreconf +} + +src_configure() { + econf \ + --with-spooldir="${EPREFIX}"/usr/spool/maui \ + --with-pbs="${EPREFIX}"/usr/ +} + +src_install() { + emake install INST_DIR="${ED}/usr" + dodoc docs/README CHANGELOG || die + dohtml docs/mauidocs.html || die +} + +pkg_nofetch() { + einfo "Please visit ${HOMEPAGE}, obtain the file" + einfo "${P/_/}.tar.gz and put it in ${DISTDIR}" +} diff --git a/sys-cluster/maui/metadata.xml b/sys-cluster/maui/metadata.xml new file mode 100644 index 000000000000..2d85b047fcca --- /dev/null +++ b/sys-cluster/maui/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>cluster</herd> + <use> + <flag name="pbs">Enable pbs integration</flag> + <flag name="slurm">Enable slurm integration</flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/metadata.xml b/sys-cluster/metadata.xml new file mode 100644 index 000000000000..6f48783fcc73 --- /dev/null +++ b/sys-cluster/metadata.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The sys-cluster category contains cluster-related software. + </longdescription> + <longdescription lang="es"> + La categoría sys-cluster contiene paquetes relacionados con clusters. + </longdescription> + <longdescription lang="de"> + Die Kategorie sys-cluster enthält Software für die Arbeit mit Clustern. + </longdescription> + <longdescription lang="nl"> + De sys-cluster categorie bevat software voor gebruik met clusters. + </longdescription> + <longdescription lang="vi"> + Nhóm sys-cluster chứa các phần mềm liên quan đến cluster. + </longdescription> + <longdescription lang="it"> + La categoria sys-cluster contiene pacchetti per l'utilizzo e la gestione dei clusters. + </longdescription> + <longdescription lang="pt"> + A categoria sys-cluster contém programas relacionados a cluster. + </longdescription> + <longdescription lang="pl"> + Kategoria sys-cluster zawiera oprogramowanie dla klastrów. + </longdescription> +</catmetadata> + diff --git a/sys-cluster/moosefs/Manifest b/sys-cluster/moosefs/Manifest new file mode 100644 index 000000000000..70391b477fee --- /dev/null +++ b/sys-cluster/moosefs/Manifest @@ -0,0 +1,2 @@ +DIST mfs-1.6.26.tar.gz 754573 SHA256 f250f97c6f2a229277fdbf9fe96036873fd6c95a38f484f06e6b87a404c01885 SHA512 42fdf2b43f3d4a81068ecad48da5519adbc9fb753931198f48741e6d7235b80864ee7d8e3c04b5de2e9536be9459b72e3a5b12037adfdb97bf2a7695595e9ec5 WHIRLPOOL 234ea32360db89076d1c1da5875d28277c27a5989195c4fb638b44c86fca0df183c2bb62a73dd3e3e2a5118e04223f8e14b66da5b5a090fed1c1d3f3dae3888a +DIST mfs-1.6.27-1.tar.gz 771983 SHA256 dfe682f0b184ed13e602274825148cd9a7ddfe4f0894e1ab9c1823f66208cb28 SHA512 8e222c0741b09206e7fb6c792d679d2defa4d7f4de4c20551c236453604153fdb6e5ec049c14c675a80afa2d9df283bb4eb2e407f70cd55dbe204c325a473d59 WHIRLPOOL fb0823daf4947157936f2a59b3c7848ab91f480b02f6c49ac88f14abc877fa6a8f7de97724e675a326c4acb634b9701bdb5f0f39db2db35375500f941ea7ee56 diff --git a/sys-cluster/moosefs/files/mfs.confd b/sys-cluster/moosefs/files/mfs.confd new file mode 100644 index 000000000000..423795e33355 --- /dev/null +++ b/sys-cluster/moosefs/files/mfs.confd @@ -0,0 +1,11 @@ +# Which mooseFS roles should we start ? +# +# NOTE: The roles are stopped in *reverse* order of the given list +# so make sure to list mfsmaster *before* the other roles. +# +# Possible values: mfsmaster mfsmetalogger mfschunkserver +#ROLES="" + +# If the role mfsmaster fails to start, should we try to run mfsmetarestore -a ? +# Possible values: 0 (no), 1 (yes) +AUTORESTORE=0
\ No newline at end of file diff --git a/sys-cluster/moosefs/files/mfs.initd-r1 b/sys-cluster/moosefs/files/mfs.initd-r1 new file mode 100644 index 000000000000..9c9e7a39b7ba --- /dev/null +++ b/sys-cluster/moosefs/files/mfs.initd-r1 @@ -0,0 +1,96 @@ +#!/sbin/runscript + +extra_started_commands="reload" + +depend() { + need net +} + +chkconfig() { + [ -z "${ROLES}" ] && { eerror "No role defined !"; return 1;} + for ROLE in ${ROLES}; do + if [ ! -f /etc/mfs/${ROLE}.cfg ]; then + eerror "Missing configuration file for role ${ROLE} !" + return 1 + fi + done + return 0 +} + +autorestore() { + einfo "AUTORESTORE set, trying to restore metadata files" + mfsmetarestore -a &>/dev/null + return $? +} + +start_role() { + local ROLE=$1 + local RETURN=0 + + ebegin "${ROLE}" + start-stop-daemon -q --start --exec "${ROLE}" -- start >/dev/null + RETURN=$? + eend ${RETURN} + + return ${RETURN} +} + +start_roles() { + local RETURN=0 + + eindent + for ROLE in ${ROLES}; do + + start_role ${ROLE} || RETURN=$? + eend ${RETURN} + + if [ "${RETURN}" != "0" ] && [ "${ROLE}" == "mfsmaster" ] && [ ${AUTORESTORE} -eq 1 ]; then + eindent + autorestore && start_role ${ROLE} + RETURN=$? + eoutdent + fi + + [ "${RETURN}" != "0" ] && break + done + eoutdent + + return ${RETURN} +} + +start() { + ebegin "Starting mfs node" + chkconfig && start_roles + eend $? +} + +stop() { + local RETURN=0 + + ebegin "Stopping mfs node" + eindent + local REVERSE=$(echo ${ROLES} | tac -s' ') + for ROLE in ${REVERSE}; do + ebegin "${ROLE}" + start-stop-daemon -q --stop -n ${ROLE} || RETURN=$? + eend ${RETURN} + done + eoutdent + + eend ${RETURN} +} + +reload() { + local RETURN=0 + + ebegin "Reloading mfs node" + eindent + for ROLE in ${ROLES}; do + ebegin "${ROLE}" + start-stop-daemon --signal HUP -n ${ROLE} + eend ${RETURN} + done + eoutdent + + eend ${RETURN} +} diff --git a/sys-cluster/moosefs/files/mfscgiserver.confd b/sys-cluster/moosefs/files/mfscgiserver.confd new file mode 100644 index 000000000000..ae93c54f4f94 --- /dev/null +++ b/sys-cluster/moosefs/files/mfscgiserver.confd @@ -0,0 +1,9 @@ +# MooseFS HTTP/CGI server configuration. + +# BIND_HOST: local address to listen on +# default: any +BIND_HOST="0.0.0.0" + +# BIND_PORT: port to listen on +# default: 9425 +BIND_PORT=9425 diff --git a/sys-cluster/moosefs/files/mfscgiserver.initd-r1 b/sys-cluster/moosefs/files/mfscgiserver.initd-r1 new file mode 100644 index 000000000000..b4ebd1f9d1c2 --- /dev/null +++ b/sys-cluster/moosefs/files/mfscgiserver.initd-r1 @@ -0,0 +1,29 @@ +#!/sbin/runscript + +PIDFILE=/var/run/mfscgiserv.pid + +extra_started_commands="reload" + +depend() { + need net +} + +start() { + ebegin "Starting mfs CGI server" + start-stop-daemon --start --quiet --exec /usr/sbin/mfscgiserv \ + --pidfile "${PIDFILE}" --make-pidfile --background \ + -- -H ${BIND_HOST} -P ${BIND_PORT} -f + eend $? +} + +stop() { + ebegin "Stopping mfs CGI server" + start-stop-daemon --stop -q --pidfile "${PIDFILE}" + eend $? +} + +reload() { + ebegin "Reloading mfs CGI server" + start-stop-daemon --signal HUP --pidfile "${PIDFILE}" + eend $? +} diff --git a/sys-cluster/moosefs/metadata.xml b/sys-cluster/moosefs/metadata.xml new file mode 100644 index 000000000000..a30ead46985e --- /dev/null +++ b/sys-cluster/moosefs/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>MooseFS is a fault tolerant, network distributed file system. + It spreads data over several physical servers which are visible to the user as one resource. + For standard file operations MooseFS acts as other Unix-alike file systems + </longdescription> + <use> + <flag name="cgi">Install CGI server and scripts.</flag> + <flag name="fuse">Install the mfsmount utility.</flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild b/sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild new file mode 100644 index 000000000000..485bc8020c98 --- /dev/null +++ b/sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild @@ -0,0 +1,67 @@ +# 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 python-single-r1 user + +MY_P="mfs-${PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="A filesystem for highly reliable petabyte storage" +HOMEPAGE="http://www.moosefs.org/" +SRC_URI="http://pro.hit.gemius.pl/hitredir/id=p4CVHPOzkVa0JJIK.m0Ee6dyHZEgoQb1KaiPmVK29EX.M7/url=moosefs.org/tl_files/mfscode/${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cgi +fuse static-libs" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + cgi? ( dev-lang/python ) + fuse? ( >=sys-fs/fuse-2.6 )" +DEPEND="${RDEPEND}" + +pkg_setup() { + enewgroup mfs + enewuser mfs -1 -1 -1 mfs + python-single-r1_pkg_setup +} + +src_prepare() { + # rename dist config files + sed -i 's@\.cfg\.dist@\.cfg@g' mfsdata/Makefile.in || die +} + +src_configure() { + local myopts="" + use fuse || myopts="--disable-mfsmount" + econf \ + --sysconfdir=/etc/mfs \ + --with-default-user=mfs \ + --with-default-group=mfs \ + $(use_enable cgi mfscgi) \ + $(use_enable cgi mfscgiserv) \ + $(use_enable static-libs static) \ + ${myopts} +} + +src_install() { + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}/mfs.initd-r1" mfs + newconfd "${FILESDIR}/mfs.confd" mfs + if use cgi; then + python_fix_shebang "${D}"/usr/sbin/mfscgiserv + newinitd "${FILESDIR}/mfscgiserver.initd-r1" mfscgiserver + newconfd "${FILESDIR}/mfscgiserver.confd" mfscgiserver + fi + + chown -R mfs:mfs "${D}/var/lib/mfs" || die + chmod 750 "${D}/var/lib/mfs" || die +} diff --git a/sys-cluster/moosefs/moosefs-1.6.27.ebuild b/sys-cluster/moosefs/moosefs-1.6.27.ebuild new file mode 100644 index 000000000000..0e6cc344292c --- /dev/null +++ b/sys-cluster/moosefs/moosefs-1.6.27.ebuild @@ -0,0 +1,67 @@ +# 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 python-single-r1 user + +MY_P="mfs-${PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="A filesystem for highly reliable petabyte storage" +HOMEPAGE="http://www.moosefs.org/" +SRC_URI="http://pro.hit.gemius.pl/hitredir/id=.WCbG2t.7Ln5k1s3Q9xPg8cPfX.wVMc5kyXfrKcJTDH.c7/url=moosefs.org/tl_files/mfscode/${MY_P}-1.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cgi +fuse static-libs" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + cgi? ( dev-lang/python ) + fuse? ( >=sys-fs/fuse-2.6 )" +DEPEND="${RDEPEND}" + +pkg_setup() { + enewgroup mfs + enewuser mfs -1 -1 -1 mfs + python-single-r1_pkg_setup +} + +src_prepare() { + # rename dist config files + sed -i 's@\.cfg\.dist@\.cfg@g' mfsdata/Makefile.in || die +} + +src_configure() { + local myopts="" + use fuse || myopts="--disable-mfsmount" + econf \ + --sysconfdir=/etc/mfs \ + --with-default-user=mfs \ + --with-default-group=mfs \ + $(use_enable cgi mfscgi) \ + $(use_enable cgi mfscgiserv) \ + $(use_enable static-libs static) \ + ${myopts} +} + +src_install() { + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}/mfs.initd-r1" mfs + newconfd "${FILESDIR}/mfs.confd" mfs + if use cgi; then + python_fix_shebang "${D}"/usr/sbin/mfscgiserv + newinitd "${FILESDIR}/mfscgiserver.initd-r1" mfscgiserver + newconfd "${FILESDIR}/mfscgiserver.confd" mfscgiserver + fi + + chown -R mfs:mfs "${D}/var/lib/mfs" || die + chmod 750 "${D}/var/lib/mfs" || die +} diff --git a/sys-cluster/mpe2/Manifest b/sys-cluster/mpe2/Manifest new file mode 100644 index 000000000000..b6db74ecd500 --- /dev/null +++ b/sys-cluster/mpe2/Manifest @@ -0,0 +1 @@ +DIST mpe2-1.0.6p1.tar.gz 9313216 SHA256 23cfef2b8a0a27408b5bdadeb216ba3adb3b02bf40d0fa6fc0a110cefd8c5863 diff --git a/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch b/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch new file mode 100644 index 000000000000..4f2119ec69f0 --- /dev/null +++ b/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch @@ -0,0 +1,68 @@ +From 5bc91497bd4b3d2e4e962ffb2d5b9b471c4183c2 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Mon, 13 Sep 2010 14:18:51 -0400 +Subject: [PATCH 1/2] slog2sdk/trace_rlog makefile fixes + +- Respect user-defined LDFLAGS when linking PGM_PRINT and PGM_CHECK. +- Do not install libraries during the compile phase. +--- + src/slog2sdk/trace_rlog/src/Makefile.in | 19 ++++++++----------- + 1 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/src/slog2sdk/trace_rlog/src/Makefile.in b/src/slog2sdk/trace_rlog/src/Makefile.in +index 9b289b8..2d772e0 100644 +--- a/src/slog2sdk/trace_rlog/src/Makefile.in ++++ b/src/slog2sdk/trace_rlog/src/Makefile.in +@@ -48,7 +48,8 @@ RM = @RM@ + + JNI_INC = @JNI_INC@ + CFLAGS = -I.. $(JNI_INC) -I$(TRACE_INCDIR) @COPTS@ +-LDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ ++LIBLDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@ + + # memory leak checker + MEMLIBS = @DEBUG_LIBS@ +@@ -66,33 +67,29 @@ ALL: $(libbuild_dir)/$(LIB_TRACE) $(binbuild_dir)/$(PGM_PRINT) $(binbuild_dir)/$ + + $(libbuild_dir)/$(LIB_TRACE): $(LOBJ) + if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -export-symbols $(srcdir)/JavaTraceInput.sym \ + -rpath $(libbuild_dir) ; \ + else \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -rpath $(libbuild_dir) ; \ + fi +- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(libbuild_dir) +- $(LIBTOOL) --finish $(libbuild_dir) + + INSTALL_LIBSO: $(LOBJ) + if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -export-symbols $(srcdir)/JavaTraceInput.sym \ + -rpath $(LIBDIR) ; \ + else \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -rpath $(LIBDIR) ; \ + fi +- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(DESTDIR)$(LIBDIR) +- $(LIBTOOL) --finish $(LIBDIR) + + $(binbuild_dir)/$(PGM_PRINT): $(OBJ4T) +- $(CC) @COPTS@ -o $@ $(OBJ4T) $(MEMLIBS) ++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4T) $(MEMLIBS) + + $(binbuild_dir)/$(PGM_CHECK): $(OBJ4E) +- $(CC) @COPTS@ -o $@ $(OBJ4E) $(MEMLIBS) ++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4E) $(MEMLIBS) + + clean: + @-$(RM) *.@OBJEXT@ *.lo *.la +-- +1.7.1 + diff --git a/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch b/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch new file mode 100644 index 000000000000..717911ffb710 --- /dev/null +++ b/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch @@ -0,0 +1,68 @@ +From b23d8d40cf62d03cad7ce777565069368e040a96 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Mon, 13 Sep 2010 14:22:10 -0400 +Subject: [PATCH 2/2] slog2sdk/trace_sample makefile fixes + +- Respect user-defined LDFLAGS when linking PGM_PRINT and PGM_CHECK. +- Do not install libraries during the compile phase. +--- + src/slog2sdk/trace_sample/src/Makefile.in | 19 ++++++++----------- + 1 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/src/slog2sdk/trace_sample/src/Makefile.in b/src/slog2sdk/trace_sample/src/Makefile.in +index f716fff..8d3641a 100644 +--- a/src/slog2sdk/trace_sample/src/Makefile.in ++++ b/src/slog2sdk/trace_sample/src/Makefile.in +@@ -48,7 +48,8 @@ RM = @RM@ + + JNI_INC = @JNI_INC@ + CFLAGS = -I.. $(JNI_INC) -I$(TRACE_INCDIR) @COPTS@ +-LDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ ++LIBLDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@ + + # memory leak checker + MEMLIBS = @DEBUG_LIBS@ +@@ -66,33 +67,29 @@ ALL: $(libbuild_dir)/$(LIB_TRACE) $(binbuild_dir)/$(PGM_PRINT) $(binbuild_dir)/$ + + $(libbuild_dir)/$(LIB_TRACE): $(LOBJ) + if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -export-symbols $(srcdir)/JavaTraceInput.sym \ + -rpath $(libbuild_dir) ; \ + else \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -rpath $(libbuild_dir) ; \ + fi +- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(libbuild_dir) +- $(LIBTOOL) --finish $(libbuild_dir) + + INSTALL_LIBSO: $(LOBJ) + if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -export-symbols $(srcdir)/JavaTraceInput.sym \ + -rpath $(LIBDIR) ; \ + else \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -rpath $(LIBDIR) ; \ + fi +- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(DESTDIR)$(LIBDIR) +- $(LIBTOOL) --finish $(LIBDIR) + + $(binbuild_dir)/$(PGM_PRINT): $(OBJ4T) +- $(CC) @COPTS@ -o $@ $(OBJ4T) $(MEMLIBS) ++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4T) $(MEMLIBS) + + $(binbuild_dir)/$(PGM_CHECK): $(OBJ4E) +- $(CC) @COPTS@ -o $@ $(OBJ4E) $(MEMLIBS) ++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4E) $(MEMLIBS) + + clean: + @-$(RM) *.@OBJEXT@ *.lo *.la +-- +1.7.1 + diff --git a/sys-cluster/mpe2/metadata.xml b/sys-cluster/mpe2/metadata.xml new file mode 100644 index 000000000000..15c9c45ab1a5 --- /dev/null +++ b/sys-cluster/mpe2/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>cluster</herd> + <maintainer> + <email>jsbronder@gentoo.org</email> + <name>Justin Bronder</name> + </maintainer> +</pkgmetadata> diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild new file mode 100644 index 000000000000..9ae1133b00c4 --- /dev/null +++ b/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +FORTRAN_NEEDED=fortran + +inherit eutils fortran-2 java-utils-2 toolchain-funcs + +MY_P=${P/_/} +DESCRIPTION="MPI development tools" +HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm" +SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz" + +LICENSE="mpich2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="minimal fortran threads debug" + +COMMON_DEPEND="!minimal? ( x11-libs/libXtst + x11-libs/libXi ) + || ( sys-cluster/openmpi[fortran?,threads?] + sys-cluster/mpich2[fortran?,threads?] )" + +DEPEND="!minimal? ( >=virtual/jdk-1.4 ) + ${COMMON_DEPEND}" + +RDEPEND=" +!minimal? ( >=virtual/jre-1.4 ) + ${COMMON_DEPEND}" + +S="${WORKDIR}"/${MY_P} +MPE_IMP="" + +# README: +# This ebuild is created to handle building with both mpich2 and openmpi. +# However, without empi (in the science overlay), and some further +# conversion to use mpi.eclass, we can only handle one implementation +# at a time. I still believe it's better to have the ebuild setup +# correctly in preperation. + +pkg_setup() { + fortran-2_pkg_setup + local i + + if has_version sys-cluster/openmpi; then + MPE_IMP=openmpi + elif has_version sys-cluster/mpich2; then + MPE_IMP=mpich2 + else + die "Unknown MPI implementation" + fi + + export JFLAGS="${JFLAGS} $(java-pkg_javac-args)" + + if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then + echo + elog "Currently src_test fails on collchk with openmpi, hence" + elog "testing is disabled by default. If you would like to" + elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1" + elog "to your environment." + echo + fi + + einfo "Building with support for: sys-cluster/${MPE_IMP}" +} + +src_prepare() { + # Don't assume path contains ./ + sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in + epatch "${FILESDIR}"/slog2sdk-trace_rlog-makefile-fixes.patch + epatch "${FILESDIR}"/slog2sdk-trace_sample-makefile-fixes.patch +} + +src_configure() { + local c="--with-mpicc=/usr/bin/mpicc" + + if use fortran; then + c="${c} --with-mpif77=/usr/bin/mpif77" + else + c="${c} --disable-f77" + fi + + if use minimal; then + c="${c} --enable-slog2=no --disable-rlog --disable-sample" + else + c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build" + fi + + if [[ "${MPE_IMP}" == openmpi ]]; then + c="${c} --disable-rlog --disable-sample" + fi + + econf ${c} \ + --sysconfdir=/etc/${PN} \ + --datadir=/usr/share/${PN} \ + --with-htmldir=/usr/share/${PN} \ + --with-docdir=/usr/share/${PN} \ + --enable-collchk \ + --enable-wrappers \ + $(use_enable !minimal graphics) \ + $(use_enable threads threadlogging) \ + $(use_enable debug g) +} + +src_test() { + local rc + + cd "${S}" + if [[ "${MPE_IMP}" == mpich2 ]]; then + echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf + chmod 600 "${T}"/mpd.conf + export MPD_CONF_FILE="${T}/mpd.conf" + "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid + elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then + elog + elog "Skipping tests for openmpi" + elog + return 0 + fi + + # No parallel make: + # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1 + emake -j1 \ + CC="${S}"/bin/mpecc \ + FC="${S}"/bin/mpefc \ + MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \ + CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \ + check; + rc=${?} + if [[ "${MPE_IMP}" == mpich2 ]]; then + "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid) + fi + + return ${rc} +} + +src_install() { + # No parallel make: + # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1 + emake -j1 DESTDIR="${D}" install || die + rm -f "${D}"/usr/sbin/mpeuninstall || die +} diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild new file mode 100644 index 000000000000..6cda3da58c41 --- /dev/null +++ b/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit eutils fortran-2 java-pkg-opt-2 toolchain-funcs + +MY_P=${P/_/} +DESCRIPTION="MPI development tools" +HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm" +SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz" + +LICENSE="mpich2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="minimal fortran threads debug" + +COMMON_DEPEND="!minimal? ( x11-libs/libXtst + x11-libs/libXi ) + || ( sys-cluster/openmpi[fortran?,threads?] + sys-cluster/mpich2[fortran?,threads?] )" + +DEPEND="!minimal? ( >=virtual/jdk-1.6 ) + ${COMMON_DEPEND}" + +RDEPEND=" +!minimal? ( >=virtual/jre-1.6 ) + ${COMMON_DEPEND}" + +S="${WORKDIR}"/${MY_P} +MPE_IMP="" + +# README: +# This ebuild is created to handle building with both mpich2 and openmpi. +# However, without empi (in the science overlay), and some further +# conversion to use mpi.eclass, we can only handle one implementation +# at a time. I still believe it's better to have the ebuild setup +# correctly in preperation. + +pkg_setup() { + fortran-2_pkg_setup + local i + + if has_version sys-cluster/openmpi; then + MPE_IMP=openmpi + elif has_version sys-cluster/mpich2; then + MPE_IMP=mpich2 + else + die "Unknown MPI implementation" + fi + + export JFLAGS="${JFLAGS} $(java-pkg_javac-args)" + + if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then + echo + elog "Currently src_test fails on collchk with openmpi, hence" + elog "testing is disabled by default. If you would like to" + elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1" + elog "to your environment." + echo + fi + + einfo "Building with support for: sys-cluster/${MPE_IMP}" + + if ! minimal; then + java-pkg-opt-2_pkg_setup + fi +} + +src_prepare() { + # Don't assume path contains ./ + sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in + epatch "${FILESDIR}"/slog2sdk-trace_rlog-makefile-fixes.patch + epatch "${FILESDIR}"/slog2sdk-trace_sample-makefile-fixes.patch + + if ! minimal; then + java-pkg-opt-2_src_prepare + fi +} + +src_configure() { + local c="--with-mpicc=/usr/bin/mpicc" + + if use fortran; then + c="${c} --with-mpif77=/usr/bin/mpif77" + else + c="${c} --disable-f77" + fi + + if use minimal; then + c="${c} --enable-slog2=no --disable-rlog --disable-sample" + else + c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build" + fi + + if [[ "${MPE_IMP}" == openmpi ]]; then + c="${c} --disable-rlog --disable-sample" + fi + + econf ${c} \ + --sysconfdir=/etc/${PN} \ + --datadir=/usr/share/${PN} \ + --with-htmldir=/usr/share/${PN} \ + --with-docdir=/usr/share/${PN} \ + --enable-collchk \ + --enable-wrappers \ + $(use_enable !minimal graphics) \ + $(use_enable threads threadlogging) \ + $(use_enable debug g) +} + +src_test() { + local rc + + cd "${S}" + if [[ "${MPE_IMP}" == mpich2 ]]; then + echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf + chmod 600 "${T}"/mpd.conf + export MPD_CONF_FILE="${T}/mpd.conf" + "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid + elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then + elog + elog "Skipping tests for openmpi" + elog + return 0 + fi + + # No parallel make: + # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1 + emake -j1 \ + CC="${S}"/bin/mpecc \ + FC="${S}"/bin/mpefc \ + MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \ + CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \ + check; + rc=${?} + if [[ "${MPE_IMP}" == mpich2 ]]; then + "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid) + fi + + return ${rc} +} + +src_install() { + # No parallel make: + # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1 + emake -j1 DESTDIR="${D}" install || die + rm -f "${D}"/usr/sbin/mpeuninstall || die +} diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild new file mode 100644 index 000000000000..76d6bf0033c8 --- /dev/null +++ b/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +FORTRAN_NEEDED=fortran + +inherit eutils fortran-2 java-utils-2 toolchain-funcs + +MY_P=${P/_/} +DESCRIPTION="MPI development tools" +HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm" +SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz" + +LICENSE="mpich2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="minimal fortran threads debug" + +COMMON_DEPEND="!minimal? ( x11-libs/libXtst + x11-libs/libXi ) + || ( sys-cluster/openmpi[fortran?,threads?] + sys-cluster/mpich2[fortran?,threads?] )" + +DEPEND="!minimal? ( >=virtual/jdk-1.4 ) + ${COMMON_DEPEND}" + +RDEPEND=" +!minimal? ( >=virtual/jre-1.4 ) + ${COMMON_DEPEND}" + +S="${WORKDIR}"/${MY_P} +MPE_IMP="" + +# README: +# This ebuild is created to handle building with both mpich2 and openmpi. +# However, without empi (in the science overlay), and some further +# conversion to use mpi.eclass, we can only handle one implementation +# at a time. I still believe it's better to have the ebuild setup +# correctly in preperation. + +pkg_setup() { + fortran-2_pkg_setup + local i + + if has_version sys-cluster/openmpi; then + MPE_IMP=openmpi + elif has_version sys-cluster/mpich2; then + MPE_IMP=mpich2 + else + die "Unknown MPI implementation" + fi + + export JFLAGS="${JFLAGS} $(java-pkg_javac-args)" + + if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then + echo "" + elog "Currently src_test fails on collchk with openmpi, hence" + elog "testing is disabled by default. If you would like to" + elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1" + elog "to your environment." + echo "" + fi + + einfo "Building with support for: sys-cluster/${MPE_IMP}" +} + +src_prepare() { + # Don't assume path contains ./ + sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in +} + +src_configure() { + local c="--with-mpicc=/usr/bin/mpicc" + + if use fortran; then + c="${c} --with-mpif77=/usr/bin/mpif77" + else + c="${c} --disable-f77" + fi + + if use minimal; then + c="${c} --enable-slog2=no --disable-rlog --disable-sample" + else + c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build" + fi + + if [[ "${MPE_IMP}" == openmpi ]]; then + c="${c} --disable-rlog --disable-sample" + fi + + econf ${c} \ + --sysconfdir=/etc/${PN} \ + --datadir=/usr/share/${PN} \ + --with-htmldir=/usr/share/${PN} \ + --with-docdir=/usr/share/${PN} \ + --enable-collchk \ + --enable-wrappers \ + $(use_enable !minimal graphics) \ + $(use_enable threads threadlogging) \ + $(use_enable debug g) +} + +src_test() { + local rc + + cd "${S}" + if [[ "${MPE_IMP}" == mpich2 ]]; then + echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf + chmod 600 "${T}"/mpd.conf + export MPD_CONF_FILE="${T}/mpd.conf" + "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid + elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then + echo + elog "Skipping tests for openmpi" + echo + return 0 + fi + + # No parallel make: + # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1 + emake -j1 \ + CC="${S}"/bin/mpecc \ + FC="${S}"/bin/mpefc \ + MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \ + CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \ + check; + rc=${?} + if [[ "${MPE_IMP}" == mpich2 ]]; then + "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid) + fi + + return ${rc} +} + +src_install() { + # No parallel make: + # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1 + emake -j1 DESTDIR="${D}" install || die + rm -f "${D}"/usr/sbin/mpeuninstall || die +} diff --git a/sys-cluster/mpich/Manifest b/sys-cluster/mpich/Manifest new file mode 100644 index 000000000000..f630841da5d9 --- /dev/null +++ b/sys-cluster/mpich/Manifest @@ -0,0 +1,3 @@ +DIST mpich-3.0.4.tar.gz 10921075 SHA256 cf638c85660300af48b6f776e5ecd35b5378d5905ec5d34c3da7a27da0acf0b3 SHA512 f9d8b2cf561fe5f85c12512ef4dd7b0cf5ec8b53ddb07bfa0d1db2e3c8ae0382c77e0661f46b82ec96b05d18ea2d25328bb84e9528ac06e5925f30ec8ef030d0 WHIRLPOOL 52c811d1adcba26424bb3f05b7b97faff16ab3762782474fcde5f49e9ca77155fb91d80967120d9277eed2adb116443afe444671eb6315a610587d55ac4ec9ed +DIST mpich-3.1.3.tar.gz 11487313 SHA256 afb690aa828467721e9d9ab233fe00c68cae2b7b930d744cb5f7f3eb08c8602c SHA512 3071d75e925808c13ea528aaff81a2ee44a4eb9732c74005a0cedd5a710aeafc691d30c7a035ae0aba14bd2b837c1c788202a7612599d3ffac8e5a9299467c09 WHIRLPOOL ade5a2ab7a98a3ee353a0b41ad8c57b8676ea7e381e625c01237519c88e9e16c5330cf6c569707ded26462022dd8647ba0a24dc2c1559240781b0e4fa1c69511 +DIST mpich-3.1.4.tar.gz 11325036 SHA256 f68b5330e94306c00ca5a1c0e8e275c7f53517d01d6c524d51ce9359d240466b SHA512 55bd4d12a42b9ebc116016bd777eb2b8ed8c51e69f5ea5faf823eba0aeb7eadfe2848c4cca3032aa38841a25a4902c07cec2409811149a057c4aa99a25c6b6da WHIRLPOOL 243ea40dd67b7f8e6fecde58740c21703833ca2857922ad59c5744888145bbf0ee934a69128818cd5bb91f39a3e842c26b2eced20ba23e08c8968b903f1f9992 diff --git a/sys-cluster/mpich/metadata.xml b/sys-cluster/mpich/metadata.xml new file mode 100644 index 000000000000..1738cc60e6e8 --- /dev/null +++ b/sys-cluster/mpich/metadata.xml @@ -0,0 +1,18 @@ +<?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> + <name>Justin Bronder</name> + </maintainer> + <maintainer> + <email>balaji@mcs.anl.gov</email> + <name>Pavan Balaji</name> + <description>Upstream Contact</description> + </maintainer> + <use> + <flag name="mpi-threads">Enable MPI_THREAD_MULTIPLE</flag> + <flag name="romio">Build the ROMIO MPI-IO component</flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/mpich/mpich-3.0.4.ebuild b/sys-cluster/mpich/mpich-3.0.4.ebuild new file mode 100644 index 000000000000..feecd56232a7 --- /dev/null +++ b/sys-cluster/mpich/mpich-3.0.4.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit fortran-2 + +MY_PV=${PV/_/} +DESCRIPTION="A high performance and portable MPI implementation" +HOMEPAGE="http://www.mpich.org/" +SRC_URI="http://www.mpich.org/static/downloads/${PV}/${P}.tar.gz" + +SLOT="0" +LICENSE="mpich" +KEYWORDS="amd64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux" +IUSE="+cxx doc fortran mpi-threads romio threads" + +COMMON_DEPEND=" + dev-libs/libaio + sys-apps/hwloc + romio? ( net-fs/nfs-utils )" + +DEPEND="${COMMON_DEPEND} + dev-lang/perl + sys-devel/libtool" + +RDEPEND="${COMMON_DEPEND} + !sys-cluster/mpich2 + !sys-cluster/openmpi" + +S="${WORKDIR}"/${PN}-${MY_PV} + +pkg_setup() { + FORTRAN_STANDARD="77 90" + fortran-2_pkg_setup + + if use mpi-threads && ! use threads; then + ewarn "mpi-threads requires threads, assuming that's what you want" + fi +} + +src_prepare() { + # Using MPICHLIB_LDFLAGS doesn't seem to fully work. + sed -i 's| *@WRAPPER_LDFLAGS@ *||' \ + src/packaging/pkgconfig/mpich.pc.in \ + src/env/*.in \ + || die +} + +src_configure() { + local c="--enable-shared" + + # The configure statements can be somewhat confusing, as they + # don't all show up in the top level configure, however, they + # are picked up in the children directories. + + if use mpi-threads; then + # MPI-THREAD requries threading. + c="${c} --with-thread-package=pthreads" + c="${c} --enable-threads=runtime" + else + if use threads ; then + c="${c} --with-thread-package=pthreads" + else + c="${c} --with-thread-package=none" + fi + c="${c} --enable-threads=single" + fi + + c="${c} --sysconfdir=${EPREFIX}/etc/${PN}" + c="${c} --docdir=${EPREFIX}/usr/share/doc/${PF}" + + export MPICHLIB_CFLAGS=${CFLAGS} + export MPICHLIB_CPPFLAGS=${CPPFLAGS} + export MPICHLIB_CXXFLAGS=${CXXFLAGS} + export MPICHLIB_FFLAGS=${FFLAGS} + export MPICHLIB_FCFLAGS=${FCFLAGS} + export MPICHLIB_LDFLAGS=${LDFLAGS} + unset CFLAGS CPPFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS + + econf ${c} \ + --with-pm=hydra \ + --disable-mpe \ + --disable-fast \ + --enable-smpcoll \ + --enable-versioning \ + --with-hwloc-prefix=/usr \ + $(use_enable romio) \ + $(use_enable cxx) \ + $(use_enable fortran f77) \ + $(use_enable fortran fc) +} + +src_test() { + emake -j1 check +} + +src_install() { + default + + dodir /usr/share/doc/${PF} + dodoc README{,.envvar} CHANGES RELEASE_NOTES + newdoc src/pm/hydra/README README.hydra + if use romio; then + newdoc src/mpi/romio/README README.romio + fi + + if ! use doc; then + rm -rf "${D}"usr/share/doc/${PF}/www* + fi +} diff --git a/sys-cluster/mpich/mpich-3.1.3.ebuild b/sys-cluster/mpich/mpich-3.1.3.ebuild new file mode 100644 index 000000000000..1a9e3321b22a --- /dev/null +++ b/sys-cluster/mpich/mpich-3.1.3.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit fortran-2 + +MY_PV=${PV/_/} +DESCRIPTION="A high performance and portable MPI implementation" +HOMEPAGE="http://www.mpich.org/" +SRC_URI="http://www.mpich.org/static/downloads/${PV}/${P}.tar.gz" + +SLOT="0" +LICENSE="mpich" +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+cxx doc fortran mpi-threads romio threads" + +COMMON_DEPEND=" + dev-libs/libaio + >=sys-apps/hwloc-1.9 + romio? ( net-fs/nfs-utils )" + +DEPEND="${COMMON_DEPEND} + dev-lang/perl + sys-devel/libtool" + +RDEPEND="${COMMON_DEPEND} + !sys-cluster/mpich2 + !sys-cluster/openmpi" + +S="${WORKDIR}"/${PN}-${MY_PV} + +pkg_setup() { + FORTRAN_STANDARD="77 90" + fortran-2_pkg_setup + + if use mpi-threads && ! use threads; then + ewarn "mpi-threads requires threads, assuming that's what you want" + fi +} + +src_prepare() { + # Using MPICHLIB_LDFLAGS doesn't seem to fully work. + sed -i 's| *@WRAPPER_LDFLAGS@ *||' \ + src/packaging/pkgconfig/mpich.pc.in \ + src/env/*.in \ + || die +} + +src_configure() { + local c="--enable-shared" + + # The configure statements can be somewhat confusing, as they + # don't all show up in the top level configure, however, they + # are picked up in the children directories. + + if use mpi-threads; then + # MPI-THREAD requries threading. + c="${c} --with-thread-package=pthreads" + c="${c} --enable-threads=runtime" + else + if use threads ; then + c="${c} --with-thread-package=pthreads" + else + c="${c} --with-thread-package=none" + fi + c="${c} --enable-threads=single" + fi + + c="${c} --sysconfdir=${EPREFIX}/etc/${PN}" + c="${c} --docdir=${EPREFIX}/usr/share/doc/${PF}" + + export MPICHLIB_CFLAGS=${CFLAGS} + export MPICHLIB_CPPFLAGS=${CPPFLAGS} + export MPICHLIB_CXXFLAGS=${CXXFLAGS} + export MPICHLIB_FFLAGS=${FFLAGS} + export MPICHLIB_FCFLAGS=${FCFLAGS} + export MPICHLIB_LDFLAGS=${LDFLAGS} + unset CFLAGS CPPFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS + + econf ${c} \ + --with-pm=hydra \ + --disable-mpe \ + --disable-fast \ + --enable-smpcoll \ + --enable-versioning \ + --with-hwloc-prefix=/usr \ + $(use_enable romio) \ + $(use_enable cxx) \ + $(use_enable fortran f77) \ + $(use_enable fortran fc) +} + +src_test() { + emake -j1 check +} + +src_install() { + default + + dodir /usr/share/doc/${PF} + dodoc README{,.envvar} CHANGES RELEASE_NOTES + newdoc src/pm/hydra/README README.hydra + if use romio; then + newdoc src/mpi/romio/README README.romio + fi + + if ! use doc; then + rm -rf "${D}"usr/share/doc/${PF}/www* + fi +} diff --git a/sys-cluster/mpich/mpich-3.1.4.ebuild b/sys-cluster/mpich/mpich-3.1.4.ebuild new file mode 100644 index 000000000000..3b08bfb87395 --- /dev/null +++ b/sys-cluster/mpich/mpich-3.1.4.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit fortran-2 + +MY_PV=${PV/_/} +DESCRIPTION="A high performance and portable MPI implementation" +HOMEPAGE="http://www.mpich.org/" +SRC_URI="http://www.mpich.org/static/downloads/${PV}/${P}.tar.gz" + +SLOT="0" +LICENSE="mpich" +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+cxx doc fortran mpi-threads romio threads" + +COMMON_DEPEND=" + dev-libs/libaio + >=sys-apps/hwloc-1.9 + romio? ( net-fs/nfs-utils )" + +DEPEND="${COMMON_DEPEND} + dev-lang/perl + sys-devel/libtool" + +RDEPEND="${COMMON_DEPEND} + !sys-cluster/mpich2 + !sys-cluster/openmpi" + +S="${WORKDIR}"/${PN}-${MY_PV} + +pkg_setup() { + FORTRAN_STANDARD="77 90" + fortran-2_pkg_setup + + if use mpi-threads && ! use threads; then + ewarn "mpi-threads requires threads, assuming that's what you want" + fi +} + +src_prepare() { + # Using MPICHLIB_LDFLAGS doesn't seem to fully work. + sed -i 's| *@WRAPPER_LDFLAGS@ *||' \ + src/packaging/pkgconfig/mpich.pc.in \ + src/env/*.in \ + || die +} + +src_configure() { + local c="--enable-shared" + local hydra_c="--with-hwloc-prefix=/usr" + + # The configure statements can be somewhat confusing, as they + # don't all show up in the top level configure, however, they + # are picked up in the children directories. Hence the separate + # local vars. + + if use mpi-threads; then + # MPI-THREAD requries threading. + c="${c} --with-thread-package=pthreads" + c="${c} --enable-threads=runtime" + else + if use threads ; then + c="${c} --with-thread-package=pthreads" + else + c="${c} --with-thread-package=none" + fi + c="${c} --enable-threads=single" + fi + + c="${c} --sysconfdir=${EPREFIX}/etc/${PN}" + c="${c} --docdir=${EPREFIX}/usr/share/doc/${PF}" + + export MPICHLIB_CFLAGS=${CFLAGS} + export MPICHLIB_CPPFLAGS=${CPPFLAGS} + export MPICHLIB_CXXFLAGS=${CXXFLAGS} + export MPICHLIB_FFLAGS=${FFLAGS} + export MPICHLIB_FCFLAGS=${FCFLAGS} + export MPICHLIB_LDFLAGS=${LDFLAGS} + unset CFLAGS CPPFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS + + econf ${c} \ + --with-pm=hydra \ + --disable-fast \ + --enable-versioning \ + ${hydra_c} + $(use_enable romio) \ + $(use_enable cxx) \ + $(use_enable fortran f77) \ + $(use_enable fortran fc) +} + +src_test() { + emake -j1 check +} + +src_install() { + default + + dodir /usr/share/doc/${PF} + dodoc README{,.envvar} CHANGES RELEASE_NOTES + newdoc src/pm/hydra/README README.hydra + if use romio; then + newdoc src/mpi/romio/README README.romio + fi + + if ! use doc; then + rm -rf "${D}"usr/share/doc/${PF}/www* + fi +} diff --git a/sys-cluster/mpich2/Manifest b/sys-cluster/mpich2/Manifest new file mode 100644 index 000000000000..bf24106fbc2f --- /dev/null +++ b/sys-cluster/mpich2/Manifest @@ -0,0 +1 @@ +DIST mpich2-1.5.tar.gz 22826035 SHA256 7175926fc2e4230f00201e880318c08de4f949c0dbe167fe1b2e256ac79d5f66 SHA512 01ef68accdd60af805705c1c7a144a570eee6f01984939fe151a093f963c956fba366247b1058885ba1a2ff626278d30e928e03d394bd6cf2a4b6dab99586c15 WHIRLPOOL 2cffe3dc6942f4d141601fcb51a08405c5c61af84c8e224dc9301b18846862d27f7646637aa199720c3858345471c244cb78800d4f2b484742edd8ef6a674b45 diff --git a/sys-cluster/mpich2/metadata.xml b/sys-cluster/mpich2/metadata.xml new file mode 100644 index 000000000000..9d7273bf3684 --- /dev/null +++ b/sys-cluster/mpich2/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> + <maintainer> + <email>jsbronder@gentoo.org</email> + <name>Justin Bronder</name> + </maintainer> + <use> + <flag name="romio">Enable romio, a high-performance portable MPI-IO + implementation</flag> + <flag name="mpi-threads">Enable MPI_THREAD_MULTIPLE</flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/mpich2/mpich2-1.5.ebuild b/sys-cluster/mpich2/mpich2-1.5.ebuild new file mode 100644 index 000000000000..ef0a98870a9d --- /dev/null +++ b/sys-cluster/mpich2/mpich2-1.5.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit fortran-2 + +MY_PV=${PV/_/} +DESCRIPTION="A high performance and portable MPI implementation" +HOMEPAGE="http://www.mcs.anl.gov/research/projects/mpich2/index.php" +SRC_URI="http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/${MY_PV}/${PN}-${MY_PV}.tar.gz" + +SLOT="0" +LICENSE="mpich2" +KEYWORDS="amd64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux" +IUSE="+cxx doc fortran mpi-threads romio threads" + +COMMON_DEPEND=" + dev-libs/libaio + sys-apps/hwloc + romio? ( net-fs/nfs-utils )" + +DEPEND="${COMMON_DEPEND} + dev-lang/perl + sys-devel/libtool" + +RDEPEND="${COMMON_DEPEND} + !sys-cluster/mpich + !sys-cluster/openmpi" + +S="${WORKDIR}"/${PN}-${MY_PV} + +pkg_setup() { + FORTRAN_STANDARD="77 90" + fortran-2_pkg_setup + + if use mpi-threads && ! use threads; then + ewarn "mpi-threads requires threads, assuming that's what you want" + fi +} + +src_prepare() { + # Using MPICH2LIB_LDFLAGS doesn't seem to full work. + sed -i 's| *@WRAPPER_LDFLAGS@ *||' \ + src/packaging/pkgconfig/mpich2.pc.in \ + src/env/*.in \ + || die +} + +src_configure() { + local c="--enable-shared" + + # The configure statements can be somewhat confusing, as they + # don't all show up in the top level configure, however, they + # are picked up in the children directories. + + if use mpi-threads; then + # MPI-THREAD requries threading. + c="${c} --with-thread-package=pthreads" + c="${c} --enable-threads=runtime" + else + if use threads ; then + c="${c} --with-thread-package=pthreads" + else + c="${c} --with-thread-package=none" + fi + c="${c} --enable-threads=single" + fi + + export MPICH2LIB_CFLAGS=${CFLAGS} + export MPICH2LIB_CPPFLAGS=${CPPFLAGS} + export MPICH2LIB_CXXFLAGS=${CXXFLAGS} + export MPICH2LIB_FFLAGS=${FFLAGS} + export MPICH2LIB_FCFLAGS=${FCFLAGS} + export MPICH2LIB_LDFLAGS=${LDFLAGS} + unset CFLAGS CPPFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS + + c="${c} --sysconfdir=${EPREFIX}/etc/${PN}" + c="${c} --docdir=${EPREFIX}/usr/share/doc/${PF}" + econf ${c} \ + --with-pm=hydra \ + --disable-mpe \ + --disable-fast \ + --enable-smpcoll \ + --enable-versioning \ + $(use_enable romio) \ + $(use_enable cxx) \ + $(use_enable fortran f77) \ + $(use_enable fortran fc) +} + +src_test() { + emake -j1 check +} + +src_install() { + default + + dodir /usr/share/doc/${PF} + dodoc COPYRIGHT README{,.envvar} CHANGES RELEASE_NOTES + newdoc src/pm/hydra/README README.hydra + if use romio; then + newdoc src/mpi/romio/README README.romio + fi + + if ! use doc; then + rm -rf "${D}"usr/share/doc/${PF}/www* + fi +} diff --git a/sys-cluster/mvapich2/Manifest b/sys-cluster/mvapich2/Manifest new file mode 100644 index 000000000000..ceedf7e70c29 --- /dev/null +++ b/sys-cluster/mvapich2/Manifest @@ -0,0 +1 @@ +DIST mvapich2-1.6.tgz 23239787 RMD160 8a254c90773535fd9f5099472042e6b4213a9598 SHA1 4b69c8f17a760a861fe91be0473143ddfc5e1ebb SHA256 e657ba2eaf43119fec70859677a08bb8138a8bf18c1f375891fed0b7c77aa28d diff --git a/sys-cluster/mvapich2/metadata.xml b/sys-cluster/mvapich2/metadata.xml new file mode 100644 index 000000000000..90e009179ab6 --- /dev/null +++ b/sys-cluster/mvapich2/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> +MVAPICH2 MPI-over-infiniband package auto-configured for OpenIB. +</longdescription> + <use> + <flag name="large-cluster">Automatically generated description for large-cluster</flag> + <flag name="medium-cluster">Automatically generated description for medium-cluster</flag> + <flag name="romio">Automatically generated description for romio</flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/mvapich2/mvapich2-1.6.ebuild b/sys-cluster/mvapich2/mvapich2-1.6.ebuild new file mode 100644 index 000000000000..e3d30ee91a93 --- /dev/null +++ b/sys-cluster/mvapich2/mvapich2-1.6.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit fortran-2 + +DESCRIPTION="MVAPICH2 MPI-over-infiniband package auto-configured for OpenIB" +HOMEPAGE="http://mvapich.cse.ohio-state.edu/" +SRC_URI="${HOMEPAGE}/download/mvapich2/mvapich2-${PV/_/-}.tgz" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~x86 ~amd64" +IUSE="debug fortran large-cluster medium-cluster romio threads" + +RDEPEND=" + || ( + ( + sys-infiniband/libibverbs + sys-infiniband/libibumad + sys-infiniband/libibmad + sys-infiniband/librdmacm ) + sys-infiniband/openib-userspace )" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/mvapich2-${PV/_/-}" + +pkg_setup() { + fortran-2_pkg_setup + + if [ -z "${MVAPICH_HCA_TYPE}" ]; then + elog "${PN} needs to know which HCA it should optimize for. This is" + elog "passed to the ebuild with the variable, \${MVAPICH_HCA_TYPE}." + elog "Please choose one of: _MLX_PCI_EX_SDR_, _MLX_PCI_EX_DDR_," + elog "_MLX_PCI_X, _PATH_HT_, or _IBM_EHCA_." + elog "See make.mvapich2.detect in ${S} for more information." + die "MVAPICH_HCA_TYPE undefined" + fi + + case ${ARCH} in + amd64) + if grep Intel /proc/cpuinfo &>/dev/null; then + BUILD_ARCH=-D_EM64T_ + else + BUILD_ARCH=-D_X86_64_ + fi + ;; + x86) + BUILD_ARCH=-D_IA32_ + ;; + ia64) + BUILD_ARCH=-D_IA64_ + ;; + ppc64) + BUILD_ARCH=-D_PPC64_ + ;; + *) + die "unsupported architecture: ${ARCH}" + ;; + esac +} + +src_prepare() { + einfo "Disabling examples" + # Examples are always compiled with the default 'all' target. This + # causes problems when we don't build support for everything, including + # threads, mpe2, etc. So we're not going to build them. + sed -i 's:.*cd examples && ${MAKE} all.*::' Makefile.in +} + +src_configure() { + local c="--with-device=osu_ch3:mrail + --with-rdma=gen2 + --with-pm=mpd + $(use_enable romio) + --with-mpe=no" + + # TODO Shared libs should build with this, but they don't + # --enable-shared=gcc" + + local enable_srq + local vcluster=-D_SMALL_CLUSTER + + use large-cluster && vcluster=-D_LARGE_CLUSTER + use medium-cluster && vcluster=-D_MEDIUM_CLUSTER + [ "${MVAPICH_HCA_TYPE}" == "_MLX_PCI_X_" ] && enable_srq="-DSRQ" + + append-ldflags "-lrdmacm" + append-flags "-DADAPTIVE_RDMA_FAST_PATH -DRDMA_CM" + + append-ldflags "-libverbs -libumad -libmad" + + append-flags "${BUILD_ARCH} -DUSE_INLINE -D_SMP_ -D_GNU_SOURCE" + append-flags "${enable_srq} -DUSE_HEADER_CACHING -DLAZY_MEM_UNREGISTER" + append-flags "-DONE_SIDED -D${MVAPICH_HCA_TYPE} ${vcluster}" + append-flags "-DMPID_USE_SEQUENCE_NUMBERS -DUSE_MPD_RING" + + use debug && c="${c} --enable-g=all --enable-debuginfo" + + if use threads; then + c="${c} --enable-threads=multiple --with-thread-package=pthreads" + append-flags "-pthread" + else + c="${c} --with-thread-package=none" + fi + + # enable f90 support for appropriate compilers + if use fortran; then + case "$(tc-getFC)" in + gfortran|ifort|f95) + c="${c} --enable-f77 --enable-f90";; + g77|f77|f2c) + c="${c} --enable-f77 --disable-f90";; + esac + else + c="${c} --disable-f77 --disable-f90" + fi + + sed -i \ + -e 's/ ${exec_prefix}/ ${DESTDIR}${exec_prefix}/' \ + -e 's/ ${libdir}/ ${DESTDIR}${libdir}/' \ + ${S/-beta2/}/Makefile.in + sed -i '/bindir/s/ ${bindir}/ ${DESTDIR}${bindir}/' ${S/-beta2/}/src/pm/mpd/Makefile.in + cd ${S/-beta2/} + + econf ${c} +} + +src_install() { + emake DESTDIR="${D}"|| die + dodoc CHANGES_MPICH2 COPYRIGHT COPYRIGHT_MVAPICH2 LICENSE.TXT \ + README* RELEASE_NOTES* +} + +pkg_postinst() { + einfo "To allow normal users to use infiniband, it is necessary to" + einfo "increase the system limits on locked memory." + einfo "You must increase the kernel.shmmax sysctl value, and increase" + einfo "the memlock limits in /etc/security/limits.conf. i.e.:" + echo + einfo "echo 'kernel.shmmax = 512000000' >> /etc/sysctl.conf" + einfo "echo 512000000 > /proc/sys/kernel/shmmax" + einfo "echo -e '* soft memlock 500000\n* hard memlock 500000' > /etc/security/limits.conf" +} diff --git a/sys-cluster/native-mpi/metadata.xml b/sys-cluster/native-mpi/metadata.xml new file mode 100644 index 000000000000..a70357e10dd8 --- /dev/null +++ b/sys-cluster/native-mpi/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>cluster</herd> + <maintainer> + <email>alexxy@gentoo.org</email> + <name>Alexey Shvetsov</name> + </maintainer> +</pkgmetadata> diff --git a/sys-cluster/native-mpi/native-mpi-0.ebuild b/sys-cluster/native-mpi/native-mpi-0.ebuild new file mode 100644 index 000000000000..ca914f10dd1b --- /dev/null +++ b/sys-cluster/native-mpi/native-mpi-0.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +DESCRIPTION="Use native OS MPI in prefix environment" +HOMEPAGE="http://prefix.gentoo.org" +SRC_URI="" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64-linux ~x86-linux" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_install() { + cat >> "${T}"/99mpi <<- EOF + MPI_CC=gcc + MPI_CXX=g++ + MPI_FC=gfortran + MPI_F90=gfortran + HPMPI_F77=gfortran + EOF + doenvd "${T}"/99mpi +} + +pkg_postinst() { + einfo + einfo "Please read and edit ${EPREFIX}/etc/env.d/99mpi" + einfo "to add needed values for your os-mpi implentation" + einfo +} diff --git a/sys-cluster/neutron/Manifest b/sys-cluster/neutron/Manifest new file mode 100644 index 000000000000..cf1242eef4bc --- /dev/null +++ b/sys-cluster/neutron/Manifest @@ -0,0 +1,2 @@ +DIST neutron-2015.1.0.tar.gz 2038600 SHA256 02672a5316e637d122bb13cd2e18ee4df0df279ddd70262fa7d4102943ec33b6 SHA512 205181228a34469b2f079135fd871adfc5156d9c046f59d1347798015403530131b6f790346be31349333acd6d3f00dd818876b1c7a73a675214387482d0715d WHIRLPOOL 558a16b3c84425ac9e14960895cc7d67f26f618f47e6b24e53592555e282d49fbd52feed3da616cb576942fabef36b54fb979273071605ecbd32ba980c28f5a3 +DIST neutron-2015.1.1.tar.gz 2049496 SHA256 91569feaacc983635f64bc27f3903162526e984778aa6683129e578715f8c5b9 SHA512 aa9712a0d44efc2d52f47a2dfac449fb57b82bef675ea5d64b950859780240fbd441a3f8cd9684afff3c51502f8200c0db3b17471fabbd30724ce92662183fe2 WHIRLPOOL aeb6757f855115eb08d2707db40f54cdd488e67e69eb829ea2b31e83fe029ca3cde24e4520b8d8649da285354b161f47a237181a199cd786552d26f19c66181e diff --git a/sys-cluster/neutron/files/cve-2015-3221_2015.1.0.patch b/sys-cluster/neutron/files/cve-2015-3221_2015.1.0.patch new file mode 100644 index 000000000000..c6c2230c9bd3 --- /dev/null +++ b/sys-cluster/neutron/files/cve-2015-3221_2015.1.0.patch @@ -0,0 +1,127 @@ +From e0c8cbc5dd610b4c580935ea56436495a6d4eb26 Mon Sep 17 00:00:00 2001 +From: Aaron Rosen <aaronorosen@gmail.com> +Date: Wed, 3 Jun 2015 16:19:39 -0700 +Subject: [PATCH] Provide work around for 0.0.0.0/0 ::/0 for ipset + +Previously, the ipset_manager would pass in 0.0.0.0/0 or ::/0 if +these addresses were inputted as allowed address pairs. This causes +ipset to raise an error as it does not work with zero prefix sizes. +To solve this problem we use two ipset rules to represent this: + +Ipv4: 0.0.0.0/1 and 128.0.0.1/1 +IPv6: ::/1' and '8000::/1 + +All of this logic is handled via _sanitize_addresses() in the ipset_manager +which is called to convert the input. + +Closes-bug: 1461054 + +Conflicts: + neutron/agent/linux/ipset_manager.py + neutron/tests/unit/agent/linux/test_ipset_manager.py + +(cherry picked from commit 80a0fc3ba063e036b76e05e89b0cc54fc2d47c81) +--- + neutron/agent/linux/ipset_manager.py | 23 ++++++++++++++++++++++ + .../tests/unit/agent/linux/test_ipset_manager.py | 19 +++++++++++++++--- + 2 files changed, 39 insertions(+), 3 deletions(-) + +diff --git a/neutron/agent/linux/ipset_manager.py b/neutron/agent/linux/ipset_manager.py +index 0f76418..af59f1f 100644 +--- a/neutron/agent/linux/ipset_manager.py ++++ b/neutron/agent/linux/ipset_manager.py +@@ -11,6 +11,8 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + ++import netaddr ++ + from neutron.agent.linux import utils as linux_utils + from neutron.common import utils + +@@ -31,6 +33,26 @@ class IpsetManager(object): + self.namespace = namespace + self.ipset_sets = {} + ++ def _sanitize_addresses(self, addresses): ++ """This method converts any address to ipset format. ++ ++ If an address has a mask of /0 we need to cover to it to a mask of ++ /1 as ipset does not support /0 length addresses. Instead we use two ++ /1's to represent the /0. ++ """ ++ sanitized_addresses = [] ++ for ip in addresses: ++ if (netaddr.IPNetwork(ip).prefixlen == 0): ++ if(netaddr.IPNetwork(ip).version == 4): ++ sanitized_addresses.append('0.0.0.0/1') ++ sanitized_addresses.append('128.0.0.0/1') ++ elif (netaddr.IPNetwork(ip).version == 6): ++ sanitized_addresses.append('::/1') ++ sanitized_addresses.append('8000::/1') ++ else: ++ sanitized_addresses.append(ip) ++ return sanitized_addresses ++ + @staticmethod + def get_name(id, ethertype): + """Returns the given ipset name for an id+ethertype pair. +@@ -51,6 +73,7 @@ class IpsetManager(object): + add / remove new members, or swapped atomically if + that's faster. + """ ++ member_ips = self._sanitize_addresses(member_ips) + set_name = self.get_name(id, ethertype) + if not self.set_exists(id, ethertype): + # The initial creation is handled with create/refresh to +diff --git a/neutron/tests/unit/agent/linux/test_ipset_manager.py b/neutron/tests/unit/agent/linux/test_ipset_manager.py +index 4484008..a1c6dc5 100644 +--- a/neutron/tests/unit/agent/linux/test_ipset_manager.py ++++ b/neutron/tests/unit/agent/linux/test_ipset_manager.py +@@ -38,7 +38,7 @@ class BaseIpsetManagerTest(base.BaseTestCase): + def expect_set(self, addresses): + temp_input = ['create NETIPv4fake_sgid-new hash:net family inet'] + temp_input.extend('add NETIPv4fake_sgid-new %s' % ip +- for ip in addresses) ++ for ip in self.ipset._sanitize_addresses(addresses)) + input = '\n'.join(temp_input) + self.expected_calls.extend([ + mock.call(['ipset', 'restore', '-exist'], +@@ -55,13 +55,16 @@ class BaseIpsetManagerTest(base.BaseTestCase): + self.expected_calls.extend( + mock.call(['ipset', 'add', '-exist', TEST_SET_NAME, ip], + process_input=None, +- run_as_root=True) for ip in addresses) ++ run_as_root=True) ++ for ip in self.ipset._sanitize_addresses(addresses)) + + def expect_del(self, addresses): ++ + self.expected_calls.extend( + mock.call(['ipset', 'del', TEST_SET_NAME, ip], + process_input=None, +- run_as_root=True) for ip in addresses) ++ run_as_root=True) ++ for ip in self.ipset._sanitize_addresses(addresses)) + + def expect_create(self): + self.expected_calls.append( +@@ -113,6 +116,16 @@ class IpsetManagerTestCase(BaseIpsetManagerTest): + self.ipset.set_members(TEST_SET_ID, ETHERTYPE, FAKE_IPS) + self.verify_mock_calls() + ++ def test_set_members_adding_all_zero_ipv4(self): ++ self.expect_set(['0.0.0.0/0']) ++ self.ipset.set_members(TEST_SET_ID, ETHERTYPE, ['0.0.0.0/0']) ++ self.verify_mock_calls() ++ ++ def test_set_members_adding_all_zero_ipv6(self): ++ self.expect_set(['::/0']) ++ self.ipset.set_members(TEST_SET_ID, ETHERTYPE, ['::/0']) ++ self.verify_mock_calls() ++ + def test_destroy(self): + self.add_first_ip() + self.expect_destroy() +-- +1.9.1 diff --git a/sys-cluster/neutron/files/neutron-dhcp-agent.confd b/sys-cluster/neutron/files/neutron-dhcp-agent.confd new file mode 100644 index 000000000000..75ddba5ebb7a --- /dev/null +++ b/sys-cluster/neutron/files/neutron-dhcp-agent.confd @@ -0,0 +1,2 @@ +NEUTRON_CONFS=("/etc/neutron/neutron.conf" "/etc/neutron/dhcp_agent.ini") + diff --git a/sys-cluster/neutron/files/neutron-l3-agent.confd b/sys-cluster/neutron/files/neutron-l3-agent.confd new file mode 100644 index 000000000000..990278682fbd --- /dev/null +++ b/sys-cluster/neutron/files/neutron-l3-agent.confd @@ -0,0 +1,2 @@ +NEUTRON_CONFS=("/etc/neutron/neutron.conf" "/etc/neutron/l3_agent.ini") + diff --git a/sys-cluster/neutron/files/neutron-linuxbridge-agent.confd b/sys-cluster/neutron/files/neutron-linuxbridge-agent.confd new file mode 100644 index 000000000000..fdd4ed4865b4 --- /dev/null +++ b/sys-cluster/neutron/files/neutron-linuxbridge-agent.confd @@ -0,0 +1 @@ +NEUTRON_CONFS=("/etc/neutron/neutron.conf" "/etc/neutron/plugins/ml2/ml2_conf.ini" "/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini") diff --git a/sys-cluster/neutron/files/neutron-metadata-agent.confd b/sys-cluster/neutron/files/neutron-metadata-agent.confd new file mode 100644 index 000000000000..6a78b7abe3c9 --- /dev/null +++ b/sys-cluster/neutron/files/neutron-metadata-agent.confd @@ -0,0 +1,2 @@ +NEUTRON_CONFS=("/etc/neutron/neutron.conf" "/etc/neutron/metadata_agent.ini") + diff --git a/sys-cluster/neutron/files/neutron-openvswitch-agent.confd b/sys-cluster/neutron/files/neutron-openvswitch-agent.confd new file mode 100644 index 000000000000..30b10b69bbfb --- /dev/null +++ b/sys-cluster/neutron/files/neutron-openvswitch-agent.confd @@ -0,0 +1 @@ +NEUTRON_CONFS=("/etc/neutron/neutron.conf" "/etc/neutron/plugins/ml2/ml2_conf.ini" "/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini") diff --git a/sys-cluster/neutron/files/neutron-ovs-cleanup.confd b/sys-cluster/neutron/files/neutron-ovs-cleanup.confd new file mode 100644 index 000000000000..eba422c2c716 --- /dev/null +++ b/sys-cluster/neutron/files/neutron-ovs-cleanup.confd @@ -0,0 +1 @@ +NEUTRON_CONFS=("/etc/neutron/neutron.conf" "/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini") diff --git a/sys-cluster/neutron/files/neutron-server.confd b/sys-cluster/neutron/files/neutron-server.confd new file mode 100644 index 000000000000..9b6b2e63f8bc --- /dev/null +++ b/sys-cluster/neutron/files/neutron-server.confd @@ -0,0 +1 @@ +NEUTRON_CONFS=("/etc/neutron/neutron.conf" "/etc/neutron/plugin.ini") diff --git a/sys-cluster/neutron/files/neutron.initd b/sys-cluster/neutron/files/neutron.initd new file mode 100644 index 000000000000..ba666a2b506b --- /dev/null +++ b/sys-cluster/neutron/files/neutron.initd @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2014 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 +pidfile=/var/run/neutron/"${SVCNAME}".pid +required_files=(${NEUTRON_CONFS[@]:-/etc/neutron/neutron.conf}) +command_args="${required_files[@]/#/--config-file } --log-file /var/log/neutron/${SVCNAME#*-}.log" +start_stop_daemon_args="--quiet --user ${NEUTRON_USER:-neutron}" + +depend() { + need net +} + +start_pre() { + checkpath --directory --owner "${NEUTRON_USER:-neutron}":"${NEUTRON_GROUP:-neutron}" --mode 0755 "${NEUTRON_RUN:-/var/run/neutron}" +} diff --git a/sys-cluster/neutron/files/neutron.sudoersd b/sys-cluster/neutron/files/neutron.sudoersd new file mode 100644 index 000000000000..0b7002374538 --- /dev/null +++ b/sys-cluster/neutron/files/neutron.sudoersd @@ -0,0 +1,4 @@ +Defaults:neutron !requiretty + +neutron ALL = (root) NOPASSWD: /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf * + diff --git a/sys-cluster/neutron/metadata.xml b/sys-cluster/neutron/metadata.xml new file mode 100644 index 000000000000..8854aa52bc87 --- /dev/null +++ b/sys-cluster/neutron/metadata.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>openstack</herd> + <maintainer> + <email>prometheanfire@gentoo.org</email> + <name>Matthew Thode</name> + </maintainer> + <longdescription lang="en"> + Just like OpenStack Nova provides an API to dynamically request and + configure virtual servers, Neutron provides an API to dynamically request + and configure virtual networks. These networks connect "interfaces" from + other OpenStack services (e.g., vNICs from Nova VMs). The Neutron API + supports extensions to provide advanced network capabilities + (e.g., QoS, ACLs, network monitoring, etc). + </longdescription> + <use> + <flag name="compute-only">Only install things needed on compute hosts</flag> + <flag name="dhcp">Installs the initscripts for the neutron dhcp service</flag> + <flag name="l3">Installs the initscripts for the neutron l3 agent service</flag> + <flag name="metadata">Installs the initscripts for the neutron metadata agent service</flag> + <flag name="openvswitch">Installs the initscripts for the neutron openvswitch agent service</flag> + <flag name="linuxbridge">Installs the initscripts for the neutron linuxbridge agent service</flag> + <flag name="server">Installs the initscripts for the neutron server service</flag> + </use> + <upstream> + <remote-id type="launchpad">neutron</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/neutron/neutron-2015.1.0-r2.ebuild b/sys-cluster/neutron/neutron-2015.1.0-r2.ebuild new file mode 100644 index 000000000000..208f48e79db6 --- /dev/null +++ b/sys-cluster/neutron/neutron-2015.1.0-r2.ebuild @@ -0,0 +1,249 @@ +# 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 linux-info user + +DESCRIPTION="A virtual network service for Openstack" +HOMEPAGE="https://launchpad.net/neutron" +SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="compute-only dhcp doc l3 metadata openvswitch linuxbridge server test sqlite mysql postgres" +REQUIRED_USE="!compute-only? ( || ( mysql postgres sqlite ) ) + compute-only? ( !mysql !postgres !sqlite !dhcp !l3 !metadata !server + || ( openvswitch linuxbridge ) )" + +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/cliff-1.10.0[${PYTHON_USEDEP}] + <dev-python/cliff-1.11.0[${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/subunit-0.0.18[${PYTHON_USEDEP}] + >=dev-python/requests-mock-0.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/oslo-sphinx-2.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}] + >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}] + >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}] + !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}] + >=dev-python/testscenarios-0.4[${PYTHON_USEDEP}] + >=dev-python/webtest-2.0[${PYTHON_USEDEP}] + >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}] + <dev-python/oslotest-1.6.0[${PYTHON_USEDEP}] + >=dev-python/tempest-lib-0.4.0[${PYTHON_USEDEP}] + )" + +RDEPEND=" + dev-python/paste[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}] + >=dev-python/routes-1.12.3[${PYTHON_USEDEP}] + !~dev-python/routes-2.0[${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/httplib2-0.7.5[${PYTHON_USEDEP}] + >=dev-python/requests-2.2.0[${PYTHON_USEDEP}] + !~dev-python/requests-2.4.0[${PYTHON_USEDEP}] + dev-python/jsonrpclib[${PYTHON_USEDEP}] + >=dev-python/jinja-2.6[${PYTHON_USEDEP}] + >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}] + <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}] + >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}] + >=dev-python/python-neutronclient-2.3.11[${PYTHON_USEDEP}] + <dev-python/python-neutronclient-3.5.0[${PYTHON_USEDEP}] + >=dev-python/retrying-1.2.3[${PYTHON_USEDEP}] + !~dev-python/retrying-1.3.0[${PYTHON_USEDEP}] + compute-only? ( + >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}] + <=dev-python/sqlalchemy-0.9.99[${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/webob-1.2.3[${PYTHON_USEDEP}] + >=dev-python/python-keystoneclient-1.1.0[${PYTHON_USEDEP}] + <dev-python/python-keystoneclient-1.4.0[${PYTHON_USEDEP}] + >=dev-python/alembic-0.7.2[${PYTHON_USEDEP}] + >=dev-python/six-1.9.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}] + <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}] + >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}] + <dev-python/oslo-config-1.10.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-i18n-1.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-i18n-1.6.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/python-novaclient-2.22.0[${PYTHON_USEDEP}] + <dev-python/python-novaclient-2.24.0[${PYTHON_USEDEP}] + dev-python/pyudev[${PYTHON_USEDEP}] + sys-apps/iproute2 + net-misc/bridge-utils + net-firewall/ipset + net-firewall/iptables + net-firewall/ebtables + openvswitch? ( net-misc/openvswitch ) + dhcp? ( net-dns/dnsmasq[dhcp-tools] )" + +PATCHES=( + "${FILESDIR}/cve-2015-3221_2015.1.0.patch" +) + +pkg_setup() { + linux-info_pkg_setup + CONFIG_CHECK_MODULES="VLAN_8021Q IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \ + IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 \ + NF_NAT_IPV4 NF_NAT NF_CONNTRACK IP_NF_FILTER IP_NF_IPTABLES NETFILTER_XTABLES" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel" + done + fi + enewgroup neutron + enewuser neutron -1 -1 /var/lib/neutron neutron +} + +pkg_config() { + fperms 0700 /var/log/neutron + fowners neutron:neutron /var/log neutron +} + +src_prepare() { + #it's /bin/ip not /sbin/ip + sed -i 's/sbin\/ip\,/bin\/ip\,/g' etc/neutron/rootwrap.d/* + distutils-r1_src_prepare +} + +python_compile_all() { + use doc && make -C doc html +} + +python_test() { + # https://bugs.launchpad.net/neutron/+bug/1234857 + # https://bugs.launchpad.net/swift/+bug/1249727 + # https://bugs.launchpad.net/neutron/+bug/1251657 + # turn multiprocessing off, testr will use it --parallel + local DISTUTILS_NO_PARALLEL_BUILD=1 + # Move tests out that attempt net connection, have failures + mv $(find . -name test_ovs_tunnel.py) . || die + sed -e 's:test_app_using_ipv6_and_ssl:_&:' \ + -e 's:test_start_random_port_with_ipv6:_&:' \ + -i neutron/tests/unit/test_wsgi.py || die + testr init + testr run --parallel || die "failed testsuite under python2.7" +} + +python_install() { + distutils-r1_python_install + if use server; then + newinitd "${FILESDIR}/neutron.initd" "neutron-server" + newconfd "${FILESDIR}/neutron-server.confd" "neutron-server" + dosym /etc/neutron/plugin.ini /etc/neutron/plugins/ml2/ml2_conf.ini + fi + if use dhcp; then + newinitd "${FILESDIR}/neutron.initd" "neutron-dhcp-agent" + newconfd "${FILESDIR}/neutron-dhcp-agent.confd" "neutron-dhcp-agent" + fi + if use l3; then + newinitd "${FILESDIR}/neutron.initd" "neutron-l3-agent" + newconfd "${FILESDIR}/neutron-l3-agent.confd" "neutron-l3-agent" + fi + if use metadata; then + newinitd "${FILESDIR}/neutron.initd" "neutron-metadata-agent" + newconfd "${FILESDIR}/neutron-metadata-agent.confd" "neutron-metadata-agent" + fi + if use openvswitch; then + newinitd "${FILESDIR}/neutron.initd" "neutron-openvswitch-agent" + newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-openvswitch-agent" + newinitd "${FILESDIR}/neutron.initd" "neutron-ovs-cleanup" + newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-ovs-cleanup" + fi + if use linuxbridge; then + newinitd "${FILESDIR}/neutron.initd" "neutron-linuxbridge-agent" + newconfd "${FILESDIR}/neutron-linuxbridge-agent.confd" "neutron-linuxbridge-agent" + fi + diropts -m 755 -o neutron -g neutron + dodir /var/log/neutron /var/lib/neutron + keepdir /etc/neutron + insinto /etc/neutron + insopts -m 0640 -o neutron -g neutron + + doins etc/* + # stupid renames + rm "${D}etc/neutron/quantum" + insinto /etc/neutron + doins -r "etc/neutron/plugins" + insopts -m 0640 -o root -g root + doins "etc/rootwrap.conf" + doins -r "etc/neutron/rootwrap.d" + + insopts -m 0644 + insinto "/usr/lib64/python2.7/site-packages/neutron/db/migration/alembic_migrations/" + doins -r "neutron/db/migration/alembic_migrations/versions" + + #add sudoers definitions for user neutron + insinto /etc/sudoers.d/ + insopts -m 0440 -o root -g root + newins "${FILESDIR}/neutron.sudoersd" neutron + + #remove superfluous stuff + rm -R "${D}/usr/etc/" +} + +python_install_all() { + use doc && local HTML_DOCS=( doc/build/html/. ) + distutils-r1_python_install_all +} + +pkg_postinst() { + elog + elog "neutron-server's conf.d file may need updating to include additional ini files" + elog "We currently assume the ml2 plugin will be used but do not make assumptions" + elog "on if you will use openvswitch or linuxbridge (or something else)" + elog + elog "Other conf.d files may need updating too, but should be good for the default use case" + elog +} diff --git a/sys-cluster/neutron/neutron-2015.1.1.ebuild b/sys-cluster/neutron/neutron-2015.1.1.ebuild new file mode 100644 index 000000000000..64baa51968f5 --- /dev/null +++ b/sys-cluster/neutron/neutron-2015.1.1.ebuild @@ -0,0 +1,252 @@ +# 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 linux-info user + +DESCRIPTION="A virtual network service for Openstack" +HOMEPAGE="https://launchpad.net/neutron" +SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="compute-only dhcp doc l3 metadata openvswitch linuxbridge server test sqlite mysql postgres" +REQUIRED_USE="!compute-only? ( || ( mysql postgres sqlite ) ) + compute-only? ( !mysql !postgres !sqlite !dhcp !l3 !metadata !server + || ( openvswitch linuxbridge ) )" + +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/cliff-1.10.0[${PYTHON_USEDEP}] + <dev-python/cliff-1.11.0[${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/subunit-0.0.18[${PYTHON_USEDEP}] + >=dev-python/requests-mock-0.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/oslo-sphinx-2.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}] + >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}] + >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}] + !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}] + >=dev-python/testscenarios-0.4[${PYTHON_USEDEP}] + >=dev-python/webtest-2.0[${PYTHON_USEDEP}] + >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}] + <dev-python/oslotest-1.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/paste[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}] + >=dev-python/routes-1.12.3[${PYTHON_USEDEP}] + !~dev-python/routes-2.0[${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/httplib2-0.7.5[${PYTHON_USEDEP}] + >=dev-python/requests-2.2.0[${PYTHON_USEDEP}] + !~dev-python/requests-2.4.0[${PYTHON_USEDEP}] + dev-python/jsonrpclib[${PYTHON_USEDEP}] + >=dev-python/jinja-2.6[${PYTHON_USEDEP}] + >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}] + <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}] + >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}] + >=dev-python/python-neutronclient-2.3.11[${PYTHON_USEDEP}] + <dev-python/python-neutronclient-2.5.0[${PYTHON_USEDEP}] + >=dev-python/retrying-1.2.3[${PYTHON_USEDEP}] + !~dev-python/retrying-1.3.0[${PYTHON_USEDEP}] + compute-only? ( + >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}] + <=dev-python/sqlalchemy-0.9.99[${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/webob-1.2.3[${PYTHON_USEDEP}] + >=dev-python/python-keystoneclient-1.2.0[${PYTHON_USEDEP}] + <dev-python/python-keystoneclient-1.4.0[${PYTHON_USEDEP}] + >=dev-python/alembic-0.7.2[${PYTHON_USEDEP}] + >=dev-python/six-1.9.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}] + <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}] + >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}] + <dev-python/oslo-config-1.10.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-i18n-1.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-i18n-1.6.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/python-novaclient-2.22.0[${PYTHON_USEDEP}] + <dev-python/python-novaclient-2.24.0[${PYTHON_USEDEP}] + dev-python/pyudev[${PYTHON_USEDEP}] + sys-apps/iproute2 + net-misc/bridge-utils + net-firewall/ipset + net-firewall/iptables + net-firewall/ebtables + openvswitch? ( net-misc/openvswitch ) + dhcp? ( net-dns/dnsmasq[dhcp-tools] )" + +PATCHES=( + +) + +pkg_setup() { + linux-info_pkg_setup + CONFIG_CHECK_MODULES="VLAN_8021Q IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \ + IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 \ + NF_NAT_IPV4 NF_NAT NF_CONNTRACK IP_NF_FILTER IP_NF_IPTABLES NETFILTER_XTABLES" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel" + done + fi + enewgroup neutron + enewuser neutron -1 -1 /var/lib/neutron neutron +} + +pkg_config() { + fperms 0700 /var/log/neutron + fowners neutron:neutron /var/log neutron +} + +src_prepare() { + #it's /bin/ip not /sbin/ip + sed -i 's/sbin\/ip\,/bin\/ip\,/g' etc/neutron/rootwrap.d/* + distutils-r1_src_prepare +} + +python_compile_all() { + use doc && make -C doc html +} + +python_test() { + # https://bugs.launchpad.net/neutron/+bug/1234857 + # https://bugs.launchpad.net/swift/+bug/1249727 + # https://bugs.launchpad.net/neutron/+bug/1251657 + # turn multiprocessing off, testr will use it --parallel + local DISTUTILS_NO_PARALLEL_BUILD=1 + # Move tests out that attempt net connection, have failures + mv $(find . -name test_ovs_tunnel.py) . || die + sed -e 's:test_app_using_ipv6_and_ssl:_&:' \ + -e 's:test_start_random_port_with_ipv6:_&:' \ + -i neutron/tests/unit/test_wsgi.py || die + testr init + testr run --parallel || die "failed testsuite under python2.7" +} + +python_install() { + distutils-r1_python_install + if use server; then + newinitd "${FILESDIR}/neutron.initd" "neutron-server" + newconfd "${FILESDIR}/neutron-server.confd" "neutron-server" + dosym /etc/neutron/plugin.ini /etc/neutron/plugins/ml2/ml2_conf.ini + fi + if use dhcp; then + newinitd "${FILESDIR}/neutron.initd" "neutron-dhcp-agent" + newconfd "${FILESDIR}/neutron-dhcp-agent.confd" "neutron-dhcp-agent" + fi + if use l3; then + newinitd "${FILESDIR}/neutron.initd" "neutron-l3-agent" + newconfd "${FILESDIR}/neutron-l3-agent.confd" "neutron-l3-agent" + fi + if use metadata; then + newinitd "${FILESDIR}/neutron.initd" "neutron-metadata-agent" + newconfd "${FILESDIR}/neutron-metadata-agent.confd" "neutron-metadata-agent" + fi + if use openvswitch; then + newinitd "${FILESDIR}/neutron.initd" "neutron-openvswitch-agent" + newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-openvswitch-agent" + newinitd "${FILESDIR}/neutron.initd" "neutron-ovs-cleanup" + newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-ovs-cleanup" + fi + if use linuxbridge; then + newinitd "${FILESDIR}/neutron.initd" "neutron-linuxbridge-agent" + newconfd "${FILESDIR}/neutron-linuxbridge-agent.confd" "neutron-linuxbridge-agent" + fi + diropts -m 755 -o neutron -g neutron + dodir /var/log/neutron /var/lib/neutron + keepdir /etc/neutron + insinto /etc/neutron + insopts -m 0640 -o neutron -g neutron + + doins etc/* + # stupid renames + rm "${D}etc/neutron/quantum" + insinto /etc/neutron + doins -r "etc/neutron/plugins" + insopts -m 0640 -o root -g root + doins "etc/rootwrap.conf" + doins -r "etc/neutron/rootwrap.d" + + insopts -m 0644 + insinto "/usr/lib64/python2.7/site-packages/neutron/db/migration/alembic_migrations/" + doins -r "neutron/db/migration/alembic_migrations/versions" + + #add sudoers definitions for user neutron + insinto /etc/sudoers.d/ + insopts -m 0440 -o root -g root + newins "${FILESDIR}/neutron.sudoersd" neutron + + #remove superfluous stuff + rm -R "${D}/usr/etc/" +} + +python_install_all() { + use doc && local HTML_DOCS=( doc/build/html/. ) + distutils-r1_python_install_all +} + +pkg_postinst() { + elog + elog "neutron-server's conf.d file may need updating to include additional ini files" + elog "We currently assume the ml2 plugin will be used but do not make assumptions" + elog "on if you will use openvswitch or linuxbridge (or something else)" + elog + elog "Other conf.d files may need updating too, but should be good for the default use case" + elog +} diff --git a/sys-cluster/neutron/neutron-2015.1.9999.ebuild b/sys-cluster/neutron/neutron-2015.1.9999.ebuild new file mode 100644 index 000000000000..70e1e43e5b51 --- /dev/null +++ b/sys-cluster/neutron/neutron-2015.1.9999.ebuild @@ -0,0 +1,253 @@ +# 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 git-2 linux-info user + +DESCRIPTION="A virtual network service for Openstack" +HOMEPAGE="https://launchpad.net/neutron" +EGIT_REPO_URI="https://github.com/openstack/neutron.git" +EGIT_BRANCH="stable/kilo" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="" +IUSE="compute-only dhcp doc l3 metadata openvswitch linuxbridge server test sqlite mysql postgres" +REQUIRED_USE="!compute-only? ( || ( mysql postgres sqlite ) ) + compute-only? ( !mysql !postgres !sqlite !dhcp !l3 !metadata !server + || ( openvswitch linuxbridge ) )" + +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/cliff-1.10.0[${PYTHON_USEDEP}] + <dev-python/cliff-1.11.0[${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/subunit-0.0.18[${PYTHON_USEDEP}] + >=dev-python/requests-mock-0.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/oslo-sphinx-2.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}] + >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}] + >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}] + !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}] + >=dev-python/testscenarios-0.4[${PYTHON_USEDEP}] + >=dev-python/webtest-2.0[${PYTHON_USEDEP}] + >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}] + <dev-python/oslotest-1.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/paste[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}] + >=dev-python/routes-1.12.3[${PYTHON_USEDEP}] + !~dev-python/routes-2.0[${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/httplib2-0.7.5[${PYTHON_USEDEP}] + >=dev-python/requests-2.2.0[${PYTHON_USEDEP}] + !~dev-python/requests-2.4.0[${PYTHON_USEDEP}] + dev-python/jsonrpclib[${PYTHON_USEDEP}] + >=dev-python/jinja-2.6[${PYTHON_USEDEP}] + >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}] + <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}] + >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}] + >=dev-python/python-neutronclient-2.3.11[${PYTHON_USEDEP}] + <dev-python/python-neutronclient-2.5.0[${PYTHON_USEDEP}] + >=dev-python/retrying-1.2.3[${PYTHON_USEDEP}] + !~dev-python/retrying-1.3.0[${PYTHON_USEDEP}] + compute-only? ( + >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}] + <=dev-python/sqlalchemy-0.9.99[${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/webob-1.2.3[${PYTHON_USEDEP}] + >=dev-python/python-keystoneclient-1.2.0[${PYTHON_USEDEP}] + <dev-python/python-keystoneclient-1.4.0[${PYTHON_USEDEP}] + >=dev-python/alembic-0.7.2[${PYTHON_USEDEP}] + >=dev-python/six-1.9.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}] + <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}] + >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}] + <dev-python/oslo-config-1.10.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-i18n-1.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-i18n-1.6.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/python-novaclient-2.22.0[${PYTHON_USEDEP}] + <dev-python/python-novaclient-2.24.0[${PYTHON_USEDEP}] + dev-python/pyudev[${PYTHON_USEDEP}] + sys-apps/iproute2 + net-misc/bridge-utils + net-firewall/ipset + net-firewall/iptables + net-firewall/ebtables + openvswitch? ( net-misc/openvswitch ) + dhcp? ( net-dns/dnsmasq[dhcp-tools] )" + +PATCHES=( + +) + +pkg_setup() { + linux-info_pkg_setup + CONFIG_CHECK_MODULES="VLAN_8021Q IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \ + IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 \ + NF_NAT_IPV4 NF_NAT NF_CONNTRACK IP_NF_FILTER IP_NF_IPTABLES NETFILTER_XTABLES" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel" + done + fi + enewgroup neutron + enewuser neutron -1 -1 /var/lib/neutron neutron +} + +pkg_config() { + fperms 0700 /var/log/neutron + fowners neutron:neutron /var/log neutron +} + +src_prepare() { + #it's /bin/ip not /sbin/ip + sed -i 's/sbin\/ip\,/bin\/ip\,/g' etc/neutron/rootwrap.d/* + distutils-r1_src_prepare +} + +python_compile_all() { + use doc && make -C doc html +} + +python_test() { + # https://bugs.launchpad.net/neutron/+bug/1234857 + # https://bugs.launchpad.net/swift/+bug/1249727 + # https://bugs.launchpad.net/neutron/+bug/1251657 + # turn multiprocessing off, testr will use it --parallel + local DISTUTILS_NO_PARALLEL_BUILD=1 + # Move tests out that attempt net connection, have failures + mv $(find . -name test_ovs_tunnel.py) . || die + sed -e 's:test_app_using_ipv6_and_ssl:_&:' \ + -e 's:test_start_random_port_with_ipv6:_&:' \ + -i neutron/tests/unit/test_wsgi.py || die + testr init + testr run --parallel || die "failed testsuite under python2.7" +} + +python_install() { + distutils-r1_python_install + if use server; then + newinitd "${FILESDIR}/neutron.initd" "neutron-server" + newconfd "${FILESDIR}/neutron-server.confd" "neutron-server" + dosym /etc/neutron/plugin.ini /etc/neutron/plugins/ml2/ml2_conf.ini + fi + if use dhcp; then + newinitd "${FILESDIR}/neutron.initd" "neutron-dhcp-agent" + newconfd "${FILESDIR}/neutron-dhcp-agent.confd" "neutron-dhcp-agent" + fi + if use l3; then + newinitd "${FILESDIR}/neutron.initd" "neutron-l3-agent" + newconfd "${FILESDIR}/neutron-l3-agent.confd" "neutron-l3-agent" + fi + if use metadata; then + newinitd "${FILESDIR}/neutron.initd" "neutron-metadata-agent" + newconfd "${FILESDIR}/neutron-metadata-agent.confd" "neutron-metadata-agent" + fi + if use openvswitch; then + newinitd "${FILESDIR}/neutron.initd" "neutron-openvswitch-agent" + newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-openvswitch-agent" + newinitd "${FILESDIR}/neutron.initd" "neutron-ovs-cleanup" + newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-ovs-cleanup" + fi + if use linuxbridge; then + newinitd "${FILESDIR}/neutron.initd" "neutron-linuxbridge-agent" + newconfd "${FILESDIR}/neutron-linuxbridge-agent.confd" "neutron-linuxbridge-agent" + fi + diropts -m 755 -o neutron -g neutron + dodir /var/log/neutron /var/lib/neutron + keepdir /etc/neutron + insinto /etc/neutron + insopts -m 0640 -o neutron -g neutron + + doins etc/* + # stupid renames + rm "${D}etc/neutron/quantum" + insinto /etc/neutron + doins -r "etc/neutron/plugins" + insopts -m 0640 -o root -g root + doins "etc/rootwrap.conf" + doins -r "etc/neutron/rootwrap.d" + + insopts -m 0644 + insinto "/usr/lib64/python2.7/site-packages/neutron/db/migration/alembic_migrations/" + doins -r "neutron/db/migration/alembic_migrations/versions" + + #add sudoers definitions for user neutron + insinto /etc/sudoers.d/ + insopts -m 0440 -o root -g root + newins "${FILESDIR}/neutron.sudoersd" neutron + + #remove superfluous stuff + rm -R "${D}/usr/etc/" +} + +python_install_all() { + use doc && local HTML_DOCS=( doc/build/html/. ) + distutils-r1_python_install_all +} + +pkg_postinst() { + elog + elog "neutron-server's conf.d file may need updating to include additional ini files" + elog "We currently assume the ml2 plugin will be used but do not make assumptions" + elog "on if you will use openvswitch or linuxbridge (or something else)" + elog + elog "Other conf.d files may need updating too, but should be good for the default use case" + elog +} diff --git a/sys-cluster/nova/Manifest b/sys-cluster/nova/Manifest new file mode 100644 index 000000000000..cd1928073de4 --- /dev/null +++ b/sys-cluster/nova/Manifest @@ -0,0 +1,2 @@ +DIST nova-2015.1.0.tar.gz 4541653 SHA256 7279d18cee6f13e19443f7cdc6a296566674d66049ee5c9af6d1c973115f16d7 SHA512 a315f7bbb73de4f26645ffed42663af377ab5cd55db82eedbcc1411208e276bc5dc68c2ccef07a35943f6643f3862ca44a9b51f8e259322bb176c74485d98cc5 WHIRLPOOL d885527d6479cd1c760b6291732c5a7e01b472f536d4b2a55cd4b829f32e4d4b213d946870b4e52c47a86973c7d97fd89ebaed752256e5286c91222973c68824 +DIST nova-2015.1.1.tar.gz 4544374 SHA256 d9b480827995727f2ccc06e4b5709e689e8a466006e07157ce92bc9d074e197e SHA512 7aad21fc59143cd4acab4a97980aafa9b1216789a0206c0d3098f5d96257e40baa77ef45696982648cc82a7f988f40525621da402871eeb398b21699932cea64 WHIRLPOOL 08b94f93be1e5821cfaaa835f33af2ddc23e75cea3dc6f1ca82be80317db95abd38dda336cca212cd68111fa65ca8c53c62f684e07acd2c1906e8d4cfc989905 diff --git a/sys-cluster/nova/files/nova-sudoers b/sys-cluster/nova/files/nova-sudoers new file mode 100644 index 000000000000..f15b3285b7d4 --- /dev/null +++ b/sys-cluster/nova/files/nova-sudoers @@ -0,0 +1,3 @@ +Defaults:nova !requiretty + +nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap diff --git a/sys-cluster/nova/files/nova.initd b/sys-cluster/nova/files/nova.initd new file mode 100644 index 000000000000..14fae14dd88d --- /dev/null +++ b/sys-cluster/nova/files/nova.initd @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Starts ${SVCNAME} service for OpenStack" + +command=/usr/bin/${SVCNAME} +command_background=yes +pidfile=/var/run/nova/${SVCNAME}.pid +required_files=/etc/nova/nova.conf +start_stop_daemon_args="--quiet --user ${NOVA_USER:-nova}" + +depend() { + need net +} + +start_pre() { + checkpath --directory --owner ${NOVA_USER:-nova}:${NOVA_GROUP:-nova} --mode 0775 ${NOVA_RUN:-/var/run/nova} + checkpath --directory --owner ${NOVA_USER:-nova}:${NOVA_GROUP:-nova} --mode 0775 ${NOVA_RUN:-/var/lock/nova} +} diff --git a/sys-cluster/nova/files/openstack-scsi-disk.rules b/sys-cluster/nova/files/openstack-scsi-disk.rules new file mode 100644 index 000000000000..ee44d5066291 --- /dev/null +++ b/sys-cluster/nova/files/openstack-scsi-disk.rules @@ -0,0 +1,2 @@ +KERNEL=="sd*", SUBSYSTEM=="block", ENV{ID_BUS}=="scsi", PROGRAM="/etc/nova/scsi-openscsi-link.sh %b $id", SYMLINK+="disk/by-path/%c" + diff --git a/sys-cluster/nova/files/scsi-openscsi-link.sh b/sys-cluster/nova/files/scsi-openscsi-link.sh new file mode 100644 index 000000000000..197eac4438e5 --- /dev/null +++ b/sys-cluster/nova/files/scsi-openscsi-link.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# Author: Geaaru +# Date: October 23, 2014 +# Version: 0.1.0 +# License: GPL 2.0 + +# Description: Script for udev symlink creation of +# scsi disk attached and visible under +# /dev/disk/by-path/ with name convention +# used in openstack LVM iscsi driver. +# +# Requirements: lsscsi (for retrieve LUN ID, I don't know how can i do that from udev/iscsiadm) + +# Rules for UDEV must in this format: +# KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/nova/scsi-openscsi-link.sh %b",SYMLINK+="disk/by-path/%c" + +# NOTE: it seems that input params %b or others are not passed to script. +# I try to retrieve it from environment variables. + +if [[ -z "$DEVTYPE" || -z "$ID_BUS" ]] ; then + exit 1 +fi + +echo "--------------------" >> /tmp/udev.log +echo "ENV => `env`" >> /tmp/udev.log +echo "--------------------" >> /tmp/udev.log + +if [[ $DEVTYPE != "disk" || $ID_BUS != "scsi" ]]; then + echo "EXIT 1" >> /tmp/udev.log + exit 1 +fi + +# ID_SCSI variable what identify ? + +HOST=`echo "$DEVPATH" | awk '{ split($0, word, "/"); print substr(word[4], 5); }'` + + + +# Bins +iscsiadm=/usr/sbin/iscsiadm +lsscsi=/usr/bin/lsscsi + +[ -e /sys/class/iscsi_host ] || exit 1 + +# Create file path like this: +# /sys/class/iscsi_host/host11/device/session3/iscsi_session/session3/targetname +file="/sys/class/iscsi_host/host${HOST}/device/session*/iscsi_session*/session*/targetname" + +target_iqn=$(cat ${file}) + +if [ -z "${target_iqn}" ] ; then + echo "EXIT 2" >> /tmp/udev.log + exit 1 +fi + +# Retrieve target_port because I can't retrieve it with iscsi_id +# /lib/udev/scsi_id -g -x /dev/sdg +# ID_SCSI=1 +# ID_VENDOR=IET +# ID_VENDOR_ENC=IET\x20\x20\x20\x20\x20 +# ID_MODEL=VIRTUAL-DISK +# ID_MODEL_ENC=VIRTUAL-DISK +# ID_REVISION=0001 +# ID_TYPE=disk +# ID_SERIAL=1IET_00010001 +# ID_SERIAL_SHORT=IET_00010001 +# ID_SCSI_SERIAL= beaf11a + +# iscsiadm -m node | grep --colour=none iqn.2014-09.org.openstack:vol-cinder-f48f0a69-e871-4c47-9cd3-3ccb8c811363 | cut -d',' -f 1 + +tp_ispresent=$(${iscsiadm} -m node | grep --colour=none ${target_iqn} | wc -l) +if [ x$tp_ispresent = x0 ] ; then + # Target is not present. Ignore it. + echo "EXIT 3" >> /tmp/udev.log + exit 1 +fi + +target_portal=$(${iscsiadm} -m node | grep --colour=none ${target_iqn} | cut -d',' -f 1) +#target=$(${iscsiadm} -m node | grep --colour=none ${target_iqn} | cut -d' ' -f 1) +#target_portal=$(echo ${target} | cut -d',' -f 1) +target_lun=$(${lsscsi} | grep $DEVNAME | sed 's/.[0-9]*:[0-9]*:[0-9]*:\([0-9]*\).*/\1/') + +echo "TARGET_PORTAL=$target_portal" >> /tmp/udev.log +echo "TARGET_LUN=$target_lun" >> /tmp/udev.log + +linkname="ip-${target_portal}-iscsi-${target_iqn}-lun-${target_lun}" + +echo "RETURN ${linkname}" >> /tmp/udev.log + +echo "${linkname}" + +exit 0 diff --git a/sys-cluster/nova/metadata.xml b/sys-cluster/nova/metadata.xml new file mode 100644 index 000000000000..fe91ad55627d --- /dev/null +++ b/sys-cluster/nova/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>openstack</herd> + <maintainer> + <email>prometheanfire@gentoo.org</email> + <name>Matthew Thode</name> + </maintainer> + <longdescription lang="en"> + Nova is a cloud computing fabric controller + (the main part of an IaaS system). It is written in Python. + </longdescription> + <use> + <flag name="compute">Installs the initscripts for the nova volume service</flag> + <flag name="compute-only">only install stuff needed for a compute host</flag> + <flag name="iscsi">Installs iscsi helper udev scripts</flag> + <flag name="kvm">qemu-kvm hypervisor support</flag> + <flag name="memcached">Installs the memcached server</flag> + <flag name="novncproxy">Installs the initscripts for the nova novncproxy service</flag> + <flag name="openvswitch">Installs openvswitch for the neutron openvswitch support</flag> + <flag name="rabbitmq">Installs the rabbitmq server</flag> + <flag name="xen">xen hypervisor support</flag> + </use> + <upstream> + <remote-id type="launchpad">nova</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/nova/nova-2015.1.0-r3.ebuild b/sys-cluster/nova/nova-2015.1.0-r3.ebuild new file mode 100644 index 000000000000..510ddaa4be35 --- /dev/null +++ b/sys-cluster/nova/nova-2015.1.0-r3.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 linux-info multilib user + +DESCRIPTION="A cloud computing fabric controller (main part of an IaaS system) written in Python" +HOMEPAGE="https://launchpad.net/nova" +SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+compute compute-only +kvm +memcached +novncproxy openvswitch +rabbitmq sqlite mysql postgres xen iscsi" +REQUIRED_USE="!compute-only? ( || ( mysql postgres sqlite ) ) + compute-only? ( compute !rabbitmq !memcached !mysql !postgres !sqlite ) + compute? ( ^^ ( kvm xen ) )" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/pbr-0.8[${PYTHON_USEDEP}] + <dev-python/pbr-1.0[${PYTHON_USEDEP}] + app-admin/sudo" + +# barbicanclient is in here for doc generation +RDEPEND=" + compute-only? ( + >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}] + <=dev-python/sqlalchemy-0.9.99[${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/boto-2.32.1[${PYTHON_USEDEP}] + >=dev-python/decorator-3.4.0[${PYTHON_USEDEP}] + >=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}] + !~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}] + >=dev-python/jinja-2.6[${PYTHON_USEDEP}] + >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}] + <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}] + >=dev-python/lxml-2.3[${PYTHON_USEDEP}] + >=dev-python/routes-1.12.3-r1[${PYTHON_USEDEP}] + !~dev-python/routes-2.0[${PYTHON_USEDEP}] + >=dev-python/webob-1.2.3[${PYTHON_USEDEP}] + >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}] + dev-python/paste[${PYTHON_USEDEP}] + ~dev-python/sqlalchemy-migrate-0.9.5[${PYTHON_USEDEP}] + >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}] + >=dev-python/paramiko-1.13.0[${PYTHON_USEDEP}] + dev-python/pyasn1[${PYTHON_USEDEP}] + >=dev-python/Babel-1.3[${PYTHON_USEDEP}] + >=dev-python/iso8601-0.1.9[${PYTHON_USEDEP}] + >=dev-python/jsonschema-2.0.0[${PYTHON_USEDEP}] + <dev-python/jsonschema-3.0.0[${PYTHON_USEDEP}] + >=dev-python/python-cinderclient-1.1.0[${PYTHON_USEDEP}] + <dev-python/python-cinderclient-1.2.0[${PYTHON_USEDEP}] + >=dev-python/python-neutronclient-2.3.11[${PYTHON_USEDEP}] + <dev-python/python-neutronclient-2.5.0[${PYTHON_USEDEP}] + >=dev-python/python-glanceclient-0.15.0[${PYTHON_USEDEP}] + <dev-python/python-glanceclient-0.18.0[${PYTHON_USEDEP}] + >=dev-python/python-barbicanclient-3.0.1[${PYTHON_USEDEP}] + <dev-python/python-barbicanclient-3.1.0[${PYTHON_USEDEP}] + >=dev-python/six-1.9.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}] + <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}] + >=dev-python/websockify-0.6.0[${PYTHON_USEDEP}] + <dev-python/websockify-0.7.0[${PYTHON_USEDEP}] + >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}] + <dev-python/oslo-config-1.10.0[${PYTHON_USEDEP}] + >=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}] + <dev-python/oslo-context-0.3.0[${PYTHON_USEDEP}] + >=dev-python/oslo-log-1.0.0[${PYTHON_USEDEP}] + <dev-python/oslo-log-1.1.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/oslo-db-1.7.0[${PYTHON_USEDEP}] + <dev-python/oslo-db-1.8.0[${PYTHON_USEDEP}] + >=dev-python/oslo-rootwrap-1.6.0[${PYTHON_USEDEP}] + <dev-python/oslo-rootwrap-1.7.0[${PYTHON_USEDEP}] + >=dev-python/oslo-messaging-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-messaging-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-i18n-1.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-i18n-1.6.0[${PYTHON_USEDEP}] + >=dev-python/rfc3986-0.2.0[${PYTHON_USEDEP}] + >=dev-python/oslo-middleware-1.0.0[${PYTHON_USEDEP}] + <dev-python/oslo-middleware-1.1.0[${PYTHON_USEDEP}] + >=dev-python/psutil-1.1.1[${PYTHON_USEDEP}] + <dev-python/psutil-2.0.0[${PYTHON_USEDEP}] + dev-python/libvirt-python[${PYTHON_USEDEP}] + novncproxy? ( www-apps/novnc ) + sys-apps/iproute2 + openvswitch? ( net-misc/openvswitch ) + rabbitmq? ( net-misc/rabbitmq-server ) + memcached? ( net-misc/memcached ) + sys-fs/sysfsutils + sys-fs/multipath-tools + net-misc/bridge-utils + compute? ( + app-cdr/cdrkit + kvm? ( app-emulation/qemu ) + xen? ( app-emulation/xen + app-emulation/xen-tools ) + ) + iscsi? ( + sys-fs/lsscsi + )" + +PATCHES=( +) + +pkg_setup() { + linux-info_pkg_setup + CONFIG_CHECK_MODULES="BLK_DEV_NBD VHOST_NET IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \ + IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 IP_NF_FILTER IP_NF_IPTABLES \ + NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 NF_NAT_IPV4 NF_NAT NF_CONNTRACK NETFILTER_XTABLES \ + ISCSI_TCP SCSI_DH DM_MULTIPATH DM_SNAPSHOT" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel" + done + fi + enewgroup nova + enewuser nova -1 -1 /var/lib/nova nova +} + +python_prepare() { + distutils-r1_python_prepare + sed -i 's/python/python2\.7/g' tools/config/generate_sample.sh || die +} + +python_compile() { + distutils-r1_python_compile + ./tools/config/generate_sample.sh -b ./ -p nova -o etc/nova || die +} + +python_install() { + distutils-r1_python_install + + if use !compute-only; then + for svc in api cert conductor consoleauth network scheduler spicehtml5proxy xvpvncproxy; do + newinitd "${FILESDIR}/nova.initd" "nova-${svc}" + done + fi + use compute && newinitd "${FILESDIR}/nova.initd" "nova-compute" + use novncproxy && newinitd "${FILESDIR}/nova.initd" "nova-novncproxy" + + diropts -m 0750 -o nova -g qemu + dodir /var/log/nova /var/lib/nova/instances + diropts -m 0750 -o nova -g nova + + insinto /etc/nova + insopts -m 0640 -o nova -g nova + newins "etc/nova/nova.conf.sample" "nova.conf" + doins "etc/nova/api-paste.ini" + doins "etc/nova/logging_sample.conf" + doins "etc/nova/policy.json" + doins "etc/nova/rootwrap.conf" + #rootwrap filters + insinto /etc/nova/rootwrap.d + doins "etc/nova/rootwrap.d/api-metadata.filters" + doins "etc/nova/rootwrap.d/compute.filters" + doins "etc/nova/rootwrap.d/network.filters" + #copy migration conf file (not coppied on install via setup.py script) + insopts -m 0644 + insinto /usr/$(get_libdir)/python2.7/site-packages/nova/db/sqlalchemy/migrate_repo/ + doins "nova/db/sqlalchemy/migrate_repo/migrate.cfg" + #copy the CA cert dir (not coppied on install via setup.py script) + cp -R "${S}/nova/CA" "${D}/usr/$(get_libdir)/python2.7/site-packages/nova/" || die "installing CA files failed" + + #add sudoers definitions for user nova + insinto /etc/sudoers.d/ + insopts -m 0600 -o root -g root + doins "${FILESDIR}/nova-sudoers" + + if use iscsi ; then + # Install udev rules for handle iscsi disk with right links under /dev + udev_newrules "${FILESDIR}/openstack-scsi-disk.rules" 60-openstack-scsi-disk.rules + + insinto /etc/nova/ + doins "${FILESDIR}/scsi-openscsi-link.sh" + fi +} diff --git a/sys-cluster/nova/nova-2015.1.1-r1.ebuild b/sys-cluster/nova/nova-2015.1.1-r1.ebuild new file mode 100644 index 000000000000..5e2ceadeb3c9 --- /dev/null +++ b/sys-cluster/nova/nova-2015.1.1-r1.ebuild @@ -0,0 +1,251 @@ +# 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 multilib user + +DESCRIPTION="A cloud computing fabric controller (main part of an IaaS system) written in Python" +HOMEPAGE="https://launchpad.net/nova" +SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+compute compute-only iscsi +kvm +memcached mysql +novncproxy openvswitch postgres +rabbitmq sqlite test xen" +REQUIRED_USE="!compute-only? ( || ( mysql postgres sqlite ) ) + compute-only? ( compute !rabbitmq !memcached !mysql !postgres !sqlite ) + compute? ( ^^ ( kvm xen ) )" + +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/mox3-0.7.0[${PYTHON_USEDEP}] + dev-python/mysql-python[${PYTHON_USEDEP}] + dev-python/psycopg[${PYTHON_USEDEP}] + >=dev-python/python-barbicanclient-3.0.1[${PYTHON_USEDEP}] + <dev-python/python-barbicanclient-3.1.0[${PYTHON_USEDEP}] + >=dev-python/python-ironicclient-0.4.1[${PYTHON_USEDEP}] + <dev-python/python-ironicclient-0.6.0[${PYTHON_USEDEP}] + >=dev-python/subunit-0.0.18[${PYTHON_USEDEP}] + >=dev-python/requests-mock-0.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/oslo-sphinx-2.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}] + >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}] + <dev-python/oslotest-1.6.0[${PYTHON_USEDEP}] + >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}] + >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}] + !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}] + >=dev-python/tempest-lib-0.4.0[${PYTHON_USEDEP}] + <dev-python/tempest-lib-0.5.0[${PYTHON_USEDEP}] + >=dev-python/suds-0.4[${PYTHON_USEDEP}] + >=dev-python/oslo-vmware-0.11.1[${PYTHON_USEDEP}] + <dev-python/oslo-vmware-0.12.0[${PYTHON_USEDEP}] + )" + +# barbicanclient is in here for doc generation +RDEPEND=" + compute-only? ( + >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}] + <=dev-python/sqlalchemy-0.9.99[${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/boto-2.32.1[${PYTHON_USEDEP}] + >=dev-python/decorator-3.4.0[${PYTHON_USEDEP}] + >=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}] + !~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}] + >=dev-python/jinja-2.6[${PYTHON_USEDEP}] + >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}] + <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}] + >=dev-python/lxml-2.3[${PYTHON_USEDEP}] + >=dev-python/routes-1.12.3-r1[${PYTHON_USEDEP}] + !~dev-python/routes-2.0[${PYTHON_USEDEP}] + >=dev-python/webob-1.2.3[${PYTHON_USEDEP}] + >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}] + dev-python/paste[${PYTHON_USEDEP}] + ~dev-python/sqlalchemy-migrate-0.9.5[${PYTHON_USEDEP}] + >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}] + >=dev-python/paramiko-1.13.0[${PYTHON_USEDEP}] + dev-python/pyasn1[${PYTHON_USEDEP}] + >=dev-python/Babel-1.3[${PYTHON_USEDEP}] + >=dev-python/iso8601-0.1.9[${PYTHON_USEDEP}] + >=dev-python/jsonschema-2.0.0[${PYTHON_USEDEP}] + <dev-python/jsonschema-3.0.0[${PYTHON_USEDEP}] + >=dev-python/python-cinderclient-1.1.0[${PYTHON_USEDEP}] + <dev-python/python-cinderclient-1.2.0[${PYTHON_USEDEP}] + >=dev-python/python-neutronclient-2.3.11[${PYTHON_USEDEP}] + <dev-python/python-neutronclient-2.5.0[${PYTHON_USEDEP}] + >=dev-python/python-glanceclient-0.15.0[${PYTHON_USEDEP}] + <dev-python/python-glanceclient-0.18.0[${PYTHON_USEDEP}] + >=dev-python/python-barbicanclient-3.0.1[${PYTHON_USEDEP}] + <dev-python/python-barbicanclient-3.1.0[${PYTHON_USEDEP}] + >=dev-python/six-1.9.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}] + <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}] + >=dev-python/websockify-0.6.0[${PYTHON_USEDEP}] + <dev-python/websockify-0.7.0[${PYTHON_USEDEP}] + >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}] + <dev-python/oslo-config-1.10.0[${PYTHON_USEDEP}] + >=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}] + <dev-python/oslo-context-0.3.0[${PYTHON_USEDEP}] + >=dev-python/oslo-log-1.0.0[${PYTHON_USEDEP}] + <dev-python/oslo-log-1.1.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/oslo-db-1.7.0[${PYTHON_USEDEP}] + <dev-python/oslo-db-1.8.0[${PYTHON_USEDEP}] + >=dev-python/oslo-rootwrap-1.6.0[${PYTHON_USEDEP}] + <dev-python/oslo-rootwrap-1.7.0[${PYTHON_USEDEP}] + >=dev-python/oslo-messaging-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-messaging-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-i18n-1.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-i18n-1.6.0[${PYTHON_USEDEP}] + >=dev-python/rfc3986-0.2.0[${PYTHON_USEDEP}] + >=dev-python/oslo-middleware-1.0.0[${PYTHON_USEDEP}] + <dev-python/oslo-middleware-1.1.0[${PYTHON_USEDEP}] + >=dev-python/psutil-1.1.1[${PYTHON_USEDEP}] + <dev-python/psutil-2.0.0[${PYTHON_USEDEP}] + dev-python/libvirt-python[${PYTHON_USEDEP}] + app-emulation/libvirt[iscsi?] + novncproxy? ( www-apps/novnc ) + sys-apps/iproute2 + openvswitch? ( net-misc/openvswitch ) + rabbitmq? ( net-misc/rabbitmq-server ) + memcached? ( net-misc/memcached + dev-python/python-memcached ) + sys-fs/sysfsutils + sys-fs/multipath-tools + net-misc/bridge-utils + compute? ( + app-cdr/cdrkit + kvm? ( app-emulation/qemu ) + xen? ( app-emulation/xen + app-emulation/xen-tools ) + ) + iscsi? ( + sys-fs/lsscsi + >=sys-block/open-iscsi-2.0.872-r3 + )" + +PATCHES=( +) + +pkg_setup() { + linux-info_pkg_setup + CONFIG_CHECK_MODULES="BLK_DEV_NBD VHOST_NET IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \ + IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 IP_NF_FILTER IP_NF_IPTABLES \ + NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 NF_NAT_IPV4 NF_NAT NF_CONNTRACK NETFILTER_XTABLES \ + ISCSI_TCP SCSI_DH DM_MULTIPATH DM_SNAPSHOT" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel" + done + fi + enewgroup nova + enewuser nova -1 -1 /var/lib/nova nova +} + +python_prepare() { + distutils-r1_python_prepare + sed -i 's/python/python2\.7/g' tools/config/generate_sample.sh || die +} + +python_compile() { + distutils-r1_python_compile + ./tools/config/generate_sample.sh -b ./ -p nova -o etc/nova || die +} + +python_test() { + # turn multiprocessing off, testr will use it --parallel + local DISTUTILS_NO_PARALLEL_BUILD=1 + testr init + testr run --parallel || die "failed testsuite under python2.7" +} + +python_install() { + distutils-r1_python_install + + if use !compute-only; then + for svc in api cert conductor consoleauth network scheduler spicehtml5proxy xvpvncproxy; do + newinitd "${FILESDIR}/nova.initd" "nova-${svc}" + done + fi + use compute && newinitd "${FILESDIR}/nova.initd" "nova-compute" + use novncproxy && newinitd "${FILESDIR}/nova.initd" "nova-novncproxy" + + diropts -m 0750 -o nova -g qemu + dodir /var/log/nova /var/lib/nova/instances + diropts -m 0750 -o nova -g nova + + insinto /etc/nova + insopts -m 0640 -o nova -g nova + newins "etc/nova/nova.conf.sample" "nova.conf" + doins "etc/nova/api-paste.ini" + doins "etc/nova/logging_sample.conf" + doins "etc/nova/policy.json" + doins "etc/nova/rootwrap.conf" + #rootwrap filters + insinto /etc/nova/rootwrap.d + doins "etc/nova/rootwrap.d/api-metadata.filters" + doins "etc/nova/rootwrap.d/compute.filters" + doins "etc/nova/rootwrap.d/network.filters" + #copy migration conf file (not coppied on install via setup.py script) + insopts -m 0644 + insinto /usr/$(get_libdir)/python2.7/site-packages/nova/db/sqlalchemy/migrate_repo/ + doins "nova/db/sqlalchemy/migrate_repo/migrate.cfg" + #copy the CA cert dir (not coppied on install via setup.py script) + cp -R "${S}/nova/CA" "${D}/usr/$(get_libdir)/python2.7/site-packages/nova/" || die "installing CA files failed" + + #add sudoers definitions for user nova + insinto /etc/sudoers.d/ + insopts -m 0600 -o root -g root + doins "${FILESDIR}/nova-sudoers" + + if use iscsi ; then + # Install udev rules for handle iscsi disk with right links under /dev + udev_newrules "${FILESDIR}/openstack-scsi-disk.rules" 60-openstack-scsi-disk.rules + + insinto /etc/nova/ + doins "${FILESDIR}/scsi-openscsi-link.sh" + fi +} + +pkg_postinst() { + if use iscsi ; then + elog "iscsid needs to be running if you want cinder to connect" + fi +} diff --git a/sys-cluster/nova/nova-2015.1.9999.ebuild b/sys-cluster/nova/nova-2015.1.9999.ebuild new file mode 100644 index 000000000000..20dd5e439514 --- /dev/null +++ b/sys-cluster/nova/nova-2015.1.9999.ebuild @@ -0,0 +1,252 @@ +# 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 multilib user + +DESCRIPTION="A cloud computing fabric controller (main part of an IaaS system) written in Python" +HOMEPAGE="https://launchpad.net/nova" +EGIT_REPO_URI="https://github.com/openstack/nova.git" +EGIT_BRANCH="stable/kilo" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="" +IUSE="+compute compute-only iscsi +kvm +memcached mysql +novncproxy openvswitch postgres +rabbitmq sqlite test xen" +REQUIRED_USE="!compute-only? ( || ( mysql postgres sqlite ) ) + compute-only? ( compute !rabbitmq !memcached !mysql !postgres !sqlite ) + compute? ( ^^ ( kvm xen ) )" + +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/mox3-0.7.0[${PYTHON_USEDEP}] + dev-python/mysql-python[${PYTHON_USEDEP}] + dev-python/psycopg[${PYTHON_USEDEP}] + >=dev-python/python-barbicanclient-3.0.1[${PYTHON_USEDEP}] + <dev-python/python-barbicanclient-3.1.0[${PYTHON_USEDEP}] + >=dev-python/python-ironicclient-0.4.1[${PYTHON_USEDEP}] + <dev-python/python-ironicclient-0.6.0[${PYTHON_USEDEP}] + >=dev-python/subunit-0.0.18[${PYTHON_USEDEP}] + >=dev-python/requests-mock-0.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/oslo-sphinx-2.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}] + >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}] + <dev-python/oslotest-1.6.0[${PYTHON_USEDEP}] + >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}] + >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}] + !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}] + >=dev-python/tempest-lib-0.4.0[${PYTHON_USEDEP}] + <dev-python/tempest-lib-0.5.0[${PYTHON_USEDEP}] + >=dev-python/suds-0.4[${PYTHON_USEDEP}] + >=dev-python/oslo-vmware-0.11.1[${PYTHON_USEDEP}] + <dev-python/oslo-vmware-0.12.0[${PYTHON_USEDEP}] + )" + +# barbicanclient is in here for doc generation +RDEPEND=" + compute-only? ( + >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}] + <=dev-python/sqlalchemy-0.9.99[${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/boto-2.32.1[${PYTHON_USEDEP}] + >=dev-python/decorator-3.4.0[${PYTHON_USEDEP}] + >=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}] + !~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}] + >=dev-python/jinja-2.6[${PYTHON_USEDEP}] + >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}] + <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}] + >=dev-python/lxml-2.3[${PYTHON_USEDEP}] + >=dev-python/routes-1.12.3-r1[${PYTHON_USEDEP}] + !~dev-python/routes-2.0[${PYTHON_USEDEP}] + >=dev-python/webob-1.2.3[${PYTHON_USEDEP}] + >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}] + dev-python/paste[${PYTHON_USEDEP}] + ~dev-python/sqlalchemy-migrate-0.9.5[${PYTHON_USEDEP}] + >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}] + >=dev-python/paramiko-1.13.0[${PYTHON_USEDEP}] + dev-python/pyasn1[${PYTHON_USEDEP}] + >=dev-python/Babel-1.3[${PYTHON_USEDEP}] + >=dev-python/iso8601-0.1.9[${PYTHON_USEDEP}] + >=dev-python/jsonschema-2.0.0[${PYTHON_USEDEP}] + <dev-python/jsonschema-3.0.0[${PYTHON_USEDEP}] + >=dev-python/python-cinderclient-1.1.0[${PYTHON_USEDEP}] + <dev-python/python-cinderclient-1.2.0[${PYTHON_USEDEP}] + >=dev-python/python-neutronclient-2.3.11[${PYTHON_USEDEP}] + <dev-python/python-neutronclient-2.5.0[${PYTHON_USEDEP}] + >=dev-python/python-glanceclient-0.15.0[${PYTHON_USEDEP}] + <dev-python/python-glanceclient-0.18.0[${PYTHON_USEDEP}] + >=dev-python/python-barbicanclient-3.0.1[${PYTHON_USEDEP}] + <dev-python/python-barbicanclient-3.1.0[${PYTHON_USEDEP}] + >=dev-python/six-1.9.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}] + <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}] + >=dev-python/websockify-0.6.0[${PYTHON_USEDEP}] + <dev-python/websockify-0.7.0[${PYTHON_USEDEP}] + >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}] + <dev-python/oslo-config-1.10.0[${PYTHON_USEDEP}] + >=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}] + <dev-python/oslo-context-0.3.0[${PYTHON_USEDEP}] + >=dev-python/oslo-log-1.0.0[${PYTHON_USEDEP}] + <dev-python/oslo-log-1.1.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/oslo-db-1.7.0[${PYTHON_USEDEP}] + <dev-python/oslo-db-1.8.0[${PYTHON_USEDEP}] + >=dev-python/oslo-rootwrap-1.6.0[${PYTHON_USEDEP}] + <dev-python/oslo-rootwrap-1.7.0[${PYTHON_USEDEP}] + >=dev-python/oslo-messaging-1.8.0[${PYTHON_USEDEP}] + <dev-python/oslo-messaging-1.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-i18n-1.5.0[${PYTHON_USEDEP}] + <dev-python/oslo-i18n-1.6.0[${PYTHON_USEDEP}] + >=dev-python/rfc3986-0.2.0[${PYTHON_USEDEP}] + >=dev-python/oslo-middleware-1.0.0[${PYTHON_USEDEP}] + <dev-python/oslo-middleware-1.1.0[${PYTHON_USEDEP}] + >=dev-python/psutil-1.1.1[${PYTHON_USEDEP}] + <dev-python/psutil-2.0.0[${PYTHON_USEDEP}] + dev-python/libvirt-python[${PYTHON_USEDEP}] + app-emulation/libvirt[iscsi?] + novncproxy? ( www-apps/novnc ) + sys-apps/iproute2 + openvswitch? ( net-misc/openvswitch ) + rabbitmq? ( net-misc/rabbitmq-server ) + memcached? ( net-misc/memcached + dev-python/python-memcached ) + sys-fs/sysfsutils + sys-fs/multipath-tools + net-misc/bridge-utils + compute? ( + app-cdr/cdrkit + kvm? ( app-emulation/qemu ) + xen? ( app-emulation/xen + app-emulation/xen-tools ) + ) + iscsi? ( + sys-fs/lsscsi + >=sys-block/open-iscsi-2.0.872-r3 + )" + +PATCHES=( +) + +pkg_setup() { + linux-info_pkg_setup + CONFIG_CHECK_MODULES="BLK_DEV_NBD VHOST_NET IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \ + IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 IP_NF_FILTER IP_NF_IPTABLES \ + NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 NF_NAT_IPV4 NF_NAT NF_CONNTRACK NETFILTER_XTABLES \ + ISCSI_TCP SCSI_DH DM_MULTIPATH DM_SNAPSHOT" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel" + done + fi + enewgroup nova + enewuser nova -1 -1 /var/lib/nova nova +} + +python_prepare() { + distutils-r1_python_prepare + sed -i 's/python/python2\.7/g' tools/config/generate_sample.sh || die +} + +python_compile() { + distutils-r1_python_compile + ./tools/config/generate_sample.sh -b ./ -p nova -o etc/nova || die +} + +python_test() { + # turn multiprocessing off, testr will use it --parallel + local DISTUTILS_NO_PARALLEL_BUILD=1 + testr init + testr run --parallel || die "failed testsuite under python2.7" +} + +python_install() { + distutils-r1_python_install + + if use !compute-only; then + for svc in api cert conductor consoleauth network scheduler spicehtml5proxy xvpvncproxy; do + newinitd "${FILESDIR}/nova.initd" "nova-${svc}" + done + fi + use compute && newinitd "${FILESDIR}/nova.initd" "nova-compute" + use novncproxy && newinitd "${FILESDIR}/nova.initd" "nova-novncproxy" + + diropts -m 0750 -o nova -g qemu + dodir /var/log/nova /var/lib/nova/instances + diropts -m 0750 -o nova -g nova + + insinto /etc/nova + insopts -m 0640 -o nova -g nova + newins "etc/nova/nova.conf.sample" "nova.conf" + doins "etc/nova/api-paste.ini" + doins "etc/nova/logging_sample.conf" + doins "etc/nova/policy.json" + doins "etc/nova/rootwrap.conf" + #rootwrap filters + insinto /etc/nova/rootwrap.d + doins "etc/nova/rootwrap.d/api-metadata.filters" + doins "etc/nova/rootwrap.d/compute.filters" + doins "etc/nova/rootwrap.d/network.filters" + #copy migration conf file (not coppied on install via setup.py script) + insopts -m 0644 + insinto /usr/$(get_libdir)/python2.7/site-packages/nova/db/sqlalchemy/migrate_repo/ + doins "nova/db/sqlalchemy/migrate_repo/migrate.cfg" + #copy the CA cert dir (not coppied on install via setup.py script) + cp -R "${S}/nova/CA" "${D}/usr/$(get_libdir)/python2.7/site-packages/nova/" || die "installing CA files failed" + + #add sudoers definitions for user nova + insinto /etc/sudoers.d/ + insopts -m 0600 -o root -g root + doins "${FILESDIR}/nova-sudoers" + + if use iscsi ; then + # Install udev rules for handle iscsi disk with right links under /dev + udev_newrules "${FILESDIR}/openstack-scsi-disk.rules" 60-openstack-scsi-disk.rules + + insinto /etc/nova/ + doins "${FILESDIR}/scsi-openscsi-link.sh" + fi +} + +pkg_postinst() { + if use iscsi ; then + elog "iscsid needs to be running if you want cinder to connect" + fi +} diff --git a/sys-cluster/ocfs/Manifest b/sys-cluster/ocfs/Manifest new file mode 100644 index 000000000000..3564bddf8808 --- /dev/null +++ b/sys-cluster/ocfs/Manifest @@ -0,0 +1 @@ +DIST ocfs-1.0.14.tar.gz 467237 RMD160 1aafa1d27122c567b6e5c5b0c720978be8cb285b SHA1 95c28f99232fa7156cff3082ad39f37752c83cf4 SHA256 bbcd6c88f3687be13ed69b8968df38843e4f3e1c957a69010a81988890de3a5f diff --git a/sys-cluster/ocfs/metadata.xml b/sys-cluster/ocfs/metadata.xml new file mode 100644 index 000000000000..48af0554f47e --- /dev/null +++ b/sys-cluster/ocfs/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> +<use> + <flag name='aio'>Add aio support</flag> +</use> +</pkgmetadata> diff --git a/sys-cluster/ocfs/ocfs-1.0.14.ebuild b/sys-cluster/ocfs/ocfs-1.0.14.ebuild new file mode 100644 index 000000000000..8c433b545bca --- /dev/null +++ b/sys-cluster/ocfs/ocfs-1.0.14.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit linux-mod + +DESCRIPTION="The Oracle Cluster Filesystem" +SRC_URI="http://oss.oracle.com/projects/ocfs/dist/files/source/${P}.tar.gz" +HOMEPAGE="http://oss.oracle.com/projects/ocfs" +LICENSE="GPL-2" + +DEPEND="virtual/linux-sources" + +IUSE="aio" +SLOT="0" +KEYWORDS="~x86" + +pkg_setup() { + if kernel_is -ge 2 6; then + die "${P} supports only 2.4 kernels" + fi +} + +src_compile() { + set_arch_to_kernel + local myconf + use aio && myconf="--enable-aio=yes" || myconf="--enable-aio=no" + + econf \ + --with-kernel=${KV_DIR} \ + ${myconf} \ + || die + + emake || die +} + +src_install() { + einstall DESTDIR=${D} || die "Failed to install" + + dodir /etc/ocfs + insinto /etc/ocfs + doins ocfs2/ocfs.conf + + dodoc README docs/ocfs_doc.zip || die +} + +pkg_postinst() { + linux-mod_pkg_postinst + + einfo "" + einfo "Please remember to re-emerge ${PN} when you upgrade your kernel!" + einfo "" + einfo "Please edit the configuration file /etc/ocfs/ocfs.conf" + einfo "" +} diff --git a/sys-cluster/onesis/Manifest b/sys-cluster/onesis/Manifest new file mode 100644 index 000000000000..b42bd234453a --- /dev/null +++ b/sys-cluster/onesis/Manifest @@ -0,0 +1 @@ +DIST oneSIS-2.0.2.tar.gz 1703998 SHA256 0840f2b7d5e1378aa6e08bc377b0c93ac9411c81edff91bfa2b81ab1f2503eec diff --git a/sys-cluster/onesis/metadata.xml b/sys-cluster/onesis/metadata.xml new file mode 100644 index 000000000000..e7c33620d4d9 --- /dev/null +++ b/sys-cluster/onesis/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">onesis</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/onesis/onesis-2.0.2.ebuild b/sys-cluster/onesis/onesis-2.0.2.ebuild new file mode 100644 index 000000000000..7c05975183f3 --- /dev/null +++ b/sys-cluster/onesis/onesis-2.0.2.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +MY_P="oneSIS-${PV/_}" + +DESCRIPTION="Diskless computing made easy" +HOMEPAGE="http://onesis.org/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +DEPEND="dev-lang/perl" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/${MY_P} + +src_install() { + make prefix="${D}" INSTALLDIRS=vendor install || die "make install failed" +} diff --git a/sys-cluster/open-mx/Manifest b/sys-cluster/open-mx/Manifest new file mode 100644 index 000000000000..2ff1f19fe2aa --- /dev/null +++ b/sys-cluster/open-mx/Manifest @@ -0,0 +1 @@ +DIST open-mx-1.5.2.tar.gz 1079065 SHA256 baa6a09864e8d2d70ea02ed33d0816d53d704ea54d9236dd28863153b8d64c89 SHA512 6cdd3289ad2515f9d627fb6a40e2d0a6be6084e40f5361f2905d75222e386539149d1748302767d00eaf5862f4ec0ef77cbe7c53e6c77ffbd0771e855480c444 WHIRLPOOL 43653c152a7a41d613cb325861618936894bab01d64dcc7fac6e29b8a6c81dea32631883b9019d27d9cc98b58d32b7964719a2f51bafce358da90d005fee963b diff --git a/sys-cluster/open-mx/files/omxoed.initd b/sys-cluster/open-mx/files/omxoed.initd new file mode 100644 index 000000000000..7a0e972ff0ea --- /dev/null +++ b/sys-cluster/open-mx/files/omxoed.initd @@ -0,0 +1,46 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +checksystem() { + if [ -c /dev/open-mx ]; then + einfo "Open-MX module already loaded" + return 0 + else + einfo "Checking if Open-MX module present" + if [ "x$(modprobe -l open-mx | grep open-mx)" == "x" ]; then + eerror "open-mx not found!" + return 1 + fi + fi +} + +start() { + ebegin "Starting ${SVCNAME}" + checksystem || return 1 + if [ ! -c /dev/open-mx ]; then + ebegin "Loading open-mx module" + modprobe -q open-mx + fi + start-stop-daemon --start --exec /usr/bin/omxoed \ + --background --make-pidfile \ + --pidfile /var/run/omeoed.pid + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec /usr/bin/omxoed \ + --pidfile /var/run/omeoed.pid + eend $? +} + +status() { + ebegin "Showing current active Open-MX peers" + omx_info -q +} diff --git a/sys-cluster/open-mx/files/open-mx-1.4.0-driver.patch b/sys-cluster/open-mx/files/open-mx-1.4.0-driver.patch new file mode 100644 index 000000000000..e082865c235a --- /dev/null +++ b/sys-cluster/open-mx/files/open-mx-1.4.0-driver.patch @@ -0,0 +1,14 @@ +--- Makefile.am 2011-07-15 02:42:53.000000000 +0400 ++++ Makefile.am 2011-07-15 02:43:02.000000000 +0400 +@@ -20,11 +20,6 @@ + + SUBDIRS = + +-# Driver +-if OMX_BUILD_DRIVER +- SUBDIRS += driver/linux +-endif +- + # Library + if OMX_BUILD_LIBRARY + SUBDIRS += libopen-mx tools tests tests/mx diff --git a/sys-cluster/open-mx/metadata.xml b/sys-cluster/open-mx/metadata.xml new file mode 100644 index 000000000000..a64f2d240d92 --- /dev/null +++ b/sys-cluster/open-mx/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>cluster</herd> + <maintainer> + <email>alexxy@gentoo.org</email> + <name>Alexey Shvetsov</name> + </maintainer> +</pkgmetadata> diff --git a/sys-cluster/open-mx/open-mx-1.5.2-r1.ebuild b/sys-cluster/open-mx/open-mx-1.5.2-r1.ebuild new file mode 100644 index 000000000000..740f7b11aab8 --- /dev/null +++ b/sys-cluster/open-mx/open-mx-1.5.2-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools eutils linux-mod multilib toolchain-funcs udev + +DESCRIPTION="Open-MX - Myrinet Express over Generic Ethernet Hardware" +HOMEPAGE="http://open-mx.gforge.inria.fr/" +SRC_URI="http://gforge.inria.fr/frs/download.php/30245/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug modules static-libs" + +DEPEND=" + sys-apps/hwloc + virtual/linux-sources + virtual/pkgconfig" +RDEPEND=" + sys-apps/hwloc + virtual/modutils" + +MODULE_NAMES="open-mx(misc:${S}/driver/linux)" +BUILD_TARGETS="all" +BUILD_PARAMS="KDIR=${KERNEL_DIR}" + +pkg_setup() { + einfo "You can set desired mtu by setting OPEN_MX_MTU in make.conf" + linux-mod_pkg_setup +} + +src_prepare() { + # We still want to configure driver but dont want to build it at all + epatch "${FILESDIR}/open-mx-1.4.0-driver.patch" + # We dont want tests + sed -e 's:tests/mx::g' \ + -e 's:tests::g' \ + -i Makefile.am || die "sed failed" + eautoreconf +} + +src_configure() { + econf \ + --with-mtu=${OPEN_MX_MTU:-9000} \ + --with-linux="${KERNEL_DIR}" \ + --with-linux-release=${KV_FULL} \ + $(use_enable static-libs static) \ + $(use_enable debug) +} + +src_compile() { + default + if use modules; then + cd "${S}/driver/linux" + linux-mod_src_compile || die "failed to build driver" + fi +} + +src_install() { + default + use static-libs || find "${ED}" -name '*.*a' -exec rm {} + + # Drop init scripts + rm -rf "${ED}/usr/sbin" || die + rm "${ED}/usr/bin/omx_check" + # install udev rules + udev_dorules "${ED}/etc/open-mx/10-open-mx.rules" + dodoc "${ED}/usr/share/open-mx/FAQ.html" + # Drop misc stuff + rm "${ED}/etc/open-mx/10-open-mx.rules" || die + rm -rf "${ED}/usr/share/open-mx" || die + newinitd "${FILESDIR}/omxoed.initd" omxoed + if use modules; then + cd "${S}/driver/linux" + linux-mod_src_install || die "failed to install driver" + fi +} diff --git a/sys-cluster/openais/Manifest b/sys-cluster/openais/Manifest new file mode 100644 index 000000000000..99cb251d685c --- /dev/null +++ b/sys-cluster/openais/Manifest @@ -0,0 +1 @@ +DIST openais-1.1.4.tar.gz 566559 SHA256 974b4959f3c401c16156dab31e65a6d45bbf84dd85a88c2a362712e738c06934 diff --git a/sys-cluster/openais/metadata.xml b/sys-cluster/openais/metadata.xml new file mode 100644 index 000000000000..e1b15c2588a1 --- /dev/null +++ b/sys-cluster/openais/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> + <longdescription> + The OpenAIS Standards Based Cluster Framework is an OSI Certified implementation of + the Service Availability Forum Application Interface Specification (AIS). + The Application Interface Specification is a software API and policies which are + used to develop applications that maintain service during faults. + Restarting and failover of applications is also provided for those + deploying applications which may not be modified. The OpenAIS software is built + to operate as plugins to the Corosync Cluster Engine. + </longdescription> +</pkgmetadata> diff --git a/sys-cluster/openais/openais-1.1.4-r1.ebuild b/sys-cluster/openais/openais-1.1.4-r1.ebuild new file mode 100644 index 000000000000..440d958aa269 --- /dev/null +++ b/sys-cluster/openais/openais-1.1.4-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit autotools base + +DESCRIPTION="Open Application Interface Specification cluster framework" +HOMEPAGE="http://www.openais.org/" +SRC_URI="ftp://ftp:${PN}.org@${PN}.org/downloads/${P}/${P}.tar.gz" + +LICENSE="BSD public-domain" +SLOT="0" +KEYWORDS="amd64 hppa x86 ~x86-fbsd" +IUSE="static-libs" + +RDEPEND="<sys-cluster/corosync-2.0.0" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +DOCS=( "${S}/AUTHORS" "${S}/README.amf" ) + +src_prepare() { + # respect CFLAGS + sed -i -e "s/\$OPT_CFLAGS \$GDB_FLAGS//" configure.ac || die + # respect LDFLAGS + sed -i -e "s/\$(CFLAGS) -shared/\$(CFLAGS) \$(LDFLAGS) -shared/" \ + services/Makefile.am || die + # don't install docs + sed -i -e "/^dist_doc/d" Makefile.am || die + eautoreconf +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + --docdir=/usr/share/doc/${PF} \ + --localstatedir=/var +} + +src_install() { + base_src_install + rm -rf "${D}"/etc/init.d/openais || die + use static-libs || rm -rf "${D}"/usr/$(get_libdir)/*.a || die +} diff --git a/sys-cluster/openmpi/Manifest b/sys-cluster/openmpi/Manifest new file mode 100644 index 000000000000..7d0a0704017d --- /dev/null +++ b/sys-cluster/openmpi/Manifest @@ -0,0 +1,7 @@ +DIST openmpi-1.4.3.tar.bz2 6626909 SHA256 220b72b1c7ee35469ff74b4cfdbec457158ac6894635143a33e9178aa3981015 SHA512 c33d5e019ba0b080aa34ecfa085182349da806e4bff26c1bf4dbdc8fb3f8f3c38899b9d96d671e1ae337b523ac9d634ae25c49d9af6eef2bc340c29dba75b1b8 WHIRLPOOL 92349d7bd16ff6e8563df602c215ce98ce5624b38a2975c13832d5b9504691c844206acad4c45376fe53e0116fe591782a3e5f8a132c4ac18ae793470d57db55 +DIST openmpi-1.4.5.tar.bz2 6643760 SHA256 a3857bc69b7d5258cf7fc1ed1581d9ac69110f5c17976b949cb7ec789aae462d SHA512 f89922345cde8978483e397e9016103626db3f1787f9afccaf0f60d59caa2a4409b47b01ac221d60e24e241f2afecb636ca89688bf326dc0ca5c817de96b3e99 WHIRLPOOL 2008bd952f9cc93ead6508267f5a45ee6d9ebf9136e35e25b798400d162173514da73349518bfada4777471c32d315e8556bbee8847a5268719d6b32fd0fd811 +DIST openmpi-1.6.5.tar.bz2 10943881 SHA256 fe37bab89b5ef234e0ac82dc798282c2ab08900bf564a1ec27239d3f1ad1fc85 SHA512 b0ede0264cd9263b8ba59ec51d17ad47b5f20d49d219ca05f7c396d608398d517b2023a46a2535fd6191160d709e4805c4de436dcfee56eda287383bd69f9652 WHIRLPOOL d0288677827c1deba17295ee1b69cd21da294ac314cc49404389b4c286384f9f2f229cae4c4fd62511e7f20abc510998642d6a2edfac3f16f83078f474f8e735 +DIST openmpi-1.7.5.tar.bz2 13286694 SHA256 cb3eef6880537d341d5d098511d390ec853716a6ec94007c03a0d1491b2ac8f2 SHA512 72de2788fa26615a2e7373b5f32e0a2b9e39d56094c45b49348ef19bbb0ea306734b7d3275d76471a18628b5244d882de4ed3595eb46f13683e1c8d2b277f065 WHIRLPOOL 107edd2eeca6e0ce9a9fb9ea1cd920cb1a87e8434390f2ed93279734c61bed63e9942bf2d33081e992d4d892f77a8643abbb58194aa76f7148d8716f1648aa82 +DIST openmpi-1.8.4.tar.bz2 13488749 SHA256 23158d916e92c80e2924016b746a93913ba7fae9fff51bf68d5c2a0ae39a2f8a SHA512 d4c8ce2bd3359cf2e85958b58ba18b52c9cef6676718eb3d948309b164b2f54544f8f8419ef6881c7a51ba268a876cd56e9b2d340a106a16fa25fb9fc3e4eff9 WHIRLPOOL 793f64ad44c2e3451a269bcb53d747d15a01649978d80f13599596e1bdd6a6011b50fdd60222bbe3a4ebe567a4785b2660e3c1eb09bdba77420581a0062480a2 +DIST openmpi-1.8.7.tar.bz2 13228742 SHA256 da629e9bd820a379cfafe15f842ee9b628d7451856085ccc23ee75ab3e1b48c7 SHA512 953e007b00c9753bafc05d13e6f686c9aa47f76f55fcc4eda565174d410de059e07862b7e667d15df13afb80418661d9a8d5ee17fdcc211d3e044992cd9ceede WHIRLPOOL 374edbca97262217dfe405414deff2f6a3cacc06daec56e3356ea76f27804ef3caa3f37050dc8a81f257b83c1ced49fd5f66647c2cba4892fbe4ec9746a6f84e +DIST openmpi-1.8.8.tar.bz2 13231433 SHA256 a28382d1e6a36f4073412dc00836ff2524e42b674da9caf6ca7377baad790b94 SHA512 8ca2e3ebb9d9ba0f33faba9bef76fe95293721b73619cbc18176611074a56c277e9ab6cae7fa6c87ace11f16151c1bc495b2a8dbc8ad064d5a8f89f5d431a660 WHIRLPOOL e36186452978ba7a368c83b84b8b089f6995450fa866b7b8300d32eec7e64a816abf5f301dc716bf25b3b45b987489952ffc4b7057f4407677f2a2df5ee67cdd diff --git a/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch b/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch new file mode 100644 index 000000000000..197430aee6f2 --- /dev/null +++ b/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch @@ -0,0 +1,42 @@ +From 3bd5897c7ca8ab61fb024957aeae891e204b3e3f Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Mon, 1 Jul 2013 20:37:17 -0400 +Subject: [PATCH] hooks: disable malloc override inside of Gentoo sandbox + +As described in the comments in the source, Gentoo's own version of +fakeroot, sandbox, also runs into hangs when malloc is overridden. +Sandbox environments can easily be detected by looking for SANDBOX_PID +in the environment. When detected, employ the same fix used for +fakeroot. + +See https://bugs.gentoo.org/show_bug.cgi?id=462602 +--- + opal/mca/memory/linux/hooks.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c +index 6a1646f..5ded08c 100644 +--- a/opal/mca/memory/linux/hooks.c ++++ b/opal/mca/memory/linux/hooks.c +@@ -747,9 +747,16 @@ static void opal_memory_linux_malloc_init_hook(void) + "fakeroot" build environment that allocates memory during + stat() (see http://bugs.debian.org/531522). It may not be + necessary any more since we're using access(), not stat(). But +- we'll leave the check, anyway. */ ++ we'll leave the check, anyway. ++ ++ This is also an issue when using Gentoo's version of 'fakeroot', ++ sandbox v2.5. Sandbox environments can also be detected fairly ++ easily by looking for SANDBOX_ON. ++ */ ++ + if (getenv("FAKEROOTKEY") != NULL || +- getenv("FAKED_MODE") != NULL) { ++ getenv("FAKED_MODE") != NULL || ++ getenv("SANDBOX_ON") != NULL ) { + return; + } + +-- +1.8.1.5 + diff --git a/sys-cluster/openmpi/files/openmpi-1.4.1-r22513.patch b/sys-cluster/openmpi/files/openmpi-1.4.1-r22513.patch new file mode 100644 index 000000000000..128443be5f9d --- /dev/null +++ b/sys-cluster/openmpi/files/openmpi-1.4.1-r22513.patch @@ -0,0 +1,72 @@ +From 9657a0fc671dd0987b6954932a08b680c35f480f Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Wed, 3 Feb 2010 17:13:13 -0500 +Subject: [PATCH] Backport r22513 + +Per #2201, move the user arguments up to be the first set of argv +after the compiler argv tokens. + +Not closing #2201 yet; there's still discussion on that ticket about +whether we want to do more or not. + +Refs #2201 +cmr:v1.4.2 +cmr:v1.5 + +Author: jsquyres +--- + ompi/tools/wrappers/ompi_wrapper_script.in | 4 +++- + opal/tools/wrappers/opal_wrapper.c | 9 +++++---- + 2 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/ompi/tools/wrappers/ompi_wrapper_script.in b/ompi/tools/wrappers/ompi_wrapper_script.in +index 24726ad..87fd8a5 100644 +--- a/ompi/tools/wrappers/ompi_wrapper_script.in ++++ b/ompi/tools/wrappers/ompi_wrapper_script.in +@@ -140,13 +140,15 @@ my @exec_argv = (); + + # assemble command + push(@exec_argv, split(' ', $comp)); ++# Per https://svn.open-mpi.org/trac/ompi/ticket/2201, add all the user ++# arguments before anything else. ++push(@exec_argv, @appargs); + if ($want_preproc == 1) { + push(@exec_argv, split(' ', $preproc_flags)); + } + if ($want_compile == 1) { + push(@exec_argv, split(' ', $comp_flags)); + } +-push(@exec_argv, @appargs); + if ($want_link == 1) { + push(@exec_argv, split(' ', $linker_flags)); + push(@exec_argv, split(' ', $libs)); +diff --git a/opal/tools/wrappers/opal_wrapper.c b/opal/tools/wrappers/opal_wrapper.c +index 86ece5b..1b80f53 100644 +--- a/opal/tools/wrappers/opal_wrapper.c ++++ b/opal/tools/wrappers/opal_wrapper.c +@@ -712,6 +712,11 @@ main(int argc, char *argv[]) + exec_argc = 0; + } + ++ /* Per https://svn.open-mpi.org/trac/ompi/ticket/2201, add all the ++ user arguments before anything else. */ ++ opal_argv_insert(&exec_argv, exec_argc, user_argv); ++ exec_argc = opal_argv_count(exec_argv); ++ + /* preproc flags */ + if (flags & COMP_WANT_PREPROC) { + opal_argv_insert(&exec_argv, exec_argc, options_data[user_data_idx].preproc_flags); +@@ -732,10 +737,6 @@ main(int argc, char *argv[]) + exec_argc = opal_argv_count(exec_argv); + } + +- /* add all the user arguments */ +- opal_argv_insert(&exec_argv, exec_argc, user_argv); +- exec_argc = opal_argv_count(exec_argv); +- + /* link flags and libs */ + if (flags & COMP_WANT_LINK) { + opal_argv_insert(&exec_argv, exec_argc, options_data[user_data_idx].link_flags); +-- +1.6.4.4 + diff --git a/sys-cluster/openmpi/files/openmpi-1.6-hostfile.patch b/sys-cluster/openmpi/files/openmpi-1.6-hostfile.patch new file mode 100644 index 000000000000..880c42926166 --- /dev/null +++ b/sys-cluster/openmpi/files/openmpi-1.6-hostfile.patch @@ -0,0 +1,16 @@ +Fix default hostfile location (backported r26440) + +https://bugs.gentoo.org/show_bug.cgi?id=420431 + +Patch by Orion Poplawski <orion AT SPAMFREE cora DOT nwra DOT com> +--- a/orte/runtime/orte_mca_params.c ++++ b/orte/runtime/orte_mca_params.c +@@ -225,7 +225,7 @@ int orte_register_params(void) + false, false, 1000, &orte_timeout_usec_per_proc); + + /* default hostfile */ +- asprintf(&orte_default_hostfile, "%s/etc/openmpi-default-hostfile", opal_install_dirs.prefix); ++ asprintf(&orte_default_hostfile, "%s/openmpi-default-hostfile", opal_install_dirs.sysconfdir); + mca_base_param_reg_string_name("orte", "default_hostfile", + "Name of the default hostfile (relative or absolute path, \"none\" to ignore environmental or default MCA param setting)", + false, false, orte_default_hostfile, &orte_default_hostfile); diff --git a/sys-cluster/openmpi/files/openmpi-ltdl.patch b/sys-cluster/openmpi/files/openmpi-ltdl.patch new file mode 100644 index 000000000000..a288ea272473 --- /dev/null +++ b/sys-cluster/openmpi/files/openmpi-ltdl.patch @@ -0,0 +1,78 @@ +diff -up openmpi-1.6.3/ompi/debuggers/dlopen_test.c.ltdl openmpi-1.6.3/ompi/debuggers/dlopen_test.c +--- openmpi-1.6.3/ompi/debuggers/dlopen_test.c.ltdl 2012-04-03 08:30:25.000000000 -0600 ++++ openmpi-1.6.3/ompi/debuggers/dlopen_test.c 2012-11-02 14:50:12.613702426 -0600 +@@ -13,7 +13,17 @@ + #include <string.h> + #include <stdlib.h> + +-#include "opal/libltdl/ltdl.h" ++#if OPAL_WANT_LIBLTDL ++ #ifndef __WINDOWS__ ++ #if OPAL_LIBLTDL_INTERNAL ++ #include "opal/libltdl/ltdl.h" ++ #else ++ #include "ltdl.h" ++ #endif ++ #else ++ #include "ltdl.h" ++ #endif ++#endif + + static int do_test(void); + +diff -up openmpi-1.6.3/ompi/debuggers/Makefile.am.ltdl openmpi-1.6.3/ompi/debuggers/Makefile.am +--- openmpi-1.6.3/ompi/debuggers/Makefile.am.ltdl 2012-04-03 08:30:25.000000000 -0600 ++++ openmpi-1.6.3/ompi/debuggers/Makefile.am 2012-11-02 15:04:53.636926260 -0600 +@@ -47,7 +47,7 @@ headers = \ + + dlopen_test_SOURCES = dlopen_test.c + dlopen_test_CPPFLAGS = -I$(top_srcdir)/opal/libltdl +-dlopen_test_LDADD = $(top_builddir)/opal/libltdl/libltdlc.la ++dlopen_test_LDADD = $(LIBLTDL) + + predefined_gap_test_SOURCES = predefined_gap_test.c + predefined_gap_test_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) +diff -up openmpi-1.6.3/test/support/components.c.ltdl openmpi-1.6.3/test/support/components.c +--- openmpi-1.6.3/test/support/components.c.ltdl 2012-04-03 08:29:44.000000000 -0600 ++++ openmpi-1.6.3/test/support/components.c 2012-11-02 14:50:29.204705380 -0600 +@@ -24,7 +24,17 @@ + + #include "opal/constants.h" + #include "opal/mca/mca.h" +-#include "opal/libltdl/ltdl.h" ++#if OPAL_WANT_LIBLTDL ++ #ifndef __WINDOWS__ ++ #if OPAL_LIBLTDL_INTERNAL ++ #include "opal/libltdl/ltdl.h" ++ #else ++ #include "ltdl.h" ++ #endif ++ #else ++ #include "ltdl.h" ++ #endif ++#endif + + #include "components.h" + +diff -up openmpi-1.6.3/test/support/components.h.ltdl openmpi-1.6.3/test/support/components.h +--- openmpi-1.6.3/test/support/components.h.ltdl 2012-04-03 08:29:44.000000000 -0600 ++++ openmpi-1.6.3/test/support/components.h 2012-11-02 14:50:22.409703519 -0600 +@@ -20,7 +20,17 @@ + #ifndef OMPI_SUPPORT_COMPONENTS_H + #define OMPI_SUPPORT_COMPONENTS_H + +-#include "opal/libltdl/ltdl.h" ++#if OPAL_WANT_LIBLTDL ++ #ifndef __WINDOWS__ ++ #if OPAL_LIBLTDL_INTERNAL ++ #include "opal/libltdl/ltdl.h" ++ #else ++ #include "ltdl.h" ++ #endif ++ #else ++ #include "ltdl.h" ++ #endif ++#endif + #include "opal/mca/mca.h" + + BEGIN_C_DECLS diff --git a/sys-cluster/openmpi/files/openmpi-r24328.patch b/sys-cluster/openmpi/files/openmpi-r24328.patch new file mode 100644 index 000000000000..bbd689d3ae0d --- /dev/null +++ b/sys-cluster/openmpi/files/openmpi-r24328.patch @@ -0,0 +1,54 @@ +From cf054cd92dfac55f3920e805d01c11dcfc2cd4fa Mon Sep 17 00:00:00 2001 +From: jsquyres <jsquyres@cisco.com> +Date: Mon, 28 Mar 2011 12:44:06 -0400 +Subject: [PATCH] Fix some fairly-important typos (!) + +Upstream commit r24328. +--- + test/datatype/ddt_lib.c | 2 +- + test/datatype/ddt_raw.c | 2 +- + test/datatype/opal_ddt_lib.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/datatype/ddt_lib.c b/test/datatype/ddt_lib.c +index 015419d..c349384 100644 +--- a/test/datatype/ddt_lib.c ++++ b/test/datatype/ddt_lib.c +@@ -209,7 +209,7 @@ int mpich_typeub2( void ) + + int mpich_typeub3( void ) + { +- int blocklen[2], err = 0, idisp[3]; ++ int blocklen[3], err = 0, idisp[3]; + size_t sz; + MPI_Aint disp[3], lb, ub, ex; + ompi_datatype_t *types[3], *dt1, *dt2, *dt3, *dt4, *dt5; +diff --git a/test/datatype/ddt_raw.c b/test/datatype/ddt_raw.c +index eea9004..7effe65 100644 +--- a/test/datatype/ddt_raw.c ++++ b/test/datatype/ddt_raw.c +@@ -45,7 +45,7 @@ static int test_upper( unsigned int length ) + { + ompi_datatype_t *pdt; + opal_convertor_t * pConv; +- int rc; ++ int rc = OMPI_SUCCESS; + unsigned int i, iov_count, split_chunk, total_length; + size_t max_data; + struct iovec iov[5]; +diff --git a/test/datatype/opal_ddt_lib.c b/test/datatype/opal_ddt_lib.c +index e05bb06..dffd86c 100644 +--- a/test/datatype/opal_ddt_lib.c ++++ b/test/datatype/opal_ddt_lib.c +@@ -759,7 +759,7 @@ int mpich_typeub2( void ) + + int mpich_typeub3( void ) + { +- int blocklen[2], err = 0, idisp[3]; ++ int blocklen[3], err = 0, idisp[3]; + size_t sz; + OPAL_PTRDIFF_TYPE disp[3], lb, ub, ex; + opal_datatype_t *types[3], *dt1, *dt2, *dt3, *dt4, *dt5; +-- +1.7.3.4 + diff --git a/sys-cluster/openmpi/metadata.xml b/sys-cluster/openmpi/metadata.xml new file mode 100644 index 000000000000..e0d91cd04f60 --- /dev/null +++ b/sys-cluster/openmpi/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>jsbronder@gentoo.org</email> + </maintainer> + <use> + <flag name='cma'>Enable the CMA (Cross Memory Attach) MCA</flag> + <flag name='cuda'>Add GPU direct support</flag> + <flag name='heterogeneous'>Enable features required for heterogeneous + platform support</flag> + <flag name='romio'>Build the ROMIO MPI-IO component</flag> + <flag name='mpi-threads'>Enable MPI_THREAD_MULTIPLE</flag> + <flag name='numa'>Enable numactl to allow binding processes to CPUs</flag> + <flag name='vt'>Enable bundled VampirTrace support</flag> + <flag name="pbs">Add support for the Portable Batch System (PBS)</flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/openmpi/openmpi-1.4.3.ebuild b/sys-cluster/openmpi/openmpi-1.4.3.ebuild new file mode 100644 index 000000000000..81e08b71e8c3 --- /dev/null +++ b/sys-cluster/openmpi/openmpi-1.4.3.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit eutils fortran-2 multilib flag-o-matic toolchain-funcs + +MY_P=${P/-mpi} + +DESCRIPTION="A high-performance message passing library (MPI)" +HOMEPAGE="http://www.open-mpi.org" +SRC_URI="http://www.open-mpi.org/software/ompi/v1.4/downloads/${MY_P}.tar.bz2" +LICENSE="BSD" +SLOT="0" +RESTRICT="mpi-threads? ( test )" +KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd" +IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads pbs romio threads vt" +RDEPEND=" + pbs? ( sys-cluster/torque ) + vt? ( + !dev-libs/libotf + !app-text/lcdf-typetools + ) + elibc_FreeBSD? ( dev-libs/libexecinfo ) + !sys-cluster/mpich + !sys-cluster/mpich2 + !sys-cluster/mpiexec" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + fortran-2_pkg_setup + if use mpi-threads; then + echo + ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" + ewarn "default and officially unsupported by upstream." + ewarn "You may stop now and set USE=-mpi-threads" + echo + fi + + echo + elog "OpenMPI has an overwhelming count of configuration options." + elog "Don't forget the EXTRA_ECONF environment variable can let you" + elog "specify configure options if you find them necessary." + echo +} + +src_prepare() { + # Necessary for scalibility, see + # http://www.open-mpi.org/community/lists/users/2008/09/6514.php + if use threads; then + echo 'oob_tcp_listen_mode = listen_thread' \ + >> opal/etc/openmpi-mca-params.conf + fi +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --enable-pretty-print-stacktrace + --enable-orterun-prefix-by-default + --without-slurm) + + if use mpi-threads; then + myconf+=(--enable-mpi-threads + --enable-progress-threads) + fi + + if use fortran; then + if [[ $(tc-getFC) =~ g77 ]]; then + myconf+=(--disable-mpi-f90) + elif [[ $(tc-getFC) =~ if ]]; then + # Enabled here as gfortran compile times are huge with this enabled. + myconf+=(--with-mpi-f90-size=medium) + fi + else + myconf+=(--disable-mpi-f90 --disable-mpi-f77) + fi + + ! use vt && myconf+=(--enable-contrib-no-build=vt) + + econf "${myconf[@]}" \ + $(use_enable cxx mpi-cxx) \ + $(use_enable romio io-romio) \ + $(use_enable heterogeneous) \ + $(use_with pbs tm) \ + $(use_enable ipv6) +} + +src_install () { + emake DESTDIR="${D}" install || die "make install failed" + dodoc README AUTHORS NEWS VERSION || die +} + +src_test() { + # Doesn't work with the default src_test as the dry run (-n) fails. + emake -j1 check || die "emake check failed" +} diff --git a/sys-cluster/openmpi/openmpi-1.4.5.ebuild b/sys-cluster/openmpi/openmpi-1.4.5.ebuild new file mode 100644 index 000000000000..4118adb8843d --- /dev/null +++ b/sys-cluster/openmpi/openmpi-1.4.5.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit eutils fortran-2 multilib flag-o-matic toolchain-funcs + +MY_P=${P/-mpi} + +DESCRIPTION="A high-performance message passing library (MPI)" +HOMEPAGE="http://www.open-mpi.org" +SRC_URI="http://www.open-mpi.org/software/ompi/v1.4/downloads/${MY_P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +RESTRICT="mpi-threads? ( test )" + +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads pbs romio threads vt" +RDEPEND=" + pbs? ( sys-cluster/torque ) + vt? ( + !dev-libs/libotf + !app-text/lcdf-typetools + ) + elibc_FreeBSD? ( dev-libs/libexecinfo ) + !sys-cluster/mpich + !sys-cluster/mpich2 + !sys-cluster/mpiexec" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + fortran-2_pkg_setup + if use mpi-threads; then + echo + ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" + ewarn "default and officially unsupported by upstream." + ewarn "You may stop now and set USE=-mpi-threads" + echo + fi + + echo + elog "OpenMPI has an overwhelming count of configuration options." + elog "Don't forget the EXTRA_ECONF environment variable can let you" + elog "specify configure options if you find them necessary." + echo +} + +src_prepare() { + # Necessary for scalibility, see + # http://www.open-mpi.org/community/lists/users/2008/09/6514.php + if use threads; then + echo 'oob_tcp_listen_mode = listen_thread' \ + >> opal/etc/openmpi-mca-params.conf + fi +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --enable-pretty-print-stacktrace + --enable-orterun-prefix-by-default + --without-slurm) + + if use mpi-threads; then + myconf+=(--enable-mpi-threads + --enable-progress-threads) + fi + + if use fortran; then + if [[ $(tc-getFC) =~ g77 ]]; then + myconf+=(--disable-mpi-f90) + elif [[ $(tc-getFC) =~ if ]]; then + # Enabled here as gfortran compile times are huge with this enabled. + myconf+=(--with-mpi-f90-size=medium) + fi + else + myconf+=(--disable-mpi-f90 --disable-mpi-f77) + fi + + ! use vt && myconf+=(--enable-contrib-no-build=vt) + + econf "${myconf[@]}" \ + $(use_enable cxx mpi-cxx) \ + $(use_enable romio io-romio) \ + $(use_enable heterogeneous) \ + $(use_with pbs tm) \ + $(use_enable ipv6) +} + +src_install () { + emake DESTDIR="${D}" install || die "make install failed" + dodoc README AUTHORS NEWS VERSION || die +} + +src_test() { + # Doesn't work with the default src_test as the dry run (-n) fails. + emake -j1 check || die "emake check failed" +} diff --git a/sys-cluster/openmpi/openmpi-1.6.5-r1.ebuild b/sys-cluster/openmpi/openmpi-1.6.5-r1.ebuild new file mode 100644 index 000000000000..6c8f5a3e16da --- /dev/null +++ b/sys-cluster/openmpi/openmpi-1.6.5-r1.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit autotools eutils fortran-2 multilib flag-o-matic toolchain-funcs versionator + +MY_P=${P/-mpi} +S=${WORKDIR}/${MY_P} + +IUSE_OPENMPI_FABRICS=" + openmpi_fabrics_dapl + openmpi_fabrics_ofed + openmpi_fabrics_knem + openmpi_fabrics_open-mx + openmpi_fabrics_psm + openmpi_fabrics_sctp" + +IUSE_OPENMPI_RM=" + openmpi_rm_pbs + openmpi_rm_slurm" + +IUSE_OPENMPI_OFED_FEATURES=" + openmpi_ofed_features_control-hdr-padding + openmpi_ofed_features_connectx-xrc + openmpi_ofed_features_rdmacm + openmpi_ofed_features_dynamic-sl + openmpi_ofed_features_failover + " + +DESCRIPTION="A high-performance message passing library (MPI)" +HOMEPAGE="http://www.open-mpi.org" +SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux" +IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads romio threads vt + ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}" + +REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs ) + openmpi_rm_pbs? ( !openmpi_rm_slurm ) + openmpi_fabrics_psm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )" + +RDEPEND=" + !sys-cluster/mpich + !sys-cluster/mpich2 + !sys-cluster/mpiexec + >=sys-apps/hwloc-1.3 + dev-libs/libltdl:0 + elibc_FreeBSD? ( dev-libs/libexecinfo ) + openmpi_fabrics_dapl? ( sys-infiniband/dapl ) + openmpi_fabrics_ofed? ( sys-infiniband/ofed ) + openmpi_fabrics_knem? ( sys-cluster/knem ) + openmpi_fabrics_open-mx? ( sys-cluster/open-mx ) + openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm ) + openmpi_fabrics_sctp? ( net-misc/lksctp-tools ) + openmpi_rm_pbs? ( sys-cluster/torque ) + openmpi_rm_slurm? ( sys-cluster/slurm ) + openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm ) + vt? ( + !dev-libs/libotf + !app-text/lcdf-typetools + ) + " +DEPEND="${RDEPEND}" +# TODO: Newer releases of Vampir use otf2 which would resolve the above blockers. + +pkg_setup() { + fortran-2_pkg_setup + if use mpi-threads; then + echo + ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" + ewarn "default and officially unsupported by upstream." + ewarn "You may stop now and set USE=-mpi-threads" + echo + fi + + echo + elog "OpenMPI has an overwhelming count of configuration options." + elog "Don't forget the EXTRA_ECONF environment variable can let you" + elog "specify configure options if you find them necessary." + echo + +} + +src_prepare() { + # Necessary for scalibility, see + # http://www.open-mpi.org/community/lists/users/2008/09/6514.php + if use threads; then + echo 'oob_tcp_listen_mode = listen_thread' \ + >> opal/etc/openmpi-mca-params.conf + fi + + # https://svn.open-mpi.org/trac/ompi/ticket/3649 + # https://svn.open-mpi.org/trac/ompi/ticket/3648 + epatch "${FILESDIR}"/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch + + # https://github.com/open-mpi/ompi/issues/163 + epatch "${FILESDIR}"/openmpi-ltdl.patch + + AT_M4DIR="config opal/config orte/config ompi/config" eautoreconf +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --enable-pretty-print-stacktrace + --enable-orterun-prefix-by-default + --with-hwloc="${EPREFIX}/usr" + --with-libltdl=external + ) + + if use mpi-threads; then + myconf+=( + --enable-mpi-thread-multiple + --enable-opal-multi-threads + ) + fi + + if use fortran; then + if [[ $(tc-getFC) =~ g77 ]]; then + myconf+=(--disable-mpi-f90) + elif [[ $(tc-getFC) =~ if ]]; then + # Enabled here as gfortran compile times are huge with this enabled. + myconf+=(--with-mpi-f90-size=medium) + fi + else + myconf+=(--disable-mpi-f90 --disable-mpi-f77) + fi + + ! use vt && myconf+=(--enable-contrib-no-build=vt) + + econf "${myconf[@]}" \ + $(use_enable cxx mpi-cxx) \ + $(use_enable romio io-romio) \ + $(use_enable heterogeneous) \ + $(use_enable ipv6) \ + $(use_with openmpi_fabrics_dapl udapl "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_ofed openib "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \ + $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \ + $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \ + $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \ + $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \ + $(use_enable openmpi_ofed_features_failover btl-openib-failover) \ + $(use_with openmpi_fabrics_sctp sctp) \ + $(use_with openmpi_rm_pbs tm) \ + $(use_with openmpi_rm_slurm slurm) +} + +src_install () { + emake DESTDIR="${D}" install || die "make install failed" + # From USE=vt see #359917 + rm "${ED}"/usr/share/libtool &> /dev/null + dodoc README AUTHORS NEWS VERSION || die +} + +src_test() { + # Doesn't work with the default src_test as the dry run (-n) fails. + emake -j1 check || die "emake check failed" +} diff --git a/sys-cluster/openmpi/openmpi-1.7.5-r1.ebuild b/sys-cluster/openmpi/openmpi-1.7.5-r1.ebuild new file mode 100644 index 000000000000..b2ca7fc6e308 --- /dev/null +++ b/sys-cluster/openmpi/openmpi-1.7.5-r1.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit autotools cuda eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator + +MY_P=${P/-mpi} +S=${WORKDIR}/${MY_P} + +IUSE_OPENMPI_FABRICS=" + openmpi_fabrics_ofed + openmpi_fabrics_knem + openmpi_fabrics_open-mx + openmpi_fabrics_psm" + +IUSE_OPENMPI_RM=" + openmpi_rm_pbs + openmpi_rm_slurm" + +IUSE_OPENMPI_OFED_FEATURES=" + openmpi_ofed_features_control-hdr-padding + openmpi_ofed_features_connectx-xrc + openmpi_ofed_features_rdmacm + openmpi_ofed_features_dynamic-sl + openmpi_ofed_features_failover" + +DESCRIPTION="A high-performance message passing library (MPI)" +HOMEPAGE="http://www.open-mpi.org" +SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux" +IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads romio threads vt + ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}" + +REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs ) + openmpi_rm_pbs? ( !openmpi_rm_slurm ) + openmpi_fabrics_psm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )" + +MPI_UNCLASSED_DEP_STR=" + vt? ( + !dev-libs/libotf + !app-text/lcdf-typetools + )" + +RDEPEND=" + !sys-cluster/mpich + !sys-cluster/mpich2 + !sys-cluster/mpiexec + dev-libs/libevent + dev-libs/libltdl:0 + >=sys-apps/hwloc-1.7.2 + cuda? ( dev-util/nvidia-cuda-toolkit ) + elibc_FreeBSD? ( dev-libs/libexecinfo ) + openmpi_fabrics_ofed? ( sys-infiniband/ofed ) + openmpi_fabrics_knem? ( sys-cluster/knem ) + openmpi_fabrics_open-mx? ( sys-cluster/open-mx ) + openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm ) + openmpi_rm_pbs? ( sys-cluster/torque ) + openmpi_rm_slurm? ( sys-cluster/slurm ) + openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm ) + " +DEPEND="${RDEPEND}" + +pkg_setup() { + fortran-2_pkg_setup + + if use mpi-threads; then + echo + ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" + ewarn "default and officially unsupported by upstream." + ewarn "You may stop now and set USE=-mpi-threads" + echo + fi + + echo + elog "OpenMPI has an overwhelming count of configuration options." + elog "Don't forget the EXTRA_ECONF environment variable can let you" + elog "specify configure options if you find them necessary." + echo +} + +src_prepare() { + # Necessary for scalibility, see + # http://www.open-mpi.org/community/lists/users/2008/09/6514.php + if use threads; then + echo 'oob_tcp_listen_mode = listen_thread' \ + >> opal/etc/openmpi-mca-params.conf + fi + + # https://github.com/open-mpi/ompi/issues/163 + epatch "${FILESDIR}"/openmpi-ltdl.patch + + AT_M4DIR=config eautoreconf +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --enable-pretty-print-stacktrace + --enable-orterun-prefix-by-default + --with-hwloc="${EPREFIX}/usr" + --with-libltdl=external + ) + + if use mpi-threads; then + myconf+=(--enable-mpi-threads + --enable-opal-multi-threads) + fi + + if use fortran; then + if [[ $(tc-getFC) =~ g77 ]]; then + myconf+=(--disable-mpi-f90) + elif [[ $(tc-getFC) =~ if ]]; then + # Enabled here as gfortran compile times are huge with this enabled. + myconf+=(--with-mpi-f90-size=medium) + fi + else + myconf+=(--disable-mpi-f90 --disable-mpi-f77) + fi + + ! use vt && myconf+=(--enable-contrib-no-build=vt) + + econf "${myconf[@]}" \ + $(use_enable cxx mpi-cxx) \ + $(use_with cma) \ + $(use_with cuda cuda "$EPREFIX"/opt/cuda) \ + $(use_enable romio io-romio) \ + $(use_enable heterogeneous) \ + $(use_enable ipv6) \ + $(use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \ + $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \ + $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \ + $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \ + $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \ + $(use_enable openmpi_ofed_features_failover btl-openib-failover) \ + $(use_with openmpi_rm_pbs tm) \ + $(use_with openmpi_rm_slurm slurm) +} + +src_install () { + emake DESTDIR="${D}" install + # From USE=vt see #359917 + rm "${ED}"/usr/share/libtool &> /dev/null + # Avoid collisions with libevent + rm -rf "${ED}"/usr/include/event2 &> /dev/null + dodoc README AUTHORS NEWS VERSION || die +} + +src_test() { + # Doesn't work with the default src_test as the dry run (-n) fails. + + # Do not override malloc during build. Works around #462602 + emake -j1 check +} diff --git a/sys-cluster/openmpi/openmpi-1.8.4-r4.ebuild b/sys-cluster/openmpi/openmpi-1.8.4-r4.ebuild new file mode 100644 index 000000000000..3efd01baf16b --- /dev/null +++ b/sys-cluster/openmpi/openmpi-1.8.4-r4.ebuild @@ -0,0 +1,170 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit autotools cuda eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator + +MY_P=${P/-mpi} +S=${WORKDIR}/${MY_P} + +IUSE_OPENMPI_FABRICS=" + openmpi_fabrics_ofed + openmpi_fabrics_knem + openmpi_fabrics_open-mx + openmpi_fabrics_psm" + +IUSE_OPENMPI_RM=" + openmpi_rm_pbs + openmpi_rm_slurm" + +IUSE_OPENMPI_OFED_FEATURES=" + openmpi_ofed_features_control-hdr-padding + openmpi_ofed_features_connectx-xrc + openmpi_ofed_features_udcm + openmpi_ofed_features_rdmacm + openmpi_ofed_features_dynamic-sl + openmpi_ofed_features_failover" + +DESCRIPTION="A high-performance message passing library (MPI)" +HOMEPAGE="http://www.open-mpi.org" +SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2" +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha ~amd64 ppc ~ppc64 sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux" +IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads numa romio threads vt + ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}" + +REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs ) + openmpi_rm_pbs? ( !openmpi_rm_slurm ) + openmpi_fabrics_psm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_udcm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )" + +MPI_UNCLASSED_DEP_STR=" + vt? ( + !dev-libs/libotf + !app-text/lcdf-typetools + )" + +RDEPEND=" + !sys-cluster/mpich + !sys-cluster/mpich2 + !sys-cluster/mpiexec + dev-libs/libevent + dev-libs/libltdl:0 + >=sys-apps/hwloc-1.9.1[numa?] + sys-libs/zlib + cuda? ( dev-util/nvidia-cuda-toolkit ) + elibc_FreeBSD? ( dev-libs/libexecinfo ) + openmpi_fabrics_ofed? ( sys-infiniband/ofed ) + openmpi_fabrics_knem? ( sys-cluster/knem ) + openmpi_fabrics_open-mx? ( sys-cluster/open-mx ) + openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm ) + openmpi_rm_pbs? ( sys-cluster/torque ) + openmpi_rm_slurm? ( sys-cluster/slurm ) + openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm ) + " +DEPEND="${RDEPEND}" + +pkg_setup() { + fortran-2_pkg_setup + + if use mpi-threads; then + echo + ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" + ewarn "default and officially unsupported by upstream." + ewarn "You may stop now and set USE=-mpi-threads" + echo + fi + + echo + elog "OpenMPI has an overwhelming count of configuration options." + elog "Don't forget the EXTRA_ECONF environment variable can let you" + elog "specify configure options if you find them necessary." + echo +} + +src_prepare() { + # Necessary for scalibility, see + # http://www.open-mpi.org/community/lists/users/2008/09/6514.php + if use threads; then + echo 'oob_tcp_listen_mode = listen_thread' \ + >> opal/etc/openmpi-mca-params.conf + fi + + # https://github.com/open-mpi/ompi/issues/163 + epatch "${FILESDIR}"/openmpi-ltdl.patch + + AT_M4DIR=config eautoreconf +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --enable-pretty-print-stacktrace + --enable-orterun-prefix-by-default + --with-hwloc="${EPREFIX}/usr" + --with-libltdl=external + ) + + if use mpi-threads; then + myconf+=(--enable-mpi-threads + --enable-opal-multi-threads) + fi + + if use fortran; then + myconf+=(--enable-mpi-fortran=all) + else + myconf+=(--enable-mpi-fortran=no) + fi + + ! use vt && myconf+=(--enable-contrib-no-build=vt) + + econf "${myconf[@]}" \ + $(use_enable cxx mpi-cxx) \ + $(use_with cma) \ + $(use_with cuda cuda "${EPREFIX}"/opt/cuda) \ + $(use_enable romio io-romio) \ + $(use_enable heterogeneous) \ + $(use_enable ipv6) \ + $(use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \ + $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \ + $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \ + $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \ + $(use_enable openmpi_ofed_features_udcm openib-udcm) \ + $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \ + $(use_enable openmpi_ofed_features_failover btl-openib-failover) \ + $(use_with openmpi_rm_pbs tm) \ + $(use_with openmpi_rm_slurm slurm) +} + +src_install () { + emake DESTDIR="${D}" install + + # From USE=vt see #359917 + rm "${ED}"/usr/share/libtool &> /dev/null + + # Avoid collisions with libevent + rm -rf "${ED}"/usr/include/event2 &> /dev/null + + # Remove la files, no static libs are installed and we have pkg-config + find "${ED}"/usr/$(get_libdir)/ -type f -name '*.la' -delete + + dodoc README AUTHORS NEWS VERSION || die +} + +src_test() { + # Doesn't work with the default src_test as the dry run (-n) fails. + emake -j1 check +} diff --git a/sys-cluster/openmpi/openmpi-1.8.7-r1.ebuild b/sys-cluster/openmpi/openmpi-1.8.7-r1.ebuild new file mode 100644 index 000000000000..f67c8134b024 --- /dev/null +++ b/sys-cluster/openmpi/openmpi-1.8.7-r1.ebuild @@ -0,0 +1,183 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit cuda eutils flag-o-matic fortran-2 java-pkg-opt-2 multilib toolchain-funcs versionator + +MY_P=${P/-mpi} +S=${WORKDIR}/${MY_P} + +IUSE_OPENMPI_FABRICS=" + openmpi_fabrics_ofed + openmpi_fabrics_knem + openmpi_fabrics_open-mx + openmpi_fabrics_psm" + +IUSE_OPENMPI_RM=" + openmpi_rm_pbs + openmpi_rm_slurm" + +IUSE_OPENMPI_OFED_FEATURES=" + openmpi_ofed_features_control-hdr-padding + openmpi_ofed_features_connectx-xrc + openmpi_ofed_features_udcm + openmpi_ofed_features_rdmacm + openmpi_ofed_features_dynamic-sl + openmpi_ofed_features_failover" + +DESCRIPTION="A high-performance message passing library (MPI)" +HOMEPAGE="http://www.open-mpi.org" +SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux" +IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 java mpi-threads numa romio threads vt + ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}" + +REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs ) + openmpi_rm_pbs? ( !openmpi_rm_slurm ) + openmpi_fabrics_psm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_udcm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )" + +MPI_UNCLASSED_DEP_STR=" + vt? ( + !dev-libs/libotf + !app-text/lcdf-typetools + )" + +CDEPEND=" + !sys-cluster/mpich + !sys-cluster/mpich2 + !sys-cluster/mpiexec + dev-libs/libevent + dev-libs/libltdl:0 + >=sys-apps/hwloc-1.9.1[numa?] + sys-libs/zlib + cuda? ( dev-util/nvidia-cuda-toolkit ) + elibc_FreeBSD? ( dev-libs/libexecinfo ) + openmpi_fabrics_ofed? ( sys-infiniband/ofed ) + openmpi_fabrics_knem? ( sys-cluster/knem ) + openmpi_fabrics_open-mx? ( sys-cluster/open-mx ) + openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm ) + openmpi_rm_pbs? ( sys-cluster/torque ) + openmpi_rm_slurm? ( sys-cluster/slurm ) + openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm )" + +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.6 )" + +DEPEND="${CDEPEND} + java? ( >=virtual/jdk-1.6 )" + +pkg_setup() { + fortran-2_pkg_setup + java-pkg-opt-2_pkg_setup + + if use mpi-threads; then + echo + ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" + ewarn "default and officially unsupported by upstream." + ewarn "You may stop now and set USE=-mpi-threads" + echo + fi + + echo + elog "OpenMPI has an overwhelming count of configuration options." + elog "Don't forget the EXTRA_ECONF environment variable can let you" + elog "specify configure options if you find them necessary." + echo +} + +src_prepare() { + # Necessary for scalibility, see + # http://www.open-mpi.org/community/lists/users/2008/09/6514.php + if use threads; then + echo 'oob_tcp_listen_mode = listen_thread' \ + >> opal/etc/openmpi-mca-params.conf + fi +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --enable-pretty-print-stacktrace + --enable-orterun-prefix-by-default + --with-hwloc="${EPREFIX}/usr" + --with-libltdl="${EPREFIX}/usr" + ) + + if use fortran; then + myconf+=(--enable-mpi-fortran=all) + else + myconf+=(--enable-mpi-fortran=no) + fi + + if use java; then + # We must always build with the right -source and -target + # flags. Passing flags to javac isn't explicitly supported here + # but we can cheat by overriding the configure test for javac. + export ac_cv_path_JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)" + fi + + ! use vt && myconf+=(--enable-contrib-no-build=vt) + + econf "${myconf[@]}" \ + $(use_enable cxx mpi-cxx) \ + $(use_with cma) \ + $(use_with cuda cuda "${EPREFIX}"/opt/cuda) \ + $(use_enable romio io-romio) \ + $(use_enable heterogeneous) \ + $(use_enable ipv6) \ + $(use_enable mpi-threads mpi-thread-multiple) \ + $(use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \ + $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \ + $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \ + $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \ + $(use_enable openmpi_ofed_features_udcm openib-udcm) \ + $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \ + $(use_enable openmpi_ofed_features_failover btl-openib-failover) \ + $(use_with openmpi_rm_pbs tm) \ + $(use_with openmpi_rm_slurm slurm) \ + $(use_enable java) \ + $(use_enable java mpi-java) +} + +src_install () { + emake DESTDIR="${D}" install + + # From USE=vt see #359917 + rm "${ED}"/usr/share/libtool &> /dev/null + + # Avoid collisions with libevent + rm -rf "${ED}"/usr/include/event2 &> /dev/null + + # Remove la files, no static libs are installed and we have pkg-config + find "${ED}"/usr/$(get_libdir)/ -type f -name '*.la' -delete + + if use java; then + local mpi_jar="${ED}"/usr/$(get_libdir)/mpi.jar + java-pkg_dojar "${mpi_jar}" + # We don't want to install the jar file twice + # so let's clean after ourselves. + rm "${mpi_jar}" || die + fi + + dodoc README AUTHORS NEWS VERSION || die +} + +src_test() { + # Doesn't work with the default src_test as the dry run (-n) fails. + emake -j1 check +} diff --git a/sys-cluster/openmpi/openmpi-1.8.8.ebuild b/sys-cluster/openmpi/openmpi-1.8.8.ebuild new file mode 100644 index 000000000000..741c82fa87af --- /dev/null +++ b/sys-cluster/openmpi/openmpi-1.8.8.ebuild @@ -0,0 +1,183 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit cuda eutils flag-o-matic fortran-2 java-pkg-opt-2 multilib toolchain-funcs versionator + +MY_P=${P/-mpi} +S=${WORKDIR}/${MY_P} + +IUSE_OPENMPI_FABRICS=" + openmpi_fabrics_ofed + openmpi_fabrics_knem + openmpi_fabrics_open-mx + openmpi_fabrics_psm" + +IUSE_OPENMPI_RM=" + openmpi_rm_pbs + openmpi_rm_slurm" + +IUSE_OPENMPI_OFED_FEATURES=" + openmpi_ofed_features_control-hdr-padding + openmpi_ofed_features_connectx-xrc + openmpi_ofed_features_udcm + openmpi_ofed_features_rdmacm + openmpi_ofed_features_dynamic-sl + openmpi_ofed_features_failover" + +DESCRIPTION="A high-performance message passing library (MPI)" +HOMEPAGE="http://www.open-mpi.org" +SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux" +IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 java mpi-threads numa romio threads vt + ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}" + +REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs ) + openmpi_rm_pbs? ( !openmpi_rm_slurm ) + openmpi_fabrics_psm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_udcm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed ) + openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )" + +MPI_UNCLASSED_DEP_STR=" + vt? ( + !dev-libs/libotf + !app-text/lcdf-typetools + )" + +CDEPEND=" + !sys-cluster/mpich + !sys-cluster/mpich2 + !sys-cluster/mpiexec + dev-libs/libevent + dev-libs/libltdl:0 + >=sys-apps/hwloc-1.9.1[numa?] + sys-libs/zlib + cuda? ( dev-util/nvidia-cuda-toolkit ) + elibc_FreeBSD? ( dev-libs/libexecinfo ) + openmpi_fabrics_ofed? ( sys-infiniband/ofed:* ) + openmpi_fabrics_knem? ( sys-cluster/knem ) + openmpi_fabrics_open-mx? ( sys-cluster/open-mx ) + openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm:* ) + openmpi_rm_pbs? ( sys-cluster/torque ) + openmpi_rm_slurm? ( sys-cluster/slurm ) + openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm:* )" + +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.6 )" + +DEPEND="${CDEPEND} + java? ( >=virtual/jdk-1.6 )" + +pkg_setup() { + fortran-2_pkg_setup + java-pkg-opt-2_pkg_setup + + if use mpi-threads; then + echo + ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" + ewarn "default and officially unsupported by upstream." + ewarn "You may stop now and set USE=-mpi-threads" + echo + fi + + echo + elog "OpenMPI has an overwhelming count of configuration options." + elog "Don't forget the EXTRA_ECONF environment variable can let you" + elog "specify configure options if you find them necessary." + echo +} + +src_prepare() { + # Necessary for scalibility, see + # http://www.open-mpi.org/community/lists/users/2008/09/6514.php + if use threads; then + echo 'oob_tcp_listen_mode = listen_thread' \ + >> opal/etc/openmpi-mca-params.conf + fi +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --enable-pretty-print-stacktrace + --enable-orterun-prefix-by-default + --with-hwloc="${EPREFIX}/usr" + --with-libltdl="${EPREFIX}/usr" + ) + + if use fortran; then + myconf+=(--enable-mpi-fortran=all) + else + myconf+=(--enable-mpi-fortran=no) + fi + + if use java; then + # We must always build with the right -source and -target + # flags. Passing flags to javac isn't explicitly supported here + # but we can cheat by overriding the configure test for javac. + export ac_cv_path_JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)" + fi + + ! use vt && myconf+=(--enable-contrib-no-build=vt) + + econf "${myconf[@]}" \ + $(use_enable cxx mpi-cxx) \ + $(use_with cma) \ + $(use_with cuda cuda "${EPREFIX}"/opt/cuda) \ + $(use_enable romio io-romio) \ + $(use_enable heterogeneous) \ + $(use_enable ipv6) \ + $(use_enable mpi-threads mpi-thread-multiple) \ + $(use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \ + $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \ + $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \ + $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \ + $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \ + $(use_enable openmpi_ofed_features_udcm openib-udcm) \ + $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \ + $(use_enable openmpi_ofed_features_failover btl-openib-failover) \ + $(use_with openmpi_rm_pbs tm) \ + $(use_with openmpi_rm_slurm slurm) \ + $(use_enable java) \ + $(use_enable java mpi-java) +} + +src_install () { + emake DESTDIR="${D}" install + + # From USE=vt see #359917 + rm "${ED}"/usr/share/libtool &> /dev/null + + # Avoid collisions with libevent + rm -rf "${ED}"/usr/include/event2 &> /dev/null + + # Remove la files, no static libs are installed and we have pkg-config + find "${ED}"/usr/$(get_libdir)/ -type f -name '*.la' -delete + + if use java; then + local mpi_jar="${ED}"/usr/$(get_libdir)/mpi.jar + java-pkg_dojar "${mpi_jar}" + # We don't want to install the jar file twice + # so let's clean after ourselves. + rm "${mpi_jar}" || die + fi + + dodoc README AUTHORS NEWS VERSION || die +} + +src_test() { + # Doesn't work with the default src_test as the dry run (-n) fails. + emake -j1 check +} diff --git a/sys-cluster/openstack-meta/metadata.xml b/sys-cluster/openstack-meta/metadata.xml new file mode 100644 index 000000000000..796dd69e6177 --- /dev/null +++ b/sys-cluster/openstack-meta/metadata.xml @@ -0,0 +1,20 @@ +<?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"> + An openstack meta package to allow for easier installation of openstack. + </longdescription> + <use> + <flag name="keystone">Installs Openstack Keystone</flag> + <flag name="swift">Installs Openstack Swift</flag> + <flag name="glance">Installs Openstack Glance</flag> + <flag name="cinder">Installs Openstack Cinder</flag> + <flag name="neutron">Installs Openstack Neutron</flag> + <flag name="nova">Installs Openstack Nova</flag> + <!-- <flag name="horizon">Installs Openstack Horizon</flag> --> + </use> +</pkgmetadata> diff --git a/sys-cluster/openstack-meta/openstack-meta-2014.2.9999.ebuild b/sys-cluster/openstack-meta/openstack-meta-2014.2.9999.ebuild new file mode 100644 index 000000000000..48f79a3532ce --- /dev/null +++ b/sys-cluster/openstack-meta/openstack-meta-2014.2.9999.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A openstack meta-package for installing the various openstack pieces" +HOMEPAGE="https://openstack.org" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="" +IUSE="keystone swift neutron glance cinder nova" + +DEPEND="" +RDEPEND="keystone? ( ~sys-auth/keystone-2014.2.9999 ) + swift? ( ~sys-cluster/swift-2.2.2 ) + neutron? ( ~sys-cluster/neutron-2014.2.9999 ) + glance? ( ~app-admin/glance-2014.2.9999 ) + cinder? ( ~sys-cluster/cinder-2014.2.9999 ) + nova? ( ~sys-cluster/nova-2014.2.9999 )" diff --git a/sys-cluster/openstack-meta/openstack-meta-2015.1.9999.ebuild b/sys-cluster/openstack-meta/openstack-meta-2015.1.9999.ebuild new file mode 100644 index 000000000000..bdbb195582f6 --- /dev/null +++ b/sys-cluster/openstack-meta/openstack-meta-2015.1.9999.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A openstack meta-package for installing the various openstack pieces" +HOMEPAGE="https://openstack.org" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="" +IUSE="keystone swift neutron glance cinder nova" + +DEPEND="" +RDEPEND="keystone? ( ~sys-auth/keystone-2015.1.9999 ) + swift? ( ~sys-cluster/swift-2.3.0 ) + neutron? ( ~sys-cluster/neutron-2015.1.9999 ) + glance? ( ~app-admin/glance-2015.1.9999 ) + cinder? ( ~sys-cluster/cinder-2015.1.9999 ) + nova? ( ~sys-cluster/nova-2015.1.9999 )" diff --git a/sys-cluster/osc-mpiexec/Manifest b/sys-cluster/osc-mpiexec/Manifest new file mode 100644 index 000000000000..5e876b621b1f --- /dev/null +++ b/sys-cluster/osc-mpiexec/Manifest @@ -0,0 +1 @@ +DIST mpiexec-0.83.tgz 207619 SHA256 4485c6f5ced0889ea7fb88b49af001904348dee24a23cd85dd8402f606e2128d diff --git a/sys-cluster/osc-mpiexec/metadata.xml b/sys-cluster/osc-mpiexec/metadata.xml new file mode 100644 index 000000000000..348e6c4de815 --- /dev/null +++ b/sys-cluster/osc-mpiexec/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/osc-mpiexec/osc-mpiexec-0.83.ebuild b/sys-cluster/osc-mpiexec/osc-mpiexec-0.83.ebuild new file mode 100644 index 000000000000..bf679b39f5ca --- /dev/null +++ b/sys-cluster/osc-mpiexec/osc-mpiexec-0.83.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +MY_PN=${PN#osc-} +DESCRIPTION="replacement for mpirun, integrates MPI with PBS" +SRC_URI="http://www.osc.edu/~djohnson/mpiexec/${MY_PN}-${PV}.tgz" +HOMEPAGE="http://www.osc.edu/~djohnson/mpiexec/index.php" + +DEPEND="sys-cluster/torque" +RDEPEND="${DEPEND} + net-misc/openssh" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 ~ppc x86" +IUSE="" + +S="${WORKDIR}"/${MY_PN}-${PV} + +RESTRICT="test" +# The test suite that is included with the source requires +# the ability to qsub a number of jobs. Such behavior +# obviously does not belong in the ebuild. + +src_compile() { + local c="--with-default-comm=mpich-p4 + --with-pbs=/usr/ + --with-mpicc=/usr/bin/mpicc + --with-mpif77=/usr/bin/mpif77" + + # The following at the recommendation of README, Cray specific. + c="${c} --disable-mpich-rai" + + econf ${c} || die + emake || die "compile failed" +} + +src_install() { + local f + emake DESTDIR="${D}" install || die + + # And the following so that osc-mpiexec doesn't conflict with + # the packaged mpiexec's that all the MPI-2 implementations have. + for f in $(find "${D}" -name 'mpiexec*'); do + mv ${f} $(dirname ${f})/osc-$(basename ${f}) \ + || die "Failed to prefix binary ${f} with osc-" + done + + dodoc README README.lam ChangeLog +} + +pkg_postinst() { + elog "The OSC Mpiexec package typically installs it's binaries" + elog "and manpages as 'mpiexec'. However, this ebuild renames" + elog "those to be prefixed with 'osc-' in order to avoid blocking" + elog "against the exact packages that osc-mpiexec is meant to" + elog "work with." + elog + elog "The default communication device has been set to mpich-p4" + elog "(ethernet). If you wish to use another communication" + elog "device, either set MPIEXEC_COMM in your environment or use" + elog "the --comm argument to mpiexec." +} diff --git a/sys-cluster/pacemaker-gui/Manifest b/sys-cluster/pacemaker-gui/Manifest new file mode 100644 index 000000000000..2d2463f06810 --- /dev/null +++ b/sys-cluster/pacemaker-gui/Manifest @@ -0,0 +1 @@ +DIST pacemaker-gui-2.1.2.tar.gz 398311 SHA256 9c431916a186c027fe714b46acf84f017440ed120cdca174cf244cd946fbfac3 SHA512 7d1bffbe6478a250452ce692371f2e47d6cba11eaa2a7684e99cf2befdb32662c092d0e6b59973fe076ed9ce640082fd4ebb3e7b7cd8730cfa697af82dfdf06f WHIRLPOOL 3f2913a283d9a2ef18153d10f477348e15c292a19070173dec761e0f5aee2999c7395476e237e6d5690efdc29d9157de4a0d6ef2280b46f7c8895057b3850428 diff --git a/sys-cluster/pacemaker-gui/files/pacemaker-gui-2.1.1-doc.patch b/sys-cluster/pacemaker-gui/files/pacemaker-gui-2.1.1-doc.patch new file mode 100644 index 000000000000..8e89cc177516 --- /dev/null +++ b/sys-cluster/pacemaker-gui/files/pacemaker-gui-2.1.1-doc.patch @@ -0,0 +1,11 @@ +--- Makefile.am 2010-03-26 12:05:47.000000000 +0100 ++++ Makefile.am.doc 2010-07-02 14:53:52.429888536 +0200 +@@ -41,7 +41,7 @@ + SNMP_SUBAGENT_DIR = snmp_subagent + endif + +-SUBDIRS = $(LIBLTDL_DIR) replace include lib mgmt $(CIM_PROVIDER_DIR) $(TSA_PLUGIN_DIR) $(SNMP_SUBAGENT_DIR) doc ++SUBDIRS = $(LIBLTDL_DIR) replace include lib mgmt $(CIM_PROVIDER_DIR) $(TSA_PLUGIN_DIR) $(SNMP_SUBAGENT_DIR) + + tgz: + rm -f $(TARFILE) diff --git a/sys-cluster/pacemaker-gui/files/pacemaker-mgmt-query-node-uuid.patch b/sys-cluster/pacemaker-gui/files/pacemaker-mgmt-query-node-uuid.patch new file mode 100644 index 000000000000..72d1ff5d183d --- /dev/null +++ b/sys-cluster/pacemaker-gui/files/pacemaker-mgmt-query-node-uuid.patch @@ -0,0 +1,13 @@ +diff --git a/mgmt/daemon/mgmt_crm.c b/mgmt/daemon/mgmt_crm.c +index 9e5140c..3b5ff36 100644 +--- a/mgmt/daemon/mgmt_crm.c ++++ b/mgmt/daemon/mgmt_crm.c +@@ -1602,7 +1602,7 @@ on_cleanup_rsc(char* argv[], int argc) + delete_lrm_rsc(crmd_channel, argv[1], argv[2]); + refresh_lrm(crmd_channel, NULL); + +- rc = query_node_uuid(cib_conn, argv[1], &dest_node); ++ rc = query_node_uuid(cib_conn, argv[1], &dest_node, NULL); + if (rc != 0) { + mgmt_log(LOG_WARNING, "Could not map uname=%s to a UUID: %s\n", + argv[1], pcmk_strerror(rc)); diff --git a/sys-cluster/pacemaker-gui/metadata.xml b/sys-cluster/pacemaker-gui/metadata.xml new file mode 100644 index 000000000000..44a5e4b0e806 --- /dev/null +++ b/sys-cluster/pacemaker-gui/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>Pacemaker python GUI and management daemon</longdescription> + <use> + <flag name="heartbeat">Enable support for heartbeat based <pkg>sys-cluster/pacemaker</pkg>.</flag> + <flag name="gtk">Enable the GTK+ based GUI client.</flag> + </use> + <upstream> + <remote-id type="github">gao-yan/pacemaker-mgmt</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/pacemaker-gui/pacemaker-gui-2.1.2.ebuild b/sys-cluster/pacemaker-gui/pacemaker-gui-2.1.2.ebuild new file mode 100644 index 000000000000..2e373c5bf841 --- /dev/null +++ b/sys-cluster/pacemaker-gui/pacemaker-gui-2.1.2.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +PYTHON_DEPEND="2" +MY_P="pacemaker-mgmt-${PV}" +MY_TREE="3c95739" + +inherit python base autotools + +DESCRIPTION="Pacemaker python GUI and management daemon" +HOMEPAGE="http://hg.clusterlabs.org/pacemaker/pygui/" +SRC_URI="https://github.com/gao-yan/pacemaker-mgmt/tarball/${MY_P} -> ${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +KEYWORDS="~amd64 ~x86" +SLOT="0" +IUSE="-gtk heartbeat nls snmp static-libs" + +CDEPEND=" + app-arch/bzip2 + dev-libs/glib:2 + dev-libs/libxslt + dev-libs/openssl + net-libs/gnutls + sys-apps/util-linux + sys-cluster/cluster-glue + >=sys-cluster/pacemaker-1.1 + heartbeat? ( sys-cluster/pacemaker[heartbeat] ) + gtk? ( + dev-python/pygtk + ) + sys-libs/ncurses + sys-libs/pam + sys-libs/zlib" +RDEPEND="${CDEPEND} + sys-devel/libtool" +DEPEND="${CDEPEND} + gtk? ( dev-lang/swig ) + virtual/pkgconfig + nls? ( + dev-util/intltool + sys-devel/gettext + )" + +S="${WORKDIR}/gao-yan-pacemaker-mgmt-${MY_TREE}" + +PATCHES=( + "${FILESDIR}/${PN}-2.1.1-doc.patch" +) + +pkg_setup() { + python_set_active_version 2 +} + +src_prepare() { + base_src_prepare + # FIXME upstream said they will find a way to avoid this patch + if has_version ">sys-cluster/pacemaker-1.1.8"; then + epatch "${FILESDIR}"/pacemaker-mgmt-query-node-uuid.patch + fi + eautoreconf +} + +src_configure() { + local myopts="" + use heartbeat || myopts="--with-ais-support" + econf $(use_with heartbeat heartbeat-support) \ + $(use_enable snmp) \ + $(use_enable nls) \ + $(use_enable gtk mgmt-client) \ + $(use_enable static-libs static) \ + ${myopts} \ + --disable-fatal-warnings +} + +src_install() { + base_src_install + use static-libs || find "${D}"/usr/$(get_libdir)/ -name "*.la" -delete + dodoc README doc/AUTHORS || die +} + +pkg_postinst() { + elog "IMPORTANT: To have the mgmtd daemon started with your cluster," + elog "you must add this directive in /etc/corosync/service.d/pacemaker :" + elog "" + elog "use_mgmtd: 1" + elog "" + elog "NB: To access the GUI, your user must be part of the 'haclient' group" +} diff --git a/sys-cluster/pacemaker/Manifest b/sys-cluster/pacemaker/Manifest new file mode 100644 index 000000000000..b3ff3c0a8eb8 --- /dev/null +++ b/sys-cluster/pacemaker/Manifest @@ -0,0 +1 @@ +DIST Pacemaker-1.1.12.tar.gz 10459675 SHA256 f5c72b609fac18d362880d120f08f990e8afd9388e6ff86c55cd93900ba54d9c SHA512 cf88a313f5e91f445a159a5d800d27fd891f63c082c92d3f09bfd2aff856325e8ef6e0ebab8c0b2b9cd6eb15cc593c58c8e23e888e17d5286ebc651dd096f9c1 WHIRLPOOL e737d70288936d2f76d310848940bde78537c32e703c68d8dd37a78e54a66dc9d34cf2fe0037f1621fbc5ba10bb9688490da96394cde65f0668d4b62eccf3f03 diff --git a/sys-cluster/pacemaker/files/1.0.12-BUILD_VERSION.patch b/sys-cluster/pacemaker/files/1.0.12-BUILD_VERSION.patch new file mode 100644 index 000000000000..8e526644820a --- /dev/null +++ b/sys-cluster/pacemaker/files/1.0.12-BUILD_VERSION.patch @@ -0,0 +1,43 @@ +# HG changeset patch +# Parent d90c3d4786da4cfa7944c9009a0071e3ea6f8581 + +diff -r d90c3d4786da configure.ac +--- a/configure.ac Wed Jun 13 11:43:31 2012 +0900 ++++ b/configure.ac Wed Jun 13 11:44:38 2012 +0900 +@@ -464,20 +464,26 @@ + AC_DEFINE_UNQUOTED(STONITH_PLUGIN_DIR,"$STONITH_PLUGIN_DIR", Location for Stonith plugins) + AC_SUBST(STONITH_PLUGIN_DIR) + +-AC_PATH_PROGS(HG, hg false) ++AC_PATH_PROGS(GIT, git false) + AC_MSG_CHECKING(build version) +-BUILD_VERSION=unknown +-if test -f $srcdir/.hg_archival.txt; then +- BUILD_VERSION=`cat $srcdir/.hg_archival.txt | awk '/node:/ { print $2 }'` +-elif test -x $HG -a -d .hg; then +- BUILD_VERSION=`$HG id -itb` +- if test $? != 0; then +- BUILD_VERSION=unknown +- fi ++ ++BUILD_VERSION=$Format:%H$ ++if test $BUILD_VERSION != ":%H$"; then ++ AC_MSG_RESULT(archive hash: $BUILD_VERSION) ++ ++elif test -x $GIT -a -d .git; then ++ BUILD_VERSION=`$GIT log --pretty="format:%h" -n 1` ++ AC_MSG_RESULT(git hash: $BUILD_VERSION) ++ ++else ++ # The current directory name make a reasonable default ++ # Most generated archives will include the hash or tag ++ BASE=`basename $PWD` ++ BUILD_VERSION=`echo $BASE | sed s:.*[[Pp]]acemaker-::` ++ AC_MSG_RESULT(directory based hash: $BUILD_VERSION) + fi + + AC_DEFINE_UNQUOTED(BUILD_VERSION, "$BUILD_VERSION", Build version) +-AC_MSG_RESULT($BUILD_VERSION) + AC_SUBST(BUILD_VERSION) + + dnl =============================================== diff --git a/sys-cluster/pacemaker/files/1.1.7-glibc2.16.patch b/sys-cluster/pacemaker/files/1.1.7-glibc2.16.patch new file mode 100644 index 000000000000..73ffd0614c69 --- /dev/null +++ b/sys-cluster/pacemaker/files/1.1.7-glibc2.16.patch @@ -0,0 +1,13 @@ +Fix building with glibc-2.16 + +https://bugs.gentoo.org/show_bug.cgi?id=432012 +--- a/mcp/pacemaker.h ++++ b/mcp/pacemaker.h +@@ -21,6 +21,7 @@ + #include <sys/param.h> + #include <sys/types.h> + #include <sys/wait.h> ++#include <sys/resource.h> + + #include <stdint.h> + diff --git a/sys-cluster/pacemaker/files/1.1.8-backwards_compatibility.patch b/sys-cluster/pacemaker/files/1.1.8-backwards_compatibility.patch new file mode 100644 index 000000000000..d4a5780c0142 --- /dev/null +++ b/sys-cluster/pacemaker/files/1.1.8-backwards_compatibility.patch @@ -0,0 +1,36 @@ +--- a/lib/cluster/legacy.c 2012-11-08 11:55:09.297354491 +0100 ++++ b/lib/cluster/legacy.c 2012-11-08 11:54:57.507587115 +0100 +@@ -1362,17 +1362,27 @@ + /* If we can still talk to our peer process on that node, + * then its also part of the corosync membership + */ +- crm_trace("%s: processes=%.16x", node->uname, node->processes); ++ crm_trace("%s: processes=%.8x", node->uname, node->processes); + return TRUE; + +- } else if(is_classic_ais_cluster() && (node->processes & crm_proc_plugin) == 0) { +- crm_trace("%s: processes=%.16x", node->uname, node->processes); +- return FALSE; ++ } else if(is_classic_ais_cluster()) { ++ if(node->processes < crm_proc_none) { ++ crm_debug("%s: unknown process list, assuming active for now", node->uname); ++ return TRUE; ++ ++ } else if(is_set(node->processes, crm_proc_none)) { ++ crm_debug("%s: all processes are inactive", node->uname); ++ return FALSE; ++ ++ } else if(is_not_set(node->processes, crm_proc_plugin)) { ++ crm_trace("%s: processes=%.8x", node->uname, node->processes); ++ return FALSE; ++ } + } + + proc = text2proc(crm_system_name); +- if(proc != crm_proc_none && (node->processes & proc) == 0) { +- crm_trace("%s: proc %.16x not in %.16x", node->uname, proc, node->processes); ++ if(proc > crm_proc_none && (node->processes & proc) == 0) { ++ crm_trace("%s: proc %.8x not in %.8x", node->uname, proc, node->processes); + return FALSE; + } + diff --git a/sys-cluster/pacemaker/files/pacemaker-1.0.10-asneeded.patch b/sys-cluster/pacemaker/files/pacemaker-1.0.10-asneeded.patch new file mode 100644 index 000000000000..ac2655049380 --- /dev/null +++ b/sys-cluster/pacemaker/files/pacemaker-1.0.10-asneeded.patch @@ -0,0 +1,22 @@ +--- Makefile.am ++++ Makefile.am +@@ -23,7 +23,7 @@ + MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DRF/config-h.in \ + DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar + +-SUBDIRS = debian $(LIBLTDL_DIR) replace include lib pengine cib crmd fencing tools shell xml cts extra doc ++SUBDIRS = $(LIBLTDL_DIR) replace include lib pengine cib crmd fencing tools shell xml cts extra doc + + doc_DATA = AUTHORS COPYING COPYING.LIB + +--- lib/pengine/Makefile.am ++++ lib/pengine/Makefile.am +@@ -34,7 +34,7 @@ + + libpe_status_la_LDFLAGS = -version-info 2:0:0 + libpe_status_la_SOURCES = $(rule_files) $(status_files) +-libpe_status_la_LIBADD = -llrm ++libpe_status_la_LIBADD = -llrm @CURSESLIBS@ + + clean-generic: + rm -f *.log *.debug *~ diff --git a/sys-cluster/pacemaker/files/pacemaker-1.0.10-installpaths.patch b/sys-cluster/pacemaker/files/pacemaker-1.0.10-installpaths.patch new file mode 100644 index 000000000000..5187b7967ea9 --- /dev/null +++ b/sys-cluster/pacemaker/files/pacemaker-1.0.10-installpaths.patch @@ -0,0 +1,9 @@ +--- extra/Makefile.am ++++ extra/Makefile.am +@@ -20,5 +20,5 @@ + + SUBDIRS = resources + +-mibdir = $(datadir)/snmp/mibs ++mibdir = $(datadir)/$(PACKAGE)/snmp/mibs + mib_DATA = PCMK-MIB.txt diff --git a/sys-cluster/pacemaker/files/pacemaker-1.1.10-tinfo.patch b/sys-cluster/pacemaker/files/pacemaker-1.1.10-tinfo.patch new file mode 100644 index 000000000000..1dba440c9e79 --- /dev/null +++ b/sys-cluster/pacemaker/files/pacemaker-1.1.10-tinfo.patch @@ -0,0 +1,21 @@ +--- a/configure.ac 2014-12-12 14:13:07.262413254 +0100 ++++ b/configure.ac 2014-12-12 14:13:14.922480835 +0100 +@@ -885,14 +885,16 @@ + CURSESLIBS='' + if test "$ac_cv_header_ncurses_h" = "yes"; then + AC_CHECK_LIB(ncurses, printw, +- [CURSESLIBS='-lncurses'; AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)] ++ [AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)] + ) ++ CURSESLIBS=`$PKGCONFIG --libs ncurses`; + fi + + if test "$ac_cv_header_ncurses_ncurses_h" = "yes"; then + AC_CHECK_LIB(ncurses, printw, +- [CURSESLIBS='-lncurses'; AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)] ++ [AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)] + ) ++ CURSESLIBS=`$PKGCONFIG --libs ncurses`; + fi + + dnl Only look for non-n-library if there was no n-library. diff --git a/sys-cluster/pacemaker/files/pacemaker-1.1.12-glib.patch b/sys-cluster/pacemaker/files/pacemaker-1.1.12-glib.patch new file mode 100644 index 000000000000..8233f98a17e8 --- /dev/null +++ b/sys-cluster/pacemaker/files/pacemaker-1.1.12-glib.patch @@ -0,0 +1,47 @@ +From 568e41db929a34106c8c2ff7c48716ab5c13ef49 Mon Sep 17 00:00:00 2001 +From: Andrew Beekhof <andrew@beekhof.net> +Date: Mon, 13 Oct 2014 13:30:58 +1100 +Subject: [PATCH] Fix: lrmd: Prevent glib assert triggered by timers being + removed from mainloop more than once + +--- + lib/services/services.c | 3 +++ + lib/services/services_linux.c | 1 + + 2 files changed, 4 insertions(+) + +--- a/lib/services/services.c ++++ b/lib/services/services.c +@@ -313,6 +313,7 @@ services_action_free(svc_action_t * op) + + if (op->opaque->repeat_timer) { + g_source_remove(op->opaque->repeat_timer); ++ op->opaque->repeat_timer = 0; + } + if (op->opaque->stderr_gsource) { + mainloop_del_fd(op->opaque->stderr_gsource); +@@ -425,6 +426,7 @@ services_action_kick(const char *name, c + } else { + if (op->opaque->repeat_timer) { + g_source_remove(op->opaque->repeat_timer); ++ op->opaque->repeat_timer = 0; + } + recurring_action_timer(op); + return TRUE; +@@ -459,6 +461,7 @@ handle_duplicate_recurring(svc_action_t + if (dup->pid != 0) { + if (op->opaque->repeat_timer) { + g_source_remove(op->opaque->repeat_timer); ++ op->opaque->repeat_timer = 0; + } + recurring_action_timer(dup); + } +--- a/lib/services/services_linux.c ++++ b/lib/services/services_linux.c +@@ -226,6 +226,7 @@ recurring_action_timer(gpointer data) + op->stdout_data = NULL; + free(op->stderr_data); + op->stderr_data = NULL; ++ op->opaque->repeat_timer = 0; + + services_action_async(op, NULL); + return FALSE; diff --git a/sys-cluster/pacemaker/files/pacemaker-1.1.12-stonith.patch b/sys-cluster/pacemaker/files/pacemaker-1.1.12-stonith.patch new file mode 100644 index 000000000000..31c729559f35 --- /dev/null +++ b/sys-cluster/pacemaker/files/pacemaker-1.1.12-stonith.patch @@ -0,0 +1,21 @@ +Description: Fix: stonith-ng: Reset mainloop source IDs after removing them + +Origin: upstream, commit: 0326f05c9e26f39a394fa30830e31a76306f49c7 +Author: Andrew Beekhof <andrew@beekhof.net> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1412962 +Last-Update: 2015-01-20 + +--- a/lib/fencing/st_client.c ++++ b/lib/fencing/st_client.c +@@ -663,9 +663,11 @@ stonith_action_async_done(mainloop_child + + if (action->timer_sigterm > 0) { + g_source_remove(action->timer_sigterm); ++ action->timer_sigterm = 0; + } + if (action->timer_sigkill > 0) { + g_source_remove(action->timer_sigkill); ++ action->timer_sigkill = 0; + } + + if (action->last_timeout_signo) { diff --git a/sys-cluster/pacemaker/files/pacemaker.initd b/sys-cluster/pacemaker/files/pacemaker.initd new file mode 100644 index 000000000000..9adb92b28fa2 --- /dev/null +++ b/sys-cluster/pacemaker/files/pacemaker.initd @@ -0,0 +1,42 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +PIDFILE=/var/run/pacemaker.pid + +depend() { + need net corosync + use syslog +} + +start() { + nc=0 + ebegin "Starting Pacemaker Cluster Manager" + + checkpath -d -m 0750 -o hacluster:haclient /var/run/crm + + einfon "Waiting for Corosync startup ." + while true; do + /usr/sbin/corosync-cfgtool -s &>/dev/null && break + nc=$(expr $nc + 1) + if [ $nc -gt 30 ]; then + echo + eend 1 "Failed to detect Corosync startup, is it really running ?" + exit 1 + fi + sleep 1 + echo -n "." + done + echo + start-stop-daemon --start -q --exec /usr/sbin/pacemakerd \ + --pidfile "${PIDFILE}" --make-pidfile --background \ + -- -f + eend $? +} + +stop() { + ebegin "Stopping Pacemaker Cluster Manager" + start-stop-daemon --stop -q --pidfile "${PIDFILE}" + eend $? +} diff --git a/sys-cluster/pacemaker/files/pacemaker.service b/sys-cluster/pacemaker/files/pacemaker.service new file mode 100644 index 000000000000..6383499ba923 --- /dev/null +++ b/sys-cluster/pacemaker/files/pacemaker.service @@ -0,0 +1,5 @@ +service { + # Load the Pacemaker Cluster Resource Manager + name: pacemaker + ver: 1 +}
\ No newline at end of file diff --git a/sys-cluster/pacemaker/files/ping b/sys-cluster/pacemaker/files/ping new file mode 100644 index 000000000000..52c4c3d4cad8 --- /dev/null +++ b/sys-cluster/pacemaker/files/ping @@ -0,0 +1,380 @@ +#!/bin/sh +# +# +# Ping OCF RA that utilizes the system ping +# +# Copyright (c) 2009 Andrew Beekhof +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of version 2 of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Further, this software is distributed without any warranty that it is +# free of the rightful claim of any third person regarding infringement +# or the like. Any license provided herein, whether implied or +# otherwise, applies only to this software file. Patent licenses, if +# any, provided herein do not apply to combinations of this program with +# other software, or any other product whatsoever. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +# + +####################################################################### +# Initialization: + +: ${OCF_FUNCTIONS=${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs} +. ${OCF_FUNCTIONS} +: ${__OCF_ACTION=$1} + +####################################################################### + +meta_data() { + cat <<END +<?xml version="1.0"?> +<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> +<resource-agent name="ping"> +<version>1.0</version> + +<longdesc lang="en"> +Every time the monitor action is run, this resource agent records (in the CIB) the current number of ping nodes the host can connect to. +It is essentially the same as pingd except that it uses the system ping tool to obtain the results. +</longdesc> +<shortdesc lang="en">node connectivity</shortdesc> + +<parameters> + +<parameter name="pidfile" unique="0"> +<longdesc lang="en">PID file</longdesc> +<shortdesc lang="en">PID file</shortdesc> +<content type="string" default="$HA_VARRUN/ping-${OCF_RESOURCE_INSTANCE}" /> +</parameter> + +<parameter name="dampen" unique="0"> +<longdesc lang="en"> +The time to wait (dampening) further changes occur +</longdesc> +<shortdesc lang="en">Dampening interval</shortdesc> +<content type="integer" default="5s"/> +</parameter> + +<parameter name="name" unique="0"> +<longdesc lang="en"> +The name of the attributes to set. This is the name to be used in the constraints. +</longdesc> +<shortdesc lang="en">Attribute name</shortdesc> +<content type="string" default="pingd"/> +</parameter> + +<parameter name="multiplier" unique="0"> +<longdesc lang="en"> +The number by which to multiply the number of connected ping nodes by +</longdesc> +<shortdesc lang="en">Value multiplier</shortdesc> +<content type="integer" default=""/> +</parameter> + +<parameter name="host_list" unique="0" required="1"> +<longdesc lang="en"> +The list of ping nodes to count. +</longdesc> +<shortdesc lang="en">Host list</shortdesc> +<content type="string" default=""/> +</parameter> + +<parameter name="attempts" unique="0"> +<longdesc lang="en"> +Number of ping attempts, per host, before declaring it dead +</longdesc> +<shortdesc lang="en">no. of ping attempts</shortdesc> +<content type="integer" default="2"/> +</parameter> + +<parameter name="timeout" unique="0"> +<longdesc lang="en"> +How long, in seconds, to wait before declaring a ping lost +</longdesc> +<shortdesc lang="en">ping timeout in seconds</shortdesc> +<content type="integer" default="2"/> +</parameter> + +<parameter name="options" unique="0"> +<longdesc lang="en"> +A catch all for any other options that need to be passed to ping. +</longdesc> +<shortdesc lang="en">Extra Options</shortdesc> +<content type="string" default=""/> +</parameter> + +<parameter name="failure_score" unique="0"> +<longdesc lang="en"> +Resource is failed if the score is less than failure_score. +Default never fails. +</longdesc> +<shortdesc lang="en">failure_score</shortdesc> +<content type="integer" default=""/> +</parameter> + +<parameter name="debug" unique="0"> +<longdesc lang="en"> +Enables to use default attrd_updater verbose logging on every call. +</longdesc> +<shortdesc lang="en">Verbose logging</shortdesc> +<content type="string" default="false"/> +</parameter> + +</parameters> + +<actions> +<action name="start" timeout="60" /> +<action name="stop" timeout="20" /> +<action name="reload" timeout="100" /> +<action name="monitor" depth="0" timeout="60" interval="10"/> +<action name="meta-data" timeout="5" /> +<action name="validate-all" timeout="30" /> +</actions> +</resource-agent> +END +} + +####################################################################### + +ping_conditional_log() { + level=$1; shift + if [ ${OCF_RESKEY_debug} = "true" ]; then + ocf_log $level "$*" + fi +} + +ping_usage() { + cat <<END +usage: $0 {start|stop|monitor|migrate_to|migrate_from|validate-all|meta-data} + +Expects to have a fully populated OCF RA-compliant environment set. +END +} + +ping_start() { + ping_monitor + if [ $? = $OCF_SUCCESS ]; then + return $OCF_SUCCESS + fi + touch ${OCF_RESKEY_pidfile} + ping_update +} + +ping_stop() { + + rm -f ${OCF_RESKEY_pidfile} + + attrd_updater -D -n $OCF_RESKEY_name -d $OCF_RESKEY_dampen $attrd_options + + return $OCF_SUCCESS +} + +ping_monitor() { + if [ -f ${OCF_RESKEY_pidfile} ]; then + ping_update + if [ $? -eq 0 ]; then + return $OCF_SUCCESS + fi + return $OCF_ERR_GENERIC + fi + return $OCF_NOT_RUNNING +} + +ping_validate() { + # Is the state directory writable? + state_dir=`dirname "$OCF_RESKEY_pidfile"` + touch "$state_dir/$$" + if [ $? != 0 ]; then + ocf_log err "Invalid location for 'state': $state_dir is not writable" + return $OCF_ERR_ARGS + fi + rm "$state_dir/$$" + +# Pidfile better be an absolute path + case $OCF_RESKEY_pidfile in + /*) ;; + *) ocf_log warn "You should use an absolute path for pidfile not: $OCF_RESKEY_pidfile" ;; + esac + +# Check the host list + if [ "x" = "x$OCF_RESKEY_host_list" ]; then + ocf_log err "Empty host_list. Please specify some nodes to ping" + exit $OCF_ERR_CONFIGURED + fi + + check_binary ping + + return $OCF_SUCCESS +} + + +fping_check() { + active=0 + f_out=`mktemp` + f_err=`mktemp` + + n=$OCF_RESKEY_attempts + timeout=`expr $OCF_RESKEY_timeout \* 1000 / $OCF_RESKEY_attempts` + + cmd="fping -r $OCF_RESKEY_attempts -t $timeout -B 1.0 $OCF_RESKEY_host_list" + $cmd>$f_out 2>$f_err; rc=$? + active=`grep alive $f_out|wc -l` + + case $rc in + 0) + ;; + 1) + for h in `grep unreachable $f_out | awk '{print $1}'`; do + ping_conditional_log warn "$h is inactive" + done + ;; + *) + ocf_log err "Unexpected result for '$cmd' $rc: `tr '\n' ';' < $f_err`" + ;; + esac + rm -f $f_out $f_err + + return $active +} + +ping_check() { + active=0 + for host in $OCF_RESKEY_host_list; do + p_exe=ping + + case `uname` in + Linux) p_args="-n -q -W $OCF_RESKEY_timeout -c $OCF_RESKEY_attempts";; + Darwin) p_args="-n -q -t $OCF_RESKEY_timeout -c $OCF_RESKEY_attempts -o";; + *) ocf_log err "Unknown host type: `uname`"; exit $OCF_ERR_INSTALLED;; + esac + + case $host in + *:*) p_exe=ping6 + esac + + p_out=`$p_exe $p_args $OCF_RESKEY_options $host 2>&1`; rc=$? + + case $rc in + 0) active=`expr $active + 1`;; + 1) ping_conditional_log warn "$host is inactive: $p_out";; + *) ocf_log err "Unexpected result for '$p_exe $p_args $OCF_RESKEY_options $host' $rc: $p_out";; + esac + done + return $active +} + +ping_update() { + + if have_binary fping; then + fping_check + active=$? + else + ping_check + active=$? + fi + + score=`expr $active \* $OCF_RESKEY_multiplier` + attrd_updater -n $OCF_RESKEY_name -v $score -d $OCF_RESKEY_dampen $attrd_options + rc=$? + case $rc in + 0) ping_conditional_log debug "Updated $OCF_RESKEY_name = $score" ;; + *) ocf_log warn "Could not update $OCF_RESKEY_name = $score: rc=$rc";; + esac + if [ $rc -ne 0 ]; then + return $rc + fi + + if [ -n "$OCF_RESKEY_failure_score" -a "$score" -lt "$OCF_RESKEY_failure_score" ]; then + ocf_log warn "$OCF_RESKEY_name is less than failure_score($OCF_RESKEY_failure_score)" + return 1 + fi + return 0 +} + +: ${OCF_RESKEY_name:="pingd"} +: ${OCF_RESKEY_dampen:="5s"} +: ${OCF_RESKEY_attempts:="3"} +: ${OCF_RESKEY_multiplier:="1"} +: ${OCF_RESKEY_debug:="false"} +: ${OCF_RESKEY_failure_score:="0"} + +: ${OCF_RESKEY_CRM_meta_timeout:="20000"} +: ${OCF_RESKEY_CRM_meta_globally_unique:="true"} + +integer=`echo ${OCF_RESKEY_timeout} | egrep -o '[0-9]*'` +case ${OCF_RESKEY_timeout} in + *[0-9]ms|*[0-9]msec) OCF_RESKEY_timeout=`expr $integer / 1000`;; + *[0-9]m|*[0-9]min) OCF_RESKEY_timeout=`expr $integer \* 60`;; + *[0-9]h|*[0-9]hr) OCF_RESKEY_timeout=`expr $integer \* 60 \* 60`;; + *) OCF_RESKEY_timeout=$integer;; +esac + +if [ -z ${OCF_RESKEY_timeout} ]; then + if [ x"$OCF_RESKEY_host_list" != x ]; then + host_count=`echo $OCF_RESKEY_host_list | awk '{print NF}'` + OCF_RESKEY_timeout=`expr $OCF_RESKEY_CRM_meta_timeout / $host_count / $OCF_RESKEY_attempts` + OCF_RESKEY_timeout=`expr $OCF_RESKEY_timeout / 1100` # Convert to seconds and finish 10% early + else + OCF_RESKEY_timeout=5 + fi +fi + +if [ ${OCF_RESKEY_timeout} -lt 1 ]; then + OCF_RESKEY_timeout=5 +elif [ ${OCF_RESKEY_timeout} -gt 1000 ]; then + # ping actually complains if this value is too high, 5 minutes is plenty + OCF_RESKEY_timeout=300 +fi + +if [ ${OCF_RESKEY_CRM_meta_globally_unique} = "false" ]; then + : ${OCF_RESKEY_pidfile:="$HA_VARRUN/ping-${OCF_RESKEY_name}"} +else + : ${OCF_RESKEY_pidfile:="$HA_VARRUN/ping-${OCF_RESOURCE_INSTANCE}"} +fi + +case $__OCF_ACTION in + meta-data) + meta_data + exit $OCF_SUCCESS + ;; + usage|help) + ping_usage + exit $OCF_SUCCESS + ;; +esac + +attrd_options='-q' +if ocf_is_true ${OCF_RESKEY_debug} ; then + attrd_options='' +fi + +# Check the debug option + case "${OCF_RESKEY_debug}" in + true|True|TRUE|1) OCF_RESKEY_debug=true;; + false|False|FALSE|0) OCF_RESKEY_debug=false;; + *) + ocf_log warn "Value for 'debug' is incorrect. Please specify 'true' or 'false' not: ${OCF_RESKEY_debug}" + OCF_RESKEY_debug=false + ;; + esac + +case $__OCF_ACTION in +start) ping_start;; +stop) ping_stop;; +monitor) ping_monitor;; +reload) ping_start;; +validate-all) ping_validate;; +*) ping_usage + exit $OCF_ERR_UNIMPLEMENTED + ;; +esac +exit $? diff --git a/sys-cluster/pacemaker/metadata.xml b/sys-cluster/pacemaker/metadata.xml new file mode 100644 index 000000000000..a841b6df7fb2 --- /dev/null +++ b/sys-cluster/pacemaker/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cluster</herd> + <longdescription>Pacemaker is a cluster resource manager. + It achieves maximum availability for your cluster services (aka. resources) by detecting and + recovering from node and resource-level failures by making use of the messaging and membership + capabilities provided by your preferred cluster infrastructure (either OpenAIS or Heartbeat). + </longdescription> + <use> + <flag name="cman">Enable <pkg>sys-cluster/cman</pkg> support.</flag> + <flag name="heartbeat">Enable <pkg>sys-cluster/heartbeat</pkg> support.</flag> + <flag name="smtp">Enable SMTP support via <pkg>net-libs/libsmtp</pkg></flag> + </use> + <upstream> + <remote-id type="github">ClusterLabs/pacemaker</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/pacemaker/pacemaker-1.1.12-r2.ebuild b/sys-cluster/pacemaker/pacemaker-1.1.12-r2.ebuild new file mode 100644 index 000000000000..633bdd2228ca --- /dev/null +++ b/sys-cluster/pacemaker/pacemaker-1.1.12-r2.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) +WANT_AUTOMAKE="1.12" + +inherit autotools eutils python-single-r1 + +MY_PN="Pacemaker" +MY_P=${MY_PN}-${PV/_/-} + +DESCRIPTION="Pacemaker CRM" +HOMEPAGE="http://www.linux-ha.org/wiki/Pacemaker" +SRC_URI="https://github.com/ClusterLabs/${PN}/archive/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa x86" +REQUIRED_USE="cman? ( !heartbeat )" +IUSE="acl cman heartbeat smtp snmp static-libs" + +DEPEND="${PYTHON_DEPS} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + sys-cluster/cluster-glue + >=sys-cluster/libqb-0.14.0 + sys-cluster/resource-agents + cman? ( sys-cluster/cman ) + heartbeat? ( >=sys-cluster/heartbeat-3.0.0 ) + !heartbeat? ( sys-cluster/corosync ) + smtp? ( net-libs/libesmtp ) + snmp? ( net-analyzer/net-snmp ) +" +RDEPEND="${DEPEND}" + +REQUIRED_USE=${PYTHON_REQUIRED_USE} + +PATCHES=( + "${FILESDIR}"/pacemaker-1.1.10-tinfo.patch + "${FILESDIR}"/pacemaker-1.1.12-glib.patch + "${FILESDIR}"/pacemaker-1.1.12-stonith.patch +) + +S="${WORKDIR}/${PN}-${MY_P}" + +src_prepare() { + epatch "${PATCHES[@]}" + epatch_user + + # bug #490908 + cp "${FILESDIR}/ping" extra/resources/ping || die + + sed -i -e "/ggdb3/d" configure.ac || die + sed -i -e "s/ -ggdb//g" configure.ac || die + sed -i -e "s/uid2username(uid)/uid2username(uid_client)/g" lib/common/ipc.c || die + sed -i -e "s:<glib/ghash.h>:<glib.h>:" lib/ais/plugin.c || die + eautoreconf + + python_fix_shebang . +} + +src_configure() { + local myopts="" + if use heartbeat ; then + myopts="--without-corosync" + else + myopts="--with-ais" + fi + # appends lib to localstatedir automatically + econf \ + --libdir=/usr/$(get_libdir) \ + --localstatedir=/var \ + --disable-dependency-tracking \ + --disable-fatal-warnings \ + $(use_with acl) \ + $(use_with cman cs-quorum) \ + $(use_with cman cman) \ + $(use_with heartbeat) \ + $(use_with smtp esmtp) \ + $(use_with snmp) \ + $(use_enable static-libs static) \ + ${myopts} +} + +src_install() { + default + rm -rf "${D}"/var/run "${D}"/etc/init.d + newinitd "${FILESDIR}/${PN}.initd" ${PN} || die + if has_version "<sys-cluster/corosync-2.0"; then + insinto /etc/corosync/service.d + newins "${FILESDIR}/${PN}.service" ${PN} || die + fi +} + +pkg_postinst() { + elog " " + elog "Looking for the crm CLI ? emerge sys-cluster/crmsh !" + elog " " +} diff --git a/sys-cluster/pbs-python/Manifest b/sys-cluster/pbs-python/Manifest new file mode 100644 index 000000000000..d9efc60ab7f7 --- /dev/null +++ b/sys-cluster/pbs-python/Manifest @@ -0,0 +1 @@ +DIST pbs_python-4.3.3.tar.gz 185442 SHA256 d149803973f8db52ca62a49e69e9e34b4d8726d8b7fa480f909d345dca9dd2b8 SHA512 2a8c49d0be887cd7c5f9c17bd7ce679c7c04481c70e6949fd430007b7678c15636e8416fd30ac16d06cc387680bd4f9d3df8cad8be7b512b6fa2785891338044 WHIRLPOOL 15db1b5bae67b3eca4924a596d7040305f13b37c030314c268734b3d5c1145aa8f99196dd405ee802062daa41fd24cacc02f60ccd738c84e83601ef2309aef02 diff --git a/sys-cluster/pbs-python/metadata.xml b/sys-cluster/pbs-python/metadata.xml new file mode 100644 index 000000000000..55dd68aadc97 --- /dev/null +++ b/sys-cluster/pbs-python/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/pbs-python/pbs-python-4.3.3-r1.ebuild b/sys-cluster/pbs-python/pbs-python-4.3.3-r1.ebuild new file mode 100644 index 000000000000..c6762e49b410 --- /dev/null +++ b/sys-cluster/pbs-python/pbs-python-4.3.3-r1.ebuild @@ -0,0 +1,42 @@ +# 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 + +MY_P=${P/-/_} + +DESCRIPTION="Python bindings to the Torque C API" +HOMEPAGE="https://subtrac.sara.nl/oss/pbs_python/" +SRC_URI="ftp://ftp.sara.nl/pub/outgoing/${MY_P}.tar.gz" + +LICENSE="openpbs" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +DEPEND="sys-cluster/torque" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +python_prepare_all() { + sed -i -e "s/4.1.3/${PV}/" setup.py.in || die + distutils-r1_python_prepare_all +} + +python_configure_all() { + econf +} + +python_install_all() { + distutils-r1_python_install_all + + if use examples; then + insinto /usr/share/doc/${P} + doins "${S}"/examples/* + fi +} diff --git a/sys-cluster/pconsole/Manifest b/sys-cluster/pconsole/Manifest new file mode 100644 index 000000000000..af5350f4961e --- /dev/null +++ b/sys-cluster/pconsole/Manifest @@ -0,0 +1 @@ +DIST pconsole-1.0.tar.gz 215426 SHA256 94520bf65f726df9d7e686bb486e9a2828c29d09a20b9522f1da4f7d66700bb2 diff --git a/sys-cluster/pconsole/files/pconsole-1.0-exit-warn.patch b/sys-cluster/pconsole/files/pconsole-1.0-exit-warn.patch new file mode 100644 index 000000000000..f306d6408ee8 --- /dev/null +++ b/sys-cluster/pconsole/files/pconsole-1.0-exit-warn.patch @@ -0,0 +1,10 @@ +--- pconsole.c 2001-04-09 12:51:49.000000000 +0400 ++++ pconsole.c~vox 2004-08-16 11:37:49.606267087 +0400 +@@ -28,6 +28,7 @@ + #include "Conn.h" + + #include <stdio.h> ++#include <stdlib.h> + #include <unistd.h> + #include <errno.h> + #include <signal.h> diff --git a/sys-cluster/pconsole/metadata.xml b/sys-cluster/pconsole/metadata.xml new file mode 100644 index 000000000000..348e6c4de815 --- /dev/null +++ b/sys-cluster/pconsole/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/pconsole/pconsole-1.0-r3.ebuild b/sys-cluster/pconsole/pconsole-1.0-r3.ebuild new file mode 100644 index 000000000000..a72d90578947 --- /dev/null +++ b/sys-cluster/pconsole/pconsole-1.0-r3.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit eutils toolchain-funcs + +DESCRIPTION="Tool for managing multiple xterms simultaneously" +HOMEPAGE="http://www.heiho.net/pconsole/" +SRC_URI="http://www.xs4all.nl/~walterj/pconsole/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="virtual/ssh" + +src_prepare() { + epatch "${FILESDIR}"/${P}-exit-warn.patch +} + +src_compile() { + emake LFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" || die +} + +src_install() { + dobin pconsole || die + fperms 4110 /usr/bin/pconsole || die + dodoc ChangeLog README.pconsole || die + dohtml public_html/pconsole.html || die +} + +pkg_postinst() { + echo + ewarn "Warning:" + ewarn "pconsole installed with suid root!" + echo +} diff --git a/sys-cluster/ploop/Manifest b/sys-cluster/ploop/Manifest new file mode 100644 index 000000000000..056d0d085246 --- /dev/null +++ b/sys-cluster/ploop/Manifest @@ -0,0 +1 @@ +DIST ploop-1.13.2.tar.bz2 122821 SHA256 c1705c3bebd4f0f8860fecadf57cca457216b2abad880eb36098351244f9c1c3 SHA512 85a3314dc1114b692cd98290412fd2ea78c516964c712487dd72f8347fd583172d8836f997d63ccade89ee39be031669074d9bc957926b97175e659ec505ddfb WHIRLPOOL aea714ec18aa82cce2fcffa9aafdfe0e627ed83db9b8eaf0621b2dddb58fd300fdd9a3896e2e5192154cc5e0b6b11668128ed2e66fd04c1daae84e23d41c7a99 diff --git a/sys-cluster/ploop/files/ploop-1.2-soname.patch b/sys-cluster/ploop/files/ploop-1.2-soname.patch new file mode 100644 index 000000000000..34cd56567c43 --- /dev/null +++ b/sys-cluster/ploop/files/ploop-1.2-soname.patch @@ -0,0 +1,19 @@ +--- lib/Makefile 2012-05-03 21:11:04.000000000 +0400 ++++ lib/Makefile 2012-05-03 21:10:47.000000000 +0400 +@@ -2,6 +2,7 @@ + + LIBPLOOP=libploop.a + LIBPLOOP_DYN = libploop.so ++SONAME = $(LIBPLOOP_DYN).0 + LIBOBJS=uuid.o \ + delta_read.o \ + delta_sysfs.o \ +@@ -36,7 +37,7 @@ + + $(LIBPLOOP_DYN): $(LIBOBJS) + $(E) " LINK " $@ +- $(Q) $(CC) $(CFLAGS) $(INC) $(LDFLAGS) -shared $^ ${LDLIBS} -o $@ ++ $(Q) $(CC) $(CFLAGS) $(INC) $(LDFLAGS) -shared $^ ${LDLIBS} -o $@ -Wl,-soname,$(SONAME) + + .depend: $(SOURCES) + -include .depend diff --git a/sys-cluster/ploop/files/ploop.tmpfiles b/sys-cluster/ploop/files/ploop.tmpfiles new file mode 100644 index 000000000000..25feee63db2a --- /dev/null +++ b/sys-cluster/ploop/files/ploop.tmpfiles @@ -0,0 +1 @@ +d /run/lock/ploop 0755 root root - - diff --git a/sys-cluster/ploop/metadata.xml b/sys-cluster/ploop/metadata.xml new file mode 100644 index 000000000000..308c5433cf06 --- /dev/null +++ b/sys-cluster/ploop/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>proxy-maintainers</herd> + <maintainer> + <email>andreis.vinogradovs@gmail.com</email> + <name>Andreis Vinogradovs</name> + <description>Primary maintainer, assign bugs to him</description> + </maintainer> +</pkgmetadata> diff --git a/sys-cluster/ploop/ploop-1.13.2.ebuild b/sys-cluster/ploop/ploop-1.13.2.ebuild new file mode 100644 index 000000000000..3e95c48fa3e1 --- /dev/null +++ b/sys-cluster/ploop/ploop-1.13.2.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs multilib systemd + +DESCRIPTION="openvz tool and a library to control ploop block devices" +HOMEPAGE="http://wiki.openvz.org/Download/ploop" +SRC_URI="http://download.openvz.org/utils/ploop/${PV}/src/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug static-libs" + +DEPEND=" + dev-libs/libxml2 + virtual/pkgconfig + " + +RDEPEND="dev-libs/libxml2 + !<sys-cluster/vzctl-4.8 + sys-block/parted + sys-fs/e2fsprogs + sys-process/lsof + sys-apps/findutils + " + +DOCS=( tools/README ) + +src_prepare() { + # Respect CFLAGS and CC, do not add debug by default + sed -i \ + -e 's|CFLAGS =|CFLAGS +=|' \ + -e '/CFLAGS/s/-g -O0 //' \ + -e '/CFLAGS/s/-O2//' \ + -e 's|CC=|CC?=|' \ + -e 's/-Werror//' \ + -e '/DEBUG=yes/d' \ + -e '/LOCKDIR/s/var/run/' \ + Makefile.inc || die 'sed on Makefile.inc failed' + # Avoid striping of binaries + sed -e '/INSTALL/{s: -s::}' -i tools/Makefile || die 'sed on tools/Makefile failed' + + # respect AR and RANLIB, bug #452092 + tc-export AR RANLIB + sed -i -e 's/ranlib/$(RANLIB)/' lib/Makefile || die 'sed on lib/Makefile failed' +} + +src_compile() { + emake CC="$(tc-getCC)" V=1 $(usex debug 'DEBUG' '' '=yes' '') +} + +src_install() { + default + ldconfig -n "${D}/usr/$(get_libdir)/" || die +} diff --git a/sys-cluster/polysh/Manifest b/sys-cluster/polysh/Manifest new file mode 100644 index 000000000000..8688b36d1aae --- /dev/null +++ b/sys-cluster/polysh/Manifest @@ -0,0 +1 @@ +DIST polysh-0.4.tar.bz2 62770 SHA256 0456c25c664dad80ebf7bf748a1661fddf5fbea0a3788328621029c4d0b8b04f SHA512 84d77a2272e9a5a577c17a4e1b791db0f8d2bf58f1ef4c52ebfbe7ba9396de3744bf6fafa72df126c3a3958d97bdb9feb8da002209b0dd0eb9b16b19b859e43d WHIRLPOOL ba0c7f8b07fcd280b20b66a743fb32226f7791309d19e92de7e416ecf0ab03a42a74cee49df4f1a6211426e4d1cc750d0051376c6f0d8c315ec8c4816ce556db diff --git a/sys-cluster/polysh/metadata.xml b/sys-cluster/polysh/metadata.xml new file mode 100644 index 000000000000..584de0150495 --- /dev/null +++ b/sys-cluster/polysh/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <longdescription> + Polysh is a tool to aggregate several remote shells into one. It is used to + launch an interactive remote shell on many machines at once. + </longdescription> +</pkgmetadata> diff --git a/sys-cluster/polysh/polysh-0.4-r1.ebuild b/sys-cluster/polysh/polysh-0.4-r1.ebuild new file mode 100644 index 000000000000..af93d07beadb --- /dev/null +++ b/sys-cluster/polysh/polysh-0.4-r1.ebuild @@ -0,0 +1,17 @@ +# 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 + +DESCRIPTION="Aggregate several remote shells into one" +HOMEPAGE="http://guichaz.free.fr/polysh/" +SRC_URI="http://guichaz.free.fr/polysh/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="" diff --git a/sys-cluster/poolmon/Manifest b/sys-cluster/poolmon/Manifest new file mode 100644 index 000000000000..c6cb2893881f --- /dev/null +++ b/sys-cluster/poolmon/Manifest @@ -0,0 +1 @@ +DIST poolmon-0.5.tar.gz 6902 SHA256 7418c1486e9cf34740ca82f72f32be97eeaeb4b4ddeda74ce1972ca4735ed6dc SHA512 17faa13e6b9b42f0913673598002aa5ad65e7d35b6ed4f5d6a1bb36d7fce630a7e9f1afc6979d7a098a2b66e5943901213b5617ba6190b5b7e1e9a6a55f6cbf5 WHIRLPOOL d72866b0675724eb2787818799152a94c75ee76351db96f36f4a1bd9c4ec1c90e2e314eb2acc980c90149ca82133c2369996a14dd4386718259e7700139414ba diff --git a/sys-cluster/poolmon/files/poolmon.conf b/sys-cluster/poolmon/files/poolmon.conf new file mode 100644 index 000000000000..930a58c9c012 --- /dev/null +++ b/sys-cluster/poolmon/files/poolmon.conf @@ -0,0 +1,3 @@ +# /etc/conf.d/poolmon +# set poolmon commandline options +OPTIONS="" diff --git a/sys-cluster/poolmon/files/poolmon.init b/sys-cluster/poolmon/files/poolmon.init new file mode 100644 index 000000000000..141554fa9b62 --- /dev/null +++ b/sys-cluster/poolmon/files/poolmon.init @@ -0,0 +1,18 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +start() { + local pidfile=/run/poolmon.pid + ebegin "Starting poolmon" + start-stop-daemon --pidfile "${pidfile}" --exec /usr/bin/poolmon -- ${OPTIONS} + eend $? +} + +stop() { + local pidfile=/run/poolmon.pid + ebegin "Stopping poolmon" + start-stop-daemon --stop --pidfile "${pidfile}" + eend $? +} diff --git a/sys-cluster/poolmon/files/poolmon.logrotate b/sys-cluster/poolmon/files/poolmon.logrotate new file mode 100644 index 000000000000..5925635a70c1 --- /dev/null +++ b/sys-cluster/poolmon/files/poolmon.logrotate @@ -0,0 +1,6 @@ +/var/log/poolmon.log { + missingok + postrotate + /bin/kill -HUP `cat /run/poolmon.pid 2> /dev/null` 2>/dev/null || true + endscript +} diff --git a/sys-cluster/poolmon/metadata.xml b/sys-cluster/poolmon/metadata.xml new file mode 100644 index 000000000000..2b951263ab67 --- /dev/null +++ b/sys-cluster/poolmon/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>mschiff@gentoo.org</email> + <name>Marc Schiffbauer</name> + </maintainer> + <upstream> + <remote-id type="github">brandond/poolmon</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/poolmon/poolmon-0.5.ebuild b/sys-cluster/poolmon/poolmon-0.5.ebuild new file mode 100644 index 000000000000..cd2c7303c8cb --- /dev/null +++ b/sys-cluster/poolmon/poolmon-0.5.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A director mailserver pool monitoring script for Dovecot" +HOMEPAGE="https://github.com/brandond/poolmon" +SRC_URI="https://github.com/brandond/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND=" + dev-perl/IO-Socket-SSL + net-mail/dovecot + " + +src_install() { + dobin poolmon + dodoc README + newinitd "${FILESDIR}"/poolmon.init poolmon + newconfd "${FILESDIR}"/poolmon.conf poolmon + insinto /etc/logrotate.d/ + newins "${FILESDIR}"/poolmon.logrotate poolmon +} diff --git a/sys-cluster/projections/Manifest b/sys-cluster/projections/Manifest new file mode 100644 index 000000000000..fd66e12c7df5 --- /dev/null +++ b/sys-cluster/projections/Manifest @@ -0,0 +1 @@ +DIST projections_6.2.1.tar.gz 3713748 SHA256 8d47164f3765a1d7dae28bf35d2963dc87542f1f08025b6aa01d3952199deaa8 SHA512 2a6e4b787491066dec31de05d777243252c08b4504743577297da7e3ecd9c4c3b96db46c295c55c413a98ebe5e338e6b90c213346925a20d89b47bb0b77eeaf8 WHIRLPOOL 10a8a8ac6ec283d95c7485b02075d69eb37b9445b89db000ebcd4ffeec62dc74773807b564af9f89d2e488ec3965eb58f937fb53b889d54b72bfa5c2abc2dad1 diff --git a/sys-cluster/projections/metadata.xml b/sys-cluster/projections/metadata.xml new file mode 100644 index 000000000000..6b1c94c9f6e6 --- /dev/null +++ b/sys-cluster/projections/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/projections/projections-6.2.1.ebuild b/sys-cluster/projections/projections-6.2.1.ebuild new file mode 100644 index 000000000000..47f2b6f9d403 --- /dev/null +++ b/sys-cluster/projections/projections-6.2.1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit java-pkg-2 + +DESCRIPTION="Projections Performance Analysis Framework for Charm++ Applications" +HOMEPAGE="http://charm.cs.uiuc.edu/" +SRC_URI="http://charm.cs.illinois.edu/distrib/binaries/projections/projections_${PV}.tar.gz" + +S="${WORKDIR}/${PN}_${PV}" + +LICENSE="charm" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND=" + >=virtual/jre-1.6 + sys-cluster/charm[charmtracing]" + +src_install() { + java-pkg_newjar ${PN}.jar + java-pkg_dolauncher ${PN} \ + --main projections.analysis.ProjMain \ + --jar ${PN}.jar +} diff --git a/sys-cluster/resource-agents/Manifest b/sys-cluster/resource-agents/Manifest new file mode 100644 index 000000000000..c6350b08fe37 --- /dev/null +++ b/sys-cluster/resource-agents/Manifest @@ -0,0 +1,4 @@ +DIST agents-1.0.4.tar.bz2 280486 SHA256 32a4b17e3775191728ad2554491f594b852c8836f9aab100ba20998e85c8baa5 SHA512 c00e2a32312c11445b5a262c7668f6e26f2ffd8b013fbacb7fba91cec2baf403aeff35725207865c87c94d8133c2c7e341e7ef91a5f3accfd362dd0b1632de67 WHIRLPOOL 455358c5814d1cc4fd1a225e056b7e5f8cfcfc786009120acd0751c6c712df00bbbf458b6bb1e4248f918288893f2b879947deff7a58d8574161e3aa251622c1 +DIST resource-agents-3.9.4.tar.gz 539167 SHA256 fb4756814e8f2e861421f051ebc3f148b4901fabcedf7ef908474afd3bf8bd27 SHA512 53e92c7adeaeb48830216c257755f106a41e308055fa922e70b82f8b814cad5aa7c944bc46f0f3cb879e4d93efa8e147fe64473795b84a955fc35e58efebc36d WHIRLPOOL ddc10dfd46a0ed530906428431bdd2c76d8a28bc20d3fbeb3faac9d63c6a70adea2563bb880275ac964372a6350acff9ae6edfacf9588d846da136e64b5b353f +DIST resource-agents-3.9.5.tar.gz 550748 SHA256 da9f29418f1871f4545b0e44629630766e31a8d607209ab883764da3ba4d73c3 SHA512 668955de7a80577a1fb599d03b0a47589a00aed3017b532931b5132b877e45778c590f26d3057ee763c35973b0f6b032e2f74ebdf0b5f45b5e402b0f13b8ff4e WHIRLPOOL 34bd6dfb33f29d08ce2cf350fda2d0126eb5a8b22e61ed9a83777809fd6cb894c275d60cb5558f727cd8011632959937df0fec24b750c36360a2032453ee9f44 +DIST resource-agents-3.9.6.tar.gz 617790 SHA256 39722cdee68ff96d06788f05f325bd21ec2fc59c59d847e5e4b23c6df23bf678 SHA512 b4ca8b8cc3e09508847af3f1cf50cef946f374eae4ee7903700ba49ef7a3357b1ceaa26dca0616feaa79fb290713f18939dda42ee92a5a7bca2fab807fc77901 WHIRLPOOL d5210c70096d45dc91f49f1333711a3d2350d682d9e5720eeda1470b680fcba2b7cbe8c0dd1fbcd26408e88c40ad0ec60951b06a6e2174131f0c588d2a10720c diff --git a/sys-cluster/resource-agents/files/1.0.3-docs.patch b/sys-cluster/resource-agents/files/1.0.3-docs.patch new file mode 100644 index 000000000000..c4069392cea2 --- /dev/null +++ b/sys-cluster/resource-agents/files/1.0.3-docs.patch @@ -0,0 +1,31 @@ +--- configure.in ++++ configure.in +@@ -481,10 +481,12 @@ + AC_DEFINE_UNQUOTED(POWEROFF_CMD, "$POWEROFF_CMD", path to the poweroff command) + AC_DEFINE_UNQUOTED(POWEROFF_OPTIONS, "$POWEROFF_OPTIONS", poweroff options) + +-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]) +-fi ++AC_ARG_ENABLE([doc], ++ AS_HELP_STRING([--enable-doc],[Build documentation])) ++ ++AS_IF([test "x$enable_doc" = "xyes"], [ ++ AC_PATH_PROGS(XSLTPROC, xsltproc) ++]) ++AM_CONDITIONAL([BUILD_DOC], [test "x$enable_doc" = "xyes"] ) + AC_SUBST(XSLTPROC) + +--- doc/Makefile.am ++++ doc/Makefile.am 2010-06-20 22:04:12.649433890 +0000 +@@ -18,7 +18,7 @@ + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # + +-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 diff --git a/sys-cluster/resource-agents/files/1.0.3-respect_cflags.patch b/sys-cluster/resource-agents/files/1.0.3-respect_cflags.patch new file mode 100644 index 000000000000..e22603a9fa8b --- /dev/null +++ b/sys-cluster/resource-agents/files/1.0.3-respect_cflags.patch @@ -0,0 +1,11 @@ +--- configure.in ++++ configure.in +@@ -646,8 +646,6 @@ + CFLAGS="$CFLAGS -g" + enable_fatal_warnings=no + else +- CFLAGS="$CFLAGS -ggdb3 -O0" +- + # We had to eliminate -Wnested-externs because of libtool changes + # Also remove -Waggregate-return because we use one libnet + # call which returns a struct diff --git a/sys-cluster/resource-agents/files/1.0.4-dosymlinks.patch b/sys-cluster/resource-agents/files/1.0.4-dosymlinks.patch new file mode 100644 index 000000000000..3fe17fcd90f7 --- /dev/null +++ b/sys-cluster/resource-agents/files/1.0.4-dosymlinks.patch @@ -0,0 +1,25 @@ +--- a/configure.in 2011-02-28 11:51:26.198614376 +0100 ++++ b/configure.in 2011-02-28 11:59:10.201953304 +0100 +@@ -79,6 +79,7 @@ + dnl =============================================== + dnl Helpers + dnl =============================================== ++AC_PROG_LN_S + cc_supports_flag() { + local CFLAGS="$@" + AC_MSG_CHECKING(whether $CC supports "$@") +--- a/Makefile.am 2011-02-28 11:51:26.188614089 +0100 ++++ b/Makefile.am 2011-02-28 13:36:15.860697714 +0100 +@@ -24,6 +24,12 @@ + install-exec-local: + $(INSTALL) -d -m 1755 $(DESTDIR)$(HA_RSCTMPDIR) + ++ $(LN_S) ../../lib/heartbeat/ocf-binaries $(DESTDIR)${OCF_RA_DIR}/heartbeat/.ocf-binaries ++ $(LN_S) ../../lib/heartbeat/ocf-directories $(DESTDIR)${OCF_RA_DIR}/heartbeat/.ocf-directories ++ $(LN_S) ../../lib/heartbeat/ocf-returncodes $(DESTDIR)${OCF_RA_DIR}/heartbeat/.ocf-returncodes ++ $(LN_S) ../../lib/heartbeat/ocf-shellfuncs $(DESTDIR)${OCF_RA_DIR}/heartbeat/.ocf-shellfuncs ++ ++ + dist-clean-local: + rm -f autoconf automake autoheader $(TARFILE) + diff --git a/sys-cluster/resource-agents/files/3.9.4-configure.patch b/sys-cluster/resource-agents/files/3.9.4-configure.patch new file mode 100644 index 000000000000..bb2f7bec62a4 --- /dev/null +++ b/sys-cluster/resource-agents/files/3.9.4-configure.patch @@ -0,0 +1,30 @@ +--- a/configure.ac 2013-01-18 13:14:54.492191322 +0100 ++++ b/configure.ac 2013-01-18 13:17:17.559551891 +0100 +@@ -557,11 +557,13 @@ + AC_DEFINE_UNQUOTED(POWEROFF_CMD, "$POWEROFF_CMD", path to the poweroff command) + AC_DEFINE_UNQUOTED(POWEROFF_OPTIONS, "$POWEROFF_OPTIONS", poweroff options) + +-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]) +-fi ++AC_ARG_ENABLE([doc], ++ AS_HELP_STRING([--enable-doc],[Build documentation])) ++ ++AS_IF([test "x$enable_doc" = "xyes"], [ ++ AC_PATH_PROGS(XSLTPROC, xsltproc) ++]) ++AM_CONDITIONAL([BUILD_DOC], [test "x$enable_doc" = "xyes"] ) + AC_SUBST(XSLTPROC) + + AC_PATH_PROGS(POD2MAN, pod2man) +@@ -732,8 +734,6 @@ + CFLAGS="$CFLAGS -g" + enable_fatal_warnings=no + else +- CFLAGS="$CFLAGS -ggdb3" +- + # We had to eliminate -Wnested-externs because of libtool changes + # Also remove -Waggregate-return because we use one libnet + # call which returns a struct diff --git a/sys-cluster/resource-agents/metadata.xml b/sys-cluster/resource-agents/metadata.xml new file mode 100644 index 000000000000..a631e7b4490a --- /dev/null +++ b/sys-cluster/resource-agents/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> + <longdescription> + Resource agents are a standardized interfaces for a cluster resource. + They translate a standard set of operations into steps specific to + the resource or application, and interpret their results as success or + failure. Previously, they were a part of the then-monolithic Heartbeat + project, and had no collective name. + </longdescription> + <use> + <flag name="libnet">Force use of <pkg>net-libs/libnet</pkg></flag> + <flag name="rgmanager">Install resources for <pkg>sys-cluster/rgmanager</pkg></flag> + </use> + <upstream> + <remote-id type="github">ClusterLabs/resource-agents</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/resource-agents/resource-agents-1.0.4-r1.ebuild b/sys-cluster/resource-agents/resource-agents-1.0.4-r1.ebuild new file mode 100644 index 000000000000..fbff4a25f370 --- /dev/null +++ b/sys-cluster/resource-agents/resource-agents-1.0.4-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +MY_P="${P/resource-}" +inherit autotools multilib eutils base + +DESCRIPTION="Resources pack for Heartbeat / Pacemaker" +HOMEPAGE="http://www.linux-ha.org/wiki/Resource_Agents" +SRC_URI="http://hg.linux-ha.org/agents/archive/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa x86" +IUSE="doc libnet" + +DEPEND="sys-apps/iproute2 + sys-cluster/cluster-glue + !<sys-cluster/heartbeat-3.0 + libnet? ( net-libs/libnet:1.1 )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/Cluster-Resource-Agents-${MY_P}" + +PATCHES=( + "${FILESDIR}/1.0.3-docs.patch" + "${FILESDIR}/1.0.3-respect_cflags.patch" + "${FILESDIR}/1.0.4-dosymlinks.patch" +) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + --disable-fatal-warnings \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${PF} \ + --libdir=/usr/$(get_libdir) \ + --with-ocf-root=/usr/$(get_libdir)/ocf \ + $(use_enable doc) \ + $(use_enable libnet) +} + +src_install() { + base_src_install + rm -rf "${D}"/etc/init.d/ldirectord || die +} + +pkg_postinst() { + elog "To use Resource Agents installed in /usr/$(get_libdir)/ocf/resource.d" + elog "you have to emerge required runtime dependencies manually." + elog "" + elog "Description and dependencies of all Agents can be found on" + elog "http://www.linux-ha.org/wiki/Resource_Agents" + elog "or in the documentation of this package." +} diff --git a/sys-cluster/resource-agents/resource-agents-1.0.4-r2.ebuild b/sys-cluster/resource-agents/resource-agents-1.0.4-r2.ebuild new file mode 100644 index 000000000000..f6d47b1827e3 --- /dev/null +++ b/sys-cluster/resource-agents/resource-agents-1.0.4-r2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +MY_P="${P/resource-}" +inherit autotools multilib eutils base + +DESCRIPTION="Resources pack for Heartbeat / Pacemaker" +HOMEPAGE="http://www.linux-ha.org/wiki/Resource_Agents" +SRC_URI="http://hg.linux-ha.org/agents/archive/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="doc libnet" + +DEPEND="sys-apps/iproute2 + sys-cluster/cluster-glue + !<sys-cluster/heartbeat-3.0 + libnet? ( net-libs/libnet:1.1 )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/Cluster-Resource-Agents-${MY_P}" + +PATCHES=( + "${FILESDIR}/1.0.3-docs.patch" + "${FILESDIR}/1.0.3-respect_cflags.patch" + "${FILESDIR}/1.0.4-dosymlinks.patch" +) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + --disable-fatal-warnings \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${PF} \ + --libdir=/usr/$(get_libdir) \ + --with-ocf-root=/usr/$(get_libdir)/ocf \ + $(use_enable doc) \ + $(use_enable libnet) +} + +src_install() { + base_src_install + rm -rf "${D}"/etc/init.d/ldirectord || die + rm -rf "${D}"/var/ || die +} + +pkg_postinst() { + elog "To use Resource Agents installed in /usr/$(get_libdir)/ocf/resource.d" + elog "you have to emerge required runtime dependencies manually." + elog "" + elog "Description and dependencies of all Agents can be found on" + elog "http://www.linux-ha.org/wiki/Resource_Agents" + elog "or in the documentation of this package." +} diff --git a/sys-cluster/resource-agents/resource-agents-3.9.4.ebuild b/sys-cluster/resource-agents/resource-agents-3.9.4.ebuild new file mode 100644 index 000000000000..c04c253c9a45 --- /dev/null +++ b/sys-cluster/resource-agents/resource-agents-3.9.4.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_P="${P/resource-}" +inherit autotools base eutils multilib + +DESCRIPTION="Resources pack for Heartbeat / Pacemaker" +HOMEPAGE="http://www.linux-ha.org/wiki/Resource_Agents" +SRC_URI="https://github.com/ClusterLabs/resource-agents/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="doc libnet rgmanager" + +RDEPEND="sys-apps/iproute2 + sys-cluster/cluster-glue + !<sys-cluster/heartbeat-3.0 + libnet? ( net-libs/libnet:1.1 )" +DEPEND="${RDEPEND} + doc? ( + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + )" + +PATCHES=( + "${FILESDIR}/3.9.4-configure.patch" +) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + --disable-fatal-warnings \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${PF} \ + --libdir=/usr/$(get_libdir) \ + --with-ocf-root=/usr/$(get_libdir)/ocf \ + $(use_enable doc) \ + $(use_enable libnet) +} + +src_install() { + base_src_install + rm -rf "${D}"/etc/init.d/ || die + rm -rf "${D}"/var/run || die + use rgmanager || rm -rf "${D}"/usr/share/cluster/ "${D}"/var/ +} + +pkg_postinst() { + elog "To use Resource Agents installed in /usr/$(get_libdir)/ocf/resource.d" + elog "you have to emerge required runtime dependencies manually." + elog "" + elog "Description and dependencies of all Agents can be found on" + elog "http://www.linux-ha.org/wiki/Resource_Agents" + elog "or in the documentation of this package." +} diff --git a/sys-cluster/resource-agents/resource-agents-3.9.5.ebuild b/sys-cluster/resource-agents/resource-agents-3.9.5.ebuild new file mode 100644 index 000000000000..c04c253c9a45 --- /dev/null +++ b/sys-cluster/resource-agents/resource-agents-3.9.5.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_P="${P/resource-}" +inherit autotools base eutils multilib + +DESCRIPTION="Resources pack for Heartbeat / Pacemaker" +HOMEPAGE="http://www.linux-ha.org/wiki/Resource_Agents" +SRC_URI="https://github.com/ClusterLabs/resource-agents/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="doc libnet rgmanager" + +RDEPEND="sys-apps/iproute2 + sys-cluster/cluster-glue + !<sys-cluster/heartbeat-3.0 + libnet? ( net-libs/libnet:1.1 )" +DEPEND="${RDEPEND} + doc? ( + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + )" + +PATCHES=( + "${FILESDIR}/3.9.4-configure.patch" +) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + --disable-fatal-warnings \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${PF} \ + --libdir=/usr/$(get_libdir) \ + --with-ocf-root=/usr/$(get_libdir)/ocf \ + $(use_enable doc) \ + $(use_enable libnet) +} + +src_install() { + base_src_install + rm -rf "${D}"/etc/init.d/ || die + rm -rf "${D}"/var/run || die + use rgmanager || rm -rf "${D}"/usr/share/cluster/ "${D}"/var/ +} + +pkg_postinst() { + elog "To use Resource Agents installed in /usr/$(get_libdir)/ocf/resource.d" + elog "you have to emerge required runtime dependencies manually." + elog "" + elog "Description and dependencies of all Agents can be found on" + elog "http://www.linux-ha.org/wiki/Resource_Agents" + elog "or in the documentation of this package." +} diff --git a/sys-cluster/resource-agents/resource-agents-3.9.6.ebuild b/sys-cluster/resource-agents/resource-agents-3.9.6.ebuild new file mode 100644 index 000000000000..831544b92791 --- /dev/null +++ b/sys-cluster/resource-agents/resource-agents-3.9.6.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_P="${P/resource-}" +inherit autotools base eutils multilib + +DESCRIPTION="Resources pack for Heartbeat / Pacemaker" +HOMEPAGE="http://www.linux-ha.org/wiki/Resource_Agents" +SRC_URI="https://github.com/ClusterLabs/resource-agents/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="doc libnet rgmanager" + +RDEPEND="sys-apps/iproute2 + sys-cluster/cluster-glue + !<sys-cluster/heartbeat-3.0 + libnet? ( net-libs/libnet:1.1 )" +DEPEND="${RDEPEND} + doc? ( + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + )" + +PATCHES=( + "${FILESDIR}/3.9.4-configure.patch" +) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + --disable-fatal-warnings \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${PF} \ + --libdir=/usr/$(get_libdir) \ + --with-ocf-root=/usr/$(get_libdir)/ocf \ + $(use_enable doc) \ + $(use_enable libnet) +} + +src_install() { + base_src_install + rm -rf "${D}"/etc/init.d/ || die + rm -rf "${D}"/var/run || die + use rgmanager || rm -rf "${D}"/usr/share/cluster/ "${D}"/var/ +} + +pkg_postinst() { + elog "To use Resource Agents installed in /usr/$(get_libdir)/ocf/resource.d" + elog "you have to emerge required runtime dependencies manually." + elog "" + elog "Description and dependencies of all Agents can be found on" + elog "http://www.linux-ha.org/wiki/Resource_Agents" + elog "or in the documentation of this package." +} diff --git a/sys-cluster/rgmanager-agents/Manifest b/sys-cluster/rgmanager-agents/Manifest new file mode 100644 index 000000000000..c8c98910bb87 --- /dev/null +++ b/sys-cluster/rgmanager-agents/Manifest @@ -0,0 +1 @@ +DIST rgmanager-agents-3.9.2.tar.gz 1103104 RMD160 caad45e5b5a44810ab39c9988b894c2a66ab922c SHA1 2b300d589056bab3f5144964d81c3572f98f1750 SHA256 e62cedf54cdfec0e1532a6ca08a1b4d6e1686586001bd695e45c28eed0c4a887 diff --git a/sys-cluster/rgmanager-agents/metadata.xml b/sys-cluster/rgmanager-agents/metadata.xml new file mode 100644 index 000000000000..9ffcc486c306 --- /dev/null +++ b/sys-cluster/rgmanager-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>Resource Manager Agents</longdescription> +</pkgmetadata> diff --git a/sys-cluster/rgmanager-agents/rgmanager-agents-3.9.2.ebuild b/sys-cluster/rgmanager-agents/rgmanager-agents-3.9.2.ebuild new file mode 100644 index 000000000000..df28021a98e2 --- /dev/null +++ b/sys-cluster/rgmanager-agents/rgmanager-agents-3.9.2.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit multilib versionator + +CLUSTER_RELEASE="3.1.5" +MY_PN="resource-agents" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Resource Manager Agents" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/r/e/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="~sys-cluster/rgmanager-${CLUSTER_RELEASE} + ~sys-cluster/cman-${CLUSTER_RELEASE}" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_configure() { + econf \ + --docdir=/usr/share/doc/${P} \ + --libdir=/usr/$(get_libdir) \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --with-ras-set=rgmanager +} + +src_install() { + default + + # remove useless RHEV check script and log directory + rm -rf "${D}/usr/sbin" "${D}/var" +} + +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/rgmanager/Manifest b/sys-cluster/rgmanager/Manifest new file mode 100644 index 000000000000..dc2410e45044 --- /dev/null +++ b/sys-cluster/rgmanager/Manifest @@ -0,0 +1,2 @@ +DIST cluster-2.03.09.tar.gz 1784357 RMD160 9ac5c3fd0fece8ec17bd31d116c43b33612741d0 SHA1 c2cdbc657da2a9efde4b1e6d2657170e1c09b5b8 SHA256 b6d6f35f58b2f8628c369391e0fd01b1803af40029ec1e6ef88865dda38b855f +DIST cluster-3.1.5.tar.gz 651449 RMD160 c12dbf38c3e24cbdac23dbfdce6cb96da5c722ff SHA1 884d153ad9545d8abd225744dff5a905e19a6702 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e diff --git a/sys-cluster/rgmanager/files/rgmanager-2.03.09-CVE-2010-3389.patch b/sys-cluster/rgmanager/files/rgmanager-2.03.09-CVE-2010-3389.patch new file mode 100644 index 000000000000..86e1f138eed1 --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager-2.03.09-CVE-2010-3389.patch @@ -0,0 +1,36 @@ +https://bugs.gentoo.org/show_bug.cgi?id=352213 +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598549 + +Patch by Jari Aalto <jari.aalto@cante.net> +--- a/rgmanager/src/resources/SAPDatabase ++++ b/rgmanager/src/resources/SAPDatabase +@@ -670,8 +670,11 @@ + fi + + # as root user we need the library path to the SAP kernel to be able to call executables +-if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then +- LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH ++if [ "$DIR_EXECUTABLE" ]; then ++ if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then ++ LD_LIBRARY_PATH="$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ++ export LD_LIBRARY_PATH ++ fi + fi + sidadm="`echo $SID | tr [:upper:] [:lower:]`adm" + +--- a/rgmanager/src/resources/SAPInstance ++++ b/rgmanager/src/resources/SAPInstance +@@ -382,8 +382,11 @@ + fi + + # as root user we need the library path to the SAP kernel to be able to call sapcontrol +-if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then +- LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH ++if [ "$DIR_EXECUTABLE" ]; then ++ if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then ++ LD_LIBRARY_PATH="$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ++ export LD_LIBRARY_PATH ++ fi + fi + sidadm="`echo $SID | tr [:upper:] [:lower:]`adm" + diff --git a/sys-cluster/rgmanager/files/rgmanager-2.0x.conf b/sys-cluster/rgmanager/files/rgmanager-2.0x.conf new file mode 100644 index 000000000000..8732427c1182 --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager-2.0x.conf @@ -0,0 +1,5 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +RGMGR_OPTS="" diff --git a/sys-cluster/rgmanager/files/rgmanager-2.0x.rc b/sys-cluster/rgmanager/files/rgmanager-2.0x.rc new file mode 100755 index 000000000000..16b3a7e3f0f1 --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager-2.0x.rc @@ -0,0 +1,110 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Adaption of the original RedHat script +# Original Copyright (C) 2003 Red Hat, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net + need cman +} + +# We'd like a reload method as well +opts="${opts} reload" + +ID="Cluster Resource Manager" +RGMGRD=$(which clurgmgrd) +RMTABD=$(which clurmtabd) +CFG_FILE="/etc/cluster/cluster.conf" + +LOG_ERR=3 +LOG_WARNING=4 +LOG_NOTICE=5 +LOG_INFO=6 + +# +# If we're not configured, then don't start anything. +# +[ -f "$CFG_FILE" ] || exit 0 + + +# +# log_and_print <level> <message> +# +function log_and_print() +{ + if [ -z "$1" -o -z "$2" ]; then + return 1; + fi + + clulog -p $$ -n "rgmanager" -s $1 "$2" + echo $2 + + return 0; +} + + +# +# Bring down the cluster on a node. +# +function stop_cluster() +{ + kill -TERM $(pidof $RGMGRD) + + while [ 0 ]; do + if [ -n "`pidof $RGMGRD`" ]; then + while [ -n "`pidof $RGMGRD`" ]; do + sleep 1 + done + einfo "Waiting for $(basename ${RGMGRD})" + else + eend "Services are stopped." + fi + + # Ensure all NFS rmtab daemons are dead. + killall $(basename ${RMTABD}) &> /dev/null + + rm -f /var/run/$(basename ${RGMGRD}).pid + + return 0 + done +} + + + +function start() { + ebegin "Starting cluster resource manager" + start-stop-daemon --start --quiet --exec ${RGMGRD} ${RGMGR_OPTS} + ret=$? + if [ $ret -eq 0 ]; then + touch /var/lock/subsys/rgmanager + fi + eend $ret +} + +function restart() { + pidof ${RGMGRD} &> /dev/null + if [ ${?} -ne 1 ]; then + svc_stop + fi + svc_start +} + +function reload() { + clulog -p ${LOG_NOTICE} "Reloading Resource Configuration." + ebegin "Reloading Resource Configuration " + kill -s HUP $(pidof ${RGMGRD} ) + rv=${?} + eend + exit ${rv} +} + +function stop() { + ebegin "Shutting down cluster resource manager" + if [ -n "$(pidof ${RGMGRD})" ]; then + stop_cluster + fi + rm -f /var/lock/subsys/rgmanager + eend +} diff --git a/sys-cluster/rgmanager/files/rgmanager-3.1.5-fix_libxml2.patch b/sys-cluster/rgmanager/files/rgmanager-3.1.5-fix_libxml2.patch new file mode 100644 index 000000000000..eff23ef495bc --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager-3.1.5-fix_libxml2.patch @@ -0,0 +1,23 @@ +* Use double underline as header-protectors to avoid collision with icu's platform.h +* (pulled in via libxml2 when built with icu support) resulting in int64_t defined twice +* (once in icu's ptypes.h and once in stdint.h) +* patch by Tiziano Mueller <dev-zero@gentoo.org> +--- a/rgmanager/include/platform.h 2011-03-07 19:58:22.000000000 +0100 ++++ b/rgmanager/include/platform.h 2011-03-08 15:59:36.773871936 +0100 +@@ -1,8 +1,8 @@ + /** @file + * Defines for byte-swapping + */ +-#ifndef _PLATFORM_H +-#define _PLATFORM_H ++#ifndef __PLATFORM_H ++#define __PLATFORM_H + + #include <endian.h> + #include <sys/param.h> +@@ -56,4 +56,4 @@ + #define PACKED __attribute__((packed)) + #endif + +-#endif /* _PLATFORM_H */ ++#endif /* __PLATFORM_H */ diff --git a/sys-cluster/rgmanager/files/rgmanager.confd b/sys-cluster/rgmanager/files/rgmanager.confd new file mode 100644 index 000000000000..7635a1b9e000 --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager.confd @@ -0,0 +1,8 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +PIDFILE="/var/run/rgmanager.pid" + +RGMGR_OPTS="" + diff --git a/sys-cluster/rgmanager/files/rgmanager.initd b/sys-cluster/rgmanager/files/rgmanager.initd new file mode 100644 index 000000000000..e6d8cddddda1 --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager.initd @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Adaption of the original RedHat script +# Original Copyright (C) 2003 Red Hat, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net +# need cman +} + +start() { + ebegin "Starting cluster resource manager" + + # recreate run-directory + mkdir -p /var/run/cluster + + start-stop-daemon \ + --start \ + --quiet \ + --exec "/usr/sbin/rgmanager" \ + --pidfile "${PIDFILE}" \ + -- ${RGMGR_OPTS} + eend $ret +} + +stop() { + ebegin "Shutting down cluster resource manager" + start-stop-daemon \ + --stop \ + --pidfile "${PIDFILE}" \ + --retry 0 + eend $? +} diff --git a/sys-cluster/rgmanager/metadata.xml b/sys-cluster/rgmanager/metadata.xml new file mode 100644 index 000000000000..348e6c4de815 --- /dev/null +++ b/sys-cluster/rgmanager/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/rgmanager/rgmanager-2.03.09-r1.ebuild b/sys-cluster/rgmanager/rgmanager-2.03.09-r1.ebuild new file mode 100644 index 000000000000..230c940427d4 --- /dev/null +++ b/sys-cluster/rgmanager/rgmanager-2.03.09-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit eutils 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="Clustered resource group 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="" + +RDEPEND="=sys-cluster/ccs-${CLUSTER_RELEASE}* + =sys-cluster/dlm-lib-${CLUSTER_RELEASE}* + =sys-cluster/cman-lib-${CLUSTER_RELEASE}*" + +DEPEND="${RDEPEND} + dev-libs/libxml2[-icu] + =sys-libs/slang-2*" + +S=${WORKDIR}/${MY_P}/${PN} + +src_prepare() { + epatch "${FILESDIR}"/${P}-CVE-2010-3389.patch + sed -i -e 's/-Werror//g' src/{clulib,utils,daemons}/Makefile || die +} + +src_configure() { + (cd "${WORKDIR}"/${MY_P}; + ./configure \ + --cc="$(tc-getCC)" \ + --cflags="-Wall" \ + --disable_kernel_check \ + --somajor="$MAJ_PV" \ + --sominor="$MIN_PV" \ + --dlmlibdir=/usr/$(get_libdir) \ + --dlmincdir=/usr/include \ + --cmanlibdir=/usr/$(get_libdir) \ + --cmanincdir=/usr/include \ + ) || die "configure problem" +} + +src_compile() { + # There's a problem with -O2 right now, a patch was submitted. + env -u CFLAGS emake -j1 clean all || die +} + +src_install() { + emake DESTDIR="${D}" install || die + + newinitd "${FILESDIR}"/${PN}-2.0x.rc ${PN} || die + newconfd "${FILESDIR}"/${PN}-2.0x.conf ${PN} || die +} diff --git a/sys-cluster/rgmanager/rgmanager-2.03.09.ebuild b/sys-cluster/rgmanager/rgmanager-2.03.09.ebuild new file mode 100644 index 000000000000..694065b728c9 --- /dev/null +++ b/sys-cluster/rgmanager/rgmanager-2.03.09.ebuild @@ -0,0 +1,63 @@ +# 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="Clustered resource group 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="" + +RDEPEND="=sys-cluster/ccs-${CLUSTER_RELEASE}* + =sys-cluster/dlm-lib-${CLUSTER_RELEASE}* + =sys-cluster/cman-lib-${CLUSTER_RELEASE}* + " + +DEPEND="${RDEPEND} + dev-libs/libxml2 + =sys-libs/slang-2* + " + +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" \ + --dlmlibdir=/usr/lib \ + --dlmincdir=/usr/include \ + --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 + + # There's a problem with -O2 right now, a patch was submitted. + env -u CFLAGS emake -j1 clean all || die "compile problem" +} + +src_install() { + emake DESTDIR="${D}" install || die "install problem" + + newinitd "${FILESDIR}"/${PN}-2.0x.rc ${PN} || die + newconfd "${FILESDIR}"/${PN}-2.0x.conf ${PN} || die +} diff --git a/sys-cluster/rgmanager/rgmanager-3.1.5.ebuild b/sys-cluster/rgmanager/rgmanager-3.1.5.ebuild new file mode 100644 index 000000000000..5e79c692a609 --- /dev/null +++ b/sys-cluster/rgmanager/rgmanager-3.1.5.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils multilib versionator + +CLUSTER_RELEASE="${PV}" +MY_P="cluster-${CLUSTER_RELEASE}" + +MAJ_PV="$(get_major_version)" +MIN_PV="$(get_version_component_range 2-3)" + +DESCRIPTION="Clustered resource group 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 ~x86" +IUSE="dbus" + +DEPEND="~sys-cluster/libcman-${PV} + ~sys-cluster/liblogthread-${PV} + ~sys-cluster/libccs-${PV} + ~sys-cluster/libdlm-${PV} + dev-libs/libxml2 + =sys-libs/slang-2* + dbus? ( sys-apps/dbus )" +RDEPEND="${DEPEND} + ~sys-cluster/cman-${PV}" + +S=${WORKDIR}/${MY_P}/${PN} + +src_prepare() { + epatch "${FILESDIR}/${P}-fix_libxml2.patch" +} + +src_configure() { + local myopts="" + use dbus || myopts="--disable_dbus" + cd "${WORKDIR}"/${MY_P} + ./configure \ + --cc="$(tc-getCC)" \ + --cflags="-Wall" \ + --libdir=/usr/$(get_libdir) \ + --disable_kernel_check \ + --somajor="$MAJ_PV" \ + --sominor="$MIN_PV" \ + --dlmlibdir=/usr/$(get_libdir) \ + --dlmincdir=/usr/include \ + --cmanlibdir=/usr/$(get_libdir) \ + --cmanincdir=/usr/include \ + ${myopts} \ + || die "configure problem" +} + +src_install() { + default + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/sys-cluster/slurm/Manifest b/sys-cluster/slurm/Manifest new file mode 100644 index 000000000000..1bdaad0e6544 --- /dev/null +++ b/sys-cluster/slurm/Manifest @@ -0,0 +1 @@ +DIST slurm-2.6.3.tar.bz2 5945106 SHA256 3523f6866531d48061e6b4d769a17e005b7d440bb5cee6c6ab6a12518c884d23 SHA512 98e212db02d14d9808c3e89bf0a44f7925dbb8bae360e5084e28c71c0dea0e670a28a0baa1a1511666c42e19693ecd807f24241baa082475f385bf7285dba0cd WHIRLPOOL 5e8955df7419d15f4be78eb1584a5797f6c3b29c01b4352b3f0bf8a7c5e9b96b97aa4ef74ba6bda0f278e80723b72a860eb2c65686bd2adb383ea444d4a62e29 diff --git a/sys-cluster/slurm/files/logrotate b/sys-cluster/slurm/files/logrotate new file mode 100644 index 000000000000..978a869eb993 --- /dev/null +++ b/sys-cluster/slurm/files/logrotate @@ -0,0 +1,20 @@ +/var/log/slurm/*.log { + weekly + compress + missingok + nocopytruncate + nocreate + nodelaycompress + nomail + notifempty + noolddir + rotate 5 + sharedscripts + size=5M + create 640 slurm slurm + postrotate + /etc/init.d/slurmd reload + /etc/init.d/slurmctld reload + /etc/init.d/slurmdbd reload + endscript +} diff --git a/sys-cluster/slurm/files/slurm-2.5.4-nogtk.patch b/sys-cluster/slurm/files/slurm-2.5.4-nogtk.patch new file mode 100644 index 000000000000..12741f53b449 --- /dev/null +++ b/sys-cluster/slurm/files/slurm-2.5.4-nogtk.patch @@ -0,0 +1,43 @@ +--- slurm-2.5.4/configure.ac.orig 2013-04-11 12:58:24.971724348 +0400 ++++ slurm-2.5.4/configure.ac 2013-04-11 12:59:00.921724309 +0400 +@@ -229,40 +229,6 @@ + AM_CONDITIONAL(HAVE_SOME_CURSES, test "x$ac_have_some_curses" = "xyes") + AC_SUBST(HAVE_SOME_CURSES) + +-# +-# Tests for GTK+ +-# +- +-# use the correct libs if running on 64bit +-if test -d "/usr/lib64/pkgconfig"; then +- PKG_CONFIG_PATH="/usr/lib64/pkgconfig/:$PKG_CONFIG_PATH" +-fi +- +-if test -d "/opt/gnome/lib64/pkgconfig"; then +- PKG_CONFIG_PATH="/opt/gnome/lib64/pkgconfig/:$PKG_CONFIG_PATH" +-fi +- +-AM_PATH_GLIB_2_0([2.7.1], [ac_glib_test="yes"], [ac_glib_test="no"], [gthread]) +- +-if test ${glib_config_minor_version=0} -ge 32 ; then +- AC_DEFINE([GLIB_NEW_THREADS], 1, [Define to 1 if using glib-2.32.0 or higher]) +-fi +- +-AM_PATH_GTK_2_0([2.7.1], [ac_gtk_test="yes"], [ac_gtk_test="no"], [gthread]) +-if test ${gtk_config_minor_version=0} -ge 10 ; then +- AC_DEFINE([GTK2_USE_RADIO_SET], 1, [Define to 1 if using gtk+-2.10.0 or higher]) +-fi +- +-if test ${gtk_config_minor_version=0} -ge 12 ; then +- AC_DEFINE([GTK2_USE_TOOLTIP], 1, [Define to 1 if using gtk+-2.12.0 or higher]) +-fi +- +-if test ${gtk_config_minor_version=0} -ge 14 ; then +- AC_DEFINE([GTK2_USE_GET_FOCUS], 1, [Define to 1 if using gtk+-2.14.0 or higher]) +-fi +- +-AM_CONDITIONAL(BUILD_SVIEW, [test "x$ac_glib_test" = "xyes"] && [test "x$ac_gtk_test" = "xyes"]) +- + X_AC_DATABASES + + dnl Cray ALPS/Basil support depends on mySQL diff --git a/sys-cluster/slurm/files/slurm.confd b/sys-cluster/slurm/files/slurm.confd new file mode 100644 index 000000000000..c406dc3f2a2c --- /dev/null +++ b/sys-cluster/slurm/files/slurm.confd @@ -0,0 +1,6 @@ +# /etc/conf.d/slurm: config file for /etc/init.d/slurm* +SLURMCTLD_OPTIONS="" +SLURMDBD_OPTIONS="" +SLURMD_OPTIONS="" +SLURM_USE_MUNGE="0" +SLURM_USE_YPBIND="0"
\ No newline at end of file diff --git a/sys-cluster/slurm/files/slurmctld.initd b/sys-cluster/slurm/files/slurmctld.initd new file mode 100644 index 000000000000..145909b007eb --- /dev/null +++ b/sys-cluster/slurm/files/slurmctld.initd @@ -0,0 +1,69 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="reload" + +[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm + +depend() { + local _need="net" + [[ ${SLURM_USE_MUNGE} -ne 0 ]] && _need="${_need} munged" + [[ ${SLURM_USE_YPBIND} -ne 0 ]] && _need="${_need} ypbind" + after logger slurmdbd + need ${_need} +} + +create_folder_and_set_permission() { + folder=${1} + # Fix permissions (/tmp is wiped at boot) + if [[ "${folder}" == "/tmp" ]]; then + eerror "SLURM: folder == ${folder} == /tmp" + exit + fi + if [[ "${folder}" == "/var/tmp" ]]; then + eerror "SLURM: folder == ${folder} == /var/tmp" + exit + fi + checkpath -d -o slurm:slurm ${folder} +} + +checkconfig() { + if [ ! -e "/etc/slurm/slurm.conf" ]; then + eerror "Missing config /etc/slurm/slurm.conf" + eerror "Customize sample one or generate new by configurator.html" + eerror "in slurm doc directory" + return 1 + fi + + # Make sure folders exists + . /etc/slurm/slurm.conf + folders=(${SlurmdSpoolDir} `dirname ${SlurmctldLogFile}` `dirname ${SlurmctldPidFile}` `dirname ${SlurmdLogFile}` `dirname ${SlurmdPidFile}` ${SlurmdSpoolDir} ${StateSaveLocation}) + for folder in ${folders[*]}; do + create_folder_and_set_permission ${folder} + done +} + +start() { + ebegin "Starting slurm control daemon" + checkconfig + start-stop-daemon --start --quiet --background \ + --pidfile /var/run/slurm/slurmctld.pid \ + --user slurm \ + --group slurm \ + --exec /usr/sbin/slurmctld -- ${SLURMCTLD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping slurm control daemon" + start-stop-daemon --stop --pidfile /var/run/slurm/slurmctld.pid + eend $? +} + +reload() { + ebegin "Reloading slurm daemon configuration" + start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmctld.pid + eend $? +} diff --git a/sys-cluster/slurm/files/slurmd.initd b/sys-cluster/slurm/files/slurmd.initd new file mode 100644 index 000000000000..cc4adcfb6d12 --- /dev/null +++ b/sys-cluster/slurm/files/slurmd.initd @@ -0,0 +1,72 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="reload" + +[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm + +depend() { + local _need="net" + [[ ${SLURM_USE_MUNGE} -ne 0 ]] && _need="${_need} munged" + [[ ${SLURM_USE_YPBIND} -ne 0 ]] && _need="${_need} ypbind" + after logger + need ${_need} +} + +create_folder_and_set_permission() { + folder=${1} + # Fix permissions (/tmp is wiped at boot) + if [[ "${folder}" == "/tmp" ]]; then + eerror "SLURM: folder == ${folder} == /tmp" + exit + fi + if [[ "${folder}" == "/var/tmp" ]]; then + eerror "SLURM: folder == ${folder} == /var/tmp" + exit + fi + checkpath -d -o slurm:slurm ${folder} +} + +checkconfig() { + if [ ! -e "/etc/slurm/slurm.conf" ]; then + eerror "Missing config /etc/slurm/slurm.conf" + eerror "Customize sample one or generate new by configurator.html" + eerror "in slurm doc directory" + return 1 + fi + # Make sure folders exists + . /etc/slurm/slurm.conf + folders=(${SlurmdSpoolDir} `dirname ${SlurmctldLogFile}` `dirname ${SlurmctldPidFile}` `dirname ${SlurmdLogFile}` `dirname ${SlurmdPidFile}` ${SlurmdSpoolDir} ${StateSaveLocation}) + for folder in ${folders[*]}; do + create_folder_and_set_permission ${folder} + done +} + +start() { + ebegin "Starting slurm daemon" + checkconfig + # Slurm does not propagate limits, which can brakes InfiniBand + # See http://www.open-mpi.org/faq/?category=openfabrics + # and https://computing.llnl.gov/linux/slurm/faq.html#rlimit + ulimit -l unlimited + start-stop-daemon --start --quiet --background \ + --pidfile /var/run/slurm/slurmd.pid \ + --user root \ + --group root \ + --exec /usr/sbin/slurmd -- ${SLURMD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping slurm daemon" + start-stop-daemon --stop --pidfile /var/run/slurm/slurmd.pid + eend $? +} + +reload() { + ebegin "Reloading slurm daemon configuration" + start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmd.pid + eend $? +} diff --git a/sys-cluster/slurm/files/slurmdbd.initd b/sys-cluster/slurm/files/slurmdbd.initd new file mode 100644 index 000000000000..c6acccf47678 --- /dev/null +++ b/sys-cluster/slurm/files/slurmdbd.initd @@ -0,0 +1,67 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="reload" + +[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm + +depend() { + local _need="net" + [[ ${SLURM_USE_MUNGE} -ne 0 ]] && _need="${_need} munged" + [[ ${SLURM_USE_YPBIND} -ne 0 ]] && _need="${_need} ypbind" + after logger + need ${_need} +} + +create_folder_and_set_permission() { + folder=${1} + # Fix permissions (/tmp is wiped at boot) + if [[ "${folder}" == "/tmp" ]]; then + eerror "SLURM: folder == ${folder} == /tmp" + exit + fi + if [[ "${folder}" == "/var/tmp" ]]; then + eerror "SLURM: folder == ${folder} == /var/tmp" + exit + fi + checkpath -d -o slurm:slurm ${folder} +} + +checkconfig() { + if [ ! -e "/etc/slurm/slurmdbd.conf" ]; then + eerror "Missing config /etc/slurm/slurmdbd.conf" + return 1 + fi + + # Make sure folders exists + . /etc/slurm/slurm.conf + folders=(${SlurmdSpoolDir} `dirname ${SlurmctldLogFile}` `dirname ${SlurmctldPidFile}` `dirname ${SlurmdLogFile}` `dirname ${SlurmdPidFile}` ${SlurmdSpoolDir} ${StateSaveLocation}) + for folder in ${folders[*]}; do + create_folder_and_set_permission ${folder} + done +} + +start() { + ebegin "Starting slurmdb daemon" + checkconfig + start-stop-daemon --start --quiet --background \ + --pidfile /var/run/slurm/slurmdbd.pid \ + --user slurm \ + --group slurm \ + --exec /usr/sbin/slurmdbd -- ${SLURMD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping slurmdb daemon" + start-stop-daemon --stop --pidfile /var/run/slurm/slurmdbd.pid + eend $? +} + +reload() { + ebegin "Reloading slurmdb daemon configuration" + start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmdbd.pid + eend $? +} diff --git a/sys-cluster/slurm/metadata.xml b/sys-cluster/slurm/metadata.xml new file mode 100644 index 000000000000..e805a2a315dd --- /dev/null +++ b/sys-cluster/slurm/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>alexxy@gentoo.org</email> + </maintainer> + <use> + <flag name='maui'>Enable maui scheduler support</flag> + <flag name='munge'>Enable authentication via munge</flag> + <flag name='multiple-slurmd'>Allow multiple slurmd to run</flag> + <flag name='ypbind'>Enable ypbind based auth</flag> + <flag name='torque'>Enable perl scripts that emulates pbs (qstat, qsub etc.)</flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/slurm/slurm-2.6.3.ebuild b/sys-cluster/slurm/slurm-2.6.3.ebuild new file mode 100644 index 000000000000..2227a529e4ff --- /dev/null +++ b/sys-cluster/slurm/slurm-2.6.3.ebuild @@ -0,0 +1,261 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="git://github.com/SchedMD/slurm.git" + INHERIT_GIT="git-2" + SRC_URI="" + KEYWORDS="" +else + inherit versionator + if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then + MY_PV=$(replace_version_separator 3 '-0.') # pre-releases or release-candidate + else + MY_PV=$(replace_version_separator 3 '-') # stable releases + fi + MY_P="${PN}-${MY_PV}" + INHERIT_GIT="" + SRC_URI="http://www.schedmd.com/download/total/${MY_P}.tar.bz2" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_P}" +fi + +inherit autotools base eutils pam perl-module user ${INHERIT_GIT} + +DESCRIPTION="SLURM: A Highly Scalable Resource Manager" +HOMEPAGE="http://www.schedmd.com" + +LICENSE="GPL-2" +SLOT="0" +IUSE="lua maui multiple-slurmd +munge mysql pam perl postgres ssl static-libs torque ypbind" + +DEPEND=" + !sys-cluster/torque + !net-analyzer/slurm + !net-analyzer/sinfo + mysql? ( virtual/mysql ) + munge? ( sys-auth/munge ) + ypbind? ( net-nds/ypbind ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql ) + ssl? ( dev-libs/openssl ) + lua? ( dev-lang/lua ) + !lua? ( !dev-lang/lua ) + >=sys-apps/hwloc-1.1.1-r1" +RDEPEND="${DEPEND} + dev-libs/libcgroup + maui? ( sys-cluster/maui[slurm] )" + +REQUIRED_USE="torque? ( perl )" + +LIBSLURM_PERL_S="${WORKDIR}/${P}/contribs/perlapi/libslurm/perl" +LIBSLURMDB_PERL_S="${WORKDIR}/${P}/contribs/perlapi/libslurmdb/perl" + +RESTRICT="primaryuri" + +PATCHES=( + "${FILESDIR}/${PN}-2.5.4-nogtk.patch" +) + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + git-2_src_unpack + else + default + fi +} + +pkg_setup() { + enewgroup slurm 500 + enewuser slurm 500 -1 /var/spool/slurm slurm +} + +src_prepare() { + # Gentoo uses /sys/fs/cgroup instead of /cgroup + # FIXME: Can the "^/cgroup" and "\([ =\"]\)/cgroup" patterns be merged? + sed \ + -e 's|\([ =\"]\)/cgroup|\1/sys/fs/cgroup|g' \ + -e "s|^/cgroup|/sys/fs/cgroup|g" \ + -i "${S}/doc/man/man5/cgroup.conf.5" \ + -i "${S}/etc/cgroup.release_common.example" \ + -i "${S}/src/common/xcgroup_read_config.c" \ + || die "Can't sed /cgroup for /sys/fs/cgroup" + # and pids should go to /var/run/slurm + sed -e 's:/var/run/slurmctld.pid:/var/run/slurm/slurmctld.pid:g' \ + -e 's:/var/run/slurmd.pid:/var/run/slurm/slurmd.pid:g' \ + -i "${S}/etc/slurm.conf.example" \ + || die "Can't sed for /var/run/slurmctld.pid" + # also state dirs are in /var/spool/slurm + sed -e 's:StateSaveLocation=*.:StateSaveLocation=/var/spool/slurm:g' \ + -e 's:SlurmdSpoolDir=*.:SlurmdSpoolDir=/var/spool/slurm/slurmd:g' \ + -i "${S}/etc/slurm.conf.example" \ + || die "Can't sed ${S}/etc/slurm.conf.example for StateSaveLocation=*. or SlurmdSpoolDir=*" + # and tmp should go to /var/tmp/slurm + sed -e 's:/tmp:/var/tmp:g' \ + -i "${S}/etc/slurm.conf.example" \ + || die "Can't sed for StateSaveLocation=*./tmp" + # disable sview since it need gtk+ + sed -e '/sview/d' \ + -i configure.ac + sed -e 's:sview::g' \ + -i src/Makefile.am + # apply patches + epatch "${PATCHES[@]}" + elibtoolize + eautoreconf +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --with-hwloc="${EPREFIX}/usr" + --docdir="${EPREFIX}/usr/share/doc/${P}" + --htmldir="${EPREFIX}/usr/share/doc/${P}" + ) + use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) + use mysql || myconf+=( --without-mysql_config ) + use postgres || myconf+=( --without-pg_config ) + econf "${myconf[@]}" \ + $(use_enable pam) \ + $(use_with ssl) \ + $(use_with munge) \ + $(use_enable static-libs static) \ + $(use_enable multiple-slurmd) + + # --htmldir does not seems to propagate... Documentations are installed + # in /usr/share/doc/slurm-2.3.0/html + # instead of /usr/share/doc/slurm-2.3.0.2/html + sed -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" -i doc/html/Makefile || die + if use perl ; then + # small hack to make it compile + mkdir -p "${S}/src/api/.libs" + mkdir -p "${S}/src/db_api/.libs" + touch "${S}/src/api/.libs/libslurm.so" + touch "${S}/src/db_api/.libs/libslurmdb.so" + cd "${LIBSLURM_PERL_S}" + S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure + cd "${LIBSLURMDB_PERL_S}" + S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure + cd "${S}" + rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" + fi +} + +src_compile() { + default + use pam && emake -C contribs/pam || die + if use perl ; then + cd "${LIBSLURM_PERL_S}" + S="${LIBSLURM_PERL_S}" perl-module_src_compile + cd "${LIBSLURMDB_PERL_S}" + S="${LIBSLURMDB_PERL_S}" perl-module_src_compile + cd "${S}" + fi + if use torque ; then + emake -C contribs/torque || die + fi +} + +src_install() { + default + use pam && emake DESTDIR="${D}" -C contribs/pam install || die + if use perl; then + cd "${LIBSLURM_PERL_S}" + S="${LIBSLURM_PERL_S}" perl-module_src_install + cd "${LIBSLURMDB_PERL_S}" + S="${LIBSLURMDB_PERL_S}" perl-module_src_install + cd "${S}" + fi + if use torque; then + emake DESTDIR="${D}" -C contribs/torque || die + rm -f "${ED}/usr/bin/mpiexec" || die + fi + use static-libs || find "${ED}" -name '*.la' -exec rm {} + + # install sample configs + keepdir /etc/slurm + insinto /etc/slurm + doins etc/bluegene.conf.example + doins etc/cgroup.conf.example + doins etc/cgroup_allowed_devices_file.conf.example + doins etc/slurm.conf.example + doins etc/slurmdbd.conf.example + exeinto /etc/slurm + doexe etc/cgroup.release_common.example + doexe etc/slurm.epilog.clean + # install init.d files + newinitd "${FILESDIR}/slurmd.initd" slurmd + newinitd "${FILESDIR}/slurmctld.initd" slurmctld + newinitd "${FILESDIR}/slurmdbd.initd" slurmdbd + # install conf.d files + newconfd "${FILESDIR}/slurm.confd" slurm + # Install logrotate file + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" slurm || die + # cgroups support + exeinto /etc/slurm/cgroup + doexe etc/cgroup.release_common.example + mv "${D}"/etc/slurm/cgroup/cgroup.release_common.example "${D}"/etc/slurm/cgroup/release_common || die "Can't move cgroup.release_common.example" + ln -s release_common "${D}"/etc/slurm/cgroup/release_cpuset || die "Can't create symbolic link release_cpuset" + ln -s release_common "${D}"/etc/slurm/cgroup/release_devices || die "Can't create symbolic link release_devices" + ln -s release_common "${D}"/etc/slurm/cgroup/release_freezer || die "Can't create symbolic link release_freezer" +} + +pkg_preinst() { + if use munge; then + sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/slurm || die + fi + if use ypbind; then + sed -i 's,\(SLURM_USE_YPBIND=\).*,\11,' "${D}"etc/conf.d/slurm || die + fi +} + +create_folders_and_fix_permissions() { + einfo "Fixing permissions in ${@}" + mkdir -p ${@} + chown -R ${PN}:${PN} ${@} +} + +pkg_postinst() { + paths=( + /var/${PN}/checkpoint + /var/${PN} + /var/spool/${PN}/slurmd + /var/spool/${PN} + /var/run/${PN} + /var/log/${PN} + /var/tmp/${PN}/${PN}d + /var/tmp/${PN} + ) + for folder_path in ${paths[@]}; do + create_folders_and_fix_permissions $folder_path + done + einfo + + elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" + elog "through a (javascript enabled) browser to create a configureation file." + elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." + einfo + elog "For cgroup support, please see http://www.schedmd.com/slurmdocs/cgroup.conf.html" + elog "Your kernel must be compiled with the wanted cgroup feature:" + elog " General setup --->" + elog " [*] Control Group support --->" + elog " [*] Freezer cgroup subsystem" + elog " [*] Device controller for cgroups" + elog " [*] Cpuset support" + elog " [*] Simple CPU accounting cgroup subsystem" + elog " [*] Resource counters" + elog " [*] Memory Resource Controller for Control Groups" + elog " [*] Group CPU scheduler --->" + elog " [*] Group scheduling for SCHED_OTHER" + elog "Then, set these options in /etc/slurm/slurm.conf:" + elog " ProctrackType=proctrack/cgroup" + elog " TaskPlugin=task/cgroup" + einfo + ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" + for folder_path in ${paths[@]}; do + ewarn " ${folder_path}" + done +} diff --git a/sys-cluster/swift/Manifest b/sys-cluster/swift/Manifest new file mode 100644 index 000000000000..af88a84de76b --- /dev/null +++ b/sys-cluster/swift/Manifest @@ -0,0 +1,2 @@ +DIST swift-2.2.2.tar.gz 1038850 SHA256 d97ff8e3c1381611ca2f9cd3eb13000e3339166e06d67ec079ce9ec958d1a088 SHA512 5abe34679305df18dabf49e6e9a6ddf7b890718a4586b1a33cadf0eb47412861a4af53d6124d2a238e463603d11b134a5afa2867939cb3cea49774ae9601d8e6 WHIRLPOOL 57f7364c0e2fa9094837b7127d4380df52a263150be05d84142e1d1256911d0466e7098a7f2a0380b087fb5da313d5a65a973f42b1e39bc102be46f21000c8ef +DIST swift-2.3.0.tar.gz 1346492 SHA256 7225061f92597e7eaf6196c9336c5e590c7626b7e84126c51e8ca5bf5b7bdae1 SHA512 cf8e1e640f1f679516ce1af772c93f860d7d1f1b6712fa9b89dda1688a4b02cd3fdadc443f4911be5927544f0cffe365ff4174ef6e44d118cb56c7b05cd630b9 WHIRLPOOL aade05a7b8f23e680aa932150e8edbc2e9b6bb83528ffa62becdf4d29c8597b20e873017c3c6a95e66448c13c60531abee6ed0bd9b524b6319642c0436ad5e4c diff --git a/sys-cluster/swift/files/cve-2015-1856-master-kilo.patch b/sys-cluster/swift/files/cve-2015-1856-master-kilo.patch new file mode 100644 index 000000000000..7b885ec80bd3 --- /dev/null +++ b/sys-cluster/swift/files/cve-2015-1856-master-kilo.patch @@ -0,0 +1,253 @@ +From 2d1a6f0e2abf16a21765fa9f62830bfbcdb812d5 Mon Sep 17 00:00:00 2001 +From: John Dickinson <me@not.mn> +Date: Fri, 20 Mar 2015 10:17:25 +0000 +Subject: [PATCH] Prevent unauthorized delete in versioned container + +An authenticated user can delete the most recent version of any +versioned object who's name is known if the user has listing access +to the x-versions-location container. Only Swift setups with +allow_version setting are affected. + +This patch closes this bug. + +Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com> +Co-Authored-By: Christian Schwede <info@cschwede.de> +Co-Authored-By: Alistair Coles <alistair.coles@hp.com> + +Closes-Bug: 1430645 +Change-Id: Ibacc7413afe7cb6f77d92e5941dcfdf4768ffa18 +--- + swift/proxy/controllers/obj.py | 12 ++++--- + test/functional/tests.py | 52 +++++++++++++++++++++++++++++++ + test/unit/proxy/test_server.py | 71 ++++++++++++++++++++++++++++++++++++++++-- + 3 files changed, 129 insertions(+), 6 deletions(-) + +diff --git a/swift/proxy/controllers/obj.py b/swift/proxy/controllers/obj.py +index 70b0d0c..2b53ba7 100644 +--- a/swift/proxy/controllers/obj.py ++++ b/swift/proxy/controllers/obj.py +@@ -910,6 +910,10 @@ class ObjectController(Controller): + req.acl = container_info['write_acl'] + req.environ['swift_sync_key'] = container_info['sync_key'] + object_versions = container_info['versions'] ++ if 'swift.authorize' in req.environ: ++ aresp = req.environ['swift.authorize'](req) ++ if aresp: ++ return aresp + if object_versions: + # this is a version manifest and needs to be handled differently + object_versions = unquote(object_versions) +@@ -980,11 +984,11 @@ class ObjectController(Controller): + # remove 'X-If-Delete-At', since it is not for the older copy + if 'X-If-Delete-At' in req.headers: + del req.headers['X-If-Delete-At'] ++ if 'swift.authorize' in req.environ: ++ aresp = req.environ['swift.authorize'](req) ++ if aresp: ++ return aresp + break +- if 'swift.authorize' in req.environ: +- aresp = req.environ['swift.authorize'](req) +- if aresp: +- return aresp + if not containers: + return HTTPNotFound(request=req) + partition, nodes = obj_ring.get_nodes( +diff --git a/test/functional/tests.py b/test/functional/tests.py +index 931f364..6268801 100644 +--- a/test/functional/tests.py ++++ b/test/functional/tests.py +@@ -2409,6 +2409,14 @@ class TestObjectVersioningEnv(object): + cls.account = Account(cls.conn, tf.config.get('account', + tf.config['username'])) + ++ # Second connection for ACL tests ++ config2 = deepcopy(tf.config) ++ config2['account'] = tf.config['account2'] ++ config2['username'] = tf.config['username2'] ++ config2['password'] = tf.config['password2'] ++ cls.conn2 = Connection(config2) ++ cls.conn2.authenticate() ++ + # avoid getting a prefix that stops halfway through an encoded + # character + prefix = Utils.create_name().decode("utf-8")[:10].encode("utf-8") +@@ -2462,6 +2470,14 @@ class TestCrossPolicyObjectVersioningEnv(object): + cls.account = Account(cls.conn, tf.config.get('account', + tf.config['username'])) + ++ # Second connection for ACL tests ++ config2 = deepcopy(tf.config) ++ config2['account'] = tf.config['account2'] ++ config2['username'] = tf.config['username2'] ++ config2['password'] = tf.config['password2'] ++ cls.conn2 = Connection(config2) ++ cls.conn2.authenticate() ++ + # avoid getting a prefix that stops halfway through an encoded + # character + prefix = Utils.create_name().decode("utf-8")[:10].encode("utf-8") +@@ -2496,6 +2512,15 @@ class TestObjectVersioning(Base): + "Expected versioning_enabled to be True/False, got %r" % + (self.env.versioning_enabled,)) + ++ def tearDown(self): ++ super(TestObjectVersioning, self).tearDown() ++ try: ++ # delete versions first! ++ self.env.versions_container.delete_files() ++ self.env.container.delete_files() ++ except ResponseError: ++ pass ++ + def test_overwriting(self): + container = self.env.container + versions_container = self.env.versions_container +@@ -2555,6 +2580,33 @@ class TestObjectVersioning(Base): + self.assertEqual(3, versions_container.info()['object_count']) + self.assertEqual("112233", man_file.read()) + ++ def test_versioning_check_acl(self): ++ container = self.env.container ++ versions_container = self.env.versions_container ++ versions_container.create(hdrs={'X-Container-Read': '.r:*,.rlistings'}) ++ ++ obj_name = Utils.create_name() ++ versioned_obj = container.file(obj_name) ++ versioned_obj.write("aaaaa") ++ self.assertEqual("aaaaa", versioned_obj.read()) ++ ++ versioned_obj.write("bbbbb") ++ self.assertEqual("bbbbb", versioned_obj.read()) ++ ++ # Use token from second account and try to delete the object ++ org_token = self.env.account.conn.storage_token ++ self.env.account.conn.storage_token = self.env.conn2.storage_token ++ try: ++ self.assertRaises(ResponseError, versioned_obj.delete) ++ finally: ++ self.env.account.conn.storage_token = org_token ++ ++ # Verify with token from first account ++ self.assertEqual("bbbbb", versioned_obj.read()) ++ ++ versioned_obj.delete() ++ self.assertEqual("aaaaa", versioned_obj.read()) ++ + + class TestObjectVersioningUTF8(Base2, TestObjectVersioning): + set_up = False +diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py +index 39d637d..41f0ea3 100644 +--- a/test/unit/proxy/test_server.py ++++ b/test/unit/proxy/test_server.py +@@ -56,7 +56,7 @@ from swift.proxy.controllers.base import get_container_memcache_key, \ + get_account_memcache_key, cors_validation + import swift.proxy.controllers + from swift.common.swob import Request, Response, HTTPUnauthorized, \ +- HTTPException ++ HTTPException, HTTPForbidden + from swift.common import storage_policy + from swift.common.storage_policy import StoragePolicy, \ + StoragePolicyCollection, POLICIES +@@ -1615,6 +1615,7 @@ class TestObjectController(unittest.TestCase): + ]) + def test_DELETE_on_expired_versioned_object(self): + methods = set() ++ authorize_call_count = [0] + + def test_connect(ipaddr, port, device, partition, method, path, + headers=None, query_string=None): +@@ -1640,6 +1641,10 @@ class TestObjectController(unittest.TestCase): + for obj in object_list: + yield obj + ++ def fake_authorize(req): ++ authorize_call_count[0] += 1 ++ return None # allow the request ++ + with save_globals(): + controller = proxy_server.ObjectController(self.app, + 'a', 'c', 'o') +@@ -1651,7 +1656,8 @@ class TestObjectController(unittest.TestCase): + 204, 204, 204, # delete for the pre-previous + give_connect=test_connect) + req = Request.blank('/v1/a/c/o', +- environ={'REQUEST_METHOD': 'DELETE'}) ++ environ={'REQUEST_METHOD': 'DELETE', ++ 'swift.authorize': fake_authorize}) + + self.app.memcache.store = {} + self.app.update_request(req) +@@ -1661,6 +1667,67 @@ class TestObjectController(unittest.TestCase): + ('PUT', '/a/c/o'), + ('DELETE', '/a/foo/2')] + self.assertEquals(set(exp_methods), (methods)) ++ self.assertEquals(authorize_call_count[0], 2) ++ ++ @patch_policies([ ++ StoragePolicy(0, 'zero', False, object_ring=FakeRing()), ++ StoragePolicy(1, 'one', True, object_ring=FakeRing()) ++ ]) ++ def test_denied_DELETE_of_versioned_object(self): ++ """ ++ Verify that a request with read access to a versions container ++ is unable to cause any write operations on the versioned container. ++ """ ++ methods = set() ++ authorize_call_count = [0] ++ ++ def test_connect(ipaddr, port, device, partition, method, path, ++ headers=None, query_string=None): ++ methods.add((method, path)) ++ ++ def fake_container_info(account, container, req): ++ return {'status': 200, 'sync_key': None, ++ 'meta': {}, 'cors': {'allow_origin': None, ++ 'expose_headers': None, ++ 'max_age': None}, ++ 'sysmeta': {}, 'read_acl': None, 'object_count': None, ++ 'write_acl': None, 'versions': 'foo', ++ 'partition': 1, 'bytes': None, 'storage_policy': '1', ++ 'nodes': [{'zone': 0, 'ip': '10.0.0.0', 'region': 0, ++ 'id': 0, 'device': 'sda', 'port': 1000}, ++ {'zone': 1, 'ip': '10.0.0.1', 'region': 1, ++ 'id': 1, 'device': 'sdb', 'port': 1001}, ++ {'zone': 2, 'ip': '10.0.0.2', 'region': 0, ++ 'id': 2, 'device': 'sdc', 'port': 1002}]} ++ ++ def fake_list_iter(container, prefix, env): ++ object_list = [{'name': '1'}, {'name': '2'}, {'name': '3'}] ++ for obj in object_list: ++ yield obj ++ ++ def fake_authorize(req): ++ # deny write access ++ authorize_call_count[0] += 1 ++ return HTTPForbidden(req) # allow the request ++ ++ with save_globals(): ++ controller = proxy_server.ObjectController(self.app, ++ 'a', 'c', 'o') ++ controller.container_info = fake_container_info ++ # patching _listing_iter simulates request being authorized ++ # to list versions container ++ controller._listing_iter = fake_list_iter ++ set_http_connect(give_connect=test_connect) ++ req = Request.blank('/v1/a/c/o', ++ environ={'REQUEST_METHOD': 'DELETE', ++ 'swift.authorize': fake_authorize}) ++ ++ self.app.memcache.store = {} ++ self.app.update_request(req) ++ resp = controller.DELETE(req) ++ self.assertEqual(403, resp.status_int) ++ self.assertFalse(methods, methods) ++ self.assertEquals(authorize_call_count[0], 1) + + def test_PUT_auto_content_type(self): + with save_globals(): +-- +1.9.1 + + diff --git a/sys-cluster/swift/files/swift-account.initd b/sys-cluster/swift/files/swift-account.initd new file mode 100644 index 000000000000..e515fcb36f2b --- /dev/null +++ b/sys-cluster/swift/files/swift-account.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +COMMAND=/usr/bin/swift-init +PIDFILE=/run/swift/account-server.pid + +depend() { + after net +} + +checkconfig() { + if [ ! -r /etc/swift/swift.conf ]; then + eerror "Missing required config file: /etc/swift/swift.conf" + return 1 + fi + if [ ! -r /etc/swift/account-server.conf ]; then + eerror "Missing required config file: /etc/swift/account-server.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- account start + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- account stop + eend $? +} diff --git a/sys-cluster/swift/files/swift-container.initd b/sys-cluster/swift/files/swift-container.initd new file mode 100644 index 000000000000..0b2ff0857ddc --- /dev/null +++ b/sys-cluster/swift/files/swift-container.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +COMMAND=/usr/bin/swift-init +PIDFILE=/run/swift/container-server.pid + +depend() { + after net +} + +checkconfig() { + if [ ! -r /etc/swift/swift.conf ]; then + eerror "Missing required config file: /etc/swift/swift.conf" + return 1 + fi + if [ ! -r /etc/swift/container-server.conf ]; then + eerror "Missing required config file: /etc/swift/container-server.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- container start + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- container stop + eend $? +} diff --git a/sys-cluster/swift/files/swift-object.initd b/sys-cluster/swift/files/swift-object.initd new file mode 100644 index 000000000000..5fb6eb34aae4 --- /dev/null +++ b/sys-cluster/swift/files/swift-object.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +COMMAND=/usr/bin/swift-init +PIDFILE=/run/swift/object-server.pid + +depend() { + after net +} + +checkconfig() { + if [ ! -r /etc/swift/swift.conf ]; then + eerror "Missing required config file: /etc/swift/swift.conf" + return 1 + fi + if [ ! -r /etc/swift/object-server.conf ]; then + eerror "Missing required config file: /etc/swift/object-server.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- object start + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- object stop + eend $? +} diff --git a/sys-cluster/swift/files/swift-proxy.initd b/sys-cluster/swift/files/swift-proxy.initd new file mode 100644 index 000000000000..3fbadf33fa3e --- /dev/null +++ b/sys-cluster/swift/files/swift-proxy.initd @@ -0,0 +1,57 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +COMMAND=/usr/bin/swift-init +PIDFILE=/run/swift/proxy-server.pid + +depend() { + after net +} + +opts="reload" + +checkconfig() { + if [ ! -r /etc/swift/swift.conf ]; then + eerror "Missing required config file: /etc/swift/swift.conf" + return 1 + fi + if [ ! -r /etc/swift/proxy-server.conf ]; then + eerror "Missing required config file: /etc/swift/proxy-server.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- proxy start + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- proxy stop + eend $? +} + +reload() { + checkconfig || return $? + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --quiet -i ${COMMAND} -- proxy reload + eend $? "Failed to reload ${SVCNAME}" +} + +restart() { + checkconfig || return $? + ebegin "Restarting ${SVCNAME}" + start-stop-daemon --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- proxy restart + eend $? "Failed to restart ${SVCNAME}" +} + +status() { + start-stop-daemon --quiet -i ${COMMAND} -- proxy status + eend $? "Failed to get status for ${SVCNAME}" +} diff --git a/sys-cluster/swift/metadata.xml b/sys-cluster/swift/metadata.xml new file mode 100644 index 000000000000..9f7df66f121e --- /dev/null +++ b/sys-cluster/swift/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>openstack</herd> + <use> + <flag name="account">adds swift account support</flag> + <flag name="container">adds swift container support</flag> + <flag name="memcached">adds memcached support</flag> + <flag name="object">adds swift object support</flag> + <flag name="proxy">adds swift proxy support</flag> + </use> + <maintainer> + <email>prometheanfire@gentoo.org</email> + <name>Matthew Thode</name> + </maintainer> + <longdescription lang="en"> + Swift is a highly available, distributed, eventually consistent object/blob + store. + </longdescription> + <upstream> + <remote-id type="launchpad">swift</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/swift/swift-2.2.2-r1.ebuild b/sys-cluster/swift/swift-2.2.2-r1.ebuild new file mode 100644 index 000000000000..a46314bd2e0e --- /dev/null +++ b/sys-cluster/swift/swift-2.2.2-r1.ebuild @@ -0,0 +1,121 @@ +# 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="A highly available, distributed, and eventually consistent object/blob store" +HOMEPAGE="https://launchpad.net/swift" +SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="proxy account container object test +memcached" +REQUIRED_USE="|| ( proxy account container object )" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/pbr-0.8.0[${PYTHON_USEDEP}] + <dev-python/pbr-1.0[${PYTHON_USEDEP}] + test? ( + ${RDEPEND} + >=dev-python/hacking-0.8.0[${PYTHON_USEDEP}] + <dev-python/hacking-0.9[${PYTHON_USEDEP}] + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/nosexcover[${PYTHON_USEDEP}] + dev-python/openstack-nose-plugin[${PYTHON_USEDEP}] + dev-python/nosehtmloutput[${PYTHON_USEDEP}] + >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}] + <dev-python/sphinx-1.2[${PYTHON_USEDEP}] + dev-python/oslo-sphinx[${PYTHON_USEDEP}] + >=dev-python/mock-1.0[${PYTHON_USEDEP}] + dev-python/python-swiftclient[${PYTHON_USEDEP}] + )" + +RDEPEND=" + >=dev-python/dnspython-1.9.4[${PYTHON_USEDEP}] + >=dev-python/eventlet-0.9.15[${PYTHON_USEDEP}] + >=dev-python/greenlet-0.3.1[${PYTHON_USEDEP}] + >=dev-python/netifaces-0.5[${PYTHON_USEDEP}] + !~dev-python/netifaces-0.10.0[${PYTHON_USEDEP}] + !~dev-python/netifaces-0.10.1[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.3.3[${PYTHON_USEDEP}] + >=dev-python/simplejson-2.0.9[${PYTHON_USEDEP}] + dev-python/pyxattr[${PYTHON_USEDEP}] + memcached? ( net-misc/memcached ) + net-misc/rsync[xattr]" + +CONFIG_CHECK="~EXT3_FS_XATTR ~SQUASHFS_XATTR ~CIFS_XATTR ~JFFS2_FS_XATTR +~TMPFS_XATTR ~UBIFS_FS_XATTR ~EXT2_FS_XATTR ~REISERFS_FS_XATTR ~EXT4_FS_XATTR +~ZFS" + +PATCHES=( +"${FILESDIR}/cve-2015-1856-master-kilo.patch" +) + +pkg_setup() { + enewuser swift + enewgroup swift +} + +src_prepare() { + sed -i 's/xattr/pyxattr/g' "${S}/swift.egg-info/requires.txt" + sed -i 's/xattr/pyxattr/g' "${S}/requirements.txt" + distutils-r1_python_prepare_all +} + +src_test () { + # https://bugs.launchpad.net/swift/+bug/1249727 + find . \( -name test_wsgi.py -o -name test_locale.py -o -name test_utils.py \) -delete || die + SKIP_PIP_INSTALL=1 PBR_VERSION=0.6.0 sh .unittests || die +} + +python_install() { + distutils-r1_python_install + keepdir /etc/swift + insinto /etc/swift + + newins "etc/swift.conf-sample" "swift.conf" + newins "etc/rsyncd.conf-sample" "rsyncd.conf" + newins "etc/mime.types-sample" "mime.types-sample" + newins "etc/memcache.conf-sample" "memcache.conf-sample" + newins "etc/drive-audit.conf-sample" "drive-audit.conf-sample" + newins "etc/dispersion.conf-sample" "dispersion.conf-sample" + + if use proxy; then + newinitd "${FILESDIR}/swift-proxy.initd" "swift-proxy" + newins "etc/proxy-server.conf-sample" "proxy-server.conf" + if use memcached; then + sed -i '/depend/a\ + need memcached' "${D}/etc/init.d/swift-proxy" + fi + fi + if use account; then + newinitd "${FILESDIR}/swift-account.initd" "swift-account" + newins "etc/account-server.conf-sample" "account-server.conf" + fi + if use container; then + newinitd "${FILESDIR}/swift-container.initd" "swift-container" + newins "etc/container-server.conf-sample" "container-server.conf" + fi + if use object; then + newinitd "${FILESDIR}/swift-object.initd" "swift-object" + newins "etc/object-server.conf-sample" "object-server.conf" + newins "etc/object-expirer.conf-sample" "object-expirer.conf" + fi + + fowners swift:swift "/etc/swift" || die "fowners failed" +} + +pkg_postinst() { + elog "Openstack swift will default to using insecure http unless a" + elog "certificate is created in /etc/swift/cert.crt and the associated key" + elog "in /etc/swift/cert.key. These can be created with the following:" + elog " * cd /etc/swift" + elog " * openssl req -new -x509 -nodes -out cert.crt -keyout cert.key" +} diff --git a/sys-cluster/swift/swift-2.3.0.ebuild b/sys-cluster/swift/swift-2.3.0.ebuild new file mode 100644 index 000000000000..e076b94db141 --- /dev/null +++ b/sys-cluster/swift/swift-2.3.0.ebuild @@ -0,0 +1,122 @@ +# 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="A highly available, distributed, and eventually consistent object/blob store" +HOMEPAGE="https://launchpad.net/swift" +SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="proxy account container object test +memcached" +REQUIRED_USE="|| ( proxy account container object )" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/pbr-0.8.0[${PYTHON_USEDEP}] + <dev-python/pbr-1.0[${PYTHON_USEDEP}] + test? ( + ${RDEPEND} + >=dev-python/hacking-0.8.0[${PYTHON_USEDEP}] + <dev-python/hacking-0.9[${PYTHON_USEDEP}] + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/nosexcover[${PYTHON_USEDEP}] + dev-python/openstack-nose-plugin[${PYTHON_USEDEP}] + dev-python/nosehtmloutput[${PYTHON_USEDEP}] + dev-python/oslo-sphinx[${PYTHON_USEDEP}] + >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}] + <dev-python/sphinx-1.2[${PYTHON_USEDEP}] + >=dev-python/mock-1.0[${PYTHON_USEDEP}] + dev-python/python-swiftclient[${PYTHON_USEDEP}] + )" + +RDEPEND=" + >=dev-python/dnspython-1.9.4[${PYTHON_USEDEP}] + >=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}] + !~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}] + >=dev-python/greenlet-0.3.1[${PYTHON_USEDEP}] + >=dev-python/netifaces-0.5[${PYTHON_USEDEP}] + !~dev-python/netifaces-0.10.0[${PYTHON_USEDEP}] + !~dev-python/netifaces-0.10.1[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.3.3[${PYTHON_USEDEP}] + >=dev-python/simplejson-2.0.9[${PYTHON_USEDEP}] + dev-python/pyxattr[${PYTHON_USEDEP}] + >=dev-python/PyECLib-1.0.7[${PYTHON_USEDEP}] + memcached? ( net-misc/memcached ) + net-misc/rsync[xattr]" + +CONFIG_CHECK="~EXT3_FS_XATTR ~SQUASHFS_XATTR ~CIFS_XATTR ~JFFS2_FS_XATTR +~TMPFS_XATTR ~UBIFS_FS_XATTR ~EXT2_FS_XATTR ~REISERFS_FS_XATTR ~EXT4_FS_XATTR +~ZFS" + +PATCHES=( +) + +pkg_setup() { + enewuser swift + enewgroup swift +} + +src_prepare() { + sed -i 's/xattr/pyxattr/g' "${S}/swift.egg-info/requires.txt" + sed -i 's/xattr/pyxattr/g' "${S}/requirements.txt" + distutils-r1_python_prepare_all +} + +src_test () { + # https://bugs.launchpad.net/swift/+bug/1249727 + find . \( -name test_wsgi.py -o -name test_locale.py -o -name test_utils.py \) -delete || die + SKIP_PIP_INSTALL=1 PBR_VERSION=0.6.0 sh .unittests || die +} + +python_install() { + distutils-r1_python_install + keepdir /etc/swift + insinto /etc/swift + + newins "etc/swift.conf-sample" "swift.conf" + newins "etc/rsyncd.conf-sample" "rsyncd.conf" + newins "etc/mime.types-sample" "mime.types-sample" + newins "etc/memcache.conf-sample" "memcache.conf-sample" + newins "etc/drive-audit.conf-sample" "drive-audit.conf-sample" + newins "etc/dispersion.conf-sample" "dispersion.conf-sample" + + if use proxy; then + newinitd "${FILESDIR}/swift-proxy.initd" "swift-proxy" + newins "etc/proxy-server.conf-sample" "proxy-server.conf" + if use memcached; then + sed -i '/depend/a\ + need memcached' "${D}/etc/init.d/swift-proxy" + fi + fi + if use account; then + newinitd "${FILESDIR}/swift-account.initd" "swift-account" + newins "etc/account-server.conf-sample" "account-server.conf" + fi + if use container; then + newinitd "${FILESDIR}/swift-container.initd" "swift-container" + newins "etc/container-server.conf-sample" "container-server.conf" + fi + if use object; then + newinitd "${FILESDIR}/swift-object.initd" "swift-object" + newins "etc/object-server.conf-sample" "object-server.conf" + newins "etc/object-expirer.conf-sample" "object-expirer.conf" + fi + + fowners swift:swift "/etc/swift" || die "fowners failed" +} + +pkg_postinst() { + elog "Openstack swift will default to using insecure http unless a" + elog "certificate is created in /etc/swift/cert.crt and the associated key" + elog "in /etc/swift/cert.key. These can be created with the following:" + elog " * cd /etc/swift" + elog " * openssl req -new -x509 -nodes -out cert.crt -keyout cert.key" +} diff --git a/sys-cluster/torque/Manifest b/sys-cluster/torque/Manifest new file mode 100644 index 000000000000..2b20c8acc5c6 --- /dev/null +++ b/sys-cluster/torque/Manifest @@ -0,0 +1,3 @@ +DIST torque-2.5.13.tar.gz 5854910 SHA256 ab59d4c8e8b45383ddd8202fa83956816175e348bb955a4ad5f7e3cd4dde5ff9 SHA512 e08ddf3950bb32177f4bc504a502fae3928a616739c28ca9687c5207606817d4589583306508a2c568cf19fc8c5617dc4a9decc81576c2875660b715c256cfcf WHIRLPOOL 29eefb89d1eb9d6a81735aa117922a1eb0b72e14eeccab7dbd70cdcf01431b7ecd9c3927e1c5c28b7f42d6739b28f45386740b92adb790ccdf9803e4c6e38534 +DIST torque-4.1.7.tar.gz 6218108 SHA256 3c86b2d84589f54ac222e81dd1953d153e1d836163d2000412369fefd25fb2af SHA512 5a085c0a7b205fed075bff4599db90ca5c4bb5f22d87d76fd56539d5cc1935bb8eeffcd4d18ba84401bd4ca128718070b69c8b91ab6814a4638622ba351654e6 WHIRLPOOL cae9216f0cebc22927eec2d1f007b1a3c4a6cc619f2926c40a5f46e0bd0eec19691f9aafcad4fe727e2c5ed2485d11c972603cca613269f82147ff1dc41f1ba4 +DIST torque-4.2.9.tar.gz 6294022 SHA256 46f1f319683af6d3820e18cda69ce59113c9a5c192e1f07826007be69385889b SHA512 898703fa1d02310c22e2a02b86d67ca52ebed46684597931944edebb39f8293746739c8dca9cd10e07c2e7274c3dd7f65a5664d1980817e3feec58952c4cf4d1 WHIRLPOOL e65be66b056a519ebd1c30c2c1ae2ddf43bc4e617a52d3caced1e6dfd2b0d8b2a83c26a0f2e6e41cfae791aca68b6f91424745b2baffa2085fccc8f6ae9b8e04 diff --git a/sys-cluster/torque/files/CVE-2013-4319-2.x-root-submit-fix.patch b/sys-cluster/torque/files/CVE-2013-4319-2.x-root-submit-fix.patch new file mode 100644 index 000000000000..aa53239f157c --- /dev/null +++ b/sys-cluster/torque/files/CVE-2013-4319-2.x-root-submit-fix.patch @@ -0,0 +1,40 @@ +From 5dee0365a56dd2cc4cfd0b182bc843b4f32c086c Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Mon, 23 Dec 2013 12:40:27 -0500 +Subject: [PATCH] CVE-2013-4319: 2.x root submit fix + +https://bugs.gentoo.org/show_bug.cgi?id=484320 +http://nvd.nist.gov/nvd.cfm?cvename=CVE-2013-4319\ +--- + src/server/process_request.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/src/server/process_request.c b/src/server/process_request.c +index d4a3c92..b06a333 100644 +--- a/src/server/process_request.c ++++ b/src/server/process_request.c +@@ -640,6 +640,21 @@ void process_request( + log_buffer); + } + ++ if (svr_conn[sfds].cn_authen != PBS_NET_CONN_FROM_PRIVIL) ++ { ++ sprintf(log_buffer, "request type %s from host %s rejected (connection not privileged)", ++ reqtype_to_txt(request->rq_type), ++ request->rq_host); ++ ++ log_record(PBSEVENT_JOB, PBS_EVENTCLASS_JOB, id, log_buffer); ++ ++ req_reject(PBSE_BADHOST, 0, request, NULL, "request not authorized"); ++ ++ close_client(sfds); ++ ++ return; ++ } ++ + if (!tfind(svr_conn[sfds].cn_addr, &okclients)) + { + sprintf(log_buffer, "request type %s from host %s rejected (host not authorized)", +-- +1.8.3.2 + diff --git a/sys-cluster/torque/files/CVE-2013-4319-4.x-root-submit-fix.patch b/sys-cluster/torque/files/CVE-2013-4319-4.x-root-submit-fix.patch new file mode 100644 index 000000000000..3614e42721de --- /dev/null +++ b/sys-cluster/torque/files/CVE-2013-4319-4.x-root-submit-fix.patch @@ -0,0 +1,38 @@ +From 6424696d7b160c8a9ad806c4a6b0f77f0d359962 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Mon, 23 Dec 2013 12:48:22 -0500 +Subject: [PATCH] CVE-2013-4319: 4.x root submit fix + +https://bugs.gentoo.org/show_bug.cgi?id=484320 +http://nvd.nist.gov/nvd.cfm?cvename=CVE-2013-4319 +--- + src/resmom/mom_process_request.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/src/resmom/mom_process_request.c b/src/resmom/mom_process_request.c +index 049f63f..813833f 100644 +--- a/src/resmom/mom_process_request.c ++++ b/src/resmom/mom_process_request.c +@@ -238,6 +238,19 @@ void *mom_process_request( + log_record(PBSEVENT_JOB, PBS_EVENTCLASS_JOB, __func__, log_buffer); + } + ++ if (svr_conn[chan->sock].cn_authen != PBS_NET_CONN_FROM_PRIVIL) ++ { ++ sprintf(log_buffer, "request type %s from host %s rejected (connection not privileged)", ++ reqtype_to_txt(request->rq_type), ++ request->rq_host); ++ ++ log_record(PBSEVENT_JOB, PBS_EVENTCLASS_JOB, __func__, log_buffer); ++ req_reject(PBSE_BADHOST, 0, request, NULL, "request not authorized"); ++ mom_close_client(chan->sock); ++ DIS_tcp_cleanup(chan); ++ return NULL; ++ } ++ + if (!AVL_is_in_tree_no_port_compare(svr_conn[chan->sock].cn_addr, 0, okclients)) + { + sprintf(log_buffer, "request type %s from host %s rejected (host not authorized)", +-- +1.8.3.2 + diff --git a/sys-cluster/torque/files/CVE-2013-4495.4.1.patch b/sys-cluster/torque/files/CVE-2013-4495.4.1.patch new file mode 100644 index 000000000000..810a4f0944a5 --- /dev/null +++ b/sys-cluster/torque/files/CVE-2013-4495.4.1.patch @@ -0,0 +1,343 @@ +From 2aad72c3d2ac612ecbb66828ac6ed5ab51eff5f3 Mon Sep 17 00:00:00 2001 +From: David Beer <dbeer@adaptivecomputing.com> +Date: Mon, 11 Nov 2013 11:55:58 -0700 +Subject: [PATCH] Fix CVE 2013-4495. Note: this patch has been verified as + fixing this security hole but has not received other regression testing. + Could not cherry-pick as 2.5 and 4.1 are very different. + +--- + src/server/svr_mail.c | 265 ++++++++++++++++++++++++++++++++------------------ + 1 file changed, 170 insertions(+), 95 deletions(-) + +diff --git a/src/server/svr_mail.c b/src/server/svr_mail.c +index b269e82..52f2f1f 100644 +--- a/src/server/svr_mail.c ++++ b/src/server/svr_mail.c +@@ -89,6 +89,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <unistd.h> + #include "list_link.h" + #include "attribute.h" + #include "server_limits.h" +@@ -136,6 +137,77 @@ void free_mail_info( + + + ++void add_body_info( ++ ++ char *bodyfmtbuf /* I */, ++ mail_info *mi /* I */) ++ ++ { ++ char *bodyfmt = NULL; ++ bodyfmt = strcpy(bodyfmtbuf, "PBS Job Id: %i\n" ++ "Job Name: %j\n"); ++ if (mi->exec_host != NULL) ++ { ++ strcat(bodyfmt, "Exec host: %h\n"); ++ } ++ ++ strcat(bodyfmt, "%m\n"); ++ ++ if (mi->text != NULL) ++ { ++ strcat(bodyfmt, "%d\n"); ++ } ++ } ++ ++ ++/* ++ * write_email() ++ * ++ * In emailing, the mail body is written to a pipe connected to ++ * standard input for sendmail. This function supplies the body ++ * of the message. ++ * ++ */ ++void write_email( ++ ++ FILE *outmail_input, ++ mail_info *mi) ++ ++ { ++ char *bodyfmt = NULL; ++ char *subjectfmt = NULL; ++ ++ /* Pipe in mail headers: To: and Subject: */ ++ fprintf(outmail_input, "To: %s\n", mi->mailto); ++ ++ /* mail subject line formating statement */ ++ get_svr_attr_str(SRV_ATR_MailSubjectFmt, (char **)&subjectfmt); ++ if (subjectfmt == NULL) ++ { ++ subjectfmt = "PBS JOB %i"; ++ } ++ ++ fprintf(outmail_input, "Subject: "); ++ svr_format_job(outmail_input, mi, subjectfmt); ++ fprintf(outmail_input, "\n"); ++ ++ /* Set "Precedence: bulk" to avoid vacation messages, etc */ ++ fprintf(outmail_input, "Precedence: bulk\n\n"); ++ ++ /* mail body formating statement */ ++ get_svr_attr_str(SRV_ATR_MailBodyFmt, &bodyfmt); ++ if (bodyfmt == NULL) ++ { ++ char bodyfmtbuf[MAXLINE]; ++ add_body_info(bodyfmtbuf, mi); ++ bodyfmt = bodyfmtbuf; ++ } ++ ++ /* Now pipe in the email body */ ++ svr_format_job(outmail_input, mi, bodyfmt); ++ ++ } /* write_email() */ ++ + + + void *send_the_mail( +@@ -143,15 +215,19 @@ void *send_the_mail( + void *vp) + + { +- mail_info *mi = (mail_info *)vp; +- +- int i; +- char *mailfrom = NULL; +- char *subjectfmt = NULL; +- char *bodyfmt = NULL; +- char *cmdbuf = NULL; +- char bodyfmtbuf[MAXLINE]; +- FILE *outmail; ++ mail_info *mi = (mail_info *)vp; ++ ++ int status = 0; ++ int numargs = 0; ++ int pipes[2]; ++ int counter; ++ pid_t pid; ++ char *mailptr; ++ char *mailfrom = NULL; ++ char tmpBuf[LOG_BUF_SIZE]; ++ // We call sendmail with cmd_name + 2 arguments + # of mailto addresses + 1 for null ++ char *sendmail_args[100]; ++ FILE *stream; + + /* Who is mail from, if SRV_ATR_mailfrom not set use default */ + get_svr_attr_str(SRV_ATR_mailfrom, &mailfrom); +@@ -173,124 +249,123 @@ void *send_the_mail( + mailfrom = PBS_DEFAULT_MAIL; + } + +- /* mail subject line formating statement */ +- get_svr_attr_str(SRV_ATR_MailSubjectFmt, &subjectfmt); +- if (subjectfmt == NULL) +- { +- subjectfmt = "PBS JOB %i"; +- } ++ sendmail_args[numargs++] = (char *)SENDMAIL_CMD; ++ sendmail_args[numargs++] = (char *)"-f"; ++ sendmail_args[numargs++] = (char *)mailfrom; + +- /* mail body formating statement */ +- get_svr_attr_str(SRV_ATR_MailBodyFmt, &bodyfmt); +- if (bodyfmt == NULL) ++ /* Add the e-mail addresses to the command line */ ++ mailptr = strdup(mi->mailto); ++ sendmail_args[numargs++] = mailptr; ++ for (counter=0; counter < (int)strlen(mailptr); counter++) + { +- bodyfmt = strcpy(bodyfmtbuf, "PBS Job Id: %i\n" +- "Job Name: %j\n"); +- if (mi->exec_host != NULL) ++ if (mailptr[counter] == ',') + { +- strcat(bodyfmt, "Exec host: %h\n"); +- } +- +- strcat(bodyfmt, "%m\n"); +- +- if (mi->text != NULL) +- { +- strcat(bodyfmt, "%d\n"); ++ mailptr[counter] = '\0'; ++ sendmail_args[numargs++] = mailptr + counter + 1; ++ if (numargs >= 99) ++ break; + } + } + +- /* setup sendmail command line with -f from_whom */ +- i = strlen(SENDMAIL_CMD) + strlen(mailfrom) + strlen(mi->mailto) + 6; +- +- if ((cmdbuf = calloc(1, i + 1)) == NULL) ++ sendmail_args[numargs] = NULL; ++ ++ /* Create a pipe to talk to the sendmail process we are about to fork */ ++ if (pipe(pipes) == -1) + { +- char tmpBuf[LOG_BUF_SIZE]; +- +- snprintf(tmpBuf,sizeof(tmpBuf), +- "Unable to popen() command '%s' for writing: '%s' (error %d)\n", +- SENDMAIL_CMD, +- strerror(errno), +- errno); ++ snprintf(tmpBuf, sizeof(tmpBuf), "Unable to pipes for sending e-mail\n"); + log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB, + PBS_EVENTCLASS_JOB, + mi->jobid, + tmpBuf); +- +- free_mail_info(mi); + ++ free_mail_info(mi); ++ free(mailptr); + return(NULL); + } + +- sprintf(cmdbuf, "%s -f %s %s", +- SENDMAIL_CMD, +- mailfrom, +- mi->mailto); +- +- outmail = popen(cmdbuf, "w"); +- +- if (outmail == NULL) ++ if ((pid=fork()) == -1) + { +- char tmpBuf[LOG_BUF_SIZE]; +- +- snprintf(tmpBuf,sizeof(tmpBuf), +- "Unable to popen() command '%s' for writing: '%s' (error %d)\n", +- cmdbuf, +- strerror(errno), +- errno); ++ snprintf(tmpBuf, sizeof(tmpBuf), "Unable to fork for sending e-mail\n"); + log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB, + PBS_EVENTCLASS_JOB, + mi->jobid, + tmpBuf); + + free_mail_info(mi); +- free(cmdbuf); +- ++ free(mailptr); ++ close(pipes[0]); ++ close(pipes[1]); + return(NULL); + } ++ else if (pid == 0) ++ { ++ /* CHILD */ + +- /* Pipe in mail headers: To: and Subject: */ +- fprintf(outmail, "To: %s\n", mi->mailto); ++ /* Make stdin the read end of the pipe */ ++ dup2(pipes[0], 0); + +- fprintf(outmail, "Subject: "); +- svr_format_job(outmail, mi, subjectfmt); +- fprintf(outmail, "\n"); ++ /* Close the rest of the open file descriptors */ ++ int numfds = sysconf(_SC_OPEN_MAX); ++ while (--numfds > 0) ++ close(numfds); + +- /* Set "Precedence: bulk" to avoid vacation messages, etc */ +- fprintf(outmail, "Precedence: bulk\n\n"); ++ execv(SENDMAIL_CMD, sendmail_args); ++ /* This never returns, but if the execv fails the child should exit */ ++ exit(1); ++ } ++ else ++ { ++ /* This is the parent */ + +- /* Now pipe in the email body */ +- svr_format_job(outmail, mi, bodyfmt); ++ /* Close the read end of the pipe */ ++ close(pipes[0]); + +- errno = 0; +- if ((i = pclose(outmail)) != 0) +- { +- char tmpBuf[LOG_BUF_SIZE]; ++ /* Write the body to the pipe */ ++ stream = fdopen(pipes[1], "w"); ++ write_email(stream, mi); + +- snprintf(tmpBuf,sizeof(tmpBuf), +- "Email '%c' to %s failed: Child process '%s' %s %d (errno %d:%s)\n", +- mi->mail_point, +- mi->mailto, +- cmdbuf, +- ((WIFEXITED(i)) ? ("returned") : ((WIFSIGNALED(i)) ? ("killed by signal") : ("croaked"))), +- ((WIFEXITED(i)) ? (WEXITSTATUS(i)) : ((WIFSIGNALED(i)) ? (WTERMSIG(i)) : (i))), +- errno, +- strerror(errno)); +- log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB, +- PBS_EVENTCLASS_JOB, +- mi->jobid, +- tmpBuf); +- } +- else if (LOGLEVEL >= 4) +- { +- log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB, +- PBS_EVENTCLASS_JOB, +- mi->jobid, +- "Email sent successfully\n"); +- } ++ fflush(stream); ++ ++ /* Close and wait for the command to finish */ ++ if (fclose(stream) != 0) ++ { ++ snprintf(tmpBuf,sizeof(tmpBuf), ++ "Piping mail body to sendmail closed: errno %d:%s\n", ++ errno, strerror(errno)); ++ ++ log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB, ++ PBS_EVENTCLASS_JOB, ++ mi->jobid, ++ tmpBuf); ++ } ++ ++ // we aren't going to block in order to find out whether or not sendmail worked ++ if ((waitpid(pid, &status, WNOHANG) != 0) && ++ (status != 0)) ++ { ++ snprintf(tmpBuf,sizeof(tmpBuf), ++ "Sendmail command returned %d. Mail may not have been sent\n", ++ status); ++ ++ log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB, ++ PBS_EVENTCLASS_JOB, ++ mi->jobid, ++ tmpBuf); ++ } + +- free_mail_info(mi); +- free(cmdbuf); ++ // don't leave zombies ++ while (waitpid(-1, &status, WNOHANG) != 0) ++ { ++ // zombie reaped, NO-OP ++ } ++ ++ free_mail_info(mi); ++ free(mailptr); ++ return(NULL); ++ } + ++ /* NOT REACHED */ ++ + return(NULL); + } /* END send_the_mail() */ + +-- +1.8.3.2 + diff --git a/sys-cluster/torque/files/CVE-2013-4495.patch b/sys-cluster/torque/files/CVE-2013-4495.patch new file mode 100644 index 000000000000..41232c07ec72 --- /dev/null +++ b/sys-cluster/torque/files/CVE-2013-4495.patch @@ -0,0 +1,32 @@ +From 8246d967bbcf174482ef01b1bf4920a5944b1011 Mon Sep 17 00:00:00 2001 +From: David Beer <dbeer@adaptivecomputing.com> +Date: Wed, 13 Nov 2013 10:47:48 -0700 +Subject: [PATCH] Use Michael Jenning's patch for CVE 2013-4495 instead of the + original. This one is being used because 2.5 should face the minimal possible + change. + +--- + src/server/svr_mail.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/server/svr_mail.c b/src/server/svr_mail.c +index 26b6dd7..241bdfc 100644 +--- a/src/server/svr_mail.c ++++ b/src/server/svr_mail.c +@@ -372,11 +372,9 @@ void svr_mailowner( + exit(1); + } + +- sprintf(cmdbuf, "%s -f %s %s", +- ++ sprintf(cmdbuf, "%s -t -f %s", + SENDMAIL_CMD, +- mailfrom, +- mailto); ++ mailfrom); + + outmail = (FILE *)popen(cmdbuf, "w"); + +-- +1.8.3.2 + diff --git a/sys-cluster/torque/files/CVE-2014-0749.patch b/sys-cluster/torque/files/CVE-2014-0749.patch new file mode 100644 index 000000000000..52131edcf7e0 --- /dev/null +++ b/sys-cluster/torque/files/CVE-2014-0749.patch @@ -0,0 +1,32 @@ +From 3ed749263abe3d69fa3626d142a5789dcb5a5684 Mon Sep 17 00:00:00 2001 +From: David Beer <dbeer@adaptivecomputing.com> +Date: Fri, 23 Aug 2013 15:53:09 -0600 +Subject: [PATCH] Merge pull request #171 into 2.5-fixes. + +--- + src/lib/Libdis/disrsi_.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/lib/Libdis/disrsi_.c b/src/lib/Libdis/disrsi_.c +index 69edd28..154514c 100644 +--- a/src/lib/Libdis/disrsi_.c ++++ b/src/lib/Libdis/disrsi_.c +@@ -112,6 +112,15 @@ int disrsi_( + if (dis_umaxd == 0) + disiui_(); + ++ if (count >= dis_umaxd) ++ { ++ if (count > dis_umaxd) ++ goto overflow; ++ ++ if (memcmp(scratch, dis_umax, dis_umaxd) > 0) ++ goto overflow; ++ } ++ + switch (c = (*dis_getc)(stream)) + { + +-- +1.8.3.2 + diff --git a/sys-cluster/torque/files/TRQ-2885-limit-tm_adopt-to-only-adopt-a-session-id-t.patch b/sys-cluster/torque/files/TRQ-2885-limit-tm_adopt-to-only-adopt-a-session-id-t.patch new file mode 100644 index 000000000000..63713a0bc16f --- /dev/null +++ b/sys-cluster/torque/files/TRQ-2885-limit-tm_adopt-to-only-adopt-a-session-id-t.patch @@ -0,0 +1,134 @@ +From f2f4c950f3d461a249111c8826da3beaafccace9 Mon Sep 17 00:00:00 2001 +From: Chad Vizino <cvizino@adaptivecomputing.com> +Date: Tue, 23 Sep 2014 17:40:59 -0600 +Subject: [PATCH 1/2] TRQ-2885 - limit tm_adopt() to only adopt a session id + that is owned by the calling user. + +--- + src/cmds/pbs_track.c | 6 ++++++ + src/include/tm.h | 2 +- + src/include/tm_.h | 1 + + src/lib/Libifl/tm.c | 37 ++++++++++++++++++++++++++++++++++--- + 5 files changed, 56 insertions(+), 4 deletions(-) + +diff --git a/src/cmds/pbs_track.c b/src/cmds/pbs_track.c +index 7a90fda..9383ea5 100644 +--- a/src/cmds/pbs_track.c ++++ b/src/cmds/pbs_track.c +@@ -164,6 +164,12 @@ int main( + + break; + ++ case TM_EPERM: ++ ++ fprintf(stderr, "pbs_track: permission denied: %s (%d)\n", ++ pbse_to_txt(rc), ++ rc); ++ + default: + + /* Unexpected error occurred */ +diff --git a/src/include/tm.h b/src/include/tm.h +index 106d3fb..2288828 100644 +--- a/src/include/tm.h ++++ b/src/include/tm.h +@@ -125,7 +125,7 @@ int tm_register(tm_whattodo_t *what, + /* + * DJH 15 Nov 2001. + * Generic "out-of-band" task adoption call for tasks parented by +- * another job management system. Minor security hole? ++ * another job management system. + * Cannot be called with any other tm call. + * 26 Feb 2002. Allows id to be jobid (adoptCmd = TM_ADOPT_JOBID) + * or some altid (adoptCmd = TM_ADOPT_ALTID) +diff --git a/src/include/tm_.h b/src/include/tm_.h +index c9393b9..8cae7b0 100644 +--- a/src/include/tm_.h ++++ b/src/include/tm_.h +@@ -136,6 +136,7 @@ typedef unsigned int tm_task_id; + #define TM_EBADENVIRONMENT 17005 + #define TM_ENOTFOUND 17006 + #define TM_BADINIT 17007 ++#define TM_EPERM 17008 + + #define TM_TODO_NOP 5000 /* Do nothing (the nodes value may be new) */ + #define TM_TODO_CKPT 5001 /* Checkpoint <what> and continue it */ +diff --git a/src/lib/Libifl/iff --git a/src/lib/Libifl/tm.c b/src/lib/Libifl/tm.c +index edb6273..4f38529 100644 +--- a/src/lib/Libifl/tm.c ++++ b/src/lib/Libifl/tm.c +@@ -94,6 +94,7 @@ + #include <errno.h> + #include <assert.h> + #include <sys/types.h> ++#include <sys/stat.h> + #include <sys/socket.h> + #include <sys/time.h> + #include <netinet/in.h> +@@ -169,6 +170,31 @@ typedef struct event_info + static event_info *event_hash[EVENT_HASH]; + + /* ++ * check if the owner of this process matches the owner of pid ++ * returns TRUE if so, FALSE otherwise ++ */ ++bool ispidowner(pid_t pid) ++ { ++ char path[MAXPATHLEN]; ++ struct stat sbuf; ++ ++ /* build path to pid */ ++ snprintf(path, sizeof(path), "/proc/%d", pid); ++ ++ /* do the stat */ ++ /* if it fails, assume not owner */ ++ if (stat(path, &sbuf) != 0) ++ return(FALSE); ++ ++ /* see if caller is the owner of pid */ ++ if (getuid() != sbuf.st_uid) ++ return(FALSE); ++ ++ /* caller is owner */ ++ return(TRUE); ++ } ++ ++/* + ** Find an event number or return a NULL. + */ + event_info *find_event( +@@ -1800,8 +1826,8 @@ tm_poll_error: + * some mpiruns simply use rsh to start remote processes - no AMS + * tracking or management facilities are available. + * +- * This function allows any task (session) to be adopted into a PBS +- * job. It is used by: ++ * This function allows any task (session) owned by the owner ++ * of the job to be adopted into a PBS job. It is used by: + * - "adopter" (which is in turn used by our pvmrun) + * - our rmsloader wrapper (a home-brew replacement for RMS' + * rmsloader that does some work and then exec()s the real +@@ -1835,7 +1861,8 @@ tm_poll_error: + * the mom. Returns TM_ENOTFOUND if the mom couldn't find a job + * with the given RMS resource id. Returns TM_ESYSTEM or + * TM_ENOTCONNECTED if there was some sort of comms error talking +- * to the mom ++ * to the mom. Returns TM_EPERM if an attempt was made to adopt ++ * a session not owned by the owner of the job. + * + * Side effects: + * Sets the tm_* globals to fake values if tm_init() has never +@@ -1860,6 +1887,10 @@ int tm_adopt( + + sid = getsid(pid); + ++ /* do not adopt a sid not owned by caller */ ++ if (!ispidowner(sid)) ++ return(TM_EPERM); ++ + /* Must be the only call to call to tm and + must only be called once */ + +-- +1.8.3.2 + diff --git a/sys-cluster/torque/files/pbs_mom-init.d b/sys-cluster/torque/files/pbs_mom-init.d new file mode 100644 index 000000000000..0bbd899bcf3e --- /dev/null +++ b/sys-cluster/torque/files/pbs_mom-init.d @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the Torque 2.5+ License + +. /etc/conf.d/torque +PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" + +depend() { + need net + after pbs_server + after pbs_sched + after logger +} + +checkconfig() { + for i in "server_name" "mom_priv/config"; do + if [ ! -e ${PBS_SERVER_HOME}/${i} ]; then + eerror "Missing config file ${PBS_SERVER_HOME}/${i}" + return 1 + fi + done +} + +start() { + checkconfig || return 1 + + ebegin "Starting Torque pbs_mom" + local extra_args="" + if [ -n "${PBS_MOM_LOG}" ]; then + extra_args="-L ${PBS_MOM_LOG}" + fi + start-stop-daemon --start -p ${PBS_SERVER_HOME}/mom_priv/mom.lock \ + --exec /usr/sbin/pbs_mom -- -d ${PBS_SERVER_HOME} ${extra_args} + eend ${?} +} + +stop() { + ebegin "Stopping Torque pbs_mom" + /usr/sbin/momctl -s || start-stop-daemon --stop -p ${PBS_SERVER_HOME}/mom_priv/mom.lock + eend ${?} +} + +restart() { + svc_stop + sleep 3 + svc_start +} +# vim:ts=4 diff --git a/sys-cluster/torque/files/pbs_mom-init.d-munge b/sys-cluster/torque/files/pbs_mom-init.d-munge new file mode 100644 index 000000000000..6c84dc647807 --- /dev/null +++ b/sys-cluster/torque/files/pbs_mom-init.d-munge @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the Torque 2.5+ License + +. /etc/conf.d/torque +PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" + +depend() { + local _need="net" + after pbs_server pbs_sched logger + [ ${PBS_USE_MUNGE} -ne 0 ] && _need="${_need} munged" + need ${_need} +} + +checkconfig() { + for i in "server_name" "mom_priv/config"; do + if [ ! -e ${PBS_SERVER_HOME}/${i} ]; then + eerror "Missing config file ${PBS_SERVER_HOME}/${i}" + return 1 + fi + done +} + +start() { + checkconfig || return 1 + + ebegin "Starting Torque pbs_mom" + local extra_args="" + if [ -n "${PBS_MOM_LOG}" ]; then + extra_args="-L ${PBS_MOM_LOG}" + fi + start-stop-daemon --start -p ${PBS_SERVER_HOME}/mom_priv/mom.lock \ + --exec /usr/sbin/pbs_mom -- -d ${PBS_SERVER_HOME} ${extra_args} + eend ${?} +} + +stop() { + ebegin "Stopping Torque pbs_mom" + /usr/sbin/momctl -s || start-stop-daemon --stop -p ${PBS_SERVER_HOME}/mom_priv/mom.lock + eend ${?} +} + +restart() { + svc_stop + sleep 3 + svc_start +} +# vim:ts=4 diff --git a/sys-cluster/torque/files/pbs_sched-init.d b/sys-cluster/torque/files/pbs_sched-init.d new file mode 100644 index 000000000000..72e565a20752 --- /dev/null +++ b/sys-cluster/torque/files/pbs_sched-init.d @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the Torque 2.5+ License + +. /etc/conf.d/torque +PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" + +depend() { + need net + after pbs_server + before pbs_mom + after logger +} + +checkconfig() { + for i in "server_name"; do + if [ ! -e ${PBS_SERVER_HOME}/${i} ]; then + eerror "Missing config file ${PBS_SERVER_HOME}/${i}" + return 1 + fi + done + + if [ -z "$(grep 'queue_type' ${PBS_SERVER_HOME}/server_priv/queues/*)" ]; then + eerror "No queues have been defined yet." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting Torque pbs_sched" + local extra_args="" + if [ -n "${PBS_SCHED_LOG}" ]; then + extra_args="-L ${PBS_SCHED_LOG}" + fi + + start-stop-daemon --start -p ${PBS_SERVER_HOME}/sched_priv/sched.lock \ + --exec /usr/sbin/pbs_sched -- -d ${PBS_SERVER_HOME} ${extra_args} + eend ${?} +} + +stop() { + ebegin "Stopping Torque pbs_sched" + start-stop-daemon --stop -p ${PBS_SERVER_HOME}/sched_priv/sched.lock + eend ${?} +} +# vim:ts=4 diff --git a/sys-cluster/torque/files/pbs_server-init.d b/sys-cluster/torque/files/pbs_server-init.d new file mode 100644 index 000000000000..dd39a97f7159 --- /dev/null +++ b/sys-cluster/torque/files/pbs_server-init.d @@ -0,0 +1,60 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the Torque 2.5+ License + +. /etc/conf.d/torque +PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" + +depend() { + need net + before pbs_sched + before pbs_mom + after logger +} + +checkconfig() { + for i in "server_name" "server_priv/nodes"; do + if [ ! -e "${PBS_SERVER_HOME}/${i}" ]; then + eerror "Missing config file ${PBS_SERVER_HOME}/${i}" + return 1 + fi + done + + if [ ! -e "${PBS_SERVER_HOME}/server_priv/serverdb" ]; then + eerror "Torque has not been fully configured to run." + eerror "Missing ${PBS_SERVER_HOME}/server_priv/serverdb" + return 1 + fi + + if [ -z "$(grep 'queue_type' ${PBS_SERVER_HOME}/server_priv/queues/*)" ]; then + eerror "No queues have been defined yet." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting Torque pbs_server" + local extra_args="" + if [ -n "${PBS_SERVER_LOG}" ]; then + extra_args="-L ${PBS_SERVER_LOG}" + fi + + start-stop-daemon --start -p ${PBS_SERVER_HOME}/server_priv/server.lock \ + --exec /usr/sbin/pbs_server -- -d ${PBS_SERVER_HOME} ${extra_args} + eend ${?} +} + +stop() { + ebegin "Stopping Torque pbs_server" + stop_type="${PBS_SERVER_STOP}" + if [ -z "${stop_type}" ]; then + ewarn "PBS_SERVER_STOP is not defined, defaulting to quick" + stop_type=quick + fi + + /usr/bin/qterm -t ${stop_type} || start-stop-daemon --stop -p ${PBS_SERVER_HOME}/server_priv/server.lock + eend ${?} +} +# vim:ts=4 diff --git a/sys-cluster/torque/files/pbs_server-init.d-munge b/sys-cluster/torque/files/pbs_server-init.d-munge new file mode 100644 index 000000000000..83101a2e2a47 --- /dev/null +++ b/sys-cluster/torque/files/pbs_server-init.d-munge @@ -0,0 +1,61 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the Torque 2.5+ License + +. /etc/conf.d/torque +PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" + +depend() { + local _need="net" + before pbs_sched pbs_mom + after logger + [ ${PBS_USE_MUNGE} -ne 0 ] && _need="${_need} munged" + need ${_need} +} + +checkconfig() { + for i in "server_name" "server_priv/nodes"; do + if [ ! -e "${PBS_SERVER_HOME}/${i}" ]; then + eerror "Missing config file ${PBS_SERVER_HOME}/${i}" + return 1 + fi + done + + if [ ! -e "${PBS_SERVER_HOME}/server_priv/serverdb" ]; then + eerror "Torque has not been fully configured to run." + eerror "Missing ${PBS_SERVER_HOME}/server_priv/serverdb" + return 1 + fi + + if [ -z "$(grep 'queue_type' ${PBS_SERVER_HOME}/server_priv/queues/*)" ]; then + eerror "No queues have been defined yet." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting Torque pbs_server" + local extra_args="" + if [ -n "${PBS_SERVER_LOG}" ]; then + extra_args="-L ${PBS_SERVER_LOG}" + fi + + start-stop-daemon --start -p ${PBS_SERVER_HOME}/server_priv/server.lock \ + --exec /usr/sbin/pbs_server -- -d ${PBS_SERVER_HOME} ${extra_args} + eend ${?} +} + +stop() { + ebegin "Stopping Torque pbs_server" + stop_type="${PBS_SERVER_STOP}" + if [ -z "${stop_type}" ]; then + ewarn "PBS_SERVER_STOP is not defined, defaulting to quick" + stop_type=quick + fi + + /usr/bin/qterm -t ${stop_type} || start-stop-daemon --stop -p ${PBS_SERVER_HOME}/server_priv/server.lock + eend ${?} +} +# vim:ts=4 diff --git a/sys-cluster/torque/files/tcl8.6.patch b/sys-cluster/torque/files/tcl8.6.patch new file mode 100644 index 000000000000..0361dbfead0a --- /dev/null +++ b/sys-cluster/torque/files/tcl8.6.patch @@ -0,0 +1,87 @@ +From 061f15e06d6cf85e951cd321360067de5f0b2ce0 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Thu, 7 Mar 2013 22:33:04 -0500 +Subject: [PATCH] support tcl-8.6 + +--- + src/cmds/qstat.c | 13 +++++++++---- + src/scheduler.tcl/pbs_tclWrap.c | 6 +++--- + 2 files changed, 12 insertions(+), 7 deletions(-) + +diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c +index 5f85de7..7f289ba 100644 +--- a/src/cmds/qstat.c ++++ b/src/cmds/qstat.c +@@ -88,6 +88,11 @@ + #if TCL_QSTAT + #include <sys/stat.h> + #include <tcl.h> ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 ++#define Tcl_GetStringResult(x) x->result ++#define Tcl_GetErrorLine(x) x->errorLine ++#define Tcl_SetResult(x, y, z) x->result = y ++#endif + #if TCLX + #include <tclExtend.h> + #endif +@@ -1856,7 +1861,7 @@ tcl_init(void) + if (Tcl_Init(interp) == TCL_ERROR) + { + fprintf(stderr, "Tcl_Init error: %s", +- interp->result); ++ Tcl_GetStringResult(interp)); + } + + #if TCLX +@@ -1869,7 +1874,7 @@ tcl_init(void) + { + #endif + fprintf(stderr, "Tclx_Init error: %s", +- interp->result); ++ Tcl_GetStringResult(interp)); + } + + #endif /* TCLX */ +@@ -1980,10 +1985,10 @@ void tcl_run( + trace = (char *)Tcl_GetVar(interp, "errorInfo", 0); + + if (trace == NULL) +- trace = interp->result; ++ trace = Tcl_GetStringResult(interp); + + fprintf(stderr, "%s: TCL error @ line %d: %s\n", +- script, interp->errorLine, trace); ++ script, Tcl_GetErrorLine(interp), trace); + } + + Tcl_DeleteInterp(interp); +diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c +index e859ae5..194c24b 100644 +--- a/src/scheduler.tcl/pbs_tclWrap.c ++++ b/src/scheduler.tcl/pbs_tclWrap.c +@@ -924,7 +924,7 @@ char *argv[]; + + if (argc != 2) + { +- sprintf(interp->result, ++ sprintf(Tcl_GetStringResult(interp), + "%s: wrong # args: job_id", argv[0]); + return TCL_ERROR; + } +@@ -936,11 +936,11 @@ char *argv[]; + return TCL_OK; + } + +- interp->result = "0"; ++ Tcl_SetResult(interp, "0", TCL_STATIC); + + if (pbs_rerunjob(connector, argv[1], extend)) + { +- interp->result = "-1"; ++ Tcl_SetResult(interp, "-1", TCL_STATIC); + msg = pbs_geterrmsg(connector); + sprintf(log_buffer, "%s (%d)", msg ? msg : fail, pbs_errno); + log_err(-1, argv[0], log_buffer); +-- +1.7.12.4 + diff --git a/sys-cluster/torque/files/torque-4.1.5.1-tcl8.6.patch b/sys-cluster/torque/files/torque-4.1.5.1-tcl8.6.patch new file mode 100644 index 000000000000..2e8a8ed8f359 --- /dev/null +++ b/sys-cluster/torque/files/torque-4.1.5.1-tcl8.6.patch @@ -0,0 +1,93 @@ + src/cmds/qstat.c | 18 ++++++++++++++++++ + src/scheduler.tcl/pbs_tclWrap.c | 13 +++++++++++++ + 2 files changed, 31 insertions(+) + +diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c +index 4e1c6b6..07ed448 100644 +--- a/src/cmds/qstat.c ++++ b/src/cmds/qstat.c +@@ -1795,8 +1795,13 @@ tcl_init(void) + + if (Tcl_Init(interp) == TCL_ERROR) + { ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + fprintf(stderr, "Tcl_Init error: %s", + interp->result); ++#else ++ fprintf(stderr, "Tcl_Init error: %s", ++ Tcl_GetStringResult(interp)); ++#endif + } + + #if TCLX +@@ -1808,8 +1813,14 @@ tcl_init(void) + if (Tclx_Init(interp) == TCL_ERROR) + { + #endif ++ ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + fprintf(stderr, "Tclx_Init error: %s", + interp->result); ++#else ++ fprintf(stderr, "Tclx_Init error: %s", ++ Tcl_GetStringResult(interp)); ++#endif + } + + #endif /* TCLX */ +@@ -1920,10 +1931,17 @@ void tcl_run( + trace = (char *)Tcl_GetVar(interp, "errorInfo", 0); + + if (trace == NULL) ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + trace = interp->result; + + fprintf(stderr, "%s: TCL error @ line %d: %s\n", + script, interp->errorLine, trace); ++#else ++ trace = Tcl_GetStringResult(interp); ++ ++ fprintf(stderr, "%s: TCL error @ line %d: %s\n", ++ script, Tcl_GetErrorLine(interp), trace); ++#endif + } + + Tcl_DeleteInterp(interp); +diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c +index a85e8ff..46c1012 100644 +--- a/src/scheduler.tcl/pbs_tclWrap.c ++++ b/src/scheduler.tcl/pbs_tclWrap.c +@@ -900,8 +900,13 @@ char *argv[]; + + if (argc != 2) + { ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + sprintf(interp->result, + "%s: wrong # args: job_id", argv[0]); ++#else ++ sprintf(Tcl_GetStringResult(interp), ++ "%s: wrong # args: job_id", argv[0]); ++#endif + return TCL_ERROR; + } + +@@ -912,11 +917,19 @@ char *argv[]; + return TCL_OK; + } + ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + interp->result = "0"; ++#else ++ Tcl_SetResult(interp, "0", TCL_STATIC); ++#endif + + if (pbs_rerunjob_err(connector, argv[1], extend, &local_errno)) + { ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + interp->result = "-1"; ++#else ++ Tcl_SetResult(interp, "-1", TCL_STATIC); ++#endif + msg = pbs_geterrmsg(connector); + sprintf(log_buffer, "%s (%d)", msg ? msg : fail, local_errno); + log_err(-1, argv[0], log_buffer); diff --git a/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch b/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch new file mode 100644 index 000000000000..3a2a28ce4a2b --- /dev/null +++ b/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch @@ -0,0 +1,99 @@ + src/cmds/qstat.c | 20 +++++++++++++++++++- + src/scheduler.tcl/pbs_tclWrap.c | 13 +++++++++++++ + 2 files changed, 32 insertions(+), 1 deletion(-) + +diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c +index f275cf8..23414b8 100644 +--- a/src/cmds/qstat.c ++++ b/src/cmds/qstat.c +@@ -2203,8 +2203,13 @@ tcl_init(void) + + if (Tcl_Init(interp) == TCL_ERROR) + { ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + fprintf(stderr, "Tcl_Init error: %s", + interp->result); ++#else ++ fprintf(stderr, "Tcl_Init error: %s", ++ Tcl_GetStringResult(interp)); ++#endif + } + + #if TCLX +@@ -2216,8 +2221,14 @@ tcl_init(void) + if (Tclx_Init(interp) == TCL_ERROR) + { + #endif ++ ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + fprintf(stderr, "Tclx_Init error: %s", + interp->result); ++#else ++ fprintf(stderr, "Tclx_Init error: %s", ++ Tcl_GetStringResult(interp)); ++#endif + } + + #endif /* TCLX */ +@@ -2328,15 +2339,22 @@ void tcl_run( + + if (f_opt && Tcl_EvalFile(interp, script) != TCL_OK) + { +- char *trace; ++ const char *trace; + + trace = (char *)Tcl_GetVar(interp, "errorInfo", 0); + + if (trace == NULL) ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + trace = interp->result; + + fprintf(stderr, "%s: TCL error @ line %d: %s\n", + script, interp->errorLine, trace); ++#else ++ trace = Tcl_GetStringResult(interp); ++ ++ fprintf(stderr, "%s: TCL error @ line %d: %s\n", ++ script, Tcl_GetErrorLine(interp), trace); ++#endif + } + + Tcl_DeleteInterp(interp); +diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c +index 3eea0b0..7d0d610 100644 +--- a/src/scheduler.tcl/pbs_tclWrap.c ++++ b/src/scheduler.tcl/pbs_tclWrap.c +@@ -935,8 +935,13 @@ int PBS_ReRun( + + if (argc != 2) + { ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + sprintf(interp->result, + "%s: wrong # args: job_id", argv[0]); ++#else ++ Tcl_SetObjResult(interp, Tcl_ObjPrintf( ++ "%s: wrong # args: job_id", argv[0])); ++#endif + return TCL_ERROR; + } + +@@ -947,11 +952,19 @@ int PBS_ReRun( + return TCL_OK; + } + ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + interp->result = strdup("0"); ++#else ++ Tcl_SetResult(interp, "0", TCL_STATIC); ++#endif + + if (pbs_rerunjob_err(connector, strdup(argv[1]), extend, &local_errno)) + { ++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 + interp->result = strdup("-1"); ++#else ++ Tcl_SetResult(interp, "-1", TCL_STATIC); ++#endif + msg = pbs_geterrmsg(connector); + sprintf(log_buffer, "%s (%d)", msg ? msg : fail, local_errno); + log_err(-1, argv[0], log_buffer); diff --git a/sys-cluster/torque/files/torque-conf.d b/sys-cluster/torque/files/torque-conf.d new file mode 100644 index 000000000000..a6e6b08beace --- /dev/null +++ b/sys-cluster/torque/files/torque-conf.d @@ -0,0 +1,14 @@ +# The default logging takes place in $PBS_SERVER_HOME/<mom/server/sched>_priv. +# If you'd like to change that, use the following per service. +PBS_SERVER_LOG=/var/log/pbs_server.log +PBS_MOM_LOG=/var/log/pbs_mom.log +PBS_SCHED_LOG=/var/log/pbs_sched.log + + +# There are a number of ways to stop the pbs server. For more details, man qterm +# At the time of writing, checkpoint is probably not working. +# immediate: All jobs are killed. +# delay: Checkpoint, rerun or wait for jobs to finish before stopping +# quick: Remember running jobs, and let them run without interaction with pbs_server. +# This is the default action +PBS_SERVER_STOP=quick diff --git a/sys-cluster/torque/files/torque-conf.d-munge b/sys-cluster/torque/files/torque-conf.d-munge new file mode 100644 index 000000000000..a8456d526d46 --- /dev/null +++ b/sys-cluster/torque/files/torque-conf.d-munge @@ -0,0 +1,18 @@ +# The default logging takes place in $PBS_SERVER_HOME/<mom/server/sched>_priv. +# If you'd like to change that, use the following per service. +PBS_SERVER_LOG=/var/log/pbs_server.log +PBS_MOM_LOG=/var/log/pbs_mom.log +PBS_SCHED_LOG=/var/log/pbs_sched.log + + +# There are a number of ways to stop the pbs server. For more details, man qterm +# At the time of writing, checkpoint is probably not working. +# immediate: All jobs are killed. +# delay: Checkpoint, rerun or wait for jobs to finish before stopping +# quick: Remember running jobs, and let them run without interaction with pbs_server. +# This is the default action +PBS_SERVER_STOP=quick + +# Use munge auth by default. This causes all pbs service to require +# the munge service. Set to non-zero to enable. +PBS_USE_MUNGE=0 diff --git a/sys-cluster/torque/files/torque-env.d b/sys-cluster/torque/files/torque-env.d new file mode 100644 index 000000000000..40a08c016dee --- /dev/null +++ b/sys-cluster/torque/files/torque-env.d @@ -0,0 +1,7 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the Torque 2.5+ License + +# Configuration files that are included in the initial Torque install +PBS_SERVER_HOME="/var/spool/torque" +CONFIG_PROTECT="/var/spool/torque" + diff --git a/sys-cluster/torque/files/trqauthd-init.d b/sys-cluster/torque/files/trqauthd-init.d new file mode 100644 index 000000000000..b7896d6af7ef --- /dev/null +++ b/sys-cluster/torque/files/trqauthd-init.d @@ -0,0 +1,27 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net + after logger + + # 4.0+ only, make sure we run before the other torque services + before pbs_mom + before pbs_sched + before pbs_server +} + +start() { + start-stop-daemon \ + --start \ + --exec /usr/sbin/trqauthd +} + +stop() { + start-stop-daemon \ + --stop \ + --exec /usr/sbin/trqauthd +} + diff --git a/sys-cluster/torque/metadata.xml b/sys-cluster/torque/metadata.xml new file mode 100644 index 000000000000..703f1e22fac4 --- /dev/null +++ b/sys-cluster/torque/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>jsbronder@gentoo.org</email> + </maintainer> + <use> + <flag name="cpusets">Enable pbs_mom to utilize linux cpusets if available</flag> + <flag name="drmaa">Enable the Distributed Resource Management Application API</flag> + <flag name="munge">Enable authentication via munge</flag> + <flag name="nvidia">Enable management of Nvidia GPUs</flag> + <flag name="server">Enable compilation of pbs_server and pbs_sched</flag> + </use> +</pkgmetadata> diff --git a/sys-cluster/torque/torque-2.5.13.ebuild b/sys-cluster/torque/torque-2.5.13.ebuild new file mode 100644 index 000000000000..252ac35161fc --- /dev/null +++ b/sys-cluster/torque/torque-2.5.13.ebuild @@ -0,0 +1,252 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools-utils eutils flag-o-matic linux-info + +DESCRIPTION="Resource manager and queuing system based on OpenPBS" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque" +SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=1643 -> ${P}.tar.gz" + +LICENSE="torque-2.5" + +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86" +IUSE="cpusets +crypt doc drmaa kernel_linux munge server static-libs +syslog threads tk xml" + +# ed is used by makedepend-sh +DEPEND_COMMON="sys-libs/ncurses + sys-libs/readline + munge? ( sys-auth/munge ) + tk? ( dev-lang/tk ) + syslog? ( virtual/logger ) + !games-util/qstat" + +DEPEND="${DEPEND_COMMON} + sys-apps/ed + !sys-cluster/slurm" + +RDEPEND="${DEPEND_COMMON} + crypt? ( net-misc/openssh ) + !crypt? ( net-misc/netkit-rsh )" + +DOCS=( Release_Notes ) + +AUTOTOOLS_IN_SOURCE_BUILD=1 + +pkg_setup() { + PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/torque}" + + # Find a Torque server to use. Check environment, then + # current setup (if any), and fall back on current hostname. + if [ -z "${PBS_SERVER_NAME}" ]; then + if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then + PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)" + else + PBS_SERVER_NAME=$(hostname -f) + fi + fi + + USE_CPUSETS="--disable-cpuset" + if use cpusets; then + if ! use kernel_linux; then + einfo + elog " Torque currently only has support for cpusets in linux." + elog "Assuming you didn't really want this USE flag." + einfo + else + linux-info_pkg_setup + einfo + elog " Torque support for cpusets is still in development, you may" + elog "wish to disable it for production use." + einfo + if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then + einfo + elog " Torque support for cpusets will require that you recompile" + elog "your kernel with CONFIG_CPUSETS enabled." + einfo + fi + USE_CPUSETS="--enable-cpuset" + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/CVE-2013-4319-2.x-root-submit-fix.patch + epatch "${FILESDIR}"/tcl8.6.patch + + # 510726 + epatch "${FILESDIR}"/CVE-2014-0749.patch + + # 491270 + epatch "${FILESDIR}"/CVE-2013-4495.patch + + # Unused and causes breakage when switching from glibc to tirpc. + # https://github.com/adaptivecomputing/torque/pull/148 + sed -i '/rpc\/rpc\.h/d' src/lib/Libnet/net_client.c || die +} + +src_configure() { + local myeconfargs=( --with-rcp=mom_rcp ) + + use crypt && myeconfargs=( --with-rcp=scp ) + + myeconfargs+=( + $(use_enable tk gui) + $(use_enable tk tcl-qstat) + $(use_enable syslog) + $(use_enable server) + $(use_enable drmaa) + $(use_enable threads high-availability) + $(use_enable xml server-xml) + $(use_enable munge munge-library) + --with-server-home=${PBS_SERVER_HOME} + --with-environ=/etc/pbs_environment + --with-default-server=${PBS_SERVER_NAME} + --disable-gcc-warnings + --with-tcp-retry-limit=2 + ${USE_CPUSETS} + ) + autotools-utils_src_configure +} + +# WARNING +# OpenPBS is extremely stubborn about directory permissions. Sometimes it will +# just fall over with the error message, but in some spots it will just ignore +# you and fail strangely. Likewise it also barfs on our .keep files! +pbs_createspool() { + local root="$1" + local s="$(dirname "${PBS_SERVER_HOME}")" + local h="${PBS_SERVER_HOME}" + local sp="${h}/server_priv" + einfo "Building spool directory under ${D}${h}" + local a d m + local dir_spec=" + 0755:${h}/aux 0700:${h}/checkpoint + 0755:${h}/mom_logs 0751:${h}/mom_priv 0751:${h}/mom_priv/jobs + 1777:${h}/spool 1777:${h}/undelivered" + + if use server; then + dir_spec="${dir_spec} 0755:${h}/sched_logs + 0755:${h}/sched_priv/accounting 0755:${h}/server_logs + 0750:${h}/server_priv 0755:${h}/server_priv/accounting + 0750:${h}/server_priv/acl_groups 0750:${h}/server_priv/acl_hosts + 0750:${h}/server_priv/acl_svr 0750:${h}/server_priv/acl_users + 0750:${h}/server_priv/jobs 0750:${h}/server_priv/queues" + fi + + for a in ${dir_spec}; do + d="${a/*:}" + m="${a/:*}" + if [[ ! -d "${root}${d}" ]]; then + install -d -m${m} "${root}${d}" || die + else + chmod ${m} "${root}${d}" || die + fi + # (#149226) If we're running in src_*, then keepdir + if [[ "${root}" = "${D}" ]]; then + keepdir ${d} + fi + done +} + +src_install() { + # Make directories first + pbs_createspool "${D}" + + autotools-utils_src_install + + use doc && dodoc doc/admin_guide.ps doc/*.pdf + + # The build script isn't alternative install location friendly, + # So we have to fix some hard-coded paths in tclIndex for xpbs* to work + for file in `find "${D}" -iname tclIndex`; do + sed -e "s/${D//\// }/ /" "${file}" > "${file}.new" + mv "${file}.new" "${file}" || die + done + + if use server; then + newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server + newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched + fi + newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom + newconfd "${FILESDIR}"/torque-conf.d-munge torque + newenvd "${FILESDIR}"/torque-env.d 25torque +} + +pkg_preinst() { + if [[ -f "${ROOT}etc/pbs_environment" ]]; then + cp "${ROOT}etc/pbs_environment" "${D}"/etc/pbs_environment || die + fi + + echo "${PBS_SERVER_NAME}" > "${D}${PBS_SERVER_HOME}/server_name" || die + + # Fix up the env.d file to use our set server home. + sed -i \ + "s:/var/spool/torque:${PBS_SERVER_HOME}:g" "${D}"/etc/env.d/25torque \ + || die + + if use munge; then + sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/torque || die + fi +} + +pkg_postinst() { + pbs_createspool "${ROOT}" + elog " If this is the first time torque has been installed, then you are not" + elog "ready to start the server. Please refer to the documentation located at:" + elog "http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki" + echo + elog " For a basic setup, you may use emerge --config ${PN}" +} + +# root will be setup as the primary operator/manager, the local machine +# will be added as a node and we'll create a simple queue, batch. +pkg_config() { + local h="$(echo "${ROOT}/${PBS_SERVER_HOME}" | sed 's:///*:/:g')" + local rc=0 + + ebegin "Configuring Torque" + einfo "Using ${h} as the pbs homedir" + einfo "Using ${PBS_SERVER_NAME} as the pbs_server" + + # Check for previous configuration and bail if found. + if [ -e "${h}/server_priv/acl_svr/operators" ] \ + || [ -e "${h}/server_priv/nodes" ] \ + || [ -e "${h}/mom_priv/config" ]; then + ewarn "Previous Torque configuration detected. Press Enter to" + ewarn "continue or Control-C to abort now" + read + fi + + # pbs_mom configuration. + echo "\$pbsserver ${PBS_SERVER_NAME}" > "${h}/mom_priv/config" || die + echo "\$logevent 255" >> "${h}/mom_priv/config" || die + + if use server; then + local qmgr="${ROOT}/usr/bin/qmgr -c" + # pbs_server bails on repeated backslashes. + if ! "${ROOT}"/usr/sbin/pbs_server -f -d "${h}" -t create; then + eerror "Failed to start pbs_server" + rc=1 + else + ${qmgr} "set server operators = root@$(hostname -f)" ${PBS_SERVER_NAME} \ + && ${qmgr} "create queue batch" ${PBS_SERVER_NAME} \ + && ${qmgr} "set queue batch queue_type = Execution" ${PBS_SERVER_NAME} \ + && ${qmgr} "set queue batch started = True" ${PBS_SERVER_NAME} \ + && ${qmgr} "set queue batch enabled = True" ${PBS_SERVER_NAME} \ + && ${qmgr} "set server default_queue = batch" ${PBS_SERVER_NAME} \ + && ${qmgr} "set server resources_default.nodes = 1" ${PBS_SERVER_NAME} \ + && ${qmgr} "set server scheduling = True" ${PBS_SERVER_NAME} \ + || die + + "${ROOT}"/usr/bin/qterm -t quick ${PBS_SERVER_NAME} || rc=1 + + # Add the local machine as a node. + echo "$(hostname -f) np=1" > "${h}/server_priv/nodes" || die + fi + fi + eend ${rc} +} diff --git a/sys-cluster/torque/torque-4.1.7.ebuild b/sys-cluster/torque/torque-4.1.7.ebuild new file mode 100644 index 000000000000..ea148c3c701d --- /dev/null +++ b/sys-cluster/torque/torque-4.1.7.ebuild @@ -0,0 +1,229 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit flag-o-matic eutils linux-info + +DESCRIPTION="Resource manager and queuing system based on OpenPBS" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque" +# TODO: hopefully moving to github tags soon +# http://www.supercluster.org/pipermail/torquedev/2013-May/004519.html +SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=1690 -> ${P}.tar.gz" + +LICENSE="torque-2.5" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86" +IUSE="cpusets +crypt doc drmaa kernel_linux munge nvidia server +syslog tk" + +DEPEND_COMMON=" + sys-libs/ncurses + sys-libs/readline + cpusets? ( sys-apps/hwloc ) + munge? ( sys-auth/munge ) + nvidia? ( >=x11-drivers/nvidia-drivers-275 ) + tk? ( dev-lang/tk ) + syslog? ( virtual/logger ) + !games-util/qstat" + +DEPEND="${DEPEND_COMMON} + !sys-cluster/slurm" + +RDEPEND="${DEPEND_COMMON} + crypt? ( net-misc/openssh ) + !crypt? ( net-misc/netkit-rsh ) + !dev-libs/uthash" + +# Torque should depend on dev-libs/uthash but that's pretty much impossible +# to patch in as they ship with a broken configure such that files referenced +# by the configure.ac and Makefile.am are missing. +# http://www.supercluster.org/pipermail/torquedev/2014-October/004773.html + +pkg_setup() { + PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/${PN}}" + + # Find a Torque server to use. Check environment, then + # current setup (if any), and fall back on current hostname. + if [ -z "${PBS_SERVER_NAME}" ]; then + if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then + PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)" + else + PBS_SERVER_NAME=$(hostname -f) + fi + fi + + USE_CPUSETS="--disable-cpuset" + if use cpusets; then + if ! use kernel_linux; then + einfo + elog " Torque currently only has support for cpusets in linux." + elog "Assuming you didn't really want this USE flag." + einfo + else + linux-info_pkg_setup + if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then + einfo + elog " Torque support for cpusets will require that you recompile" + elog "your kernel with CONFIG_CPUSETS enabled." + einfo + fi + USE_CPUSETS="--enable-cpuset" + fi + fi +} + +src_prepare() { + # Unused and causes breakage when switching from glibc to tirpc. + # https://github.com/adaptivecomputing/torque/pull/148 + sed -i '/rpc\/rpc\.h/d' src/lib/Libnet/net_client.c || die + + # We install to a valid location, no need to muck with ld.so.conf + # --without-loadlibfile is supposed to do this for us... + sed -i '/mk_default_ld_lib_file || return 1/d' buildutils/pbs_mkdirs.in || die + + epatch "${FILESDIR}"/${PN}-4.1.5.1-tcl8.6.patch + + # 491270 + epatch "${FILESDIR}"/CVE-2013-4495.4.1.patch +} + +src_configure() { + local myconf="--with-rcp=mom_rcp" + + use crypt && myconf="--with-rcp=scp" + + econf \ + $(use_enable tk gui) \ + $(use_enable syslog) \ + $(use_enable server) \ + $(use_enable drmaa) \ + $(use_enable munge munge-auth) \ + $(use_enable nvidia nvidia-gpus) \ + --with-server-home=${PBS_SERVER_HOME} \ + --with-environ=/etc/pbs_environment \ + --with-default-server=${PBS_SERVER_NAME} \ + --disable-gcc-warnings \ + --with-tcp-retry-limit=2 \ + --without-loadlibfile \ + ${USE_CPUSETS} \ + ${myconf} +} + +src_install() { + local dir + + DOCS=( CHANGELOG README.* Release_Notes ) + use doc && DOCS+=( doc/admin_guide.ps doc/*.pdf ) + + default + + # The build script isn't alternative install location friendly, + # So we have to fix some hard-coded paths in tclIndex for xpbs* to work + for file in $(find "${ED}" -iname tclIndex); do + sed \ + -e "s/${ED//\// }/ /" \ + -i "${file}" || die + done + + for dir in $(find "${ED}/${PBS_SERVER_HOME}" -type d); do + keepdir "${dir#${ED}}" + done + + if use server; then + newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server + newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched + fi + newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom + newconfd "${FILESDIR}"/${PN}-conf.d-munge ${PN} + newinitd "${FILESDIR}"/trqauthd-init.d trqauthd + newenvd "${FILESDIR}"/${PN}-env.d 25${PN} +} + +pkg_preinst() { + if [[ -f "${ROOT}etc/pbs_environment" ]]; then + cp "${ROOT}etc/pbs_environment" "${ED}"/etc/pbs_environment || die + fi + + if use server && [[ -f "${ROOT}${PBS_SERVER_HOME}/server_priv/nodes" ]]; then + cp \ + "${EROOT}${PBS_SERVER_HOME}/server_priv/nodes" \ + "${ED}/${PBS_SERVER_HOME}/server_priv/nodes" || die + fi + + echo "${PBS_SERVER_NAME}" > "${ED}${PBS_SERVER_HOME}/server_name" || die + + # Fix up the env.d file to use our set server home. + sed \ + -e "s:/var/spool/${PN}:${PBS_SERVER_HOME}:g" \ + -i "${ED}"/etc/env.d/25${PN} || die + + if use munge; then + sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${ED}"/etc/conf.d/${PN} || die + fi +} + +pkg_postinst() { + elog " If this is the first time torque has been installed, then you are not" + elog "ready to start the server. Please refer to the documentation located at:" + elog "http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki" + echo "" + elog " For a basic setup, you may use emerge --config ${PN}" + echo "" + if [[ -z "${REPLACING_VERSIONS}" ]] || [[ ${REPLACING_VERSIONS} < 4 ]]; then + elog "Important 4.0+ updates" + elog " - The on-wire protocol version has been changed." + elog " Versions of Torque before 4.0.0 are no longer able to communicate." + elog " - pbs_iff has been replaced by trqauthd, you will now need to add" + elog " trqauthd to your default runlevel." + fi +} + +# root will be setup as the primary operator/manager, the local machine +# will be added as a node and we'll create a simple queue, batch. +pkg_config() { + local h="$(echo "${ROOT}/${PBS_SERVER_HOME}" | sed 's:///*:/:g')" + local rc=0 + + ebegin "Configuring Torque" + einfo "Using ${h} as the pbs homedir" + einfo "Using ${PBS_SERVER_NAME} as the pbs_server" + + # Check for previous configuration and bail if found. + if [ -e "${h}/server_priv/acl_svr/operators" ] \ + || [ -e "${h}/server_priv/nodes" ] \ + || [ -e "${h}/mom_priv/config" ]; then + ewarn "Previous Torque configuration detected. Press Enter to" + ewarn "continue or Control-C to abort now" + read + fi + + # pbs_mom configuration. + echo "\$pbsserver ${PBS_SERVER_NAME}" > "${h}/mom_priv/config" || die + echo "\$logevent 255" >> "${h}/mom_priv/config" || die + + if use server; then + local qmgr="${EROOT}/usr/bin/qmgr -c" + # pbs_server bails on repeated backslashes. + if ! "${EROOT}"/usr/sbin/pbs_server -f -d "${h}" -t create; then + eerror "Failed to start pbs_server" + rc=1 + else + ${qmgr} "set server operators = root@$(hostname -f)" ${PBS_SERVER_NAME} \ + && ${qmgr} "create queue batch" ${PBS_SERVER_NAME} \ + && ${qmgr} "set queue batch queue_type = Execution" ${PBS_SERVER_NAME} \ + && ${qmgr} "set queue batch started = True" ${PBS_SERVER_NAME} \ + && ${qmgr} "set queue batch enabled = True" ${PBS_SERVER_NAME} \ + && ${qmgr} "set server default_queue = batch" ${PBS_SERVER_NAME} \ + && ${qmgr} "set server resources_default.nodes = 1" ${PBS_SERVER_NAME} \ + && ${qmgr} "set server scheduling = True" ${PBS_SERVER_NAME} \ + || die + + "${EROOT}"/usr/bin/qterm -t quick ${PBS_SERVER_NAME} || rc=1 + + # Add the local machine as a node. + echo "$(hostname -f) np=1" > "${h}/server_priv/nodes" || die + fi + fi + eend ${rc} +} diff --git a/sys-cluster/torque/torque-4.2.9-r4.ebuild b/sys-cluster/torque/torque-4.2.9-r4.ebuild new file mode 100644 index 000000000000..372a4a12c68d --- /dev/null +++ b/sys-cluster/torque/torque-4.2.9-r4.ebuild @@ -0,0 +1,178 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit flag-o-matic eutils linux-info + +DESCRIPTION="Resource manager and queuing system based on OpenPBS" +HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque" +# TODO: hopefully moving to github tags soon +# http://www.supercluster.org/pipermail/torquedev/2013-May/004519.html +SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=2849 -> ${P}.tar.gz" + +LICENSE="torque-2.5" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="cpusets +crypt doc drmaa kernel_linux munge nvidia server +syslog tk" + +DEPEND_COMMON=" + sys-libs/ncurses + sys-libs/readline:* + cpusets? ( sys-apps/hwloc ) + munge? ( sys-auth/munge ) + nvidia? ( >=x11-drivers/nvidia-drivers-275 ) + tk? ( dev-lang/tk:0 ) + syslog? ( virtual/logger ) + !games-util/qstat" + +DEPEND="${DEPEND_COMMON} + !sys-cluster/slurm" + +RDEPEND="${DEPEND_COMMON} + crypt? ( net-misc/openssh ) + !crypt? ( net-misc/netkit-rsh ) + !dev-libs/uthash" + +# Torque should depend on dev-libs/uthash but that's pretty much impossible +# to patch in as they ship with a broken configure such that files referenced +# by the configure.ac and Makefile.am are missing. +# http://www.supercluster.org/pipermail/torquedev/2014-October/004773.html + +pkg_setup() { + PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/${PN}}" + + # Find a Torque server to use. Check environment, then + # current setup (if any), and fall back on current hostname. + if [ -z "${PBS_SERVER_NAME}" ]; then + if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then + PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)" + else + PBS_SERVER_NAME=$(hostname -f) + fi + fi + + USE_CPUSETS="--disable-cpuset" + if use cpusets; then + if ! use kernel_linux; then + einfo + elog " Torque currently only has support for cpusets in linux." + elog "Assuming you didn't really want this USE flag." + einfo + else + linux-info_pkg_setup + if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then + einfo + elog " Torque support for cpusets will require that you recompile" + elog "your kernel with CONFIG_CPUSETS enabled." + einfo + fi + USE_CPUSETS="--enable-cpuset" + fi + fi +} + +src_prepare() { + # Unused and causes breakage when switching from glibc to tirpc. + # https://github.com/adaptivecomputing/torque/pull/148 + sed -i '/rpc\/rpc\.h/d' src/lib/Libnet/net_client.c || die + + # We install to a valid location, no need to muck with ld.so.conf + # --without-loadlibfile is supposed to do this for us... + sed -i '/mk_default_ld_lib_file || return 1/d' buildutils/pbs_mkdirs.in || die + + epatch "${FILESDIR}"/${P}-tcl8.6.patch + + # 524362 + epatch "${FILESDIR}"/TRQ-2885-limit-tm_adopt-to-only-adopt-a-session-id-t.patch +} + +src_configure() { + local myconf="--with-rcp=mom_rcp" + + use crypt && myconf="--with-rcp=scp" + + econf \ + $(use_enable tk gui) \ + $(use_enable syslog) \ + $(use_enable server) \ + $(use_enable drmaa) \ + $(use_enable munge munge-auth) \ + $(use_enable nvidia nvidia-gpus) \ + --with-server-home=${PBS_SERVER_HOME} \ + --with-environ=/etc/pbs_environment \ + --with-default-server=${PBS_SERVER_NAME} \ + --disable-gcc-warnings \ + --with-tcp-retry-limit=2 \ + --without-loadlibfile \ + ${USE_CPUSETS} \ + ${myconf} +} + +src_install() { + local dir + + DOCS=( CHANGELOG README.* Release_Notes ) + use doc && DOCS+=( doc/admin_guide.ps doc/*.pdf ) + + default + + # The build script isn't alternative install location friendly, + # So we have to fix some hard-coded paths in tclIndex for xpbs* to work + for file in $(find "${ED}" -iname tclIndex); do + sed \ + -e "s/${ED//\// }/ /" \ + -i "${file}" || die + done + + for dir in $(find "${ED}/${PBS_SERVER_HOME}" -type d); do + keepdir "${dir#${ED}}" + done + + if use server; then + newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server + newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched + fi + newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom + newconfd "${FILESDIR}"/${PN}-conf.d-munge ${PN} + newinitd "${FILESDIR}"/trqauthd-init.d trqauthd + newenvd "${FILESDIR}"/${PN}-env.d 25${PN} +} + +pkg_preinst() { + if [[ -f "${ROOT}etc/pbs_environment" ]]; then + cp "${ROOT}etc/pbs_environment" "${ED}"/etc/pbs_environment || die + fi + + if use server && [[ -f "${ROOT}${PBS_SERVER_HOME}/server_priv/nodes" ]]; then + cp \ + "${EROOT}${PBS_SERVER_HOME}/server_priv/nodes" \ + "${ED}/${PBS_SERVER_HOME}/server_priv/nodes" || die + fi + + echo "${PBS_SERVER_NAME}" > "${ED}${PBS_SERVER_HOME}/server_name" || die + + # Fix up the env.d file to use our set server home. + sed \ + -e "s:/var/spool/${PN}:${PBS_SERVER_HOME}:g" \ + -i "${ED}"/etc/env.d/25${PN} || die + + if use munge; then + sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${ED}"/etc/conf.d/${PN} || die + fi +} + +pkg_postinst() { + elog " If this is the first time torque has been installed, then you are not" + elog "ready to start the server. Please refer to the documentation located at:" + elog "http://docs.adaptivecomputing.com/torque/${PN//./-}/Content/topics/1-installConfig/initializeConfigOnServer.htm" + if [[ -z "${REPLACING_VERSIONS}" ]] || [[ ${REPLACING_VERSIONS} < 4 ]]; then + echo + elog "Important 4.0+ updates" + elog " - The on-wire protocol version has been changed." + elog " Versions of Torque before 4.0.0 are no longer able to communicate." + elog " - pbs_iff has been replaced by trqauthd, you will now need to add" + elog " trqauthd to your default runlevel." + fi +} diff --git a/sys-cluster/util-vserver/Manifest b/sys-cluster/util-vserver/Manifest new file mode 100644 index 000000000000..38bea4643943 --- /dev/null +++ b/sys-cluster/util-vserver/Manifest @@ -0,0 +1,2 @@ +DIST util-vserver-0.30.216-pre3025.tar.bz2 760763 SHA256 6b6df2e96105361e7ede644d522e1cee60fd71ef72715b82e40a4a93ce7ea949 SHA512 5d799a19c8c78b7c2222e0d17490010d065e02e2a49020fb4766a98fb85a59d889881d231a279012935ff3d108706edf71c1e8736390cb9a7ce9af969a716a56 WHIRLPOOL 06e30603ead7d6835b3f70fb2491698619d82b898980529e9190818df76a4a2575f28fc82bc18cda67def2ae43c0e8c4b8038b10f37caf29f41fd029cce8124c +DIST util-vserver-0.30.216-pre3062.tar.bz2 768055 SHA256 efecefa1dbe6abba85c23822916aa67f2a740c66dfd6559f8a2d0afc2fcfb671 SHA512 1002a5d8f0d622445df73908f5f2ef5fab8424ff7134cd58b30680c03eddaacdebda47520c833434dfa6d3750cee79ac03ae9ee1b7f17a305b7ab2672d4f84d3 WHIRLPOOL 28c01f99e7dde6c4f47c23e51e83ea115665fd7ee523b873f12c325bdababea812d7053529c5fe361c1fdd4c726c41ab8ab058cb30bcda5eea29503a160b0b9c diff --git a/sys-cluster/util-vserver/files/bash_completion b/sys-cluster/util-vserver/files/bash_completion new file mode 100644 index 000000000000..73a9fef89f85 --- /dev/null +++ b/sys-cluster/util-vserver/files/bash_completion @@ -0,0 +1,300 @@ +# Completion for the vserver command. Source this file (or on some systems +# add it to ~/.bash_completion and start a new shell) and bash's completion +# mechanism will know all about vserver's options! +# +# Copyright (C) Thomas Champagne <lafeuil@gmail.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The latest version of this software can be obtained here: +# +# http://linux-vserver.org/Vserver+Completion +# +# version 0.4.0 + +have vserver-info && { +: ${UTIL_VSERVER_VARS:=$(vserver-info - SYSINFO |grep prefix: | awk '{ print $2}')/lib/util-vserver/util-vserver-vars} + +test -e "$UTIL_VSERVER_VARS" && { + +. "$UTIL_VSERVER_VARS" +. "$_LIB_FUNCTIONS" + +_vserver() { + local cur cmds cmdOpts cmdMethodOpts helpCmds names names_pipe func i j method + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + + # find available vServers: + # call function getAllVservers in vserver library + getAllVservers names + names_pipe=`echo ${names[@]} | sed 's/ /|/g'` + + # available commands + cmds='start stop restart condrestart suexec exec enter chkconfig \ + running status unify pkg apt-get apt-config apt-cache \ + rpm pkgmgmt delete' + + # options (long and short name) + cmdOpts='--help --version --debug --defaulttty -s --sync -v \ + --verbose --silent --' + + cmdMethodOpts='-m -n --context --confdir --lockfile \ + --hostname --netdev --netbcast --netmask \ + --netprefix --interface --cpuset \ + --cpusetcpus --cpusetmems --cpusetvirt \ + --initstyle --flags --help --' + + # if the previous option is a single option + helpCmds='--help|--version' + if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then + return 0 + fi + + # lookup the vServer name + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then + # found it! + break + fi + done + + #a vserver has been found + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + # Show the vserver command without build + case "${COMP_WORDS[i+1]}" in + start) + COMPREPLY=( $( compgen -W "--rescue --rescue-cmd" -- $cur ) ) + ;; + # No completion for apt-config + stop|restart|condrestart|enter|running|status|apt-config|delete) + ;; + suexec) + # I don't know how to do + COMPREPLY=( $( compgen -W -- $cur ) ) + ;; + exec) + #I don't know how to do + COMPREPLY=( $( compgen -W "" -- $cur ) ) + ;; + unify) + COMPREPLY=( $( compgen -W "-R" -- $cur ) ) + ;; + apt-get|apt-cache) + func=${COMP_WORDS[i+1]} + COMP_WORDS=( ${COMP_WORDS[@]:$((i+1))} ) + COMP_CWORD=$((COMP_CWORD-i-1)) + declare -f _${func//-/_} > /dev/null && _${func//-/_} + ;; + *) + COMPREPLY=( $( compgen -W "$cmds" -- $cur ) ) + ;; + esac + return 0 + else + #no vserver name found + prev=${COMP_WORDS[COMP_CWORD-1]} + + #search the new name of vserver + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do + if [[ ${COMP_WORDS[i]} == !(vserver|-*) ]] ; then + # found it! + break + fi + done + + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + j=$i + i=${#COMP_WORDS[@]} + for (( ; j < ${#COMP_WORDS[@]}-1; j++ )) ; do + if [[ ${COMP_WORDS[j]} == "--" ]]; then + # method's parameter + case "$method" in + legacy|copy) + ;; + apt-rpm) + COMPREPLY=( $( compgen -W "-d" -- $cur ) ) + ;; + yum) + COMPREPLY=( $( compgen -W "-d" -- $cur ) ) + ;; + rpm) + COMPREPLY=( $( compgen -W "-d --empty --force --nodeps" -- $cur ) ) + ;; + skeleton) + ;; + debootstrap) + COMPREPLY=( $( compgen -W "-d -m -s --" -- $cur ) ) + ;; + *) + ;; + esac + return 0 + break + fi + + if [[ ${COMP_WORDS[j]} == @(build|-m) ]]; then + i=$j + if (( $j+1 < ${#COMP_WORDS[@]}-1 )) ; then + method=${COMP_WORDS[j+1]} + fi + fi + done + + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + case $prev in + --help) + ;; + -n|--context|--confdir|--lockfile|--hostname|--netdev|--netbcast|--netmask|--netprefix|--interface|--cpuset|--cpusetcpus|--cpusetmems|--cpusetvirt|--initstyle|--flags) + COMPREPLY=( $( compgen -W "" -- $cur ) ) + ;; + -m) + COMPREPLY=( $( compgen -W "legacy copy apt-rpm yum rpm skeleton debootstrap" -- $cur ) ) + ;; + *) + COMPREPLY=( $( compgen -W "$cmdMethodOpts" -- $cur ) ) + ;; + esac + else + COMPREPLY=( $( compgen -W "build" -- $cur ) ) + fi + else + COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) + fi + + return 0 + fi + + return 0 +} + +complete -F _vserver vserver + +_vapt_rpm_yum() +{ + local cur cmds cmdOpts helpCmds names func i + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + + # options (long and short name) + cmdOpts='--help --version --quiet -q --all' + + # if the previous option is a single option + helpCmds='--help|--version' + + if [[ "${COMP_WORDS[1]}" == "@($helpCmds)" ]] ; then + return 0 + fi + + # search -- + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do + if [[ ${COMP_WORDS[i]} = "--" ]] ; then + # found it! + break + fi + done + + # find available vServers + # call function getAllVservers in vserver library + getAllVservers names + names_pipe=`echo ${names[@]}" --all" | sed 's/ /|/g'` + + if (( $i < ${#COMP_WORDS[@]}-1 )) && (( $i < $COMP_CWORD )) ; then + func=${COMP_WORDS[0]:1} + COMP_WORDS=( $func ${COMP_WORDS[@]:$((i+1))} ) + COMP_CWORD=$((COMP_CWORD-i)) + declare -f _${func//-/_} > /dev/null && _${func//-/_} + else + # search vServer name + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do + if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then + # found it! + break + fi + done + + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + if [[ "${COMP_WORDS[i]}" = "--all" ]] ; then + cmdOpts='--' + COMPREPLY=( $( compgen -W "$cmdOpts" -- $cur ) ) + else + cmdOpts='--' + COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) + fi + else + COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) + fi + fi + + return 0 +} + +_vserver_copy() +{ + local cur prev cmdOpts helpCmds confCmds names names_pipe i + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + + # find available vServers + # call function getAllVservers in vserver library + getAllVservers names + names_pipe=`echo ${names[@]} | sed 's/ /|/g'` + + # options (long and short name) + cmdOpts='--help -h --version -V --verbose -v --quiet -q \ + --vsroot -r --rsh -R --stopstart -s \ + --domain -d --ip -i' + + # if the previous option is a single option + helpCmds='--help|-h|--version|-V' + + if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then + return 0 + fi + + confCmds='--ip|-i|--domain|-d' + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [[ $prev == @($confCmds) ]] ; then + return 0 + fi + + # search a vServer name + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then + # found it! + break + fi + done + + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + return 0 + else + COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) + fi + + return 0 +} + +complete -F _vapt_rpm_yum vapt-get +complete -F _vapt_rpm_yum vrpm +complete -F _vapt_rpm_yum vyum +complete -F _vserver_copy vserver-copy + +} +} diff --git a/sys-cluster/util-vserver/files/util-vserver-0.30.216-varlock.patch b/sys-cluster/util-vserver/files/util-vserver-0.30.216-varlock.patch new file mode 100644 index 000000000000..2597ff5a63a0 --- /dev/null +++ b/sys-cluster/util-vserver/files/util-vserver-0.30.216-varlock.patch @@ -0,0 +1,19 @@ +commit 13a83fe9e08e8667ee42c62d0631ca8ebbed7e89 +Author: Benedikt Böhm <bb@xnull.de> +Date: Sun Feb 10 20:35:06 2013 +0100 + + gentoo: use /var/run for new /run compatibility + +diff --git a/scripts/vserver-init.functions b/scripts/vserver-init.functions +index fef3c82..7feb27d 100755 +--- a/scripts/vserver-init.functions ++++ b/scripts/vserver-init.functions +@@ -27,7 +27,7 @@ elif test -e /etc/gentoo-release; then + success() { eend 0; } + passed() { eend 0; } + failure() { eend 1; } +- lockfile=/var/lock/vservers/$LOCKFILE ++ lockfile=/var/run/$LOCKFILE + else + _beginResult() { echo -n "$@..."; } + _postResult() { :; } diff --git a/sys-cluster/util-vserver/metadata.xml b/sys-cluster/util-vserver/metadata.xml new file mode 100644 index 000000000000..54abb527103a --- /dev/null +++ b/sys-cluster/util-vserver/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer><email>maintainer-needed@gentoo.org</email></maintainer> + <longdescription> + util-vserver is a Linux virtual server utility framework, + allowing an administrator to set up multiple, isolated + virtual servers. It can be used to run various services + securely separated, without requiring special configuration. + Virtual servers are unable to interact with each other, or + the main server. + </longdescription> +</pkgmetadata> diff --git a/sys-cluster/util-vserver/util-vserver-0.30.216_pre3025.ebuild b/sys-cluster/util-vserver/util-vserver-0.30.216_pre3025.ebuild new file mode 100644 index 000000000000..95aa23308726 --- /dev/null +++ b/sys-cluster/util-vserver/util-vserver-0.30.216_pre3025.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils bash-completion-r1 + +MY_P=${P/_/-} +S="${WORKDIR}"/${MY_P} + +DESCRIPTION="Linux-VServer admin utilities" +HOMEPAGE="http://www.nongnu.org/util-vserver/" +SRC_URI="http://people.linux-vserver.org/~dhozac/t/uv-testing/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~sparc x86" + +IUSE="" + +CDEPEND="dev-libs/beecrypt + net-firewall/iptables + net-misc/vconfig + sys-apps/iproute2 + || ( >=sys-apps/coreutils-6.10-r1 sys-apps/mktemp )" + +DEPEND=">=dev-libs/dietlibc-0.33_pre20110403 + ${CDEPEND}" + +RDEPEND="${CDEPEND}" + +pkg_setup() { + if [[ -z "${VDIRBASE}" ]]; then + einfo + einfo "You can change the default vserver base directory (/vservers)" + einfo "by setting the VDIRBASE environment variable." + fi + + : ${VDIRBASE:=/vservers} + + einfo + einfo "Using \"${VDIRBASE}\" as vserver base directory" + einfo +} + +src_test() { + # do not use $D from portage by accident (#297982) + sed -i -e 's/^\$D //' "${S}"/src/testsuite/vunify-test.sh + default +} + +src_configure() { + econf --with-vrootdir=${VDIRBASE} \ + --with-initscripts=gentoo \ + --localstatedir=/var +} + +src_compile() { + emake -j1 || die "emake failed!" +} + +src_install() { + make DESTDIR="${D}" install install-distribution \ + || die "make install failed!" + + # keep dirs + keepdir /var/run/vservers + keepdir /var/run/vservers.rev + keepdir /var/run/vshelper + keepdir /var/lock/vservers + keepdir /var/cache/vservers + keepdir "${VDIRBASE}" + keepdir "${VDIRBASE}"/.pkg + + # bash-completion + newbashcomp "${FILESDIR}"/bash_completion ${PN} + + dodoc README ChangeLog NEWS AUTHORS THANKS util-vserver.spec +} + +pkg_postinst() { + # Create VDIRBASE in postinst, so it is (a) not unmerged and (b) also + # present when merging. + + mkdir -p "${VDIRBASE}" + setattr --barrier "${VDIRBASE}" + + rm /etc/vservers/.defaults/vdirbase + ln -sf "${VDIRBASE}" /etc/vservers/.defaults/vdirbase + + elog + elog "You have to run the vprocunhide command after every reboot" + elog "in order to setup /proc permissions correctly for vserver" + elog "use. An init script has been installed by this package." + elog "To use it you should add it to a runlevel:" + elog + elog " rc-update add vprocunhide default" + elog +} diff --git a/sys-cluster/util-vserver/util-vserver-0.30.216_pre3062.ebuild b/sys-cluster/util-vserver/util-vserver-0.30.216_pre3062.ebuild new file mode 100644 index 000000000000..96af5e621952 --- /dev/null +++ b/sys-cluster/util-vserver/util-vserver-0.30.216_pre3062.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils bash-completion-r1 + +MY_P=${P/_/-} +S="${WORKDIR}"/${MY_P} + +DESCRIPTION="Linux-VServer admin utilities" +HOMEPAGE="http://www.nongnu.org/util-vserver/" +SRC_URI="http://people.linux-vserver.org/~dhozac/t/uv-testing/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~sparc ~x86" + +IUSE="" + +CDEPEND="dev-libs/beecrypt + net-firewall/iptables + net-misc/vconfig + sys-apps/iproute2 + sys-apps/coreutils" + +DEPEND=">dev-libs/dietlibc-0.33 + ${CDEPEND}" + +RDEPEND="${CDEPEND}" + +pkg_setup() { + if [[ -z "${VDIRBASE}" ]]; then + einfo + einfo "You can change the default vserver base directory (/vservers)" + einfo "by setting the VDIRBASE environment variable." + fi + + : ${VDIRBASE:=/vservers} + + einfo + einfo "Using \"${VDIRBASE}\" as vserver base directory" + einfo +} + +src_test() { + # do not use $D from portage by accident (#297982) + sed -i -e 's/^\$D //' "${S}"/src/testsuite/vunify-test.sh + default +} + +src_configure() { + econf --with-vrootdir=${VDIRBASE} \ + --with-initscripts=gentoo \ + --localstatedir=/var +} + +src_compile() { + emake -j1 || die "emake failed!" +} + +src_install() { + make DESTDIR="${D}" install install-distribution \ + || die "make install failed!" + + # keep dirs + keepdir /var/cache/vservers + keepdir "${VDIRBASE}" + keepdir "${VDIRBASE}"/.pkg + + # bash-completion + newbashcomp "${FILESDIR}"/bash_completion ${PN} + + dodoc README ChangeLog NEWS AUTHORS THANKS util-vserver.spec +} + +pkg_postinst() { + # Create VDIRBASE in postinst, so it is (a) not unmerged and (b) also + # present when merging. + + mkdir -p "${VDIRBASE}" + setattr --barrier "${VDIRBASE}" + + rm /etc/vservers/.defaults/vdirbase + ln -sf "${VDIRBASE}" /etc/vservers/.defaults/vdirbase + + elog + elog "You have to run the vprocunhide command after every reboot" + elog "in order to setup /proc permissions correctly for vserver" + elog "use. An init script has been installed by this package." + elog "To use it you should add it to a runlevel:" + elog + elog " rc-update add vprocunhide default" + elog +} diff --git a/sys-cluster/vzctl/Manifest b/sys-cluster/vzctl/Manifest new file mode 100644 index 000000000000..5265376492a1 --- /dev/null +++ b/sys-cluster/vzctl/Manifest @@ -0,0 +1,2 @@ +DIST vzctl-4.9.1.tar.bz2 517940 SHA256 b15f4b4eacd88d2a5e745f556dfe6ae079a77c0d3f0fa818674bc98715ad7d72 SHA512 998882a1f628104a9e0c6a598ee84046fb03da03b7b2ce703396659cf7d7bd0bb67bf1590596e5e43ff1223ef23078fb7cab2228e768e79d3c3136b1ba418e50 WHIRLPOOL feff55376fa5f470627f7fcbd4e9a0c24e04b8575219d33ffa5eb4a67d79e64682975b89fbf06953d4d88044e1771c9dfef3a5b578914900e5f88f59eb2d3895 +DIST vzctl-4.9.2.tar.bz2 549613 SHA256 a345719d47e8a3f96c5af4c86b58a9677848eee6f4777403b447eff2c9320cae SHA512 c2ab45eb8f8f80c8b044f652c68c1c816b3df85f3aca5fe33b385dea4b6addeb8e6ebe6232342454efc4c683e8433149828dffdbcb181af6bfcb68d8b5a86ef1 WHIRLPOOL 42919c1096133250787996071f1d16e0d6bce542760c58a4d6af019960b6db7df4636d0735f21ffda95032fbabb4cf6709da532bee96e9e7775bf665049cbc46 diff --git a/sys-cluster/vzctl/files/vzctl-initscript-paths.patch b/sys-cluster/vzctl/files/vzctl-initscript-paths.patch new file mode 100644 index 000000000000..8fc0b12009b4 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-initscript-paths.patch @@ -0,0 +1,142 @@ +From: Kir Kolyshkin <kir@openvz.org> +Date: Thu, 3 Jan 2013 19:37:00 +0000 (-0800) +Subject: init.d/vz-gentoo: don't call tools by absolute path +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=2fc34ffb5f5e;hp=9a4a85397f7dd99e2c4059de7fb6ef5d750242c5 + +init.d/vz-gentoo: don't call tools by absolute path + +Apparently in recent Gentoo the ip tool was moved from /sbin to /bin, +so this initscript stopped working. + +Apparently runscript makes sure all the needed directories are in PATH +(I have tested with runscript from baselayout-1.12.11.1, pretty old one) +so we can just drop the /sbin/ prefix. + +While at it, do it not only for ip, but also for modprobe and sysctl. + +http://bugzilla.openvz.org/2477 +https://bugs.gentoo.org/show_bug.cgi?id=444201 + +Reported-by: Andrei Vinogradov <spamslepnoga@inbox.ru> +Reported-by: Joakim <moonwalker@astro.nu> +Signed-off-by: Kir Kolyshkin <kir@openvz.org> +--- + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index 2dd2186..51231bc 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -87,7 +87,7 @@ start_net() { + + # load necessary modules + for mod in ${NET_MODULES}; do +- /sbin/modprobe ${mod} 2>/dev/null ++ modprobe ${mod} 2>/dev/null + done + + if [ ! -f ${VZVEINFO} ]; then +@@ -95,22 +95,22 @@ start_net() { + fi + + # we don't operate on a running interface +- if /sbin/ip addr list | grep -q "venet0:.*UP" 2>/dev/null; then ++ if ip addr list | grep -q "venet0:.*UP" 2>/dev/null; then + return 0 + fi + + # configure the device + ebegin "Bringing up interface ${VZDEV}" +- /sbin/ip link set ${VZDEV} up ++ ip link set ${VZDEV} up + eend $? + +- /sbin/ip addr add 0.0.0.0/0 dev ${VZDEV} ++ ip addr add 0.0.0.0/0 dev ${VZDEV} + + ebegin "Configuring interface ${VZDEV}" +- /sbin/sysctl -q -w net.ipv4.conf.${VZDEV}.send_redirects=0 ++ sysctl -q -w net.ipv4.conf.${VZDEV}.send_redirects=0 + eend $? + +- if [ "x$(/sbin/sysctl -n -e net.ipv4.ip_forward)" != "x1" ]; then ++ if [ "x$(sysctl -n -e net.ipv4.ip_forward)" != "x1" ]; then + ewarn "It looks like you have ip forwarding disabled. To make networking" + ewarn "available for containers, please, run sysctl -w net.ipv4.ip_forward=1" + fi +@@ -119,15 +119,15 @@ start_net() { + stop_net() { + local mod + +- if /sbin/ip addr list | grep -q "venet0:.*UP" 2>/dev/null; then ++ if ip addr list | grep -q "venet0:.*UP" 2>/dev/null; then + ebegin "Bringing down interface ${VZDEV}" +- /sbin/ip link set ${VZDEV} down 2>/dev/null ++ ip link set ${VZDEV} down 2>/dev/null + eend $? + fi + + # remove all modules we probably loaded on start_net + for mod in ${NET_MODULES}; do +- /sbin/modprobe -r ${mod} > /dev/null 2>&1 ++ modprobe -r ${mod} > /dev/null 2>&1 + done + } + +@@ -146,7 +146,7 @@ start_ve() { + # Then sort by bootorder + test -n "$velist" && velist=$(vzlist -aH -octid -s-bootorder $velist) + +- /sbin/sysctl -q -w net.ipv4.route.src_check=0 ++ sysctl -q -w net.ipv4.route.src_check=0 + + for veid in ${velist}; do + ebegin "Starting CT ${veid}" +@@ -302,16 +302,16 @@ start() { + + ebegin "Loading OpenVZ modules" + for mod in ${IPTABLES_MODULES}; do +- /sbin/modprobe ${mod} >/dev/null 2>&1 ++ modprobe ${mod} >/dev/null 2>&1 + done + + for mod in ${PRELOAD_MODULES}; do +- /sbin/modprobe -r ${mod} >/dev/null 2>&1 +- /sbin/modprobe ${mod} >/dev/null 2>&1 ++ modprobe -r ${mod} >/dev/null 2>&1 ++ modprobe ${mod} >/dev/null 2>&1 + done + + for mod in ${MODULES}; do +- /sbin/modprobe ${mod} >/dev/null 2>&1 ++ modprobe ${mod} >/dev/null 2>&1 + rc=$? + if [ ${rc} -ne 0 ]; then + eend ${rc} "failed to load module ${mod}" +@@ -320,7 +320,7 @@ start() { + done + + for mod in ${MIGRATE_MODULES} ${PLOOP_MODULES}; do +- /sbin/modprobe ${mod} >/dev/null 2>&1 ++ modprobe ${mod} >/dev/null 2>&1 + done + eend + +@@ -365,15 +365,15 @@ stop() { + stop_net + + for mod in ${MIGRATE_MODULES} ${PLOOP_MODULES}; do +- /sbin/modprobe -r ${mod} > /dev/null 2>&1 ++ modprobe -r ${mod} > /dev/null 2>&1 + done + + for mod in ${MODULES}; do +- /sbin/modprobe -r ${mod} > /dev/null 2>&1 ++ modprobe -r ${mod} > /dev/null 2>&1 + done + + for mod in ${PRELOAD_MODULES}; do +- /sbin/modprobe -r ${mod} > /dev/null 2>&1 ++ modprobe -r ${mod} > /dev/null 2>&1 + done + + # Even if some modules failed to unload (say they were not loaded) diff --git a/sys-cluster/vzctl/files/vzctl-initscript-typo-patch-4.8.patch b/sys-cluster/vzctl/files/vzctl-initscript-typo-patch-4.8.patch new file mode 100644 index 000000000000..ee4818f19d27 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-initscript-typo-patch-4.8.patch @@ -0,0 +1,32 @@ +From: Kir Kolyshkin <kir@openvz.org> +Date: Tue, 14 Oct 2014 09:22:49 +0000 (-0700) +Subject: init.d/vz-gentoo: fix a typo +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=7dd296400299f13964b2665792fbe1ea89ac6241 + +init.d/vz-gentoo: fix a typo + +As reported in + +http://forum.openvz.org/index.php?t=msg&th=12775&S=cec69936a4b7d441bf7f44478dbb6c3c#msg_51690 + +there's a missing bracket. + +This is a fix to commit 8e7fdb5. + +Reported-by: Sergey Ya Korshunoff +Signed-off-by: Kir Kolyshkin <kir@openvz.org> +--- + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index d937408..c7b5604 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -202,7 +202,7 @@ start_ve() { + + get_parallel() + { +- [ -n "${VE_PARALLEL}" -a "${VE_PARALLEL" != "0" ] && return ++ [ -n "${VE_PARALLEL}" -a "${VE_PARALLEL}" != "0" ] && return + VE_PARALLEL=`awk ' + BEGIN { num=0; } + $1 == "processor" { num++; } diff --git a/sys-cluster/vzctl/metadata.xml b/sys-cluster/vzctl/metadata.xml new file mode 100644 index 000000000000..95759dca8f2d --- /dev/null +++ b/sys-cluster/vzctl/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>proxy-maintainers</herd> + <maintainer> + <email>andreis.vinogradovs@gmail.com</email> + <name>Andreis Vinogradovs</name> + <description>Primary maintainer, assign bugs to him</description> + </maintainer> + <use> + <flag name='ploop'>Add support for ploop devices via <pkg>sys-cluster/ploop</pkg></flag> + <flag name='vzmigrate'>Add support for container migration</flag> + </use> + <upstream> + <maintainer status="active"> + <email>kir@openvz.org</email> + <name>Kir Kolyshkin</name> + </maintainer> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/vzctl/vzctl-4.9.1.ebuild b/sys-cluster/vzctl/vzctl-4.9.1.ebuild new file mode 100644 index 000000000000..29c22c8ea788 --- /dev/null +++ b/sys-cluster/vzctl/vzctl-4.9.1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit base bash-completion-r1 eutils toolchain-funcs udev + +DESCRIPTION="OpenVZ ConTainers control utility" +HOMEPAGE="http://openvz.org/" +SRC_URI="http://download.openvz.org/utils/${PN}/${PV}/src/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc64 x86 -amd64-fbsd -sparc-fbsd -x86-fbsd" +IUSE="+ploop +vzmigrate" + +RDEPEND="net-firewall/iptables + sys-apps/ed + >=sys-apps/iproute2-3.3.0 + >=sys-fs/vzquota-3.1 + ploop? ( + >=sys-cluster/ploop-1.13 + sys-block/parted + sys-fs/quota + dev-libs/libxml2 + ) + >=dev-libs/libcgroup-0.38 + vzmigrate? ( + net-misc/openssh + net-misc/rsync[xattr,acl] + app-arch/tar[xattr,acl] + net-misc/bridge-utils + virtual/awk + ) + virtual/udev + " + +DEPEND="${RDEPEND} + virtual/pkgconfig + " + +src_prepare() { + + # Set default OSTEMPLATE on gentoo + sed -i -e 's:=redhat-:=gentoo-:' etc/dists/default || die 'sed on etc/dists/default failed' + # Set proper udev directory + sed -i -e "s:/lib/udev:$(get_udevdir):" src/lib/dev.c || die 'sed on src/lib/dev.c failed' +} + +src_configure() { + + econf \ + --localstatedir=/var \ + --enable-udev \ + --enable-bashcomp \ + --enable-logrotate \ + --with-vz \ + $(use_with ploop) \ + --with-cgroup +} + +src_install() { + + emake DESTDIR="${D}" udevdir="$(get_udevdir)"/rules.d install install-gentoo + + # install the bash-completion script into the right location + rm -rf "${ED}"/etc/bash_completion.d + newbashcomp etc/bash_completion.d/vzctl.sh ${PN} + + # We need to keep some dirs + keepdir /vz/{dump,lock,root,private,template/cache} + keepdir /etc/vz/names /var/lib/vzctl/veip +} + +pkg_postinst() { + einfo "This vzctl release required kernel above 2.6.32.92" + + einfo "If you have checkpoint suspend/restore feature in vanilla kernel" + einfo "please install "sys-process/criu" " + einfo "This is experimental and not stable ( in gentoo ) now" + + einfo "if you have work with .xz compressed template, please install app-arch/xz-utils" + einfo "if you have check signature donwloaded template - install gpg " +} diff --git a/sys-cluster/vzctl/vzctl-4.9.2.ebuild b/sys-cluster/vzctl/vzctl-4.9.2.ebuild new file mode 100644 index 000000000000..2ec6e8f0c05a --- /dev/null +++ b/sys-cluster/vzctl/vzctl-4.9.2.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit base bash-completion-r1 eutils toolchain-funcs udev + +DESCRIPTION="OpenVZ ConTainers control utility" +HOMEPAGE="http://openvz.org/" +SRC_URI="http://download.openvz.org/utils/${PN}/${PV}/src/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86 -amd64-fbsd -sparc-fbsd -x86-fbsd" +IUSE="+ploop +vzmigrate" + +RDEPEND="net-firewall/iptables + sys-apps/ed + >=sys-apps/iproute2-3.3.0 + >=sys-fs/vzquota-3.1 + ploop? ( + >=sys-cluster/ploop-1.13 + sys-block/parted + sys-fs/quota + dev-libs/libxml2 + ) + >=dev-libs/libcgroup-0.38 + vzmigrate? ( + net-misc/openssh + net-misc/rsync[xattr,acl] + app-arch/tar[xattr,acl] + net-misc/bridge-utils + virtual/awk + ) + virtual/udev + sys-apps/attr + " + +DEPEND="${RDEPEND} + virtual/pkgconfig + " + +src_prepare() { + + # Set default OSTEMPLATE on gentoo + sed -i -e 's:=redhat-:=gentoo-:' etc/dists/default || die 'sed on etc/dists/default failed' + # Set proper udev directory + sed -i -e "s:/lib/udev:$(get_udevdir):" src/lib/dev.c || die 'sed on src/lib/dev.c failed' +} + +src_configure() { + + econf \ + --localstatedir=/var \ + --enable-udev \ + --enable-bashcomp \ + --enable-logrotate \ + --with-vz \ + $(use_with ploop) \ + --with-cgroup +} + +src_install() { + + emake DESTDIR="${D}" udevdir="$(get_udevdir)"/rules.d install install-gentoo + + # install the bash-completion script into the right location + rm -rf "${ED}"/etc/bash_completion.d + newbashcomp etc/bash_completion.d/vzctl.sh ${PN} + + # We need to keep some dirs + keepdir /vz/{dump,lock,root,private,template/cache} + keepdir /etc/vz/names /var/lib/vzctl/veip +} + +pkg_postinst() { + einfo "This vzctl release required kernel above 2.6.32.92" + + einfo "If you have checkpoint suspend/restore feature in vanilla kernel" + einfo "please install "sys-process/criu" " + einfo "This is experimental and not stable ( in gentoo ) now" + + einfo "if you have work with .xz compressed template, please install app-arch/xz-utils" + einfo "if you have check signature donwloaded template - install gpg " +} diff --git a/sys-cluster/wulfware/Manifest b/sys-cluster/wulfware/Manifest new file mode 100644 index 000000000000..1d922c2e92fa --- /dev/null +++ b/sys-cluster/wulfware/Manifest @@ -0,0 +1 @@ +DIST wulfware-2.6.0.tgz 469000 SHA256 b89fe5bd46a687811ac682a59b63d0fac9e9b4218eaa1d6ffbae56590b71cc9c diff --git a/sys-cluster/wulfware/files/wulfware-2.6.0-opts_and_strip.patch b/sys-cluster/wulfware/files/wulfware-2.6.0-opts_and_strip.patch new file mode 100644 index 000000000000..bc26b7baa997 --- /dev/null +++ b/sys-cluster/wulfware/files/wulfware-2.6.0-opts_and_strip.patch @@ -0,0 +1,142 @@ +diff -ur wulfware-2.6.0.orig/libwulf/Makefile.am wulfware-2.6.0/libwulf/Makefile.am +--- wulfware-2.6.0.orig/libwulf/Makefile.am 2007-07-12 00:58:25.000000000 +0300 ++++ wulfware-2.6.0/libwulf/Makefile.am 2008-05-22 16:25:18.000000000 +0300 +@@ -48,14 +48,14 @@ + # Define parameters and directives needed in compile/link steps. + #======================================================================== + # C Compiler +-CC = gcc ++CC ?= gcc + + # Compile flags. -fpic creates "position independent code" for + # shared libraries! +-CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES) ++CFLAGS += -I/usr/include/libxml2 -I ../include $(DEFINES) + + # Linker flags +-LDFLAGS = -g -fpic --shared -Wl,-soname,$(PROGLIB_SONAME) ++LDFLAGS += -fpic --shared -Wl,-soname,$(PROGLIB_SONAME) + + # Libraries + LIBS = -lpthread -lxml2 -lm +@@ -110,7 +110,7 @@ + install: $(PROGLIB_SO_VERSION) $(PROGMAN) + (install -d $(libdir); \ + install -m 755 $(PROGLIB_SO_VERSION) $(libdir)/$(PROGLIB_SO_VERSION); \ +- ln -sf $(libdir)/$(PROGLIB_SO_VERSION) $(libdir)/$(PROGLIB_SO); \ ++ ln -sf $(PROGLIB_SO_VERSION) $(libdir)/$(PROGLIB_SO); \ + install -d $(includedir)/wulfware; \ + install -m 644 ../include/wulfware/*.h $(includedir)/wulfware; \ + install -d $(prefix)/share/man/man3; \ +diff -ur wulfware-2.6.0.orig/wulf2html/Makefile.am wulfware-2.6.0/wulf2html/Makefile.am +--- wulfware-2.6.0.orig/wulf2html/Makefile.am 2007-07-12 00:58:25.000000000 +0300 ++++ wulfware-2.6.0/wulf2html/Makefile.am 2008-05-22 12:52:36.000000000 +0300 +@@ -62,8 +62,7 @@ + echo "Clean does nothing" + + install : $(PROGRAM) +- (strip $(PROGRAM);\ +- install -d $(prefix)/bin; \ ++ (install -d $(prefix)/bin; \ + install -m 755 $(PROGRAM) $(prefix)/bin; \ + install -d $(sysconfdir); \ + install -d $(sysconfdir)/init.d; \ +diff -ur wulfware-2.6.0.orig/wulflogger/Makefile.am wulfware-2.6.0/wulflogger/Makefile.am +--- wulfware-2.6.0.orig/wulflogger/Makefile.am 2007-07-12 00:58:25.000000000 +0300 ++++ wulfware-2.6.0/wulflogger/Makefile.am 2008-05-22 16:25:14.000000000 +0300 +@@ -54,13 +54,13 @@ + # Define parameters and directives needed in compile/link steps. + #======================================================================== + # C Compiler +-CC = gcc ++CC ?= gcc + + # Compile flags +-CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES) ++CFLAGS += -I/usr/include/libxml2 -I ../include $(DEFINES) + + # Linker flags +-LDFLAGS = ++LDFLAGS += + + # Libraries + LIBS = -L ../libwulf -lwulf -lpthread -lcurses -lxml2 -lm +@@ -108,8 +108,7 @@ + - rm -f core $(PROGRAM) *.o $(PROGRAM).1.gz + + install : $(PROGRAM) +- (strip $(PROGRAM);\ +- install -d $(prefix)/bin; \ ++ (install -d $(prefix)/bin; \ + install -m 755 $(PROGRAM) $(prefix)/bin; \ + install -d $(prefix)/share/man/man1; \ + gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \ +diff -ur wulfware-2.6.0.orig/wulfstat/Makefile.am wulfware-2.6.0/wulfstat/Makefile.am +--- wulfware-2.6.0.orig/wulfstat/Makefile.am 2007-07-12 00:58:25.000000000 +0300 ++++ wulfware-2.6.0/wulfstat/Makefile.am 2008-05-22 16:23:57.000000000 +0300 +@@ -54,13 +54,13 @@ + # Define parameters and directives needed in compile/link steps. + #======================================================================== + # C Compiler +-CC = gcc ++CC ?= gcc + + # Compile flags +-CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES) ++CFLAGS += -I/usr/include/libxml2 -I ../include $(DEFINES) + + # Linker flags +-LDFLAGS = ++LDFLAGS += + + # Libraries + LIBS = -L ../libwulf -lwulf -lpthread -lcurses -lxml2 -lm +@@ -108,8 +108,7 @@ + - rm -f core $(PROGRAM) *.o $(PROGRAM).1.gz + + install : $(PROGRAM) +- (strip $(PROGRAM);\ +- install -d $(prefix)/bin; \ ++ (install -d $(prefix)/bin; \ + install -m 755 $(PROGRAM) $(prefix)/bin; \ + install -d $(prefix)/share/man/man1; \ + gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \ +diff -ur wulfware-2.6.0.orig/xmlsysd/Makefile.am wulfware-2.6.0/xmlsysd/Makefile.am +--- wulfware-2.6.0.orig/xmlsysd/Makefile.am 2007-07-12 00:58:25.000000000 +0300 ++++ wulfware-2.6.0/xmlsysd/Makefile.am 2008-05-22 16:28:30.000000000 +0300 +@@ -60,13 +60,13 @@ + # Define parameters and directives needed in compile/link steps. + #======================================================================== + # C Compiler +-CC = gcc ++CC ?= gcc + + # Compile flags +-CFLAGS = -O3 -I/usr/include/libxml2 $(DEFINES) ++CFLAGS += -I/usr/include/libxml2 $(DEFINES) + + # Linker flags +-LDFLAGS = ++LDFLAGS += + + # Libraries + LIBS = -lxml2 -lz -lm +@@ -79,7 +79,7 @@ + all: $(PROGRAM) + + $(PROGRAM): $(OBJECTS) $(INCLUDES) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBS) $(OBJECTS) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@ + + #======================================================================== + # The only safe place to do commits is in the toplevel directory +@@ -109,8 +109,7 @@ + # Application installation. + #======================================================================== + install : $(PROGRAM) +- (strip $(PROGRAM); \ +- install -d $(sbindir); \ ++ (install -d $(sbindir); \ + install -m 755 $(PROGRAM) $(sbindir); \ + install -d $(sysconfdir); \ + install -d $(sysconfdir)/xinetd.d; \ diff --git a/sys-cluster/wulfware/metadata.xml b/sys-cluster/wulfware/metadata.xml new file mode 100644 index 000000000000..59e2b8f78cb5 --- /dev/null +++ b/sys-cluster/wulfware/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + <name>Default assignee for orphaned packages</name> + </maintainer> +</pkgmetadata> diff --git a/sys-cluster/wulfware/wulfware-2.6.0.ebuild b/sys-cluster/wulfware/wulfware-2.6.0.ebuild new file mode 100644 index 000000000000..333007764410 --- /dev/null +++ b/sys-cluster/wulfware/wulfware-2.6.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit autotools eutils multilib toolchain-funcs + +DESCRIPTION="Applications to monitor on a beowulf- or GRID-style clusters" +HOMEPAGE="http://www.phy.duke.edu/~rgb/Beowulf/wulfware.php" +SRC_URI="http://www.phy.duke.edu/~rgb/Beowulf/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-libs/libxml2 + sys-libs/ncurses + sys-libs/zlib" +DEPEND="${RDEPEND} + !sys-cluster/wulfstat + !sys-cluster/xmlsysd" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-opts_and_strip.patch + eautoreconf +} + +src_compile() { + tc-export CC + econf --disable-dependency-tracking + emake -j1 || die "emake failed." +} + +src_install() { + emake prefix="${D}/usr" libdir="${D}/usr/$(get_libdir)" \ + includedir="${D}/usr/include" sysconfdir="${D}/etc" \ + install || die "emake install failed." + + dodoc AUTHORS ChangeLog NEWS NOTES README xmlsysd/DESIGN + + # FIXME: Update to Gentoo style init script. + rm -rf "${D}"/etc/init.d/wulf2html +} + +pkg_postinst() { + elog "Add following line to /etc/services if you haven't done so already:" + elog + elog "xmlsysd 7887/tcp # xmlsysd remote system stats" + elog + elog "Be sure to edit /etc/xinetd.d/xmylsysd to suit your own options." +} diff --git a/sys-cluster/xgridagent/Manifest b/sys-cluster/xgridagent/Manifest new file mode 100644 index 000000000000..31811af358c5 --- /dev/null +++ b/sys-cluster/xgridagent/Manifest @@ -0,0 +1 @@ +DIST xgridagent-1.0.tar.gz 105965 RMD160 bb86b2b04a2a0a96ee3a72bc4bc98aea60580b70 SHA1 ce87b785386212bafb9534435e301f5da81c558c SHA256 fa8bb477eb0682ffd98efe9e4caa107aacc94b44acac41857a4d0b2d96ab3ea0 diff --git a/sys-cluster/xgridagent/metadata.xml b/sys-cluster/xgridagent/metadata.xml new file mode 100644 index 000000000000..348e6c4de815 --- /dev/null +++ b/sys-cluster/xgridagent/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/xgridagent/xgridagent-1.0.ebuild b/sys-cluster/xgridagent/xgridagent-1.0.ebuild new file mode 100644 index 000000000000..6aa4db82c76d --- /dev/null +++ b/sys-cluster/xgridagent/xgridagent-1.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="A simple system for setting up and using a cluster of OS X machines" +HOMEPAGE="http://www.novajo.ca/xgridagent/" +SRC_URI="http://www.novajo.ca/${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~x86 ~ppc" +IUSE="" +DEPEND=">=net-libs/roadrunner-0.9.1" + +src_compile() { + econf \ + --with-roadrunner-includedir=/usr/include/roadrunner-1.0 \ + --with-roadrunner-libdir=/usr/lib || die "econf failed" + emake || die "emake failed" +} + +src_install() { + dobin xgridagent + dodoc README + insinto /usr/share/${PN} + doins xgrid.config.xml +} |