1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ekeyd-1.1.4-r2.ebuild,v 1.5 2012/12/11 08:42:46 ssuominen Exp $
7 inherit eutils multilib linux-info toolchain-funcs udev
9 DESCRIPTION="Entropy Key userspace daemon"
10 HOMEPAGE="http://www.entropykey.co.uk/"
11 SRC_URI="http://archive.ubuntu.com/ubuntu/pool/universe/e/ekeyd/ekeyd_${PV}.orig.tar.gz"
13 LICENSE="MIT GPL-2" # GPL-2 (only) for init script
15 KEYWORDS="~amd64 ~x86"
16 IUSE="kernel_linux munin minimal"
17 REQUIRED_USE="minimal? ( !munin )"
19 EKEYD_RDEPEND="dev-lang/lua"
20 EKEYD_DEPEND="${EKEYD_RDEPEND}"
21 EKEYD_RDEPEND="${EKEYD_RDEPEND}
23 kernel_linux? ( virtual/udev )
24 munin? ( net-analyzer/munin )"
26 RDEPEND="!minimal? ( ${EKEYD_RDEPEND} )
27 !app-crypt/ekey-egd-linux
29 DEPEND="!minimal? ( ${EKEYD_DEPEND} )"
31 CONFIG_CHECK="~USB_ACM"
34 if ! use minimal && use kernel_linux && ! use usb && linux_config_exists; then
40 for i in `seq 1 6`; do
41 epatch "${FILESDIR}/ekeyd-$i.patch";
48 # Override automatic detection: upstream provides this with uname,
49 # we don't like using uname.
60 die "Unsupported operating system!"
64 # We don't slot LUA so we don't really need to have the variables
72 $(use minimal && echo egd-linux)
77 newexe host/egd-linux ekey-egd-linux
78 newman host/egd-linux.8 ekey-egd-linux.8
80 newconfd "${FILESDIR}"/ekey-egd-linux.conf.2 ekey-egd-linux
81 newinitd "${FILESDIR}"/ekey-egd-linux.init.2 ekey-egd-linux
83 dodoc doc/* AUTHORS ChangeLog THANKS
86 # from here on, install everything that is not part of the minimal
91 MANZCMD=cat MANZEXT= \
94 # We move the daemons around to avoid polluting the available
97 mv "${D}"/usr/sbin/ekey*d "${D}"/usr/libexec
99 newinitd "${FILESDIR}"/${PN}.init.2 ${PN}
101 if use kernel_linux; then
102 local rules="${FILESDIR}/90-ekeyd.rules"
103 udev_newrules ${rules} 90-${PN}.rules
107 exeinto /usr/libexec/munin/plugins
108 doexe munin/ekeyd_stat_
110 insinto /etc/munin/plugin-conf.d
111 newins munin/plugin-conf.d_ekeyd ekeyd
116 elog "${CATEGORY}/${PN} now install also the EGD client service ekey-egd-linux."
117 elog "To use this service, you need enable EGDTCPSocket for the ekeyd service"
118 elog "managing the key(s)."
120 elog "The daemon will send more entropy to the kernel once the available pool"
121 elog "falls below the value set in the kernel.random.write_wakeup_threshold"
124 ewarn "Since version 1.1.4-r1, ekey-egd-linux will *not* set the watermark for"
125 ewarn "you, instead you'll have to configure the sysctl in /etc/sysctl.conf"
127 use minimal && return
128 # from here on, document everything that is not part of the minimal
132 elog "To make use of your EntropyKey, make sure to execute ekey-rekey"
133 elog "the first time, and then start the ekeyd service."
135 elog "By default ekeyd will feed the entropy directly to the kernel's pool;"
136 elog "if your system has jumps in load average, you might prefer using the"
137 elog "EGD compatibility mode, by enabling EGDTCPSocket for ekeyd and then"
138 elog "starting the ekey-egd-linux service."
140 elog "The same applies if you intend to provide entropy for multiple hosts"
141 elog "over the network. If you want to have the ekey-egd-linux service on"
142 elog "other hosts, you can enable the 'minimal' USE flag."
144 elog "The service supports multiplexing if you wish to use multiple"
145 elog "keys, just symlink /etc/init.d/ekeyd → /etc/init.d/ekeyd.identifier"
146 elog "and it'll be looking for /etc/entropykey/identifier.conf"
149 if use kernel_linux; then
150 elog "Some versions of Linux have a faulty CDC ACM driver that stops"
151 elog "EntropyKey from working properly; please check the compatibility"
152 elog "table at http://www.entropykey.co.uk/download/"
154 elog "Make sure your operating system supports the CDC ACM driver"
155 elog "or otherwise you won't be able to use the EntropyKey."
158 elog "If you're unsure about the working state of the CDC ACM driver"
159 elog "enable the usb USE flag and use the userland USB daemon"