From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AC1D413933E for ; Tue, 13 Jul 2021 20:57:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0954E0DDE; Tue, 13 Jul 2021 20:57:36 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 957D1E0DDE for ; Tue, 13 Jul 2021 20:57:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 53792342CFE for ; Tue, 13 Jul 2021 20:57:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8A2207FE for ; Tue, 13 Jul 2021 20:57:30 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1626209713.3172a8041d5b126c5e735e4be879cba2a0322dfc.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/opendnssec/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-dns/opendnssec/opendnssec-2.0.3-r2.ebuild X-VCS-Directories: net-dns/opendnssec/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 3172a8041d5b126c5e735e4be879cba2a0322dfc X-VCS-Branch: master Date: Tue, 13 Jul 2021 20:57:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b6f3b93a-7154-4e32-bb85-1ef53a2c0a0f X-Archives-Hash: ad54b56e86e9c9386022a95b63b4182e commit: 3172a8041d5b126c5e735e4be879cba2a0322dfc Author: Conrad Kostecki gentoo org> AuthorDate: Tue Jul 13 19:38:53 2021 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Tue Jul 13 20:55:13 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3172a804 net-dns/opendnssec: migrate to GLEP 81 Bug: https://bugs.gentoo.org/781383 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Conrad Kostecki gentoo.org> net-dns/opendnssec/opendnssec-2.0.3-r2.ebuild | 242 ++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) diff --git a/net-dns/opendnssec/opendnssec-2.0.3-r2.ebuild b/net-dns/opendnssec/opendnssec-2.0.3-r2.ebuild new file mode 100644 index 00000000000..17efc48d490 --- /dev/null +++ b/net-dns/opendnssec/opendnssec-2.0.3-r2.ebuild @@ -0,0 +1,242 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_P="${P/_}" +PKCS11_IUSE="+softhsm opensc external-hsm" + +inherit autotools + +DESCRIPTION="An open-source turn-key solution for DNSSEC" +HOMEPAGE="https://www.opendnssec.org/" +SRC_URI="https://www.${PN}.org/files/source/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc +mysql readline +signer sqlite test ${PKCS11_IUSE}" +RESTRICT="!test? ( test )" + +RDEPEND=" + acct-group/opendnssec + acct-user/opendnssec + dev-lang/perl + dev-libs/libxml2 + dev-libs/libxslt + net-libs/ldns + mysql? ( + dev-db/mysql-connector-c:0= + dev-perl/DBD-mysql + ) + opensc? ( dev-libs/opensc ) + readline? ( sys-libs/readline:0 ) + softhsm? ( dev-libs/softhsm:* ) + sqlite? ( + dev-db/sqlite:3 + dev-perl/DBD-SQLite + ) +" + +DEPEND="${RDEPEND}" + +BDEPEND=" + doc? ( app-doc/doxygen ) + test? ( + app-text/trang + ) +" + +REQUIRED_USE=" + ^^ ( mysql sqlite ) + ^^ ( softhsm opensc external-hsm ) +" + +PATCHES=( + "${FILESDIR}/${PN}-fix-localstatedir-2.0.x.patch" + "${FILESDIR}/${PN}-fix-run-dir-2.0.x.patch" + "${FILESDIR}/${PN}-drop-privileges-2.0.x.patch" + "${FILESDIR}/${PN}-use-system-trang.patch" + "${FILESDIR}/${PN}-openssl1.1.patch" +) + +DOCS=( MIGRATION NEWS ) + +check_pkcs11_setup() { + # PKCS#11 HSM's are often only available with proprietary drivers not + # available in portage tree. + + if use softhsm; then + PKCS11_LIB=softhsm + if has_version ">=dev-libs/softhsm-1.3.1"; then + PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so + else + PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so + fi + elog "Building with SoftHSM PKCS#11 library support." + fi + if use opensc; then + PKCS11_LIB=opensc + PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so + elog "Building with OpenSC PKCS#11 library support." + fi + if use external-hsm; then + if [[ -n ${PKCS11_SCA6000} ]]; then + PKCS11_LIB=sca6000 + PKCS11_PATH=${PKCS11_SCA6000} + elif [[ -n ${PKCS11_ETOKEN} ]]; then + PKCS11_LIB=etoken + PKCS11_PATH=${PKCS11_ETOKEN} + elif [[ -n ${PKCS11_NCIPHER} ]]; then + PKCS11_LIB=ncipher + PKCS11_PATH=${PKCS11_NCIPHER} + elif [[ -n ${PKCS11_AEPKEYPER} ]]; then + PKCS11_LIB=aepkeyper + PKCS11_PATH=${PKCS11_AEPKEYPER} + else + ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11" + ewarn "library. To set a path, set one of the following environment variables:" + ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=" + ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=" + ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=" + ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=" + ewarn "Example:" + ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec" + ewarn "or store the variable into /etc/portage/make.conf" + die "USE flag 'external-hsm' set but no PKCS#11 library path specified." + fi + elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}" + fi +} + +pkg_pretend() { + if has_version "=2.0.0 you need to upgrade to" + eerror "version >=1.4.10 first:" + eerror "" + eerror " emerge \"=1.4.10 first for proper db migraion" + fi + + check_pkcs11_setup +} + +pkg_setup() { + # pretend does not preserve variables so we need to run this once more + check_pkcs11_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --without-cunit \ + --localstatedir="${EPREFIX}/var" \ + --disable-static \ + --with-enforcer-database=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \ + --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \ + $(use_with readline) \ + $(use_enable signer) +} + +src_compile() { + default + use doc && emake docs +} + +src_install() { + default + + # remove useless .la files + find "${ED}" -name '*.la' -delete + + # Remove subversion tags from config files to avoid useless config updates + sed -i \ + -e '/