munge added

This commit is contained in:
Denis Knauf 2015-03-22 21:42:05 +01:00
parent 3ff1559409
commit be2ae15f60
7 changed files with 107 additions and 0 deletions

View file

View file

@ -0,0 +1,4 @@
gecos = User for munge
home = /var/lib/munge
shell = /sbin/nologin
primary_group = munge

View file

@ -8,4 +8,5 @@ net-libs
net-misc
net-proxy
sys-apps
sys-auth
sys-fs

View file

@ -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

View file

@ -0,0 +1 @@
d /var/run/munge 0750 munge munge -

View file

@ -0,0 +1,19 @@
# SystemD File for munged
# Steve Traylen <steve.traylen@cern.ch> & Denis Knauf
[Unit]
Description=An authentication service for creating and validating credentials
After=syslog.target auditd.service network.target
[Service]
Type=forking
User=munge
# Start up will fail if /etc/munge/munge.key does not exist
# A fresh key can be generated with /usr/sbin/create-munge-key
ExecStartPre=/usr/bin/test -r /etc/munge/munge.key
ExecStart=/usr/sbin/munged
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/var/run/munge/munged.pid
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,69 @@
# Denis Knauf
# based on:
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-auth/munge/munge-0.5.10-r1.ebuild,v 1.12 2014/03/01 22:38:37 mgorny Exp $
require systemd-service
SUMMARY="An authentication service for creating and validating credentials"
HOMEPAGE="http://code.google.com/p/munge/"
DOWNLOADS="http://munge.googlecode.com/files/${PNV}.tar.bz2"
SLOT="0"
#LICENSES="GPL-3"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="gcrypt systemd"
DEPENDENCIES="
gcrypt? ( dev-libs/libgcrypt[multibuild_c:*(-)?] )
!gcrypt? ( dev-libs/openssl[multibuild_c:*(-)?] )
group/munge
user/munge
"
src_configure() {
local conf=""
if option gcrypt; then
conf="${conf} --with-crypto-lib=libgcrypt"
else
conf="${conf} --with-crypto-lib=openssl"
fi
econf ${conf} --localstatedir=/var
}
remove() {
dir="${IMAGE}/$1"
[ -e "${dir}" ] && edo rm -rf "${dir}"
}
src_install() {
emake DESTDIR="${IMAGE}" install
remove /var/run
remove /var/log
remove /etc/init.d
remove /etc/default
remove /etc/sysconfig
keepdir /var/lib/munge
diropts -o munge -g munge -m700
dodir /etc/munge
insinto /etc/munge
doins "${FILES}"/munged.conf
if option systemd
then
install_systemd_files
insinto /usr/${LIBDIR}/tmpfiles.d
hereins munge.conf <<EOF
D /run/munge 0770 munge munge -
EOF
fi
}
src_test() {
emake check
}