diff options
author | Justin Bronder <jsbronder@gentoo.org> | 2010-11-14 23:04:40 +0000 |
---|---|---|
committer | Justin Bronder <jsbronder@gentoo.org> | 2010-11-14 23:04:40 +0000 |
commit | d5fa08c048860935069690dcbef87fc61600d588 (patch) | |
tree | 9b45a6c4a48aaf236287b2cd500a7a0bafabec43 /sys-auth | |
parent | Stable on amd64 wrt bug #345359 (diff) | |
download | gentoo-2-d5fa08c048860935069690dcbef87fc61600d588.tar.gz gentoo-2-d5fa08c048860935069690dcbef87fc61600d588.tar.bz2 gentoo-2-d5fa08c048860935069690dcbef87fc61600d588.zip |
Initial import.
(Portage version: 2.1.9.24/cvs/Linux x86_64)
Diffstat (limited to 'sys-auth')
-rw-r--r-- | sys-auth/munge/ChangeLog | 10 | ||||
-rw-r--r-- | sys-auth/munge/files/munged.confd | 13 | ||||
-rw-r--r-- | sys-auth/munge/files/munged.initd | 41 | ||||
-rw-r--r-- | sys-auth/munge/metadata.xml | 21 | ||||
-rw-r--r-- | sys-auth/munge/munge-0.5.9.ebuild | 64 |
5 files changed, 149 insertions, 0 deletions
diff --git a/sys-auth/munge/ChangeLog b/sys-auth/munge/ChangeLog new file mode 100644 index 000000000000..8b001903216f --- /dev/null +++ b/sys-auth/munge/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sys-auth/munge +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-auth/munge/ChangeLog,v 1.1 2010/11/14 23:04:40 jsbronder Exp $ + +*munge-0.5.9 (14 Nov 2010) + + 14 Nov 2010; Justin Bronder <jsbronder@gentoo.org> +munge-0.5.9.ebuild, + +files/munged.confd, +files/munged.initd, +metadata.xml: + Initial import. + diff --git a/sys-auth/munge/files/munged.confd b/sys-auth/munge/files/munged.confd new file mode 100644 index 000000000000..8ab2f69284a3 --- /dev/null +++ b/sys-auth/munge/files/munged.confd @@ -0,0 +1,13 @@ +# Specify secret key file. If the keyfile does not already exist +# it will be created on first startup using pseudorandom data via +# dd if=/dev/urandom bs=1 count=1024 >/etc/munge/munge.key +KEYFILE="/etc/munge/munge.key" + +# Specify whether to check "/etc/group" mtime +GROUP_CHECK_MTIME=1 + +# Specify seconds between group info updates +GROUP_UPDATE_TIME=3600 + +# Specify number of threads to spawn +NUM_THREADS=2 diff --git a/sys-auth/munge/files/munged.initd b/sys-auth/munge/files/munged.initd new file mode 100644 index 000000000000..74583857ad02 --- /dev/null +++ b/sys-auth/munge/files/munged.initd @@ -0,0 +1,41 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-auth/munge/files/munged.initd,v 1.1 2010/11/14 23:04:40 jsbronder Exp $ + +depend() { + after localmount +} + +check_key() { + [ -s "${KEYFILE}" ] && return 0 + dd if=/dev/urandom bs=1 count=1024 >/etc/munge/munge.key 2>/dev/null || return 1 + chown munge:munge "${KEYFILE}" || return 1 + chmod 700 "${KEYFILE}" || return 1 +} + +start() { + ebegin "Starting munged" + if ! check_key; then + eerror "Failed to verify/create munge key" + eend 1 && exit 1 + fi + start-stop-daemon -S /usr/sbin/munged \ + --user munge \ + --group munge \ + --pidfile /var/run/munge/munged.pid \ + -- \ + --key-file="${KEYFILE}" \ + --group-check-mtime="${GROUP_CHECK_MTIME}" \ + --group-update-time="${GROUP_UPDATE_TIME}" \ + --num-threads="${NUM_THREADS}" + eend ${?} +} + +stop() { + ebegin "Stopping munged" + start-stop-daemon -K /usr/sbin/munged \ + --pidfile /var/run/munge/munged.pid + eend ${?} +} + diff --git a/sys-auth/munge/metadata.xml b/sys-auth/munge/metadata.xml new file mode 100644 index 000000000000..edc412de1826 --- /dev/null +++ b/sys-auth/munge/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> + <maintainer> + <email>jsbronder@gentoo.org</email> + </maintainer> + <use> + <flag name='gcrypt'>Use libgcrypt instead of openssl</flag> + </use> + <longdescription> + MUNGE (MUNGE Uid 'N' Gid Emporium) is an authentication service for creating + and validating credentials. It is designed to be highly scalable for use in + an HPC cluster environment. It allows a process to authenticate the UID and + GID of another local or remote process within a group of hosts having common + users and groups. These hosts form a security realm that is defined by a + shared cryptographic key. Clients within this security realm can create and + validate credentials without the use of root privileges, reserved ports, or + platform-specific methods. + </longdescription> +</pkgmetadata> diff --git a/sys-auth/munge/munge-0.5.9.ebuild b/sys-auth/munge/munge-0.5.9.ebuild new file mode 100644 index 000000000000..d4f8692fac33 --- /dev/null +++ b/sys-auth/munge/munge-0.5.9.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-auth/munge/munge-0.5.9.ebuild,v 1.1 2010/11/14 23:04:40 jsbronder Exp $ + +EAPI=3 +inherit eutils + +DESCRIPTION="An authentication service for creating and validating credentials." +HOMEPAGE="http://code.google.com/p/munge/" +SRC_URI="http://munge.googlecode.com/files/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gcrypt" + +DEPEND="app-arch/bzip2 + sys-libs/zlib + gcrypt? ( dev-libs/libgcrypt ) + !gcrypt? ( dev-libs/openssl )" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup munge + enewuser munge -1 -1 /var/lib/munge munge +} + +src_configure() { + local conf="" + + if use gcrypt; then + conf="${conf} --with-crypto-lib=libgcrypt" + else + conf="${conf} --with-crypto-lib=openssl" + fi + + econf ${conf} \ + --localstatedir=/var \ + || die +} + +src_install() { + emake DESTDIR="${D}" install || die + diropts -o munge -g munge -m700 + dodir /etc/munge || die + + diropts -o munge -g munge -m711 + dodir /var/lib/munge || die + + diropts -o munge -g munge -m755 + dodir /var/run/munge || die + + diropts -o munge -g munge -m700 + dodir /var/log/munge || die + + rm -r "${D}"/etc/{init.d,default} || die + + newconfd "${FILESDIR}"/${PN}d.confd ${PN}d || die + newinitd "${FILESDIR}"/${PN}d.initd ${PN}d || die +} + +src_test() { + emake check || die +} |