1 |
commit: f2530bd9707c3ddd8e3dd26f248586e938aba29b |
2 |
Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 21 19:52:56 2018 +0000 |
4 |
Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 21 19:52:56 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2530bd9 |
7 |
|
8 |
app-crypt/ekeyd: don't depend directly on openrc |
9 |
|
10 |
Closes: https://bugs.gentoo.org/649476 |
11 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
12 |
|
13 |
app-crypt/ekeyd/ekeyd-1.1.5-r1.ebuild | 164 ++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 164 insertions(+) |
15 |
|
16 |
diff --git a/app-crypt/ekeyd/ekeyd-1.1.5-r1.ebuild b/app-crypt/ekeyd/ekeyd-1.1.5-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..cd17249ebd0 |
19 |
--- /dev/null |
20 |
+++ b/app-crypt/ekeyd/ekeyd-1.1.5-r1.ebuild |
21 |
@@ -0,0 +1,164 @@ |
22 |
+# Copyright 1999-2018 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=5 |
26 |
+ |
27 |
+inherit eutils multilib linux-info toolchain-funcs udev systemd |
28 |
+ |
29 |
+DESCRIPTION="Entropy Key userspace daemon" |
30 |
+HOMEPAGE="http://www.entropykey.co.uk/" |
31 |
+SRC_URI="mirror://ubuntu/pool/universe/e/ekeyd/ekeyd_${PV}.orig.tar.gz" |
32 |
+ |
33 |
+LICENSE="MIT GPL-2" # GPL-2 (only) for init script |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~amd64 ~x86" |
36 |
+IUSE="kernel_linux munin minimal usb" |
37 |
+REQUIRED_USE="minimal? ( !munin )" |
38 |
+ |
39 |
+EKEYD_RDEPEND="dev-lang/lua" |
40 |
+EKEYD_DEPEND="${EKEYD_RDEPEND}" |
41 |
+EKEYD_RDEPEND="${EKEYD_RDEPEND} |
42 |
+ dev-lua/luasocket |
43 |
+ kernel_linux? ( virtual/udev ) |
44 |
+ munin? ( net-analyzer/munin )" |
45 |
+ |
46 |
+RDEPEND="!minimal? ( ${EKEYD_RDEPEND} ) |
47 |
+ !app-crypt/ekey-egd-linux |
48 |
+ virtual/service-manager" |
49 |
+DEPEND="!minimal? ( ${EKEYD_DEPEND} )" |
50 |
+ |
51 |
+CONFIG_CHECK="~USB_ACM" |
52 |
+ |
53 |
+pkg_setup() { |
54 |
+ if ! use minimal && use kernel_linux && ! use usb && linux_config_exists; then |
55 |
+ check_extra_config |
56 |
+ fi |
57 |
+} |
58 |
+ |
59 |
+src_prepare() { |
60 |
+ epatch "${FILESDIR}/${P}-const_char_usage.patch"; |
61 |
+ epatch "${FILESDIR}/${P}-enoent.patch"; |
62 |
+ epatch "${FILESDIR}/${P}-path-fixes.patch"; |
63 |
+ epatch "${FILESDIR}/${P}-udev-rule.patch"; |
64 |
+ epatch "${FILESDIR}/${P}-remove-werror.patch"; |
65 |
+ epatch "${FILESDIR}/${P}-misc.patch"; |
66 |
+} |
67 |
+ |
68 |
+src_compile() { |
69 |
+ local osname |
70 |
+ |
71 |
+ # Override automatic detection: upstream provides this with uname, |
72 |
+ # we don't like using uname. |
73 |
+ case ${CHOST} in |
74 |
+ *-linux-*) |
75 |
+ osname=linux;; |
76 |
+ *-freebsd*) |
77 |
+ osname=freebsd;; |
78 |
+ *-kfrebsd-gnu) |
79 |
+ osname=gnukfreebsd;; |
80 |
+ *-openbsd*) |
81 |
+ osname=openbsd;; |
82 |
+ *) |
83 |
+ die "Unsupported operating system!" |
84 |
+ ;; |
85 |
+ esac |
86 |
+ |
87 |
+ # We don't slot LUA so we don't really need to have the variables |
88 |
+ # set at all. |
89 |
+ emake -C host \ |
90 |
+ CC="$(tc-getCC)" \ |
91 |
+ LUA_V= LUA_INC= \ |
92 |
+ OSNAME=${osname} \ |
93 |
+ OPT="${CFLAGS}" \ |
94 |
+ BUILD_ULUSBD=no \ |
95 |
+ $(use minimal && echo egd-linux) |
96 |
+} |
97 |
+ |
98 |
+src_install() { |
99 |
+ exeinto /usr/libexec |
100 |
+ newexe host/egd-linux ekey-egd-linux |
101 |
+ newman host/egd-linux.8 ekey-egd-linux.8 |
102 |
+ |
103 |
+ newconfd "${FILESDIR}"/ekey-egd-linux.conf.2 ekey-egd-linux |
104 |
+ newinitd "${FILESDIR}"/ekey-egd-linux.init.2 ekey-egd-linux |
105 |
+ |
106 |
+ dodoc doc/* AUTHORS ChangeLog THANKS |
107 |
+ |
108 |
+ use minimal && return |
109 |
+ # from here on, install everything that is not part of the minimal |
110 |
+ # support. |
111 |
+ |
112 |
+ emake -C host \ |
113 |
+ DESTDIR="${D}" \ |
114 |
+ MANZCMD=cat MANZEXT= \ |
115 |
+ install-ekeyd |
116 |
+ |
117 |
+ # We move the daemons around to avoid polluting the available |
118 |
+ # commands. |
119 |
+ dodir /usr/libexec |
120 |
+ mv "${D}"/usr/sbin/ekey*d "${D}"/usr/libexec |
121 |
+ |
122 |
+ systemd_dounit "${FILESDIR}/ekeyd.service" |
123 |
+ |
124 |
+ newinitd "${FILESDIR}"/${PN}.init.2 ${PN} |
125 |
+ |
126 |
+ if use kernel_linux; then |
127 |
+ local rules="${FILESDIR}/90-ekeyd.rules" |
128 |
+ udev_newrules ${rules} 90-${PN}.rules |
129 |
+ fi |
130 |
+ |
131 |
+ if use munin; then |
132 |
+ exeinto /usr/libexec/munin/plugins |
133 |
+ doexe munin/ekeyd_stat_ |
134 |
+ |
135 |
+ insinto /etc/munin/plugin-conf.d |
136 |
+ newins munin/plugin-conf.d_ekeyd ekeyd |
137 |
+ fi |
138 |
+} |
139 |
+ |
140 |
+pkg_postinst() { |
141 |
+ elog "${CATEGORY}/${PN} now install also the EGD client service ekey-egd-linux." |
142 |
+ elog "To use this service, you need enable EGDTCPSocket for the ekeyd service" |
143 |
+ elog "managing the key(s)." |
144 |
+ elog "" |
145 |
+ elog "The daemon will send more entropy to the kernel once the available pool" |
146 |
+ elog "falls below the value set in the kernel.random.write_wakeup_threshold" |
147 |
+ elog "sysctl entry." |
148 |
+ elog "" |
149 |
+ ewarn "Since version 1.1.4-r1, ekey-egd-linux will *not* set the watermark for" |
150 |
+ ewarn "you, instead you'll have to configure the sysctl in /etc/sysctl.conf" |
151 |
+ |
152 |
+ use minimal && return |
153 |
+ # from here on, document everything that is not part of the minimal |
154 |
+ # support. |
155 |
+ |
156 |
+ elog "" |
157 |
+ elog "To make use of your EntropyKey, make sure to execute ekey-rekey" |
158 |
+ elog "the first time, and then start the ekeyd service." |
159 |
+ elog "" |
160 |
+ elog "By default ekeyd will feed the entropy directly to the kernel's pool;" |
161 |
+ elog "if your system has jumps in load average, you might prefer using the" |
162 |
+ elog "EGD compatibility mode, by enabling EGDTCPSocket for ekeyd and then" |
163 |
+ elog "starting the ekey-egd-linux service." |
164 |
+ elog "" |
165 |
+ elog "The same applies if you intend to provide entropy for multiple hosts" |
166 |
+ elog "over the network. If you want to have the ekey-egd-linux service on" |
167 |
+ elog "other hosts, you can enable the 'minimal' USE flag." |
168 |
+ elog "" |
169 |
+ elog "The service supports multiplexing if you wish to use multiple" |
170 |
+ elog "keys, just symlink /etc/init.d/ekeyd → /etc/init.d/ekeyd.identifier" |
171 |
+ elog "and it'll be looking for /etc/entropykey/identifier.conf" |
172 |
+ elog "" |
173 |
+ |
174 |
+ if use kernel_linux; then |
175 |
+ elog "Some versions of Linux have a faulty CDC ACM driver that stops" |
176 |
+ elog "EntropyKey from working properly; please check the compatibility" |
177 |
+ elog "table at http://www.entropykey.co.uk/download/" |
178 |
+ else |
179 |
+ elog "Make sure your operating system supports the CDC ACM driver" |
180 |
+ elog "or otherwise you won't be able to use the EntropyKey." |
181 |
+ fi |
182 |
+ elog "" |
183 |
+ elog "If you're unsure about the working state of the CDC ACM driver" |
184 |
+ elog "enable the usb USE flag and use the userland USB daemon" |
185 |
+} |