summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2016-08-23 17:47:40 +0200
committerMarc Schiffbauer <mschiff@gentoo.org>2016-08-23 17:48:33 +0200
commit4682b8281173d153f8d7bddec72d49b45322f123 (patch)
tree4dc4b0405b43325a8ecdbb52d8dbb8d947c62869 /net-dns/opendnssec
parentnet-dns/opendnssec: bump 1.4 branch (diff)
downloadgentoo-4682b8281173d153f8d7bddec72d49b45322f123.tar.gz
gentoo-4682b8281173d153f8d7bddec72d49b45322f123.tar.bz2
gentoo-4682b8281173d153f8d7bddec72d49b45322f123.zip
net-dns/opendnssec: added version 2.0.1
Package-Manager: portage-2.3.0
Diffstat (limited to 'net-dns/opendnssec')
-rw-r--r--net-dns/opendnssec/Manifest1
-rw-r--r--net-dns/opendnssec/files/opendnssec-drop-privileges-2.0.x.patch29
-rw-r--r--net-dns/opendnssec/files/opendnssec-fix-localstatedir-2.0.x.patch22
-rw-r--r--net-dns/opendnssec/files/opendnssec-fix-run-dir-2.0.x.patch24
-rw-r--r--net-dns/opendnssec/opendnssec-2.0.1.ebuild240
5 files changed, 316 insertions, 0 deletions
diff --git a/net-dns/opendnssec/Manifest b/net-dns/opendnssec/Manifest
index 4f982504b39a..156c921950ae 100644
--- a/net-dns/opendnssec/Manifest
+++ b/net-dns/opendnssec/Manifest
@@ -1,3 +1,4 @@
DIST opendnssec-1.3.18.tar.gz 1143889 SHA256 e61d23ae0cc57b6e09d408bade6872fe5241896c61a03e8bc5ceeb65df13a676 SHA512 5df39ba778c9b1245e88b81df7aa491bca0aad2943845284c4f8b4dd729fa69014d45f07bdf99a048ccf668a1c9675a8dd99efcec1abdbd4e06e9738fec6ab6d WHIRLPOOL 7213b8f2f86651114449bc4734452d6065960e26ee289051949ca27ae3b23280cea45ff707f71942eef91c9009200272c0985ef3d3de43c9343ad2e1e54303ce
DIST opendnssec-1.4.10.tar.gz 1036069 SHA256 55b44c1da3a665eef0af1d1b3f4d1c57d20f50f77858b1dd3d03ca6ebc1df7cb SHA512 00ba6ceba595f9d4d7736af982b78779f204eb52fcf92222256792368328647ca1a4c84b4db64dcdd9a0119292f132a4efd15e60436c2a125bf6a8fb3f33540e WHIRLPOOL 2122feed10b83b38f8954ebaaf5d065bbf124d573c085559d0b3542dc8b58b8c55a489ceda9707836501a03efbe7a81bc7518e394c86ef1f682822943bbc0a82
DIST opendnssec-1.4.8.2.tar.gz 1043171 SHA256 7fd553ee39173e807477ed1daff6ee2f8b1c83875cd2e52a1df3315bf0015513 SHA512 7f2e10b425f60947aca40c61509b07ddc4363105cc882b518ffa816437299d6f881411cb38325f27b3a34c2005953988b39c945362866dd0f1f7c6ef973bfa06 WHIRLPOOL 38079a89d8e3d039aeab28c80b7fb1a9739014736d6076442c546fae1b13e1c89faa1858beb6f4d2f495d19a2a1187a7af10c55c0ed33563bc9b2d57945de807
+DIST opendnssec-2.0.1.tar.gz 1101523 SHA256 bf874bbb346699a5b539699f90a54e0c15fff0574df7a3c118abb30938b7b346 SHA512 aa12818f92688e087acaff8a6771d2a7da733e04d9e821967d313c7ff880a1056f470b11988eba1e7aad606418c3a4587f654163d74f68e3f61943c74d86d052 WHIRLPOOL 865fbd0d21cd015e87da5f26858e39a233464fb04e56a21683b4713d3836b925eea80973446571da78730ef765d5a1a3fc5f8ad192dd09fdf6eb7467ae417769
diff --git a/net-dns/opendnssec/files/opendnssec-drop-privileges-2.0.x.patch b/net-dns/opendnssec/files/opendnssec-drop-privileges-2.0.x.patch
new file mode 100644
index 000000000000..f3adc487dee9
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-drop-privileges-2.0.x.patch
@@ -0,0 +1,29 @@
+diff -ur opendnssec-2.0.1.orig/conf/conf.xml.in opendnssec-2.0.1/conf/conf.xml.in
+--- opendnssec-2.0.1.orig/conf/conf.xml.in 2016-07-21 16:15:27.000000000 +0200
++++ opendnssec-2.0.1/conf/conf.xml.in 2016-08-23 15:21:09.633384446 +0200
+@@ -36,12 +36,10 @@
+ </Common>
+
+ <Enforcer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <Datastore><SQLite>@OPENDNSSEC_STATE_DIR@/kasp.db</SQLite></Datastore>
+ <!--The enforcer interval parameter is no long used in 2.0 and will be deprecated in 2.1 -->
+@@ -60,12 +58,10 @@
+ </Enforcer>
+
+ <Signer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/signer</WorkingDirectory>
+ <WorkerThreads>4</WorkerThreads>
diff --git a/net-dns/opendnssec/files/opendnssec-fix-localstatedir-2.0.x.patch b/net-dns/opendnssec/files/opendnssec-fix-localstatedir-2.0.x.patch
new file mode 100644
index 000000000000..5940c2f050e6
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-fix-localstatedir-2.0.x.patch
@@ -0,0 +1,22 @@
+diff -ur opendnssec-2.0.1.orig/Makefile.am opendnssec-2.0.1/Makefile.am
+--- opendnssec-2.0.1.orig/Makefile.am 2016-07-21 16:15:00.000000000 +0200
++++ opendnssec-2.0.1/Makefile.am 2016-08-23 14:01:50.618393034 +0200
+@@ -30,12 +30,12 @@
+
+ install-data-hook:
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signer
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/enforcer
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signconf
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/unsigned
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signed
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signer
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/enforcer
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
+
diff --git a/net-dns/opendnssec/files/opendnssec-fix-run-dir-2.0.x.patch b/net-dns/opendnssec/files/opendnssec-fix-run-dir-2.0.x.patch
new file mode 100644
index 000000000000..5ea9c80f2ba7
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-fix-run-dir-2.0.x.patch
@@ -0,0 +1,24 @@
+diff -ur opendnssec-2.0.1.orig/m4/opendnssec_common.m4 opendnssec-2.0.1/m4/opendnssec_common.m4
+--- opendnssec-2.0.1.orig/m4/opendnssec_common.m4 2016-07-21 16:15:00.000000000 +0200
++++ opendnssec-2.0.1/m4/opendnssec_common.m4 2016-08-23 14:42:35.033460972 +0200
+@@ -17,7 +17,7 @@
+ OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec
+ OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec
+ OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/opendnssec"
+-OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec"
++OPENDNSSEC_PID_DIR="${destdir}/run/opendnssec"
+
+ AC_SUBST([OPENDNSSEC_BIN_DIR])
+ AC_SUBST([OPENDNSSEC_SBIN_DIR])
+diff -ur opendnssec-2.0.1.orig/Makefile.am opendnssec-2.0.1/Makefile.am
+--- opendnssec-2.0.1.orig/Makefile.am 2016-08-23 14:40:10.009951791 +0200
++++ opendnssec-2.0.1/Makefile.am 2016-08-23 14:43:20.377870776 +0200
+@@ -36,8 +36,6 @@
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
+
+ docs:
+ (cd libhsm; $(MAKE) doxygen)
diff --git a/net-dns/opendnssec/opendnssec-2.0.1.ebuild b/net-dns/opendnssec/opendnssec-2.0.1.ebuild
new file mode 100644
index 000000000000..f2caf66c39dc
--- /dev/null
+++ b/net-dns/opendnssec/opendnssec-2.0.1.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P="${P/_}"
+PKCS11_IUSE="+softhsm opensc external-hsm"
+inherit autotools eutils multilib user
+
+DESCRIPTION="An open-source turn-key solution for DNSSEC"
+HOMEPAGE="http://www.opendnssec.org/"
+SRC_URI="http://www.${PN}.org/files/source/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +mysql readline +signer sqlite test ${PKCS11_IUSE}"
+
+RDEPEND="
+ dev-lang/perl
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-libs/ldns
+ mysql? (
+ virtual/mysql
+ 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}
+ 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"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+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=<path>"
+ ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>"
+ ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>"
+ ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>"
+ ewarn "Example:"
+ ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec"
+ ewarn "or store the variable into /etc/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 "<net-dns/opendnssec-1.4.10"; then
+ ################################################################################
+ eerror "You are already using OpenDNSSEC."
+ eerror "In order to migrate to version >=2.0.0 you need to upgrade to"
+ eerror "version >=1.4.10 first:"
+ eerror ""
+ eerror " emerge \"<net-dns/opendnssec-2\""
+ eerror ""
+ eerror "See https://github.com/opendnssec/opendnssec/blob/2.0/master/MIGRATION"
+ eerror "for details."
+ eerror ""
+ die "Please upgrade to version >=1.4.10 first for proper db migraion"
+ fi
+
+ check_pkcs11_setup
+}
+
+pkg_setup() {
+ enewgroup opendnssec
+ enewuser opendnssec -1 -1 -1 opendnssec
+
+ # pretend does not preserve variables so we need to run this once more
+ check_pkcs11_setup
+}
+
+src_prepare() {
+ local patch
+ default
+ for patch in "${PATCHES[@]}"; do
+ epatch "$patch"
+ done
+ 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 '/<!-- \$Id:/ d' \
+ "${ED}"/etc/opendnssec/* || die
+
+ # install db update/migration stuff
+ insinto /usr/share/opendnssec/db
+ if use sqlite; then
+ doins enforcer/utils/convert_mysql_to_sqlite
+ fi
+ if use mysql; then
+ doins enforcer/utils/convert_sqlite_to_mysql
+ fi
+
+ insinto /usr/share/opendnssec/db/sql
+ if use sqlite; then
+ doins enforcer/src/db/schema.sqlite
+ fi
+ if use mysql; then
+ doins enforcer/src/db/schema.mysql
+ fi
+
+ insinto /usr/share/opendnssec/db/1.4-2.0_db_convert
+ doins enforcer/utils/1.4-2.0_db_convert/find_problematic_zones.sql
+ doins enforcer/utils/1.4-2.0_db_convert/README.md
+ if use sqlite; then
+ doins enforcer/utils/1.4-2.0_db_convert/sqlite_convert.sql
+ doins enforcer/utils/1.4-2.0_db_convert/convert_sqlite
+ fi
+ if use mysql; then
+ doins enforcer/utils/1.4-2.0_db_convert/convert_mysql
+ doins enforcer/utils/1.4-2.0_db_convert/mysql_convert.sql
+ fi
+
+ # patch scripts to find schema files
+ sed -i \
+ -e 's,^SCHEMA=../src/db/,/usr/share/opendnssec/db/,' \
+ -e 's,^SCHEMA=../../src/db/,/usr/share/opendnssec/db/,' \
+ "${ED}"/usr/share/opendnssec/db/convert_* \
+ "${ED}"/usr/share/opendnssec/db/1.4-2.0_db_convert/convert_*
+
+ # fix permissions
+ fowners root:opendnssec /etc/opendnssec
+ fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml
+ fowners opendnssec:opendnssec /var/lib/opendnssec/{,enforcer,signconf,signed,signer,unsigned}
+
+ # install conf/init script
+ newinitd "${FILESDIR}"/opendnssec.initd opendnssec
+ newconfd "${FILESDIR}"/opendnssec.confd opendnssec
+}
+
+pkg_postinst() {
+ local v
+ if use softhsm; then
+ elog "Please make sure that you create your softhsm database in a location writeable"
+ elog "by the opendnssec user. You can set its location in /etc/softhsm.conf."
+ elog "Suggested configuration is:"
+ elog " echo \"0:/var/lib/opendnssec/softhsm_slot0.db\" >> /etc/softhsm.conf"
+ elog " softhsm --init-token --slot 0 --label OpenDNSSEC"
+ elog " chown opendnssec:opendnssec /var/lib/opendnssec/softhsm_slot0.db"
+ fi
+ for v in $REPLACING_VERSIONS; do
+ case $v in
+ 1.4.*)
+ ewarn ""
+ ewarn "You are upgrading from version 1.4."
+ ewarn ""
+ ewarn "A migration is needed from 1.4 to 2.0."
+ ewarn "For details see /usr/share/doc/${P}/MIGRATION*"
+ ewarn ""
+ ewarn "For your convenience the mentioned migration scripts and README"
+ ewarn "have been installed to /usr/share/${PN}/db/1.4-2.0_db_convert"
+ ewarn ""
+ ;;
+ esac
+ done
+}