diff options
author | 2020-09-26 01:21:27 +0000 | |
---|---|---|
committer | 2020-09-26 01:21:27 +0000 | |
commit | a42f9583abb3ccd778376c64d783c1f41ca02ba6 (patch) | |
tree | f3363bea588b097e2731b8355fcc6be644a6ba4e /sys-cluster | |
parent | sys-cluster/blcr: drop dead package (diff) | |
download | sci-a42f9583abb3ccd778376c64d783c1f41ca02ba6.tar.gz sci-a42f9583abb3ccd778376c64d783c1f41ca02ba6.tar.bz2 sci-a42f9583abb3ccd778376c64d783c1f41ca02ba6.zip |
sys-cluster/empi: drop dead package
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/empi/empi-0.10.ebuild | 31 | ||||
-rw-r--r-- | sys-cluster/empi/files/ChangeLog-0.10 | 121 | ||||
-rw-r--r-- | sys-cluster/empi/files/README.txt | 76 | ||||
-rw-r--r-- | sys-cluster/empi/files/empi-0.10 | 497 | ||||
-rw-r--r-- | sys-cluster/empi/files/eselect.mpi-0.10 | 273 | ||||
-rw-r--r-- | sys-cluster/empi/files/mpi.csh | 3 | ||||
-rw-r--r-- | sys-cluster/empi/files/mpi.sh | 3 | ||||
-rw-r--r-- | sys-cluster/empi/metadata.xml | 11 |
8 files changed, 0 insertions, 1015 deletions
diff --git a/sys-cluster/empi/empi-0.10.ebuild b/sys-cluster/empi/empi-0.10.ebuild deleted file mode 100644 index 5f24f1107..000000000 --- a/sys-cluster/empi/empi-0.10.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils - -DESCRIPTION="Handling Multiple MPI Implementations" -HOMEPAGE="http://dev.gentoo.org/~jsbronder/empi.xml" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" -DEPEND="app-admin/eselect" -RDEPEND="${DEPEND}" - -S="${WORKDIR}" - -src_install() { - newbin "${FILESDIR}"/${P} ${PN} - dodoc "${FILESDIR}"/README.txt - dodoc "${FILESDIR}"/ChangeLog-${PV} - - insinto /usr/share/eselect/modules - newins "${FILESDIR}"/eselect.mpi-${PV} mpi.eselect - exeinto /etc/profile.d - doexe "${FILESDIR}"/mpi.sh - doexe "${FILESDIR}"/mpi.csh -} diff --git a/sys-cluster/empi/files/ChangeLog-0.10 b/sys-cluster/empi/files/ChangeLog-0.10 deleted file mode 100644 index ac5eff065..000000000 --- a/sys-cluster/empi/files/ChangeLog-0.10 +++ /dev/null @@ -1,121 +0,0 @@ -commit ab2dc2e2210f81d24b42180359d0842eb33f994a (HEAD, tag: v0.10, origin/master, origin/HEAD, master) -Author: Justin Bronder <jsbronder@gmail.com> -Date: Wed Jul 10 20:22:13 2013 -0400 - - empi-0.10 - -commit d84c6ce3949f9eeeb1bab816e3e25eef0dd75661 -Author: Justin Bronder <jsbronder@gmail.com> -Date: Tue Jul 9 18:48:01 2013 -0400 - - empi: support make.conf move - - Later versions of portage moved /etc/make.conf to /etc/portage/make.conf - by default while still supporting the old location. - -commit 914c277799fd0f44266864fa16fef338046be5f6 -Author: Justin Bronder <jsbronder@gmail.com> -Date: Tue Jul 9 18:12:50 2013 -0400 - - eclass: add sys-cluster/mpich - - upstream renamed mpich2 to mpich. - -commit 5c80290f4f0d90fe84fa0f18f2264052c544c008 -Author: Justin Bronder <jsbronder@gmail.com> -Date: Mon Jul 1 22:16:04 2013 -0400 - - Revert "eclass: workaround OpenMPI build issue #462602" - - This reverts commit 5e9b1be531ca02607e730a5b43765850eae9a0c5. - -commit a5d63455bf53a1ca6ab0220e3f308707a852b0cc (tag: v0.9) -Author: Justin Bronder <jsbronder@gmail.com> -Date: Mon Jul 1 20:06:50 2013 -0400 - - empi-0.9 - -commit 4540a319542ddc7c0fbcea47174fe85e1810561c -Author: Justin Bronder <jsbronder@gmail.com> -Date: Mon Jul 1 20:05:35 2013 -0400 - - empi: better filtering of emerge output - - Ignore extra information spit out by emerge, like news. - -commit 5e9b1be531ca02607e730a5b43765850eae9a0c5 -Author: Justin Bronder <jsbronder@gmail.com> -Date: Mon Jul 1 20:04:58 2013 -0400 - - eclass: workaround OpenMPI build issue #462602 - - export FAKEROOTKEY=1 to stop OpenMPI from replacing malloc. - -commit a17e4452cb93014e2a4d5f7615e5d09f2df9c6a2 (tag: v0.8) -Author: Justin Bronder <jsbronder@gmail.com> -Date: Thu Feb 21 22:56:27 2013 -0500 - - empi-0.8 - -commit b38f48aa70933858d410abce58964e55708471c9 -Author: Justin Bronder <jsbronder@gmail.com> -Date: Thu Feb 21 22:54:28 2013 -0500 - - empi: manage overlay metadata - - Add overlay metadata management. Snagged from crossdev. - http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git - -commit 4305d879c232acd663a8bb13505e5cfa403c5df5 -Author: Justin Bronder <jsbronder@gmail.com> -Date: Thu Feb 21 21:05:19 2013 -0500 - - empi: provide and set overlay default - - Set default overlay path to /var/cache/overlays/mpi - -commit fd7eed35034cb54dbe0d8f553c57abceee3c0eea -Author: Justin Bronder <jsbronder@gmail.com> -Date: Thu Feb 21 20:40:36 2013 -0500 - - empi: allow all users to see usage screen - -commit 84aa3a41dbbf2924dc223614c267ff6e79bfce2e -Author: Justin Bronder <jsbronder@gmail.com> -Date: Fri Jan 11 16:43:08 2013 -0500 - - rename MPI_PORTDIR and pull it from the portage env - -commit 77318d28462f05b4a8a6f1ac7b270aa07b5ebc8a -Author: Justin Bronder <jsbronder@gmail.com> -Date: Fri Jan 11 16:07:14 2013 -0500 - - rename global variables to be obvious - -commit 07beb4baf6af2a45bd382d6b7ba87d8bcbeda7a7 -Author: Justin Bronder <jsbronder@gmail.com> -Date: Fri Jan 11 15:44:50 2013 -0500 - - sanitize whitespace - -commit 7c7fb4f0669d554a5301e70a46ae82e584685aff -Author: Justin Bronder <jsbronder@gmail.com> -Date: Tue Mar 22 10:27:53 2011 -0400 - - mpi.eclass: Improve handling of unclassed dep strings - - Instead of requiring a list of packages to block when calculating the - dep list for an unclassed ebuild, simply inject a dep string. This - will allow the use of USE-conditional blockers. - -commit 0319e9cac8325bda7440f0f48eeac30056658b7e -Author: Nicolas Bigaouette <nbigaouette@gmail.com> -Date: Wed Nov 24 22:42:49 2010 -0500 - - Typo: 'classs' to 'classes' - -commit 7f0ce9ea97ee8f72dc275ebdf3ce7ab44ad6538a -Author: Justin Bronder <jsbronder@gmail.com> -Date: Mon Nov 29 11:51:31 2010 -0500 - - Initial import to git. diff --git a/sys-cluster/empi/files/README.txt b/sys-cluster/empi/files/README.txt deleted file mode 100644 index 0148775fd..000000000 --- a/sys-cluster/empi/files/README.txt +++ /dev/null @@ -1,76 +0,0 @@ -= Introduction = -Empi is basically a reworking of vapier's crossdev script to -handle installing multiple mpi implementations and applications -that depend on them. This is done through trickery involving -adding categories that portage will recognize, moving mpi-enabled -packages (defined as those using mpi.eclass) to a local overlay -directory and then emerging these packages using the new -category. - -Empi handles getting mpi application ebuilds into the overlay, -copying anything in package.{use,keywords}, and wrapping the -emerge process. The eclass handles putting the package files -into separate "root" directories based on the category name as -well as making sure the applications build against the -appropriate environment. - -I also provide eselect-mpi, which unlike every other eselect -module I've ever used, is designed to manage a users personal -environment by writing to ${HOME}/.env.d/mpi. This provides a -quick and easy way for users to experiment with various -implementations while imposing on any other user's ability to -use their preferred implementation. - -The newly written mpi.eclass should handle empi-based and standard -emerging of packages in a manner that enables package maintainers -to quickly port their applications without much knowledge of the -underlying mechanics. At least, that was my intent, maybe I -succeeded. - - -= Definitions = -Class: Fake category name used by empi. Must be - prefixed with mpi- -Base Implementation: Actual mpi-implementation package that will - provide all mpi functionality to the above. - - -= Instructions = - -The following creates a class called "mpi-openmpi" -using sys-cluster/openmpi as the base implementation. We also -set some USE flags and make sure to unmask the appropriate -version of sys-cluster/openmpi. Long options and full package -atoms are used, but not required. - -1.) Sync the science overlay. - -2.) Emerge empi - -3.) Setup /etc/portage/package stuff. - # echo ">=sys-cluster/openmpi-1.2.5-r1 pbs fortran romio smp" >> /etc/portage/package.use - # echo ">=sys-cluster/openmpi-1.2.5-r1" >> /etc/portage/package.keywords - -4.) Create the implementation. - # empi --create --class mpi-openmpi =sys-cluster/openmpi-1.2.5-r1 - -5.) Add packages. - # empi --add --class mpi-openmpi hpl mpi-examples - -6.) Setup your user. - $ eselect mpi set mpi-openmpi - $ echo <<-EOF >> .bash_profile -for i in $(ls ${HOME}/.env.d/*); do - source ${i} -done -EOF - $ source .bash_profile - -7.) Do stuff, or decide this is all worthless and cleanup the mess. - # empi --delete mpi-openmpi - - -= Links = -http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO -http://archives.gentoo.org/gentoo-cluster/msg_f29032b0d85f7f47d9e52940e9322d91.xml -http://dev.gentoo.org/~jsbronder/empi.xml diff --git a/sys-cluster/empi/files/empi-0.10 b/sys-cluster/empi/files/empi-0.10 deleted file mode 100644 index cf41dbbce..000000000 --- a/sys-cluster/empi/files/empi-0.10 +++ /dev/null @@ -1,497 +0,0 @@ -#!/bin/bash -VERSION=0.10 - -source /etc/init.d/functions.sh - -die(){ - if [ -n "${1}" ]; then - echo; eerror $1; echo - fi - exit 1 -} - -has() { - [[ " ${@:2} " == *" $1 "* ]] -} - -usage(){ - local rc=${1:-0} - shift -cat <<-EOF -empi-${VERSION} -Usage: ${HILITE}empi${NORMAL} ${GOOD}[actions]${NORMAL} ${BRACKET}[options]${NORMAL} - -Actions: - ${GOOD}-c, --create${NORMAL} pkgspec (Re)Initialize setup for mpi class. - ${GOOD}-a, --add${NORMAL} pkgspec(s) Add packages using specified mpi class. - ${GOOD}-d, --delete${NORMAL} class Remove everything related to specified class. - -Options: - ${GOOD}-C, --class${NORMAL} class MPI class to use. - ${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from. - ${GOOD}-o, --overlaydir${NORMAL} path Directory to use for the empi portage overlay. - Defaults to MPI_OVERLAY_DIR [${DEFAULT_MPI_OVERLAY_DIR}] - ${GOOD} --noemerge${NORMAL} Do not call emerge, only preform overlay setup. - -Notes: - ${HILITE}-${NORMAL} pkgspec is specified by a package string. Without a version, the - portageq best_visible is used. For example, all of the following - are valid: openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5. - ${HILITE}-${NORMAL} class (-c) is user defined but must be prefixed with "mpi-" - -Examples: -${BRACKET}Create a new class based on openmpi.${NORMAL} - empi --create sys-cluster/openmpi --class mpi-ompi -${BRACKET}Rebuild the above.${NORMAL} - emerge mpi-ompi/openmpi -${BRACKET}Add hpl to mpi-ompi${NORMAL} - empi --class mpi-ompi --add sys-cluster/hpl -EOF - [[ -n $* ]] && echo && eerror "Error: $*" - exit ${rc} -} - -class_is_valid() { - [[ -z ${CLASS} ]] && usage 1 "No class defined." - [[ ${CLASS} != mpi-* ]] && usage 1 "Classes must be prefixed with mpi-" - [[ ${CLASS//./} != ${CLASS} ]] && usage 1 "Classes cannot contain . (period)" -} - -is_class_category() { - local i - for i in $(eselect mpi list -p); do - [[ ${1} == ${i} ]] && return 0 - done - return 1 -} - -split_atom() { - local cpv c pf pn pv - cpv=$(portageq best_visible / ${1}) - if [[ -z ${cpv} || ${rc} -ne 0 ]]; then - cpv=$(portageq best_visible / =${1}) - [[ -z ${cpv} || ${rc} -ne 0 ]] && return 1 - fi - c=${cpv%/*}; pf=${cpv#${c}/}; pn=${pf%%-[0-9]*}; pv=${pf#${pn}-} - echo "${c} ${pn} ${pv}" -} - -parse_pkgspecs() { - local atom i - for ((i=0; i<${#TARGETS[@]}; i++)); do - atom=($(split_atom ${TARGETS[i]})) - if [[ $? -ne 0 ]]; then - eerror "Unable to find a unique package or valid version for ${TARGETS[i]}" - eerror "Is the package unmasked and unblocked normally?" - die "" - fi - TARGETS[i]=${atom[0]}/${atom[1]}-${atom[2]} - done -} - -# handle_etc_portage package_spec -# parses /etc/portage/package.{keywords,use}. If ${CLASS}/${pn} is seen, we don't -# do a thing. Otherwise copy any lines that have ${cat}/${pn} inserting them again -# with the new category. Also keywords virtual/${CLASS} if necessary. -handle_etc_portage() { - local atom=( $(split_atom ${1}) ) - local ext line gfiles f - - for ext in "keywords" "use"; do - if [ -d /etc/portage/package.${ext} ]; then - gfiles="/etc/portage/package.${ext}/*" - f=/etc/portage/package.${ext}/${CLASS} - else - gfiles="/etc/portage/package.${ext}" - f=/etc/portage/package.${ext} - fi - - if ! grep "^[>=<]*${CLASS}/${atom[1]}" ${gfiles} &>/dev/null; then - grep -h "^[>=<]*${atom[0]}/${atom[1]}" ${gfiles} 2>/dev/null \ - | sed "s,${atom[0]},${CLASS}," \ - | while read line; do - echo "${line}" >> ${f} - [[ ${VERBOSE} -ne 0 ]] \ - && einfo "Addition to ${f}: ${line}" - done - elif [[ ${VERBOSE} -ne 0 ]]; then - ewarn "Keys for ${CLASS}/${atom[1]} already exist in ${f}. Will not replicate them." - fi - - if ! grep "^${CLASS}/mpi" ${gfiles} &>/dev/null; then - grep -h "^virtual/mpi" ${gfiles} 2>/dev/null \ - | sed "s,/mpi,/${CLASS}," \ - | while read line; do - echo "${line}" >> ${f} - [[ ${VERBOSE} -ne 0 ]] \ - && einfo "Addition to ${f}: ${line}" - done - elif [[ ${VERBOSE} -ne 0 ]]; then - ewarn "Keys for virtual/${CLASS} already exist. Will not replicate." - fi - done -} - - - -get_ebuild_dir() { - local d a - local want_uses_mpi=${2:-0} - local found=0 - - a=($(split_atom ${1})) - [[ $? -ne 0 ]] && die "Unable to find a unique package or valid version for ${1}." - is_class_category ${a[0]} && die "It makes no sense to build a new mpi-class from a current one." - - if [[ -z ${PORTAGE_TREE} ]]; then - for d in $(portageq portdir_overlay) $(portageq portdir); do - if [[ ${want_uses_mpi} -ne 0 ]]; then - [[ -f "${d}/${a[0]}/${a[1]}/${a[1]}-${a[2]}.ebuild" ]] \ - && ebuild_uses_mpi ${d}/${a[0]}/${a[1]} ${a[1]}-${a[2]} \ - && found=1 - else - [[ -f "${d}/${a[0]}/${a[1]}/${a[1]}-${a[2]}.ebuild" ]] && found=1 - fi - [[ ${found} -ne 0 ]] && break - done - if [[ ${found} -ne 0 ]]; then - PORTAGE_TREE=${d} - else - die "Could not find an ebuild for ${a[0]}/${a[1]}-${a[2]}." - fi - fi - - EBUILD_DIR="${PORTAGE_TREE}/${a[0]}/${a[1]}" -} - -ebuild_uses_mpi() { - grep 'inherit .*mpi' "${1}/${2##*/}.ebuild" &>/dev/null -} - -link_ebuild_dir() { - ln -snf "${EBUILD_DIR}" "${MPI_OVERLAY_DIR}"/${CLASS}/${EBUILD_DIR##*/} \ - || die "Failed to link ${EBUILD_DIR} to ${MPI_OVERLAY_DIR}/${CLASS}/${EBUILD_DIR##*/}" -} - -# TODO: Needs to be called after get_ebuild_dir which sets $PORTAGE_TREE -create_virtual_mpi() { - local d_dir="${MPI_OVERLAY_DIR}"/virtual/${CLASS} - local version d_file mpi_ebuild s_dir - - # Try to get virtual/mpi from the same tree as the other ebuilds. - # Otherwise we fall back and get it from anywhere. - version=$(portageq best_visible / ${__VIRTUAL_MPI_VERSION}) - version=${version#virtual/mpi-} - - for s_dir in ${PORTAGE_TREE} $(portageq portdir_overlay) $(portageq portdir); do - mpi_ebuild="${s_dir}"/virtual/mpi/mpi-${version}.ebuild - [ -f "${mpi_ebuild}" ] && break; - done - - [[ ! -f "${mpi_ebuild}" ]] \ - && die "Cannot satisfy ${__VIRTUAL_MPI_VERSION}" - - d_file=${CLASS}-${version}.ebuild - - mkdir -p "${d_dir}" || die "Could not create ${d_dir}" - - cp "${mpi_ebuild}" "${d_dir}"/${d_file} \ - || die "Could not copy ${mpi_ebuild} to ${d_dir}/${d_file}" - - sed -i "s,sys-cluster/,${CLASS}/," ${d_dir}/${d_file} - ebuild ${d_dir}/${d_file} digest > /dev/null \ - || die "Failed to digest ${d_dir}/${d_file}" -} - -set_metadata() { - # Snagged from crossdev: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git - # 3cab8c394fec72f2353e209d98429dd1aaf1d337 - - # for people who have eclasses spread over their overlays, generate - # a layout.conf file so portage can find them. this is a crapshoot - # when diff overlay sources have conflicting eclasses, but nothing - # we really can do about that. - local autogen_tag="# Autogenerated and managed by empi" - local meta=${MPI_OVERLAY_DIR}/metadata - local layout=${meta}/layout.conf - local d name masters thin_manifests="false" - - mkdir -p "${meta}" - if [[ -e ${layout} ]] ; then - if ! grep -qs "^${autogen_tag}" "${layout}" ; then - einfo "leaving metadata/layout.conf alone in ${MPI_OVERLAY_DIR}" - return - fi - - # We are managing it, so blow it away - rm -f "${layout}" - fi - - # build up a list of possible repos where we can pull from - for d in ${PORTDIR_OVERLAY} "${PORTDIR}" ; do - [[ -z ${d} ]] && continue - - name= - if [[ -e ${d}/profiles/repo_name ]] ; then - name=$(<"${d}"/profiles/repo_name) - fi - [[ -z ${name} ]] && continue - - # If this repo has an eclass dir, mark it as a master. - # Note: portage reads the masters list in reverse order, - # so we have to prepare it the same way. - if [[ -d ${d}/eclass ]] ; then - has ${name} ${masters} || masters="${name} ${masters}" - fi - - # If one of the overlays uses thin manifests, then turn it on - if [[ -z ${this_manifests} ]] && has ${name} ${masters} && \ - sed \ - -e 's:#.*::' \ - -e 's:^[[:space:]]*::' \ - -e 's:[[:space:]]*$::' \ - -e 's:[[:space:]]*=[[:space:]]*:=:' \ - "${d}/metadata/layout.conf" 2>/dev/null | \ - gawk -F= '{ - if ($1 == "use-manifests") um = $2 - if ($1 == "thin-manifests") tm = $2 - } - END { - exit !(um != "false" && tm == "true") - }' - then - einfo "enabling thin-manifests due to ${d}" - this_manifests="use-manifests = true\nthin-manifests = true" - fi - done - - # write out that layout.conf! - cat <<-EOF > "${layout}" - ${autogen_tag} - # Delete the above line if you want to manage this file yourself - masters = ${masters% } - $(printf '%b' "${this_manifests}") - EOF -} - -do_emerge() { - [[ ${DO_EMERGE} -eq 0 ]] && return 0 - einfo "Emerging $*" - emerge ${EMERGE_OPTS} $* || die "emerge failed!" -} - -# We should have only one target here. -create_class() { - local mpi_class_pkg d mpi_class_pn - - [[ ${#TARGETS[@]} -ne 1 ]] && die "Can only create one class at a time." - - for d in $(eselect mpi list -p); do - [ "${d}" == "${CLASS}" ] && die "${CLASS} has already been created." - done - - # Prevent laziness - [[ ${TARGETS[0]} == ${TARGETS[0]##*/} ]] \ - && TARGETS[0]="sys-cluster/${TARGETS[0]}" - - parse_pkgspecs - get_ebuild_dir ${TARGETS[0]} 1 - create_virtual_mpi - mpi_class_pn=${EBUILD_DIR##*/} - mpi_class_pkg=${TARGETS[0]} - handle_etc_portage ${TARGETS[0]} - TARGETS[0]="=${CLASS}/${TARGETS[0]##*/}" - - # Refuse to break systems. If there is already a class - # installed in that directory, we're not going to add another one as - # the eclass doesn't fix one problem just to introduce a bigger one. - for d in $(find ${MPI_OVERLAY_DIR}/${CLASS} -maxdepth 1 -mindepth 1 -type l 2>/dev/null);do - d=${d##*/} - [[ ${d} == ${mpi_class_pn} ]] && continue - for i in ${MPI_ALL_IMPS}; do - [[ ${i} == ${d} ]] \ - && die "${CLASS} already has MPI implementation ${d}, refusing to add ${mpi_class_pn}" - done - done - - if [[ -d "${MPI_OVERLAY_DIR}"/${CLASS} ]]; then - [[ ${VERBOSE} -ne 0 ]] && ewarn "Overlay for ${CLASS} has already been created." - else - mkdir -p ${MPI_OVERLAY_DIR}/${CLASS} - link_ebuild_dir - set_metadata - fi - if ! grep "^${CLASS}$" /etc/portage/categories &>/dev/null; then - echo "${CLASS}" >> /etc/portage/categories - fi - - -cat << EOF -Creating ${HILITE}${CLASS}${NORMAL} - Class: ${GOOD}${CLASS}${NORMAL} - MPI Implementation: ${GOOD}${mpi_class_pkg}${NORMAL} - Source: ${GOOD}${EBUILD_DIR}${NORMAL} - Destination: ${GOOD}${MPI_OVERLAY_DIR}/${CLASS}${NORMAL} -EOF - do_emerge ${TARGETS[0]} -} - - -add_packages(){ - local i j deps - - [[ -d "${MPI_OVERLAY_DIR}"/${CLASS} ]] || die "Class ${CLASS} has not been created yet." - [[ ${#TARGETS[@]} -lt 1 ]] && die "You need to specify at least one package" - - parse_pkgspecs - for ((i=0;i<${#TARGETS[@]};i++)); do - get_ebuild_dir ${TARGETS[i]} - create_virtual_mpi - if ebuild_uses_mpi ${EBUILD_DIR} ${TARGETS[i]}; then - link_ebuild_dir - handle_etc_portage ${TARGETS[i]} - TARGETS[i]="=${CLASS}/${TARGETS[i]##*/}" - else - TARGETS[i]="=${TARGETS[i]}" - fi - - # I don't know about this, but do you have a better idea? - deps="$(emerge --color=n --onlydeps -p --quiet ${TARGETS[i]} | grep '^\[')" - if [[ $? -ne 0 ]]; then - emerge --onlydeps -p ${TARGETS[i]} - die "Unable to calculate deps for ${TARGETS[i]}" - fi - deps=( $(echo ${deps} | sed -e 's:\[[a-z]* [A-Z] \] :=:g') ) - for ((j=0;j<${#deps[@]};j++)); do - get_ebuild_dir ${deps[j]} - if ebuild_uses_mpi ${deps[i]}; then - link_ebuild_dir - fi - done - done -cat << EOF -Adding packages to ${HILIGHT}${CLASS}${NORMAL} - Packages: ${GOOD}${TARGETS[@]}${NORMAL} -EOF - do_emerge ${TARGETS[@]} -} - - -delete_class() { - local pkgs=( $(ls /var/db/pkg/${CLASS}/ 2>/dev/null) ) - local ext d i rc - [[ -d "${MPI_OVERLAY_DIR}"/${CLASS} ]] || die "Class ${CLASS} has not been created yet." - rc=0 - - for (( i=0; i<${#pkgs[@]}; i++)); do - pkgs[i]="=${CLASS}/${pkgs[i]}" - done - - if [[ ${#pkgs[@]} -gt 0 ]] && ! emerge -C ${EMERGE_OPTS/-u/} ${pkgs[@]}; then - die "Failed to unmerge ${pkgs[@]}" - fi - - for ext in "keywords" "use"; do - if [ -d /etc/portage/package.${ext} ]; then - rm /etc/portage/package.${ext}/${CLASS} &>/dev/null - rc=$((rc+$?)) - elif [ -f /etc/portage/package.${ext} ]; then - sed -i -e "/^${CLASS}\//d" /etc/portage/package.${ext} - rc=$((rc+$?)) - fi - done - - [ ! -f /etc/portage/categories ] || sed -i -e "/^${CLASS}$/d" /etc/portage/categories - rc=$((rc+$?)) - - for d in $(ls "${MPI_OVERLAY_DIR}"/${CLASS}/ 2>/dev/null); do - rm "${MPI_OVERLAY_DIR}"/${CLASS}/${d} - rc=$((rc+$?)) - done - - for d in "${MPI_OVERLAY_DIR}/${CLASS}" /var/db/pkg/${CLASS}; do - [ ! -d "${d}" ] || rmdir "${d}" - rc=$((rc+$?)) - done - - [[ ${rc} -ne 0 ]] \ - && ewarn "Errors were encountered during delete_class()" - return ${rc} -} - -# Internal variables. -__VIRTUAL_MPI_VERSION=">=virtual/mpi-2.0" - -ACTION="" -CLASS="" -PORTAGE_TREE="" -MPI_OVERLAY_DIR="" -VERBOSE=0 -DO_EMERGE=1 -EMERGE_OPTS="-u" # Packages can be recompiled by hand if necessary. -TARGETS="" -DEFAULT_MPI_OVERLAY_DIR=/var/cache/overlays/mpi -MAKE_CONF=/etc/make.conf - -PORTDIR_OVERLAY="" -PKGDIR="" - -EBUILD_DIR="" - -while [[ $# -gt 0 ]]; do - case $1 in - -h|--help) - usage;; - -c|--create) - ACTION="${ACTION}create";; - -a|--add) - ACTION="${ACTION}add";; - -d|--delete) - ACTION="${ACTION}delete" - shift; CLASS=${1};; - -C|--class) - shift; CLASS=${1};; - -t|--tree) - shift; PORTAGE_TREE=${1};; - -o|--overlaydir) - shift; MPI_OVERLAY_DIR=${1};; - -v|--verbose) - VERBOSE=1;; - --noemerge) - DO_EMERGE=0;; - -*) - EMERGE_OPTS="${EMERGE_OPTS} ${1}";; - *) - TARGETS=( $(echo ${TARGETS[@]}) ${1} );; - esac - shift -done - -[[ ${UID} -ne 0 ]] && die "You must be root to preform any actions." - -if [ -s /etc/portage/make.conf ]; then - MAKE_CONF=/etc/portage/make.conf -fi - -: ${MPI_OVERLAY_DIR:=$(portageq envvar MPI_OVERLAY_DIR)} -if [ -z "${MPI_OVERLAY_DIR}" ]; then - MPI_OVERLAY_DIR=${DEFAULT_MPI_OVERLAY_DIR} - einfo "MPI_OVERLAY_DIR not set, defaulting to ${MPI_OVERLAY_DIR} and updating make.conf" - echo "MPI_OVERLAY_DIR=\"${MPI_OVERLAY_DIR}\"" >> ${MAKE_CONF} -fi - -if [ ! -d "${MPI_OVERLAY_DIR}" ]; then - mkdir -p "${MPI_OVERLAY_DIR}" || die "Failed to mkdir ${MPI_OVERLAY_DIR}" -fi - -export PORTDIR_OVERLAY="${MPI_OVERLAY_DIR} $(portageq portdir_overlay)" -export PKGDIR="$(portageq envvar PKGDIR)/mpi/${CLASS}" -export PORTDIR="$(portageq envvar PORTDIR)" - -[[ -z ${ACTION} ]] && usage 1 "No action defined." -class_is_valid - -set_metadata -[[ ${ACTION} == *create* ]] && create_class -[[ ${ACTION} == *add* ]] && add_packages -[[ ${ACTION} == *delete* ]] && delete_class diff --git a/sys-cluster/empi/files/eselect.mpi-0.10 b/sys-cluster/empi/files/eselect.mpi-0.10 deleted file mode 100644 index 2c7a56776..000000000 --- a/sys-cluster/empi/files/eselect.mpi-0.10 +++ /dev/null @@ -1,273 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -DESCRIPTION="Manage MPI classes" -MAINTAINER="jsbronder@gentoo.org" -SVN_DATE='$Date: $' -VERSION="0.0.2" - -inherit path-manipulation config - -# The basic idea is we want to allow every use to select their own mpi -# implementation they want, and a ${HOME}/.env.d/mpi file is created for them. -# A user then is -required- to source the env file. This sets PATH, MANPATH, -# and LD_LIBRARY_PATH. I'm sure I'm forgetting something here. -# Calling unset only wipes out the env file, replacing it with what we -# previously added stripped out. - -# If you can think of a better way to do this, while still allowing user's -# freedom, please let me know. - -# List the valid mpi classes currently installed. -find_classes() { - local classes - for f in ${ROOT}/etc/env.d/mpi/*; do - [[ -f ${f} ]] || continue - f=$(basename ${f}) - [[ "${f#mpi-}" == "${f}" ]] && continue - classes=(${classes[@]} ${f}) - done - echo ${classes[@]} -} - -# User's current environment has the class configured in it. -is_in_use() { [ "${ESELECT_MPI_IMP}" == "${1}" ]; } - -# User's env file is ready for sourcing for this class -is_enabled() { - [ "$(var_from_user_envd ESELECT_MPI_IMP)" == "${1}" ] -} - -var_from_user_envd(){ - [ ! -f ${user_ev_sh} ] && return 0 - echo "$(source ${user_ev_sh}; echo ${!1})" -} - -# Is this a valid class? -is_class() { - local classes=$(find_classes) - for i in ${classes[@]}; do - [[ "${i}" == "${1}" ]] && return 0 - done - return 1 -} - -init() { - local d - [[ ${UID} -eq 0 ]] && HOME="${ROOT}/root" - d="$(canonicalise "${ROOT}/${HOME}")" - d="${d}/.env.d/" - user_ev_sh="${d}mpi.sh"; - user_ev_csh="${d}mpi.csh"; - - if [[ ! -d "${d}" ]]; then - mkdir "${d}" || die -q "Failed to create ${d}." - elif [[ ! -w "${d}" ]]; then - die -q "You do not have permission to mkdir ${d}." - fi - [[ -f "${user_ev_sh}" && ! -w "${user_ev_sh}" \ - && -f "${user_ev_csh}" && ! -w "${user_ev_csh}" ]] \ - && die -q "You do not have permission to write to ${user_ev_sh} or ${user_ev_csh}." -} - -global_env() { - local d=$(canonicalise "${ROOT}/etc/env.d/mpi/${1}") - [ -z "${d}" ] && die "Cannot find global env file for ${1}" - ev=${d} -} - -### list action ### - -describe_list() { echo "List available classs"; } -describe_list_parameters() { echo "[-p]"; } - -do_list() { - classes=( $(find_classes) ) - init - if [[ ${@} == *-p* ]]; then - echo "${classes[@]}" - else - write_list_start "Available MPI classs:" - if [[ -n "${classes[@]}" ]]; then - for (( i=0; i<${#classes[@]}; i++ )); do - if is_in_use ${classes[$i]} && is_enabled ${classes[$i]}; then - write_kv_list_entry "${classes[$i]}" "Enabled, In Use" - elif is_in_use ${classes[$i]}; then - write_kv_list_entry "${classes[$i]}" "In Use" - elif is_enabled ${classes[$i]}; then - write_kv_list_entry "${classes[$i]}" "Enabled" - else - write_kv_list_entry "${classes[$i]}" "--" - fi - done - else - write_kv_list_entry "(none found)" "" - fi - fi - return 0 -} - - -### set action ### - -describe_set() { - echo "Select a MPI class." -} - -describe_set_parameters() { - echo "<target>" -} - -do_set() { - local binpath lld manpath current_imp - - init - current_imp="$(var_from_user_envd ESELECT_MPI_IMP)" - global_env ${1} - - [[ -z ${1} ]] && die -q "You didnt specifiy any class for use." - [[ ${#@} -ne 1 ]] && die -q "You may only select exactly one class." - ! is_class ${1} && die -q "${1} is not an class." - if is_enabled ${1}; then - echo "${1} implemention is currently in use. This is a no-op." - return - elif [ -n "${current_imp}" ]; then - echo "Cannot select ${1} when ${current_imp} is in use." - return 1 - fi - - binpath="$(load_config ${ev} PATH)" - lld="$(load_config ${ev} LD_LIBRARY_PATH)" - manpath="$(load_config ${ev} MANPATH)" - -cat <<-EOF >${user_ev_sh} -bpl=\`expr "\${PATH}" : ".*${binpath}:"\` -mpl=\`expr "\${MANPATH}" : ".*${manpath}:"\` -llpl=\`expr "\${LD_LIBRARY_PATH}" : ".*${lld}:"\` - -if [ \${bpl} -eq 0 ]; then - export PATH="${binpath}:\${PATH}" -fi - -if [ \${mpl} -eq 0 ]; then - export MANPATH="${manpath}:\${MANPATH}" -fi - -if [ \${llpl} -eq 0 ]; then - export LD_LIBRARY_PATH="${lld}:\${LD_LIBRARY_PATH}" -fi -export ESELECT_MPI_IMP="${1}" -EOF - -cat <<-EOF >${user_ev_csh} -set bpl=\`expr "\${PATH}" : ".*${binpath}:"\` -set mpl=\`expr "\${MANPATH}" : ".*${manpath}:"\` -set llpl=\`expr "\${LD_LIBRARY_PATH}" : ".*${lld}:"\` - -if ( \$bpl == 0 ) \ - setenv PATH "${binpath}:\${PATH}" - -if ( \$mpl == 0 ) \ - setenv MANPATH "${manpath}:\${MANPATH}" - -if ( \$llpl == 0 ) \ - setenv LD_LIBRARY_PATH "${lld}:\${LD_LIBRARY_PATH}" - -setenv ESELECT_MPI_IMP "${1}" -EOF - - echo "Remember to source /etc/profile or /etc/csh.login" -} - - -### unset action ### -describe_unset() { - echo "Restore MPI-less environment." -} - -do_unset() { - local lld current_imp - init - - current_imp="$(var_from_user_envd ESELECT_MPI_IMP)" - - if [ -z "${current_imp}" ]; then - echo "No implemention currently in use. This is a no-op." - return - fi - - global_env "${ESELECT_MPI_IMP}" - lld="$(load_config ${ev} LD_LIBRARY_PATH)" - - # PATH and MANPATH are reset in /etc/profile. -cat <<-EOF > ${user_ev_sh} -unset ESELECT_MPI_IMP -l=\`expr "\${LD_LIBRARY_PATH}:" : ".*${lld}:"\` -l=\$(( \${l} + 1 )) - -if [ \${l} -gt 1 ]; then - export LD_LIBRARY_PATH="\`expr substr \${LD_LIBRARY_PATH} \${l} 1024\`" -fi -EOF - -cat <<-EOF > ${user_ev_csh} -unsetenv ESELECT_MPI_IMP -set l=\`expr "\${LD_LIBRARY_PATH}:" : ".*${lld}:"\` -@ l = ( \${l} + 1 ) - -if ( \${l} > 1 ) \ - setenv LD_LIBRARY_PATH "\`expr substr \${LD_LIBRARY_PATH} \${l} 1024\`" -EOF - - echo "Remember to source /etc/profile or /etc/csh.login" -} - -### add action (from skel pretty much) -describe_add() { - echo "Add a new mpi class" -} - -describe_add_parameters() { - echo "<file>" -} - -do_add() { - local class - [[ ${#@} -ne 1 ]] \ - && die -q "Bad arguments, use: mpi add /some/full/path/<class>.eselect" - - # If $D is set, we're adding from portage so we want to respect sandbox. - # Otherwise, respect the ROOT variable. - local PREFIX=${D:-${ROOT}/} - - # Create directory if necessary - if [[ ! -e ${PREFIX}/etc/env.d/mpi/ ]]; then - mkdir -p ${PREFIX}/etc/env.d/mpi/ - else - if [[ ! -d ${PREFIX}/etc/env.d/mpi/ ]]; then - die -q "${PREFIX}/etc/env.d/mpi/ exists but isn't a directory!" - fi - fi - - class=$(basename ${1}); class=${class%.eselect} - if ! cp ${1} ${PREFIX}/etc/env.d/mpi/${class}; then - die -q "Installing ${1} as ${PREFIX}/etc/env.d/mpi/${class} failed!" - fi -} - - -### printvar action ### -describe_printvar() { echo "Print variables stored in global env.d file."; } -describe_printvar_parameters() { echo "<class> <variable>"; } - -do_printvar() { - if [[ ${#@} -ne 2 ]] \ - || ! is_class ${1}; then - die -q "Specify exactly 1 class and 1 variable." - fi - global_env ${1} - echo "$(load_config ${ev} ${2})" -} - -# vim: ft=eselect:noet - diff --git a/sys-cluster/empi/files/mpi.csh b/sys-cluster/empi/files/mpi.csh deleted file mode 100644 index 32506b4cc..000000000 --- a/sys-cluster/empi/files/mpi.csh +++ /dev/null @@ -1,3 +0,0 @@ -if ( -d "${HOME}"/.env.d && -f "${HOME}"/.env.d/mpi.csh ) then - source "${HOME}"/.env.d/mpi.csh -endif diff --git a/sys-cluster/empi/files/mpi.sh b/sys-cluster/empi/files/mpi.sh deleted file mode 100644 index 5483247e5..000000000 --- a/sys-cluster/empi/files/mpi.sh +++ /dev/null @@ -1,3 +0,0 @@ -if [ -d "${HOME}"/.env.d -a -f "${HOME}"/.env.d/mpi.sh ]; then - source "${HOME}"/.env.d/mpi.sh -fi diff --git a/sys-cluster/empi/metadata.xml b/sys-cluster/empi/metadata.xml deleted file mode 100644 index c74b39b01..000000000 --- a/sys-cluster/empi/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>jsbronder@gentoo.org</email> - </maintainer> - <maintainer type="project"> - <email>cluster@gentoo.org</email> - <name>Gentoo Cluster Project</name> - </maintainer> -</pkgmetadata> |