summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-crypt/ekeyd/ekeyd-1.1.4-r2.ebuild
downloadgentoo-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 'app-crypt/ekeyd/ekeyd-1.1.4-r2.ebuild')
-rw-r--r--app-crypt/ekeyd/ekeyd-1.1.4-r2.ebuild186
1 files changed, 186 insertions, 0 deletions
diff --git a/app-crypt/ekeyd/ekeyd-1.1.4-r2.ebuild b/app-crypt/ekeyd/ekeyd-1.1.4-r2.ebuild
new file mode 100644
index 000000000000..98fbb92777e3
--- /dev/null
+++ b/app-crypt/ekeyd/ekeyd-1.1.4-r2.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib linux-info toolchain-funcs udev
+
+DESCRIPTION="Entropy Key userspace daemon"
+HOMEPAGE="http://www.entropykey.co.uk/"
+SRC_URI="http://www.entropykey.co.uk/res/download/${P}.tar.gz"
+
+LICENSE="MIT GPL-2" # GPL-2 (only) for init script
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="usb kernel_linux munin minimal"
+REQUIRED_USE="minimal? ( !munin !usb )"
+
+EKEYD_RDEPEND="dev-lang/lua
+ usb? ( virtual/libusb:0 )"
+EKEYD_DEPEND="${EKEYD_RDEPEND}"
+EKEYD_RDEPEND="${EKEYD_RDEPEND}
+ dev-lua/luasocket
+ kernel_linux? ( virtual/udev )
+ usb? ( !kernel_linux? ( sys-apps/usbutils ) )
+ munin? ( net-analyzer/munin )"
+
+RDEPEND="!minimal? ( ${EKEYD_RDEPEND} )
+ !app-crypt/ekey-egd-linux
+ sys-apps/openrc"
+DEPEND="!minimal? ( ${EKEYD_DEPEND} )"
+
+CONFIG_CHECK="~USB_ACM"
+
+pkg_setup() {
+ if ! use minimal && use kernel_linux && ! use usb && linux_config_exists; then
+ check_extra_config
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_compile() {
+ local osname
+
+ # Override automatic detection: upstream provides this with uname,
+ # we don't like using uname.
+ case ${CHOST} in
+ *-linux-*)
+ osname=linux;;
+ *-freebsd*)
+ osname=freebsd;;
+ *-kfrebsd-gnu)
+ osname=gnukfreebsd;;
+ *-openbsd*)
+ osname=openbsd;;
+ *)
+ die "Unsupported operating system!"
+ ;;
+ esac
+
+ # We don't slot LUA so we don't really need to have the variables
+ # set at all.
+ emake -C host \
+ CC="$(tc-getCC)" \
+ LUA_V= LUA_INC= \
+ OSNAME=${osname} \
+ OPT="${CFLAGS}" \
+ BUILD_ULUSBD=$(use usb && echo yes || echo no) \
+ $(use minimal && echo egd-linux)
+}
+
+src_install() {
+ exeinto /usr/libexec
+ newexe host/egd-linux ekey-egd-linux
+ newman host/egd-linux.8 ekey-egd-linux.8
+
+ newconfd "${FILESDIR}"/ekey-egd-linux.conf.2 ekey-egd-linux
+ newinitd "${FILESDIR}"/ekey-egd-linux.init.2 ekey-egd-linux
+
+ dodoc doc/* AUTHORS ChangeLog THANKS
+
+ use minimal && return
+ # from here on, install everything that is not part of the minimal
+ # support.
+
+ emake -C host \
+ DESTDIR="${D}" \
+ MANZCMD=cat MANZEXT= \
+ install-ekeyd $(use usb && echo install-ekey-ulusbd)
+
+ # We move the daemons around to avoid polluting the available
+ # commands.
+ dodir /usr/libexec
+ mv "${D}"/usr/sbin/ekey*d "${D}"/usr/libexec
+
+ newinitd "${FILESDIR}"/${PN}.init.2 ${PN}
+
+ if use usb && ! use kernel_linux; then
+ newinitd "${FILESDIR}"/ekey-ulusbd.init.2 ekey-ulusbd
+ newconfd "${FILESDIR}"/ekey-ulusbd.conf.2 ekey-ulusbd
+ fi
+
+ if use kernel_linux; then
+ local rules=udev/fedora15/60-entropykey.rules
+ use usb && rules=udev/fedora15/60-entropykey-uds.rules
+
+ udev_newrules ${rules} 70-${PN}.rules
+
+ exeinto "$(get_udevdir)"
+ doexe udev/entropykey.sh
+ fi
+
+ if use munin; then
+ exeinto /usr/libexec/munin/plugins
+ doexe munin/ekeyd_stat_
+
+ insinto /etc/munin/plugin-conf.d
+ newins munin/plugin-conf.d_ekeyd ekeyd
+ fi
+}
+
+pkg_postinst() {
+ elog "${CATEGORY}/${PN} now install also the EGD client service ekey-egd-linux."
+ elog "To use this service, you need enable EGDTCPSocket for the ekeyd service"
+ elog "managing the key(s)."
+ elog ""
+ elog "The daemon will send more entropy to the kernel once the available pool"
+ elog "falls below the value set in the kernel.random.write_wakeup_threshold"
+ elog "sysctl entry."
+ elog ""
+ ewarn "Since version 1.1.4-r1, ekey-egd-linux will *not* set the watermark for"
+ ewarn "you, instead you'll have to configure the sysctl in /etc/sysctl.conf"
+
+ use minimal && return
+ # from here on, document everything that is not part of the minimal
+ # support.
+
+ elog ""
+ elog "To make use of your EntropyKey, make sure to execute ekey-rekey"
+ elog "the first time, and then start the ekeyd service."
+ elog ""
+ elog "By default ekeyd will feed the entropy directly to the kernel's pool;"
+ elog "if your system has jumps in load average, you might prefer using the"
+ elog "EGD compatibility mode, by enabling EGDTCPSocket for ekeyd and then"
+ elog "starting the ekey-egd-linux service."
+ elog ""
+ elog "The same applies if you intend to provide entropy for multiple hosts"
+ elog "over the network. If you want to have the ekey-egd-linux service on"
+ elog "other hosts, you can enable the 'minimal' USE flag."
+ elog ""
+ elog "The service supports multiplexing if you wish to use multiple"
+ elog "keys, just symlink /etc/init.d/ekeyd → /etc/init.d/ekeyd.identifier"
+ elog "and it'll be looking for /etc/entropykey/identifier.conf"
+ elog ""
+
+ if use usb; then
+ if use kernel_linux; then
+ elog "You're going to use the userland USB daemon, the udev rules"
+ elog "will be used accordingly. If you want to use the CDC driver"
+ elog "please disable the usb USE flag."
+ else
+ elog "You're going to use the userland USB daemon, since your OS"
+ elog "does not support udev, you should start the ekey-ulusbd"
+ elog "service before ekeyd."
+ fi
+
+ ewarn "The userland USB daemon has multiple known issues. If you can,"
+ ewarn "please consider disabling the 'usb' USE flag and instead use the"
+ ewarn "CDC-ACM access method."
+ else
+ if use kernel_linux; then
+ elog "Some versions of Linux have a faulty CDC ACM driver that stops"
+ elog "EntropyKey from working properly; please check the compatibility"
+ elog "table at http://www.entropykey.co.uk/download/"
+ else
+ elog "Make sure your operating system supports the CDC ACM driver"
+ elog "or otherwise you won't be able to use the EntropyKey."
+ fi
+ elog ""
+ elog "If you're unsure about the working state of the CDC ACM driver"
+ elog "enable the usb USE flag and use the userland USB daemon"
+ fi
+}