summaryrefslogtreecommitdiff
path: root/app-crypt/ekeyd
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/ekeyd')
-rw-r--r--app-crypt/ekeyd/Manifest3
-rw-r--r--app-crypt/ekeyd/ekeyd-1.1.5-r1.ebuild164
-rw-r--r--app-crypt/ekeyd/files/ekeyd.service2
3 files changed, 168 insertions, 1 deletions
diff --git a/app-crypt/ekeyd/Manifest b/app-crypt/ekeyd/Manifest
index 31077d0941ad..5c6b80cb12d4 100644
--- a/app-crypt/ekeyd/Manifest
+++ b/app-crypt/ekeyd/Manifest
@@ -11,9 +11,10 @@ AUX ekeyd-1.1.5-path-fixes.patch 1918 BLAKE2B cf29e1f7fbaef728d0c4db2b71b1ac611b
AUX ekeyd-1.1.5-remove-werror.patch 1205 BLAKE2B c10ae2dc785a3bcb98a47af002d3f96b7908046dddc091f8342a7a61d4a38278f05b677445bdf60ad3260af6d723c1a06b3bd0a279b1ba4ffb07e3a5ae2f3c5b SHA512 2ea01bbe642bd52351e8ab9b7b62147c5bec7918305dc2c5be9291e3ae98fdd90f0e6e36c450e4db6220076a45a22cf870c81b3e23beed9170f262c857acecfd
AUX ekeyd-1.1.5-udev-rule.patch 2325 BLAKE2B 5617dd160c6f3617bb93dc97755f22c535ebcaa190cbca0abb456168ebb1579ce7b1db961167230540e03b56f92008a12e846c54200d5354711c64bc7e9c0e6d SHA512 05023ef85c454a9092cecf7f3826430caeda1e66ba5759ffe1e6f4c42f4da32048862dba6c6e19ab32febadc3a9f65cf5e1b8f0562a71fc854134b60df28a80c
AUX ekeyd.init.2 699 BLAKE2B 4ce17a42ffc60b49232cc0bb5a19d36fecc55071df699a7ad7da6a49de352a599b8f0f11fc05fa4159d8975245e7b6181e96303182870519a7f57070a6b54da4 SHA512 3c1fe923e6f08d83d02b9559fa5b817e9abdbc97a50815ab01c7c17e3e953f54701eb1110340dc164bb67ef67905041054cd4fc98c11ea5932a539f4330c8b71
-AUX ekeyd.service 117 BLAKE2B 3ffc45687d2addb2fa838687d6d4d0c873ca625bebe86167535fba98e30b3f0635344a9dcdc6b5dd63263a2e3374f20e3cae0653bf877cf4bb8bc33a8445eb12 SHA512 3372ed067594cd7e1c0f02402ced141fe9e9c96e6df0dbfeae2ed707c837e48860450ec1971689245d62f79351c294c222456dcb489629095e7707a7026a878d
+AUX ekeyd.service 157 BLAKE2B d7976301d7eb0d9be05de574f3b25c13ed3767629dff7024e7621a2d29686045cfd7664e2127a87b92d32e719b470a2795159e45c310bfdcfffa75897341213f SHA512 1082a1dc58b820882015c4f09d5154691d9d8810bfe953049a6853ea5025ec7cff2377ee931ec8ceef295241083c162e582a75fd0b134f7e8789f6d470285445
DIST ekeyd-1.1.4.tar.gz 100911 BLAKE2B 7b0c6ed31f73ed559ed0a34325680618d700d069b873e7ebc92dc8d8082c9d03e5ea2d7ddfc2b31e927914a0d2cd130faed97ce07eea4af3005f1499b1fd2d1c SHA512 40632722827e07ebc643fa32af9910b28053873329772681dba2b029ad0b3c63d1d6bba3fdd0549b84e23779d2e2ae0323a53e1fdf93eb963570bab2227b63e6
DIST ekeyd_1.1.5.orig.tar.gz 101366 BLAKE2B 7edd6d291f7553864c9aa96ee3d9533e33b6c94989b2c6b1a56eda42f61afe1633af5e7c3c8f5f57920ac0577f8567d1b09238eae35138ab2023600f01096466 SHA512 c30620d5e54a49929be72ed04448a4f08eb9658dbf7534586c49a3b43bdd5fc95a0659e09cc04b012c339ca20a1e914fa5a4b4d970171c46b64235f284516b9a
EBUILD ekeyd-1.1.4-r2.ebuild 5604 BLAKE2B d3d63f22f9ca5606c1648365461581a294dd6775a2cd1fbcc26bd16ad5f809152afa6164ca24ea35c328f919bcff27dce867b4c9a5dc65751219a11e920f157b SHA512 67f60f6aef075cbe8c8be460f953c66191b0e4e4c88c5b5ed98b2fce9d3cb79290eda3e79668a9b0bc3a02fffab47a4b62fbd9a4ff6c9bb8e0925917f3c12d9b
+EBUILD ekeyd-1.1.5-r1.ebuild 4877 BLAKE2B f7b49794d5c43cb8997e2074aa8ece5cf75a24baf6d2b49cf8626e2a96487b9689c887008f43cd9b3a577c8f07533b244abebd406da397baaa38242201fabea1 SHA512 5280b08daee08ee697de152a8db129c180e1d633096431a9511a03c9bfdd552411cf00e088daeef675c70621a30fac069de79ae89d63bd9f071ba134fb4dad55
EBUILD ekeyd-1.1.5.ebuild 4865 BLAKE2B 794a77bc8907afd614d7fa23a22b76c70e193b09c47b8706a63143ae63810dd7bc6fafed6e87ca03ab63f87daf289afce6f84220dde0ce796df9363c203c878b SHA512 dd6e8b2913eb2628c70aa3d22687982fbbfad2c084a5407f693429c7bacb7c55f5d20f2ffb35df13fcd2f644b1a648c1985b2ec71bdca8c659f2fc5bda6dbce2
MISC metadata.xml 859 BLAKE2B f300afe133b92ef4d4dd1a6f7bffebdb9ff1b152fd08484d56b327c1eaaaa2a2c5c2bf98a8f98851bd427a1143c1d84537aed47ea6048fb10bd0695ee817a202 SHA512 0b7ac8a9894b69bcf0d16bcae83146ef00c05f1a1ecb41244a03cbb5ee8d64328647eceddcac36a5900e87dd07af81c79c7e62e94f70e67244b2c8dac73f57da
diff --git a/app-crypt/ekeyd/ekeyd-1.1.5-r1.ebuild b/app-crypt/ekeyd/ekeyd-1.1.5-r1.ebuild
new file mode 100644
index 000000000000..cd17249ebd07
--- /dev/null
+++ b/app-crypt/ekeyd/ekeyd-1.1.5-r1.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib linux-info toolchain-funcs udev systemd
+
+DESCRIPTION="Entropy Key userspace daemon"
+HOMEPAGE="http://www.entropykey.co.uk/"
+SRC_URI="mirror://ubuntu/pool/universe/e/ekeyd/ekeyd_${PV}.orig.tar.gz"
+
+LICENSE="MIT GPL-2" # GPL-2 (only) for init script
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="kernel_linux munin minimal usb"
+REQUIRED_USE="minimal? ( !munin )"
+
+EKEYD_RDEPEND="dev-lang/lua"
+EKEYD_DEPEND="${EKEYD_RDEPEND}"
+EKEYD_RDEPEND="${EKEYD_RDEPEND}
+ dev-lua/luasocket
+ kernel_linux? ( virtual/udev )
+ munin? ( net-analyzer/munin )"
+
+RDEPEND="!minimal? ( ${EKEYD_RDEPEND} )
+ !app-crypt/ekey-egd-linux
+ virtual/service-manager"
+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}-const_char_usage.patch";
+ epatch "${FILESDIR}/${P}-enoent.patch";
+ epatch "${FILESDIR}/${P}-path-fixes.patch";
+ epatch "${FILESDIR}/${P}-udev-rule.patch";
+ epatch "${FILESDIR}/${P}-remove-werror.patch";
+ epatch "${FILESDIR}/${P}-misc.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=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
+
+ # We move the daemons around to avoid polluting the available
+ # commands.
+ dodir /usr/libexec
+ mv "${D}"/usr/sbin/ekey*d "${D}"/usr/libexec
+
+ systemd_dounit "${FILESDIR}/ekeyd.service"
+
+ newinitd "${FILESDIR}"/${PN}.init.2 ${PN}
+
+ if use kernel_linux; then
+ local rules="${FILESDIR}/90-ekeyd.rules"
+ udev_newrules ${rules} 90-${PN}.rules
+ 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 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"
+}
diff --git a/app-crypt/ekeyd/files/ekeyd.service b/app-crypt/ekeyd/files/ekeyd.service
index 637b424b703d..0529574db5cb 100644
--- a/app-crypt/ekeyd/files/ekeyd.service
+++ b/app-crypt/ekeyd/files/ekeyd.service
@@ -3,6 +3,8 @@ Description=Entropy key daemon
[Service]
ExecStart=/usr/libexec/ekeyd
+Type=forking
+PIDFile=/var/run/ekeyd.pid
[Install]
WantedBy=multi-user.target