1 |
commit: bfad81224e37f1881b6e787b6d546497e781a891 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 18 10:21:29 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 25 18:04:32 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfad8122 |
7 |
|
8 |
net-dns/opendnssec: Drop 1.4.12-r1 and 2.0.1-r1, EAPI5-- |
9 |
|
10 |
Overshadowed by 2.0.3-r1. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/757156 |
13 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
net-dns/opendnssec/Manifest | 2 - |
17 |
.../files/opendnssec-drop-privileges.patch | 28 --- |
18 |
.../files/opendnssec-fix-localstatedir.patch | 32 --- |
19 |
.../opendnssec/files/opendnssec-fix-run-dir.patch | 26 --- |
20 |
net-dns/opendnssec/opendnssec-1.4.12-r1.ebuild | 208 ------------------ |
21 |
net-dns/opendnssec/opendnssec-2.0.1-r1.ebuild | 240 --------------------- |
22 |
6 files changed, 536 deletions(-) |
23 |
|
24 |
diff --git a/net-dns/opendnssec/Manifest b/net-dns/opendnssec/Manifest |
25 |
index b771c89f713..b7655458e11 100644 |
26 |
--- a/net-dns/opendnssec/Manifest |
27 |
+++ b/net-dns/opendnssec/Manifest |
28 |
@@ -1,3 +1 @@ |
29 |
-DIST opendnssec-1.4.12.tar.gz 1036392 BLAKE2B 3bfbcfe91d7da7c2e4b1c5439f7d55e15612ab6ace6af25fcb9c9eb7ddb2e1055e70684c2bd6bbae57a0c2eb78098b448f7dca198e0d6f9e2e812945a1f06cc2 SHA512 b72b76ab4aec8cc63cc9c020bef9a24b000fd00172a07cf43d57b3a33041bef9e107b71eb7271bb13c3566510599c6a1913cf986a724e169c42dc8bdac8d2e51 |
30 |
-DIST opendnssec-2.0.1.tar.gz 1101523 BLAKE2B 0446efd04e73e00d204c53164c3c6aaecb9f37014a110ee85d7e7b1728d225aafcf9e6ef31a7dd29cdf2e875e7b653ab6e8178cece65c47a1c5b027facc16130 SHA512 aa12818f92688e087acaff8a6771d2a7da733e04d9e821967d313c7ff880a1056f470b11988eba1e7aad606418c3a4587f654163d74f68e3f61943c74d86d052 |
31 |
DIST opendnssec-2.0.3.tar.gz 1103355 BLAKE2B b64e729003de86e4139efaad60c9feae9f4e19c16a29fdced55d66f5896c4b7d76c4b8c57a8330d55c0c03e87de1ebe6ec49ef9d1b6e215be963680d2c805579 SHA512 4745a9ac317cc65d6f5b14be640687efd5fde2149541f692fb607a458378d27e903f175023c1aa16a777d17cef9cc68f1a84e7e7cdb233466d26756721b34424 |
32 |
|
33 |
diff --git a/net-dns/opendnssec/files/opendnssec-drop-privileges.patch b/net-dns/opendnssec/files/opendnssec-drop-privileges.patch |
34 |
deleted file mode 100644 |
35 |
index c1972bbc3d1..00000000000 |
36 |
--- a/net-dns/opendnssec/files/opendnssec-drop-privileges.patch |
37 |
+++ /dev/null |
38 |
@@ -1,28 +0,0 @@ |
39 |
---- conf/conf.xml.in.orig 2013-05-12 22:36:47.530988182 +0200 |
40 |
-+++ conf/conf.xml.in 2013-05-12 22:37:56.459817918 +0200 |
41 |
-@@ -38,12 +38,10 @@ |
42 |
- </Common> |
43 |
- |
44 |
- <Enforcer> |
45 |
--<!-- |
46 |
- <Privileges> |
47 |
- <User>opendnssec</User> |
48 |
- <Group>opendnssec</Group> |
49 |
- </Privileges> |
50 |
----> |
51 |
- <!-- NOTE: Enforcer worker threads are not used; this option is ignored --> |
52 |
- <!-- |
53 |
- <WorkerThreads>4</WorkerThreads> |
54 |
-@@ -60,12 +58,10 @@ |
55 |
- </Enforcer> |
56 |
- |
57 |
- <Signer> |
58 |
--<!-- |
59 |
- <Privileges> |
60 |
- <User>opendnssec</User> |
61 |
- <Group>opendnssec</Group> |
62 |
- </Privileges> |
63 |
----> |
64 |
- |
65 |
- <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory> |
66 |
- <WorkerThreads>4</WorkerThreads> |
67 |
|
68 |
diff --git a/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch b/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch |
69 |
deleted file mode 100644 |
70 |
index 3958c6c70cc..00000000000 |
71 |
--- a/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch |
72 |
+++ /dev/null |
73 |
@@ -1,32 +0,0 @@ |
74 |
-diff -urN opendnssec-1.3.0rc2.old/Makefile.am opendnssec-1.3.0rc2/Makefile.am |
75 |
---- opendnssec-1.3.0rc2.old/Makefile.am 2011-06-02 13:48:56.000000000 +0200 |
76 |
-+++ opendnssec-1.3.0rc2/Makefile.am 2011-06-02 13:49:19.000000000 +0200 |
77 |
-@@ -31,11 +31,11 @@ |
78 |
- |
79 |
- install-data-hook: |
80 |
- $(INSTALL) -d $(DESTDIR)$(localstatedir) |
81 |
-- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec |
82 |
-- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/tmp |
83 |
-- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signconf |
84 |
-- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/unsigned |
85 |
-- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signed |
86 |
-+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec |
87 |
-+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/tmp |
88 |
-+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf |
89 |
-+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned |
90 |
-+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed |
91 |
- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run |
92 |
- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec |
93 |
- |
94 |
-diff -urN opendnssec-1.3.0rc2.old/m4/opendnssec_common.m4 opendnssec-1.3.0rc2/m4/opendnssec_common.m4 |
95 |
---- opendnssec-1.3.0rc2.old/m4/opendnssec_common.m4 2011-06-02 13:48:56.000000000 +0200 |
96 |
-+++ opendnssec-1.3.0rc2/m4/opendnssec_common.m4 2011-06-02 13:49:36.000000000 +0200 |
97 |
-@@ -18,7 +18,7 @@ |
98 |
- OPENDNSSEC_LIBEXEC_DIR=$full_libexecdir/opendnssec |
99 |
- OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec |
100 |
- OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec |
101 |
--OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/opendnssec" |
102 |
-+OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/opendnssec" |
103 |
- OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec" |
104 |
- |
105 |
- AC_SUBST([OPENDNSSEC_BIN_DIR]) |
106 |
|
107 |
diff --git a/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch b/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch |
108 |
deleted file mode 100644 |
109 |
index fe5b504344c..00000000000 |
110 |
--- a/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch |
111 |
+++ /dev/null |
112 |
@@ -1,26 +0,0 @@ |
113 |
-diff -ur opendnssec-1.3.12.orig/m4/opendnssec_common.m4 opendnssec-1.3.12/m4/opendnssec_common.m4 |
114 |
---- opendnssec-1.3.12.orig/m4/opendnssec_common.m4 2013-01-31 13:46:01.122201232 +0100 |
115 |
-+++ opendnssec-1.3.12/m4/opendnssec_common.m4 2013-01-31 13:54:47.648861211 +0100 |
116 |
-@@ -19,7 +19,7 @@ |
117 |
- OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec |
118 |
- OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec |
119 |
- OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/opendnssec" |
120 |
--OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec" |
121 |
-+OPENDNSSEC_PID_DIR="${destdir}/run/opendnssec" |
122 |
- |
123 |
- AC_SUBST([OPENDNSSEC_BIN_DIR]) |
124 |
- AC_SUBST([OPENDNSSEC_SBIN_DIR]) |
125 |
-diff -ur opendnssec-1.3.12.orig/Makefile.am opendnssec-1.3.12/Makefile.am |
126 |
---- opendnssec-1.3.12.orig/Makefile.am 2013-01-31 13:46:01.122201232 +0100 |
127 |
-+++ opendnssec-1.3.12/Makefile.am 2013-01-31 13:47:08.569951675 +0100 |
128 |
-@@ -37,8 +37,8 @@ |
129 |
- $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf |
130 |
- $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned |
131 |
- $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed |
132 |
-- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run |
133 |
-- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec |
134 |
-+ |
135 |
-+ |
136 |
- |
137 |
- docs: |
138 |
- (cd libhsm; $(MAKE) doxygen) |
139 |
|
140 |
diff --git a/net-dns/opendnssec/opendnssec-1.4.12-r1.ebuild b/net-dns/opendnssec/opendnssec-1.4.12-r1.ebuild |
141 |
deleted file mode 100644 |
142 |
index e8f3750cc05..00000000000 |
143 |
--- a/net-dns/opendnssec/opendnssec-1.4.12-r1.ebuild |
144 |
+++ /dev/null |
145 |
@@ -1,208 +0,0 @@ |
146 |
-# Copyright 1999-2021 Gentoo Authors |
147 |
-# Distributed under the terms of the GNU General Public License v2 |
148 |
- |
149 |
-EAPI=5 |
150 |
- |
151 |
-MY_P="${P/_}" |
152 |
-PKCS11_IUSE="+softhsm opensc external-hsm" |
153 |
-inherit autotools epatch multilib user |
154 |
- |
155 |
-DESCRIPTION="An open-source turn-key solution for DNSSEC" |
156 |
-HOMEPAGE="https://www.opendnssec.org/" |
157 |
-SRC_URI="https://www.${PN}.org/files/source/${MY_P}.tar.gz" |
158 |
- |
159 |
-LICENSE="BSD GPL-2" |
160 |
-SLOT="0" |
161 |
-KEYWORDS="~amd64 ~x86" |
162 |
-IUSE="debug doc +mysql +signer sqlite test ${PKCS11_IUSE}" |
163 |
-RESTRICT="!test? ( test )" |
164 |
- |
165 |
-RDEPEND=" |
166 |
- dev-lang/perl |
167 |
- dev-libs/libxml2 |
168 |
- dev-libs/libxslt |
169 |
- net-libs/ldns |
170 |
- mysql? ( |
171 |
- virtual/mysql |
172 |
- dev-perl/DBD-mysql |
173 |
- ) |
174 |
- opensc? ( dev-libs/opensc ) |
175 |
- softhsm? ( dev-libs/softhsm:* ) |
176 |
- sqlite? ( |
177 |
- dev-db/sqlite:3 |
178 |
- dev-perl/DBD-SQLite |
179 |
- ) |
180 |
-" |
181 |
-DEPEND="${RDEPEND} |
182 |
- doc? ( app-doc/doxygen ) |
183 |
- test? ( |
184 |
- app-text/trang |
185 |
- ) |
186 |
-" |
187 |
- |
188 |
-REQUIRED_USE=" |
189 |
- ^^ ( mysql sqlite ) |
190 |
- ^^ ( softhsm opensc external-hsm ) |
191 |
-" |
192 |
- |
193 |
-PATCHES=( |
194 |
- "${FILESDIR}/${PN}-fix-localstatedir.patch" |
195 |
- "${FILESDIR}/${PN}-fix-run-dir.patch" |
196 |
- "${FILESDIR}/${PN}-drop-privileges.patch" |
197 |
- "${FILESDIR}/${PN}-use-system-trang.patch" |
198 |
-) |
199 |
- |
200 |
-S="${WORKDIR}/${MY_P}" |
201 |
- |
202 |
-DOCS=( MIGRATION NEWS ) |
203 |
- |
204 |
-check_pkcs11_setup() { |
205 |
- # PKCS#11 HSM's are often only available with proprietary drivers not |
206 |
- # available in portage tree. |
207 |
- |
208 |
- if use softhsm; then |
209 |
- PKCS11_LIB=softhsm |
210 |
- if has_version ">=dev-libs/softhsm-1.3.1"; then |
211 |
- PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so |
212 |
- else |
213 |
- PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so |
214 |
- fi |
215 |
- elog "Building with SoftHSM PKCS#11 library support." |
216 |
- fi |
217 |
- if use opensc; then |
218 |
- PKCS11_LIB=opensc |
219 |
- PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so |
220 |
- elog "Building with OpenSC PKCS#11 library support." |
221 |
- fi |
222 |
- if use external-hsm; then |
223 |
- if [[ -n ${PKCS11_SCA6000} ]]; then |
224 |
- PKCS11_LIB=sca6000 |
225 |
- PKCS11_PATH=${PKCS11_SCA6000} |
226 |
- elif [[ -n ${PKCS11_ETOKEN} ]]; then |
227 |
- PKCS11_LIB=etoken |
228 |
- PKCS11_PATH=${PKCS11_ETOKEN} |
229 |
- elif [[ -n ${PKCS11_NCIPHER} ]]; then |
230 |
- PKCS11_LIB=ncipher |
231 |
- PKCS11_PATH=${PKCS11_NCIPHER} |
232 |
- elif [[ -n ${PKCS11_AEPKEYPER} ]]; then |
233 |
- PKCS11_LIB=aepkeyper |
234 |
- PKCS11_PATH=${PKCS11_AEPKEYPER} |
235 |
- else |
236 |
- ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11" |
237 |
- ewarn "library. To set a path, set one of the following environment variables:" |
238 |
- ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=<path>" |
239 |
- ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>" |
240 |
- ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>" |
241 |
- ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>" |
242 |
- ewarn "Example:" |
243 |
- ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec" |
244 |
- ewarn "or store the variable into /etc/portage/make.conf" |
245 |
- die "USE flag 'external-hsm' set but no PKCS#11 library path specified." |
246 |
- fi |
247 |
- elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}" |
248 |
- fi |
249 |
-} |
250 |
- |
251 |
-pkg_pretend() { |
252 |
- check_pkcs11_setup |
253 |
-} |
254 |
- |
255 |
-pkg_setup() { |
256 |
- enewgroup opendnssec |
257 |
- enewuser opendnssec -1 -1 -1 opendnssec |
258 |
- |
259 |
- # pretend does not preserve variables so we need to run this once more |
260 |
- check_pkcs11_setup |
261 |
-} |
262 |
- |
263 |
-src_prepare() { |
264 |
- local patch |
265 |
- default |
266 |
- for patch in "${PATCHES[@]}"; do |
267 |
- epatch "$patch" |
268 |
- done |
269 |
- eautoreconf |
270 |
-} |
271 |
- |
272 |
-src_configure() { |
273 |
- econf \ |
274 |
- --without-cunit \ |
275 |
- --localstatedir="${EPREFIX}/var/" \ |
276 |
- --disable-static \ |
277 |
- --with-database-backend=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \ |
278 |
- --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \ |
279 |
- $(use_enable debug timeshift) \ |
280 |
- $(use_enable signer) |
281 |
-} |
282 |
- |
283 |
-src_compile() { |
284 |
- default |
285 |
- use doc && emake docs |
286 |
-} |
287 |
- |
288 |
-src_install() { |
289 |
- default |
290 |
- |
291 |
- # remove useless .la files |
292 |
- find "${ED}" -name '*.la' -delete |
293 |
- |
294 |
- # Remove subversion tags from config files to avoid useless config updates |
295 |
- sed -i \ |
296 |
- -e '/<!-- \$Id:/ d' \ |
297 |
- "${ED}"/etc/opendnssec/* || die |
298 |
- |
299 |
- # install update scripts |
300 |
- insinto /usr/share/opendnssec |
301 |
- if use sqlite; then |
302 |
- doins enforcer/utils/migrate_*sqlite* |
303 |
- fi |
304 |
- if use mysql; then |
305 |
- doins enforcer/utils/migrate_*mysql* |
306 |
- fi |
307 |
- |
308 |
- # fix permissions |
309 |
- fowners root:opendnssec /etc/opendnssec |
310 |
- fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml |
311 |
- fowners opendnssec:opendnssec /var/lib/opendnssec/{,signconf,unsigned,signed,tmp} |
312 |
- |
313 |
- # install conf/init script |
314 |
- newinitd "${FILESDIR}"/opendnssec.initd opendnssec |
315 |
- newconfd "${FILESDIR}"/opendnssec.confd opendnssec |
316 |
-} |
317 |
- |
318 |
-pkg_postinst() { |
319 |
- local v |
320 |
- if use softhsm; then |
321 |
- elog "Please make sure that you create your softhsm database in a location writeable" |
322 |
- elog "by the opendnssec user. You can set its location in /etc/softhsm.conf." |
323 |
- elog "Suggested configuration is:" |
324 |
- elog " echo \"0:/var/lib/opendnssec/softhsm_slot0.db\" >> /etc/softhsm.conf" |
325 |
- elog " softhsm --init-token --slot 0 --label OpenDNSSEC" |
326 |
- elog " chown opendnssec:opendnssec /var/lib/opendnssec/softhsm_slot0.db" |
327 |
- fi |
328 |
- |
329 |
- for v in $REPLACING_VERSIONS; do |
330 |
- case $v in |
331 |
- 1.3.*) |
332 |
- ewarn "" |
333 |
- ewarn "You are upgrading from version 1.3." |
334 |
- ewarn "" |
335 |
- ewarn "Please be aware of the following:" |
336 |
- ewarn " * OpenDNSSEC now supports both input and output adapters for" |
337 |
- ewarn " AXFR and IXFR in addition to file transfer." |
338 |
- ewarn " -> The zonefetch.xml file has been replaced by addns.xml" |
339 |
- ewarn " to support this enhancement." |
340 |
- ewarn " -> changes to the KASP database mean that a database" |
341 |
- ewarn " migration is required to upgrade to 1.4 from earlier" |
342 |
- ewarn " versions of OpenDNSSEC." |
343 |
- ewarn " * The auditor is no longer supported." |
344 |
- ewarn "" |
345 |
- ewarn "You can find more information here:" |
346 |
- ewarn " * /usr/share/doc/opendnssec*/MIGRATION*" |
347 |
- ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+zone+fetcher+to+DNS+adapters" |
348 |
- ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+from+earlier+versions+of+OpenDNSSEC" |
349 |
- ewarn "" |
350 |
- ;; |
351 |
- esac |
352 |
- done |
353 |
-} |
354 |
|
355 |
diff --git a/net-dns/opendnssec/opendnssec-2.0.1-r1.ebuild b/net-dns/opendnssec/opendnssec-2.0.1-r1.ebuild |
356 |
deleted file mode 100644 |
357 |
index 9a4bd33a2f2..00000000000 |
358 |
--- a/net-dns/opendnssec/opendnssec-2.0.1-r1.ebuild |
359 |
+++ /dev/null |
360 |
@@ -1,240 +0,0 @@ |
361 |
-# Copyright 1999-2021 Gentoo Authors |
362 |
-# Distributed under the terms of the GNU General Public License v2 |
363 |
- |
364 |
-EAPI=5 |
365 |
- |
366 |
-MY_P="${P/_}" |
367 |
-PKCS11_IUSE="+softhsm opensc external-hsm" |
368 |
-inherit autotools epatch multilib user |
369 |
- |
370 |
-DESCRIPTION="An open-source turn-key solution for DNSSEC" |
371 |
-HOMEPAGE="https://www.opendnssec.org/" |
372 |
-SRC_URI="https://www.${PN}.org/files/source/${MY_P}.tar.gz" |
373 |
- |
374 |
-LICENSE="BSD GPL-2" |
375 |
-SLOT="0" |
376 |
-KEYWORDS="~amd64 ~x86" |
377 |
-IUSE="debug doc +mysql readline +signer sqlite test ${PKCS11_IUSE}" |
378 |
-RESTRICT="!test? ( test )" |
379 |
- |
380 |
-RDEPEND=" |
381 |
- dev-lang/perl |
382 |
- dev-libs/libxml2 |
383 |
- dev-libs/libxslt |
384 |
- net-libs/ldns |
385 |
- mysql? ( |
386 |
- virtual/mysql |
387 |
- dev-perl/DBD-mysql |
388 |
- ) |
389 |
- opensc? ( dev-libs/opensc ) |
390 |
- readline? ( sys-libs/readline:0 ) |
391 |
- softhsm? ( dev-libs/softhsm:* ) |
392 |
- sqlite? ( |
393 |
- dev-db/sqlite:3 |
394 |
- dev-perl/DBD-SQLite |
395 |
- ) |
396 |
-" |
397 |
-DEPEND="${RDEPEND} |
398 |
- doc? ( app-doc/doxygen ) |
399 |
- test? ( |
400 |
- app-text/trang |
401 |
- ) |
402 |
-" |
403 |
- |
404 |
-REQUIRED_USE=" |
405 |
- ^^ ( mysql sqlite ) |
406 |
- ^^ ( softhsm opensc external-hsm ) |
407 |
-" |
408 |
- |
409 |
-PATCHES=( |
410 |
- "${FILESDIR}/${PN}-fix-localstatedir-2.0.x.patch" |
411 |
- "${FILESDIR}/${PN}-fix-run-dir-2.0.x.patch" |
412 |
- "${FILESDIR}/${PN}-drop-privileges-2.0.x.patch" |
413 |
- "${FILESDIR}/${PN}-use-system-trang.patch" |
414 |
-) |
415 |
- |
416 |
-S="${WORKDIR}/${MY_P}" |
417 |
- |
418 |
-DOCS=( MIGRATION NEWS ) |
419 |
- |
420 |
-check_pkcs11_setup() { |
421 |
- # PKCS#11 HSM's are often only available with proprietary drivers not |
422 |
- # available in portage tree. |
423 |
- |
424 |
- if use softhsm; then |
425 |
- PKCS11_LIB=softhsm |
426 |
- if has_version ">=dev-libs/softhsm-1.3.1"; then |
427 |
- PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so |
428 |
- else |
429 |
- PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so |
430 |
- fi |
431 |
- elog "Building with SoftHSM PKCS#11 library support." |
432 |
- fi |
433 |
- if use opensc; then |
434 |
- PKCS11_LIB=opensc |
435 |
- PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so |
436 |
- elog "Building with OpenSC PKCS#11 library support." |
437 |
- fi |
438 |
- if use external-hsm; then |
439 |
- if [[ -n ${PKCS11_SCA6000} ]]; then |
440 |
- PKCS11_LIB=sca6000 |
441 |
- PKCS11_PATH=${PKCS11_SCA6000} |
442 |
- elif [[ -n ${PKCS11_ETOKEN} ]]; then |
443 |
- PKCS11_LIB=etoken |
444 |
- PKCS11_PATH=${PKCS11_ETOKEN} |
445 |
- elif [[ -n ${PKCS11_NCIPHER} ]]; then |
446 |
- PKCS11_LIB=ncipher |
447 |
- PKCS11_PATH=${PKCS11_NCIPHER} |
448 |
- elif [[ -n ${PKCS11_AEPKEYPER} ]]; then |
449 |
- PKCS11_LIB=aepkeyper |
450 |
- PKCS11_PATH=${PKCS11_AEPKEYPER} |
451 |
- else |
452 |
- ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11" |
453 |
- ewarn "library. To set a path, set one of the following environment variables:" |
454 |
- ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=<path>" |
455 |
- ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>" |
456 |
- ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>" |
457 |
- ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>" |
458 |
- ewarn "Example:" |
459 |
- ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec" |
460 |
- ewarn "or store the variable into /etc/portage/make.conf" |
461 |
- die "USE flag 'external-hsm' set but no PKCS#11 library path specified." |
462 |
- fi |
463 |
- elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}" |
464 |
- fi |
465 |
-} |
466 |
- |
467 |
-pkg_pretend() { |
468 |
- if has_version "<net-dns/opendnssec-1.4.10"; then |
469 |
- ################################################################################ |
470 |
- eerror "You are already using OpenDNSSEC." |
471 |
- eerror "In order to migrate to version >=2.0.0 you need to upgrade to" |
472 |
- eerror "version >=1.4.10 first:" |
473 |
- eerror "" |
474 |
- eerror " emerge \"<net-dns/opendnssec-2\"" |
475 |
- eerror "" |
476 |
- eerror "See https://github.com/opendnssec/opendnssec/blob/2.0/master/MIGRATION" |
477 |
- eerror "for details." |
478 |
- eerror "" |
479 |
- die "Please upgrade to version >=1.4.10 first for proper db migraion" |
480 |
- fi |
481 |
- |
482 |
- check_pkcs11_setup |
483 |
-} |
484 |
- |
485 |
-pkg_setup() { |
486 |
- enewgroup opendnssec |
487 |
- enewuser opendnssec -1 -1 -1 opendnssec |
488 |
- |
489 |
- # pretend does not preserve variables so we need to run this once more |
490 |
- check_pkcs11_setup |
491 |
-} |
492 |
- |
493 |
-src_prepare() { |
494 |
- local patch |
495 |
- default |
496 |
- for patch in "${PATCHES[@]}"; do |
497 |
- epatch "$patch" |
498 |
- done |
499 |
- eautoreconf |
500 |
-} |
501 |
- |
502 |
-src_configure() { |
503 |
- econf \ |
504 |
- --without-cunit \ |
505 |
- --localstatedir="${EPREFIX}/var" \ |
506 |
- --disable-static \ |
507 |
- --with-enforcer-database=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \ |
508 |
- --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \ |
509 |
- $(use_with readline) \ |
510 |
- $(use_enable signer) |
511 |
-} |
512 |
- |
513 |
-src_compile() { |
514 |
- default |
515 |
- use doc && emake docs |
516 |
-} |
517 |
- |
518 |
-src_install() { |
519 |
- default |
520 |
- |
521 |
- # remove useless .la files |
522 |
- find "${ED}" -name '*.la' -delete |
523 |
- |
524 |
- # Remove subversion tags from config files to avoid useless config updates |
525 |
- sed -i \ |
526 |
- -e '/<!-- \$Id:/ d' \ |
527 |
- "${ED}"/etc/opendnssec/* || die |
528 |
- |
529 |
- # install db update/migration stuff |
530 |
- insinto /usr/share/opendnssec/db |
531 |
- if use sqlite; then |
532 |
- doins enforcer/utils/convert_mysql_to_sqlite |
533 |
- fi |
534 |
- if use mysql; then |
535 |
- doins enforcer/utils/convert_sqlite_to_mysql |
536 |
- fi |
537 |
- |
538 |
- insinto /usr/share/opendnssec/db/sql |
539 |
- if use sqlite; then |
540 |
- doins enforcer/src/db/schema.sqlite |
541 |
- fi |
542 |
- if use mysql; then |
543 |
- doins enforcer/src/db/schema.mysql |
544 |
- fi |
545 |
- |
546 |
- insinto /usr/share/opendnssec/db/1.4-2.0_db_convert |
547 |
- doins enforcer/utils/1.4-2.0_db_convert/find_problematic_zones.sql |
548 |
- doins enforcer/utils/1.4-2.0_db_convert/README.md |
549 |
- if use sqlite; then |
550 |
- doins enforcer/utils/1.4-2.0_db_convert/sqlite_convert.sql |
551 |
- doins enforcer/utils/1.4-2.0_db_convert/convert_sqlite |
552 |
- fi |
553 |
- if use mysql; then |
554 |
- doins enforcer/utils/1.4-2.0_db_convert/convert_mysql |
555 |
- doins enforcer/utils/1.4-2.0_db_convert/mysql_convert.sql |
556 |
- fi |
557 |
- |
558 |
- # patch scripts to find schema files |
559 |
- sed -i \ |
560 |
- -e 's,^SCHEMA=../src/db/,SCHEMA=/usr/share/opendnssec/db/sql/,' \ |
561 |
- -e 's,^SCHEMA=../../src/db/,SCHEMA=/usr/share/opendnssec/db/sql/,' \ |
562 |
- "${ED}"/usr/share/opendnssec/db/convert_* \ |
563 |
- "${ED}"/usr/share/opendnssec/db/1.4-2.0_db_convert/convert_* |
564 |
- |
565 |
- # fix permissions |
566 |
- fowners root:opendnssec /etc/opendnssec |
567 |
- fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml |
568 |
- fowners opendnssec:opendnssec /var/lib/opendnssec/{,enforcer,signconf,signed,signer,unsigned} |
569 |
- |
570 |
- # install conf/init script |
571 |
- newinitd "${FILESDIR}"/opendnssec.initd opendnssec |
572 |
- newconfd "${FILESDIR}"/opendnssec.confd opendnssec |
573 |
-} |
574 |
- |
575 |
-pkg_postinst() { |
576 |
- local v |
577 |
- if use softhsm; then |
578 |
- elog "Please make sure that you create your softhsm database in a location writeable" |
579 |
- elog "by the opendnssec user. You can set its location in /etc/softhsm.conf." |
580 |
- elog "Suggested configuration is:" |
581 |
- elog " echo \"0:/var/lib/opendnssec/softhsm_slot0.db\" >> /etc/softhsm.conf" |
582 |
- elog " softhsm --init-token --slot 0 --label OpenDNSSEC" |
583 |
- elog " chown opendnssec:opendnssec /var/lib/opendnssec/softhsm_slot0.db" |
584 |
- fi |
585 |
- for v in $REPLACING_VERSIONS; do |
586 |
- case $v in |
587 |
- 1.4.*) |
588 |
- ewarn "" |
589 |
- ewarn "You are upgrading from version 1.4." |
590 |
- ewarn "" |
591 |
- ewarn "A migration is needed from 1.4 to 2.0." |
592 |
- ewarn "For details see /usr/share/doc/${P}/MIGRATION*" |
593 |
- ewarn "" |
594 |
- ewarn "For your convenience the mentioned migration scripts and README" |
595 |
- ewarn "have been installed to /usr/share/${PN}/db/1.4-2.0_db_convert" |
596 |
- ewarn "" |
597 |
- ;; |
598 |
- esac |
599 |
- done |
600 |
-} |