diff options
Diffstat (limited to 'net-dns')
410 files changed, 20387 insertions, 0 deletions
diff --git a/net-dns/avahi/Manifest b/net-dns/avahi/Manifest new file mode 100644 index 000000000000..0206eaaa522b --- /dev/null +++ b/net-dns/avahi/Manifest @@ -0,0 +1 @@ +DIST avahi-0.6.31.tar.gz 1268686 SHA256 8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48 SHA512 53eb00d570a274d841e1e6ad07da077950089ae39b4f7aa21fcd21cc5320b30b506b43e7e57e56198e155cc7bd289b779a48b2b2fc002dc6194a946110451858 WHIRLPOOL a6d97b87dfbb81be359ee03d8f32ebafdbb311bd596d686aeb55a2952ecb6c7c84466b1230e70392ffe23a20a56da7e0a5bd00c8dc1812b2156c0b4a8022144f diff --git a/net-dns/avahi/avahi-0.6.31-r6.ebuild b/net-dns/avahi/avahi-0.6.31-r6.ebuild new file mode 100644 index 000000000000..a6e13444156f --- /dev/null +++ b/net-dns/avahi/avahi-0.6.31-r6.ebuild @@ -0,0 +1,248 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="gdbm" + +WANT_AUTOMAKE=1.11 + +inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \ + python-r1 systemd user + +DESCRIPTION="System which facilitates service discovery on a local network" +HOMEPAGE="http://avahi.org/" +SRC_URI="http://avahi.org/download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux" +IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils" + +REQUIRED_USE=" + utils? ( || ( gtk gtk3 ) ) + python? ( dbus gdbm ) + mono? ( dbus ) + howl-compat? ( dbus ) + mdnsresponder-compat? ( dbus ) +" + +COMMON_DEPEND=" + dev-libs/libdaemon + dev-libs/expat + >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] + gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] ) + qt4? ( dev-qt/qtcore:4 ) + gtk? ( x11-libs/gtk+:2 ) + gtk3? ( x11-libs/gtk+:3 ) + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) + kernel_linux? ( sys-libs/libcap ) + introspection? ( dev-libs/gobject-introspection ) + mono? ( + dev-lang/mono + gtk? ( dev-dotnet/gtk-sharp ) + ) + python? ( + ${PYTHON_DEPS} + gtk? ( dev-python/pygtk ) + dbus? ( dev-python/dbus-python ) + ) + bookmarks? ( + dev-python/twisted-core + dev-python/twisted-web + ) +" + +DEPEND=" + ${COMMON_DEPEND} + dev-util/intltool + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] + doc? ( + app-doc/doxygen + ) +" + +RDEPEND=" + ${COMMON_DEPEND} + howl-compat? ( !net-misc/howl ) + mdnsresponder-compat? ( !net-misc/mDNSResponder ) + selinux? ( sec-policy/selinux-avahi ) +" + +MULTILIB_WRAPPED_HEADERS=( + # necessary until the UI libraries are ported + /usr/include/avahi-qt4/qt-watch.h + /usr/include/avahi-ui/avahi-ui.h +) + +pkg_preinst() { + enewgroup netdev + enewgroup avahi + enewuser avahi -1 -1 -1 avahi + + if use autoipd; then + enewgroup avahi-autoipd + enewuser avahi-autoipd -1 -1 -1 avahi-autoipd + fi +} + +pkg_setup() { + use mono && mono-env_pkg_setup +} + +src_prepare() { + if use ipv6; then + sed -i \ + -e s/use-ipv6=no/use-ipv6=yes/ \ + avahi-daemon/avahi-daemon.conf || die + fi + + sed -i\ + -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \ + doxygen_to_devhelp.xsl || die + + # Make gtk utils optional + epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch + + # Fix init scripts for >=openrc-0.9.0, bug #383641 + epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch + + # install-exec-local -> install-exec-hook + epatch "${FILESDIR}"/${P}-install-exec-hook.patch + + # Backport host-name-from-machine-id patch, bug #466134 + epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch + + # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575 + epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch + + epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch + + # allow building client without the daemon + epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch + + # Fix build under various locales, bug #501664 + epatch "${FILESDIR}"/${P}-fix-locale-build.patch + + # Drop DEPRECATED flags, bug #384743 + sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die + + # Fix references to Lennart's home directory, bug #466210 + sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die + + # Prevent .pyc files in DESTDIR + >py-compile + + eautoreconf + + # bundled manpages + multilib_copy_sources +} + +src_configure() { + # those steps should be done once-per-ebuild rather than per-ABI + use sh && replace-flags -O? -O0 + use python && python_export_best + + # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module + unset DISPLAY + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( --disable-static ) + + if use python; then + myconf+=( + $(multilib_native_use_enable dbus python-dbus) + $(multilib_native_use_enable gtk pygtk) + ) + fi + + if use mono; then + myconf+=( $(multilib_native_use_enable doc monodoc) ) + fi + + if ! multilib_is_native_abi; then + myconf+=( + # used by daemons only + --disable-libdaemon + --with-xml=none + ) + fi + + econf \ + --localstatedir="${EPREFIX}/var" \ + --with-distro=gentoo \ + --disable-python-dbus \ + --disable-pygtk \ + --disable-xmltoman \ + --disable-monodoc \ + --enable-glib \ + --enable-gobject \ + $(multilib_native_use_enable test tests) \ + $(multilib_native_use_enable autoipd) \ + $(use_enable mdnsresponder-compat compat-libdns_sd) \ + $(use_enable howl-compat compat-howl) \ + $(multilib_native_use_enable doc doxygen-doc) \ + $(multilib_native_use_enable mono) \ + $(use_enable dbus) \ + $(multilib_native_use_enable python) \ + $(multilib_native_use_enable gtk) \ + $(multilib_native_use_enable gtk3) \ + $(use_enable nls) \ + $(multilib_native_use_enable introspection) \ + $(multilib_native_use_enable utils gtk-utils) \ + --disable-qt3 \ + $(multilib_native_use_enable qt4) \ + $(use_enable gdbm) \ + $(systemd_with_unitdir) \ + "${myconf[@]}" +} + +multilib_src_compile() { + emake + + multilib_is_native_abi && use doc && emake avahi.devhelp +} + +multilib_src_install() { + emake install DESTDIR="${D}" + use bookmarks && use python && use dbus && use gtk || \ + rm -f "${ED}"/usr/bin/avahi-bookmarks + + use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc + use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h + + if multilib_is_native_abi && use doc; then + dohtml -r doxygen/html/. || die + insinto /usr/share/devhelp/books/avahi + doins avahi.devhelp || die + fi +} + +multilib_src_install_all() { + if use autoipd; then + insinto /$(get_libdir)/rcscripts/net + doins "${FILESDIR}"/autoipd.sh + + insinto /$(get_libdir)/netifrc/net + newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh + fi + + dodoc docs/{AUTHORS,NEWS,README,TODO} + + prune_libtool_files --all +} + +pkg_postinst() { + if use autoipd; then + elog + elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)" + elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!" + elog + fi +} diff --git a/net-dns/avahi/avahi-0.6.31-r7.ebuild b/net-dns/avahi/avahi-0.6.31-r7.ebuild new file mode 100644 index 000000000000..974a9e7fda68 --- /dev/null +++ b/net-dns/avahi/avahi-0.6.31-r7.ebuild @@ -0,0 +1,245 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="gdbm" + +WANT_AUTOMAKE=1.11 + +inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \ + python-r1 systemd user + +DESCRIPTION="System which facilitates service discovery on a local network" +HOMEPAGE="http://avahi.org/" +SRC_URI="http://avahi.org/download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux" +IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils" + +REQUIRED_USE=" + utils? ( || ( gtk gtk3 ) ) + python? ( dbus gdbm ) + mono? ( dbus ) + howl-compat? ( dbus ) + mdnsresponder-compat? ( dbus ) +" + +COMMON_DEPEND=" + dev-libs/libdaemon + dev-libs/expat + >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] + gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] ) + qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] ) + gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] ) + gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] ) + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) + kernel_linux? ( sys-libs/libcap ) + introspection? ( dev-libs/gobject-introspection ) + mono? ( + dev-lang/mono + gtk? ( dev-dotnet/gtk-sharp ) + ) + python? ( + ${PYTHON_DEPS} + gtk? ( dev-python/pygtk ) + dbus? ( dev-python/dbus-python ) + ) + bookmarks? ( + dev-python/twisted-core + dev-python/twisted-web + ) +" + +DEPEND=" + ${COMMON_DEPEND} + dev-util/intltool + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] + doc? ( + app-doc/doxygen + ) +" + +RDEPEND=" + ${COMMON_DEPEND} + howl-compat? ( !net-misc/howl ) + mdnsresponder-compat? ( !net-misc/mDNSResponder ) + selinux? ( sec-policy/selinux-avahi ) +" + +pkg_preinst() { + enewgroup netdev + enewgroup avahi + enewuser avahi -1 -1 -1 avahi + + if use autoipd; then + enewgroup avahi-autoipd + enewuser avahi-autoipd -1 -1 -1 avahi-autoipd + fi +} + +pkg_setup() { + use mono && mono-env_pkg_setup +} + +src_prepare() { + if use ipv6; then + sed -i \ + -e s/use-ipv6=no/use-ipv6=yes/ \ + avahi-daemon/avahi-daemon.conf || die + fi + + sed -i\ + -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \ + doxygen_to_devhelp.xsl || die + + # Make gtk utils optional + epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch + + # Fix init scripts for >=openrc-0.9.0, bug #383641 + epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch + + # install-exec-local -> install-exec-hook + epatch "${FILESDIR}"/${P}-install-exec-hook.patch + + # Backport host-name-from-machine-id patch, bug #466134 + epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch + + # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575 + epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch + + epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch + + # allow building client without the daemon + epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch + + # Fix build under various locales, bug #501664 + epatch "${FILESDIR}"/${P}-fix-locale-build.patch + + # Drop DEPRECATED flags, bug #384743 + sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die + + # Fix references to Lennart's home directory, bug #466210 + sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die + + # Bug #525832 + epatch_user + + # Prevent .pyc files in DESTDIR + >py-compile + + eautoreconf + + # bundled manpages + multilib_copy_sources +} + +src_configure() { + # those steps should be done once-per-ebuild rather than per-ABI + use sh && replace-flags -O? -O0 + use python && python_export_best + + # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module + unset DISPLAY + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( --disable-static ) + + if use python; then + myconf+=( + $(multilib_native_use_enable dbus python-dbus) + $(multilib_native_use_enable gtk pygtk) + ) + fi + + if use mono; then + myconf+=( $(multilib_native_use_enable doc monodoc) ) + fi + + if ! multilib_is_native_abi; then + myconf+=( + # used by daemons only + --disable-libdaemon + --with-xml=none + ) + fi + + econf \ + --localstatedir="${EPREFIX}/var" \ + --with-distro=gentoo \ + --disable-python-dbus \ + --disable-pygtk \ + --disable-xmltoman \ + --disable-monodoc \ + --enable-glib \ + --enable-gobject \ + $(multilib_native_use_enable test tests) \ + $(multilib_native_use_enable autoipd) \ + $(use_enable mdnsresponder-compat compat-libdns_sd) \ + $(use_enable howl-compat compat-howl) \ + $(multilib_native_use_enable doc doxygen-doc) \ + $(multilib_native_use_enable mono) \ + $(use_enable dbus) \ + $(multilib_native_use_enable python) \ + $(use_enable gtk) \ + $(use_enable gtk3) \ + $(use_enable nls) \ + $(multilib_native_use_enable introspection) \ + $(multilib_native_use_enable utils gtk-utils) \ + --disable-qt3 \ + $(use_enable qt4) \ + $(use_enable gdbm) \ + $(systemd_with_unitdir) \ + "${myconf[@]}" +} + +multilib_src_compile() { + emake + + multilib_is_native_abi && use doc && emake avahi.devhelp +} + +multilib_src_install() { + emake install DESTDIR="${D}" + use bookmarks && use python && use dbus && use gtk || \ + rm -f "${ED}"/usr/bin/avahi-bookmarks + + use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc + use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h + + if multilib_is_native_abi && use doc; then + dohtml -r doxygen/html/. || die + insinto /usr/share/devhelp/books/avahi + doins avahi.devhelp || die + fi +} + +multilib_src_install_all() { + if use autoipd; then + insinto /$(get_libdir)/rcscripts/net + doins "${FILESDIR}"/autoipd.sh + + insinto /$(get_libdir)/netifrc/net + newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh + fi + + dodoc docs/{AUTHORS,NEWS,README,TODO} + + prune_libtool_files --all +} + +pkg_postinst() { + if use autoipd; then + elog + elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)" + elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!" + elog + fi +} diff --git a/net-dns/avahi/avahi-0.6.31-r8.ebuild b/net-dns/avahi/avahi-0.6.31-r8.ebuild new file mode 100644 index 000000000000..a1bde8114a35 --- /dev/null +++ b/net-dns/avahi/avahi-0.6.31-r8.ebuild @@ -0,0 +1,250 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="gdbm" + +WANT_AUTOMAKE=1.11 + +inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \ + python-r1 systemd user + +DESCRIPTION="System which facilitates service discovery on a local network" +HOMEPAGE="http://avahi.org/" +SRC_URI="http://avahi.org/download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux" +IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils" + +REQUIRED_USE=" + utils? ( || ( gtk gtk3 ) ) + python? ( dbus gdbm ) + mono? ( dbus ) + howl-compat? ( dbus ) + mdnsresponder-compat? ( dbus ) +" + +COMMON_DEPEND=" + dev-libs/libdaemon + dev-libs/expat + >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] + gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] ) + qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] ) + gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] ) + gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] ) + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) + kernel_linux? ( sys-libs/libcap ) + introspection? ( dev-libs/gobject-introspection:= ) + mono? ( + dev-lang/mono + gtk? ( dev-dotnet/gtk-sharp ) + ) + python? ( + ${PYTHON_DEPS} + gtk? ( dev-python/pygtk ) + dbus? ( dev-python/dbus-python ) + ) + bookmarks? ( + dev-python/twisted-core + dev-python/twisted-web + ) +" + +DEPEND=" + ${COMMON_DEPEND} + dev-util/intltool + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] + doc? ( + app-doc/doxygen + ) +" + +RDEPEND=" + ${COMMON_DEPEND} + howl-compat? ( !net-misc/howl ) + mdnsresponder-compat? ( !net-misc/mDNSResponder ) + selinux? ( sec-policy/selinux-avahi ) +" + +pkg_preinst() { + enewgroup netdev + enewgroup avahi + enewuser avahi -1 -1 -1 avahi + + if use autoipd; then + enewgroup avahi-autoipd + enewuser avahi-autoipd -1 -1 -1 avahi-autoipd + fi +} + +pkg_setup() { + use mono && mono-env_pkg_setup +} + +src_prepare() { + if use ipv6; then + sed -i \ + -e s/use-ipv6=no/use-ipv6=yes/ \ + avahi-daemon/avahi-daemon.conf || die + fi + + sed -i\ + -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \ + doxygen_to_devhelp.xsl || die + + # Make gtk utils optional + epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch + + # Fix init scripts for >=openrc-0.9.0, bug #383641 + epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch + + # install-exec-local -> install-exec-hook + epatch "${FILESDIR}"/${P}-install-exec-hook.patch + + # Backport host-name-from-machine-id patch, bug #466134 + epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch + + # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575 + epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch + + epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch + + # allow building client without the daemon + epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch + + # Fix build under various locales, bug #501664 + epatch "${FILESDIR}"/${P}-fix-locale-build.patch + + # Drop DEPRECATED flags, bug #384743 + sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die + + # Fix references to Lennart's home directory, bug #466210 + sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die + + # Bug #525832 + epatch_user + + # Prevent .pyc files in DESTDIR + >py-compile + + eautoreconf + + # bundled manpages + multilib_copy_sources +} + +src_configure() { + # those steps should be done once-per-ebuild rather than per-ABI + use sh && replace-flags -O? -O0 + use python && python_export_best + + # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module + unset DISPLAY + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( --disable-static ) + + if use python; then + myconf+=( + $(multilib_native_use_enable dbus python-dbus) + $(multilib_native_use_enable gtk pygtk) + ) + fi + + if use mono; then + myconf+=( $(multilib_native_use_enable doc monodoc) ) + fi + + if ! multilib_is_native_abi; then + myconf+=( + # used by daemons only + --disable-libdaemon + --with-xml=none + ) + fi + + econf \ + --localstatedir="${EPREFIX}/var" \ + --with-distro=gentoo \ + --disable-python-dbus \ + --disable-pygtk \ + --disable-xmltoman \ + --disable-monodoc \ + --enable-glib \ + --enable-gobject \ + $(multilib_native_use_enable test tests) \ + $(multilib_native_use_enable autoipd) \ + $(use_enable mdnsresponder-compat compat-libdns_sd) \ + $(use_enable howl-compat compat-howl) \ + $(multilib_native_use_enable doc doxygen-doc) \ + $(multilib_native_use_enable mono) \ + $(use_enable dbus) \ + $(multilib_native_use_enable python) \ + $(use_enable gtk) \ + $(use_enable gtk3) \ + $(use_enable nls) \ + $(multilib_native_use_enable introspection) \ + $(multilib_native_use_enable utils gtk-utils) \ + --disable-qt3 \ + $(use_enable qt4) \ + $(use_enable gdbm) \ + $(systemd_with_unitdir) \ + "${myconf[@]}" +} + +multilib_src_compile() { + emake + + multilib_is_native_abi && use doc && emake avahi.devhelp +} + +multilib_src_install() { + emake install DESTDIR="${D}" + use bookmarks && use python && use dbus && use gtk || \ + rm -f "${ED}"/usr/bin/avahi-bookmarks + + use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc + use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h + + # Needed for running on systemd properly, bug #537000 + if multilib_is_native_abi; then + ln -s avahi-daemon.service "${D}$(systemd_get_unitdir)"/dbus-org.freedesktop.Avahi.service || die + fi + + if multilib_is_native_abi && use doc; then + dohtml -r doxygen/html/. || die + insinto /usr/share/devhelp/books/avahi + doins avahi.devhelp || die + fi +} + +multilib_src_install_all() { + if use autoipd; then + insinto /$(get_libdir)/rcscripts/net + doins "${FILESDIR}"/autoipd.sh + + insinto /$(get_libdir)/netifrc/net + newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh + fi + + dodoc docs/{AUTHORS,NEWS,README,TODO} + + prune_libtool_files --all +} + +pkg_postinst() { + if use autoipd; then + elog + elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)" + elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!" + elog + fi +} diff --git a/net-dns/avahi/files/autoipd-openrc.sh b/net-dns/avahi/files/autoipd-openrc.sh new file mode 100644 index 000000000000..dec3aa0521c1 --- /dev/null +++ b/net-dns/avahi/files/autoipd-openrc.sh @@ -0,0 +1,32 @@ +# Copyright (C) 2004-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Contributed by Sven Wegener (swegener@gentoo.org) + +_config_vars="$_config_vars autoipd" + +autoipd_depend() { + program /usr/sbin/avahi-autoipd + after interface +} + +autoipd_start() { + _exists true || return 1 + + eval args=\$autoipd_${IFVAR} + + ebegin "Starting avahi-autoipd" + /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}" + eend "${?}" || return 1 + + _show_address + + return 0 +} + +autoipd_stop() { + /usr/sbin/avahi-autoipd --check --syslog "${IFACE}" || return 0 + + ebegin "Stopping avahi-autoipd" + /usr/sbin/avahi-autoipd --kill --syslog "${IFACE}" + eend "${?}" +} diff --git a/net-dns/avahi/files/autoipd.sh b/net-dns/avahi/files/autoipd.sh new file mode 100644 index 000000000000..89d02e338bc3 --- /dev/null +++ b/net-dns/avahi/files/autoipd.sh @@ -0,0 +1,52 @@ +# Copyright (c) 2004-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Contributed by Sven Wegener (swegener@gentoo.org) + +# void autoipd_depend(void) +# +# Sets up the dependencies for the module +autoipd_depend() { + after interface +} + +# void autoipd_expose(void) +# +# Expose variables that can be configured +autoipd_expose() { + variables autoipd +} + +# bool autoipd_start(char *iface) +# +# Tries to configure the interface via avahi-autoipd +autoipd_start() { + local iface="${1}" ifvar="$(bash_variable "${iface}")" opts="autoipd_${ifvar}" addr="" + + interface_exists "${iface}" true || return 1 + + ebegin "Starting avahi-autoipd" + if /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${!opts} "${iface}" + then + eend 0 + addr="$(interface_get_address "${iface}")" + einfo "${iface} received address ${addr}" + return 0 + fi + + eend "${?}" "Failed to get address via avahi-autoipd!" +} + +# bool autoipd_stop(char *iface) +# +# Stops a running avahi-autoipd instance +autoipd_stop() { + local iface="${1}" + + /usr/sbin/avahi-autoipd --check --syslog "${iface}" || return 0 + + ebegin "Stopping avahi-autoipd" + /usr/sbin/avahi-autoipd --kill --syslog "${iface}" + eend "${?}" "Failed to stop running avahi-autoipd instance!" +} + +# vim: set ts=4 : diff --git a/net-dns/avahi/files/avahi-0.6.30-automake-1.11.2.patch b/net-dns/avahi/files/avahi-0.6.30-automake-1.11.2.patch new file mode 100644 index 000000000000..be385f6cfbe3 --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.30-automake-1.11.2.patch @@ -0,0 +1,102 @@ +http://bugs.gentoo.org/397477 + +--- avahi-python/avahi/Makefile.am ++++ avahi-python/avahi/Makefile.am +@@ -31,7 +31,7 @@ + -e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \ + -e 's,@CHECK_KEY\@,while key is not None:,g' \ + -e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \ +- -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \ ++ -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ && \ + chmod +x $@ + endif + +@@ -44,7 +44,7 @@ + -e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \ + -e 's,@CHECK_KEY\@,for key in keys:,g' \ + -e 's,@NEXT_KEY\@,,g' \ +- -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \ ++ -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ && \ + chmod +x $@ + endif + +--- avahi-python/avahi/ServiceTypeDatabase.py.in ++++ avahi-python/avahi/ServiceTypeDatabase.py.in +@@ -26,7 +26,7 @@ + class ServiceTypeDatabase: + """ServiceTypeDatabase maps service types to descriptions""" + +- def __init__(self, filename = "@pkglibdir@/service-types.db"): ++ def __init__(self, filename = "@pkgdatadir@/service-types.db"): + + self.db = @DBM@.open(filename, "r") + +--- avahi-ui/Makefile.am ++++ avahi-ui/Makefile.am +@@ -62,18 +62,18 @@ + + if HAVE_GDBM + libavahi_ui_la_SOURCES += ../avahi-utils/stdb.h ../avahi-utils/stdb.c +-libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" ++libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" + libavahi_ui_la_LIBADD += -lgdbm + +-libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" ++libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" + libavahi_ui_gtk3_la_LIBADD += -lgdbm + endif + + if HAVE_DBM + libavahi_ui_la_SOURCES += ../avahi-utils/stdb.h ../avahi-utils/stdb.c +-libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" ++libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" + +-libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" ++libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" + endif + + bin_PROGRAMS = bssh +--- avahi-utils/Makefile.am ++++ avahi-utils/Makefile.am +@@ -30,13 +30,13 @@ + + if HAVE_GDBM + avahi_browse_SOURCES += stdb.h stdb.c +-avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" ++avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" + avahi_browse_LDADD += -lgdbm + endif + + if HAVE_DBM + avahi_browse_SOURCES += stdb.h stdb.c +-avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" ++avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" + endif + + avahi_resolve_SOURCES = avahi-resolve.c sigint.c sigint.h +--- service-type-database/Makefile.am ++++ service-type-database/Makefile.am +@@ -18,13 +18,12 @@ + EXTRA_DIST=build-db.in service-types + + pkgdata_DATA=service-types +-pkglib_DATA= + + if HAVE_PYTHON + if HAVE_GDBM + + noinst_SCRIPTS=build-db +-pkglib_DATA+=service-types.db ++pkgdata_DATA+=service-types.db + + build-db: build-db.in + $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ +@@ -41,7 +40,7 @@ + if HAVE_DBM + + noinst_SCRIPTS=build-db +-pkglib_DATA+=service-types.db.pag service-types.db.dir ++pkgdata_DATA+=service-types.db.pag service-types.db.dir + + build-db: build-db.in + $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ diff --git a/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch new file mode 100644 index 000000000000..2c615a2b3a0a --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch @@ -0,0 +1,83 @@ +--- avahi-discover-standalone/Makefile.am ++++ avahi-discover-standalone/Makefile.am +@@ -23,7 +23,7 @@ + # This cool debug trap works on i386/gcc only + AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' + +-if HAVE_GTK2OR3 ++if ENABLE_GTK_UTILS + if HAVE_GLIB + bin_PROGRAMS = \ + avahi-discover-standalone +--- avahi-ui/Makefile.am ++++ avahi-ui/Makefile.am +@@ -76,6 +76,7 @@ + libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" + endif + ++if ENABLE_GTK_UTILS + bin_PROGRAMS = bssh + desktop_DATA += bssh.desktop bvnc.desktop + @INTLTOOL_DESKTOP_RULE@ +@@ -102,6 +103,7 @@ + bvnc.desktop.in: bvnc.desktop.in.in + $(AM_V_GEN)sed -e 's,@bindir\@,$(bindir),g' $< > $@ + ++endif # ENABLE_GTK_UTILS + endif # HAVE_GLIB + endif + endif +--- configure.ac ++++ configure.ac +@@ -564,7 +564,29 @@ + fi + AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes") + +-AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes" ) ++# ++# Check for GTK+ Utils ++# ++AC_ARG_ENABLE(gtk-utils, ++ AS_HELP_STRING([--disable-gtk-utils],[Disable GTK+ utilities]), ++ [case "${enableval}" in ++ yes) WANT_GTK_UTILS=yes ;; ++ no) WANT_GTK_UTILS=no ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk-utils) ;; ++ esac], ++ [WANT_GTK_UTILS=yes]) ++ ++ENABLE_GTK_UTILS=no ++HAVE_GTK2OR3=no ++if test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes"; then ++ HAVE_GTK2OR3=yes ++ if test "x$WANT_GTK_UTILS" = "xyes"; then ++ ENABLE_GTK_UTILS=yes ++ fi ++fi ++ ++AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK2OR3" = "xyes") ++AM_CONDITIONAL(ENABLE_GTK_UTILS, test "x$ENABLE_GTK_UTILS" = "xyes") + + # + # D-Bus +@@ -1199,11 +1221,6 @@ + ENABLE_AUTOIPD="no (You need libdaemon!)" + fi + +-HAVE_GTK2OR3=no +-if test "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes" ; then +- HAVE_GTK2OR3=yes +-fi +- + BUILD_UI="no" + if test "x$HAVE_GTK2OR3" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then + BUILD_UI="yes" +@@ -1223,7 +1240,7 @@ + Building avahi-python: ${BUILD_PYTHON} + Building libavahi-glib: ${HAVE_GLIB} + Building libavahi-gobject: ${BUILD_GOBJECT} +- Building avahi-discover-standalone: ${HAVE_GTK2OR3} ++ Building avahi-discover-standalone: ${ENABLE_GTK_UTILS} + Building libavahi-qt3: ${HAVE_QT3} + Building libavahi-qt4: ${HAVE_QT4} + Building avahi-sharp: ${HAVE_MONO} diff --git a/net-dns/avahi/files/avahi-0.6.30-parallel.patch b/net-dns/avahi/files/avahi-0.6.30-parallel.patch new file mode 100644 index 000000000000..a75f99109c6c --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.30-parallel.patch @@ -0,0 +1,34 @@ +From cb10a844f9e91322aca91340b7adc0db19c96b36 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.eu> +Date: Mon, 30 Apr 2012 17:07:41 -0700 +Subject: [PATCH] build-sys: fix parallel install in avahi-utils +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The moment install-exec-local is called, we might still not have +created ${DESTDIR}/${bindir} so we should make sure to create it +first, and then try to chdir into it. + +Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> +--- + avahi-utils/Makefile.am | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/avahi-utils/Makefile.am b/avahi-utils/Makefile.am +index a644b4a..1abc79a 100644 +--- a/avahi-utils/Makefile.am ++++ b/avahi-utils/Makefile.am +@@ -54,7 +54,8 @@ avahi_set_host_name_CFLAGS = $(AM_CFLAGS) + avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la + + install-exec-local: +- cd $(DESTDIR)/$(bindir) && \ ++ $(mkdir_p) $(DESTDIR)/$(bindir) && \ ++ cd $(DESTDIR)/$(bindir) && \ + rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \ + $(LN_S) avahi-resolve avahi-resolve-host-name && \ + $(LN_S) avahi-resolve avahi-resolve-address && \ +-- +1.7.8.6 + diff --git a/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch new file mode 100644 index 000000000000..df0c420fa62a --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch @@ -0,0 +1,27 @@ +From ce3b83de6aa689c0cefe0b1e85c03a627b537099 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Mon, 12 May 2014 19:46:22 +0200 +Subject: [PATCH] Allow building client without the daemon. + +There's no good reason to disallow that, and that's what we specifically +want to do for multilib. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0e190ba..c56cf01 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1185,7 +1185,7 @@ fi + + BUILD_CLIENT="no (You need avahi-daemon and D-Bus!)" + +-if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then ++if "x$HAVE_DBUS" = "xyes" ; then + BUILD_CLIENT=yes + fi + +-- +1.9.3 + diff --git a/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch new file mode 100644 index 000000000000..62ba967c26ff --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch @@ -0,0 +1,31 @@ +--- avahi-0.6.30.old/avahi-python/avahi-discover/Makefile.am 2010-06-28 23:30:34.000000000 -0400 ++++ avahi-0.6.30/avahi-python/avahi-discover/Makefile.am 2012-04-21 18:02:01.642934527 -0400 +@@ -22,6 +22,7 @@ + avahi-discover.py \ + avahi-discover.desktop.in.in + ++if ENABLE_GTK_UTILS + if HAVE_PYTHON + if HAVE_PYTHON_DBUS + if HAVE_PYGTK +@@ -67,3 +68,4 @@ + endif + endif + endif ++endif +--- avahi-0.6.30.old/man/Makefile.am 2012-04-21 18:10:45.690900742 -0400 ++++ avahi-0.6.30/man/Makefile.am 2012-04-21 18:09:15.146906578 -0400 +@@ -65,11 +65,13 @@ + man_MANS += \ + avahi-bookmarks.1 + if HAVE_GTK ++if ENABLE_GTK_UTILS + man_MANS += \ + avahi-discover.1 + endif + endif + endif ++endif + + if ENABLE_AUTOIPD + if HAVE_LIBDAEMON diff --git a/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch new file mode 100644 index 000000000000..b0e47e907462 --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch @@ -0,0 +1,20 @@ +avahi-gobject fails to build under et_EE and possibly other locales. + +The regex for a sed in avahi-gobject/Makefile fails under various locales. +Forcing LC_ALL=C fixes the issue. + +X-Gentoo-Bug: 501664 +X-Gentoo-Bug-URL: https://bugs.gentoo.org/501664 + +diff -Naur avahi-0.6.31.orig/avahi-gobject/Makefile.am avahi-0.6.31/avahi-gobject/Makefile.am +--- avahi-0.6.31.orig/avahi-gobject/Makefile.am 2010-08-25 20:51:39.007153001 -0400 ++++ avahi-0.6.31/avahi-gobject/Makefile.am 2014-09-07 19:00:05.485657990 -0400 +@@ -76,7 +76,7 @@ + + signals-marshal.list: $(CORE_SOURCES) Makefile.am + $(AM_V_GEN)( cd $(srcdir) && \ +- sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \ ++ LC_ALL=C sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \ + $(CORE_SOURCES) ) \ + | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp && \ + if cmp -s $@.tmp $@; then \ diff --git a/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch new file mode 100644 index 000000000000..17ecba52534b --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch @@ -0,0 +1,85 @@ +From: David Zeuthen <zeuthen@chromium.org> +Date: Tue, 5 Mar 2013 19:52:38 +0000 (-0800) +Subject: avahi-daemon: add option "host-name-from-machine-id=" +X-Git-Url: http://git.0pointer.de/?p=avahi.git;a=commitdiff_plain;h=147cdce70b22ae7cee9fb4fe123db40952f31c9e + +avahi-daemon: add option "host-name-from-machine-id=" + +Signed-off-by: David Zeuthen <zeuthen@chromium.org> +--- + +diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c +index d46f40a..8c28fd6 100644 +--- a/avahi-daemon/main.c ++++ b/avahi-daemon/main.c +@@ -65,6 +65,7 @@ + #include <avahi-core/publish.h> + #include <avahi-core/dns-srv-rr.h> + #include <avahi-core/log.h> ++#include <avahi-core/util.h> + + #ifdef ENABLE_CHROOT + #include "chroot.h" +@@ -576,6 +577,29 @@ static int parse_usec(const char *s, AvahiUsec *u) { + return 0; + } + ++static char *get_machine_id(void) { ++ int fd; ++ char buf[32]; ++ ++ fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY); ++ if (fd == -1 && errno == ENOENT) ++ fd = open("/var/lib/dbus/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY); ++ if (fd == -1) ++ return NULL; ++ ++ /* File is on a filesystem so we never get EINTR or partial reads */ ++ if (read(fd, buf, sizeof buf) != sizeof buf) { ++ close(fd); ++ return NULL; ++ } ++ close(fd); ++ ++ /* Contents can be lower, upper and even mixed case so normalize */ ++ avahi_strdown(buf); ++ ++ return avahi_strndup(buf, sizeof buf); ++} ++ + static int load_config_file(DaemonConfig *c) { + int r = -1; + AvahiIniFile *f; +@@ -631,6 +655,15 @@ static int load_config_file(DaemonConfig *c) { + c->server_config.use_iff_running = is_yes(p->value); + else if (strcasecmp(p->key, "disallow-other-stacks") == 0) + c->server_config.disallow_other_stacks = is_yes(p->value); ++ else if (strcasecmp(p->key, "host-name-from-machine-id") == 0) { ++ if (*(p->value) == 'y' || *(p->value) == 'Y') { ++ char *machine_id = get_machine_id(); ++ if (machine_id != NULL) { ++ avahi_free(c->server_config.host_name); ++ c->server_config.host_name = machine_id; ++ } ++ } ++ } + #ifdef HAVE_DBUS + else if (strcasecmp(p->key, "enable-dbus") == 0) { + +diff --git a/man/avahi-daemon.conf.5.xml.in b/man/avahi-daemon.conf.5.xml.in +index bea7ed5..2d15017 100644 +--- a/man/avahi-daemon.conf.5.xml.in ++++ b/man/avahi-daemon.conf.5.xml.in +@@ -40,6 +40,12 @@ + </option> + + <option> ++ <p><opt>host-name-from-machine-id=</opt> Takes a boolean ++ value ("yes" or "no"). If set to "yes" avahi-daemon ++ will use the machine-id as name on the LAN.</p> ++ </option> ++ ++ <option> + <p><opt>domain-name=</opt> Set the default domain name avahi-daemon + tries to register its host name and services on the LAN in. If + omitted defaults to ".local".</p> diff --git a/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch new file mode 100644 index 000000000000..d9a7bc3434c7 --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch @@ -0,0 +1,11 @@ +--- avahi-0.6.31/avahi-utils/Makefile.am ++++ avahi-0.6.31/avahi-utils/Makefile.am +@@ -53,7 +53,7 @@ + avahi_set_host_name_CFLAGS = $(AM_CFLAGS) + avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la + +-install-exec-local: ++install-exec-hook: + cd $(DESTDIR)/$(bindir) && \ + rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \ + $(LN_S) avahi-resolve avahi-resolve-host-name && \ diff --git a/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch new file mode 100644 index 000000000000..9c23ca5e4554 --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/484212 + +Description: SO_REUSEPORT may not exist in running kernel + When userspace defines SO_REUSEPORT we will attempt to enable socket + port number reuse. However if the running kernel does not support + this call it will fail preventing daemon startup. If this call is + present but fails ENOPROTOOPT then we know that actually the kernel + does not support it and we should continue as if we did not have the + call at all. (LP: #1228204) + . + This patch could be removed from the debian package after jessie release. +Author: Andy Whitcroft <apw@canonical.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1228204 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732009 +Last-Update: 2013-09-20 + +Index: avahi-0.6.31/avahi-core/socket.c +=================================================================== +--- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100 ++++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100 +@@ -177,7 +177,8 @@ + yes = 1; + if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) { + avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno)); +- return -1; ++ if (errno != ENOPROTOOPT) ++ return -1; + } + #endif + diff --git a/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch new file mode 100644 index 000000000000..394f6d34d0f0 --- /dev/null +++ b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch @@ -0,0 +1,22 @@ +--- avahi-0.6.30/initscript/gentoo/avahi-daemon.in ++++ avahi-0.6.30/initscript/gentoo/avahi-daemon.in +@@ -2,7 +2,7 @@ + # Copyright 1999-2007 Gentoo Foundation + # Distributed under the terms of the GNU General Public License v2 + +-opts="reload" ++extra_started_commands="reload" + + depend() { + before netmount nfsmount +--- avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in ++++ avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in +@@ -2,7 +2,7 @@ + # Copyright 1999-2007 Gentoo Foundation + # Distributed under the terms of the GNU General Public License v2 + +-opts="reload" ++extra_started_commands="reload" + + depend() { + need avahi-daemon diff --git a/net-dns/avahi/metadata.xml b/net-dns/avahi/metadata.xml new file mode 100644 index 000000000000..8fd09aff984a --- /dev/null +++ b/net-dns/avahi/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> +</maintainer> +<use> + <flag name='autoipd'>Build and install the IPv4LL (RFC3927) network address + configuration daemon</flag> + <flag name='bookmarks'>Install the avahi-bookmarks application (requires + <pkg>dev-python/twisted</pkg>)</flag> + <flag name='howl-compat'>Enable compat libraries for howl</flag> + <flag name="gtk3">Build the avahi-ui-gtk3 library, and use gtk3 for the + avahi utilities under USE=utils</flag> + <flag name='mdnsresponder-compat'>Enable compat libraries for + mDNSResponder</flag> + <flag name="utils">Install the avahi gtk+ utils avahi-discover, bssh, and + bvnc</flag> +</use> +</pkgmetadata> diff --git a/net-dns/bind-dns-keygen/Manifest b/net-dns/bind-dns-keygen/Manifest new file mode 100644 index 000000000000..34fea8502271 --- /dev/null +++ b/net-dns/bind-dns-keygen/Manifest @@ -0,0 +1 @@ +DIST bind-9.3.2-39.fc6.src.rpm 5480548 SHA256 8e5b98a2cd2f5003b28ba9c7a9229efe135a6439c64cc1a9b6aa91811258ef21 SHA512 8959274880aca83d0882fcd825627cdf1000536d2c6e08fad83fe6b85aecbbeb404e6bf7fc7f1d718aa17d85465198565adffd3628a615744d828a674a775736 WHIRLPOOL 0854c7223d97ea82ac90ec6c7e792778bd7493f919a0b6e6e344e0c70745e28effabf63a45da9e87b65bd7eaa0b3f146ea78aa21e4cfbe6cde3e7f4f0a3b7bcf diff --git a/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild b/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild new file mode 100644 index 000000000000..a8a4de38fad8 --- /dev/null +++ b/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit rpm toolchain-funcs + +# Tag for which Fedora Core version it's from +FCVER="6" + +MY_PV="${PV%.*}-${PV##*.}" +MY_P="${PN%%-*}-${MY_PV}" +DESCRIPTION="A simple BIND key generator" +HOMEPAGE="http://fedora.redhat.com/projects/config-tools/" +SRC_URI="mirror://gentoo/${MY_P}.fc${FCVER}.src.rpm" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +RDEPEND="" +DEPEND="${RDEPEND}" +S="${WORKDIR}" + +src_compile() { + $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN#*-} ${PN##*-}.c || die "compile failed" +} + +src_install() { + dosbin ${PN#*-} || die "dosbin failed" +} diff --git a/net-dns/bind-dns-keygen/metadata.xml b/net-dns/bind-dns-keygen/metadata.xml new file mode 100644 index 000000000000..59e2b8f78cb5 --- /dev/null +++ b/net-dns/bind-dns-keygen/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + <name>Default assignee for orphaned packages</name> + </maintainer> +</pkgmetadata> diff --git a/net-dns/bind-tools/Manifest b/net-dns/bind-tools/Manifest new file mode 100644 index 000000000000..15de6564f82e --- /dev/null +++ b/net-dns/bind-tools/Manifest @@ -0,0 +1,2 @@ +DIST bind-9.10.1-P1.tar.gz 8356463 SHA256 974343108d32f253a130383d0ba51290fb7bf372092f1451f264a9e3ac09898d SHA512 5fedff46d9cb0ff2544624c6d998f4f4bcd82152730e8e936c2611847fe443018b5c5c1dfb1dc49888dde5e3e30c3814f08369525612f0770575d54a3133ed48 WHIRLPOOL 6f39ff0e15676ed68f6d48d2ec5894b00de5192edbbbff94444f62dcf83e62a1e72019d575da97b6e6cde91b8918da78721c48510dbaad88095d4f2b3af375eb +DIST bind-9.10.2-P2.tar.gz 8469608 SHA256 b1e6f0af88634aaf48fb9d06bbf82968264f49b8e2685f061dd3fd4c1ab76c5f SHA512 f59a4e7ef268cd95be9c31b8f908a77b261c76bfad0572608f503175e4e06e69c22ee88f4b6ae9578cd096aa069d9401f76084c7e07b3e98e9dbbb40d535695c WHIRLPOOL 10b035f790a43552b22eed13a98b8dcfdc0cc0614342ae221ce23ba655fb40a46e336cca8575460bf26a792303c6eba61e184ca5deb219372fdd09609b4c9798 diff --git a/net-dns/bind-tools/bind-tools-9.10.1_p1.ebuild b/net-dns/bind-tools/bind-tools-9.10.1_p1.ebuild new file mode 100644 index 000000000000..1c50debf7bcf --- /dev/null +++ b/net-dns/bind-tools/bind-tools-9.10.1_p1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils autotools flag-o-matic toolchain-funcs + +MY_PN=${PN//-tools} +MY_PV=${PV/_p/-P} +MY_PV=${MY_PV/_rc/rc} +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen" +HOMEPAGE="http://www.isc.org/software/bind" +SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz" + +LICENSE="ISC BSD BSD-2 HPND JNIC RSA openssl" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc gost gssapi idn ipv6 readline ssl urandom xml" +# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 + +REQUIRED_USE="gost? ( ssl )" + +DEPEND="ssl? ( dev-libs/openssl:0 ) + gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] ) + xml? ( dev-libs/libxml2 ) + idn? ( net-dns/idnkit ) + gssapi? ( virtual/krb5 ) + readline? ( sys-libs/readline )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +# bug 479092, requires networking +RESTRICT="test" + +src_prepare() { + # bug 231247 + epatch "${FILESDIR}"/${PN}-9.5.0_p1-lwconfig.patch + + # Disable tests for now, bug 406399 + sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die + + # bug #220361 + rm aclocal.m4 + rm -rf libtool.m4/ + eautoreconf +} + +src_configure() { + local myconf= + + if use urandom; then + myconf="${myconf} --with-randomdev=/dev/urandom" + else + myconf="${myconf} --with-randomdev=/dev/random" + fi + + # bug 344029 + append-cflags "-DDIG_SIGCHASE" + + # localstatedir for nsupdate -l, bug 395785 + tc-export BUILD_CC + econf \ + --localstatedir=/var \ + --without-python \ + --disable-seccomp \ + --without-libjson \ + $(use_enable ipv6) \ + $(use_with idn) \ + $(usex idn --with-idnlib=-lidnkit '') \ + $(use_with ssl openssl "${EPREFIX}"/usr) \ + $(use_with xml libxml2) \ + $(use_with gssapi) \ + $(use_with readline) \ + $(use_with gost) \ + ${myconf} + + # bug #151839 + echo '#undef SO_BSDCOMPAT' >> config.h +} + +src_compile() { + local AR=$(tc-getAR) + + emake AR=$AR -C lib/ || die "emake lib failed" + emake AR=$AR -C bin/delv/ || die "emake bin/delv failed" + emake AR=$AR -C bin/dig/ || die "emake bin/dig failed" + emake AR=$AR -C bin/nsupdate/ || die "emake bin/nsupdate failed" + emake AR=$AR -C bin/dnssec/ || die "emake bin/dnssec failed" +} + +src_install() { + dodoc README CHANGES FAQ + + cd "${S}"/bin/delv + dobin delv + doman delv.1 + + cd "${S}"/bin/dig + dobin dig host nslookup + doman {dig,host,nslookup}.1 + + cd "${S}"/bin/nsupdate + dobin nsupdate + doman nsupdate.1 + if use doc; then + dohtml nsupdate.html + fi + + cd "${S}"/bin/dnssec + dobin dnssec-keygen + doman dnssec-keygen.8 + if use doc; then + dohtml dnssec-keygen.html + fi +} diff --git a/net-dns/bind-tools/bind-tools-9.10.2_p2.ebuild b/net-dns/bind-tools/bind-tools-9.10.2_p2.ebuild new file mode 100644 index 000000000000..6db6fe9a3b81 --- /dev/null +++ b/net-dns/bind-tools/bind-tools-9.10.2_p2.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils autotools flag-o-matic toolchain-funcs + +MY_PN=${PN//-tools} +MY_PV=${PV/_p/-P} +MY_PV=${MY_PV/_rc/rc} +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen" +HOMEPAGE="http://www.isc.org/software/bind" +SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz" + +LICENSE="ISC BSD BSD-2 HPND JNIC RSA openssl" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc gost gssapi idn ipv6 readline seccomp ssl urandom xml" +# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 + +REQUIRED_USE="gost? ( ssl )" + +DEPEND="ssl? ( dev-libs/openssl:0 ) + gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] ) + xml? ( dev-libs/libxml2 ) + idn? ( net-dns/idnkit ) + gssapi? ( virtual/krb5 ) + readline? ( sys-libs/readline:0= ) + seccomp? ( sys-libs/libseccomp )" +RDEPEND="${DEPEND} + !<net-dns/bind-9.10.2" + +S="${WORKDIR}/${MY_P}" + +# bug 479092, requires networking +RESTRICT="test" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-9.5.0_p1-lwconfig.patch #231247 + epatch "${FILESDIR}"/${PN}-9.10.2-openssl.patch #417129 + + # Disable tests for now, bug 406399 + sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die + + # bug #220361 + rm aclocal.m4 + rm -rf libtool.m4/ + eautoreconf +} + +src_configure() { + local myconf= + + if use urandom; then + myconf="${myconf} --with-randomdev=/dev/urandom" + else + myconf="${myconf} --with-randomdev=/dev/random" + fi + + # bug 344029 + append-cflags "-DDIG_SIGCHASE" + + # localstatedir for nsupdate -l, bug 395785 + tc-export BUILD_CC + econf \ + --localstatedir=/var \ + --without-python \ + --without-libjson \ + --disable-openssl-version-check \ + $(use_enable ipv6) \ + $(use_with idn) \ + $(usex idn --with-idnlib=-lidnkit '') \ + $(use_enable seccomp) \ + $(use_with ssl openssl) \ + $(use_with xml libxml2) \ + $(use_with gssapi) \ + $(use_with readline) \ + $(use_with gost) \ + ${myconf} + + # bug #151839 + echo '#undef SO_BSDCOMPAT' >> config.h +} + +src_compile() { + local AR=$(tc-getAR) + + emake AR="${AR}" -C lib/ + emake AR="${AR}" -C bin/delv/ + emake AR="${AR}" -C bin/dig/ + emake AR="${AR}" -C bin/nsupdate/ + emake AR="${AR}" -C bin/dnssec/ +} + +src_install() { + dodoc README CHANGES FAQ + + cd "${S}"/bin/delv + dobin delv + doman delv.1 + + cd "${S}"/bin/dig + dobin dig host nslookup + doman {dig,host,nslookup}.1 + + cd "${S}"/bin/nsupdate + dobin nsupdate + doman nsupdate.1 + if use doc; then + dohtml nsupdate.html + fi + + cd "${S}"/bin/dnssec + for tool in dsfromkey importkey keyfromlabel keygen \ + revoke settime signzone verify; do + dobin dnssec-"${tool}" + doman dnssec-"${tool}".8 + if use doc; then + dohtml dnssec-"${tool}".html + fi + done +} diff --git a/net-dns/bind-tools/files/bind-tools-9.10.2-openssl.patch b/net-dns/bind-tools/files/bind-tools-9.10.2-openssl.patch new file mode 100644 index 000000000000..deeb1096162e --- /dev/null +++ b/net-dns/bind-tools/files/bind-tools-9.10.2-openssl.patch @@ -0,0 +1,145 @@ +https://bugs.gentoo.org/417129 + +fix openssl build logic: +* do not probe direct filesystem paths (including hardcoding things like /usr) +* use pkg-config to locate proper openssl libraries +* turn dsa check into a header one +* turn ecdsa check into a link one +* have gost/aes actually default to --with-xxx value when cross-compiling + +Patch by Mike Frysinger <vapier@chromium.org> + +--- a/configure.in ++++ b/configure.in +@@ -1442,16 +1442,21 @@ case "$use_openssl" in + OPENSSLLINKOBJS="" + OPENSSLLINKSRCS="" + ;; +- auto) +- DST_OPENSSL_INC="" +- CRYPTO="" ++ yes|auto) ++ CRYPTO="" ++ PKG_CHECK_MODULES([OPENSSL], [libcrypto], [CRYPTO='-DOPENSSL'], [ ++ if test "$use_openssl" = "yes"; then ++ AC_MSG_ERROR(openssl not found) ++ fi ++ use_openssl="no" ++ ]) ++ ++ DST_OPENSSL_INC=$OPENSSL_CFLAGS ++ DST_OPENSSL_LIBS=$OPENSSL_LIBS + OPENSSLGOSTLINKOBJS="" + OPENSSLGOSTLINKSRS="" + OPENSSLLINKOBJS="" + OPENSSLLINKSRCS="" +- AC_MSG_ERROR( +-[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path +-If you don't want OpenSSL, use --without-openssl]) + ;; + *) + if test "$want_native_pkcs11" = "yes" +@@ -1588,27 +1593,39 @@ no) + ;; + esac + ++ CC="$saved_cc" ++ CFLAGS="$saved_cflags" ++ LIBS="$saved_libs" ++ OPENSSLLINKOBJS='${OPENSSLLINKOBJS}' ++ OPENSSLLINKSRCS='${OPENSSLLINKSRCS}' ++ ;; ++esac ++ ++if test "$use_openssl" = "yes"; then ++ saved_cc="$CC" ++ saved_cflags="$CFLAGS" ++ saved_libs="$LIBS" ++ CFLAGS="$CFLAGS $DST_OPENSSL_INC" ++ LIBS="$LIBS $DST_OPENSSL_LIBS" ++ +- AC_MSG_CHECKING(for OpenSSL DSA support) +- if test -f $use_openssl/include/openssl/dsa.h +- then ++ AC_CHECK_HEADERS([openssl/dsa.h]) ++ if test "$ac_cv_header_openssl_dsa_h" = yes; then + AC_DEFINE(HAVE_OPENSSL_DSA) +- AC_MSG_RESULT(yes) +- else +- AC_MSG_RESULT(no) + fi + + AC_CHECK_FUNCS(EVP_sha256 EVP_sha384 EVP_sha512) + + AC_MSG_CHECKING(for OpenSSL ECDSA support) + have_ecdsa="" +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #include <openssl/ecdsa.h> + #include <openssl/objects.h> ++],[ + int main() { + EC_KEY *ec256, *ec384; + + #if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384) +- return (1); ++#error choke + #endif + ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); + ec384 = EC_KEY_new_by_curve_name(NID_secp384r1); +@@ -1637,24 +1654,7 @@ int main() { + [AC_MSG_RESULT(yes) + have_ecdsa="yes"], + [AC_MSG_RESULT(no) +- have_ecdsa="no"], ++ have_ecdsa="no"]) +- [AC_MSG_RESULT(using --with-ecdsa)]) +- case "$with_ecdsa" in +- yes) +- case "$have_ecdsa" in +- no) AC_MSG_ERROR([ecdsa not supported]) ;; +- *) have_ecdsa=yes ;; +- esac +- ;; +- no) +- have_ecdsa=no ;; +- *) +- case "$have_ecdsa" in +- yes|no) ;; +- *) AC_MSG_ERROR([need --with-ecdsa=[[yes or no]]]) ;; +- esac +- ;; +- esac + case $have_ecdsa in + yes) + OPENSSL_ECDSA="yes" +@@ -1702,7 +1702,8 @@ int main() { + have_gost="yes"], + [AC_MSG_RESULT(no) + have_gost="no"], +- [AC_MSG_RESULT(using --with-gost)]) ++ [AC_MSG_RESULT(using --with-gost) ++ have_gost=$with_gost]) + case "$with_gost" in + yes) + case "$have_gost" in +@@ -1752,7 +1753,8 @@ int main() { + [AC_MSG_RESULT(yes) + have_aes="yes"], + [AC_MSG_RESULT(no)])], +- [AC_MSG_RESULT(using --with-aes)]) ++ [AC_MSG_RESULT(using --with-aes) ++ have_aes=$with_aes]) + + ISC_OPENSSL_INC="" + ISC_OPENSSL_LIBS="" +@@ -1765,8 +1767,7 @@ int main() { + OPENSSLLINKOBJS='${OPENSSLLINKOBJS}' + OPENSSLLINKSRCS='${OPENSSLLINKSRCS}' + +- ;; +-esac ++fi + + # + # This would include the system openssl path (and linker options to use diff --git a/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch b/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch new file mode 100644 index 000000000000..7aa1d16e92cd --- /dev/null +++ b/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch @@ -0,0 +1,63 @@ +--- lib/lwres/lwconfig.c.old 2007-06-20 01:47:22.000000000 +0200 ++++ lib/lwres/lwconfig.c 2008-06-15 02:57:02.000000000 +0200 +@@ -175,13 +175,8 @@ + REQUIRE(buffer != NULL); + REQUIRE(size > 0U); + +- *p = '\0'; +- + ch = eatwhite(fp); + +- if (ch == EOF) +- return (EOF); +- + do { + *p = '\0'; + +@@ -592,23 +587,37 @@ + if (strlen(word) == 0U) + rval = LWRES_R_SUCCESS; + else if (strcmp(word, "nameserver") == 0) +- rval = lwres_conf_parsenameserver(ctx, fp); ++ rval = (stopchar != '\n')? /* fail instantly if EOL is reached */ ++ lwres_conf_parsenameserver(ctx, fp) ++ : LWRES_R_FAILURE; + else if (strcmp(word, "lwserver") == 0) +- rval = lwres_conf_parselwserver(ctx, fp); ++ rval = (stopchar != '\n')? ++ lwres_conf_parselwserver(ctx, fp) ++ : LWRES_R_FAILURE; + else if (strcmp(word, "domain") == 0) +- rval = lwres_conf_parsedomain(ctx, fp); ++ rval = (stopchar != '\n')? ++ lwres_conf_parsedomain(ctx, fp) ++ : LWRES_R_FAILURE; + else if (strcmp(word, "search") == 0) +- rval = lwres_conf_parsesearch(ctx, fp); ++ rval = (stopchar != '\n')? ++ lwres_conf_parsesearch(ctx, fp) ++ : LWRES_R_FAILURE; + else if (strcmp(word, "sortlist") == 0) +- rval = lwres_conf_parsesortlist(ctx, fp); ++ rval = (stopchar != '\n')? ++ lwres_conf_parsesortlist(ctx, fp) ++ : LWRES_R_FAILURE; + else if (strcmp(word, "options") == 0) +- rval = lwres_conf_parseoption(ctx, fp); ++ rval = (stopchar != '\n')? ++ lwres_conf_parseoption(ctx, fp) ++ : LWRES_R_FAILURE; + else { + /* unrecognised word. Ignore entire line */ + rval = LWRES_R_SUCCESS; +- stopchar = eatline(fp); +- if (stopchar == EOF) { +- break; ++ if (stopchar != '\n') { /* do not eat the next line */ ++ stopchar = eatline(fp); ++ if (stopchar == EOF) { ++ break; ++ } + } + } + if (ret == LWRES_R_SUCCESS && rval != LWRES_R_SUCCESS) diff --git a/net-dns/bind-tools/metadata.xml b/net-dns/bind-tools/metadata.xml new file mode 100644 index 000000000000..fb31564a3fa8 --- /dev/null +++ b/net-dns/bind-tools/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> + <use> + <flag name="urandom">Use /dev/urandom instead of /dev/random</flag> + <flag name="gssapi">Enable gssapi support</flag> + <flag name="gost">Enables gost OpenSSL engine support</flag> + </use> + <longdescription>ISC's Bind DNS' server tools</longdescription> +</pkgmetadata> diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest new file mode 100644 index 000000000000..5831123d83bd --- /dev/null +++ b/net-dns/bind/Manifest @@ -0,0 +1,3 @@ +DIST bind-9.10.2-P2.tar.gz 8469608 SHA256 b1e6f0af88634aaf48fb9d06bbf82968264f49b8e2685f061dd3fd4c1ab76c5f SHA512 f59a4e7ef268cd95be9c31b8f908a77b261c76bfad0572608f503175e4e06e69c22ee88f4b6ae9578cd096aa069d9401f76084c7e07b3e98e9dbbb40d535695c WHIRLPOOL 10b035f790a43552b22eed13a98b8dcfdc0cc0614342ae221ce23ba655fb40a46e336cca8575460bf26a792303c6eba61e184ca5deb219372fdd09609b4c9798 +DIST bind-9.10.2-P3.tar.gz 8469831 SHA256 78079a66dda455ffecfe93ef72d1ffc947f17b1c453d55ec06b860b49a5e1d4a SHA512 cf33c3f83ab7c46f5919c16719870310f9e82237df4ed7ba4f7eb76ddae14b9644bd67dbb6c46e75650f59185aee391d3ac6fee45b2edb88473f9dbc578bb016 WHIRLPOOL ff7e1c827bfb62e229b8d93c299ff0647614f8403ba84cd3ebdbcafd51d37fdfcee7afd3feaf73036dfc46904b9b506b1da7c7e8ae73e167fe6f1f0246dc6163 +DIST dyndns-samples.tbz2 22866 SHA256 92fb06a92ca99cbbe96b90bcca229ef9c12397db57ae17e199dad9f1218fdbe8 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac WHIRLPOOL 08d4e6a817f1d02597631e18152dbd55ea1bc4c82174be150cc77efc9e1f0f03b6471d1cefbe4229cd3161de752ef232a43ca274a07b78e9c974ceb04cfe99a2 diff --git a/net-dns/bind/bind-9.10.2_p2.ebuild b/net-dns/bind/bind-9.10.2_p2.ebuild new file mode 100644 index 000000000000..8642d0421be7 --- /dev/null +++ b/net-dns/bind/bind-9.10.2_p2.ebuild @@ -0,0 +1,407 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Re dlz/mysql and threads, needs to be verified.. +# MySQL uses thread local storage in its C api. Thus MySQL +# requires that each thread of an application execute a MySQL +# thread initialization to setup the thread local storage. +# This is impossible to do safely while staying within the DLZ +# driver API. This is a limitation caused by MySQL, and not the DLZ API. +# Because of this BIND MUST only run with a single thread when +# using the MySQL driver. + +EAPI="5" + +PYTHON_COMPAT=( python2_7 python3_3 python3_4 ) + +inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd + +MY_PV="${PV/_p/-P}" +MY_PV="${MY_PV/_rc/rc}" +MY_P="${PN}-${MY_PV}" + +SDB_LDAP_VER="1.1.0-fc14" + +RRL_PV="${MY_PV}" + +NSLINT_DIR="contrib/nslint-3.0a2/" + +# SDB-LDAP: http://bind9-ldap.bayour.com/ + +DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" +HOMEPAGE="http://www.isc.org/software/bind" +SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz + doc? ( mirror://gentoo/dyndns-samples.tbz2 )" +# sdb-ldap? ( +# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2 +# )" + +LICENSE="GPL-2 ISC BSD BSD-2 HPND JNIC openssl" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="berkdb +caps dlz doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6 +json ldap mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs ++threads urandom xml" +# sdb-ldap - patch broken +# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 + +REQUIRED_USE="postgres? ( dlz ) + berkdb? ( dlz ) + mysql? ( dlz !threads ) + odbc? ( dlz ) + ldap? ( dlz ) + gost? ( ssl ) + threads? ( caps )" +# sdb-ldap? ( dlz ) + +DEPEND="ssl? ( dev-libs/openssl:0[-bindist] ) + mysql? ( >=virtual/mysql-4.0 ) + odbc? ( >=dev-db/unixODBC-2.2.6 ) + ldap? ( net-nds/openldap ) + idn? ( net-dns/idnkit ) + postgres? ( dev-db/postgresql:= ) + caps? ( >=sys-libs/libcap-2.1.0 ) + xml? ( dev-libs/libxml2 ) + geoip? ( >=dev-libs/geoip-1.4.6 ) + gssapi? ( virtual/krb5 ) + gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] ) + seccomp? ( sys-libs/libseccomp ) + json? ( dev-libs/json-c )" +# sdb-ldap? ( net-nds/openldap ) + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-bind ) + || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )" + +S="${WORKDIR}/${MY_P}" + +# bug 479092, requires networking +RESTRICT="test" + +pkg_setup() { + ebegin "Creating named group and user" + enewgroup named 40 + enewuser named 40 -1 /etc/bind named + eend ${?} +} + +src_prepare() { + # Adjusting PATHs in manpages + for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do + sed -i \ + -e 's:/etc/named.conf:/etc/bind/named.conf:g' \ + -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ + -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ + "${i}" || die "sed failed, ${i} doesn't exist" + done + +# if use dlz; then +# # sdb-ldap patch as per bug #160567 +# # Upstream URL: http://bind9-ldap.bayour.com/ +# # New patch take from bug 302735 +# if use sdb-ldap; then +# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch +# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/ +# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/ +# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/ +# fi +# fi + + # should be installed by bind-tools + sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die + + # Disable tests for now, bug 406399 + sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die + + if use nslint; then + sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die + fi + + # bug #220361 + rm aclocal.m4 + rm -rf libtool.m4/ + eautoreconf +} + +src_configure() { + local myconf="" + + if use urandom; then + myconf="${myconf} --with-randomdev=/dev/urandom" + else + myconf="${myconf} --with-randomdev=/dev/random" + fi + + use geoip && myconf="${myconf} --with-geoip" + + # bug #158664 +# gcc-specs-ssp && replace-flags -O[23s] -O + + # To include db.h from proper path + use berkdb && append-flags "-I$(db_includedir)" + + export BUILD_CC=$(tc-getBUILD_CC) + econf \ + --sysconfdir=/etc/bind \ + --localstatedir=/var \ + --with-libtool \ + --enable-full-report \ + $(use_enable threads) \ + $(use_with dlz dlopen) \ + $(use_with dlz dlz-filesystem) \ + $(use_with dlz dlz-stub) \ + $(use_with postgres dlz-postgres) \ + $(use_with mysql dlz-mysql) \ + $(use_with berkdb dlz-bdb) \ + $(use_with ldap dlz-ldap) \ + $(use_with odbc dlz-odbc) \ + $(use_with ssl openssl "${EPREFIX}"/usr) \ + $(use_with ssl ecdsa) \ + $(use_with idn) \ + $(use_enable ipv6) \ + $(use_with xml libxml2) \ + $(use_with gssapi) \ + $(use_enable rpz rpz-nsip) \ + $(use_enable rpz rpz-nsdname) \ + $(use_enable caps linux-caps) \ + $(use_with gost) \ + $(use_enable filter-aaaa) \ + $(use_enable fixed-rrset) \ + $(use_with python) \ + $(use_enable seccomp) \ + $(use_with json libjson) \ + --without-readline \ + ${myconf} + + # $(use_enable static-libs static) \ + + # bug #151839 + echo '#undef SO_BSDCOMPAT' >> config.h + + if use nslint; then + cd $NSLINT_DIR + econf + fi +} + +src_compile() { + emake + + if use nslint; then + emake -C $NSLINT_DIR CCOPT="${CFLAGS}" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + if use nslint; then + cd $NSLINT_DIR + dobin nslint + doman nslint.8 + cd "${S}" + fi + + dodoc CHANGES FAQ README + + if use idn; then + dodoc contrib/idn/README.idnkit + fi + + if use doc; then + dodoc doc/arm/Bv9ARM.pdf + + docinto misc + dodoc doc/misc/* + + # might a 'html' useflag make sense? + docinto html + dohtml -r doc/arm/* + + docinto contrib + dodoc contrib/scripts/{nanny.pl,named-bootconf.sh} + + # some handy-dandy dynamic dns examples + pushd "${D}"/usr/share/doc/${PF} 1>/dev/null + tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die + popd 1>/dev/null + fi + + insinto /etc/bind + newins "${FILESDIR}"/named.conf-r8 named.conf + + # ftp://ftp.rs.internic.net/domain/named.cache: + insinto /var/bind + doins "${FILESDIR}"/named.cache + + insinto /var/bind/pri + newins "${FILESDIR}"/localhost.zone-r3 localhost.zone + + newinitd "${FILESDIR}"/named.init-r13 named + newconfd "${FILESDIR}"/named.confd-r7 named + + if use gost; then + sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die + else + sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die + fi + + newenvd "${FILESDIR}"/10bind.env 10bind + + # Let's get rid of those tools and their manpages since they're provided by bind-tools + rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* + rm -f "${D}"/usr/share/man/man8/nsupdate.8* + rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate} + rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate} + for tool in dsfromkey importkey keyfromlabel keygen \ + revoke settime signzone verify; do + rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}" + rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8* + done + + # bug 405251, library archives aren't properly handled by --enable/disable-static + if ! use static-libs; then + find "${D}" -type f -name '*.a' -delete || die + fi + + # bug 405251 + find "${D}" -type f -name '*.la' -delete || die + + if use python; then + install_python_tools() { + dosbin bin/python/dnssec-{checkds,coverage} + } + python_foreach_impl install_python_tools + + python_replicate_script "${D}usr/sbin/dnssec-checkds" + python_replicate_script "${D}usr/sbin/dnssec-coverage" + fi + + # bug 450406 + dosym named.cache /var/bind/root.cache + + dosym /var/bind/pri /etc/bind/pri + dosym /var/bind/sec /etc/bind/sec + dosym /var/bind/dyn /etc/bind/dyn + keepdir /var/bind/{pri,sec,dyn} + + dodir /var/log/named + + fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn} + fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} + fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} + fperms 0750 /etc/bind /var/bind/pri + fperms 0770 /var/log/named /var/bind/{,sec,dyn} + + systemd_newunit "${FILESDIR}/named.service-r1" named.service + exeinto /usr/libexec + doexe "${FILESDIR}/generate-rndc-key.sh" +} + +pkg_postinst() { + if [ ! -f '/etc/bind/rndc.key' ]; then + if use urandom; then + einfo "Using /dev/urandom for generating rndc.key" + /usr/sbin/rndc-confgen -r /dev/urandom -a + echo + else + einfo "Using /dev/random for generating rndc.key" + /usr/sbin/rndc-confgen -a + echo + fi + chown root:named /etc/bind/rndc.key + chmod 0640 /etc/bind/rndc.key + fi + + einfo + einfo "You can edit /etc/conf.d/named to customize named settings" + einfo + use mysql || use postgres || use ldap && { + elog "If your named depends on MySQL/PostgreSQL or LDAP," + elog "uncomment the specified rc_named_* lines in your" + elog "/etc/conf.d/named config to ensure they'll start before bind" + einfo + } + einfo "If you'd like to run bind in a chroot AND this is a new" + einfo "install OR your bind doesn't already run in a chroot:" + einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." + einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" + einfo + + CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) + if [[ -n ${CHROOT} ]]; then + elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" + elog "To enable the old behaviour (without using mount) uncomment the" + elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." + elog "If you decide to use the new/default method, ensure to make backup" + elog "first and merge your existing configs/zones to /etc/bind and" + elog "/var/bind because bind will now mount the needed directories into" + elog "the chroot dir." + fi +} + +pkg_config() { + CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) + CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) + CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) + + if [[ -z "${CHROOT}" ]]; then + eerror "This config script is designed to automate setting up" + eerror "a chrooted bind/named. To do so, please first uncomment" + eerror "and set the CHROOT variable in '/etc/conf.d/named'." + die "Unset CHROOT" + fi + if [[ -d "${CHROOT}" ]]; then + ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" + ewarn "To enable the old behaviour (without using mount) uncomment the" + ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." + ewarn + ewarn "${CHROOT} already exists... some things might become overridden" + ewarn "press CTRL+C if you don't want to continue" + sleep 10 + fi + + echo; einfo "Setting up the chroot directory..." + + mkdir -m 0750 -p ${CHROOT} + mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} + mkdir -m 0750 -p ${CHROOT}/etc/bind + mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ + # As of bind 9.8.0 + if has_version net-dns/bind[gost]; then + if [ "$(get_libdir)" = "lib64" ]; then + mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines + ln -s lib64 ${CHROOT}/usr/lib + else + mkdir -m 0755 -p ${CHROOT}/usr/lib/engines + fi + fi + chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind + + mknod ${CHROOT}/dev/null c 1 3 + chmod 0666 ${CHROOT}/dev/null + + mknod ${CHROOT}/dev/zero c 1 5 + chmod 0666 ${CHROOT}/dev/zero + + if use urandom; then + mknod ${CHROOT}/dev/urandom c 1 9 + chmod 0666 ${CHROOT}/dev/urandom + else + mknod ${CHROOT}/dev/random c 1 8 + chmod 0666 ${CHROOT}/dev/random + fi + + if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then + cp -a /etc/bind ${CHROOT}/etc/ + cp -a /var/bind ${CHROOT}/var/ + fi + + if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then + mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP + fi + + elog "You may need to add the following line to your syslog-ng.conf:" + elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" +} diff --git a/net-dns/bind/bind-9.10.2_p3.ebuild b/net-dns/bind/bind-9.10.2_p3.ebuild new file mode 100644 index 000000000000..7232f705745f --- /dev/null +++ b/net-dns/bind/bind-9.10.2_p3.ebuild @@ -0,0 +1,407 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Re dlz/mysql and threads, needs to be verified.. +# MySQL uses thread local storage in its C api. Thus MySQL +# requires that each thread of an application execute a MySQL +# thread initialization to setup the thread local storage. +# This is impossible to do safely while staying within the DLZ +# driver API. This is a limitation caused by MySQL, and not the DLZ API. +# Because of this BIND MUST only run with a single thread when +# using the MySQL driver. + +EAPI="5" + +PYTHON_COMPAT=( python2_7 python3_3 python3_4 ) + +inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd + +MY_PV="${PV/_p/-P}" +MY_PV="${MY_PV/_rc/rc}" +MY_P="${PN}-${MY_PV}" + +SDB_LDAP_VER="1.1.0-fc14" + +RRL_PV="${MY_PV}" + +NSLINT_DIR="contrib/nslint-3.0a2/" + +# SDB-LDAP: http://bind9-ldap.bayour.com/ + +DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" +HOMEPAGE="http://www.isc.org/software/bind" +SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz + doc? ( mirror://gentoo/dyndns-samples.tbz2 )" +# sdb-ldap? ( +# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2 +# )" + +LICENSE="GPL-2 ISC BSD BSD-2 HPND JNIC openssl" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="berkdb +caps dlz doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6 +json ldap mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs ++threads urandom xml" +# sdb-ldap - patch broken +# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 + +REQUIRED_USE="postgres? ( dlz ) + berkdb? ( dlz ) + mysql? ( dlz !threads ) + odbc? ( dlz ) + ldap? ( dlz ) + gost? ( ssl ) + threads? ( caps )" +# sdb-ldap? ( dlz ) + +DEPEND="ssl? ( dev-libs/openssl:0[-bindist] ) + mysql? ( >=virtual/mysql-4.0 ) + odbc? ( >=dev-db/unixODBC-2.2.6 ) + ldap? ( net-nds/openldap ) + idn? ( net-dns/idnkit ) + postgres? ( dev-db/postgresql:= ) + caps? ( >=sys-libs/libcap-2.1.0 ) + xml? ( dev-libs/libxml2 ) + geoip? ( >=dev-libs/geoip-1.4.6 ) + gssapi? ( virtual/krb5 ) + gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] ) + seccomp? ( sys-libs/libseccomp ) + json? ( dev-libs/json-c )" +# sdb-ldap? ( net-nds/openldap ) + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-bind ) + || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )" + +S="${WORKDIR}/${MY_P}" + +# bug 479092, requires networking +RESTRICT="test" + +pkg_setup() { + ebegin "Creating named group and user" + enewgroup named 40 + enewuser named 40 -1 /etc/bind named + eend ${?} +} + +src_prepare() { + # Adjusting PATHs in manpages + for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do + sed -i \ + -e 's:/etc/named.conf:/etc/bind/named.conf:g' \ + -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ + -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ + "${i}" || die "sed failed, ${i} doesn't exist" + done + +# if use dlz; then +# # sdb-ldap patch as per bug #160567 +# # Upstream URL: http://bind9-ldap.bayour.com/ +# # New patch take from bug 302735 +# if use sdb-ldap; then +# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch +# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/ +# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/ +# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/ +# fi +# fi + + # should be installed by bind-tools + sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die + + # Disable tests for now, bug 406399 + sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die + + if use nslint; then + sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die + fi + + # bug #220361 + rm aclocal.m4 + rm -rf libtool.m4/ + eautoreconf +} + +src_configure() { + local myconf="" + + if use urandom; then + myconf="${myconf} --with-randomdev=/dev/urandom" + else + myconf="${myconf} --with-randomdev=/dev/random" + fi + + use geoip && myconf="${myconf} --with-geoip" + + # bug #158664 +# gcc-specs-ssp && replace-flags -O[23s] -O + + # To include db.h from proper path + use berkdb && append-flags "-I$(db_includedir)" + + export BUILD_CC=$(tc-getBUILD_CC) + econf \ + --sysconfdir=/etc/bind \ + --localstatedir=/var \ + --with-libtool \ + --enable-full-report \ + $(use_enable threads) \ + $(use_with dlz dlopen) \ + $(use_with dlz dlz-filesystem) \ + $(use_with dlz dlz-stub) \ + $(use_with postgres dlz-postgres) \ + $(use_with mysql dlz-mysql) \ + $(use_with berkdb dlz-bdb) \ + $(use_with ldap dlz-ldap) \ + $(use_with odbc dlz-odbc) \ + $(use_with ssl openssl "${EPREFIX}"/usr) \ + $(use_with ssl ecdsa) \ + $(use_with idn) \ + $(use_enable ipv6) \ + $(use_with xml libxml2) \ + $(use_with gssapi) \ + $(use_enable rpz rpz-nsip) \ + $(use_enable rpz rpz-nsdname) \ + $(use_enable caps linux-caps) \ + $(use_with gost) \ + $(use_enable filter-aaaa) \ + $(use_enable fixed-rrset) \ + $(use_with python) \ + $(use_enable seccomp) \ + $(use_with json libjson) \ + --without-readline \ + ${myconf} + + # $(use_enable static-libs static) \ + + # bug #151839 + echo '#undef SO_BSDCOMPAT' >> config.h + + if use nslint; then + cd $NSLINT_DIR + econf + fi +} + +src_compile() { + emake + + if use nslint; then + emake -C $NSLINT_DIR CCOPT="${CFLAGS}" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + if use nslint; then + cd $NSLINT_DIR + dobin nslint + doman nslint.8 + cd "${S}" + fi + + dodoc CHANGES FAQ README + + if use idn; then + dodoc contrib/idn/README.idnkit + fi + + if use doc; then + dodoc doc/arm/Bv9ARM.pdf + + docinto misc + dodoc doc/misc/* + + # might a 'html' useflag make sense? + docinto html + dohtml -r doc/arm/* + + docinto contrib + dodoc contrib/scripts/{nanny.pl,named-bootconf.sh} + + # some handy-dandy dynamic dns examples + pushd "${D}"/usr/share/doc/${PF} 1>/dev/null + tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die + popd 1>/dev/null + fi + + insinto /etc/bind + newins "${FILESDIR}"/named.conf-r8 named.conf + + # ftp://ftp.rs.internic.net/domain/named.cache: + insinto /var/bind + doins "${FILESDIR}"/named.cache + + insinto /var/bind/pri + newins "${FILESDIR}"/localhost.zone-r3 localhost.zone + + newinitd "${FILESDIR}"/named.init-r13 named + newconfd "${FILESDIR}"/named.confd-r7 named + + if use gost; then + sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die + else + sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die + fi + + newenvd "${FILESDIR}"/10bind.env 10bind + + # Let's get rid of those tools and their manpages since they're provided by bind-tools + rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* + rm -f "${D}"/usr/share/man/man8/nsupdate.8* + rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate} + rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate} + for tool in dsfromkey importkey keyfromlabel keygen \ + revoke settime signzone verify; do + rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}" + rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8* + done + + # bug 405251, library archives aren't properly handled by --enable/disable-static + if ! use static-libs; then + find "${D}" -type f -name '*.a' -delete || die + fi + + # bug 405251 + find "${D}" -type f -name '*.la' -delete || die + + if use python; then + install_python_tools() { + dosbin bin/python/dnssec-{checkds,coverage} + } + python_foreach_impl install_python_tools + + python_replicate_script "${D}usr/sbin/dnssec-checkds" + python_replicate_script "${D}usr/sbin/dnssec-coverage" + fi + + # bug 450406 + dosym named.cache /var/bind/root.cache + + dosym /var/bind/pri /etc/bind/pri + dosym /var/bind/sec /etc/bind/sec + dosym /var/bind/dyn /etc/bind/dyn + keepdir /var/bind/{pri,sec,dyn} + + dodir /var/log/named + + fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn} + fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} + fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} + fperms 0750 /etc/bind /var/bind/pri + fperms 0770 /var/log/named /var/bind/{,sec,dyn} + + systemd_newunit "${FILESDIR}/named.service-r1" named.service + exeinto /usr/libexec + doexe "${FILESDIR}/generate-rndc-key.sh" +} + +pkg_postinst() { + if [ ! -f '/etc/bind/rndc.key' ]; then + if use urandom; then + einfo "Using /dev/urandom for generating rndc.key" + /usr/sbin/rndc-confgen -r /dev/urandom -a + echo + else + einfo "Using /dev/random for generating rndc.key" + /usr/sbin/rndc-confgen -a + echo + fi + chown root:named /etc/bind/rndc.key + chmod 0640 /etc/bind/rndc.key + fi + + einfo + einfo "You can edit /etc/conf.d/named to customize named settings" + einfo + use mysql || use postgres || use ldap && { + elog "If your named depends on MySQL/PostgreSQL or LDAP," + elog "uncomment the specified rc_named_* lines in your" + elog "/etc/conf.d/named config to ensure they'll start before bind" + einfo + } + einfo "If you'd like to run bind in a chroot AND this is a new" + einfo "install OR your bind doesn't already run in a chroot:" + einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." + einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" + einfo + + CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) + if [[ -n ${CHROOT} ]]; then + elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" + elog "To enable the old behaviour (without using mount) uncomment the" + elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." + elog "If you decide to use the new/default method, ensure to make backup" + elog "first and merge your existing configs/zones to /etc/bind and" + elog "/var/bind because bind will now mount the needed directories into" + elog "the chroot dir." + fi +} + +pkg_config() { + CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) + CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) + CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) + + if [[ -z "${CHROOT}" ]]; then + eerror "This config script is designed to automate setting up" + eerror "a chrooted bind/named. To do so, please first uncomment" + eerror "and set the CHROOT variable in '/etc/conf.d/named'." + die "Unset CHROOT" + fi + if [[ -d "${CHROOT}" ]]; then + ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" + ewarn "To enable the old behaviour (without using mount) uncomment the" + ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." + ewarn + ewarn "${CHROOT} already exists... some things might become overridden" + ewarn "press CTRL+C if you don't want to continue" + sleep 10 + fi + + echo; einfo "Setting up the chroot directory..." + + mkdir -m 0750 -p ${CHROOT} + mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} + mkdir -m 0750 -p ${CHROOT}/etc/bind + mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ + # As of bind 9.8.0 + if has_version net-dns/bind[gost]; then + if [ "$(get_libdir)" = "lib64" ]; then + mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines + ln -s lib64 ${CHROOT}/usr/lib + else + mkdir -m 0755 -p ${CHROOT}/usr/lib/engines + fi + fi + chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind + + mknod ${CHROOT}/dev/null c 1 3 + chmod 0666 ${CHROOT}/dev/null + + mknod ${CHROOT}/dev/zero c 1 5 + chmod 0666 ${CHROOT}/dev/zero + + if use urandom; then + mknod ${CHROOT}/dev/urandom c 1 9 + chmod 0666 ${CHROOT}/dev/urandom + else + mknod ${CHROOT}/dev/random c 1 8 + chmod 0666 ${CHROOT}/dev/random + fi + + if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then + cp -a /etc/bind ${CHROOT}/etc/ + cp -a /var/bind ${CHROOT}/var/ + fi + + if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then + mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP + fi + + elog "You may need to add the following line to your syslog-ng.conf:" + elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" +} diff --git a/net-dns/bind/files/10bind.env b/net-dns/bind/files/10bind.env new file mode 100644 index 000000000000..13c7910b2c61 --- /dev/null +++ b/net-dns/bind/files/10bind.env @@ -0,0 +1 @@ +CONFIG_PROTECT="/var/bind" diff --git a/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch b/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch new file mode 100644 index 000000000000..1577d578ddd4 --- /dev/null +++ b/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch @@ -0,0 +1,21 @@ +diff --git a/contrib/dlz/config.dlz.in b/contrib/dlz/config.dlz.in +index ff3783a..bd7a700 100644 +--- a/contrib/dlz/config.dlz.in ++++ b/contrib/dlz/config.dlz.in +@@ -407,10 +407,13 @@ then + odbcdirs="/usr /usr/local /usr/pkg" + for d in $odbcdirs + do +- if test -f $d/include/sql.h -a -f $d/lib/libodbc.a ++ if test -f $d/include/sql.h + then +- use_dlz_odbc=$d +- break ++ if test -f $d/lib/libodbc.a -o -f $d/lib/libodbc.la -o $d/lib/libodbc.so ++ then ++ use_dlz_odbc=$d ++ break ++ fi + fi + done + fi diff --git a/net-dns/bind/files/bind-dlzmysql5-reconnect.patch b/net-dns/bind/files/bind-dlzmysql5-reconnect.patch new file mode 100644 index 000000000000..b854b9583f16 --- /dev/null +++ b/net-dns/bind/files/bind-dlzmysql5-reconnect.patch @@ -0,0 +1,59 @@ +--- bind-9.5.0a6.orig/contrib/dlz/drivers/dlz_mysql_driver.c 2007-02-06 06:44:26.000000000 +0100 ++++ bind-9.5.0a6/contrib/dlz/drivers/dlz_mysql_driver.c 2007-09-04 23:57:57.000000000 +0200 +@@ -92,6 +92,25 @@ + */ + + /*% ++ * Factorize the mysql_ping for adding a log error message ++ */ ++static isc_result_t ++mysqldrv_ping(dbinstance_t *dbi) { ++ int pres = 0; ++ ++ pres = mysql_ping(dbi->dbconn); ++ if ( pres != 0 ) { ++ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, ++ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), ++ "\nMySQL Ping Error : %s (%i)\n", ++ mysql_error(dbi->dbconn), ++ mysql_errno(dbi->dbconn)); ++ return (ISC_R_FAILURE); ++ } ++ return (ISC_R_SUCCESS); ++} ++ ++/*% + * Allocates memory for a new string, and then constructs the new + * string by "escaping" the input string. The new string is + * safe to be used in queries. This is necessary because we cannot +@@ -225,6 +244,8 @@ + } + + ++ mysqldrv_ping(dbi); ++ + /* + * was a zone string passed? If so, make it safe for use in + * queries. +@@ -324,7 +345,7 @@ + qres = mysql_query((MYSQL *) dbi->dbconn, querystring); + if (qres == 0) + break; +- for (j=0; mysql_ping((MYSQL *) dbi->dbconn) != 0 && j < 4; j++) ++ for (j=0; mysqldrv_ping(dbi) != 0 && j < 4; j++) + ; + } + +@@ -923,6 +944,12 @@ + pass = getParameterValue(argv[1], "pass="); + socket = getParameterValue(argv[1], "socket="); + ++ if(mysql_options((MYSQL *) dbi->dbconn, MYSQL_OPT_RECONNECT, "1")) { ++ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, ++ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++ "Could not set database reconnect option"); ++ } ++ + for (j=0; dbc == NULL && j < 4; j++) + dbc = mysql_real_connect((MYSQL *) dbi->dbconn, host, + user, pass, dbname, port, socket, diff --git a/net-dns/bind/files/generate-rndc-key.sh b/net-dns/bind/files/generate-rndc-key.sh new file mode 100755 index 000000000000..8314d77cd68c --- /dev/null +++ b/net-dns/bind/files/generate-rndc-key.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ ! -s /etc/bind/rndc.key ]; then + /usr/sbin/rndc-confgen -a > /dev/null 2>&1 || exit 1 + chmod 640 /etc/bind/rndc.key + chown root.named /etc/bind/rndc.key +fi diff --git a/net-dns/bind/files/localhost.zone-r3 b/net-dns/bind/files/localhost.zone-r3 new file mode 100644 index 000000000000..2e7a5912b972 --- /dev/null +++ b/net-dns/bind/files/localhost.zone-r3 @@ -0,0 +1,11 @@ +$TTL 1W +@ IN SOA localhost. root.localhost. ( + 2008122601 ; Serial + 28800 ; Refresh + 14400 ; Retry + 604800 ; Expire - 1 week + 86400 ) ; Minimum +@ IN NS localhost. +@ IN A 127.0.0.1 + +@ IN AAAA ::1 diff --git a/net-dns/bind/files/named.cache b/net-dns/bind/files/named.cache new file mode 100644 index 000000000000..6c19741298de --- /dev/null +++ b/net-dns/bind/files/named.cache @@ -0,0 +1,88 @@ +; This file holds the information on root name servers needed to +; initialize cache of Internet domain name servers +; (e.g. reference this file in the "cache . <file>" +; configuration file of BIND domain name servers). +; +; This file is made available by InterNIC +; under anonymous FTP as +; file /domain/named.cache +; on server FTP.INTERNIC.NET +; -OR- RS.INTERNIC.NET +; +; last update: Jan 3, 2013 +; related version of root zone: 2013010300 +; +; formerly NS.INTERNIC.NET +; +. 3600000 IN NS A.ROOT-SERVERS.NET. +A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 +A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30 +; +; FORMERLY NS1.ISI.EDU +; +. 3600000 NS B.ROOT-SERVERS.NET. +B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201 +; +; FORMERLY C.PSI.NET +; +. 3600000 NS C.ROOT-SERVERS.NET. +C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 +; +; FORMERLY TERP.UMD.EDU +; +. 3600000 NS D.ROOT-SERVERS.NET. +D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13 +D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2D::D +; +; FORMERLY NS.NASA.GOV +; +. 3600000 NS E.ROOT-SERVERS.NET. +E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 +; +; FORMERLY NS.ISC.ORG +; +. 3600000 NS F.ROOT-SERVERS.NET. +F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 +F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2F::F +; +; FORMERLY NS.NIC.DDN.MIL +; +. 3600000 NS G.ROOT-SERVERS.NET. +G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 +; +; FORMERLY AOS.ARL.ARMY.MIL +; +. 3600000 NS H.ROOT-SERVERS.NET. +H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 +H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803F:235 +; +; FORMERLY NIC.NORDU.NET +; +. 3600000 NS I.ROOT-SERVERS.NET. +I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 +I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FE::53 +; +; OPERATED BY VERISIGN, INC. +; +. 3600000 NS J.ROOT-SERVERS.NET. +J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30 +J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30 +; +; OPERATED BY RIPE NCC +; +. 3600000 NS K.ROOT-SERVERS.NET. +K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 +K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FD::1 +; +; OPERATED BY ICANN +; +. 3600000 NS L.ROOT-SERVERS.NET. +L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42 +L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42 +; +; OPERATED BY WIDE +; +. 3600000 NS M.ROOT-SERVERS.NET. +M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33 +M.ROOT-SERVERS.NET. 3600000 AAAA 2001:DC3::35 +; End of File diff --git a/net-dns/bind/files/named.conf-r8 b/net-dns/bind/files/named.conf-r8 new file mode 100644 index 000000000000..39f9be267f37 --- /dev/null +++ b/net-dns/bind/files/named.conf-r8 @@ -0,0 +1,166 @@ +/* + * Refer to the named.conf(5) and named(8) man pages, and the documentation + * in /usr/share/doc/bind-* for more details. + * Online versions of the documentation can be found here: + * https://kb.isc.org/article/AA-01031 + * + * If you are going to set up an authoritative server, make sure you + * understand the hairy details of how DNS works. Even with simple mistakes, + * you can break connectivity for affected parties, or cause huge amounts of + * useless Internet traffic. + */ + +acl "xfer" { + /* Deny transfers by default except for the listed hosts. + * If we have other name servers, place them here. + */ + none; +}; + +/* + * You might put in here some ips which are allowed to use the cache or + * recursive queries + */ +acl "trusted" { + 127.0.0.0/8; + ::1/128; +}; + +options { + directory "/var/bind"; + pid-file "/run/named/named.pid"; + + /* https://www.isc.org/solutions/dlv >=bind-9.7.x only */ + //bindkeys-file "/etc/bind/bind.keys"; + + listen-on-v6 { ::1; }; + listen-on { 127.0.0.1; }; + + allow-query { + /* + * Accept queries from our "trusted" ACL. We will + * allow anyone to query our master zones below. + * This prevents us from becoming a free DNS server + * to the masses. + */ + trusted; + }; + + allow-query-cache { + /* Use the cache for the "trusted" ACL. */ + trusted; + }; + + allow-recursion { + /* Only trusted addresses are allowed to use recursion. */ + trusted; + }; + + allow-transfer { + /* Zone tranfers are denied by default. */ + none; + }; + + allow-update { + /* Don't allow updates, e.g. via nsupdate. */ + none; + }; + + /* + * If you've got a DNS server around at your upstream provider, enter its + * IP address here, and enable the line below. This will make you benefit + * from its cache, thus reduce overall DNS traffic in the Internet. + * + * Uncomment the following lines to turn on DNS forwarding, and change + * and/or update the forwarding ip address(es): + */ +/* + forward first; + forwarders { + // 123.123.123.123; // Your ISP NS + // 124.124.124.124; // Your ISP NS + // 4.2.2.1; // Level3 Public DNS + // 4.2.2.2; // Level3 Public DNS + 8.8.8.8; // Google Open DNS + 8.8.4.4; // Google Open DNS + }; + +*/ + + dnssec-enable yes; + //dnssec-validation yes; + + /* + * As of bind 9.8.0: + * "If the root key provided has expired, + * named will log the expiration and validation will not work." + */ + dnssec-validation auto; + + /* if you have problems and are behind a firewall: */ + //query-source address * port 53; +}; + +/* +logging { + channel default_log { + file "/var/log/named/named.log" versions 5 size 50M; + print-time yes; + print-severity yes; + print-category yes; + }; + + category default { default_log; }; + category general { default_log; }; +}; +*/ + +include "/etc/bind/rndc.key"; +controls { + inet 127.0.0.1 port 953 allow { 127.0.0.1/32; ::1/128; } keys { "rndc-key"; }; +}; + +zone "." in { + type hint; + file "/var/bind/named.cache"; +}; + +zone "localhost" IN { + type master; + file "pri/localhost.zone"; + notify no; +}; + +/* + * Briefly, a zone which has been declared delegation-only will be effectively + * limited to containing NS RRs for subdomains, but no actual data beyond its + * own apex (for example, its SOA RR and apex NS RRset). This can be used to + * filter out "wildcard" or "synthesized" data from NAT boxes or from + * authoritative name servers whose undelegated (in-zone) data is of no + * interest. + * See http://www.isc.org/software/bind/delegation-only for more info + */ + +//zone "COM" { type delegation-only; }; +//zone "NET" { type delegation-only; }; + +//zone "YOUR-DOMAIN.TLD" { +// type master; +// file "/var/bind/pri/YOUR-DOMAIN.TLD.zone"; +// allow-query { any; }; +// allow-transfer { xfer; }; +//}; + +//zone "YOUR-SLAVE.TLD" { +// type slave; +// file "/var/bind/sec/YOUR-SLAVE.TLD.zone"; +// masters { <MASTER>; }; + + /* Anybody is allowed to query but transfer should be controlled by the master. */ +// allow-query { any; }; +// allow-transfer { none; }; + + /* The master should be the only one who notifies the slaves, shouldn't it? */ +// allow-notify { <MASTER>; }; +// notify no; +//}; diff --git a/net-dns/bind/files/named.confd-r7 b/net-dns/bind/files/named.confd-r7 new file mode 100644 index 000000000000..477a4806151d --- /dev/null +++ b/net-dns/bind/files/named.confd-r7 @@ -0,0 +1,48 @@ +# Set various named options here. +# +#OPTIONS="" + +# Set this to the number of processors you want bind to use. +# Leave this unchanged if you want bind to automatically detect the number +#CPU="1" + +# If you wish to run bind in a chroot: +# 1) un-comment the CHROOT= assignment, below. You may use +# a different chroot directory but MAKE SURE it's empty. +# 2) run: emerge --config =<bind-version> +# +#CHROOT="/chroot/dns" + +# Uncomment to enable binmount of /usr/share/GeoIP +#CHROOT_GEOIP="1" + +# Uncomment the line below to avoid that the init script mounts the needed paths +# into the chroot directory. +# You have to copy all needed config files by hand if you say CHROOT_NOMOUNT="1". +#CHROOT_NOMOUNT="1" + +# Uncomment this option if you have setup your own chroot environment and you +# don't want/need the chroot consistency check +#CHROOT_NOCHECK=1 + +# Default pid file location +PIDFILE="${CHROOT}/run/named/named.pid" + +# Scheduling priority: 19 is the lowest and -20 is the highest. +# Default: 0 +#NAMED_NICELEVEL="0" + +# Uncomment rc_named_use/rc_named_after for the database you need. +# Its necessary to ensure the database backend will be started before named. + +# MySQL +#rc_named_use="mysql" +#rc_named_after="mysql" + +# PostgreSQL +#rc_named_use="pg_autovacuum postgresql" +#rc_named_after="pg_autovacuum postgresql" + +# LDAP +#rc_named_use="ldap" +#rc_named_after="ldap" diff --git a/net-dns/bind/files/named.init-r13 b/net-dns/bind/files/named.init-r13 new file mode 100644 index 000000000000..a320d34f30e3 --- /dev/null +++ b/net-dns/bind/files/named.init-r13 @@ -0,0 +1,248 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="checkconfig checkzones" +extra_started_commands="reload" + +depend() { + need net + use logger + provide dns +} + +NAMED_CONF=${CHROOT}/etc/bind/named.conf + +OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0} +MOUNT_CHECK_TIMEOUT=${MOUNT_CHECK_TIMEOUT:-60} + +_mount() { + local from + local to + local opts + local ret=0 + + if [ "${#}" -lt 3 ]; then + eerror "_mount(): to few arguments" + return 1 + fi + + from=$1 + to=$2 + shift 2 + + opts="${*}" + shift $# + + if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then + einfo "mounting ${from} to ${to}" + mount ${from} ${to} ${opts} + ret=$? + + eend $ret + return $ret + fi + + return 0 +} + +_umount() { + local dir=$1 + local ret=0 + + if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then + ebegin "umounting ${dir}" + umount ${dir} + ret=$? + + eend $ret + return $ret + fi + + return 0 +} + +_get_pidfile() { + # as suggested in bug #107724, bug 335398#c17 + [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\ + /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} | grep 'pid-file' | cut -d\" -f2) + [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/run/named/named.pid +} + +check_chroot() { + if [ -n "${CHROOT}" ]; then + [ ! -d "${CHROOT}" ] && return 1 + [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1 + [ ! -d "${CHROOT}/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1 + [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1 + [ ! -d "${CHROOT}/var/log/named" ] && return 1 + [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1 + [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1 + [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1 + if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then + if [ -d "/usr/lib64" ]; then + [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1 + elif [ -d "/usr/lib" ]; then + [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1 + fi + fi + fi + + return 0 +} + +checkconfig() { + ebegin "Checking named configuration" + + if [ ! -f "${NAMED_CONF}" ] ; then + eerror "No ${NAMED_CONF} file exists!" + return 1 + fi + + /usr/sbin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} || { + eerror "named-checkconf failed! Please fix your config first." + return 1 + } + + eend 0 + return 0 +} + +checkzones() { + ebegin "Checking named configuration and zones" + /usr/sbin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} + eend $? +} + +start() { + local piddir + + ebegin "Starting ${CHROOT:+chrooted }named" + + if [ -n "${CHROOT}" ]; then + if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then + check_chroot || { + eend 1 + eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" + return 1 + } + fi + + if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then + if [ ! -e /usr/lib/engines/libgost.so ]; then + eend 1 + eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support" + return 1 + fi + cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || { + eend 1 + eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'" + return 1 + } + fi + cp -Lp /etc/localtime "${CHROOT}/etc/localtime" + + if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then + einfo "Mounting chroot dirs" + _mount /etc/bind ${CHROOT}/etc/bind -o bind + _mount /var/bind ${CHROOT}/var/bind -o bind + _mount /var/log/named ${CHROOT}/var/log/named -o bind + if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then + _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind + fi + fi + fi + + checkconfig || { eend 1; return 1; } + + # create piddir (usually /run/named) if necessary, bug 334535 + _get_pidfile + piddir="${PIDFILE%/*}" + checkpath -q -d -o root:named -m 0770 "${piddir}" || { + eend 1 + return 1 + } + + # In case someone have $CPU set in /etc/conf.d/named + if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then + CPU="-n ${CPU}" + fi + + start-stop-daemon --start --pidfile ${PIDFILE} \ + --nicelevel ${NAMED_NICELEVEL:-0} \ + --exec /usr/sbin/named \ + -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT} + eend $? +} + +stop() { + local reported=0 + + ebegin "Stopping ${CHROOT:+chrooted }named" + + # Workaround for now, until openrc's restart has been fixed. + # openrc doesn't care about a restart() function in init scripts. + if [ "${RC_CMD}" = "restart" ]; then + if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then + check_chroot || { + eend 1 + eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" + return 1 + } + fi + + checkconfig || { eend 1; return 1; } + fi + + # -R 10, bug 335398 + _get_pidfile + start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \ + --exec /usr/sbin/named + + if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then + ebegin "Umounting chroot dirs" + + # just to be sure everything gets clean + while fuser -s ${CHROOT} 2>/dev/null; do + if [ "${reported}" -eq 0 ]; then + einfo "Waiting until all named processes are stopped (max. ${MOUNT_CHECK_TIMEOUT} seconds)" + elif [ "${reported}" -eq "${MOUNT_CHECK_TIMEOUT}" ]; then + eerror "Waiting until all named processes are stopped failed!" + eend 1 + break + fi + sleep 1 + reported=$((reported+1)) + done + + [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP + _umount ${CHROOT}/etc/bind + _umount ${CHROOT}/var/log/named + _umount ${CHROOT}/var/bind + fi + + eend $? +} + +reload() { + local ret + + ebegin "Reloading named.conf and zone files" + + checkconfig || { eend 1; return 1; } + + _get_pidfile + if [ -n "${PIDFILE}" ]; then + start-stop-daemon --pidfile $PIDFILE --signal HUP + ret=$? + else + ewarn "Unable to determine the pidfile... this is" + ewarn "a fallback mode. Please check your installation!" + + $RC_SERVICE restart + ret=$? + fi + + eend $ret +} diff --git a/net-dns/bind/files/named.service-r1 b/net-dns/bind/files/named.service-r1 new file mode 100644 index 000000000000..65fbdb941ca0 --- /dev/null +++ b/net-dns/bind/files/named.service-r1 @@ -0,0 +1,13 @@ +[Unit] +Description=Internet domain name server +After=network.target + +[Service] +ExecStartPre=/usr/libexec/generate-rndc-key.sh +ExecStartPre=/usr/sbin/named-checkconf -z /etc/bind/named.conf +ExecStart=/usr/sbin/named -f -u named +ExecReload=/usr/sbin/rndc reload +ExecStop=/usr/sbin/rndc stop + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml new file mode 100644 index 000000000000..9fd3987e4fc0 --- /dev/null +++ b/net-dns/bind/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> + <longdescription>ISC's bind dns server, used the world 'round.</longdescription> + <use> + <flag name="dlz">Enables dynamic loaded zones, 3rd party extension</flag> + <flag name="filter-aaaa">Enable filtering of AAAA records over IPv4</flag> + <flag name="fixed-rrset">Enables fixed rrset-order option</flag> + <flag name="gost">Enables gost OpenSSL engine support</flag> + <flag name="gssapi">Enable gssapi support</flag> + <flag name="json">Enable JSON statistics channel</flag> + <flag name="nslint">Build and install the nslint util</flag> + <flag name="rpz">Enable response policy rewriting (rpz)</flag> + <flag name="urandom">Use /dev/urandom instead of /dev/random</flag> + </use> +</pkgmetadata> diff --git a/net-dns/c-ares/Manifest b/net-dns/c-ares/Manifest new file mode 100644 index 000000000000..c41ce7a4bd12 --- /dev/null +++ b/net-dns/c-ares/Manifest @@ -0,0 +1,5 @@ +DIST c-ares-1.10.0.tar.gz 809073 SHA256 3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db SHA512 fef6945549034390ddaa03acf5509d0095e97c151e5f4047ffc32c51945a7261759228b20fdd77b9e4bf4a95f3a61bfb79bee0c66a860219debfd2916b390693 WHIRLPOOL 660d04b20371a75b4a9dea45449407b10c782ae8367356e2f6b0b73cb2d62485068a543b4a2303673f688c6c784afd9925faa18be943aa771d8467077f8ea407 +DIST c-ares-1.7.4.tar.gz 639365 SHA256 6b8a7c4ecd67240cca50a345bc955ffbe2d6d1f43982defc77a8e76031a6cb06 SHA512 e16703c158cebbdf8f1b8a83f47496d5c6450905a9f267aaf07c8968715a6f8746e30421eb1b6e877e99ddf82e93e6ce11bd8c4f1859913cf1f41abc69b47245 WHIRLPOOL fc719d15fcad0c0c3859da8ec8684a7331c61390be619a1e4dad386b5fb3ddb5eaf4e1ef6ec8a5fc2b0e11087e92c71024b9376cb75541e2fa66fa6867d5e792 +DIST c-ares-1.7.5.tar.gz 746032 SHA256 a6b6381e5a025ef942c76360989341ac5b0c82007e2979d40ded7d16396656a8 SHA512 121be9eaeb127f2648744d0b74d93ea80c02932082e42f08df42834aa0f9180e386cb26f85f1962d5388365770f7204510f5f22ed9b85ee01dbcf8009d9f74ce WHIRLPOOL 1faf9f740fbb6543e09447310b0f9a4f277312f7bdb9a261830b021052619f8f0b6ccfe0906c4cfe37323b87ef97e10665722158b7fca101c1043b1582f6df6f +DIST c-ares-1.8.0.tar.gz 778926 SHA256 f4d9b3721966043645f3b953b40c0185483d597f743cb834456d85fa501d8f62 SHA512 972f21a8ee50268773f4b90be6380c405fcd11089c102068665615c8a9bd8f8b7726d53d45cea46a87b863983535afd412cdddae83083e9cbd036ed8a4e7b5fa WHIRLPOOL ad54c63eca4d62760d17135628319b4e77b6baafb6007a1e0538e9d0b8cddd25f7062fd68dd9149672adc24a917058d93990354db69176f6522571d75ee3e7ef +DIST c-ares-1.9.1.tar.gz 782945 SHA256 023f28001f2f839645c8700187391a011198950c73ddd91510c7549d87373936 SHA512 896acd810912ae269d67904e0a2533faab855943444fffae45aa4c1633eefec72a59006cbdf5b8cc67788df6977ed72244e8d14bd6fff9e6d5670283d12be6d2 WHIRLPOOL d32efdce6ddafbb1e13f9203eb82ffdcb4d08737225bba0a4aeefa50f78717b21add847beb2f328f7516695f80dd983f687ff31bb0c56f75ee54819d0cd6f261 diff --git a/net-dns/c-ares/c-ares-1.10.0-r1.ebuild b/net-dns/c-ares/c-ares-1.10.0-r1.ebuild new file mode 100644 index 000000000000..ff08bef9e290 --- /dev/null +++ b/net-dns/c-ares/c-ares-1.10.0-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib-minimal + +DESCRIPTION="C library that resolves names asynchronously" +HOMEPAGE="http://c-ares.haxx.se/" +SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris" +IUSE="static-libs" + +DOCS=( AUTHORS CHANGES NEWS README RELEASE-NOTES TODO ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/ares_build.h +) + +multilib_src_configure() { + ECONF_SOURCE=${S} \ + econf \ + --enable-nonblocking \ + --enable-symbol-hiding \ + $(use_enable static-libs static) +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files --all +} diff --git a/net-dns/c-ares/c-ares-1.10.0.ebuild b/net-dns/c-ares/c-ares-1.10.0.ebuild new file mode 100644 index 000000000000..7e7ddf5badee --- /dev/null +++ b/net-dns/c-ares/c-ares-1.10.0.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="C library that resolves names asynchronously" +HOMEPAGE="http://c-ares.haxx.se/" +SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris" +IUSE="static-libs" + +DOCS=( AUTHORS CHANGES NEWS README RELEASE-NOTES TODO ) + +src_configure() { + econf \ + --enable-nonblocking \ + --enable-symbol-hiding \ + $(use_enable static-libs static) +} + +src_install() { + default + find "${ED}" -name "*.la" -exec rm {} + || die +} diff --git a/net-dns/c-ares/c-ares-1.7.4.ebuild b/net-dns/c-ares/c-ares-1.7.4.ebuild new file mode 100644 index 000000000000..a3745ad9cdea --- /dev/null +++ b/net-dns/c-ares/c-ares-1.7.4.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +DESCRIPTION="C library that resolves names asynchronously" +HOMEPAGE="http://c-ares.haxx.se/" +SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_configure() { + econf --enable-shared --enable-nonblocking --enable-symbol-hiding \ + --enable-warnings +} + +src_install() { + emake DESTDIR="${D}" install || die + dodoc RELEASE-NOTES CHANGES NEWS README* +} diff --git a/net-dns/c-ares/c-ares-1.7.5.ebuild b/net-dns/c-ares/c-ares-1.7.5.ebuild new file mode 100644 index 000000000000..6e7fb3dfbebb --- /dev/null +++ b/net-dns/c-ares/c-ares-1.7.5.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="C library that resolves names asynchronously" +HOMEPAGE="http://c-ares.haxx.se/" +SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris" +IUSE="static-libs" + +DOCS=( AUTHORS CHANGES README README.cares RELEASE-NOTES TODO ) + +src_configure() { + econf \ + --enable-nonblocking \ + --enable-symbol-hiding \ + $(use_enable static-libs static) +} + +src_install() { + default + find "${ED}" -name "*.la" -exec rm {} + || die +} diff --git a/net-dns/c-ares/c-ares-1.8.0.ebuild b/net-dns/c-ares/c-ares-1.8.0.ebuild new file mode 100644 index 000000000000..6e7fb3dfbebb --- /dev/null +++ b/net-dns/c-ares/c-ares-1.8.0.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="C library that resolves names asynchronously" +HOMEPAGE="http://c-ares.haxx.se/" +SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris" +IUSE="static-libs" + +DOCS=( AUTHORS CHANGES README README.cares RELEASE-NOTES TODO ) + +src_configure() { + econf \ + --enable-nonblocking \ + --enable-symbol-hiding \ + $(use_enable static-libs static) +} + +src_install() { + default + find "${ED}" -name "*.la" -exec rm {} + || die +} diff --git a/net-dns/c-ares/c-ares-1.9.1.ebuild b/net-dns/c-ares/c-ares-1.9.1.ebuild new file mode 100644 index 000000000000..1c9d1e07ffcd --- /dev/null +++ b/net-dns/c-ares/c-ares-1.9.1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="C library that resolves names asynchronously" +HOMEPAGE="http://c-ares.haxx.se/" +SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris" +IUSE="static-libs" + +DOCS=( AUTHORS CHANGES NEWS README RELEASE-NOTES TODO ) + +src_configure() { + econf \ + --enable-nonblocking \ + --enable-symbol-hiding \ + $(use_enable static-libs static) +} + +src_install() { + default + find "${ED}" -name "*.la" -exec rm {} + || die +} diff --git a/net-dns/c-ares/metadata.xml b/net-dns/c-ares/metadata.xml new file mode 100644 index 000000000000..74544dbbc612 --- /dev/null +++ b/net-dns/c-ares/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> +</maintainer> +<upstream> + <remote-id type="cpe">cpe:/a:daniel_stenberg:c-ares</remote-id> +</upstream> +</pkgmetadata> diff --git a/net-dns/cagibi/Manifest b/net-dns/cagibi/Manifest new file mode 100644 index 000000000000..c7d0c79222f7 --- /dev/null +++ b/net-dns/cagibi/Manifest @@ -0,0 +1 @@ +DIST cagibi-0.2.0.tar.bz2 28959 SHA256 77f9ec1eff5a5e0db90708a789a7cb82ff3780069f9e6f21b03a23813258b24b diff --git a/net-dns/cagibi/cagibi-0.2.0.ebuild b/net-dns/cagibi/cagibi-0.2.0.ebuild new file mode 100644 index 000000000000..d39bd7b8b22f --- /dev/null +++ b/net-dns/cagibi/cagibi-0.2.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit cmake-utils + +DESCRIPTION="Cache/proxy system for the SSDP part of UPnP" +HOMEPAGE="http://frinring.wordpress.com/2010/08/09/cagibi-0-1-1-released-network-kio-slave-freezes-kded-in-4-5-0/" +SRC_URI="mirror://kde/stable/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +SLOT="0" +IUSE="debug" + +RDEPEND=" + dev-qt/qtcore:4 + dev-qt/qtdbus:4 +" +DEPEND="${RDEPEND} + dev-util/automoc +" + +DOCS=( Changelog README TODO ) diff --git a/net-dns/cagibi/metadata.xml b/net-dns/cagibi/metadata.xml new file mode 100644 index 000000000000..a23f444b67d6 --- /dev/null +++ b/net-dns/cagibi/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>kde</herd> +</pkgmetadata> diff --git a/net-dns/ddclient/Manifest b/net-dns/ddclient/Manifest new file mode 100644 index 000000000000..b59c6787ac7b --- /dev/null +++ b/net-dns/ddclient/Manifest @@ -0,0 +1,2 @@ +DIST ddclient-3.8.1.tar.gz 48600 SHA256 f22ac7b0ec78e310d7b88a1cf636e5c00360b2ed9c087f231b3522ef3e6295f2 SHA512 d6722582dffe0c5a806176f24bd3d9117bc1210ea0137aa92138390be16e67d47b746777dc431282a664849c91626969a5e267777126bac03304c7aa34a9dad7 WHIRLPOOL 7785e6a9cacc10bfc4a21d01287602f0edf3b45e38c4f5352415160fc9857223c630b9b42f067fcabd1080be1482da549c1dccbcd8f1a5cf860c236326050f45 +DIST ddclient-3.8.2.tar.gz 46059 SHA256 3c335ed456fcd55c1ffefbaec7c75d1b13794626b1c38e6a01cc28ce3a6eac9e SHA512 8f74ce90ce4a31b8d53887b99556661343b96734ae630403434689459eaeb1354159ae26f0404b9db21a0ff4151816d1650746a13c547064748656a8c6e3f13b WHIRLPOOL f7f0c4f28f5c59ad16989813edbb7a94bc99e91a0ed7c6b93d5455abee2a7e80d96ba0d26e6016bf8a4843a44772132918ac1c8555b829f0d4ad53d30f5aa793 diff --git a/net-dns/ddclient/ddclient-3.8.1-r5.ebuild b/net-dns/ddclient/ddclient-3.8.1-r5.ebuild new file mode 100644 index 000000000000..3325070dedbe --- /dev/null +++ b/net-dns/ddclient/ddclient-3.8.1-r5.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" +inherit eutils systemd user + +DESCRIPTION="Perl updater client for dynamic DNS services" +HOMEPAGE="http://ddclient.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd" +IUSE="hardened" + +RDEPEND=">=dev-lang/perl-5.1 + dev-perl/Digest-SHA1 + dev-perl/IO-Socket-SSL + hardened? ( sys-apps/iproute2 ) +" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + # Remove pid line, because it is specified in /etc/init.d/ddclient + ebegin "Removing PID setup from ${PN}.conf" + if ! sed '/^pid/d' -i "sample-etc_${PN}.conf"; then + eerror "Failed to remove pid from /etc/${PN}/${PN}.conf" + fi + eend $? + + use hardened && epatch "${FILESDIR}/iproute2.patch" + + epatch "${FILESDIR}/cmd-over-cfg.patch" +} + +src_install() { + dosbin ${PN} + dodoc Change* COPYRIGHT README* RELEASENOTE sample* + + newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service + keepdir /var/cache/${PN} + fowners -R ${PN}:${PN} /var/cache/${PN} + + insinto /etc/${PN} + insopts -m 0600 -o ${PN} -g ${PN} + newins sample-etc_${PN}.conf ${PN}.conf + newins sample-etc_${PN}.conf ${PN}.conf.sample + fowners -R ${PN}:${PN} /etc/${PN} +} diff --git a/net-dns/ddclient/ddclient-3.8.2.ebuild b/net-dns/ddclient/ddclient-3.8.2.ebuild new file mode 100644 index 000000000000..2e1d25f95c04 --- /dev/null +++ b/net-dns/ddclient/ddclient-3.8.2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +inherit systemd user + +DESCRIPTION="Perl updater client for dynamic DNS services" +HOMEPAGE="http://ddclient.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="hardened" + +RDEPEND=">=dev-lang/perl-5.1 + virtual/perl-Digest-SHA + dev-perl/IO-Socket-SSL + hardened? ( sys-apps/iproute2 ) +" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + # Remove pid setting because we can't leave it user configurable and + # reliably setup the environment for the init script to stop ${PN} + ebegin "Removing PID setting from ${PN}.conf" + sed '/^pid/d' -i "sample-etc_${PN}.conf" + eend $? +} + +src_install() { + dosbin ${PN} + dodoc Change* COPYRIGHT README* RELEASENOTE sample* + + newinitd "${FILESDIR}/${PN}.initd-r4" ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service + + insopts -m 0600 -o ${PN} -g ${PN} + insinto /etc/${PN} + newins sample-etc_${PN}.conf ${PN}.conf + newins sample-etc_${PN}.conf ${PN}.conf.sample +} diff --git a/net-dns/ddclient/files/cmd-over-cfg.patch b/net-dns/ddclient/files/cmd-over-cfg.patch new file mode 100644 index 000000000000..9033873fde74 --- /dev/null +++ b/net-dns/ddclient/files/cmd-over-cfg.patch @@ -0,0 +1,11 @@ +--- ddclient.old 2011-11-13 10:14:59.957846596 -0500 ++++ ddclient 2011-11-13 10:18:33.864245944 -0500 +@@ -773,7 +773,7 @@ + foreach my $h (sort keys %config) { + next if $config{$h}{'protocol'} ne lc($s); + $examined{$h} = 1; +- my $use = $config{$h}{'use'} || opt('use'); ++ my $use = opt('use') || $config{$h}{'use'}; + local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; + # bug #13: we should only do this once + # use isn't enough, we have to save the origin to. diff --git a/net-dns/ddclient/files/ddclient-reasonable-security.patch b/net-dns/ddclient/files/ddclient-reasonable-security.patch new file mode 100644 index 000000000000..9dc7930b98a2 --- /dev/null +++ b/net-dns/ddclient/files/ddclient-reasonable-security.patch @@ -0,0 +1,21 @@ +--- ddclient 2006-04-11 10:14:16.000000000 +0100 ++++ ddclient 2006-04-11 20:31:14.000000000 +0100 +@@ -776,15 +776,10 @@ + # fatal("Cannot open file '%s'. ($!)", $file); + warning("Cannot open file '%s'. ($!)", $file); + } +- # Check for only owner has any access to config file ++ # Guard against world-readability of config file + my ($dev, $ino, $mode, @statrest) = stat(FD); +- if ($mode & 077) { +- if (-f FD && (chmod 0600, $file)) { +- warning("file $file must be accessible only by its owner (fixed)."); +- } else { +- # fatal("file $file must be accessible only by its owner."); +- warning("file $file must be accessible only by its owner."); +- } ++ if ($mode & 007) { ++ fatal("Must not be world-accessible\nchange its permissions using e.g.\nchmod 640", $file); + } + + local $lineno = 0; diff --git a/net-dns/ddclient/files/ddclient.confd b/net-dns/ddclient/files/ddclient.confd new file mode 100644 index 000000000000..2408a40bb6f4 --- /dev/null +++ b/net-dns/ddclient/files/ddclient.confd @@ -0,0 +1,2 @@ +# No need to specify a pid in /etc/ddclient/ddclient.conf +PIDFILE=/var/run/ddclient/ddclient.pid diff --git a/net-dns/ddclient/files/ddclient.confd-r1 b/net-dns/ddclient/files/ddclient.confd-r1 new file mode 100644 index 000000000000..69ad0eeff87d --- /dev/null +++ b/net-dns/ddclient/files/ddclient.confd-r1 @@ -0,0 +1,2 @@ +# No need to specify a pid in /etc/ddclient/ddclient.conf +#PIDFILE=/var/run/ddclient/ddclient.pid diff --git a/net-dns/ddclient/files/ddclient.initd b/net-dns/ddclient/files/ddclient.initd new file mode 100644 index 000000000000..b0ad57acb7a4 --- /dev/null +++ b/net-dns/ddclient/files/ddclient.initd @@ -0,0 +1,52 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Default location if not specified in /etc/conf.d/ddclient +PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid} + +depend() { + before cron + need net + use dns logger +} + +checkconfig() { + local conf="/etc/ddclient/ddclient.conf" + + if [ -e "${conf}" ] ; then + if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0004)" ] ; then + eerror "${conf} must not be world-readable. Run e.g.:" + eerror " chmod 640 ${conf}" + eerror " chown root:ddclient ${conf}" + return 1 + fi + else + eerror "/etc/ddclient/ddclient.conf is needed to run ddclient" + eerror "There is a sample file in /etc/ddclient/" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start \ + --chuid ddclient \ + --exec /usr/sbin/ddclient \ + --name ddclient \ + --pidfile "${PIDFILE}" \ + -- -pid="${PIDFILE}" + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon \ + --stop \ + --signal USR1 \ + --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-dns/ddclient/files/ddclient.initd-r1 b/net-dns/ddclient/files/ddclient.initd-r1 new file mode 100644 index 000000000000..ea5baf5ad6c1 --- /dev/null +++ b/net-dns/ddclient/files/ddclient.initd-r1 @@ -0,0 +1,44 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Default location if not specified in /etc/conf.d/ddclient +PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid} + +depend() { + before cron + need net + use dns logger squid +} + +checkconfig() { + local conf="/etc/ddclient/ddclient.conf" + + if [ -e "${conf}" ] ; then + if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm -0044)" ] ; then + eerror "${conf} must not be world or group readable. Try:" + eerror " chmod 600 ${conf}" + eerror " chown ddclient:ddclient ${conf}" + return 1 + fi + else + eerror "${conf} is needed to run ddclient" + eerror "There is a sample file in /etc/ddclient/" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \ + --name ddclient --pidfile "${PIDFILE}" -- -pid="${PIDFILE}" + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --signal USR1 --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-dns/ddclient/files/ddclient.initd-r2 b/net-dns/ddclient/files/ddclient.initd-r2 new file mode 100644 index 000000000000..2e6acaa100eb --- /dev/null +++ b/net-dns/ddclient/files/ddclient.initd-r2 @@ -0,0 +1,44 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Default location if not specified in /etc/conf.d/ddclient +PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid} + +depend() { + before cron + need net + use dns logger squid +} + +checkconfig() { + local conf="/etc/ddclient/ddclient.conf" + + if [ -e "${conf}" ] ; then + if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0044)" ] ; then + eerror "${conf} must not be world or group readable. Try:" + eerror " chmod 600 ${conf}" + eerror " chown ddclient:ddclient ${conf}" + return 1 + fi + else + eerror "${conf} is needed to run ddclient" + eerror "There is a sample file in /etc/ddclient/" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \ + --name ddclient --pidfile "${PIDFILE}" -- -pid="${PIDFILE}" + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --signal USR1 --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-dns/ddclient/files/ddclient.initd-r3 b/net-dns/ddclient/files/ddclient.initd-r3 new file mode 100644 index 000000000000..30b84fd71b69 --- /dev/null +++ b/net-dns/ddclient/files/ddclient.initd-r3 @@ -0,0 +1,58 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +if [ -d /run ] ; then + PIDFILE=${PIDFILE:-/run/ddclient/ddclient.pid} +else + PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid} +fi + +depend() { + before cron + need net + use dns logger squid +} + +checkconfig() { + local conf="/etc/ddclient/ddclient.conf" + + if [ -e "${conf}" ] ; then + if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0044)" ] ; then + eerror "${conf} must not be world or group readable. Try:" + eerror " chmod 600 ${conf}" + eerror " chown ddclient:ddclient ${conf}" + return 1 + fi + else + eerror "${conf} is needed to run ddclient" + eerror "There is a sample file in /etc/ddclient/" + return 1 + fi +} + +start() { + checkconfig || return 1 + + local piddir=$(dirname ${PIDFILE}) + if [ ! -d ${piddir} ] ; then + ebegin "Making ${piddir}" + mkdir -p ${piddir} + eend $? + ebegin "Changing permissions of ${piddir}" + chown ddclient:ddclient ${piddir} + eend $? + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \ + --name ddclient --pidfile ${PIDFILE} -- -pid=${PIDFILE} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --signal USR1 --pidfile ${PIDFILE} + eend $? +} diff --git a/net-dns/ddclient/files/ddclient.initd-r4 b/net-dns/ddclient/files/ddclient.initd-r4 new file mode 100644 index 000000000000..81425126e086 --- /dev/null +++ b/net-dns/ddclient/files/ddclient.initd-r4 @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +PIDFILE="/run/ddclient/ddclient.pid" + +depend() { + before cron + need net + use dns logger squid +} + +checkconfig() { + checkpath -f -m 0600 -o ddclient:ddclient /etc/ddclient/ddclient.conf || return 1 + checkpath -d -m 0700 -o ddclient:ddclient /run/ddclient || return 1 + checkpath -d -m 0700 -o ddclient:ddclient /var/cache/ddclient || return 1 +} + +start() { + checkconfig || return 1 + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start \ + --user ddclient \ + --name ddclient \ + --pidfile ${PIDFILE} \ + --exec /usr/sbin/ddclient -- -pid=${PIDFILE} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --signal USR1 --pidfile ${PIDFILE} + eend $? +} diff --git a/net-dns/ddclient/files/ddclient.service b/net-dns/ddclient/files/ddclient.service new file mode 100644 index 000000000000..e2d3608d44d4 --- /dev/null +++ b/net-dns/ddclient/files/ddclient.service @@ -0,0 +1,12 @@ +[Unit] +Description=Dynamic DNS Update Client +After=network.target +ConditionPathExists=/etc/ddclient/ddclient.conf + +[Service] +ExecStart=/usr/sbin/ddclient --foreground +User=ddclient +Group=ddclient + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/ddclient/files/iproute2.patch b/net-dns/ddclient/files/iproute2.patch new file mode 100644 index 000000000000..f81dd8c00d82 --- /dev/null +++ b/net-dns/ddclient/files/iproute2.patch @@ -0,0 +1,30 @@ +diff -u a/ddclient b/ddclient +--- a/ddclient 2011-07-11 17:04:21.000000000 -0400 ++++ b/ddclient 2011-08-12 20:13:15.980466303 -0400 +@@ -588,7 +588,7 @@ + [ "ip", "=s", "-ip address : set the IP address to 'address'" ], + "", + [ "if", "=s", "-if interface : obtain IP address from 'interface'" ], +- [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ], ++ [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ip addr show {if}" ], + "", + [ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ], + [ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ], +@@ -1316,7 +1316,7 @@ + + { + local $opt{'use'} = 'if'; +- foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) { ++ foreach my $if (grep {/^[a-zA-Z]/} `ip addr show`) { + $if =~ s/:?\s.*//is; + local $opt{'if'} = $if; + printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND'); +@@ -1937,7 +1937,7 @@ + + } elsif ($use eq 'if') { + $skip = opt('if-skip', $h) || ''; +- $reply = `ifconfig $arg 2> /dev/null`; ++ $reply = `ip addr show $arg 2> /dev/null`; + $reply = '' if $?; + + } elsif ($use eq 'cmd') { diff --git a/net-dns/ddclient/metadata.xml b/net-dns/ddclient/metadata.xml new file mode 100644 index 000000000000..cc58aadeb41e --- /dev/null +++ b/net-dns/ddclient/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>titanofold@gentoo.org</email> + <name>Aaron W. Swenson</name> + </maintainer> + <use> + <flag name="hardened">Use iproute2 instead of ifconfig to grab an IP address</flag> + </use> + <upstream> + <remote-id type="sourceforge">ddclient</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-dns/djbdns/Manifest b/net-dns/djbdns/Manifest new file mode 100644 index 000000000000..91dd57c4e4ca --- /dev/null +++ b/net-dns/djbdns/Manifest @@ -0,0 +1,4 @@ +DIST djbdns-1.05-man.tar.gz 17170 SHA256 ba1c58f14bc928908d8618230f400d73cfe2200ed800a272b63048e3e50be569 SHA512 98af7bd9033a2205fbbc0f23b7eab45b9756f6ceff5199a62952e19c89c9fe3c03495cb6f8621d388f883c40650309a1509095417df3f54af21a71350c4aa183 WHIRLPOOL b611e37e7422a4ae405fa15a4b9ff7eb8d0007d81310d044bc1982fe70dada1e4646cf22832e8e5320bae8d2e328eb87d59eb51c3d390f1089f30548053b839b +DIST djbdns-1.05-test25.diff.bz2 20376 SHA256 28c88de08822894cf252e54ed3be9abfdf4f492644ff74a7c479340bdce051ea SHA512 41cca597dba971010b9844071e0349d3a4b25cc4b144e12721b0bc8250589fb374e40ece8908f1081762597048179b1177e88b9a5f97be0b47b63e3183e654bb WHIRLPOOL d531001511ead02f51558909b13e14734f013213e0f13ec7589876878928bd4057f917e004e8d37955c2965aeba5d92a9fc481f2f9ac48c08edaeb9bb9b821d9 +DIST djbdns-1.05-test27.diff.bz2 20695 SHA256 0de38133336016d5a9159d0fe1beaea809e2229820256af114cbf911f04f202a SHA512 e5acf26ff353ae20b6c2186140255bf0ae478a75a9946163d4474a003afbf8c2f47e61a12fc3ed4b9eff17ec8732e9d91bfbb10fb2762310b067180b6d471ba0 WHIRLPOOL 5c89691836a349553531816a8b4c5b6edc18c2c0a1cf8309b67344ad04c9575fbc5f9d79dcf156aeb692ccd7a6fbd2ce2838fb2fd7b85bd6cd0693a9f657e66e +DIST djbdns-1.05.tar.gz 85648 SHA256 3ccd826a02f3cde39be088e1fc6aed9fd57756b8f970de5dc99fcd2d92536b48 SHA512 20f066402801d7bec183cb710a5bc51e41f1410024741e5803e26f68f2c13567e48eba793f233dfab903459c3335bc169e24b99d66a4c64e617e1f0779732fa9 WHIRLPOOL 0fb67d19fcbf1cf21debcedfd3456d9cb9160079631ae1995e94aa9db3969ae02927f215ee8a5f03b34a6523cb9e3abebabf23e08e95eb1efdb626eb8b10312f diff --git a/net-dns/djbdns/djbdns-1.05-r29.ebuild b/net-dns/djbdns/djbdns-1.05-r29.ebuild new file mode 100644 index 000000000000..14e4a297c817 --- /dev/null +++ b/net-dns/djbdns/djbdns-1.05-r29.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils flag-o-matic readme.gentoo toolchain-funcs user + +DESCRIPTION="Collection of DNS client/server software" +HOMEPAGE="http://cr.yp.to/djbdns.html" +IPV6_PATCH="test25" + +SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz + http://smarden.org/pape/djb/manpages/${P}-man.tar.gz + ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )" + +SLOT="0" +LICENSE="public-domain" +KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86" +IUSE="ipv6 selinux" + +DEPEND="!app-doc/djbdns-man" +RDEPEND="${DEPEND} + sys-apps/ucspi-tcp + virtual/daemontools + selinux? ( sec-policy/selinux-djbdns )" + +src_prepare() { + epatch \ + "${FILESDIR}/headtail.patch" \ + "${FILESDIR}/dnsroots.patch" \ + "${FILESDIR}/dnstracesort.patch" \ + "${FILESDIR}/string_length_255.patch" + + # Fix CVE2009-0858 + epatch "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch" + + if use ipv6; then + elog 'At present dnstrace does NOT support IPv6. It will'\ + 'be compiled without IPv6 support.' + + # Create a separate copy of the source tree for dnstrace. + cp -pR "${S}" "${S}-noipv6" || die + + # The big ipv6 patch. + epatch "${WORKDIR}/${P}-${IPV6_PATCH}.diff" + + # Fix CVE2008-4392 (ipv6) + epatch \ + "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-${IPV6_PATCH}.patch" \ + "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch" \ + "${FILESDIR}/makefile-parallel-${IPV6_PATCH}.patch" + + cd "${S}-noipv6" || die + fi + + # Fix CVE2008-4392 (no ipv6) + epatch \ + "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch" \ + "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch" + + # Later versions of the ipv6 patch include this, but even if + # USE=ipv6, we're in the ${S}-noipv6 directory at this point. + epatch "${FILESDIR}/${PV}-errno.patch" + + epatch_user +} + +src_compile() { + echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die + echo "/usr" > conf-home || die + emake + + # If djbdns is compiled with IPv6 support, it breaks dnstrace. + # Therefore we must compile dnstrace separately without IPv6 + # support. + if use ipv6; then + elog 'Compiling dnstrace without ipv6 support' + cp conf-cc conf-ld conf-home "${S}-noipv6/" || die + cd "${S}-noipv6" || die + emake dnstrace + fi +} + +src_install() { + insinto /etc + doins dnsroots.global + + into /usr + dobin *-conf dnscache tinydns walldns rbldns pickdns axfrdns \ + *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \ + dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort + + if use ipv6; then + dobin dnsip6 dnsip6q "${S}-noipv6/dnstrace" + fi + + dodoc CHANGES README + + cd "${WORKDIR}/${PN}-man" || die + doman *.1 *.5 *.8 + + readme.gentoo_create_doc +} + +pkg_preinst() { + # The nofiles group is no longer provided by baselayout. + # Share it with qmail if possible. + enewgroup nofiles 200 + + enewuser dnscache -1 -1 -1 nofiles + enewuser dnslog -1 -1 -1 nofiles + enewuser tinydns -1 -1 -1 nofiles +} + +DISABLE_AUTOFORMATTING=1 +FORCE_PRINT_ELOG=1 # remove after this message sees the stable tree +DOC_CONTENTS=' +The dnscache-setup, tinydns-setup, and djbdns-setup programs have +been removed to follow upstream more closely. To configure djbdns, +please follow the instructions at, + + http://cr.yp.to/djbdns.html + +Of particular interest are, + + axfrdns : http://cr.yp.to/djbdns/axfrdns-conf.html + dnscache: http://cr.yp.to/djbdns/run-cache-x-home.html + tinydns : http://cr.yp.to/djbdns/run-server.html + +Portage has created users for axfrdns, dnscache, and tinydns; the +commands to configure these programs are, + + 1. axfrdns-conf tinydns dnslog /var/axfrdns /var/tinydns $ip + 2. dnscache-conf dnscache dnslog /var/dnscache $ip + 3. tinydns-conf tinydns dnslog /var/tinydns $ip + +(replace $ip with the ip address on which the server will run). + +If you wish to configure rbldns or walldns, you will need to create +those users yourself (although you should still use the "dnslog" +user for the logs): + + 4. rbldns-conf $username dnslog /var/rbldns $ip $base + 5. walldns-conf $username dnslog /var/walldns $ip +' diff --git a/net-dns/djbdns/djbdns-1.05-r30.ebuild b/net-dns/djbdns/djbdns-1.05-r30.ebuild new file mode 100644 index 000000000000..3afbb6619026 --- /dev/null +++ b/net-dns/djbdns/djbdns-1.05-r30.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils flag-o-matic readme.gentoo toolchain-funcs user + +DESCRIPTION="Collection of DNS client/server software" +HOMEPAGE="http://cr.yp.to/djbdns.html" +IPV6_PATCH="test27" + +SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz + http://smarden.org/pape/djb/manpages/${P}-man.tar.gz + ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )" + +SLOT="0" +LICENSE="public-domain" +KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86" +IUSE="ipv6 selinux" + +DEPEND="" +RDEPEND="sys-apps/ucspi-tcp + virtual/daemontools + selinux? ( sec-policy/selinux-djbdns )" + +src_unpack(){ + # Unpack both djbdns and its man pages to separate directories. + default + + # Now move the man pages under ${S} so that user patches can be + # applied to them as well in src_prepare(). + mv "${PN}-man" "${P}/man" || die "failed to transplant man pages" +} + +src_prepare() { + epatch \ + "${FILESDIR}/headtail.patch" \ + "${FILESDIR}/dnsroots.patch" \ + "${FILESDIR}/dnstracesort.patch" \ + "${FILESDIR}/string_length_255.patch" \ + "${FILESDIR}/srv_record_support.patch" + + # Fix CVE2009-0858 + epatch "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch" + + if use ipv6; then + elog 'At present dnstrace does NOT support IPv6. It will'\ + 'be compiled without IPv6 support.' + + # Create a separate copy of the source tree for dnstrace. + cp -pR "${S}" "${S}-noipv6" || die + + # The big ipv6 patch. + epatch "${WORKDIR}/${P}-${IPV6_PATCH}.diff" + + # Fix CVE2008-4392 (ipv6) + epatch \ + "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch" \ + "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch" \ + "${FILESDIR}/makefile-parallel-test25.patch" + + cd "${S}-noipv6" || die + fi + + # Fix CVE2008-4392 (no ipv6) + epatch \ + "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch" \ + "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch" + + # Later versions of the ipv6 patch include this, but even if + # USE=ipv6, we're in the ${S}-noipv6 directory at this point. + epatch "${FILESDIR}/${PV}-errno.patch" + + epatch_user +} + +src_compile() { + echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die + echo "/usr" > conf-home || die + emake + + # If djbdns is compiled with IPv6 support, it breaks dnstrace. + # Therefore we must compile dnstrace separately without IPv6 + # support. + if use ipv6; then + elog 'Compiling dnstrace without ipv6 support' + cp conf-cc conf-ld conf-home "${S}-noipv6/" || die + cd "${S}-noipv6" || die + emake dnstrace + fi +} + +src_install() { + insinto /etc + doins dnsroots.global + + into /usr + dobin *-conf dnscache tinydns walldns rbldns pickdns axfrdns \ + *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \ + dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort + + if use ipv6; then + dobin dnsip6 dnsip6q "${S}-noipv6/dnstrace" + fi + + dodoc CHANGES README + + doman man/*.[158] + + readme.gentoo_create_doc +} + +pkg_preinst() { + # The nofiles group is no longer provided by baselayout. + # Share it with qmail if possible. + enewgroup nofiles 200 + + enewuser dnscache -1 -1 -1 nofiles + enewuser dnslog -1 -1 -1 nofiles + enewuser tinydns -1 -1 -1 nofiles +} + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=' +To configure djbdns, please follow the instructions at, + + http://cr.yp.to/djbdns.html + +Of particular interest are, + + axfrdns : http://cr.yp.to/djbdns/axfrdns-conf.html + dnscache: http://cr.yp.to/djbdns/run-cache-x-home.html + tinydns : http://cr.yp.to/djbdns/run-server.html + +Portage has created users for axfrdns, dnscache, and tinydns; the +commands to configure these programs are, + + 1. axfrdns-conf tinydns dnslog /var/axfrdns /var/tinydns $ip + 2. dnscache-conf dnscache dnslog /var/dnscache $ip + 3. tinydns-conf tinydns dnslog /var/tinydns $ip + +(replace $ip with the ip address on which the server will run). + +If you wish to configure rbldns or walldns, you will need to create +those users yourself (although you should still use the "dnslog" +user for the logs): + + 4. rbldns-conf $username dnslog /var/rbldns $ip $base + 5. walldns-conf $username dnslog /var/walldns $ip +' diff --git a/net-dns/djbdns/files/1.05-errno.patch b/net-dns/djbdns/files/1.05-errno.patch new file mode 100644 index 000000000000..b4650b1a9cfe --- /dev/null +++ b/net-dns/djbdns/files/1.05-errno.patch @@ -0,0 +1,11 @@ +--- error.h 2001-02-11 15:11:45.000000000 -0600 ++++ error.h 2003-02-26 02:10:21.000000000 -0600 +@@ -1,7 +1,7 @@ + #ifndef ERROR_H + #define ERROR_H + +-extern int errno; ++#include <errno.h> + + extern int error_intr; + extern int error_nomem; diff --git a/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch new file mode 100644 index 000000000000..e33e0ccd6015 --- /dev/null +++ b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch @@ -0,0 +1,351 @@ +diff --git a/Makefile b/Makefile +index 5ccd647..eee09dd 100644 +--- a/Makefile ++++ b/Makefile +@@ -346,11 +346,11 @@ stralloc.h iopause.h taia.h tai.h uint64.h taia.h + ./compile dns_txt.c + + dnscache: \ +-load dnscache.o droproot.o okclient.o log.o cache.o query.o \ ++load dnscache.o droproot.o okclient.o log.o cache.o query.o qmerge.o \ + response.o dd.o roots.o iopause.o prot.o dns.a env.a alloc.a buffer.a \ + libtai.a unix.a byte.a socket.lib + ./load dnscache droproot.o okclient.o log.o cache.o \ +- query.o response.o dd.o roots.o iopause.o prot.o dns.a \ ++ query.o qmerge.o response.o dd.o roots.o iopause.o prot.o dns.a \ + env.a alloc.a buffer.a libtai.a unix.a byte.a `cat \ + socket.lib` + +@@ -371,7 +371,7 @@ compile dnscache.c env.h exit.h scan.h strerr.h error.h ip4.h \ + uint16.h uint64.h socket.h uint16.h dns.h stralloc.h gen_alloc.h \ + iopause.h taia.h tai.h uint64.h taia.h taia.h byte.h roots.h fmt.h \ + iopause.h query.h dns.h uint32.h alloc.h response.h uint32.h cache.h \ +-uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h ++uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h maxclient.h + ./compile dnscache.c + + dnsfilter: \ +@@ -749,11 +749,16 @@ qlog.o: \ + compile qlog.c buffer.h qlog.h uint16.h + ./compile qlog.c + ++qmerge.o: \ ++compile qmerge.c qmerge.h dns.h stralloc.h gen_alloc.h iopause.h \ ++taia.h tai.h uint64.h log.h maxclient.h ++ ./compile qmerge.c ++ + query.o: \ + compile query.c error.h roots.h log.h uint64.h case.h cache.h \ + uint32.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h \ + taia.h tai.h uint64.h taia.h uint64.h uint32.h uint16.h dd.h alloc.h \ +-response.h uint32.h query.h dns.h uint32.h ++response.h uint32.h query.h dns.h uint32.h qmerge.h + ./compile query.c + + random-ip: \ +diff --git a/dnscache.c b/dnscache.c +index abcba69..c84e4b8 100644 +--- a/dnscache.c ++++ b/dnscache.c +@@ -23,6 +23,7 @@ + #include "log.h" + #include "okclient.h" + #include "droproot.h" ++#include "maxclient.h" + + long interface; + +@@ -59,7 +60,6 @@ uint64 numqueries = 0; + + static int udp53; + +-#define MAXUDP 200 + static struct udpclient { + struct query q; + struct taia start; +@@ -136,7 +136,6 @@ void u_new(void) + + static int tcp53; + +-#define MAXTCP 20 + struct tcpclient { + struct query q; + struct taia start; +diff --git a/log.c b/log.c +index df465e2..1b0d98c 100644 +--- a/log.c ++++ b/log.c +@@ -149,6 +149,13 @@ void log_tx(const char *q,const char qtype[2],const char *control,const char ser + line(); + } + ++void log_tx_piggyback(const char *q, const char qtype[2], const char *control) ++{ ++ string("txpb "); ++ logtype(qtype); space(); name(q); space(); name(control); ++ line(); ++} ++ + void log_cachedanswer(const char *q,const char type[2]) + { + string("cached "); logtype(type); space(); +diff --git a/log.h b/log.h +index fe62fa3..d9a829b 100644 +--- a/log.h ++++ b/log.h +@@ -18,6 +18,7 @@ extern void log_cachednxdomain(const char *); + extern void log_cachedns(const char *,const char *); + + extern void log_tx(const char *,const char *,const char *,const char *,unsigned int); ++extern void log_tx_piggyback(const char *,const char *,const char *); + + extern void log_nxdomain(const char *,const char *,unsigned int); + extern void log_nodata(const char *,const char *,const char *,unsigned int); +diff --git a/maxclient.h b/maxclient.h +new file mode 100644 +index 0000000..e52fcd1 +--- /dev/null ++++ b/maxclient.h +@@ -0,0 +1,7 @@ ++#ifndef MAXCLIENT_H ++#define MAXCLIENT_H ++ ++#define MAXUDP 200 ++#define MAXTCP 20 ++ ++#endif /* MAXCLIENT_H */ +diff --git a/qmerge.c b/qmerge.c +new file mode 100644 +index 0000000..7c92299 +--- /dev/null ++++ b/qmerge.c +@@ -0,0 +1,115 @@ ++#include "qmerge.h" ++#include "byte.h" ++#include "log.h" ++#include "maxclient.h" ++ ++#define QMERGE_MAX (MAXUDP+MAXTCP) ++struct qmerge inprogress[QMERGE_MAX]; ++ ++static ++int qmerge_key_init(struct qmerge_key *qmk, const char *q, const char qtype[2], ++ const char *control) ++{ ++ if (!dns_domain_copy(&qmk->q, q)) return 0; ++ byte_copy(qmk->qtype, 2, qtype); ++ if (!dns_domain_copy(&qmk->control, control)) return 0; ++ return 1; ++} ++ ++static ++int qmerge_key_equal(struct qmerge_key *a, struct qmerge_key *b) ++{ ++ return ++ byte_equal(a->qtype, 2, b->qtype) && ++ dns_domain_equal(a->q, b->q) && ++ dns_domain_equal(a->control, b->control); ++} ++ ++static ++void qmerge_key_free(struct qmerge_key *qmk) ++{ ++ dns_domain_free(&qmk->q); ++ dns_domain_free(&qmk->control); ++} ++ ++void qmerge_free(struct qmerge **x) ++{ ++ struct qmerge *qm; ++ ++ qm = *x; ++ *x = 0; ++ if (!qm || !qm->active) return; ++ ++ qm->active--; ++ if (!qm->active) { ++ qmerge_key_free(&qm->key); ++ dns_transmit_free(&qm->dt); ++ } ++} ++ ++int qmerge_start(struct qmerge **qm, const char servers[64], int flagrecursive, ++ const char *q, const char qtype[2], const char localip[4], ++ const char *control) ++{ ++ struct qmerge_key k; ++ int i; ++ int r; ++ ++ qmerge_free(qm); ++ ++ byte_zero(&k, sizeof k); ++ if (!qmerge_key_init(&k, q, qtype, control)) return -1; ++ for (i = 0; i < QMERGE_MAX; i++) { ++ if (!inprogress[i].active) continue; ++ if (!qmerge_key_equal(&k, &inprogress[i].key)) continue; ++ log_tx_piggyback(q, qtype, control); ++ inprogress[i].active++; ++ *qm = &inprogress[i]; ++ qmerge_key_free(&k); ++ return 0; ++ } ++ ++ for (i = 0; i < QMERGE_MAX; i++) ++ if (!inprogress[i].active) ++ break; ++ if (i == QMERGE_MAX) return -1; ++ ++ log_tx(q, qtype, control, servers, 0); ++ r = dns_transmit_start(&inprogress[i].dt, servers, flagrecursive, q, qtype, localip); ++ if (r == -1) { qmerge_key_free(&k); return -1; } ++ inprogress[i].active++; ++ inprogress[i].state = 0; ++ qmerge_key_free(&inprogress[i].key); ++ byte_copy(&inprogress[i].key, sizeof k, &k); ++ *qm = &inprogress[i]; ++ return 0; ++} ++ ++void qmerge_io(struct qmerge *qm, iopause_fd *io, struct taia *deadline) ++{ ++ if (qm->state == 0) { ++ dns_transmit_io(&qm->dt, io, deadline); ++ qm->state = 1; ++ } ++ else { ++ io->fd = -1; ++ io->events = 0; ++ } ++} ++ ++int qmerge_get(struct qmerge **x, const iopause_fd *io, const struct taia *when) ++{ ++ int r; ++ struct qmerge *qm; ++ ++ qm = *x; ++ if (qm->state == -1) return -1; /* previous error */ ++ if (qm->state == 0) return 0; /* no packet */ ++ if (qm->state == 2) return 1; /* already got packet */ ++ ++ r = dns_transmit_get(&qm->dt, io, when); ++ if (r == -1) { qm->state = -1; return -1; } /* error */ ++ if (r == 0) { qm->state = 0; return 0; } /* must wait for i/o */ ++ if (r == 1) { qm->state = 2; return 1; } /* got packet */ ++ return -1; /* bug */ ++} +diff --git a/qmerge.h b/qmerge.h +new file mode 100644 +index 0000000..9a58157 +--- /dev/null ++++ b/qmerge.h +@@ -0,0 +1,24 @@ ++#ifndef QMERGE_H ++#define QMERGE_H ++ ++#include "dns.h" ++ ++struct qmerge_key { ++ char *q; ++ char qtype[2]; ++ char *control; ++}; ++ ++struct qmerge { ++ int active; ++ struct qmerge_key key; ++ struct dns_transmit dt; ++ int state; /* -1 = error, 0 = need io, 1 = need get, 2 = got packet */ ++}; ++ ++extern int qmerge_start(struct qmerge **,const char *,int,const char *,const char *,const char *,const char *); ++extern void qmerge_io(struct qmerge *,iopause_fd *,struct taia *); ++extern int qmerge_get(struct qmerge **,const iopause_fd *,const struct taia *); ++extern void qmerge_free(struct qmerge **); ++ ++#endif /* QMERGE_H */ +diff --git a/query.c b/query.c +index d61b20c..d9be8b8 100644 +--- a/query.c ++++ b/query.c +@@ -84,7 +84,7 @@ static void cleanup(struct query *z) + int j; + int k; + +- dns_transmit_free(&z->dt); ++ qmerge_free(&z->qm); + for (j = 0;j < QUERY_MAXALIAS;++j) + dns_domain_free(&z->alias[j]); + for (j = 0;j < QUERY_MAXLEVEL;++j) { +@@ -624,15 +624,9 @@ static int doit(struct query *z,int state) + if (j == 256) goto SERVFAIL; + + dns_sortip6(z->servers[z->level],256); +- if (z->level) { +- dtype = z->ipv6[z->level] ? DNS_T_AAAA : DNS_T_A; +- log_tx(z->name[z->level],dtype,z->control[z->level],z->servers[z->level],z->level); +- if (dns_transmit_start(&z->dt,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip) == -1) goto DIE; +- } +- else { +- log_tx(z->name[0],z->type,z->control[0],z->servers[0],0); +- if (dns_transmit_start(&z->dt,z->servers[0],flagforwardonly,z->name[0],z->type,z->localip) == -1) goto DIE; +- } ++ dtype = z->level ? (z->ipv6[z->level] ? DNS_T_AAAA : DNS_T_A) : z->type; ++ if (qmerge_start(&z->qm,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip,z->control[z->level]) == -1) goto DIE; ++ + return 0; + + +@@ -646,10 +640,10 @@ static int doit(struct query *z,int state) + + HAVEPACKET: + if (++z->loop == 100) goto DIE; +- buf = z->dt.packet; +- len = z->dt.packetlen; ++ buf = z->qm->dt.packet; ++ len = z->qm->dt.packetlen; + +- whichserver = z->dt.servers + 16 * z->dt.curserver; ++ whichserver = z->qm->dt.servers + 16 * z->qm->dt.curserver; + control = z->control[z->level]; + d = z->name[z->level]; + /* dtype = z->level ? DNS_T_A : z->type; */ +@@ -1071,7 +1065,7 @@ int query_start(struct query *z,char *dn,char type[2],char class[2],char localip + + int query_get(struct query *z,iopause_fd *x,struct taia *stamp) + { +- switch(dns_transmit_get(&z->dt,x,stamp)) { ++ switch(qmerge_get(&z->qm,x,stamp)) { + case 1: + return doit(z,1); + case -1: +@@ -1082,5 +1076,5 @@ int query_get(struct query *z,iopause_fd *x,struct taia *stamp) + + void query_io(struct query *z,iopause_fd *x,struct taia *deadline) + { +- dns_transmit_io(&z->dt,x,deadline); ++ qmerge_io(z->qm,x,deadline); + } +diff --git a/query.h b/query.h +index 61812aa..93a322e 100644 +--- a/query.h ++++ b/query.h +@@ -1,7 +1,7 @@ + #ifndef QUERY_H + #define QUERY_H + +-#include "dns.h" ++#include "qmerge.h" + #include "uint32.h" + + #define QUERY_MAXLEVEL 5 +@@ -22,7 +22,7 @@ struct query { + uint32 scope_id; + char type[2]; + char class[2]; +- struct dns_transmit dt; ++ struct qmerge *qm; + } ; + + extern int query_start(struct query *,char *,char *,char *,char *,unsigned int); diff --git a/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch new file mode 100644 index 000000000000..a0391ff00712 --- /dev/null +++ b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch @@ -0,0 +1,349 @@ +diff --git a/Makefile b/Makefile +index 1429643..bc047c0 100644 +--- a/Makefile ++++ b/Makefile +@@ -318,11 +318,11 @@ stralloc.h iopause.h taia.h tai.h uint64.h taia.h + ./compile dns_txt.c + + dnscache: \ +-load dnscache.o droproot.o okclient.o log.o cache.o query.o \ ++load dnscache.o droproot.o okclient.o log.o cache.o query.o qmerge.o \ + response.o dd.o roots.o iopause.o prot.o dns.a env.a alloc.a buffer.a \ + libtai.a unix.a byte.a socket.lib + ./load dnscache droproot.o okclient.o log.o cache.o \ +- query.o response.o dd.o roots.o iopause.o prot.o dns.a \ ++ query.o qmerge.o response.o dd.o roots.o iopause.o prot.o dns.a \ + env.a alloc.a buffer.a libtai.a unix.a byte.a `cat \ + socket.lib` + +@@ -343,7 +343,7 @@ compile dnscache.c env.h exit.h scan.h strerr.h error.h ip4.h \ + uint16.h uint64.h socket.h uint16.h dns.h stralloc.h gen_alloc.h \ + iopause.h taia.h tai.h uint64.h taia.h taia.h byte.h roots.h fmt.h \ + iopause.h query.h dns.h uint32.h alloc.h response.h uint32.h cache.h \ +-uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h ++uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h maxclient.h + ./compile dnscache.c + + dnsfilter: \ +@@ -687,11 +687,16 @@ qlog.o: \ + compile qlog.c buffer.h qlog.h uint16.h + ./compile qlog.c + ++qmerge.o: \ ++compile qmerge.c qmerge.h dns.h stralloc.h gen_alloc.h iopause.h \ ++taia.h tai.h uint64.h log.h maxclient.h ++ ./compile qmerge.c ++ + query.o: \ + compile query.c error.h roots.h log.h uint64.h case.h cache.h \ + uint32.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h \ + taia.h tai.h uint64.h taia.h uint64.h uint32.h uint16.h dd.h alloc.h \ +-response.h uint32.h query.h dns.h uint32.h ++response.h uint32.h query.h dns.h uint32.h qmerge.h + ./compile query.c + + random-ip: \ +diff --git a/dnscache.c b/dnscache.c +index 8c899a3..5ccb16a 100644 +--- a/dnscache.c ++++ b/dnscache.c +@@ -22,6 +22,7 @@ + #include "log.h" + #include "okclient.h" + #include "droproot.h" ++#include "maxclient.h" + + static int packetquery(char *buf,unsigned int len,char **q,char qtype[2],char qclass[2],char id[2]) + { +@@ -54,7 +55,6 @@ uint64 numqueries = 0; + + static int udp53; + +-#define MAXUDP 200 + static struct udpclient { + struct query q; + struct taia start; +@@ -131,7 +131,6 @@ void u_new(void) + + static int tcp53; + +-#define MAXTCP 20 + struct tcpclient { + struct query q; + struct taia start; +diff --git a/log.c b/log.c +index c43e8b0..b8cd7ce 100644 +--- a/log.c ++++ b/log.c +@@ -150,6 +150,13 @@ void log_tx(const char *q,const char qtype[2],const char *control,const char ser + line(); + } + ++void log_tx_piggyback(const char *q, const char qtype[2], const char *control) ++{ ++ string("txpb "); ++ logtype(qtype); space(); name(q); space(); name(control); ++ line(); ++} ++ + void log_cachedanswer(const char *q,const char type[2]) + { + string("cached "); logtype(type); space(); +diff --git a/log.h b/log.h +index fe62fa3..d9a829b 100644 +--- a/log.h ++++ b/log.h +@@ -18,6 +18,7 @@ extern void log_cachednxdomain(const char *); + extern void log_cachedns(const char *,const char *); + + extern void log_tx(const char *,const char *,const char *,const char *,unsigned int); ++extern void log_tx_piggyback(const char *,const char *,const char *); + + extern void log_nxdomain(const char *,const char *,unsigned int); + extern void log_nodata(const char *,const char *,const char *,unsigned int); +diff --git a/maxclient.h b/maxclient.h +new file mode 100644 +index 0000000..e52fcd1 +--- /dev/null ++++ b/maxclient.h +@@ -0,0 +1,7 @@ ++#ifndef MAXCLIENT_H ++#define MAXCLIENT_H ++ ++#define MAXUDP 200 ++#define MAXTCP 20 ++ ++#endif /* MAXCLIENT_H */ +diff --git a/qmerge.c b/qmerge.c +new file mode 100644 +index 0000000..7c92299 +--- /dev/null ++++ b/qmerge.c +@@ -0,0 +1,115 @@ ++#include "qmerge.h" ++#include "byte.h" ++#include "log.h" ++#include "maxclient.h" ++ ++#define QMERGE_MAX (MAXUDP+MAXTCP) ++struct qmerge inprogress[QMERGE_MAX]; ++ ++static ++int qmerge_key_init(struct qmerge_key *qmk, const char *q, const char qtype[2], ++ const char *control) ++{ ++ if (!dns_domain_copy(&qmk->q, q)) return 0; ++ byte_copy(qmk->qtype, 2, qtype); ++ if (!dns_domain_copy(&qmk->control, control)) return 0; ++ return 1; ++} ++ ++static ++int qmerge_key_equal(struct qmerge_key *a, struct qmerge_key *b) ++{ ++ return ++ byte_equal(a->qtype, 2, b->qtype) && ++ dns_domain_equal(a->q, b->q) && ++ dns_domain_equal(a->control, b->control); ++} ++ ++static ++void qmerge_key_free(struct qmerge_key *qmk) ++{ ++ dns_domain_free(&qmk->q); ++ dns_domain_free(&qmk->control); ++} ++ ++void qmerge_free(struct qmerge **x) ++{ ++ struct qmerge *qm; ++ ++ qm = *x; ++ *x = 0; ++ if (!qm || !qm->active) return; ++ ++ qm->active--; ++ if (!qm->active) { ++ qmerge_key_free(&qm->key); ++ dns_transmit_free(&qm->dt); ++ } ++} ++ ++int qmerge_start(struct qmerge **qm, const char servers[64], int flagrecursive, ++ const char *q, const char qtype[2], const char localip[4], ++ const char *control) ++{ ++ struct qmerge_key k; ++ int i; ++ int r; ++ ++ qmerge_free(qm); ++ ++ byte_zero(&k, sizeof k); ++ if (!qmerge_key_init(&k, q, qtype, control)) return -1; ++ for (i = 0; i < QMERGE_MAX; i++) { ++ if (!inprogress[i].active) continue; ++ if (!qmerge_key_equal(&k, &inprogress[i].key)) continue; ++ log_tx_piggyback(q, qtype, control); ++ inprogress[i].active++; ++ *qm = &inprogress[i]; ++ qmerge_key_free(&k); ++ return 0; ++ } ++ ++ for (i = 0; i < QMERGE_MAX; i++) ++ if (!inprogress[i].active) ++ break; ++ if (i == QMERGE_MAX) return -1; ++ ++ log_tx(q, qtype, control, servers, 0); ++ r = dns_transmit_start(&inprogress[i].dt, servers, flagrecursive, q, qtype, localip); ++ if (r == -1) { qmerge_key_free(&k); return -1; } ++ inprogress[i].active++; ++ inprogress[i].state = 0; ++ qmerge_key_free(&inprogress[i].key); ++ byte_copy(&inprogress[i].key, sizeof k, &k); ++ *qm = &inprogress[i]; ++ return 0; ++} ++ ++void qmerge_io(struct qmerge *qm, iopause_fd *io, struct taia *deadline) ++{ ++ if (qm->state == 0) { ++ dns_transmit_io(&qm->dt, io, deadline); ++ qm->state = 1; ++ } ++ else { ++ io->fd = -1; ++ io->events = 0; ++ } ++} ++ ++int qmerge_get(struct qmerge **x, const iopause_fd *io, const struct taia *when) ++{ ++ int r; ++ struct qmerge *qm; ++ ++ qm = *x; ++ if (qm->state == -1) return -1; /* previous error */ ++ if (qm->state == 0) return 0; /* no packet */ ++ if (qm->state == 2) return 1; /* already got packet */ ++ ++ r = dns_transmit_get(&qm->dt, io, when); ++ if (r == -1) { qm->state = -1; return -1; } /* error */ ++ if (r == 0) { qm->state = 0; return 0; } /* must wait for i/o */ ++ if (r == 1) { qm->state = 2; return 1; } /* got packet */ ++ return -1; /* bug */ ++} +diff --git a/qmerge.h b/qmerge.h +new file mode 100644 +index 0000000..9a58157 +--- /dev/null ++++ b/qmerge.h +@@ -0,0 +1,24 @@ ++#ifndef QMERGE_H ++#define QMERGE_H ++ ++#include "dns.h" ++ ++struct qmerge_key { ++ char *q; ++ char qtype[2]; ++ char *control; ++}; ++ ++struct qmerge { ++ int active; ++ struct qmerge_key key; ++ struct dns_transmit dt; ++ int state; /* -1 = error, 0 = need io, 1 = need get, 2 = got packet */ ++}; ++ ++extern int qmerge_start(struct qmerge **,const char *,int,const char *,const char *,const char *,const char *); ++extern void qmerge_io(struct qmerge *,iopause_fd *,struct taia *); ++extern int qmerge_get(struct qmerge **,const iopause_fd *,const struct taia *); ++extern void qmerge_free(struct qmerge **); ++ ++#endif /* QMERGE_H */ +diff --git a/query.c b/query.c +index 46cdc00..f091fdd 100644 +--- a/query.c ++++ b/query.c +@@ -81,7 +81,7 @@ static void cleanup(struct query *z) + int j; + int k; + +- dns_transmit_free(&z->dt); ++ qmerge_free(&z->qm); + for (j = 0;j < QUERY_MAXALIAS;++j) + dns_domain_free(&z->alias[j]); + for (j = 0;j < QUERY_MAXLEVEL;++j) { +@@ -429,14 +429,8 @@ static int doit(struct query *z,int state) + if (j == 64) goto SERVFAIL; + + dns_sortip(z->servers[z->level],64); +- if (z->level) { +- log_tx(z->name[z->level],DNS_T_A,z->control[z->level],z->servers[z->level],z->level); +- if (dns_transmit_start(&z->dt,z->servers[z->level],flagforwardonly,z->name[z->level],DNS_T_A,z->localip) == -1) goto DIE; +- } +- else { +- log_tx(z->name[0],z->type,z->control[0],z->servers[0],0); +- if (dns_transmit_start(&z->dt,z->servers[0],flagforwardonly,z->name[0],z->type,z->localip) == -1) goto DIE; +- } ++ dtype = z->level ? DNS_T_A : z->type; ++ if (qmerge_start(&z->qm,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip,z->control[z->level]) == -1) goto DIE; + return 0; + + +@@ -450,10 +444,10 @@ static int doit(struct query *z,int state) + + HAVEPACKET: + if (++z->loop == 100) goto DIE; +- buf = z->dt.packet; +- len = z->dt.packetlen; ++ buf = z->qm->dt.packet; ++ len = z->qm->dt.packetlen; + +- whichserver = z->dt.servers + 4 * z->dt.curserver; ++ whichserver = z->qm->dt.servers + 4 * z->qm->dt.curserver; + control = z->control[z->level]; + d = z->name[z->level]; + dtype = z->level ? DNS_T_A : z->type; +@@ -836,7 +830,7 @@ int query_start(struct query *z,char *dn,char type[2],char class[2],char localip + + int query_get(struct query *z,iopause_fd *x,struct taia *stamp) + { +- switch(dns_transmit_get(&z->dt,x,stamp)) { ++ switch(qmerge_get(&z->qm,x,stamp)) { + case 1: + return doit(z,1); + case -1: +@@ -847,5 +841,5 @@ int query_get(struct query *z,iopause_fd *x,struct taia *stamp) + + void query_io(struct query *z,iopause_fd *x,struct taia *deadline) + { +- dns_transmit_io(&z->dt,x,deadline); ++ qmerge_io(z->qm,x,deadline); + } +diff --git a/query.h b/query.h +index eff68b2..06feab4 100644 +--- a/query.h ++++ b/query.h +@@ -1,7 +1,7 @@ + #ifndef QUERY_H + #define QUERY_H + +-#include "dns.h" ++#include "qmerge.h" + #include "uint32.h" + + #define QUERY_MAXLEVEL 5 +@@ -20,7 +20,7 @@ struct query { + char localip[4]; + char type[2]; + char class[2]; +- struct dns_transmit dt; ++ struct qmerge *qm; + } ; + + extern int query_start(struct query *,char *,char *,char *,char *); diff --git a/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch new file mode 100644 index 000000000000..d5b9c10d64d3 --- /dev/null +++ b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch @@ -0,0 +1,68 @@ +diff -urNp a/query.c b/query.c +--- a/query.c 2009-03-19 11:35:28.452472164 -0700 ++++ b/query.c 2009-03-19 11:59:19.798221593 -0700 +@@ -476,6 +476,29 @@ static int doit(struct query *z,int stat + } + } + ++ if (typematch(DNS_T_SOA,dtype)) { ++ byte_copy(key,2,DNS_T_SOA); ++ cached = cache_get(key,dlen + 2,&cachedlen,&ttl); ++ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) { ++ log_cachedanswer(d,DNS_T_SOA); ++ if (!rqa(z)) goto DIE; ++ pos = 0; ++ while (pos = dns_packet_copy(cached,cachedlen,pos,misc,20)) { ++ pos = dns_packet_getname(cached,cachedlen,pos,&t2); ++ if (!pos) break; ++ pos = dns_packet_getname(cached,cachedlen,pos,&t3); ++ if (!pos) break; ++ if (!response_rstart(d,DNS_T_SOA,ttl)) goto DIE; ++ if (!response_addname(t2)) goto DIE; ++ if (!response_addname(t3)) goto DIE; ++ if (!response_addbytes(misc,20)) goto DIE; ++ response_rfinish(RESPONSE_ANSWER); ++ } ++ cleanup(z); ++ return 1; ++ } ++ } ++ + if (typematch(DNS_T_A,dtype)) { + byte_copy(key,2,DNS_T_A); + cached = cache_get(key,dlen + 2,&cachedlen,&ttl); +@@ -541,7 +564,7 @@ static int doit(struct query *z,int stat + } + } + +- if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_AAAA,dtype)) { ++ if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_SOA,dtype) && !typematch(DNS_T_AAAA,dtype)) { + byte_copy(key,2,dtype); + cached = cache_get(key,dlen + 2,&cachedlen,&ttl); + if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) { +@@ -769,15 +792,24 @@ static int doit(struct query *z,int stat + else if (byte_equal(type,2,DNS_T_AXFR)) + ; + else if (byte_equal(type,2,DNS_T_SOA)) { ++ int non_authority = 0; ++ save_start(); + while (i < j) { + pos = dns_packet_skipname(buf,len,records[i]); if (!pos) goto DIE; + pos = dns_packet_getname(buf,len,pos + 10,&t2); if (!pos) goto DIE; + pos = dns_packet_getname(buf,len,pos,&t3); if (!pos) goto DIE; + pos = dns_packet_copy(buf,len,pos,misc,20); if (!pos) goto DIE; +- if (records[i] < posauthority) ++ if (records[i] < posauthority) { + log_rrsoa(whichserver,t1,t2,t3,misc,ttl); ++ save_data(misc,20); ++ save_data(t2,dns_domain_length(t2)); ++ save_data(t3,dns_domain_length(t3)); ++ non_authority++; ++ } + ++i; + } ++ if (non_authority) ++ save_finish(DNS_T_SOA,t1,ttl); + } + else if (byte_equal(type,2,DNS_T_CNAME)) { + pos = dns_packet_skipname(buf,len,records[j - 1]); if (!pos) goto DIE; diff --git a/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch new file mode 100644 index 000000000000..9230e7583ddd --- /dev/null +++ b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch @@ -0,0 +1,70 @@ +diff --git a/query.c b/query.c +index 46cdc00..4574e97 100644 +--- a/query.c ++++ b/query.c +@@ -319,6 +319,29 @@ static int doit(struct query *z,int state) + } + } + ++ if (typematch(DNS_T_SOA,dtype)) { ++ byte_copy(key,2,DNS_T_SOA); ++ cached = cache_get(key,dlen + 2,&cachedlen,&ttl); ++ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) { ++ log_cachedanswer(d,DNS_T_SOA); ++ if (!rqa(z)) goto DIE; ++ pos = 0; ++ while (pos = dns_packet_copy(cached,cachedlen,pos,misc,20)) { ++ pos = dns_packet_getname(cached,cachedlen,pos,&t2); ++ if (!pos) break; ++ pos = dns_packet_getname(cached,cachedlen,pos,&t3); ++ if (!pos) break; ++ if (!response_rstart(d,DNS_T_SOA,ttl)) goto DIE; ++ if (!response_addname(t2)) goto DIE; ++ if (!response_addname(t3)) goto DIE; ++ if (!response_addbytes(misc,20)) goto DIE; ++ response_rfinish(RESPONSE_ANSWER); ++ } ++ cleanup(z); ++ return 1; ++ } ++ } ++ + if (typematch(DNS_T_A,dtype)) { + byte_copy(key,2,DNS_T_A); + cached = cache_get(key,dlen + 2,&cachedlen,&ttl); +@@ -351,7 +374,7 @@ static int doit(struct query *z,int state) + } + } + +- if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype)) { ++ if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_SOA,dtype)) { + byte_copy(key,2,dtype); + cached = cache_get(key,dlen + 2,&cachedlen,&ttl); + if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) { +@@ -585,15 +608,24 @@ static int doit(struct query *z,int state) + else if (byte_equal(type,2,DNS_T_AXFR)) + ; + else if (byte_equal(type,2,DNS_T_SOA)) { ++ int non_authority = 0; ++ save_start(); + while (i < j) { + pos = dns_packet_skipname(buf,len,records[i]); if (!pos) goto DIE; + pos = dns_packet_getname(buf,len,pos + 10,&t2); if (!pos) goto DIE; + pos = dns_packet_getname(buf,len,pos,&t3); if (!pos) goto DIE; + pos = dns_packet_copy(buf,len,pos,misc,20); if (!pos) goto DIE; +- if (records[i] < posauthority) ++ if (records[i] < posauthority) { + log_rrsoa(whichserver,t1,t2,t3,misc,ttl); ++ save_data(misc,20); ++ save_data(t2,dns_domain_length(t2)); ++ save_data(t3,dns_domain_length(t3)); ++ non_authority++; ++ } + ++i; + } ++ if (non_authority) ++ save_finish(DNS_T_SOA,t1,ttl); + } + else if (byte_equal(type,2,DNS_T_CNAME)) { + pos = dns_packet_skipname(buf,len,records[j - 1]); if (!pos) goto DIE; + diff --git a/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch b/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch new file mode 100644 index 000000000000..23d8e9f86b12 --- /dev/null +++ b/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch @@ -0,0 +1,11 @@ +--- a/response.c ++++ b/response.c +@@ -34,7 +34,7 @@ int response_addname(const char *d) + uint16_pack_big(buf,49152 + name_ptr[i]); + return response_addbytes(buf,2); + } +- if (dlen <= 128) ++ if ((dlen <= 128) && (response_len < 16384)) + if (name_num < NAMES) { + byte_copy(name[name_num],dlen,d); + name_ptr[name_num] = response_len; diff --git a/net-dns/djbdns/files/dnsroots.patch b/net-dns/djbdns/files/dnsroots.patch new file mode 100644 index 000000000000..d2524be5a870 --- /dev/null +++ b/net-dns/djbdns/files/dnsroots.patch @@ -0,0 +1,20 @@ +--- a/dnsroots.global ++++ b/dnsroots.global +@@ -1,13 +1,13 @@ + 198.41.0.4 +-128.9.0.107 ++192.228.79.201 + 192.33.4.12 +-128.8.10.90 ++199.7.91.13 + 192.203.230.10 + 192.5.5.241 + 192.112.36.4 + 128.63.2.53 + 192.36.148.17 +-198.41.0.10 ++192.58.128.30 + 193.0.14.129 +-198.32.64.12 ++199.7.83.42 + 202.12.27.33 diff --git a/net-dns/djbdns/files/dnstracesort.patch b/net-dns/djbdns/files/dnstracesort.patch new file mode 100644 index 000000000000..3bf56f5a1ce6 --- /dev/null +++ b/net-dns/djbdns/files/dnstracesort.patch @@ -0,0 +1,11 @@ +--- djbdns-1.05/dnstracesort.sh.orig 2006-04-26 21:52:54.000000000 +0200 ++++ djbdns-1.05/dnstracesort.sh 2006-04-26 21:53:02.000000000 +0200 +@@ -12,7 +12,7 @@ + } + print + } +-' | sort -t: +0 -2 +4 +3 -4 +2 -3 | uniq | awk -F: ' ++' | sort -t: -k 1,3 -k 5 -k 4,5 -k 3,4 | uniq | awk -F: ' + { + type = $1 + q = $2 diff --git a/net-dns/djbdns/files/headtail.patch b/net-dns/djbdns/files/headtail.patch new file mode 100644 index 000000000000..6321cc1ebd97 --- /dev/null +++ b/net-dns/djbdns/files/headtail.patch @@ -0,0 +1,67 @@ +diff -Naur /tmp/djbdns-1.05/Makefile djbdns-1.05/Makefile +--- a/djbdns-1.05/Makefile 2003-11-16 20:33:41.000000000 +0100 ++++ b/djbdns-1.05/Makefile 2003-11-16 20:35:15.000000000 +0100 +@@ -31,7 +31,7 @@ + + auto_home.c: \ + auto-str conf-home +- ./auto-str auto_home `head -1 conf-home` > auto_home.c ++ ./auto-str auto_home `head -n 1 conf-home` > auto_home.c + + auto_home.o: \ + compile auto_home.c +@@ -205,14 +205,14 @@ + choose: \ + warn-auto.sh choose.sh conf-home + cat warn-auto.sh choose.sh \ +- | sed s}HOME}"`head -1 conf-home`"}g \ ++ | sed s}HOME}"`head -n 1 conf-home`"}g \ + > choose + chmod 755 choose + + compile: \ + warn-auto.sh conf-cc + ( cat warn-auto.sh; \ +- echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \ ++ echo exec "`head -n 1 conf-cc`" '-c $${1+"$$@"}' \ + ) > compile + chmod 755 compile + +@@ -449,7 +449,7 @@ + dnstracesort: \ + warn-auto.sh dnstracesort.sh conf-home + cat warn-auto.sh dnstracesort.sh \ +- | sed s}HOME}"`head -1 conf-home`"}g \ ++ | sed s}HOME}"`head -n 1 conf-home`"}g \ + > dnstracesort + chmod 755 dnstracesort + +@@ -570,7 +570,7 @@ + warn-auto.sh conf-ld + ( cat warn-auto.sh; \ + echo 'main="$$1"; shift'; \ +- echo exec "`head -1 conf-ld`" \ ++ echo exec "`head -n 1 conf-ld`" \ + '-o "$$main" "$$main".o $${1+"$$@"}' \ + ) > load + chmod 755 load +@@ -758,7 +758,7 @@ + rts: \ + warn-auto.sh rts.sh conf-home + cat warn-auto.sh rts.sh \ +- | sed s}HOME}"`head -1 conf-home`"}g \ ++ | sed s}HOME}"`head -n 1 conf-home`"}g \ + > rts + chmod 755 rts + +@@ -901,8 +901,8 @@ + systype: \ + find-systype.sh conf-cc conf-ld trycpp.c x86cpuid.c + ( cat warn-auto.sh; \ +- echo CC=\'`head -1 conf-cc`\'; \ +- echo LD=\'`head -1 conf-ld`\'; \ ++ echo CC=\'`head -n 1 conf-cc`\'; \ ++ echo LD=\'`head -n 1 conf-ld`\'; \ + cat find-systype.sh; \ + ) | sh > systype + diff --git a/net-dns/djbdns/files/makefile-parallel-test25.patch b/net-dns/djbdns/files/makefile-parallel-test25.patch new file mode 100644 index 000000000000..2754729acb97 --- /dev/null +++ b/net-dns/djbdns/files/makefile-parallel-test25.patch @@ -0,0 +1,91 @@ +diff --git a/Makefile b/Makefile +index 9ebf4c8..fe5ed73 100644 +--- a/Makefile ++++ b/Makefile +@@ -212,7 +212,7 @@ warn-auto.sh choose.sh conf-home + chmod 755 choose + + clientloc.o: \ +-compile clientloc.c open.h byte.h cdb.h ip6.h ++compile clientloc.c open.h byte.h cdb.h uint32.h ip6.h + ./compile clientloc.c + + compile: \ +@@ -336,7 +336,7 @@ taia.h tai.h uint64.h taia.h + + dns_transmit.o: \ + compile dns_transmit.c socket.h uint16.h alloc.h error.h byte.h \ +-uint16.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \ ++uint32.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \ + taia.h + ./compile dns_transmit.c + +@@ -859,15 +859,15 @@ trylsock.c compile load + rm -f trylsock.o trylsock + + socket_accept.o: \ +-compile socket_accept.c byte.h socket.h uint16.h ++compile socket_accept.c byte.h socket.h uint16.h uint32.h + ./compile socket_accept.c + + socket_accept6.o: \ +-compile socket_accept6.c byte.h socket.h uint16.h ++compile socket_accept6.c byte.h socket.h uint16.h uint32.h + ./compile socket_accept6.c + + socket_bind.o: \ +-compile socket_bind.c byte.h socket.h uint16.h ++compile socket_bind.c byte.h socket.h uint16.h uint32.h + ./compile socket_bind.c + + socket_bind6.o: \ +@@ -875,7 +875,7 @@ compile socket_bind6.c sockaddr_in6.h haveip6.h byte.h socket.h uint16.h uint32. + ./compile socket_bind6.c + + socket_conn.o: \ +-compile socket_conn.c byte.h socket.h uint16.h ++compile socket_conn.c byte.h socket.h uint16.h uint32.h + ./compile socket_conn.c + + socket_connect6.o: \ +@@ -883,11 +883,11 @@ compile socket_connect6.c byte.h socket.h uint16.h uint32.h + ./compile socket_connect6.c + + socket_listen.o: \ +-compile socket_listen.c socket.h uint16.h ++compile socket_listen.c socket.h uint16.h uint32.h + ./compile socket_listen.c + + socket_recv.o: \ +-compile socket_recv.c byte.h socket.h uint16.h ++compile socket_recv.c byte.h socket.h uint16.h uint32.h + ./compile socket_recv.c + + socket_recv6.o: \ +@@ -895,7 +895,7 @@ compile socket_recv6.c sockaddr_in6.h haveip6.h byte.h socket.h uint16.h uint32. + ./compile socket_recv6.c + + socket_send.o: \ +-compile socket_send.c byte.h socket.h uint16.h ++compile socket_send.c byte.h socket.h uint16.h uint32.h + ./compile socket_send.c + + socket_send6.o: \ +@@ -903,7 +903,7 @@ compile socket_send6.c byte.h socket.h uint16.h uint32.h ip6.h haveip6.h error.h + ./compile socket_send6.c + + socket_tcp.o: \ +-compile socket_tcp.c ndelay.h socket.h uint16.h ++compile socket_tcp.c ndelay.h socket.h uint16.h uint32.h + ./compile socket_tcp.c + + socket_tcp6.o: \ +@@ -911,7 +911,7 @@ compile socket_tcp6.c ndelay.h socket.h uint16.h uint32.h haveip6.h + ./compile socket_tcp6.c + + socket_udp.o: \ +-compile socket_udp.c ndelay.h socket.h uint16.h ++compile socket_udp.c ndelay.h socket.h uint16.h uint32.h + ./compile socket_udp.c + + socket_udp6.o: \ diff --git a/net-dns/djbdns/files/srv_record_support.patch b/net-dns/djbdns/files/srv_record_support.patch new file mode 100644 index 000000000000..736884208363 --- /dev/null +++ b/net-dns/djbdns/files/srv_record_support.patch @@ -0,0 +1,180 @@ +From: Michael Handler <handler@sub-rosa.com> +To: dns@list.cr.yp.to +Subject: tinydns-data SRV & axfr-get SRV/PTR patches +Date: Thu, 14 Sep 2000 20:37:50 -0400 + +Here's a combined patch that: + +a) adds a native SRV type to tinydns-data + +Sfqdn:ip:x:port:weight:priority:ttl:timestamp + +Standard rules for ip, x, ttl, and timestamp apply. Port, weight, and +priority all range from 0-65535. Weight and priority are optional; they +default to zero if not provided. + +Sconsole.zoinks.example.com:1.2.3.4:rack102-con1:2001:69:7:300: + +b) makes axfr-get decompose SRV and PTR records and write them out in +native format, rather than opaque. Again, this is necessary because if the +DNAME fields in the records reference the same zone as fqdn, they can have +compression pointers that are bogus outside the context of that specific +packet, and which can't be correctly loaded into data.cdb by tinydns-data. + +--michael + +Laurent G. Bercot <ska-djbdns@skarnet.org> updated it for +djbdns-1.05. Documentation patch by Alex Efros. + +diff -rNU3 djbdns-1.05/axfr-get.c djbdns-1.05-srv/axfr-get.c +--- djbdns-1.05/axfr-get.c Sun Feb 11 22:11:45 2001 ++++ djbdns-1.05/axfr-get.c Thu Oct 18 14:46:56 2001 +@@ -209,6 +209,26 @@ + if (!stralloc_cats(&line,".:")) return 0; + if (!stralloc_catulong0(&line,dist,0)) return 0; + } ++ else if (byte_equal(data,2,DNS_T_SRV)) { ++ uint16 dist, weight, port; ++ if (!stralloc_copys(&line,"S")) return 0; ++ if (!dns_domain_todot_cat(&line,d1)) return 0; ++ if (!stralloc_cats(&line,"::")) return 0; ++ pos = x_copy(buf,len,pos,data,2); ++ uint16_unpack_big(data,&dist); ++ pos = x_copy(buf,len,pos,data,2); ++ uint16_unpack_big(data,&weight); ++ pos = x_copy(buf,len,pos,data,2); ++ uint16_unpack_big(data,&port); ++ x_getname(buf,len,pos,&d1); ++ if (!dns_domain_todot_cat(&line,d1)) return 0; ++ if (!stralloc_cats(&line,".:")) return 0; ++ if (!stralloc_catulong0(&line,dist,0)) return 0; ++ if (!stralloc_cats(&line,":")) return 0; ++ if (!stralloc_catulong0(&line,weight,0)) return 0; ++ if (!stralloc_cats(&line,":")) return 0; ++ if (!stralloc_catulong0(&line,port,0)) return 0; ++ } + else if (byte_equal(data,2,DNS_T_A) && (dlen == 4)) { + char ipstr[IP4_FMT]; + if (!stralloc_copys(&line,"+")) return 0; +@@ -216,6 +236,14 @@ + if (!stralloc_cats(&line,":")) return 0; + x_copy(buf,len,pos,data,4); + if (!stralloc_catb(&line,ipstr,ip4_fmt(ipstr,data))) return 0; ++ } ++ else if (byte_equal(data,2,DNS_T_PTR)) { ++ if (!stralloc_copys(&line,"^")) return 0; ++ if (!dns_domain_todot_cat(&line,d1)) return 0; ++ if (!stralloc_cats(&line,":")) return 0; ++ x_getname(buf,len,pos,&d1); ++ if (!dns_domain_todot_cat(&line,d1)) return 0; ++ if (!stralloc_cats(&line,".")) return 0; + } + else { + unsigned char ch; +diff -rNU3 djbdns-1.05/dns.h djbdns-1.05-srv/dns.h +--- djbdns-1.05/dns.h Sun Feb 11 22:11:45 2001 ++++ djbdns-1.05/dns.h Thu Oct 18 14:46:56 2001 +@@ -20,6 +20,7 @@ + #define DNS_T_SIG "\0\30" + #define DNS_T_KEY "\0\31" + #define DNS_T_AAAA "\0\34" ++#define DNS_T_SRV "\0\41" + #define DNS_T_AXFR "\0\374" + #define DNS_T_ANY "\0\377" + +diff -rNU3 djbdns-1.05/tinydns-data.c djbdns-1.05-srv/tinydns-data.c +--- djbdns-1.05/tinydns-data.c Sun Feb 11 22:11:45 2001 ++++ djbdns-1.05/tinydns-data.c Thu Oct 18 14:50:53 2001 +@@ -196,6 +196,7 @@ + char type[2]; + char soa[20]; + char buf[4]; ++ char srv[6]; + + umask(022); + +@@ -360,6 +361,43 @@ + rr_start(DNS_T_MX,ttl,ttd,loc); + uint16_pack_big(buf,u); + rr_add(buf,2); ++ rr_addname(d2); ++ rr_finish(d1); ++ ++ if (ip4_scan(f[1].s,ip)) { ++ rr_start(DNS_T_A,ttl,ttd,loc); ++ rr_add(ip,4); ++ rr_finish(d2); ++ } ++ break; ++ ++ case 'S': ++ if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem(); ++ if (!stralloc_0(&f[6])) nomem(); ++ if (!scan_ulong(f[6].s,&ttl)) ttl = TTL_POSITIVE; ++ ttdparse(&f[7],ttd); ++ locparse(&f[8],loc); ++ ++ if (!stralloc_0(&f[1])) nomem(); ++ ++ if (byte_chr(f[2].s,f[2].len,'.') >= f[2].len) { ++ if (!stralloc_cats(&f[2],".srv.")) nomem(); ++ if (!stralloc_catb(&f[2],f[0].s,f[0].len)) nomem(); ++ } ++ if (!dns_domain_fromdot(&d2,f[2].s,f[2].len)) nomem(); ++ ++ if (!stralloc_0(&f[4])) nomem(); ++ if (!scan_ulong(f[4].s,&u)) u = 0; ++ uint16_pack_big(srv,u); ++ if (!stralloc_0(&f[5])) nomem(); ++ if (!scan_ulong(f[5].s,&u)) u = 0; ++ uint16_pack_big(srv + 2,u); ++ if (!stralloc_0(&f[3])) nomem(); ++ if (!scan_ulong(f[3].s,&u)) nomem(); ++ uint16_pack_big(srv + 4,u); ++ ++ rr_start(DNS_T_SRV,ttl,ttd,loc); ++ rr_add(srv,6); + rr_addname(d2); + rr_finish(d1); + +--- djbdns-1.05/man/tinydns-data.8 2003-10-23 10:47:32.000000000 +0300 ++++ djbdns-1.05/man/tinydns-data.8 2014-09-26 02:51:59.861716505 +0300 +@@ -487,6 +487,38 @@ + .RI \ 072 + is a colon. + ++.RI S fqdn\fR:\fIip\fR:\fIx\fR:\fIport\fR:\fIweight\fR:\fIpriority\fR:\fIttl\fR:\fItimestamp\fR:\fIlo\fR ++ ++SRV record for ++.IR fqdn . ++ ++.B tinydns-data ++creates ++.IP ++an SRV record ++showing ++.IR x\fR.srv.\fIfqdn\fR:\fIport\fR ++as a service for ++.IR fqdn ++with given \fIweight\fR and \fIpriority\fR ++(\fIport\fR, \fIweight\fR and \fIpriority\fR must be in range 0-65535; ++\fIweight\fR and \fIpriority\fR are optional; ++they default to zero if not provided) ++and ++.P ++.IP ++an A record showing ++.I ip ++as the IP address ++of ++.IR x\fR.srv.\fIfqdn . ++.P ++ ++If ++.I x ++contains a dot ++then it is treated specially; see above. ++ + .RI ^ fqdn\fR:\fIp\fR:\fIttl\fR:\fItimestamp\fR:\fIlo\fR + + PTR record for diff --git a/net-dns/djbdns/files/string_length_255.patch b/net-dns/djbdns/files/string_length_255.patch new file mode 100644 index 000000000000..ad383b756bf9 --- /dev/null +++ b/net-dns/djbdns/files/string_length_255.patch @@ -0,0 +1,11 @@ +--- a/tinydns-data.c 2001-02-11 16:11:45.000000000 -0500 ++++ b/tinydns-data.c 2011-04-02 10:41:34.356302891 -0400 +@@ -399,7 +399,7 @@ + i = 0; + while (i < f[1].len) { + k = f[1].len - i; +- if (k > 127) k = 127; ++ if (k > 255) k = 255; + ch = k; + rr_add(&ch,1); + rr_add(f[1].s + i,k); diff --git a/net-dns/djbdns/metadata.xml b/net-dns/djbdns/metadata.xml new file mode 100644 index 000000000000..7e0a8fc27b5b --- /dev/null +++ b/net-dns/djbdns/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> +</maintainer> +</pkgmetadata> diff --git a/net-dns/dnrd/Manifest b/net-dns/dnrd/Manifest new file mode 100644 index 000000000000..3256f60c5c1c --- /dev/null +++ b/net-dns/dnrd/Manifest @@ -0,0 +1 @@ +DIST dnrd-2.20.3.tar.gz 161887 SHA256 aa46e7f8736b88c1d752cf606b3990041221ce91d014e955c6b02eb2167db015 diff --git a/net-dns/dnrd/dnrd-2.20.3-r1.ebuild b/net-dns/dnrd/dnrd-2.20.3-r1.ebuild new file mode 100644 index 000000000000..4e628b7f6350 --- /dev/null +++ b/net-dns/dnrd/dnrd-2.20.3-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit autotools eutils user + +DESCRIPTION="A caching DNS proxy server" +HOMEPAGE="http://dnrd.sourceforge.net/" +SRC_URI="mirror://sourceforge/dnrd/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug" +DEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-docdir.patch + eautoreconf +} + +src_compile() { + econf \ + $(use_enable debug) \ + --disable-dependency-tracking \ + --docdir=/usr/share/doc/${PF} \ + || die + + emake || die +} + +src_install() { + emake DESTDIR="${D}" install || die + + keepdir /etc/dnrd + doinitd ${FILESDIR}/dnrd + newconfd ${FILESDIR}/dnrd.conf dnrd +} + +pkg_postinst() { + enewgroup dnrd + enewuser dnrd -1 -1 /dev/null dnrd +} diff --git a/net-dns/dnrd/files/dnrd b/net-dns/dnrd/files/dnrd new file mode 100644 index 000000000000..403073586e32 --- /dev/null +++ b/net-dns/dnrd/files/dnrd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Id$ + +PIDFILE="/var/run/dnrd.pid" + +depend() { + provide dns + need net +} + +start() { + ebegin "Starting dnrd" + /usr/sbin/dnrd $DNRD_OPTS &> /dev/null & + eend $? +} + +stop() { + ebegin "Stopping dnrd" + /usr/sbin/dnrd -k + eend $? +} + diff --git a/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch b/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch new file mode 100644 index 000000000000..a3d1c8002d51 --- /dev/null +++ b/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch @@ -0,0 +1,21 @@ +Index: doc/Makefile.am +=================================================================== +--- doc/Makefile.am (revision 247) ++++ doc/Makefile.am (revision 248) +@@ -1,5 +1,4 @@ + PACKAGE = @PACKAGE_TARNAME@ +-docdir = $(datadir)/doc/$(PACKAGE) + doc_DATA = README-cache README-master README-cygwin master.sample + man_MANS = dnrd.8 + EXTRA_DIST = $(man_MANS) $(doc_DATA) +Index: Makefile.am +=================================================================== +--- Makefile.am (revision 247) ++++ Makefile.am (revision 248) +@@ -1,6 +1,5 @@ + PACKAGE = @PACKAGE_TARNAME@ + SUBDIRS = src doc +-docdir = $(datadir)/doc/$(PACKAGE) + doc_DATA = AUTHORS COPYING ChangeLog README NEWS + + EXTRA_DIST = README cygwin_post_install.sh diff --git a/net-dns/dnrd/files/dnrd.conf b/net-dns/dnrd/files/dnrd.conf new file mode 100644 index 000000000000..96eea43a87d4 --- /dev/null +++ b/net-dns/dnrd/files/dnrd.conf @@ -0,0 +1,11 @@ +# options to dnrd + +# example: 2 default dns servers and dns servers for mydomain.com. The +# latter are load balanced (-b) + +# DNRD_OPTS=" +# -s 213.142.64.170 +# -s 213.142.64.171 +# -b +# -s 192.168.65.250:mydomain.com +# -s 192.168.65.254:mydomain.com" diff --git a/net-dns/dnrd/metadata.xml b/net-dns/dnrd/metadata.xml new file mode 100644 index 000000000000..0e1cbf4d4486 --- /dev/null +++ b/net-dns/dnrd/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>natanael.copa@gmail.com</email> + <name>Natanael Copa</name> + </maintainer> + <maintainer> + <email>armin76@gentoo.org</email> + </maintainer> + <longdescription> +Domain Name Relay Daemon is a caching, forwarding DNS proxy server. Most useful on vpn or dialup firewalls but it is also a nice DNS cache for minor networks and workstations. +</longdescription> + <upstream> + <remote-id type="sourceforge">dnrd</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-dns/dnscap/Manifest b/net-dns/dnscap/Manifest new file mode 100644 index 000000000000..511920621071 --- /dev/null +++ b/net-dns/dnscap/Manifest @@ -0,0 +1 @@ +DIST dnscap-20130814.tar.gz 99615 SHA256 17c367e6697d6e93eb4ebf0ac038e10eb6950c75a9890c914ba0f7a0f9c2500e SHA512 1969d8cc47c6206369a02b29064dbb7f663a2187203ab1f49d862082bfb6e44c9fccf90fb63d65a523c7a5cf4d24815a74b9dd18d81267b4447252d7a04f33dd WHIRLPOOL 888d7544525901974b5b501cf4feb842363da95b50ed48dda0276dc5c733de8510c65f9942b72ffb4d9c43ac8f0ca2cf12154525c2fd40561a4fec81a7aee598 diff --git a/net-dns/dnscap/dnscap-20130814.ebuild b/net-dns/dnscap/dnscap-20130814.ebuild new file mode 100644 index 000000000000..b1a1dd7a4769 --- /dev/null +++ b/net-dns/dnscap/dnscap-20130814.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="dnscap is a network capture utility designed specifically for DNS traffic" +HOMEPAGE="http://dnscap.dns-oarc.net/" + +## github commit tarball +MY_GIT_COMMIT="727ed7d5e46625abc2c8d988689a300589e948b6" +MY_P="verisign-${PN}-${MY_GIT_COMMIT:0:7}" +SRC_URI="https://github.com/verisign/${PN}/tarball/${MY_GIT_COMMIT} -> ${PF}.tar.gz" + +S="${WORKDIR}/${MY_P}" + +KEYWORDS="~amd64 ~x86" +SLOT="0" +LICENSE="ISC" +IUSE="" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND}" + +src_prepare() { + ## adds DESTDIR to install target + epatch "${FILESDIR}/${P}.install.patch" +} diff --git a/net-dns/dnscap/files/dnscap-20130814.install.patch b/net-dns/dnscap/files/dnscap-20130814.install.patch new file mode 100644 index 000000000000..b09c7cfdbfcf --- /dev/null +++ b/net-dns/dnscap/files/dnscap-20130814.install.patch @@ -0,0 +1,22 @@ +diff -urN verisign-dnscap-727ed7d.orig/Makefile.in verisign-dnscap-727ed7d/Makefile.in +--- verisign-dnscap-727ed7d.orig/Makefile.in 2013-08-14 01:31:33.000000000 +0200 ++++ verisign-dnscap-727ed7d/Makefile.in 2014-04-26 22:04:35.438580361 +0200 +@@ -45,13 +45,11 @@ + all: ${prog} ${prog}.cat1 + + install: all +- install -d -m 755 ${bindir} +- if [ -f ${bindir}/${prog} ]; then \ +- mv -f ${bindir}/${prog} ${bindir}/${prog}.old; fi +- install -m 755 ${prog} ${bindir}/ +- install -d -m 755 ${mandir} +- install -d -m 755 ${mandir}/cat1 +- install -m 644 ${prog}.cat1 ${mandir}/cat1/${prog}.1 ++ install -d -m 755 $(DESTDIR)${bindir} ++ install -m 755 ${prog} $(DESTDIR)${bindir}/ ++ install -d -m 755 $(DESTDIR)${mandir} ++ install -d -m 755 $(DESTDIR)${mandir}/cat1 ++ install -m 644 ${prog}.cat1 $(DESTDIR)${mandir}/cat1/${prog}.1 + + .c.o: + ${CC} ${CFLAGS} -c $< diff --git a/net-dns/dnscap/metadata.xml b/net-dns/dnscap/metadata.xml new file mode 100644 index 000000000000..68838f5ff96d --- /dev/null +++ b/net-dns/dnscap/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>wschlich@gentoo.org</email> + <name>Wolfram Schlich</name> + <description>Primary maintainer</description> + </maintainer> + <upstream> + <remote-id type="github">verisign/dnscap</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-dns/dnscrypt-proxy/Manifest b/net-dns/dnscrypt-proxy/Manifest new file mode 100644 index 000000000000..09b1a797ea64 --- /dev/null +++ b/net-dns/dnscrypt-proxy/Manifest @@ -0,0 +1,2 @@ +DIST dnscrypt-proxy-1.4.2.tar.gz 1592962 SHA256 1d519068c30868bb60a151908f0e300a1754b234f7bc2ad1d749ad9d0d977076 SHA512 ecb81b5d20cf88a610421bb1266861a2f5dd34d0ce916c54507507ca5dbe5d9e49e95916f76fa7997b112860f2bc37793f075ed812c75b2904adf6cdf32cac17 WHIRLPOOL ddfa3da3de933f6cbb8721ccd6435e97b9e893d32311e1c3badbc23b6a0547b6cb0f8d6037baaf0027ca1eb972c4be167dc9ce56194f7f6fa54fac974ca0bd24 +DIST dnscrypt-proxy-1.4.3.tar.gz 1560345 SHA256 f10f10c18e25ced3c5ec5d0c4145d33270f9cfa991fd1b18d5d9af00e4d9b68e SHA512 3aae9f20bc06087b0860a24488bcda117010a34218d7aef3c68a0f155f8164ce06a88865a9caf1ce5c5eaa8588518ccc2c8a61a97cc39f527f7b2b14cdf8c118 WHIRLPOOL 49915b0f95d340828c79febc9b7d94c4f0c444e016b9f78d134e05f43945b446ab71bbc6a230d6e15d5f1f4c0b97d9f671b6001314cc157cdcd419b01bf23550 diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.2.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.2.ebuild new file mode 100644 index 000000000000..55528cae9c7c --- /dev/null +++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.2.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils systemd user + +DESCRIPTION="A tool for securing communications between a client and a DNS resolver" +HOMEPAGE="http://dnscrypt.org/" +SRC_URI="http://download.dnscrypt.org/${PN}/${P}.tar.gz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+plugins ldns systemd" + +DEPEND="dev-libs/libsodium + ldns? ( net-libs/ldns )" +RDEPEND="${DEPEND} + systemd? ( sys-apps/systemd )" + +DOCS=( AUTHORS ChangeLog COPYING NEWS README.markdown README-PLUGINS.markdown + TECHNOTES THANKS ) + +pkg_setup() { + enewgroup dnscrypt + enewuser dnscrypt -1 -1 /var/empty dnscrypt +} + +src_configure() { + econf \ + $(use_enable plugins) \ + $(use_with systemd ) +} + +src_install() { + default + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service +} diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.3.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.3.ebuild new file mode 100644 index 000000000000..1d7c5798b117 --- /dev/null +++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.3.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils systemd user + +DESCRIPTION="A tool for securing communications between a client and a DNS resolver" +HOMEPAGE="http://dnscrypt.org/" +SRC_URI="http://download.dnscrypt.org/${PN}/${P}.tar.gz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+plugins ldns systemd" + +DEPEND="dev-libs/libsodium + ldns? ( net-libs/ldns )" +RDEPEND="${DEPEND} + systemd? ( sys-apps/systemd )" + +DOCS=( AUTHORS ChangeLog COPYING NEWS README.markdown README-PLUGINS.markdown + TECHNOTES THANKS ) + +pkg_setup() { + enewgroup dnscrypt + enewuser dnscrypt -1 -1 /var/empty dnscrypt +} + +src_configure() { + econf \ + $(use_enable plugins) \ + $(use_with systemd ) +} + +src_install() { + default + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service +} diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd new file mode 100644 index 000000000000..ceedd454b5fb --- /dev/null +++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd @@ -0,0 +1,7 @@ +DNSCRYPT_LOCALIP=127.0.0.1 +DNSCRYPT_LOCALPORT=53 +DNSCRYPT_USER=dnscrypt +DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.opendns.com +DNSCRYPT_PROVIDER_KEY=B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79 +DNSCRYPT_RESOLVERIP=208.67.220.220 +DNSCRYPT_RESOLVERPORT=443 diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd new file mode 100644 index 000000000000..3ef60f9ab8cd --- /dev/null +++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DNSCRYPT_LOGFILE=${DNSCRYPT_LOGFILE:-/var/log/dnscrypt-proxy.log} + +rundir=${rundir:-/var/run/dnscrypt-proxy} +pidfile=${pidfile:-${rundir}/dnscrypt-proxy.pid} +rundir=${rundir:-/var/run/dnscrypt-proxy} +runas_user=${runas_user:-dnscrypt} +runas_group=${runas_user:-dnscrypt} + +depend() { + use net + before dns + after logger +} + +start() { + if [ ! -d "${rundir}" ]; then + mkdir "${rundir}" + if [ -n "${runas_user}" ]; then + touch ${DNSCRYPT_LOGFILE} + chown ${runas_user}:${runas_group} ${DNSCRYPT_LOGFILE} + chown -R ${runas_user}:${runas_group} "${rundir}" + fi + fi + + ebegin "Starting dnscrypt-proxy" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/dnscrypt-proxy \ + -- \ + --pidfile=${pidfile} \ + --logfile=${DNSCRYPT_LOGFILE} \ + --daemonize --user=${runas_user} \ + --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \ + --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \ + --provider-name=${DNSCRYPT_PROVIDER_NAME} \ + --provider-key=${DNSCRYPT_PROVIDER_KEY} + eend $? +} + +stop() { + ebegin "Stopping dnscrypt-proxy" + start-stop-daemon --stop --quiet --exec /usr/sbin/dnscrypt-proxy + eend $? +} diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service new file mode 100644 index 000000000000..414c0b498c5e --- /dev/null +++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service @@ -0,0 +1,20 @@ +[Unit] +Description=A tool for securing communications between a client and a DNS resolver + +[Service] +Type=forking +PIDFile=/var/run/dnscrypt-proxy.pid +EnvironmentFile=/etc/conf.d/dnscrypt-proxy +ExecStartPre=/bin/rm -f /var/run/dnscrypt-proxy.pid +ExecStart=/usr/sbin/dnscrypt-proxy --daemonize \ + --pidfile=/var/run/dnscrypt-proxy.pid \ + --logfile=/var/log/dnscrypt-proxy.log \ + --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \ + --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \ + --provider-name=${DNSCRYPT_PROVIDER_NAME} \ + --provider-key=${DNSCRYPT_PROVIDER_KEY} \ + --user=${DNSCRYPT_USER} +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/dnscrypt-proxy/metadata.xml b/net-dns/dnscrypt-proxy/metadata.xml new file mode 100644 index 000000000000..03ba21e513a4 --- /dev/null +++ b/net-dns/dnscrypt-proxy/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>proxy-maintainers</herd> +<maintainer> + <email>amesists@gmail.com</email> + <name>Jiajun Wang</name> + <description>Primary Maintainer, Assign bugs</description> +</maintainer> +<longdescription lang="en"> +dnscrypt-proxy provides local service which can be used directly as your local resolver +or as a DNS forwarder, encrypting and authenticating requests using the DNSCrypt protocol +and passing them to an upstream server. +</longdescription> +<use> + <flag name="ldns">Use <pkg>net-libs/ldns</pkg> for DNSSEC/SSHFP validation</flag> + <flag name="plugins">Enable plugin support to inspect and modify queries and responses</flag> + <flag name="systemd">Use systemd's socket activation instead of creating the sockets itself</flag> +</use> +</pkgmetadata> diff --git a/net-dns/dnshijacker/Manifest b/net-dns/dnshijacker/Manifest new file mode 100644 index 000000000000..5016373a3ac5 --- /dev/null +++ b/net-dns/dnshijacker/Manifest @@ -0,0 +1 @@ +DIST dnshijacker-1.3.tar.gz 23569 SHA256 4040cb211860bec4dd43af09e157da25ebd20189d35884c11639d281ef7cd16a SHA512 628d545f1b6345e641254519cbb696ae2a38e218a5129558dae404d0ef374afdabf06c63775d5bc5d2d020de3bf339342c7e1a1b10beed4beadb703ff63c693d WHIRLPOOL 94bfcaa8ecca3d60dc472d1615e49208127d4c9407d1c19bf1d20a31b7c2f2a80114906d06927bfbe775ccd3ee45c4d348bcf9009f0ab26d878a0f1c78102fb3 diff --git a/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild b/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild new file mode 100644 index 000000000000..7a73ed633213 --- /dev/null +++ b/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="a libnet/libpcap based packet sniffer and spoofer" +HOMEPAGE="http://pedram.redhive.com/projects.php" +SRC_URI="http://pedram.redhive.com/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 x86" +IUSE="" + +DEPEND="net-libs/libpcap + >=net-libs/libnet-1.0.2a-r3:1.0" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch +} + +src_compile() { + emake CC=$(tc-getCC) +} + +src_install() { + dosbin dnshijacker ask_dns answer_dns + + insinto /etc/dnshijacker + doins ftable + + dodoc README +} diff --git a/net-dns/dnshijacker/files/1.3-libnet-1.0.patch b/net-dns/dnshijacker/files/1.3-libnet-1.0.patch new file mode 100644 index 000000000000..08337d5c8282 --- /dev/null +++ b/net-dns/dnshijacker/files/1.3-libnet-1.0.patch @@ -0,0 +1,39 @@ +diff -U 0 -r dnshijacker-1.3.orig/Makefile dnshijacker-1.3/Makefile +--- dnshijacker-1.3.orig/Makefile 2003-08-19 15:39:54.068117160 -0400 ++++ dnshijacker-1.3/Makefile 2003-08-19 15:40:26.836135664 -0400 +@@ -4 +4 @@ +- gcc ask_dns.c -lnet `libnet-config --defines` -o ask_dns ++ gcc ask_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o ask_dns +@@ -7 +7 @@ +- gcc answer_dns.c -lnet `libnet-config --defines` -o answer_dns ++ gcc answer_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o answer_dns +@@ -10 +10 @@ +- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker ++ gcc dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker +@@ -13 +13 @@ +- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker -DDEBUG -ggdb ++ gcc dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker -DDEBUG -ggdb +diff -U 0 -r dnshijacker-1.3.orig/README dnshijacker-1.3/README +--- dnshijacker-1.3.orig/README 2003-08-19 15:39:54.068117160 -0400 ++++ dnshijacker-1.3/README 2003-08-19 15:40:26.840135056 -0400 +@@ -61 +61 @@ +- gcc dnshijacker.c -lpcap -lnet `libnet-config --defines` -o dnshijacker ++ gcc dnshijacker.c -lpcap -lnet-1.0 `libnet-1.0-config --defines` -o dnshijacker +diff -U 0 -r dnshijacker-1.3.orig/answer_dns.c dnshijacker-1.3/answer_dns.c +--- dnshijacker-1.3.orig/answer_dns.c 2003-08-19 15:39:54.069117008 -0400 ++++ dnshijacker-1.3/answer_dns.c 2003-08-19 15:40:48.815794248 -0400 +@@ -5 +5 @@ +-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -U 0 -r dnshijacker-1.3.orig/ask_dns.c dnshijacker-1.3/ask_dns.c +--- dnshijacker-1.3.orig/ask_dns.c 2003-08-19 15:39:54.068117160 -0400 ++++ dnshijacker-1.3/ask_dns.c 2003-08-19 15:40:48.816794096 -0400 +@@ -5 +5 @@ +-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -U 0 -r dnshijacker-1.3.orig/dnshijacker.h dnshijacker-1.3/dnshijacker.h +--- dnshijacker-1.3.orig/dnshijacker.h 2003-08-19 15:39:54.068117160 -0400 ++++ dnshijacker-1.3/dnshijacker.h 2003-08-19 15:40:48.818793792 -0400 +@@ -10 +10 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> diff --git a/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch b/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch new file mode 100644 index 000000000000..9af952067618 --- /dev/null +++ b/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch @@ -0,0 +1,37 @@ +--- a/answer_dns.c 2002-10-28 02:58:37.000000000 +0100 ++++ b/answer_dns.c 2010-09-19 01:16:28.000000000 +0200 +@@ -5 +5 @@ +-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/ask_dns.c 2002-10-28 02:58:34.000000000 +0100 ++++ b/ask_dns.c 2010-09-19 01:16:28.000000000 +0200 +@@ -5 +5 @@ +-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/dnshijacker.h 2002-11-18 05:21:48.000000000 +0100 ++++ b/dnshijacker.h 2010-09-19 01:16:28.000000000 +0200 +@@ -10 +10 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +@@ -12 +12 @@ +- ++#include <resolv.h> +--- a/Makefile 2002-12-02 01:51:09.000000000 +0100 ++++ b/Makefile 2010-09-19 01:16:28.000000000 +0200 +@@ -4 +4 @@ +- gcc ask_dns.c -lnet `libnet-config --defines` -o ask_dns ++ $(CC) $(CFLAGS) $(LDFLAGS) ask_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o ask_dns +@@ -7 +7 @@ +- gcc answer_dns.c -lnet `libnet-config --defines` -o answer_dns ++ $(CC) $(CFLAGS) $(LDFLAGS) answer_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o answer_dns +@@ -10 +10 @@ +- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker ++ $(CC) $(CFLAGS) $(LDFLAGS) dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker +@@ -13 +13 @@ +- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker -DDEBUG -ggdb ++ $(CC) $(CFLAGS) $(LDFLAGS) dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker -DDEBUG -ggdb +--- a/README 2002-10-30 06:12:09.000000000 +0100 ++++ b/README 2010-09-19 01:16:28.000000000 +0200 +@@ -61 +61 @@ +- gcc dnshijacker.c -lpcap -lnet `libnet-config --defines` -o dnshijacker ++ gcc dnshijacker.c -lpcap -lnet-1.0 `libnet-1.0-config --defines` -o dnshijacker diff --git a/net-dns/dnshijacker/metadata.xml b/net-dns/dnshijacker/metadata.xml new file mode 100644 index 000000000000..f9d50da18d39 --- /dev/null +++ b/net-dns/dnshijacker/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + <description>This package lacks a primary herd or maintainer.</description> + </maintainer> +</pkgmetadata> diff --git a/net-dns/dnsimple-dyndns/Manifest b/net-dns/dnsimple-dyndns/Manifest new file mode 100644 index 000000000000..5f02511ec949 --- /dev/null +++ b/net-dns/dnsimple-dyndns/Manifest @@ -0,0 +1 @@ +DIST dnsimple-dyndns-0.1.tar.gz 4453 SHA256 5290db4354f3f015e78d7d689f5c7fe876bb9f073f9a765ed3adc67aae8243d9 SHA512 1dc7cdb968cd9303b922f0537fb5e63e5f16ed86d53506b47311d11f554f8e8332b989206c4947be75a07d576c98f4766dc9350ffbb30a31fa3581ded8a2b64e WHIRLPOOL 5b82ec54123d78c133aa32e31b7017fd6c1dd11985a3d85c38b83bdbbbb5a6ef4e678a20047f24858086b19312336640309ed580faff6dfe87077f4ffc18453c diff --git a/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild b/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild new file mode 100644 index 000000000000..db7b7cff5b06 --- /dev/null +++ b/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +GIT_ECLASS= +if [[ ${PV} = *9999* ]]; then + GIT_ECLASS="git-r3" + EGIT_REPO_URI="git://github.com/rafaelmartins/dnsimple-dyndns.git + https://github.com/rafaelmartins/dnsimple-dyndns.git" +fi + +inherit distutils-r1 ${GIT_ECLASS} + +DESCRIPTION="Dynamic DNS implementation, that relies on DNSimple.com" +HOMEPAGE="https://pypi.python.org/pypi/dnsimple-dyndns + https://github.com/rafaelmartins/dnsimple-dyndns" + +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +KEYWORDS="~amd64 ~x86" +if [[ ${PV} = *9999* ]]; then + SRC_URI="" + KEYWORDS="" +fi + +LICENSE="BSD" +SLOT="0" +IUSE="" + +DEPEND=">=dev-python/requests-2.0.0" +RDEPEND="${DEPEND}" diff --git a/net-dns/dnsimple-dyndns/metadata.xml b/net-dns/dnsimple-dyndns/metadata.xml new file mode 100644 index 000000000000..9991a3e7dbc2 --- /dev/null +++ b/net-dns/dnsimple-dyndns/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>rafaelmartins@gentoo.org</email> + <name>Rafael G. Martins</name> + </maintainer> + <longdescription lang="en"> + Dynamic DNS implementation, that relies on DNSimple.com. + </longdescription> + <upstream> + <maintainer status="active"> + <email>rafaelmartins@gentoo.org</email> + <name>Rafael G. Martins</name> + </maintainer> + <remote-id type="pypi">dnsimple-dyndns</remote-id> + <remote-id type="github">rafaelmartins/dnsimple-dyndns</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest new file mode 100644 index 000000000000..c917141c3a85 --- /dev/null +++ b/net-dns/dnsmasq/Manifest @@ -0,0 +1,3 @@ +DIST dnsmasq-2.66.tar.xz 401056 SHA256 5e143947527bcdc46a30f4b1bbdfbfa96333dd98bcecdac3b5b1d6cacfe06c75 SHA512 f0bde09f178ca15f4c28efb06901213af9a009b4476daa8a08bafc7682b9ffed13ac65c5c232acdf828382f321137de08b4a33108d22613b198fe30695b3362c WHIRLPOOL e749d24017c35fdbaaaf417decdf9316e235cf7f96f031caceee14d06b982c285b0e561f50597cd12b6a31ef554f7f2e22ca6234f44a6d8bb066dede99461166 +DIST dnsmasq-2.72.tar.xz 454048 SHA256 7d0bd23f5d74b3a6b26a75d5ffcf9db81d461b47cbe578cb65a83a98008600b1 SHA512 d84b89c987966a5f5880aa329833626b0a017628dd6aa667bdad880d1c5f101a386dddb439eb6983d58952a36f25670bf58df94281b89320f02895a3e6af4cec WHIRLPOOL 491eadb0060f372a0b7f5855fb57040c4baf37352732a2943fb4173aa28e875b91537f87085201f13e76ec5680e4ad681992829a5cef800833be0911298a793c +DIST dnsmasq-2.75.tar.xz 472484 SHA256 640c4e1d4c298e42458419cd78cfc26acc549401b1a34d271cd3e0e4226941f1 SHA512 dc6f64e8f04179bba4ceea5acbda4da27398e3e7a87f07ed645c383b0cccef416c438a859decff7be25849e28db9e53912693cdbf7f01ddd9bbf1d5e6ae2a8ec WHIRLPOOL ff2d0c2cb51cae6f2db09321c116003cdc512940001a839424a6ba1ba47deadfe412d01a0e68285250f7dbd9bef454c99e302805defc91783f703863c344b182 diff --git a/net-dns/dnsmasq/dnsmasq-2.66.ebuild b/net-dns/dnsmasq/dnsmasq-2.66.ebuild new file mode 100644 index 000000000000..74eef761c495 --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.66.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs flag-o-matic user systemd + +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="auth-dns conntrack dbus +dhcp dhcp-tools idn ipv6 lua nls script selinux tftp" +DM_LINGUAS="de es fi fr id it no pl pt_BR ro" +for dm_lingua in ${DM_LINGUAS}; do + IUSE+=" linguas_${dm_lingua}" +done + +CDEPEND="dbus? ( sys-apps/dbus ) + idn? ( net-dns/libidn ) + lua? ( dev-lang/lua ) + conntrack? ( !s390? ( net-libs/libnetfilter_conntrack ) ) + nls? ( + sys-devel/gettext + net-dns/libidn + )" + +DEPEND="${CDEPEND} + virtual/pkgconfig + app-arch/xz-utils" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-dnsmasq )" + +REQUIRED_USE="dhcp-tools? ( dhcp ) + lua? ( script ) + s390? ( !conntrack )" + +use_have() { + local NO_ONLY="" + if [ $1 == '-n' ]; then + NO_ONLY=1 + shift + fi + + local UWORD=${2:-$1} + UWORD=${UWORD^^*} + + if ! use ${1}; then + echo " -DNO_${UWORD}" + elif [ -z "${NO_ONLY}" ]; then + echo " -DHAVE_${UWORD}" + fi +} + +pkg_setup() { + enewgroup dnsmasq + enewuser dnsmasq -1 -1 /dev/null dnsmasq +} + +src_prepare() { + # dnsmasq on FreeBSD wants the config file in a silly location, this fixes + epatch "${FILESDIR}/${P}-dhcp-option-zero.patch" + sed -i -r 's:lua5.[0-9]+:lua:' Makefile +} + +src_configure() { + COPTS="$(use_have -n auth-dns auth)" + COPTS+="$(use_have conntrack)" + COPTS+="$(use_have dbus)" + COPTS+="$(use_have -n dhcp)" + COPTS+="$(use_have idn)" + COPTS+="$(use_have -n ipv6)" + COPTS+="$(use_have lua luascript)" + COPTS+="$(use_have -n script)" + COPTS+="$(use_have -n tftp)" + COPTS+="$(use ipv6 && use dhcp || echo " -DNO_DHCP6")" +} + +src_compile() { + emake \ + PREFIX=/usr \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/wrt \ + PREFIX=/usr \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + all +} + +src_install() { + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") + + local lingua + for lingua in ${DM_LINGUAS}; do + use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua} + done + rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/ + + dodoc CHANGELOG CHANGELOG.archive FAQ + dodoc -r logo + + dodoc CHANGELOG FAQ + dohtml *.html + + newinitd "${FILESDIR}"/dnsmasq-init-r2 dnsmasq + newconfd "${FILESDIR}"/dnsmasq.confd-r1 dnsmasq + + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + if use dbus; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi + + if use dhcp-tools; then + dosbin contrib/wrt/{dhcp_release,dhcp_lease_time} + doman contrib/wrt/{dhcp_release,dhcp_lease_time}.1 + fi + + systemd_dounit "${FILESDIR}"/dnsmasq.service +} diff --git a/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild b/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild new file mode 100644 index 000000000000..2f14c001a891 --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs flag-o-matic user systemd + +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn ipv6 lua nls script selinux static tftp" +DM_LINGUAS="de es fi fr id it no pl pt_BR ro" +for dm_lingua in ${DM_LINGUAS}; do + IUSE+=" linguas_${dm_lingua}" +done + +CDEPEND="dbus? ( sys-apps/dbus ) + idn? ( net-dns/libidn ) + lua? ( + || ( + dev-lang/lua:0 + dev-lang/lua:5.1 + ) + ) + conntrack? ( net-libs/libnetfilter_conntrack ) + nls? ( + sys-devel/gettext + net-dns/libidn + ) +" + +DEPEND="${CDEPEND} + app-arch/xz-utils + dnssec? ( + dev-libs/nettle[gmp] + static? ( + dev-libs/nettle[static-libs(+)] + ) + ) + virtual/pkgconfig" + +RDEPEND="${CDEPEND} + dnssec? ( + !static? ( + dev-libs/nettle[gmp] + ) + ) + selinux? ( sec-policy/selinux-dnsmasq ) +" + +REQUIRED_USE="dhcp-tools? ( dhcp ) + lua? ( script )" + +use_have() { + local useflag no_only uword + if [[ $1 == '-n' ]]; then + no_only=1 + shift + fi + useflag="${1}" + shift + + uword="${1:-${useflag}}" + shift + + while [[ ${uword} ]]; do + uword=${uword^^*} + + if ! use "${useflag}"; then + echo -n " -DNO_${uword}" + elif [[ -z "${no_only}" ]]; then + echo -n " -DHAVE_${uword}" + fi + uword="${1}" + shift + done +} + +pkg_pretend() { + if use static; then + einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." + use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored." + fi +} + +pkg_setup() { + enewgroup dnsmasq + enewuser dnsmasq -1 -1 /dev/null dnsmasq +} + +src_prepare() { + sed -i -r 's:lua5.[0-9]+:lua:' Makefile + sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example + + epatch "${FILESDIR}"/${P}-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch + epatch "${FILESDIR}"/${P}-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch +} + +src_configure() { + COPTS="$(use_have -n auth-dns auth)" + COPTS+="$(use_have conntrack)" + COPTS+="$(use_have dbus)" + COPTS+="$(use_have idn)" + COPTS+="$(use_have -n dhcp dhcp dhcp6)" + COPTS+="$(use_have -n ipv6 ipv6 dhcp6)" + COPTS+="$(use_have lua luascript)" + COPTS+="$(use_have -n script)" + COPTS+="$(use_have -n tftp)" + COPTS+="$(use_have dnssec)" + COPTS+="$(use_have static dnssec_static)" +} + +src_compile() { + emake \ + PREFIX=/usr \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/wrt \ + PREFIX=/usr \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + all +} + +src_install() { + local lingua puid + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") + + for lingua in ${DM_LINGUAS}; do + use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua} + done + [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/ + + dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example + dodoc -r logo + + dodoc CHANGELOG FAQ + dohtml *.html + + newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN} + newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} + + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + insinto /usr/share/dnsmasq + doins trust-anchors.conf + + if use dhcp; then + dodir /var/lib/misc + newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN} + fi + if use dbus; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi + + if use dhcp-tools; then + dosbin contrib/wrt/{dhcp_release,dhcp_lease_time} + doman contrib/wrt/{dhcp_release,dhcp_lease_time}.1 + fi + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service + +} + +pkg_preinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}" +} + +pkg_postinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases +} diff --git a/net-dns/dnsmasq/dnsmasq-2.75.ebuild b/net-dns/dnsmasq/dnsmasq-2.75.ebuild new file mode 100644 index 000000000000..05bc1cd73145 --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.75.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs flag-o-matic user systemd + +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn +inotify ipv6 lua nls script selinux static tftp" +DM_LINGUAS="de es fi fr id it no pl pt_BR ro" +for dm_lingua in ${DM_LINGUAS}; do + IUSE+=" linguas_${dm_lingua}" +done + +CDEPEND="dbus? ( sys-apps/dbus ) + idn? ( net-dns/libidn ) + lua? ( dev-lang/lua:* ) + conntrack? ( net-libs/libnetfilter_conntrack ) + nls? ( + sys-devel/gettext + net-dns/libidn + ) +" + +DEPEND="${CDEPEND} + app-arch/xz-utils + dnssec? ( + dev-libs/nettle[gmp] + static? ( + dev-libs/nettle[static-libs(+)] + ) + ) + virtual/pkgconfig" + +RDEPEND="${CDEPEND} + dnssec? ( + !static? ( + dev-libs/nettle[gmp] + ) + ) + selinux? ( sec-policy/selinux-dnsmasq ) +" + +REQUIRED_USE="dhcp-tools? ( dhcp ) + lua? ( script )" + +use_have() { + local useflag no_only uword + if [[ $1 == '-n' ]]; then + no_only=1 + shift + fi + useflag="${1}" + shift + + uword="${1:-${useflag}}" + shift + + while [[ ${uword} ]]; do + uword=${uword^^*} + + if ! use "${useflag}"; then + echo -n " -DNO_${uword}" + elif [[ -z "${no_only}" ]]; then + echo -n " -DHAVE_${uword}" + fi + uword="${1}" + shift + done +} + +pkg_pretend() { + if use static; then + einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." + use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored." + fi +} + +pkg_setup() { + enewgroup dnsmasq + enewuser dnsmasq -1 -1 /dev/null dnsmasq +} + +src_prepare() { + sed -i -r 's:lua5.[0-9]+:lua:' Makefile + sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example +} + +src_configure() { + COPTS="$(use_have -n auth-dns auth)" + COPTS+="$(use_have conntrack)" + COPTS+="$(use_have dbus)" + COPTS+="$(use_have idn)" + COPTS+="$(use_have -n inotify)" + COPTS+="$(use_have -n dhcp dhcp dhcp6)" + COPTS+="$(use_have -n ipv6 ipv6 dhcp6)" + COPTS+="$(use_have lua luascript)" + COPTS+="$(use_have -n script)" + COPTS+="$(use_have -n tftp)" + COPTS+="$(use_have dnssec)" + COPTS+="$(use_have static dnssec_static)" +} + +src_compile() { + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/wrt \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + all +} + +src_install() { + local lingua puid + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + COPTS="${COPTS}" \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") + + for lingua in ${DM_LINGUAS}; do + use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua} + done + [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/ + + dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example + dodoc -r logo + + dodoc CHANGELOG FAQ + dohtml *.html + + newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN} + newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} + + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + insinto /usr/share/dnsmasq + doins trust-anchors.conf + + if use dhcp; then + dodir /var/lib/misc + newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN} + fi + if use dbus; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi + + if use dhcp-tools; then + dosbin contrib/wrt/{dhcp_release,dhcp_lease_time} + doman contrib/wrt/{dhcp_release,dhcp_lease_time}.1 + fi + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service + +} + +pkg_preinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}" +} + +pkg_postinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases +} diff --git a/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch b/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch new file mode 100644 index 000000000000..38a3679bd240 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch @@ -0,0 +1,16 @@ +diff -ur dnsmasq-2.47.orig/src/config.h dnsmasq-2.47/src/config.h +--- dnsmasq-2.47.orig/src/config.h 2009-02-05 07:14:24.000000000 -0500 ++++ dnsmasq-2.47/src/config.h 2009-03-30 00:04:52.000000000 -0400 +@@ -50,11 +50,7 @@ + #endif + + #ifndef CONFFILE +-# if defined(__FreeBSD__) +-# define CONFFILE "/usr/local/etc/dnsmasq.conf" +-# else +-# define CONFFILE "/etc/dnsmasq.conf" +-# endif ++# define CONFFILE "/etc/dnsmasq.conf" + #endif + + #define DEFLEASE 3600 /* default lease time, 1 hour */ diff --git a/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch b/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch new file mode 100644 index 000000000000..6c52a533f1a1 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch @@ -0,0 +1,134 @@ +commit bd08ae67f9a0cae2ce15be885254cad9449d4551 +Author: Simon Kelley <simon@thekelleys.org.uk> +Date: Fri Apr 19 10:22:06 2013 +0100 + + Allow option number zero in encapsulated DHCP options. + +diff --git a/src/dhcp-common.c b/src/dhcp-common.c +index f4fd088..8de4268 100644 +--- a/src/dhcp-common.c ++++ b/src/dhcp-common.c +@@ -512,7 +512,7 @@ void display_opts6(void) + } + #endif + +-u16 lookup_dhcp_opt(int prot, char *name) ++int lookup_dhcp_opt(int prot, char *name) + { + const struct opttab_t *t; + int i; +@@ -528,10 +528,10 @@ u16 lookup_dhcp_opt(int prot, char *name) + if (strcasecmp(t[i].name, name) == 0) + return t[i].val; + +- return 0; ++ return -1; + } + +-u16 lookup_dhcp_len(int prot, u16 val) ++int lookup_dhcp_len(int prot, int val) + { + const struct opttab_t *t; + int i; +diff --git a/src/dnsmasq.h b/src/dnsmasq.h +index 69ae7a7..41e2798 100644 +--- a/src/dnsmasq.h ++++ b/src/dnsmasq.h +@@ -1216,8 +1216,8 @@ void log_tags(struct dhcp_netid *netid, u32 xid); + int match_bytes(struct dhcp_opt *o, unsigned char *p, int len); + void dhcp_update_configs(struct dhcp_config *configs); + void display_opts(void); +-u16 lookup_dhcp_opt(int prot, char *name); +-u16 lookup_dhcp_len(int prot, u16 val); ++int lookup_dhcp_opt(int prot, char *name); ++int lookup_dhcp_len(int prot, int val); + char *option_string(int prot, unsigned int opt, unsigned char *val, + int opt_len, char *buf, int buf_len); + #ifdef HAVE_LINUX_NETWORK +diff --git a/src/option.c b/src/option.c +index b2596ec..2a61017 100644 +--- a/src/option.c ++++ b/src/option.c +@@ -750,6 +750,7 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags) + struct dhcp_netid *np = NULL; + u16 opt_len = 0; + int is6 = 0; ++ int option_ok = 0; + + new->len = 0; + new->flags = flags; +@@ -769,16 +770,19 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags) + { + new->opt = atoi(arg); + opt_len = 0; ++ option_ok = 1; + break; + } + + if (strstr(arg, "option:") == arg) + { +- new->opt = lookup_dhcp_opt(AF_INET, arg+7); +- opt_len = lookup_dhcp_len(AF_INET, new->opt); +- /* option:<optname> must follow tag and vendor string. */ +- if ((opt_len & OT_INTERNAL) && flags != DHOPT_MATCH) +- new->opt = 0; ++ if ((new->opt = lookup_dhcp_opt(AF_INET, arg+7)) != -1) ++ { ++ opt_len = lookup_dhcp_len(AF_INET, new->opt); ++ /* option:<optname> must follow tag and vendor string. */ ++ if (!(opt_len & OT_INTERNAL) || flags == DHOPT_MATCH) ++ option_ok = 1; ++ } + break; + } + #ifdef HAVE_DHCP6 +@@ -792,13 +796,16 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags) + { + new->opt = atoi(arg+8); + opt_len = 0; ++ option_ok = 1; + } + else + { +- new->opt = lookup_dhcp_opt(AF_INET6, arg+8); +- opt_len = lookup_dhcp_len(AF_INET6, new->opt); +- if ((opt_len & OT_INTERNAL) && flags != DHOPT_MATCH) +- new->opt = 0; ++ if ((new->opt = lookup_dhcp_opt(AF_INET6, arg+8)) != -1) ++ { ++ opt_len = lookup_dhcp_len(AF_INET6, new->opt); ++ if (!(opt_len & OT_INTERNAL) || flags == DHOPT_MATCH) ++ option_ok = 1; ++ } + } + /* option6:<opt>|<optname> must follow tag and vendor string. */ + is6 = 1; +@@ -821,7 +828,7 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags) + new->flags |= DHOPT_RFC3925; + if (flags == DHOPT_MATCH) + { +- new->opt = 1; /* avoid error below */ ++ option_ok = 1; + break; + } + } +@@ -848,16 +855,16 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags) + + if (opt_len == 0 && + !(new->flags & DHOPT_RFC3925)) +- opt_len = lookup_dhcp_len(AF_INET6 ,new->opt); ++ opt_len = lookup_dhcp_len(AF_INET6, new->opt); + } + else + #endif + if (opt_len == 0 && + !(new->flags & (DHOPT_VENDOR | DHOPT_ENCAPSULATE | DHOPT_RFC3925))) +- opt_len = lookup_dhcp_len(AF_INET ,new->opt); ++ opt_len = lookup_dhcp_len(AF_INET, new->opt); + + /* option may be missing with rfc3925 match */ +- if (new->opt == 0) ++ if (!option_ok) + ret_err(_("bad dhcp-option")); + + if (comma) diff --git a/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch new file mode 100644 index 000000000000..57708b6f716e --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch @@ -0,0 +1,28 @@ +commit 04b0ac05377936d121a36873bb63d492cde292c9 +Author: Simon Kelley <simon@thekelleys.org.uk> +Date: Mon Apr 6 17:19:13 2015 +0100 + + Fix crash caused by looking up servers.bind when many servers defined. + +diff --git a/src/cache.c b/src/cache.c +index d7bea57..178d654 100644 +--- a/src/cache.c ++++ b/src/cache.c +@@ -1367,7 +1367,7 @@ int cache_make_stat(struct txt_record *t) + } + port = prettyprint_addr(&serv->addr, daemon->addrbuff); + lenp = p++; /* length */ +- bytes_avail = (p - buff) + bufflen; ++ bytes_avail = bufflen - (p - buff ); + bytes_needed = snprintf(p, bytes_avail, "%s#%d %u %u", daemon->addrbuff, port, queries, failed_queries); + if (bytes_needed >= bytes_avail) + { +@@ -1381,7 +1381,7 @@ int cache_make_stat(struct txt_record *t) + lenp = p - 1; + buff = new; + bufflen = newlen; +- bytes_avail = (p - buff) + bufflen; ++ bytes_avail = bufflen - (p - buff ); + bytes_needed = snprintf(p, bytes_avail, "%s#%d %u %u", daemon->addrbuff, port, queries, failed_queries); + } + *lenp = bytes_needed; diff --git a/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch new file mode 100644 index 000000000000..c6106db510de --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch @@ -0,0 +1,40 @@ +commit ad4a8ff7d9097008d7623df8543df435bfddeac8 +Author: Simon Kelley <simon@thekelleys.org.uk> +Date: Thu Apr 9 21:48:00 2015 +0100 + + Fix crash on receipt of certain malformed DNS requests. + +diff --git a/src/rfc1035.c b/src/rfc1035.c +index 7a07b0c..a995ab5 100644 +--- a/src/rfc1035.c ++++ b/src/rfc1035.c +@@ -1198,7 +1198,10 @@ unsigned int extract_request(struct dns_header *header, size_t qlen, char *name, + size_t setup_reply(struct dns_header *header, size_t qlen, + struct all_addr *addrp, unsigned int flags, unsigned long ttl) + { +- unsigned char *p = skip_questions(header, qlen); ++ unsigned char *p; ++ ++ if (!(p = skip_questions(header, qlen))) ++ return 0; + + /* clear authoritative and truncated flags, set QR flag */ + header->hb3 = (header->hb3 & ~(HB3_AA | HB3_TC)) | HB3_QR; +@@ -1214,7 +1217,7 @@ size_t setup_reply(struct dns_header *header, size_t qlen, + SET_RCODE(header, NOERROR); /* empty domain */ + else if (flags == F_NXDOMAIN) + SET_RCODE(header, NXDOMAIN); +- else if (p && flags == F_IPV4) ++ else if (flags == F_IPV4) + { /* we know the address */ + SET_RCODE(header, NOERROR); + header->ancount = htons(1); +@@ -1222,7 +1225,7 @@ size_t setup_reply(struct dns_header *header, size_t qlen, + add_resource_record(header, NULL, NULL, sizeof(struct dns_header), &p, ttl, NULL, T_A, C_IN, "4", addrp); + } + #ifdef HAVE_IPV6 +- else if (p && flags == F_IPV6) ++ else if (flags == F_IPV6) + { + SET_RCODE(header, NOERROR); + header->ancount = htons(1); diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 new file mode 100644 index 000000000000..07f0d2181d98 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Id$ + +extra_started_commands="reload" + +pidfile="/var/run/dnsmasq.pid" +command="/usr/sbin/dnsmasq" +command_args="-x ${pidfile} ${DNSMASQ_OPTS}" +start_stop_daemon_args="--retry TERM/3/TERM/5" + +depend() { + provide dns + need localmount net + after bootmisc + use logger +} + +start_pre() { + checkpath --owner dnsmasq:dnsmasq \ + --mode 0644 \ + --file /var/lib/misc/dnsmasq.leases +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + kill -HUP $(cat "${pidfile}") + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r2 b/net-dns/dnsmasq/files/dnsmasq-init-r2 new file mode 100644 index 000000000000..94627ef95b00 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-r2 @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Id$ + +extra_started_commands="reload" + +pidfile="/var/run/dnsmasq.pid" +command="/usr/sbin/dnsmasq" +command_args="-x ${pidfile} ${DNSMASQ_OPTS}" +start_stop_daemon_args="--retry TERM/3/TERM/5" + +depend() { + provide dns + need localmount net + after bootmisc + use logger +} + +reload() { + ebegin "Reloading ${SVCNAME}" + kill -HUP $(cat "${pidfile}") + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq.confd-r1 b/net-dns/dnsmasq/files/dnsmasq.confd-r1 new file mode 100644 index 000000000000..0e94463074c9 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq.confd-r1 @@ -0,0 +1,4 @@ +# /etc/conf.d/dnsmasq: config file for /etc/init.d/dnsmasq + +# See the dnsmasq(8) man page for possible options to put here. +DNSMASQ_OPTS="--user=dnsmasq --group=dnsmasq" diff --git a/net-dns/dnsmasq/files/dnsmasq.service b/net-dns/dnsmasq/files/dnsmasq.service new file mode 100644 index 000000000000..8e313bcfd996 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq.service @@ -0,0 +1,12 @@ +[Unit] +Description=A lightweight DHCP and caching DNS server +After=network.target + +[Service] +Type=simple +ExecStartPre=/usr/sbin/dnsmasq --test +ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/dnsmasq/files/dnsmasq.service-r1 b/net-dns/dnsmasq/files/dnsmasq.service-r1 new file mode 100644 index 000000000000..8e313bcfd996 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq.service-r1 @@ -0,0 +1,12 @@ +[Unit] +Description=A lightweight DHCP and caching DNS server +After=network.target + +[Service] +Type=simple +ExecStartPre=/usr/sbin/dnsmasq --test +ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/dnsmasq/metadata.xml b/net-dns/dnsmasq/metadata.xml new file mode 100644 index 000000000000..7d417df79405 --- /dev/null +++ b/net-dns/dnsmasq/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>chutzpah@gentoo.org</email> +<name>Patrick McLean</name> +</maintainer> +<use> + <flag name='auth-dns'>Add support for acting as an authorative DNS server.</flag> + <flag name='conntrack'>Add support for Linux conntrack connection marking.</flag> + <flag name='dhcp-tools'>Install extra command line tools for manually managing DHCP leases.</flag> + <flag name='dhcp'>Enable support for acting as a DHCP server.</flag> + <flag name='dnssec'>Enable support DNSSEC validation and caching.</flag> + <flag name='script'>Enable support for calling scripts when leases change.</flag> + <flag name='tftp'>Enables built in TFTP server for netbooting.</flag> +</use> +<upstream> + <remote-id type="cpe">cpe:/a:thekelleys:dnsmasq</remote-id> +</upstream> +</pkgmetadata> diff --git a/net-dns/dnssec-check/Manifest b/net-dns/dnssec-check/Manifest new file mode 100644 index 000000000000..d5e4bd1dbcf4 --- /dev/null +++ b/net-dns/dnssec-check/Manifest @@ -0,0 +1,5 @@ +DIST dnssec-check-1.13.tar.gz 174175 SHA256 1c1d751aa39007736708930599b72236fc3abf2341e679cf1b44bf6a6395422b SHA512 452a312beba826a301800c678e00adb50188cba32008eb22fafd1044a922477ea2d399f4bf07057c839ffbd3057707081b5eec72eadbd1c41ced0c36168f24e6 WHIRLPOOL 5d4682ee59f4a203afaed7750bc1b98b6d627d5ad9ad5a5f771b818e0be1ba1f130853322e0fdd5686c21b44dd04272b1d3379e9f80297478d3bb67df31d549c +DIST dnssec-check-1.14.0.1.tar.gz 174770 SHA256 28a02a7dd36eb49b8106520ab1ec3e14b8dddcccb3ed36e1d6a70fb12fe57418 SHA512 2902918f2452bc588332580c3cfa637854aa5791c9d72d8f928471a9baae7ad46b6b1d0b34099cca1ec43a5e7f426493a20df4414d8150f614775e245135dd9f WHIRLPOOL 6d59d0865c733065da2c600fde6275ecce1af0ccf245dd37e8622c5664cc35d9e0ab462aaf7c2d0ca9d666ec7f2ed2fb0a3e14f49d6de864cfd0e5527e217b87 +DIST dnssec-check-1.14.tar.gz 174645 SHA256 cb2d30484140105f745bc0fdb57d77408a419e9dd59ad5f721742eec36bf1566 SHA512 08ec062d8d24dfb602277279237ea8d591384c34c16617d11bdb512e948e08a851b4016bcc024bce8440038c116e8688de041d5a04ab92b054526a558a05601c WHIRLPOOL 51fad9a4a4b581e1f82e7f815c32317a8d5564c4f920459692199cf9dacba8ab870c9b4586bc7315368979bbee721435a6b755174f932602e261b642863d285e +DIST dnssec-check-2.0.tar.gz 175161 SHA256 49ee6bf20ebcc555af14fb8fea02ec4b5e02a46324495aa3210aa942a1bfcf7e SHA512 9dfb4c05ffce6fd8e221c2c07e0214e5d8c822f4d03a2bbd723df4e32d6c5efba3ce810a0f941f6944314b028473e7916c0d32335406c8a8e8d6030ba7bb8878 WHIRLPOOL 36b8fbc0e25a7fa23f5146e889e2c7454337fc3dfe92f159c0dd8095f86b2e903b76890a3dbec2d91db97fb2fadaadd01ab30c742a21baa01f23c3cbd201c297 +DIST dnssec-check-2.1.tar.gz 174430 SHA256 f291b5e2b1e4016f903ece3ee46cccfe967980b92357ee57b960e9c68463d164 SHA512 0e42231680a62fc1c51f2df81ce874505581f65d8e27234d12132718a12069b922da744db43a1b91b81380c033aca527fb757b78ab85188ea7f04347211af479 WHIRLPOOL 03d976b74350323c8110cb066f0e4443d832dfe1622c2e85e86f5b86964cb124d6d3019e340db21862468ac17753ebbff8aa0866aea7ee9de79e21b0bf70a948 diff --git a/net-dns/dnssec-check/dnssec-check-1.13.ebuild b/net-dns/dnssec-check/dnssec-check-1.13.ebuild new file mode 100644 index 000000000000..e9642827c7a6 --- /dev/null +++ b/net-dns/dnssec-check/dnssec-check-1.13.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit qt4-r2 + +DESCRIPTION="tests local resolver for support of DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="net-dns/dnssec-validator[threads] + dev-qt/qtdeclarative:4 " +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/installPrefix = /s: = .*: = /usr:' \ + -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die + sed -e '/Exec=/s:/opt::' \ + -i ${PN}.desktop || die +} + +src_configure() { + eqmake4 ${PN}.pro +} diff --git a/net-dns/dnssec-check/dnssec-check-1.14.0.1.ebuild b/net-dns/dnssec-check/dnssec-check-1.14.0.1.ebuild new file mode 100644 index 000000000000..384c2a6380f3 --- /dev/null +++ b/net-dns/dnssec-check/dnssec-check-1.14.0.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="tests local resolver for support of DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="net-dns/dnssec-validator[threads] + dev-qt/qtdeclarative:4 " +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/installPrefix = /s: = .*: = /usr:' \ + -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die + sed -e '/Exec=/s:/opt::' \ + -i ${PN}.desktop || die +} + +src_configure() { + eqmake4 ${PN}.pro +} diff --git a/net-dns/dnssec-check/dnssec-check-1.14.ebuild b/net-dns/dnssec-check/dnssec-check-1.14.ebuild new file mode 100644 index 000000000000..8d22113c9bc0 --- /dev/null +++ b/net-dns/dnssec-check/dnssec-check-1.14.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="tests local resolver for support of DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="net-dns/dnssec-validator[threads] + dev-qt/qtdeclarative:4 " +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-mainwindow.patch + + sed -e '/installPrefix = /s: = .*: = /usr:' \ + -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die + sed -e '/Exec=/s:/opt::' \ + -i ${PN}.desktop || die +} + +src_configure() { + eqmake4 ${PN}.pro +} diff --git a/net-dns/dnssec-check/dnssec-check-2.0.ebuild b/net-dns/dnssec-check/dnssec-check-2.0.ebuild new file mode 100644 index 000000000000..384c2a6380f3 --- /dev/null +++ b/net-dns/dnssec-check/dnssec-check-2.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="tests local resolver for support of DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="net-dns/dnssec-validator[threads] + dev-qt/qtdeclarative:4 " +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/installPrefix = /s: = .*: = /usr:' \ + -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die + sed -e '/Exec=/s:/opt::' \ + -i ${PN}.desktop || die +} + +src_configure() { + eqmake4 ${PN}.pro +} diff --git a/net-dns/dnssec-check/dnssec-check-2.1.ebuild b/net-dns/dnssec-check/dnssec-check-2.1.ebuild new file mode 100644 index 000000000000..75aeb44ec026 --- /dev/null +++ b/net-dns/dnssec-check/dnssec-check-2.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="tests local resolver for support of DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="" + +RDEPEND="net-dns/dnssec-validator[threads] + dev-qt/qtdeclarative:5" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/installPrefix = /s: = .*: = /usr:' \ + -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die + sed -e '/Exec=/s:/opt::' \ + -i ${PN}.desktop || die +} + +src_configure() { + eqmake4 ${PN}.pro +} diff --git a/net-dns/dnssec-check/files/dnssec-check-1.14-mainwindow.patch b/net-dns/dnssec-check/files/dnssec-check-1.14-mainwindow.patch new file mode 100644 index 000000000000..98e959b8d746 --- /dev/null +++ b/net-dns/dnssec-check/files/dnssec-check-1.14-mainwindow.patch @@ -0,0 +1,11 @@ +--- dnssec-check-1.14/mainwindow.cpp ++++ dnssec-check-1.14/mainwindow.cpp +@@ -372,7 +372,7 @@ + } + + accessURL.addQueryItem("locationDescription", locationDescription); +- accessURL.addQueryItem("1.14"); ++ accessURL.addQueryItem("DNSSECToolsVersion", "1.14"); + + if (!m_manager) { + m_manager = new QNetworkAccessManager(); diff --git a/net-dns/dnssec-check/metadata.xml b/net-dns/dnssec-check/metadata.xml new file mode 100644 index 000000000000..59acc2cc580e --- /dev/null +++ b/net-dns/dnssec-check/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +</pkgmetadata> + diff --git a/net-dns/dnssec-lookup/Manifest b/net-dns/dnssec-lookup/Manifest new file mode 100644 index 000000000000..7e6c3661e0a6 --- /dev/null +++ b/net-dns/dnssec-lookup/Manifest @@ -0,0 +1,4 @@ +DIST dnssec-lookup-1.14.tar.gz 37982 SHA256 9f046a3a81a74de16a28305b83274e1e9bf2529640e6a0f56bf673309b03e275 SHA512 3b81b5b5c2d0692e1b0bd6375655cb8c836df516404425064dffb562bdacd89c19be72f5bb2a1a09144ec483426b1803aef3dbb74945dc7fa8c0b693076bb230 WHIRLPOOL 3504ed6e76bd030c1ba920b4757b7d1bc965ddb3b4c530f23e184b93207b13f5d57bda331f5173b6c3e50064c428f743acd0a77fd1f2d11070fe48c913c55dfe +DIST dnssec-lookup-2.0.tar.gz 38021 SHA256 9a0488338dcce708afc16497ecba8db2a3bc76f196f1b4d8a14c92b3c10ac768 SHA512 6662f1d4510d5025ed845028e3eaa0f13238c9a33e257abd3f45e8be9a52ae15538a79c618a28cd7182f7845bd23423e7dfebc16259fdde320c159e586e07854 WHIRLPOOL 535407af28c3d0326c447abb5dd3fe7746524ed91200db06c21874e86a9ebad66b610c176e5c0983d88a87176b6179854fe390afe2c8bfb2ac36b3bdb4ad7d3f +DIST dnssec-lookup-2.1.tar.gz 36243 SHA256 b548ef509c2843c09aa32cab700286edac1718bf5583fdaef6e2811eb0a979ab SHA512 c1a90a354411904f5905cd343c30cccca215b60584fcd5ba0cf9643555b56bfb948a8f55a48dc7bc45bf14c1cc945694d308a684d71cc6b5ba8deae8716b7068 WHIRLPOOL 758901e1b992039f7d566a04fa4c510893bd72392c83e800c13bbf4079fc6aac932e04c82ed317fc9b4e2e9015d52ecf705a3e7f6999780a50323b8396d7d147 +DIST lookup-1.13.tar.gz 37986 SHA256 08f0777a79ec3c32e2db0026341c16509a798b6b89f1a49443b5e685ebfa51e3 SHA512 d16b611fc805a42b97e312b14bd7c8da1f099f9cfd8b9e946be7e2cdebffb92c527426d0c1f5fc53d3057635024b4a4c422080afdf3222fe8abbf76a05a23f68 WHIRLPOOL becd3c13adf84a89e6dc49699ada3910c06c8b5845c8771b2ed6e6ece939e837d63ca9d82bda0be05c388180fc66d0e255749ac1874e94e3dbd37532df811205 diff --git a/net-dns/dnssec-lookup/dnssec-lookup-1.13.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-1.13.ebuild new file mode 100644 index 000000000000..ff7fbf85699a --- /dev/null +++ b/net-dns/dnssec-lookup/dnssec-lookup-1.13.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit qt4-r2 + +MY_PN=${PN/dnssec-/} +MY_P=${MY_PN}-${PV} +DESCRIPTION="DNS lookup utility that supports DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="net-dns/dnssec-validator[threads] + dev-qt/qtgui:4" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_configure() { + eqmake4 ${MY_PN}.pro PREFIX=/usr +} + +src_install() { + newbin src/build/${MY_PN} ${PN} + + newicon data/64x64/${MY_PN}.png ${PN}.png + newicon data/maemo/${MY_PN}.xpm ${PN}.xpm + make_desktop_entry ${PN} + + newman man/${MY_PN}.1 ${PN}.1 +} diff --git a/net-dns/dnssec-lookup/dnssec-lookup-1.14.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-1.14.ebuild new file mode 100644 index 000000000000..3edac80270fa --- /dev/null +++ b/net-dns/dnssec-lookup/dnssec-lookup-1.14.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit qt4-r2 + +MY_PN=${PN/dnssec-/} +MY_P=${MY_PN}-${PV} +DESCRIPTION="DNS lookup utility that supports DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="net-dns/dnssec-validator[threads] + dev-qt/qtgui:4" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_configure() { + eqmake4 ${MY_PN}.pro PREFIX=/usr +} + +src_install() { + newbin src/build/${MY_PN} ${PN} + + newicon data/64x64/${MY_PN}.png ${PN}.png + newicon data/maemo/${MY_PN}.xpm ${PN}.xpm + make_desktop_entry ${PN} + + newman man/${MY_PN}.1 ${PN}.1 +} diff --git a/net-dns/dnssec-lookup/dnssec-lookup-2.0.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-2.0.ebuild new file mode 100644 index 000000000000..4d2c93b9d309 --- /dev/null +++ b/net-dns/dnssec-lookup/dnssec-lookup-2.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit qt4-r2 + +MY_PN=${PN/dnssec-/} +MY_P=${MY_PN}-${PV} +DESCRIPTION="DNS lookup utility that supports DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="=net-dns/dnssec-validator-${PV}[threads] + dev-qt/qtgui:4" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_configure() { + eqmake4 ${MY_PN}.pro PREFIX=/usr +} + +src_install() { + newbin src/build/${MY_PN} ${PN} + + newicon data/64x64/${MY_PN}.png ${PN}.png + newicon data/maemo/${MY_PN}.xpm ${PN}.xpm + make_desktop_entry ${PN} + + newman man/${MY_PN}.1 ${PN}.1 +} diff --git a/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild new file mode 100644 index 000000000000..16f0bc095038 --- /dev/null +++ b/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit qt4-r2 + +MY_PN=${PN/dnssec-/} +MY_P=${MY_PN}-${PV} +DESCRIPTION="DNS lookup utility that supports DNSSEC validation" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="=net-dns/dnssec-validator-${PV}[threads] + dev-qt/qtgui:4" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_configure() { + eqmake4 ${MY_PN}.pro PREFIX=/usr +} + +src_install() { + newbin src/build/${MY_PN} ${PN} + + newicon data/64x64/${MY_PN}.png ${PN}.png + newicon data/maemo/${MY_PN}.xpm ${PN}.xpm + make_desktop_entry ${PN} + + newman man/${MY_PN}.1 ${PN}.1 +} diff --git a/net-dns/dnssec-lookup/metadata.xml b/net-dns/dnssec-lookup/metadata.xml new file mode 100644 index 000000000000..a3a94e23ba2b --- /dev/null +++ b/net-dns/dnssec-lookup/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +<longdescription lang="en"> + Lookup is a simple graphical utility that can be used to query a network for domain name records. + The tool understands DNSSEC and color-codes the results based on whether + the record has been securely validated (green), is a 'trusted' answer but not validated (yellow), + or fails DNSSEC validation (red). +</longdescription> +</pkgmetadata> + diff --git a/net-dns/dnssec-nodes/Manifest b/net-dns/dnssec-nodes/Manifest new file mode 100644 index 000000000000..4665ad5968dc --- /dev/null +++ b/net-dns/dnssec-nodes/Manifest @@ -0,0 +1,4 @@ +DIST dnssec-nodes-1.13.tar.gz 72392 SHA256 8d3d2c92a9f66d18a46e8fba2d2a87f468b6dcfe7e9866d8df822e08ad910311 SHA512 df4c35d1e3956e81969184ebae802c5fa73687367607b6fd7b154a87e63268211740664c44593ef44abf0ade89b8f0314bca02e3f1694bc71eba7c2aa8ee9b8d WHIRLPOOL c32a00d78580a0214bf6e119125f0b86355fe9e76eee520e692b29c94605104998ffa7f47782c9096179bea60582621fb942bf77c308c2da304f8c8c7752489c +DIST dnssec-nodes-1.14.tar.gz 88909 SHA256 5fc8e5603eac209ac7ffb47dab3b93adce71c17a7859002025e9f1535889ca68 SHA512 81cd727fd0620054dcf63f645405eef43362fe3874f8beab24303de8f8c4db94bd6441847da2cd264b66e991eb5d43e72e0db65664f137d1525af84aa8b2f298 WHIRLPOOL 46a4c64dc2a5aca5d43dfb67e578f2b096f9bf2d9d165dce4b352332f206c0e6623c27b44f223cd125013461d7d4f2f60f75c12891a8e251751ff2e68b966573 +DIST dnssec-nodes-2.0.tar.gz 96987 SHA256 d4948b6b997d64d171a793f90f8f5fcfd1f2865a49d3d2ac2212134140ecd70c SHA512 908de98a7b9709ec63b54876a2c8abe5744c83782eefde7c5cde1a39e18c86093dbb6271cb36e236d5ccec960c34262412737c620f23f0941f7dd64fbe8bcce5 WHIRLPOOL 10ac03c9a4527e1a4a7b62729a067dac0a6d89e7e5e1f5026f908872b1f9b04f3573324a7c06afae44a8d00ff266fea508a7c4aad385c9680481fb6d17636bca +DIST dnssec-nodes-2.1.tar.gz 98582 SHA256 a6ba404635527ab519bea2317616b1b7f104eff12eefc41cc578a4e5ae0f66cc SHA512 2c532eccdfaedc2994e0edd529dfb6d550c40721053732e3e64d094c18ba3fd67f803151804996ece978f55dcfd443de08e0577d501074e57543dd630dc33d2c WHIRLPOOL f38ad0168933241614bb1dd4f4c36097f34a2a59798d8eecbba2dd9a9bc0934d8498644eb831110862c5cebc9221001da7ce164f35e8e58e4c3cf90c4bc90d9f diff --git a/net-dns/dnssec-nodes/dnssec-nodes-1.13.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-1.13.ebuild new file mode 100644 index 000000000000..3994e5a9ca25 --- /dev/null +++ b/net-dns/dnssec-nodes/dnssec-nodes-1.13.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="net-dns/dnssec-validator[threads]" +DEPEND="${RDEPEND}" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} + +src_install() { + qt4-r2_src_install + + doicon icons/dnssec-nodes.* + make_desktop_entry ${PN} + + doman man/${PN}.1 +} diff --git a/net-dns/dnssec-nodes/dnssec-nodes-1.14.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-1.14.ebuild new file mode 100644 index 000000000000..a6ad81f5c319 --- /dev/null +++ b/net-dns/dnssec-nodes/dnssec-nodes-1.14.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="=net-dns/dnssec-validator-${PV}[threads]" +DEPEND="${RDEPEND}" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} + +src_install() { + qt4-r2_src_install + + doicon icons/dnssec-nodes.* + make_desktop_entry ${PN} + + doman man/${PN}.1 +} diff --git a/net-dns/dnssec-nodes/dnssec-nodes-2.0.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-2.0.ebuild new file mode 100644 index 000000000000..a6ad81f5c319 --- /dev/null +++ b/net-dns/dnssec-nodes/dnssec-nodes-2.0.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="=net-dns/dnssec-validator-${PV}[threads]" +DEPEND="${RDEPEND}" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} + +src_install() { + qt4-r2_src_install + + doicon icons/dnssec-nodes.* + make_desktop_entry ${PN} + + doman man/${PN}.1 +} diff --git a/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild new file mode 100644 index 000000000000..ed56c4754c1c --- /dev/null +++ b/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="=net-dns/dnssec-validator-${PV}[threads] + dev-qt/qtcore:4" +DEPEND="${RDEPEND}" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} + +src_install() { + qt4-r2_src_install + + doicon icons/dnssec-nodes.* + make_desktop_entry ${PN} + + doman man/${PN}.1 +} diff --git a/net-dns/dnssec-nodes/metadata.xml b/net-dns/dnssec-nodes/metadata.xml new file mode 100644 index 000000000000..59acc2cc580e --- /dev/null +++ b/net-dns/dnssec-nodes/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +</pkgmetadata> + diff --git a/net-dns/dnssec-root/Manifest b/net-dns/dnssec-root/Manifest new file mode 100644 index 000000000000..f611227c77c0 --- /dev/null +++ b/net-dns/dnssec-root/Manifest @@ -0,0 +1,17 @@ +DIST Kjqmt7v-20100715.csr 765 SHA256 401120c1721ba100b2d9abf2d01332399535ba0f9c71dbd9f97232c5ebd608d2 SHA512 8e47be5054bbb801cb914d94a6f0d1e6b9b2eba387714f011f118bf8af6dacfe24a2dec80525ad005c545fa15fd8413cf90615e6d5c50d7925daa4aefff77112 WHIRLPOOL 26b495b38e6d04baea8f7ee5354fa3b68153cc25baa6657b9b74d04ae52fa43562f422eb8188c2538314a8f7de3bb79b34bf011db542b6cde877bc94501d5377 +DIST Kjqmt7v-20110630.crt 974 SHA256 17e0f21c31f811685388b14dcd7c97dcfc92e23b03896827bbc7ff2f0c54c252 SHA512 dd208ee38e7652cbd6796ca1574ada288cb950ec9f39d994e4f32161f1b9b281da1cd8820d7b4727caaeb54c8ae0adcdd130e55f75c48721e899ebfbbaefa3fa WHIRLPOOL 4206b6c21f6cac68f6db116d063ab0373cf4e3060ba19bd68e79f0f807acf41f7d27cdf7ef567daa5e3c383a4bee5fa7ca6ea40bfc13fde9eb481e0479c26678 +DIST Kjqmt7v-20150504.crt 974 SHA256 8b9c12c9e51d8a911d9527a58cc59da2f14286e064688b45ce4b6b74b55dccb9 SHA512 98adfc6a5d37c632eda9f642449ecd6c1bf1d49ebed2750cfe3bd99629b4935f51ecc4aafbd6ea69595b2f2cb15887bd9a1647aa255a564263f5c7b648c7adf1 WHIRLPOOL e22072d6415ae9e9ae0c031b2ed386a0971f92a92bbfe9213fe8b4dca24596c597df7f12d95131e6e4e76cddd350c39f868134d724dccedac4a4bfe21c6d5a3b +DIST Kjqmt7v.crt 974 SHA256 ad068d18531618a9f1d0b68ffd84c87fbb5b8c2aea0288122a2eae8ad1190c2f SHA512 b0c85c17439b3a9323390217edf72f67a91a36b509a68470543b4dc1a3cce6a73065e989dee10ae070e5d2100e026af1d01ab8c000447ae4bbe64c21451d1081 WHIRLPOOL 5ce715f406d3682d50fa123f0846d94e3834b29012c406b5f96c2f908e480e35c3ad71a6c92d96a11350bfd3aea26084d55c6273ca24ba9816125bce3a661519 +DIST Kjqmt7v.csr 765 SHA256 401120c1721ba100b2d9abf2d01332399535ba0f9c71dbd9f97232c5ebd608d2 SHA512 8e47be5054bbb801cb914d94a6f0d1e6b9b2eba387714f011f118bf8af6dacfe24a2dec80525ad005c545fa15fd8413cf90615e6d5c50d7925daa4aefff77112 WHIRLPOOL 26b495b38e6d04baea8f7ee5354fa3b68153cc25baa6657b9b74d04ae52fa43562f422eb8188c2538314a8f7de3bb79b34bf011db542b6cde877bc94501d5377 +DIST icann-20110715.pgp 3401 SHA256 3e9beaaf9bbd1fe78a0d104230cbc04d544e833a2dc6b982992f74a4860a9ae8 SHA512 5fba8334850f2ae753f4f8a30d1e6c62abc341ece2dc83df4bc0f6db2b91ae68942c0d2a38eab3d33b5b91640cd1cf0970777225c15d5f961884c00077d539a2 WHIRLPOOL d2758930820d90077c8084e8c95e0bacc361d78b68d150d3b271ed32abeb2272f95f9a2d23ed5aaab25a31fe3fba66554622ef5c9a04002b595b5f2e66b732b0 +DIST icann.pgp 2097 SHA256 aaa2c7f6230c49b94af57931cfdd2452d24245b917a27110b28e952975b8c5be SHA512 db6c917bd5a6141beb8f6ce5d601541fe222446e330ab7c598d6e355315a354f14b117731213863fea28a0ca7d5b12a6b91ac32f5e55cc476a7d1dbb437abbab WHIRLPOOL 9983ea5949115a5011c5543f82798746ed5ec193bbac47f71229b7433964e699abef2998fbcb044b15814fbe82eb5edf017731f668a7cfdaf2a5c78505bddb86 +DIST icannbundle-20100715.pem 17699 SHA256 c4a91c4bea6763f4ef05ca92bf74fb41d5583594c04aa999c90a55d710a3e5da SHA512 36ce5025acc447f740222dd5f794fd848540731792441c6e50b0260411ea8d30b7d2b97a53a26d0469f3315d5881acb5e2b92a904413939db9a6b64ffd6e0f2b WHIRLPOOL e1bef240ce34051485d4046568445fc4ab32e4d0605b224d6dd3b8840218ebd00e903cc26cf0b15e99250d9667015479db20264a0e8cb7a1e17c3a24eea9cc86 +DIST icannbundle-20150504.pem 17435 SHA256 b405ff8320aa0eecd8eae98edfcdb106eec6077e0470cf5e1c21b1db6b346534 SHA512 f9b9e43ad71608921d1e79f25cd98ca8c712256d4e31b04035a9aac7b46f3ec951089ca23e84500c5901d53afb66991a30818b4cd6f6de6885a107f486f56994 WHIRLPOOL 1f2431a1b65829844e1d864936fc4c0bf1a8bbc22b4344db764772bec4f2d074a37f6f333ded78e9e277c298df7db13201324397cf924f142d039f0433bad105 +DIST icannbundle.pem 17699 SHA256 c4a91c4bea6763f4ef05ca92bf74fb41d5583594c04aa999c90a55d710a3e5da SHA512 36ce5025acc447f740222dd5f794fd848540731792441c6e50b0260411ea8d30b7d2b97a53a26d0469f3315d5881acb5e2b92a904413939db9a6b64ffd6e0f2b WHIRLPOOL e1bef240ce34051485d4046568445fc4ab32e4d0605b224d6dd3b8840218ebd00e903cc26cf0b15e99250d9667015479db20264a0e8cb7a1e17c3a24eea9cc86 +DIST root-anchors-20100715.asc 189 SHA256 5bffcac53f810c5fb1e1baf543e2de2f10ec99d7f7cddb5f1e47b1e58cf34cfa SHA512 e9c86b897d7e8edb979cba4bebe353b7c7f21b4061cd6f571c8671b02e73c2ea0b78a980169fa7d40987b9e962a0f1ba17dbb392b5ec6ad14fedce65a139c913 WHIRLPOOL a422b8c473aa4cfa61d6a22ea748b972acc3242da7bb90a5b44b5e291210e24ca16ce4876dcc17b71c3694e9f58da4355a5ec1cb1c2950496d87cbfadc7944c5 +DIST root-anchors-20100715.xml 418 SHA256 dfb281b771dc854c18d1cff9d2eecaf184cf7a9668606aaa33e8f01bf4b4d8e4 SHA512 bca506c852bc83aa9d04ed0b52bef6d0baec745e466292273d52f49fd73cec73db4c6d55a9921fe086c7edc618f3ab21dc03146b6d617644495b3926e262e572 WHIRLPOOL 952aa6ba26495859fc4bc4e9f689b728373cc9e62ae64f833d9b894f8902be858371c88619ed4e10fb2557181442bb5d97781a75c6866a83d7fc8b43899a1b70 +DIST root-anchors-20110630.p7s 5001 SHA256 d74ca12899a150ea75b537cb77b0e55046cdad495349422fe1d858cc89f21c5b SHA512 384080488923cd855b6c1f7aaa9021630ab2cce51f0aee3d0561940d2668ee15e612949fe8398e59b4274968f6116e033e8d88ffe8375852864d9dd5f6df4852 WHIRLPOOL 26fda6fc9f710fc9f9f200bdd2ffd94782cf844e5ae1dfb6511affaea62495ebd9ea7a5b009c07a1256050bbb343642da11d9d29130847e9b704441453a16597 +DIST root-anchors-20150504.p7s 5001 SHA256 bd42aa218a6ca09eb6c5f194aeb70dc95c56a0ad051f644b9772da32e65d5a61 SHA512 af188871f2ef7f9efb0d3f4822754e962fb921d62de925823f90a0c7dbe80b7a0188534adbdb324680ae981912968fcfa851eb72fb37694df8701fd749e7ff51 WHIRLPOOL 24cf2be6cf755ac6b5c3ebf267c0de02702a51db490849ec63c4e66ac27d57c0d337375b96e787d6b2a4f1eab5517b1f4ec10b76c42b293d2e529cb10af4cfb6 +DIST root-anchors.asc 189 SHA256 5bffcac53f810c5fb1e1baf543e2de2f10ec99d7f7cddb5f1e47b1e58cf34cfa SHA512 e9c86b897d7e8edb979cba4bebe353b7c7f21b4061cd6f571c8671b02e73c2ea0b78a980169fa7d40987b9e962a0f1ba17dbb392b5ec6ad14fedce65a139c913 WHIRLPOOL a422b8c473aa4cfa61d6a22ea748b972acc3242da7bb90a5b44b5e291210e24ca16ce4876dcc17b71c3694e9f58da4355a5ec1cb1c2950496d87cbfadc7944c5 +DIST root-anchors.p7s 5001 SHA256 62eba1622ebf8f87b3125f4f9e686cefd952f805696cab0fc24c96eccd7c6f49 SHA512 a9dda6e8785cb1675128f90b181f6100055894e5c8c7f8e7cbdcac82d4a0b3a2a00f57421b81a5093c4b283a75dc63e1e21e10f8c350e7404bba7c5e13fad28a WHIRLPOOL 55f3e2a9d53a0da773b2bdeb77649c44abf6e4d9dd52134e0cfd4165f50cdd9714d4ea88892cb47d1d9ce1ae8af9e9107f07c3b2d7770f9a0fa322b881a91e9f +DIST root-anchors.xml 418 SHA256 dfb281b771dc854c18d1cff9d2eecaf184cf7a9668606aaa33e8f01bf4b4d8e4 SHA512 bca506c852bc83aa9d04ed0b52bef6d0baec745e466292273d52f49fd73cec73db4c6d55a9921fe086c7edc618f3ab21dc03146b6d617644495b3926e262e572 WHIRLPOOL 952aa6ba26495859fc4bc4e9f689b728373cc9e62ae64f833d9b894f8902be858371c88619ed4e10fb2557181442bb5d97781a75c6866a83d7fc8b43899a1b70 diff --git a/net-dns/dnssec-root/dnssec-root-20100715.ebuild b/net-dns/dnssec-root/dnssec-root-20100715.ebuild new file mode 100644 index 000000000000..0b1ef1285b93 --- /dev/null +++ b/net-dns/dnssec-root/dnssec-root-20100715.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="The DNSSEC root key(s)" +HOMEPAGE="https://www.iana.org/dnssec/" +SRC_URI="http://data.iana.org/root-anchors/root-anchors.xml + http://data.iana.org/root-anchors/Kjqmt7v.csr + test? ( http://data.iana.org/root-anchors/Kjqmt7v.crt + http://data.iana.org/root-anchors/root-anchors.p7s + http://data.iana.org/root-anchors/root-anchors.asc + http://data.iana.org/root-anchors/icannbundle.pem + http://data.iana.org/root-anchors/icann.pgp + )" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="amd64 x86" + +IUSE="test" + +DEPEND="dev-libs/libxslt + test? ( app-crypt/gnupg )" +RDEPEND="" + +S="${WORKDIR}" + +# xsl and checking as per: +# http://permalink.gmane.org/gmane.network.dns.unbound.user/1039 + +src_unpack() { :; } + +src_compile() { + xsltproc -o "${S}"/root-anchors.txt "${FILESDIR}"/anchors2ds.xsl "${DISTDIR}"/root-anchors.xml || die 'xsl translation failed' +} + +src_test() +{ + gpg --import "${DISTDIR}"/icann.pgp || die 'icann key import failed' + gpg --verify "${DISTDIR}"/root-anchors.asc "${DISTDIR}"/root-anchors.xml || \ + die 'gpg verification of the root key failed' + openssl smime -verify -content "${DISTDIR}"/root-anchors.xml \ + -in "${DISTDIR}"/root-anchors.p7s -inform der \ + -CAfile "${DISTDIR}"/icannbundle.pem \ + || die 'smime verification of the root key failed' +} + +src_install() { + insinto /etc/dnssec + doins root-anchors.txt "${DISTDIR}"/root-anchors.xml "${DISTDIR}"/Kjqmt7v.csr || die +} diff --git a/net-dns/dnssec-root/dnssec-root-20110630.ebuild b/net-dns/dnssec-root/dnssec-root-20110630.ebuild new file mode 100644 index 000000000000..9e76945581eb --- /dev/null +++ b/net-dns/dnssec-root/dnssec-root-20110630.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="The DNSSEC root key(s)" +HOMEPAGE="https://www.iana.org/dnssec/" +SRC_URI="http://data.iana.org/root-anchors/root-anchors.xml -> root-anchors-20100715.xml + http://data.iana.org/root-anchors/Kjqmt7v.csr -> Kjqmt7v-20100715.csr + test? ( http://data.iana.org/root-anchors/Kjqmt7v.crt -> Kjqmt7v-20110630.crt + http://data.iana.org/root-anchors/root-anchors.p7s -> root-anchors-20110630.p7s + http://data.iana.org/root-anchors/root-anchors.asc -> root-anchors-20100715.asc + http://data.iana.org/root-anchors/icannbundle.pem -> icannbundle-20100715.pem + http://data.iana.org/root-anchors/icann.pgp -> icann-20110715.pgp + )" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x64-macos" +IUSE="test" + +RESTRICT="mirror" + +RDEPEND="" +DEPEND="dev-libs/libxslt + test? ( app-crypt/gnupg + dev-libs/openssl )" + +S="${WORKDIR}" + +# xsl and checking as per: +# http://permalink.gmane.org/gmane.network.dns.unbound.user/1039 + +src_unpack() { + return +} + +src_compile() { + xsltproc -o root-anchors-20100715.txt "${FILESDIR}"/anchors2ds.xsl "${DISTDIR}"/root-anchors-20100715.xml || die 'xsl translation failed' +} + +src_test() { + # icann.pgp contains an expired key + # gpg --import "${DISTDIR}"/icann.pgp || die 'icann key import failed' + gpg --import \ + "${FILESDIR}"/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc || die + gpg --verify \ + "${DISTDIR}"/root-anchors-20100715.asc \ + "${DISTDIR}"/root-anchors-20100715.xml || die + openssl smime -verify \ + -content "${DISTDIR}"/root-anchors-20100715.xml \ + -in "${DISTDIR}"/root-anchors-20110630.p7s -inform der \ + -CAfile "${DISTDIR}"/icannbundle-20100715.pem || die +} + +src_install() { + insinto /etc/dnssec + newins root-anchors-20100715.txt root-anchors.txt + newins "${DISTDIR}"/root-anchors-20100715.xml root-anchors.xml + newins "${DISTDIR}"/Kjqmt7v-20100715.csr Kjqmt7v.csr +} diff --git a/net-dns/dnssec-root/dnssec-root-20150403.ebuild b/net-dns/dnssec-root/dnssec-root-20150403.ebuild new file mode 100644 index 000000000000..fa75ecf2b175 --- /dev/null +++ b/net-dns/dnssec-root/dnssec-root-20150403.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="The DNSSEC root key(s)" +HOMEPAGE="https://www.iana.org/dnssec/" +DATE_ISSUE1=20100715 # Original root-anchor creation date +DATE_ISSUE2=20110715 # ICANN PGP key updated +DATE_ISSUE3=20150504 # Subordinate CAs updated +ICANN_PGP_FINGERPRINT='2FBB91BCAAEE0ABE1F8031C7D1AFBCE00F6C91D2' +# The naming of the files really needs some improvement upstream: +# root-anchors.p7s despite it's name, is mostly the the same data as +# icannbundle.pem +SRC_URI="http://data.iana.org/root-anchors/root-anchors.xml -> root-anchors-${DATE_ISSUE1}.xml + http://data.iana.org/root-anchors/Kjqmt7v.csr -> Kjqmt7v-${DATE_ISSUE1}.csr + test? ( http://data.iana.org/root-anchors/Kjqmt7v.crt -> Kjqmt7v-${DATE_ISSUE3}.crt + http://data.iana.org/root-anchors/root-anchors.p7s -> root-anchors-${DATE_ISSUE3}.p7s + http://data.iana.org/root-anchors/root-anchors.asc -> root-anchors-${DATE_ISSUE1}.asc + http://data.iana.org/root-anchors/icannbundle.pem -> icannbundle-${DATE_ISSUE3}.pem + http://data.iana.org/root-anchors/icann.pgp -> icann-${DATE_ISSUE2}.pgp + )" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos" +IUSE="test" + +RDEPEND="" +DEPEND="dev-libs/libxslt + test? ( app-crypt/gnupg + dev-libs/openssl )" + +S="${WORKDIR}" + +# xsl and checking as per: +# http://permalink.gmane.org/gmane.network.dns.unbound.user/1039 + +src_unpack() { + return +} + +src_prepare() { + return +} + +src_compile() { + xsltproc \ + -o root-anchors-${DATE_ISSUE1}.txt \ + "${FILESDIR}"/anchors2ds.xsl \ + "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml \ + || die 'xsl translation failed' +} + +src_test() { + # This is a terrible catch-22 of security, since we get the ICANN key from the + # same site! We verify the fingerprint ourselves in case + gpg --import "${DISTDIR}"/icann-${DATE_ISSUE2}.pgp || die 'ICANN key import failed' + gpg --fingerprint --with-colon --list-keys \ + | grep '^fpr:' | fgrep ":$ICANN_PGP_FINGERPRINT:" \ + || die "ICANN key fingerprint mismatch!" + #gpg --import \ + # "${FILESDIR}"/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc || die + gpg --verify \ + "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.asc \ + "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml || die "GPG verify failed" + openssl smime -verify \ + -content "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml \ + -in "${DISTDIR}"/root-anchors-${DATE_ISSUE3}.p7s -inform der \ + -CAfile "${DISTDIR}"/icannbundle-${DATE_ISSUE3}.pem || die "OpenSSL smime verify failed" +} + +src_install() { + insinto /etc/dnssec + newins root-anchors-${DATE_ISSUE1}.txt root-anchors.txt + newins "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml root-anchors.xml + # What actually uses the DER-format certificate request out of the box? + # Wouldn't icannbundle.pem or Kjqmt7v.crt (converted to PEM format) be more + # useful? + newins "${DISTDIR}"/Kjqmt7v-${DATE_ISSUE1}.csr Kjqmt7v.csr +} diff --git a/net-dns/dnssec-root/files/anchors2ds.xsl b/net-dns/dnssec-root/files/anchors2ds.xsl new file mode 100644 index 000000000000..3df47e20759d --- /dev/null +++ b/net-dns/dnssec-root/files/anchors2ds.xsl @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="text"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="/TrustAnchor"> + <xsl:apply-templates select="Zone"/> + <xsl:apply-templates select="KeyDigest"/> + <xsl:text> +</xsl:text> + </xsl:template> + + <xsl:template match="KeyDigest"> + <xsl:apply-templates select="KeyTag"/> + <xsl:apply-templates select="Algorithm"/> + <xsl:apply-templates select="DigestType"/> + <xsl:apply-templates select="Digest"/> + </xsl:template> + + <xsl:template match="Zone"> + <xsl:value-of select="text()"/><xsl:text> IN DS </xsl:text> + </xsl:template> + + <xsl:template match="*"> + <xsl:value-of select="text()"/><xsl:text> </xsl:text> + </xsl:template> + +</xsl:stylesheet>
\ No newline at end of file diff --git a/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc b/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc new file mode 100644 index 000000000000..0653a2bb0cf8 --- /dev/null +++ b/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc @@ -0,0 +1,70 @@ +Downloaded from http://pgp.mit.edu:11371/pks/lookup?search=dnssec%40iana.org&op=index + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: SKS 1.1.0 + +mQGiBEdQucgRBACuD4uIRQ9Or2yKfGZtqxSd7/yp20VoZaNafP85OlJfOs9yjgdNv8kSd3+2 +lBXGwJxgOzkssbgZ14O1U3au494WicvR0gF7cLRZBeqpdZetpm7gl5n2/WGRyKifoGCMZqFk +sFrR7BZerkOSUIqrMhtJMwKUxe5sks0WSgwifRchOwCgoezH1Uo9pdbpsW+8EIDe22HRX4sD +/ivbf1kX6QPE7VbMYQppM/jF7mRtZO9oXzMhg9hjycK8Ir04FfqpvPCfA1TNG/l8j/dbQaJP +bHHyI9PQIeikuVAQDuY+acT34GkZQxBcqAyMeRqW17LlZwl1l7u5sDiWwJIR3TzjXhpSjd0q +1HPTwcGDyHulCHFyuCVw7323qB3iBACLezRPBN4Nrz29AcQu0NQAlMwcr/HLq2QfMevCpDpF +pM3WuiSV+NtpDt9C/OmxWaYiFFYDEOy8HLuEuVNaMb9Xi5D8QmtWwgAMW54gBuExByt2NwJz +7kxFf6ve4wdH6/Uzgn8FdJIDaMjZYuY3au4XkkL8nKKI7nFxiu1xAnwy3bQgRE5TU0VDIE1h +bmFnZXIgPGRuc3NlY0BpYW5hLm9yZz6IRgQQEQIABgUCR2lOYwAKCRDDn1I07Bb/s8jPAJ9G +L7P+9noZ3ZssEp6Ak6+F5kxaaACdELBwHA9gyzbdopWM6aQWuCpm1vGIRgQQEQIABgUCR2rL +VQAKCRAEgcOX5y1fMJThAJ9AudOvaZ8socdOVS6WD3udbl7KGwCg6s0bH8eFJZk0JZjcj7w0 +yJ2u59eIRgQQEQIABgUCR9kwrAAKCRC039xrdgkih/h1AJ9PhfT+vlasg1Bg8RiG7QufWYuI +VQCgwmRRlbblIyWUMopceIuoc5BQtFeIRgQQEQIABgUCSQwilAAKCRDcB4+iybQoSPw2AJ4/ +p9ZbZ0NckpUTUD+kKDwRrOlOIgCfYb9ZgHgntqn2dfNsg9j4WUgBd6GIRgQQEQIABgUCTHt1 +6QAKCRBvVseiT09y3VANAKCCEsh3Aqb76bLM1taqf5E0eikbVgCfQVMCgg5bbSWXK3QDy67x +hUltejOIRgQQEQIABgUCTRB61QAKCRDTb+kxkMzVxf6XAKCl5Z1NhOUWl0mCKwauwSaip24f +xQCbBPzeQXzkkgO/CLh0+kVncyeolsCIYAQTEQIAIAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4B +AheABQJOFzMgAAoJENGvvOAPbJHSEc8AnR2zvLg6Vq2X2GnU/pRMMxo1Z6gcAJ47rxPrKlC2 +5gchV6ON+1pxxVqvSohmBBMRAgAmAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AFAkdQvM0F +CQJRRfkACgkQ0a+84A9skdJ3VACfehjhB59K5sFj8Td3jK70CrBqitgAn32RtmDQY1XDBB/7 +0JqJqN8jQ6lEiGYEExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUCSa5MhwUJBh/5 +qQAKCRDRr7zgD2yR0u6cAJwLJY/HHnInhWEs8gthvEFb5HjhMQCfcDlaXb7zq44k08l7F69v +12N69YOIZgQTEQIAJgIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheABQJLDbx/BQkHf2muAAoJ +ENGvvOAPbJHSXQ4AniPWf4jcO1BkPy3IODEMLjsRiTROAJ4wjB9pYcOYETm56q7UT82maCvk +SIkBnAQTAQIABgUCThZ/jAAKCRDnlgTn1butoxbtC/wJltFxMtCH2Wm+SJrpZfhZKLB+0Zrg +PRiNRHu7Z75lukX0ozpA7qd7N/M31P6cSdnQkWKjvznUc2XPb3Xb+DX4dapKm//9h7fwq3Rm +h5FmAaorqbWVW3RqK4aO3E6pTdnw0wo/m4/oa2UGoM21g3Is2Kwl+/EeMP8pcqtznEJSEarR +XUW1vdMFSQ/ZRkNshq5NnS5Auhf8uDGyntua+7kpE5fE0pRqOZzGGf2dhOesq6JcrsxD5U6i +6rgkM6ZLVflvi9+z4iY78kapuE/dTag8vIlCPPxdcoBsX4aL0Pl++9948kFz5wB9ZFrK2JMj +hTqRcayDwVKsbRXmh5sJOm07IRRS4QHVEUOM4USBVyi1aFL7CQ2Wx2BDIUzBD8vsMvt8eTwX +R0HFZM//BM7eOF6HanPBlabQMVbqWg/psBx1LSUo+SbXROd2xlwWMQup+oBhaEtbXoSm9rNG +Rz4/484U/wlT2PUFfG1M5vdkNdd+EzJ7tf/W/2YTNB6Ni5wN5M2JAhwEEAECAAYFAkw/NtIA +CgkQUu5GRRsT94z9Og//dPvrI5ykvC6eSj07aAe+QMPapg0UEZpkol34rcS6cdSS1tPQXp36 +tHDmGG0kGZ80l0RTl/wF2iqJpOhunfeT32AUzjo6pnhPIJx4yXurboJ+yGOXb3mSmElhPk5p +LDWBl4BGvBWJw7H5nFznIl1U6fCy4Aye4hedeyxuKnHY1gW/p6mMnpjg6aiNGpiRRQvGLmSU +B2RxPvrP9qTTYc15Q0VFeePi3C+5fnPr6WO08sh9h3GVeU+UgIj2dbslUHY+qA/yk5Dcgl71 +wrUKqIBvSQAG5GrkTWdQe8NkN8WYrrzSQnePUtDD/bsQ/YOyFvbEAUNRRMrKcvnEMdA3kQva ++ekq1l3emjqYov3vLuGOdXKA9N0Bwzw083wNDmb8WXwhlyZ6swJ7qbSBHC8UyZLU3MHg9Q7m +x1HxPQ/6Zz+zMoPv9N0Sh1fdwZNR4vwISKpI6c5REs/ZSbJucAZqHiVYW/VU5I3051KTUFCF +u9E99WqkBS1ECt/XN+tYVGVtj8I3SHbhpjgkrKWNIs3QQZ1vrerKfkn3V0PiyqSi4zWX6xo/ +RAlYnSjWMfjMgO4Xznd6AhDL5B4oxH7VIfju/EExbXm3rswZaf/6Dyebt1qdJImAWXCSD/Na +X6gYZA7/dOWcef0yOegitn85EjqDbJphLd/tQE2Ame73IoPBCTC1rAKJAhwEEAECAAYFAkx7 +c7EACgkQqSHyOYuTc5ICDw//Tm8X1gD3vjjukpJXX2JH+k41abPYPK/DWrfSzmIj8v1hF4Fb +TJoGedk8thAavv3dm/9N1gPlN/HaQtHHe3886b6LgfG9el5eU3HJdt/9SEfi6QiWDxNioiB/ +HYCN6QavUcAkjK9YklptTZ5bNGjGjQFG0/hJQAYcIqATQXlBsxVqaj87Kjspzs5e/0uQOs/v +dB6iFt2TCo7lmU1/WOOul9FeEfUD7GIugq4DlRmsCqnbq8BgdITRuq25gsNQtocwM+K5YJsm +uXOr3hvILjs3yIuQUg+womZt2e1HSRgIVT2NCbmHhtt97NaYGzPzGmlkuVEuhK09iLLe9umD +LSz9QG+F/QuP4w46kHc32NEt3UALDoafK5WJsTx6p5Z8tDoiFs44YNR1ZpE1NV5nU9Bnl5Gc +7NJD6PJxu+jBWEor0jxCvUAwX1TI3Pd50H2vWuAiYXl5SNxogz/Kv1Kx/Nb/jGupaT4B5O2N +ysokvd+44zC6gMIbCF69t3cTq5aju6dCw962ZNd+yCEwMwJT1rnwL1len0VIy6aI0E2LSfRf +lLq3GH4QncuU6u58zsw/gOyMbsBXKT4j0SEfCDhOm10Lj8jl4fqbT/Yej3nG3T/56135/Son +wV5eQEc4U7MTKsSyP3Li2ANf0O+/GhxpCQQXm9ej/4TwAA6LVrW844WiT3C5Ag0ER1C5yBAI +AO+lHy/JBdvBMwvF6Xn/75CxeV0ehjJ2XAoGm9w3+h8mEmmpb7CCpHHSjmomz29YLdP5P17F +rl4ThSEXJ6yWCYbPMA0j3BIhkhb8C56Vwb9SsZUpDSCw60uBw71CkK2DwSht6tCBt8/bNs8q +QFPwnalKNt6KgU8cNAR5F5RxKKPATUw9icrqmeQKysHUhrneRqM3LO/HpnW1DDKvBk6eEwix +I4XzGsqcThz3QfBOkCqPSUBBeb42wNjbPpelnAS08KBrVeYgn7xg+WQpdj/Dt+iFqOo/Vi8w +1FpR5RHy//XF0DPnjEGa/f3Xaz9oaJ5k9XZiYMULf8CoHjtscp86Q0sAAwUIAKO4bNu7OJqP +5NGwc9pm7IvmkYCeY6cltXzmcciw/LIU9etb+RBQQG6PpoeZNBNAu172L64wPkMsVRJGVUyk +T35yXVASuBD1V0oOD4n0uVdqS+bij/DKQNVYqVAcwrPtkkrLeJQ8ZcmZhH/mbcmATWuziCnI +4MROcYL9NLZ1iIT0PX8TvWEgyi9Jn6DVjXQ1UzIIv4oq6kBdsG3Rjd0yadugGKc/pSdYUu0S +jeCCGDoY8hX67c5Y1jwaJ0+ntThC+kv2ImCSHx9OT5jMwN+JyXCe4MZJd+y5/VDhgd3hTowT +QtqHQRYK4oTb0LsDLBs5xoE/zuF8AgzabO+JcTQZPOqISQQYEQIACQUCR1C5yAIbDAAKCRDR +r7zgD2yR0q76AJsHHW4ywmyeZxKsei6V3bvt1OUQugCfStqiEgjFAA6psDMMinAV4VCh3D4= +=0v7K +-----END PGP PUBLIC KEY BLOCK----- diff --git a/net-dns/dnssec-root/metadata.xml b/net-dns/dnssec-root/metadata.xml new file mode 100644 index 000000000000..c66840b2cde9 --- /dev/null +++ b/net-dns/dnssec-root/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> +</maintainer> +<longdescription>This package distributes the ICANN DNSSEC root key</longdescription> +</pkgmetadata> diff --git a/net-dns/dnssec-system-tray/Manifest b/net-dns/dnssec-system-tray/Manifest new file mode 100644 index 000000000000..21614f728ad1 --- /dev/null +++ b/net-dns/dnssec-system-tray/Manifest @@ -0,0 +1,4 @@ +DIST dnssec-system-tray-1.13.tar.gz 15101 SHA256 8f1c88cb7f52d04e1e2df44f5d4aa15143c16bc7f3ee5c2a3d7df7b557ae39d6 SHA512 addad2f1ef9f164b69685f05716ad434d085ca80861b002a4b29aadca60672dba2f3c5235bc177df90859ae27370d237c6c6bb7c78a85e84e6b371cc9f537a6c WHIRLPOOL fc65563f476e8238e48d2fd4200f73584d923bc76fc8ab5158443aa805cfacebea8e2030d8b380173926ec9a6d58ab06a14344c8c8995734decd03cd4f904256 +DIST dnssec-system-tray-1.14.tar.gz 15103 SHA256 9d8b4c10be6ad729d82e6cc16a81de4b4b8cb624822b9db387805497745ee4bb SHA512 b35b23872185b3cf70ee50cf3bd87598e39b655f6025e3861e763d5ab8ca4987930bfb3c956f30a6ab2356c928846f393f6d107e4c53d62701f6752efbfc7211 WHIRLPOOL 65fff55e13c2362a6797ac5c6d6375bbfc2851d03887b4f62052d32a5c12968b29e024503ff07774e7e539acd818108aba13766371d44efafb261b7b6f86aa64 +DIST dnssec-system-tray-2.0.tar.gz 15138 SHA256 92ff455901e72a35e81656c02814abd47e8641f17d1b47a3593794b75ca42c85 SHA512 34a25a1a8483c4bed23be0abaeb15d0882dfef6a0652750836c68f916409a066981df51875c9336deaeb6081adcae1590f7569ab9f62cc25d550f3f81932a19b WHIRLPOOL 854895db847e9ba07a6761108a3e090813c3803c74a6814a8abe8f6cbe76ab974e488a1a245e68cb60654800440388ebb6d777b4881933249f20b8a7fd0a7efe +DIST dnssec-system-tray-2.1.tar.gz 15397 SHA256 331bf4c4c347f269aa768b98a7a744b9fbbc6d34031de5244abd687c3c959ac8 SHA512 bd4a17e8eed65a6d96dc4c19c316746da6da698d1d48a412aad70a8c2db5bebb2bcefc1d3f1b6e39d6c9b275936cc218add75e07acaa87fbd53df35013ea5e60 WHIRLPOOL a0502ece82ac3400c327761d4cecf6889aafd1a783caf841c2a2e9d8944b28a7e8a78726a1d7cb9e676318b419119bd5942fe29ef8471dd7cf8d12a6f4b2a7c3 diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-1.13.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-1.13.ebuild new file mode 100644 index 000000000000..797af0f37172 --- /dev/null +++ b/net-dns/dnssec-system-tray/dnssec-system-tray-1.13.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="display DNSSEC resolver logs in system tray" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-qt/qtgui:4" +DEPEND="${RDEPEND}" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} + +src_install() { + qt4-r2_src_install + + newicon images/justlock.png ${PN}.png + make_desktop_entry ${PN} + + doman man/${PN}.1 +} diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-1.14.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-1.14.ebuild new file mode 100644 index 000000000000..797af0f37172 --- /dev/null +++ b/net-dns/dnssec-system-tray/dnssec-system-tray-1.14.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="display DNSSEC resolver logs in system tray" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-qt/qtgui:4" +DEPEND="${RDEPEND}" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} + +src_install() { + qt4-r2_src_install + + newicon images/justlock.png ${PN}.png + make_desktop_entry ${PN} + + doman man/${PN}.1 +} diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-2.0.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-2.0.ebuild new file mode 100644 index 000000000000..3d6bb82a51d6 --- /dev/null +++ b/net-dns/dnssec-system-tray/dnssec-system-tray-2.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="display DNSSEC resolver logs in system tray" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-qt/qtgui:4 + dev-qt/qtsvg:4 + dev-qt/qtcore:4" +DEPEND="${RDEPEND}" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} + +src_install() { + qt4-r2_src_install + + newicon images/justlock.png ${PN}.png + make_desktop_entry ${PN} + + doman man/${PN}.1 +} diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild new file mode 100644 index 000000000000..3d6bb82a51d6 --- /dev/null +++ b/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="display DNSSEC resolver logs in system tray" +HOMEPAGE="http://www.dnssec-tools.org" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-qt/qtgui:4 + dev-qt/qtsvg:4 + dev-qt/qtcore:4" +DEPEND="${RDEPEND}" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} + +src_install() { + qt4-r2_src_install + + newicon images/justlock.png ${PN}.png + make_desktop_entry ${PN} + + doman man/${PN}.1 +} diff --git a/net-dns/dnssec-system-tray/metadata.xml b/net-dns/dnssec-system-tray/metadata.xml new file mode 100644 index 000000000000..59acc2cc580e --- /dev/null +++ b/net-dns/dnssec-system-tray/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +</pkgmetadata> + diff --git a/net-dns/dnssec-tools/Manifest b/net-dns/dnssec-tools/Manifest new file mode 100644 index 000000000000..f67a1de2308b --- /dev/null +++ b/net-dns/dnssec-tools/Manifest @@ -0,0 +1,4 @@ +DIST dnssec-tools-1.13.tar.gz 3299592 SHA256 ac2caba324f96170406c202724344315371c3ef83815236e95b48a6021b2be91 SHA512 ef9e5e2652d4673ba8f74bed8055fd108aa8e43bd3aab4e1527385ab189a63f9fa989bfa6c574252dad9e5997f72a29f4d12cca2a2d9ff950207046c08bece18 WHIRLPOOL 354e072584dab9458224ff0ca8f303d35026686688f8dcaf3a0d43a9c12e628430dd7877f776f2f8c1b8460c4f2eb7cc1061e10f304bd02538130bcd40d6b03b +DIST dnssec-tools-1.14.tar.gz 3337126 SHA256 10c387879cb1cc9e26c239a6dc99a4cba23e8b336c4231d0a9eb204369bbdbeb SHA512 398a59e30a88516881dd4252c735b5a8320e3bc30087cceb5cbc707ba0c7d7e82455047b4f38b655b993bfb738880b42c3c0df24fe23fe70feccc0c83e991bba WHIRLPOOL d490f153a949ec3637401ccf6cb93edc8479d5c7479295dea16b7a1326a0a56c3e485bfbdc7cbd89769bc825d2dc913ac48d31ead06f6c7be1b350e01775ff61 +DIST dnssec-tools-2.0.tar.gz 4271431 SHA256 7fd5d483c7a4b25277f17d9010b8de79a21948884368e6d870bec0194d007445 SHA512 48d05b9deb34b964cb5040c411ecf8347c129025bfd1d1f568ce9394c3580b87932ad71ee187736fbf2bd372bc44d0f26f2423a1a6f9c05419f6030aaecc4df5 WHIRLPOOL 47b795a785faf23ef1401e0f53294fbb5b706ba3ede14191bac9763eae9fbb9637c7a250a5c08256c415574620272de6adf66b916db9b5556d6847097dd946de +DIST dnssec-tools-2.1.tar.gz 4430320 SHA256 64eebfd1213714b530e501f22b5ff9786db9b982897c432fecba75740ddcda52 SHA512 61119837320bf9a7c2d64a593fc3ed6b84ee7683b7e4ba5de380b0fd1be70e44bf73825ea5395cc1d3ddc729eaef17823a230b44b68fbc5fca988f8fb080f66b WHIRLPOOL 9fb992b0b544c7abf10c78c72bccd5f3d4c8ba6c1c05d48348b9ff6a349f8026f84d35906d7887ba1b74136190c404d224e5e9efee98a05cc755c34c02468ec6 diff --git a/net-dns/dnssec-tools/dnssec-tools-1.13-r1.ebuild b/net-dns/dnssec-tools/dnssec-tools-1.13-r1.ebuild new file mode 100644 index 000000000000..b0c0d9c06ba0 --- /dev/null +++ b/net-dns/dnssec-tools/dnssec-tools-1.13-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="tools to ease the deployment of DNSSEC related technologies" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +RDEPEND="dev-lang/perl + dev-perl/Crypt-OpenSSL-Random + dev-perl/Getopt-GUI-Long + dev-perl/GraphViz + dev-perl/MailTools + dev-perl/Net-DNS + dev-perl/XML-Simple" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \ + -i Makefile.in || die + sed -e 's:/usr/local/etc:/etc:g' \ + -e 's:/usr/local:/usr:g' \ + -i tools/donuts/donuts \ + -i tools/etc/dnssec-tools/dnssec-tools.conf \ + -i tools/scripts/genkrf || die + epatch "${FILESDIR}"/${P}-dtinitconf.patch +} + +src_configure() { + econf \ + --disable-bind-checks \ + --without-validator \ + --with-perl-build-args=INSTALLDIRS=vendor \ + $(use_enable static-libs static) +} + +src_install() { + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/rollerd.initd rollerd + newconfd "${FILESDIR}"/rollerd.confd rollerd + + newinitd "${FILESDIR}"/donutsd.initd donutsd + newconfd "${FILESDIR}"/donutsd.confd donutsd + + prune_libtool_files +} + +pkg_postinst() { + einfo + elog "Please run 'dtinitconf' in order to set up the required" + elog "/etc/dnssec-tools/dnssec-tools.conf file" + einfo + elog "DNSSEC Validator has been split into net-dns/dnsval" + einfo +} diff --git a/net-dns/dnssec-tools/dnssec-tools-1.14.ebuild b/net-dns/dnssec-tools/dnssec-tools-1.14.ebuild new file mode 100644 index 000000000000..1d5ae25ea509 --- /dev/null +++ b/net-dns/dnssec-tools/dnssec-tools-1.14.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="tools to ease the deployment of DNSSEC related technologies" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +RDEPEND="dev-lang/perl + dev-perl/Crypt-OpenSSL-Random + dev-perl/Getopt-GUI-Long + dev-perl/GraphViz + dev-perl/MailTools + dev-perl/Net-DNS + dev-perl/XML-Simple" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \ + -i Makefile.in || die + sed -e 's:/usr/local/etc:/etc:g' \ + -e 's:/usr/local:/usr:g' \ + -i tools/donuts/donuts \ + -i tools/etc/dnssec-tools/dnssec-tools.conf \ + -i tools/scripts/genkrf || die + epatch "${FILESDIR}"/${PN}-1.13-dtinitconf.patch +} + +src_configure() { + econf \ + --disable-bind-checks \ + --without-validator \ + --with-perl-build-args=INSTALLDIRS=vendor \ + $(use_enable static-libs static) +} + +src_install() { + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/rollerd.initd rollerd + newconfd "${FILESDIR}"/rollerd.confd rollerd + + newinitd "${FILESDIR}"/donutsd.initd donutsd + newconfd "${FILESDIR}"/donutsd.confd donutsd + + prune_libtool_files +} + +pkg_postinst() { + einfo + elog "Please run 'dtinitconf' in order to set up the required" + elog "/etc/dnssec-tools/dnssec-tools.conf file" + einfo + elog "DNSSEC Validator has been split into net-dns/dnsval" + einfo +} diff --git a/net-dns/dnssec-tools/dnssec-tools-2.0-r1.ebuild b/net-dns/dnssec-tools/dnssec-tools-2.0-r1.ebuild new file mode 100644 index 000000000000..fa9700e5db7c --- /dev/null +++ b/net-dns/dnssec-tools/dnssec-tools-2.0-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 systemd + +DESCRIPTION="tools to ease the deployment of DNSSEC related technologies" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +RDEPEND="dev-lang/perl + dev-perl/Crypt-OpenSSL-Random + dev-perl/Getopt-GUI-Long + dev-perl/GraphViz + dev-perl/MailTools + dev-perl/Net-DNS + dev-perl/XML-Simple" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \ + -i Makefile.in || die + sed -e 's:/usr/local/etc:/etc:g' \ + -e 's:/usr/local:/usr:g' \ + -i tools/donuts/donuts \ + -i tools/etc/dnssec-tools/dnssec-tools.conf \ + -i tools/scripts/genkrf || die + epatch "${FILESDIR}"/${PN}-2.0-dtinitconf.patch +} + +src_configure() { + econf \ + --disable-bind-checks \ + --without-validator \ + --with-perl-build-args=INSTALLDIRS=vendor \ + $(use_enable static-libs static) +} + +src_install() { + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/rollerd.initd rollerd + newconfd "${FILESDIR}"/rollerd.confd rollerd + systemd_dounit "${FILESDIR}"/rollerd.service + + newinitd "${FILESDIR}"/donutsd.initd donutsd + newconfd "${FILESDIR}"/donutsd.confd donutsd + systemd_dounit "${FILESDIR}"/donutsd.service + + prune_libtool_files +} + +pkg_postinst() { + einfo + elog "Please run 'dtinitconf' in order to set up the required" + elog "/etc/dnssec-tools/dnssec-tools.conf file" + einfo + elog "DNSSEC Validator has been split into net-dns/dnsval" + einfo +} diff --git a/net-dns/dnssec-tools/dnssec-tools-2.0.ebuild b/net-dns/dnssec-tools/dnssec-tools-2.0.ebuild new file mode 100644 index 000000000000..069e0c952293 --- /dev/null +++ b/net-dns/dnssec-tools/dnssec-tools-2.0.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 + +DESCRIPTION="tools to ease the deployment of DNSSEC related technologies" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +RDEPEND="dev-lang/perl + dev-perl/Crypt-OpenSSL-Random + dev-perl/Getopt-GUI-Long + dev-perl/GraphViz + dev-perl/MailTools + dev-perl/Net-DNS + dev-perl/XML-Simple" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \ + -i Makefile.in || die + sed -e 's:/usr/local/etc:/etc:g' \ + -e 's:/usr/local:/usr:g' \ + -i tools/donuts/donuts \ + -i tools/etc/dnssec-tools/dnssec-tools.conf \ + -i tools/scripts/genkrf || die + epatch "${FILESDIR}"/${PN}-2.0-dtinitconf.patch +} + +src_configure() { + econf \ + --disable-bind-checks \ + --without-validator \ + --with-perl-build-args=INSTALLDIRS=vendor \ + $(use_enable static-libs static) +} + +src_install() { + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/rollerd.initd rollerd + newconfd "${FILESDIR}"/rollerd.confd rollerd + + newinitd "${FILESDIR}"/donutsd.initd donutsd + newconfd "${FILESDIR}"/donutsd.confd donutsd + + prune_libtool_files +} + +pkg_postinst() { + einfo + elog "Please run 'dtinitconf' in order to set up the required" + elog "/etc/dnssec-tools/dnssec-tools.conf file" + einfo + elog "DNSSEC Validator has been split into net-dns/dnsval" + einfo +} diff --git a/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild b/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild new file mode 100644 index 000000000000..38a082ad2dfd --- /dev/null +++ b/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils qt4-r2 systemd readme.gentoo + +DESCRIPTION="tools to ease the deployment of DNSSEC related technologies" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +RDEPEND="dev-lang/perl + dev-perl/Crypt-OpenSSL-Random + dev-perl/Getopt-GUI-Long + dev-perl/GraphViz + dev-perl/MailTools + dev-perl/Net-DNS + dev-perl/XML-Simple" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \ + -i Makefile.in || die + sed -e 's:/usr/local/etc:/etc:g' \ + -e 's:/usr/local:/usr:g' \ + -i tools/donuts/donuts \ + -i tools/etc/dnssec-tools/dnssec-tools.conf \ + -i tools/scripts/genkrf || die + epatch "${FILESDIR}"/${PN}-2.0-dtinitconf.patch +} + +src_configure() { + econf \ + --disable-bind-checks \ + --without-validator \ + --with-perl-build-args=INSTALLDIRS=vendor \ + $(use_enable static-libs static) +} + +src_install() { + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/rollerd.initd rollerd + newconfd "${FILESDIR}"/rollerd.confd rollerd + systemd_dounit "${FILESDIR}"/rollerd.service + + newinitd "${FILESDIR}"/donutsd.initd donutsd + newconfd "${FILESDIR}"/donutsd.confd donutsd + systemd_dounit "${FILESDIR}"/donutsd.service + + prune_libtool_files + readme.gentoo_create_doc +} + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS="Please run 'dtinitconf' in order to set up the required +/etc/dnssec-tools/dnssec-tools.conf file + +DNSSEC Validator has been split into net-dns/dnssec-validator +" diff --git a/net-dns/dnssec-tools/files/dnssec-tools-1.13-dtinitconf.patch b/net-dns/dnssec-tools/files/dnssec-tools-1.13-dtinitconf.patch new file mode 100644 index 000000000000..9432771406c6 --- /dev/null +++ b/net-dns/dnssec-tools/files/dnssec-tools-1.13-dtinitconf.patch @@ -0,0 +1,23 @@ +--- dnssec-tools-1.13/tools/scripts/dtinitconf ++++ dnssec-tools-1.13/tools/scripts/dtinitconf +@@ -59,7 +59,9 @@ + my @COMMON_BINDLOCS = + ( + "/usr/local/sbin", ++ "/usr/local/bin", + "/usr/sbin", ++ "/usr/bin", + ); + + # +@@ -421,8 +423,8 @@ + + $admin = $opts{'admin'} || dnssec_tools_default("admin"); + +- $binddir = $opts{'binddir'}; +- $dtdir = $opts{'dtdir'}; ++ $binddir = $opts{'binddir'} || 'path'; ++ $dtdir = $opts{'dtdir'} || 'path'; + # $viewimg = $opts{'viewimage'} || dnssec_tools_default("viewimage"); + + $outfile = $opts{'outfile'} || getconffile(); diff --git a/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch b/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch new file mode 100644 index 000000000000..ee6adf7031d1 --- /dev/null +++ b/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch @@ -0,0 +1,24 @@ +--- dnssec-tools-2.0/tools/scripts/dtinitconf ++++ dnssec-tools-2.0/tools/scripts/dtinitconf +@@ -58,8 +58,8 @@ + # + my @COMMON_BINDLOCS = + ( +- "/usr/local/sbin", +- "/usr/sbin", ++ "/usr/local/bin", ++ "/usr/bin", + ); + + # +@@ -424,8 +424,8 @@ + $admin = $opts{'admin'} || dnssec_tools_default("admin"); + $zoneparser = $opts{'zoneparser'} || dnssec_tools_default("zoneparser"); + +- $binddir = $opts{'binddir'}; +- $dtdir = $opts{'dtdir'}; ++ $binddir = $opts{'binddir'} || 'path'; ++ $dtdir = $opts{'dtdir'} || 'path'; + + $outfile = $opts{'outfile'} || getconffile(); + $overwrite = $opts{'overwrite'}; diff --git a/net-dns/dnssec-tools/files/donutsd.confd b/net-dns/dnssec-tools/files/donutsd.confd new file mode 100644 index 000000000000..a147ba2ecad6 --- /dev/null +++ b/net-dns/dnssec-tools/files/donutsd.confd @@ -0,0 +1,9 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DONUTSD_CMD="donutsd" +DONUTSD_CONFPATH="/etc/dnssec-tools/donutsd.db" +DONUTSD_PID="/var/run/donutsd.pid" +DONUTSD_OPTS="" + diff --git a/net-dns/dnssec-tools/files/donutsd.initd b/net-dns/dnssec-tools/files/donutsd.initd new file mode 100644 index 000000000000..4dd65dbcfd1d --- /dev/null +++ b/net-dns/dnssec-tools/files/donutsd.initd @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need mta +} + +start() { + ebegin "Starting the DNSSEC monitoring daemon" + start-stop-daemon --start --pidfile ${DONUTSD_PIDFILE} --make-pidfile --background --exec ${DONUTSD_CMD} -- -i ${DONUTSD_CONFPATH} ${DONUTSD_OPTS} + eend $? "failed to start donutsd" +} + +stop() { + ebegin "Stopping donutsd" + start-stop-daemon --stop --pidfile ${DONUTSD_PIDFILE} + eend $? "Failed to stop donutsd" +} diff --git a/net-dns/dnssec-tools/files/donutsd.service b/net-dns/dnssec-tools/files/donutsd.service new file mode 100644 index 000000000000..b7ddbb8c0f03 --- /dev/null +++ b/net-dns/dnssec-tools/files/donutsd.service @@ -0,0 +1,8 @@ +[Unit] +Description=DNSSEC monitoring daemon + +[Service] +ExecStart=/usr/bin/donutsd -i /etc/dnssec-tools/donutsd.db + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/dnssec-tools/files/rollerd.confd b/net-dns/dnssec-tools/files/rollerd.confd new file mode 100644 index 000000000000..287c47ed2a27 --- /dev/null +++ b/net-dns/dnssec-tools/files/rollerd.confd @@ -0,0 +1,9 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +ROLLERD_CMD="rollerd" +ROLLERD_RRFILE="/etc/dnssec-tools/dnssec-tools.rollrec" +ROLLERD_KRFDIR="/var/bind/pri" +ROLLERD_OPTS="" + diff --git a/net-dns/dnssec-tools/files/rollerd.initd b/net-dns/dnssec-tools/files/rollerd.initd new file mode 100644 index 000000000000..59f28ea0aff7 --- /dev/null +++ b/net-dns/dnssec-tools/files/rollerd.initd @@ -0,0 +1,17 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +start() { + ebegin "Starting DNSSEC control daemon" + "${ROLLERD_CMD}" --rrfile "${ROLLERD_RRFILE}" \ + -directory "${ROLLERD_KRFDIR}" ${ROLLERD_OPTS} + eend $? "failed to start rollerd" +} + +stop() { + ebegin "stoping rollerd" + /usr/bin/rollctl -halt + eend $? "failed to stop rollerd" +} diff --git a/net-dns/dnssec-tools/files/rollerd.service b/net-dns/dnssec-tools/files/rollerd.service new file mode 100644 index 000000000000..2e4aef87b569 --- /dev/null +++ b/net-dns/dnssec-tools/files/rollerd.service @@ -0,0 +1,8 @@ +[Unit] +Description=DNSSEC control daemon + +[Service] +ExecStart=/usr/bin/rollerd -foreground --rrfile /etc/dnssec-tools/dnssec-tools.rollrec -directory /var/bind/pri + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/dnssec-tools/metadata.xml b/net-dns/dnssec-tools/metadata.xml new file mode 100644 index 000000000000..59acc2cc580e --- /dev/null +++ b/net-dns/dnssec-tools/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +</pkgmetadata> + diff --git a/net-dns/dnssec-validator/Manifest b/net-dns/dnssec-validator/Manifest new file mode 100644 index 000000000000..2c009758e982 --- /dev/null +++ b/net-dns/dnssec-validator/Manifest @@ -0,0 +1,4 @@ +DIST dnsval-1.13.tar.gz 986029 SHA256 84477a5bb92f4ab5d0ef45d301d1eb908561f24fa5f047196b3067a3880fd698 SHA512 a4e01d19b60793a9757c9fc016d5031b89010d10d0bd82f7bb0acf53446a6baeb44c2ac7de2901db07e29bb26d3c60f0e5e53c121283916acb4c2b6ee33eeb9d WHIRLPOOL 8a652163effcd885f2270dc7b9af61c4324f7c6b3139736d7ce3469d9c7bb373761fe3b0f1bc7fb7cf047fa48e1ac7c69fdec9f0b53f2c6c27cc742667f9df78 +DIST dnsval-1.14.tar.gz 1008882 SHA256 786b86e0ac170dfa2dcb7785566c73a9ba068ea97cd870c9d74fe574d6b2252e SHA512 b722832b38bfad487c942c66847314091ee6b333e1cd2c6a4e6a8b7bf6777de20b1871bb8dcfd449f7183e0e8868585a984e2d11153d5bdc10cd9f5c30679b6f WHIRLPOOL 85eeec1b17882d94eb897c1631940147f0cebb2f6ef85cd48f6244f6cc0560951a604f7d12ce8fae0de0c981637925575e5ee5cfa66cc8ead4b503488347d67f +DIST dnsval-2.0.tar.gz 1022829 SHA256 45835b0391548e4a4f1bf33db4be25fb0f8820f2fc64fca7e63b14822e0bfe48 SHA512 e0162b79206d8957e0f387ee9d2661378f0274d16bcd88ebe9dc6700e0498b89d33ae1ec9d90db0d62b6bb7f86922aecb42e561b0b86d519bc1f8fe920879b50 WHIRLPOOL 4c83305e91a4fc6811d666fbddff89dc290ff19292923b72079d4856bc78ff97ecfd3de01457f8e58dd2a97ddc67696882719309bea8b5a8e3a341224007e619 +DIST dnsval-2.1.tar.gz 1059451 SHA256 f438e34f52e8e0a02c854bcaff4eb9d1018d203a13fd1094594b015a0da73e50 SHA512 14de6fa86ff30aabcd77d14cbd3e058507f5963f91deadc39dc1a7022f27239010d509f46d392dc7086b6444e068ce66e576f579342ca87a04d7fc776962cd6d WHIRLPOOL 7b1faead29775df288c45006fb170af4f63de45cae58a216f9521ae8ba45eae2fe275646f308b6b6eab7c87bd06e7087cd198cf48bd10b6f6f86ae35b1df4476 diff --git a/net-dns/dnssec-validator/dnssec-validator-1.13.ebuild b/net-dns/dnssec-validator/dnssec-validator-1.13.ebuild new file mode 100644 index 000000000000..595c4d454dbe --- /dev/null +++ b/net-dns/dnssec-validator/dnssec-validator-1.13.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="DNSSEC validator (dnsval)" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipv6 static-libs +threads" + +RDEPEND="dev-libs/openssl + !<net-dns/dnssec-tools-1.13" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/dnsval-${PV} + +src_prepare() { + epatch "${FILESDIR}"/${P}-respect-LDFLAGS.patch +} + +src_configure() { + econf \ + --with-nsec3 \ + --with-dlv \ + $(use_with ipv6) \ + $(use_with threads) +} + +src_install() { + dodir /usr/bin /usr/include/validator + default + + insinto /etc/dnssec-tools + doins etc/{dnsval.conf,root.hints} + elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf" + dosym ../resolv.conf /etc/dnssec-tools/resolv.conf + + use static-libs || find "${D}" -name "*.a" -delete + prune_libtool_files +} diff --git a/net-dns/dnssec-validator/dnssec-validator-1.14.ebuild b/net-dns/dnssec-validator/dnssec-validator-1.14.ebuild new file mode 100644 index 000000000000..e410963650a8 --- /dev/null +++ b/net-dns/dnssec-validator/dnssec-validator-1.14.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="DNSSEC validator (dnsval)" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipv6 static-libs +threads" + +RDEPEND="dev-libs/openssl + !<net-dns/dnssec-tools-1.13" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/dnsval-${PV} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.13-respect-LDFLAGS.patch +} + +src_configure() { + econf \ + --with-nsec3 \ + --with-dlv \ + $(use_with ipv6) \ + $(use_with threads) +} + +src_install() { + dodir /usr/bin /usr/include/validator + default + + insinto /etc/dnssec-tools + doins etc/{dnsval.conf,root.hints} + elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf" + dosym ../resolv.conf /etc/dnssec-tools/resolv.conf + + use static-libs || find "${D}" -name "*.a" -delete + prune_libtool_files +} diff --git a/net-dns/dnssec-validator/dnssec-validator-2.0.ebuild b/net-dns/dnssec-validator/dnssec-validator-2.0.ebuild new file mode 100644 index 000000000000..e410963650a8 --- /dev/null +++ b/net-dns/dnssec-validator/dnssec-validator-2.0.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="DNSSEC validator (dnsval)" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipv6 static-libs +threads" + +RDEPEND="dev-libs/openssl + !<net-dns/dnssec-tools-1.13" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/dnsval-${PV} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.13-respect-LDFLAGS.patch +} + +src_configure() { + econf \ + --with-nsec3 \ + --with-dlv \ + $(use_with ipv6) \ + $(use_with threads) +} + +src_install() { + dodir /usr/bin /usr/include/validator + default + + insinto /etc/dnssec-tools + doins etc/{dnsval.conf,root.hints} + elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf" + dosym ../resolv.conf /etc/dnssec-tools/resolv.conf + + use static-libs || find "${D}" -name "*.a" -delete + prune_libtool_files +} diff --git a/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild b/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild new file mode 100644 index 000000000000..9d575f367784 --- /dev/null +++ b/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="DNSSEC validator (dnsval)" +HOMEPAGE="http://www.dnssec-tools.org/" +SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipv6 static-libs +threads" + +RDEPEND="dev-libs/openssl + !<net-dns/dnssec-tools-1.13" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/dnsval-${PV} + +src_prepare() { + epatch "${FILESDIR}"/${P}-respect-LDFLAGS.patch +} + +src_configure() { + econf \ + --with-nsec3 \ + --with-dlv \ + $(use_with ipv6) \ + $(use_with threads) +} + +src_install() { + dodir /usr/bin /usr/include/validator + default + + insinto /etc/dnssec-tools + doins etc/{dnsval.conf,root.hints} + elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf" + dosym ../resolv.conf /etc/dnssec-tools/resolv.conf + + use static-libs || find "${D}" -name "*.a" -delete + prune_libtool_files +} diff --git a/net-dns/dnssec-validator/files/dnssec-validator-1.13-respect-LDFLAGS.patch b/net-dns/dnssec-validator/files/dnssec-validator-1.13-respect-LDFLAGS.patch new file mode 100644 index 000000000000..00492dd48836 --- /dev/null +++ b/net-dns/dnssec-validator/files/dnssec-validator-1.13-respect-LDFLAGS.patch @@ -0,0 +1,22 @@ +--- dnsval-1.13/libsres/Makefile.in ++++ dnsval-1.13/libsres/Makefile.in +@@ -63,7 +63,7 @@ + $(RM) -rf $(LT_DIR) + + $(LIBRES): $(LOBJ) +- $(LIBTOOLLD) -o $@ $(LOBJ) ++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LDFLAGS) -lssl + + install: + $(MKPATH) $(DESTDIR)$(libdir) +--- dnsval-1.13/libval/Makefile.in ++++ dnsval-1.13/libval/Makefile.in +@@ -60,7 +60,7 @@ + $(RM) -rf $(LT_DIR) + + $(LIBVAL): $(LOBJ) +- $(LIBTOOLLD) -o $@ $(LOBJ) ++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LDFLAGS) -lssl -lpthread + + install: + $(MKPATH) $(DESTDIR)$(libdir) diff --git a/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch b/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch new file mode 100644 index 000000000000..05660275de96 --- /dev/null +++ b/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch @@ -0,0 +1,22 @@ +--- dnsval-2.1/libsres/Makefile.in ++++ dnsval-2.1/libsres/Makefile.in +@@ -63,7 +63,7 @@ + $(RM) -rf $(LT_DIR) + + $(LIBRES): $(LOBJ) +- $(LIBTOOLLD) -o $@ $(LOBJ) ++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LDFLAGS) -lssl + + install: + $(MKPATH) $(DESTDIR)$(libdir) +--- dnsval-2.1/libval/Makefile.in ++++ dnsval-2.1/libval/Makefile.in +@@ -65,7 +65,7 @@ + $(RM) -rf $(LT_DIR) + + $(LIBVAL): $(LOBJ) +- $(LIBTOOLLD) -o $@ $(LOBJ) $(LSRES) ++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LSRES) $(LDFLAGS) -lssl -lpthread + + install: + $(MKPATH) $(DESTDIR)$(libdir) diff --git a/net-dns/dnssec-validator/metadata.xml b/net-dns/dnssec-validator/metadata.xml new file mode 100644 index 000000000000..59acc2cc580e --- /dev/null +++ b/net-dns/dnssec-validator/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +</pkgmetadata> + diff --git a/net-dns/dnstop/Manifest b/net-dns/dnstop/Manifest new file mode 100644 index 000000000000..1fe503fee804 --- /dev/null +++ b/net-dns/dnstop/Manifest @@ -0,0 +1,2 @@ +DIST dnstop-20121017.tar.gz 74559 SHA256 6aed2d6037ab94244c4b802a412f902034be3448431b2118cd0e6afe1bf959f6 SHA512 efe0abdd87d14aa8bdc74dad4a5a4d613110e0a78ee7034ecf6d4a7e2037f1895c776761d70127c021ba207dffbc7e1cb551ec55f62b54f93babcd38f21cd44a WHIRLPOOL 30539e7bc5967bc4a67743d4c8b610776e119bd33208d2925f9615926dae5f4233269d35732404e0e1f4078c4b16fe88bcb89fa3bdb7486ce7287608f526b69d +DIST dnstop-20140915.tar.gz 77917 SHA256 b4b03d02005b16e98d923fa79957ea947e3aa6638bb267403102d12290d0c57a SHA512 902cf96f7366983cae4bf684e44fbe12f6e982cee8ff489329e25e1a13de60870d356906a99fee56c6da2258c4a39074a504389549c6c2e239a4ea94d8b9a65d WHIRLPOOL dbdb56039bf9eaa3463edd77f01fc5a500cd3b5d68337491791c63b1e212c0a8eaebcf9cea8d7cbf918f98fbbf92e14c7e1a665715a915f68e84b1b77e48c616 diff --git a/net-dns/dnstop/dnstop-20121017.ebuild b/net-dns/dnstop/dnstop-20121017.ebuild new file mode 100644 index 000000000000..0f1d2d1acd12 --- /dev/null +++ b/net-dns/dnstop/dnstop-20121017.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="Displays various tables of DNS traffic on your network" +HOMEPAGE="http://dnstop.measurement-factory.com/" +SRC_URI="http://dnstop.measurement-factory.com/src/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm ~hppa ~ppc x86" +IUSE="ipv6" + +RDEPEND="sys-libs/ncurses + net-libs/libpcap[ipv6?]" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch_user +} + +src_configure() { + econf \ + $(use_enable ipv6) +} + +src_install() { + dobin dnstop + doman dnstop.8 + dodoc CHANGES +} diff --git a/net-dns/dnstop/dnstop-20140915.ebuild b/net-dns/dnstop/dnstop-20140915.ebuild new file mode 100644 index 000000000000..9bea45bcb38e --- /dev/null +++ b/net-dns/dnstop/dnstop-20140915.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="Displays various tables of DNS traffic on your network" +HOMEPAGE="http://dnstop.measurement-factory.com/" +SRC_URI="http://dnstop.measurement-factory.com/src/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86" +IUSE="ipv6" + +RDEPEND="sys-libs/ncurses + net-libs/libpcap[ipv6?]" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch_user +} + +src_configure() { + econf \ + $(use_enable ipv6) +} + +src_install() { + dobin dnstop + doman dnstop.8 + dodoc CHANGES +} diff --git a/net-dns/dnstop/metadata.xml b/net-dns/dnstop/metadata.xml new file mode 100644 index 000000000000..14b05fb0dd81 --- /dev/null +++ b/net-dns/dnstop/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>proxy-maintainers</herd> +<maintainer> + <email>hendrik@consetetur.de</email> + <name>Hendrik v. Raven</name> +</maintainer> +<maintainer> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> +</maintainer> +<upstream> + <changelog>http://dns.measurement-factory.com/tools/dnstop/src/CHANGES</changelog> + <doc>http://dns.measurement-factory.com/tools/dnstop/dnstop.8.html</doc> +</upstream> +</pkgmetadata> diff --git a/net-dns/dnswalk/Manifest b/net-dns/dnswalk/Manifest new file mode 100644 index 000000000000..0004bfcdba91 --- /dev/null +++ b/net-dns/dnswalk/Manifest @@ -0,0 +1 @@ +DIST dnswalk-2.0.2.tar.gz 27015 SHA256 b49ea147a00e95e80330534d43f8737c2367ae862050e9a8009a607c49f0ea6b SHA512 23e5408149ae65f69dbb6d0ecaf5b10233e2279a502f6e19f0dacde0e270ed4eed0aea72f8c12dd636228e99b0b115a335bb8327a0628ad1f36dae5f5572712c WHIRLPOOL 81a08ac16ebb2876a4b2ec557aee4a87a7699db2366cda2c3a9e3b850489e807ae1511c13d9946d47826a24ce93a231deddc5948074afcf1fbc3efb717d06972 diff --git a/net-dns/dnswalk/dnswalk-2.0.2.ebuild b/net-dns/dnswalk/dnswalk-2.0.2.ebuild new file mode 100644 index 000000000000..b399c719cf46 --- /dev/null +++ b/net-dns/dnswalk/dnswalk-2.0.2.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="dnswalk is a DNS database debugger" +HOMEPAGE="http://sourceforge.net/projects/dnswalk/" +SRC_URI="mirror://sourceforge/dnswalk/${P}.tar.gz" + +LICENSE="freedist" +SLOT="0" +KEYWORDS="amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~x86-macos" + +RDEPEND=">=dev-perl/Net-DNS-0.12" + +S=${WORKDIR} + +src_prepare() { + sed -i 's:#!/usr/contrib/bin/perl:#!'"${EPREFIX}"'/usr/bin/perl:' dnswalk +} + +src_install () { + dobin dnswalk + + dodoc CHANGES README TODO \ + do-dnswalk makereports sendreports rfc1912.txt dnswalk.errors + doman dnswalk.1 +} diff --git a/net-dns/dnswalk/metadata.xml b/net-dns/dnswalk/metadata.xml new file mode 100644 index 000000000000..f02292e8b0e8 --- /dev/null +++ b/net-dns/dnswalk/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">dnswalk</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-dns/ez-ipupdate/Manifest b/net-dns/ez-ipupdate/Manifest new file mode 100644 index 000000000000..e84f07a9392c --- /dev/null +++ b/net-dns/ez-ipupdate/Manifest @@ -0,0 +1,2 @@ +DIST ez-ipupdate_3.0.11b8-13.3.diff.gz 154094 SHA256 2c058941f8b172c8564d841d4413b7fa7a5c4dbd53d7d5574c2ff58f41cf39b3 SHA512 bef3c344a3c16f224cc3c6e662213713bb1123b4e47347d83d01d632c5ca0b09e7f0e5a989b3987655759ac901307c8dd6768fab3056c8878c0adcf78b0d5fb9 WHIRLPOOL f213674b871bdf950fe3f1a1131561954c77f0c79a2e4a70752f8a1a88f86e221ad269d92839c30a49544c636ccad77f9e096687a381209cb86367329eafd4ca +DIST ez-ipupdate_3.0.11b8.orig.tar.gz 81975 SHA256 bf5b8d11ffe055c5891d0ab64bbfa86e99cbda645d40f346146b939fec8d962d SHA512 85de91cde25d176374ade7128e8932a4e015cd04beb8d5b71bf540e2f59b6c409d1c8bd0ff7c50734b87ecc19a74a7b1da3e646a8c8787badcae4feb9dba7864 WHIRLPOOL ce279c1d8f1ae404c936b959b9273bce1c37404d7ecf0d7262468bb4b71f6aee75797a2448ea7a0191c9f8a01ffef92107f71727e2c7d445469ec61f0be8f162 diff --git a/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r2.ebuild b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r2.ebuild new file mode 100644 index 000000000000..a0294124d61a --- /dev/null +++ b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r2.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +inherit eutils readme.gentoo systemd user versionator + +MY_BETA="$(get_version_component_range 6)" +MY_PATCH="$(get_version_component_range 4-5)" +MY_PV="$(get_version_component_range 1-3)${MY_BETA/beta/b}" + +DESCRIPTION="Dynamic DNS client for lots of dynamic dns services" +HOMEPAGE="http://ez-ipupdate.com/" +SRC_URI="mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}.orig.tar.gz + mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}-${MY_PATCH}.diff.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +S="${WORKDIR}/${PN}-${MY_PV}" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +Please create one or more config files in +/etc/ez-ipupdate/. A bunch of samples can +be found in the doc directory. + +All config files must have a '.conf' extension. + +If you are using openRC you need to: +- Please do not use the 'run-as-user', 'run-as-euser', +'cache-file' and 'pidfile' options, since these are +handled internally by the init-script. + +-If you want to use ez-ipupdate in daemon mode, +please add 'daemon' to the config file(s) and +add the ez-ipupdate init-script to the default runlevel. +Without the 'daemon' option, you can run the +init-script with the 'update' parameter inside +your PPP ip-up script. +" + +src_prepare() { + # apply debian patches + epatch "${WORKDIR}/${PN}_${MY_PV}-${MY_PATCH}.diff" + + # repair/apply additional debian patches + sed -i -e "s|^\(---\s*\)\.\./|\1|g" debian/patches/*.diff + EPATCH_SOURCE="${S}/debian/patches" EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch + + # adding members.3322.org support + epatch "${FILESDIR}/${P}-3322.diff" + + # adding www.dnsexit.com support + epatch "${FILESDIR}/${P}-dnsexit.diff" + + # make ez-ipupdate work with iproute2/dhcpcd under linux (bug #318905) + epatch "${FILESDIR}/${P}-linux.diff" + + # allows to set IPv6 via -a option, (bug #432764) + epatch "${FILESDIR}/${P}-ipv6.diff" + + # repair format mask issues + sed -i -e "s|\(\s*\)\(strlen(putbuf)\)|\1(int)\2|g" ez-ipupdate.c || die + + # comment out obsolete options + sed -i -e "s:^\(run-as-user.*\):#\1:g" \ + -e "s:^\(cache-file.*\):#\1:g" ex*conf || die + + # make 'missing' executable (bug #103480) + chmod +x missing +} + +src_configure() { + econf --bindir=/usr/sbin +} + +src_install() { + emake DESTDIR="${D}" install + newinitd "${FILESDIR}/ez-ipupdate.initd" ez-ipupdate + systemd_dounit "${FILESDIR}/${PN}.service" + keepdir /etc/ez-ipupdate + + # install docs + dodoc README + newdoc debian/README.Debian README.debian + newdoc debian/changelog ChangeLog.debian + newdoc CHANGELOG ChangeLog + doman debian/ez-ipupdate.8 + + # install example configs + docinto examples + dodoc ex*conf + + readme.gentoo_create_doc +} + +pkg_preinst() { + enewgroup ez-ipupd + enewuser ez-ipupd -1 -1 /var/cache/ez-ipupdate ez-ipupd +} + +pkg_postinst() { + chmod 750 /etc/ez-ipupdate /var/cache/ez-ipupdate + chown ez-ipupd:ez-ipupd /etc/ez-ipupdate /var/cache/ez-ipupdate + + readme.gentoo_print_elog + + if [ -f /etc/ez-ipupdate.conf ]; then + elog "!!! IMPORTANT UPDATE NOTICE !!!" + elog + elog "The ez-ipupdate init-script can now handle more" + elog "than one config file. New config file location is" + elog "/etc/ez-ipupdate/*.conf" + elog + if [ ! -f /etc/ez-ipupdate/default.conf ]; then + mv -f /etc/ez-ipupdate.conf /etc/ez-ipupdate/default.conf + elog "Your old configuration has been moved to" + elog "/etc/ez-ipupdate/default.conf" + elog + fi + fi +} diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff new file mode 100644 index 000000000000..d6bf0152a098 --- /dev/null +++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff @@ -0,0 +1,65 @@ +diff -Naur ez-ipupdate-3.0.11b8.orig/example-3322.conf ez-ipupdate-3.0.11b8/example-3322.conf +--- ez-ipupdate-3.0.11b8.orig/example-3322.conf 1970-01-01 01:00:00.000000000 +0100 ++++ ez-ipupdate-3.0.11b8/example-3322.conf 2011-01-23 19:30:43.785652588 +0100 +@@ -0,0 +1,19 @@ ++#!/usr/local/bin/ez-ipupdate -c ++# ++# example config file for ez-ipupdate ++# ++# this file is actually executable! ++# ++ ++service-type=qdns ++#service-type=qdns-static ++user=myuserid:mypassword ++host=mydomain.whatever.com ++interface=eth1 ++max-interval=2073600 ++ ++# uncomment this once you have everything working how you want and you are ++# ready to have ez-ipupdate running in the background all the time. to stop it ++# you can use "killall -QUIT ez-ipupdate" under linux. ++#daemon ++ +diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c +--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:29:17.698793394 +0100 ++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:29:17.799792055 +0100 +@@ -103,6 +103,11 @@ + #define HEIPV6TB_DEFAULT_PORT "80" + #define HEIPV6TB_REQUEST "/index.cgi" + ++#define QDNS_DEFAULT_SERVER "members.3322.org" ++#define QDNS_DEFAULT_PORT "80" ++#define QDNS_REQUEST "/dyndns/update" ++#define QDNS_STAT_REQUEST "/dyndns/update" ++ + #define DEFAULT_TIMEOUT 120 + #define DEFAULT_UPDATE_PERIOD 120 + #define DEFAULT_RESOLV_PERIOD 30 +@@ -514,6 +519,26 @@ + HEIPV6TB_DEFAULT_PORT, + HEIPV6TB_REQUEST + }, ++ { "qdns", ++ { "qdns", 0, 0, }, ++ DYNDNS_init, ++ DYNDNS_update_entry, ++ DYNDNS_check_info, ++ DYNDNS_fields_used, ++ QDNS_DEFAULT_SERVER, ++ QDNS_DEFAULT_PORT, ++ QDNS_REQUEST ++ }, ++ { "qdns-static", ++ { "qdns-static", "qdns-stat", "statdns", }, ++ DYNDNS_init, ++ DYNDNS_update_entry, ++ DYNDNS_check_info, ++ DYNDNS_STAT_fields_used, ++ QDNS_DEFAULT_SERVER, ++ QDNS_DEFAULT_PORT, ++ QDNS_STAT_REQUEST ++ }, + }; + + static struct service_t *service = NULL; diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff new file mode 100644 index 000000000000..fd80485f0f4f --- /dev/null +++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff @@ -0,0 +1,262 @@ +diff -Naur ez-ipupdate-3.0.11b8.orig/example-dnsexit.conf ez-ipupdate-3.0.11b8/example-dnsexit.conf +--- ez-ipupdate-3.0.11b8.orig/example-dnsexit.conf 1970-01-01 01:00:00.000000000 +0100 ++++ ez-ipupdate-3.0.11b8/example-dnsexit.conf 2011-01-23 19:32:53.181937517 +0100 +@@ -0,0 +1,19 @@ ++#!/usr/sbin/ez-ipupdate -c ++# ++# example config file for ez-ipupdate ++# ++# this file is actually executable! ++# ++ ++service-type=dnsexit ++user=loginname:password ++host=www.yourdomain.com ++interface=eth1 ++ ++run-as-user=ez-ipupd ++cache-file=/var/cache/ez-ipupdate/default-cache ++ ++# uncomment this once you have everything working how you want and you are ++# ready to have ez-ipupdate running in the background all the time. to stop it ++# you can use "killall -QUIT ez-ipupdate" under linux. ++#daemon +diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c +--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:32:53.074938936 +0100 ++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:32:53.182937505 +0100 +@@ -103,6 +103,10 @@ + #define HEIPV6TB_DEFAULT_PORT "80" + #define HEIPV6TB_REQUEST "/index.cgi" + ++#define DNSEXIT_DEFAULT_SERVER "www.dnsexit.com" ++#define DNSEXIT_DEFAULT_PORT "80" ++#define DNSEXIT_REQUEST "/RemoteUpdate.sv" ++ + #define DEFAULT_TIMEOUT 120 + #define DEFAULT_UPDATE_PERIOD 120 + #define DEFAULT_RESOLV_PERIOD 30 +@@ -341,6 +345,11 @@ + int HEIPV6TB_check_info(void); + static char *HEIPV6TB_fields_used[] = { "server", "user", NULL }; + ++int DNSEXIT_update_entry(void); ++int DNSEXIT_check_info(void); ++static char *DNSEXIT_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL }; ++ ++ + struct service_t services[] = { + { "NULL", + { "null", "NULL", 0, }, +@@ -514,6 +523,16 @@ + HEIPV6TB_DEFAULT_PORT, + HEIPV6TB_REQUEST + }, ++ { "dnsexit", ++ { "dnsexit", 0, 0, }, ++ NULL, ++ DNSEXIT_update_entry, ++ DNSEXIT_check_info, ++ DNSEXIT_fields_used, ++ DNSEXIT_DEFAULT_SERVER, ++ DNSEXIT_DEFAULT_PORT, ++ DNSEXIT_REQUEST ++ }, + }; + + static struct service_t *service = NULL; +@@ -4241,6 +4260,195 @@ + } + return(UPDATERES_ERROR); + break; ++ } ++ ++ return(UPDATERES_OK); ++} ++ ++int DNSEXIT_check_info(void) ++{ ++ char buf[BUFSIZ+1]; ++ ++ if((host == NULL) || (*host == '\0')) ++ { ++ if(options & OPT_DAEMON) ++ { ++ return(-1); ++ } ++ if(host) { free(host); } ++ printf("host: "); ++ *buf = '\0'; ++ fgets(buf, BUFSIZ, stdin); ++ host = strdup(buf); ++ chomp(host); ++ } ++ ++ if(interface == NULL && address == NULL) ++ { ++ if(options & OPT_DAEMON) ++ { ++ fprintf(stderr, "you must provide either an interface or an address\n"); ++ return(-1); ++ } ++ if(interface) { free(interface); } ++ printf("interface: "); ++ *buf = '\0'; ++ fgets(buf, BUFSIZ, stdin); ++ chomp(buf); ++ option_handler(CMD_interface, buf); ++ } ++ ++ warn_fields(service->fields_used); ++ ++ return 0; ++} ++ ++int DNSEXIT_update_entry(void) ++{ ++ char buf[BUFFER_SIZE+1]; ++ char *bp = buf; ++ int bytes; ++ int btot; ++ int ret; ++ ++ buf[BUFFER_SIZE] = '\0'; ++ ++ if(do_connect((int*)&client_sockfd, server, port) != 0) ++ { ++ if(!(options & OPT_QUIET)) ++ { ++ show_message("error connecting to %s:%s\n", server, port); ++ } ++ return(UPDATERES_ERROR); ++ } ++ ++ snprintf(buf, BUFFER_SIZE, "GET %s?action=edit&", request); ++ output(buf); ++ if(address != NULL && *address != '\0') ++ { ++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "myip", address); ++ output(buf); ++ } ++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "ON" : "OFF"); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "mx", mx); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "backmx", *mx == '\0' ? "NO" : "YES"); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "login", user_name); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "password", password); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012"); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "Authorization: Basic %s\015\012", auth); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "User-Agent: %s-%s %s [%s] (%s)\015\012", ++ "ez-update", VERSION, OS, (options & OPT_DAEMON) ? "daemon" : "", "by Angus Mackay"); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "Host: %s\015\012", server); ++ output(buf); ++ snprintf(buf, BUFFER_SIZE, "\015\012"); ++ output(buf); ++ ++ bp = buf; ++ bytes = 0; ++ btot = 0; ++ while((bytes=read_input(bp, BUFFER_SIZE-btot)) > 0) ++ { ++ bp += bytes; ++ btot += bytes; ++ dprintf((stderr, "btot: %d\n", btot)); ++ } ++ close(client_sockfd); ++ buf[btot] = '\0'; ++ ++ dprintf((stderr, "server output: %s\n", buf)); ++ ++ if(sscanf(buf, " HTTP/1.%*c %3d", &ret) != 1) ++ { ++ ret = -1; ++ } ++ ++ switch(ret) ++ { ++ case -1: ++ if(!(options & OPT_QUIET)) ++ { ++ show_message("strange server response, are you connecting to the right server?\n"); ++ } ++ return(UPDATERES_ERROR); ++ break; ++ ++ case 200: ++ ++ if(strstr(buf, "0=Success") != NULL) ++ { ++ if(!(options & OPT_QUIET)) ++ { ++ printf("Request successful\n"); ++ } ++ } ++ else if(strstr(buf, "1=IP is the same as the IP on the system") != NULL) ++ { ++ if(!(options & OPT_QUIET)) ++ { ++ printf("Request successful but the IP is the same as previous update\n"); ++ } ++ } ++ else if(strstr(buf, "2=Invalid passwords") != NULL) ++ { ++ if(!(options & OPT_QUIET)) ++ { ++ printf("Invalid Password\n"); ++ } ++ } ++ else if(strstr(buf, "3=User not found") != NULL) ++ { ++ if(!(options & OPT_QUIET)) ++ { ++ printf("Username not found\n"); ++ } ++ } ++ else if(strstr(buf, "4=Update too often") != NULL) ++ { ++ if(!(options & OPT_QUIET)) ++ { ++ printf("Updatting too often\n"); ++ } ++ } ++ else ++ { ++ show_message("Errors return from server\n"); ++ if(!(options & OPT_QUIET)) ++ { ++ fprintf(stderr, "server output: %s\n", buf); ++ } ++ return(UPDATERES_ERROR); ++ } ++ break; ++ ++ case 401: ++ if(!(options & OPT_QUIET)) ++ { ++ show_message("authentication failure\n"); ++ } ++ return(UPDATERES_SHUTDOWN); ++ break; ++ ++ default: ++ if(!(options & OPT_QUIET)) ++ { ++ // reuse the auth buffer ++ *auth = '\0'; ++ sscanf(buf, " HTTP/1.%*c %*3d %255[^\r\n]", auth); ++ show_message("unknown return code: %d\n", ret); ++ show_message("server response: %s\n", auth); ++ } ++ return(UPDATERES_ERROR); ++ break; + } + + return(UPDATERES_OK); diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff new file mode 100644 index 000000000000..ec41647e066f --- /dev/null +++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff @@ -0,0 +1,41 @@ +diff --git a/ez-ipupdate.c b/ez-ipupdate.c +index ff093a9..eea7624 100644 +--- a/ez-ipupdate.c ++++ b/ez-ipupdate.c +@@ -849,6 +849,27 @@ int is_dotted_quad(char *addr) + return(1); + } + ++int is_ip_addr(char *addr) ++{ ++#if HAVE_ARPA_INET_H ++ char dst[16]; ++ ++ if(inet_pton(AF_INET,addr,dst) == 1) ++ { ++ return(1); ++ } ++ ++ if(inet_pton(AF_INET6,addr,dst) == 1) ++ { ++ return(1); ++ } ++ ++ return(0); ++#else ++ return is_dotted_quad(addr); ++#endif ++} ++ + void parse_service(char *str) + { + int i; +@@ -1859,7 +1880,7 @@ int DYNDNS_check_info(void) + chomp(host); + } + +- if(address != NULL && !is_dotted_quad(address)) ++ if(address != NULL && !is_ip_addr(address)) + { + fprintf(stderr, "the IP address \"%s\" is invalid\n", address); + return(-1); diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff new file mode 100644 index 000000000000..8a282bb58c34 --- /dev/null +++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff @@ -0,0 +1,213 @@ +diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c +--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:35:10.885111914 +0100 ++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:35:10.979110667 +0100 +@@ -172,6 +172,17 @@ + # ifdef HAVE_SYS_SOCKIO_H + # include <sys/sockio.h> + # endif ++# ifdef __linux__ ++/*# include <linux/if.h> */ ++# include <linux/netlink.h> ++# include <linux/rtnetlink.h> ++/* Under Linux, we reopen socket in get_if_addr() every time */ ++# define socketopen(sock) ++# define socketclose(sock) ++# else ++# define socketopen(sock) sock = socket(AF_INET, SOCK_STREAM, 0) ++# define socketclose(sock) close(sock) ++# endif + #endif + + #include <dprintf.h> +@@ -1605,6 +1616,114 @@ + int get_if_addr(int sock, char *name, struct sockaddr_in *sin) + { + #ifdef IF_LOOKUP ++#ifdef __linux__ ++ struct { ++ struct nlmsghdr nlmsg_info; ++ struct ifaddrmsg ifaddrmsg_info; ++ char buffer[2048]; ++ } req; ++ struct nlmsghdr *curr; ++ int len; ++ char buf[8192]; ++ ++ /* open a socket and bind it. ++ Under non-linux, the socket can be kept open, but it seems under ++ linux we cannot use the same socket for several requests reliable ++ [although sometimes it works...] */ ++ static struct sockaddr_nl local; ++ sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); ++ if(sock < 0) { ++ perror("socket"); ++ return -1; ++ } ++ local.nl_family = AF_NETLINK; ++ local.nl_pad = 0; ++ local.nl_pid = getpid(); ++ local.nl_groups = 0; ++ if(bind(sock, (struct sockaddr*) &local, sizeof(local)) < 0) { ++ perror("bind"); ++ close(sock); ++ return -1; ++ } ++ ++ memset(&req, 0, sizeof(req)); ++ req.nlmsg_info.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); ++ req.nlmsg_info.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; ++ req.nlmsg_info.nlmsg_type = RTM_GETADDR; ++ req.nlmsg_info.nlmsg_pid = getpid(); ++ req.ifaddrmsg_info.ifa_family = AF_INET; ++ if(send(sock, &req, req.nlmsg_info.nlmsg_len, 0) < 0) { ++ perror("sendmsg(sock)"); ++ close(sock); ++ return -1; ++ } ++ ++ len = recv(sock, buf, sizeof(buf), 0); ++ close(sock); ++ if(len < 0) { ++ perror("recv"); ++ return -1; ++ } else if(len == 0) { ++ dprintf((stderr, "No interfaces found")); ++ return -1; ++ } ++ ++ /* Initialize sin except for address */ ++ bzero(sin, sizeof(struct sockaddr_in)); ++ sin->sin_family = AF_INET; ++ ++ /* We take the last non-private IP with matching name */ ++ int found = 0; ++ curr = (struct nlmsghdr *) buf; ++ for(; NLMSG_OK(curr, len); curr = NLMSG_NEXT(curr, len)) { ++ struct ifaddrmsg *curraddr = (struct ifaddrmsg *) NLMSG_DATA(curr); ++ struct rtattr *datalist = (struct rtattr *) IFA_RTA(curraddr); ++ int datalen = IFA_PAYLOAD(curr); ++ int mystat = 0; ++ struct in_addr sin_addr; ++ in_addr_t addr; ++ for(; RTA_OK(datalist, datalen); datalist = RTA_NEXT(datalist, datalen)) { ++ switch(datalist->rta_type) { ++ case IFA_LABEL: ++ if(strcmp((char *)RTA_DATA(datalist), name) != 0) ++ mystat = -1; ++ break; ++ case IFA_LOCAL: ++ addr = ((struct in_addr *)RTA_DATA(datalist))->s_addr; ++ /* addr: 192.168.0.0/16 || 172.16.0.0/12 || 10.0.0.0/8 */ ++ if(((addr & 0xFFFF) == 0xA8C0) ++ || ((addr & 0xF0FF) == 0x10AC) ++ || ((addr & 0xFF) == 0x0A)) { ++ mystat = -1; ++ } ++ else { ++ /* We must not store yet sin->sin_addr, since name might not match */ ++ sin_addr = *((struct in_addr *)RTA_DATA(datalist)); ++ mystat = 1; ++ } ++ break; ++ default: ++ break; ++ } ++ if(mystat < 0) ++ break; ++ } ++ if(mystat > 0) { ++ sin->sin_addr = sin_addr; ++ found = 1; ++ /* If you want to take the first non-private IP with matching name ++ uncomment the next break command: ++ break; */ ++ } ++ } ++ if(found) { ++ dprintf((stderr, "%s: %s\n", name, inet_ntoa(sin->sin_addr))); ++ return 0; ++ } ++ dprintf((stderr, "%s: %s\n", name, "has no non-private address")); ++ return -1; ++#else ++/* ifndef __linux__ */ + struct ifreq ifr; + + memset(&ifr, 0, sizeof(ifr)); +@@ -1638,7 +1757,10 @@ + return -1; + } + return -1; ++#endif ++/* endif __linux__ */ + #else ++/* ifndef IF_LOOKUP */ + return -1; + #endif + } +@@ -4490,7 +4612,7 @@ + #ifdef IF_LOOKUP + if(options & OPT_DAEMON) + { +- sock = socket(AF_INET, SOCK_STREAM, 0); ++ socketopen(sock); + } + #endif + +@@ -4745,12 +4867,12 @@ + struct sockaddr_in sin; + int sock; + +- sock = socket(AF_INET, SOCK_STREAM, 0); ++ socketopen(sock); + if(get_if_addr(sock, interface, &sin) != 0) + { + exit(1); + } +- close(sock); ++ socketclose(sock); + snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr)); + #else + fprintf(stderr, "interface lookup not enabled at compile time\n"); +@@ -4791,7 +4913,7 @@ + struct sockaddr_in sin; + int sock; + +- sock = socket(AF_INET, SOCK_STREAM, 0); ++ socketopen(sock); + if(get_if_addr(sock, interface, &sin) == 0) + { + if(address) { free(address); } +@@ -4802,7 +4924,7 @@ + show_message("could not resolve ip address for %s.\n", interface); + exit(1); + } +- close(sock); ++ socketclose(sock); + } + + for(i=0; i<ntrys; i++) +@@ -4846,12 +4968,12 @@ + struct sockaddr_in sin; + int sock; + +- sock = socket(AF_INET, SOCK_STREAM, 0); ++ socketopen(sock); + if(get_if_addr(sock, interface, &sin) != 0) + { + exit(1); + } +- close(sock); ++ socketclose(sock); + snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr)); + #else + fprintf(stderr, "interface lookup not enabled at compile time\n"); +@@ -4878,7 +5000,7 @@ + } + + #ifdef IF_LOOKUP +- if(sock > 0) { close(sock); } ++ if(sock > 0) { socketclose(sock); } + #endif + + if(address) { free(address); } diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.initd b/net-dns/ez-ipupdate/files/ez-ipupdate.initd new file mode 100644 index 000000000000..4bba7230fdb3 --- /dev/null +++ b/net-dns/ez-ipupdate/files/ez-ipupdate.initd @@ -0,0 +1,94 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="update" + +depend() { + need net + after rp-pppoe +} + +getconfig() { # 0: no daemon / 1: daemon + local CONF NAME LIST="" + for CONF in /etc/ez-ipupdate/*.conf; do + if [ -f "${CONF}" ]; then + # Don't run configurations that are (not) daemons + grep -q '^[[:space:]]*daemon' "${CONF}"; [ $? -eq $1 ] && continue + # Don't run configurations that run in the foreground + grep -q '^[[:space:]]*foreground' "${CONF}" && continue + # add config to list + NAME="${CONF##*/}" + LIST="${LIST} ${NAME%.*}" + fi + done + echo ${LIST} +} + +start() { + local NAME LIST=$(getconfig 1) + + if [ -z "${LIST}" ]; then + eerror "You need at least one config file in /etc/ez-ipupdate" + eerror "containing the 'daemon' keyword and no 'foreground' keyword." + return 1 + fi + + for dir in /var/run/ez-ipupdate /var/cache/ez-ipupdate; do + checkpath -q -d -m 0750 -o ez-ipupd:ez-ipupd ${dir} + done + + for NAME in ${LIST}; do + local CONFIG="/etc/ez-ipupdate/${NAME}.conf" + local PIDFILE="/var/run/ez-ipupdate/${NAME}.pid" + local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache" + ebegin "Starting ez-ipupdate (${NAME})" + start-stop-daemon -p "${PIDFILE}" --start --quiet --exec /usr/sbin/ez-ipupdate \ + --user ez-ipupd:ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}" + eend $? + done + return 0 # do not fail +} + +stop() { + local PIDFILE NAME + for PIDFILE in /var/run/ez-ipupdate/*.pid; do + if [ -f "${PIDFILE}" ]; then + NAME="${PIDFILE##*/}" + ebegin "Stopping ez-ipupdate (${NAME%.*})" + start-stop-daemon --stop --signal QUIT --quiet --pidfile "${PIDFILE}" + eend $? || rm -f "${PIDFILE}" + else + eerror "No running ez-ipupdate process" + fi + done + return 0 # do not fail +} + +update() { + local NAME TEXT LIST=$(getconfig 0) + + if [ -z "${LIST}" ]; then + eerror "You need at least one config file in /etc/ez-ipupdate" + eerror "containing no 'daemon' and 'foreground' keyword." + return 1 + fi + + for NAME in ${LIST}; do + local CONFIG="/etc/ez-ipupdate/${NAME}.conf" + local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache" + ebegin "Running ez-ipupdate (${NAME})" + TEXT=$(/usr/sbin/ez-ipupdate -q -R ez-ipupd -c "${CONFIG}" -b "${CACHEFILE}" 2>&1) + if eend $?; then + if [ -n "${TEXT}" ]; then + echo "${TEXT}" | while read line; do einfo " $line"; done + fi + else + if [ -n "${TEXT}" ]; then + echo "${TEXT}" | while read line; do eerror " $line"; done + fi + fi + done + return 0 # do not fail +} diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.service b/net-dns/ez-ipupdate/files/ez-ipupdate.service new file mode 100644 index 000000000000..2f3d79b13dcd --- /dev/null +++ b/net-dns/ez-ipupdate/files/ez-ipupdate.service @@ -0,0 +1,12 @@ +[Unit] +Description=ez-ipupdate: Check and update your IP to dynamic DNS Server +Requires=network-online.target +After=network-online.target + +[Service] +ExecStart=/usr/sbin/ez-ipupdate -f -R ez-ipupd -c /etc/ez-ipupdate/defaults.conf -b /var/cache/ez-ipupdate/defaults.cache +ExecReload=/bin/kill -HUP $MAINPID +KillSignal=SIGQUIT + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/ez-ipupdate/metadata.xml b/net-dns/ez-ipupdate/metadata.xml new file mode 100644 index 000000000000..b63524a497aa --- /dev/null +++ b/net-dns/ez-ipupdate/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <longdescription lang="en"> + Ez-ipupdate is a client for the dynamic IP service offered by + http://www.ez-ip.net. It has several options and is quite complete. + It is written in pure C and supports a daemon mode. + </longdescription> +</pkgmetadata> diff --git a/net-dns/fpdns/Manifest b/net-dns/fpdns/Manifest new file mode 100644 index 000000000000..42b7c3383258 --- /dev/null +++ b/net-dns/fpdns/Manifest @@ -0,0 +1 @@ +DIST fpdns-0.10.0_pre20130404.tar.gz 931723 SHA256 fe81de9c5d2d077cd974c9fd862f52a02cc1bb29c58944ea968a21853cc8ea15 SHA512 1a4d9c1cb666efa3f48dcca2b5cd04793e92727359652095572b17479f5343479c57d2937f1fff8070c071a2698eda5c4dff981caf86436f184f0b076b0fa0b3 WHIRLPOOL 09b0588fdba51313787b17e1093a91d948aff1a203880943b3e16cf3c8c2a9296b679f13de24862b75d9f8e3c17b0598b12066932f3c07c2c47d793b84b30827 diff --git a/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch b/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch new file mode 100644 index 000000000000..17eadbe4a139 --- /dev/null +++ b/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch @@ -0,0 +1,33 @@ +From ca0391377ad7150e61ff300cb5195c97a154233b Mon Sep 17 00:00:00 2001 +From: Jakob Schlyter <jakob@kirei.se> +Date: Wed, 28 Aug 2013 10:24:11 +0200 +Subject: [PATCH] do not set header counters unless changed + +--- + lib/Net/DNS/Fingerprint.pm | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/lib/Net/DNS/Fingerprint.pm b/lib/Net/DNS/Fingerprint.pm +index d4a2e5a..e096d42 100644 +--- a/lib/Net/DNS/Fingerprint.pm ++++ b/lib/Net/DNS/Fingerprint.pm +@@ -2171,10 +2171,12 @@ sub fp2header { + $header->ad(shift @list); + $header->cd(shift @list); + $header->rcode(shift @list); +- $header->qdcount(shift @list); +- $header->ancount(shift @list); +- $header->nscount(shift @list); +- $header->arcount(shift @list); ++ ++ my ($qdcount, $ancount, $nscount, $arcount) = @list; ++ $header->qdcount($qdcount) unless $qdcount == $header->qdcount; ++ $header->qdcount($ancount) unless $ancount == $header->ancount; ++ $header->qdcount($nscount) unless $nscount == $header->nscount; ++ $header->qdcount($arcount) unless $arcount == $header->arcount; + } + + sub probe { +-- +1.9.1 + diff --git a/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild b/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild new file mode 100644 index 000000000000..08b4fa0c439d --- /dev/null +++ b/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils perl-module + +DESCRIPTION="Fingerprinting DNS servers" +HOMEPAGE="https://github.com/kirei/fpdns/" + +MY_P="${PN}-${PV##*_pre}" +SRC_URI="https://github.com/kirei/fpdns/archive/20130404.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND=">=dev-perl/Net-DNS-0.74" + +S="${WORKDIR}"/"${MY_P}" + +src_prepare() { + ## fixes https://github.com/kirei/fpdns/issues/6 + epatch "${FILESDIR}/${P}.ro-header.patch" +} + +src_install() { + newbin apps/fpdns fpdns + insinto "${VENDOR_LIB}"/Net/DNS/ + doins lib/Net/DNS/Fingerprint.pm +} diff --git a/net-dns/fpdns/metadata.xml b/net-dns/fpdns/metadata.xml new file mode 100644 index 000000000000..dab638cf573a --- /dev/null +++ b/net-dns/fpdns/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <longdescription> +A nameserver basically responds to a query. Interoperability is an obvious +requirement here. The standard protocol behaviour of different DNS +implementations is expected to be the same. + +Requirements for protocol behaviour of DNS implementations is widely documented +in the case of 'common' dns messages. The DNS protocol is over 20 years old and +since its inception, there have been over 40 independent DNS implementations, +while some implementations have over 20 versions. + +The methodology used to identify individual nameserver implementations is based +on "borderline" protocol behaviour. The DNS protocol offers a multitude of +message bits, response types, opcodes, classes, query types and label types in a +fashion that makes some mutually exclusive while some are not used in a query +messages at all. Not every implementation offers the full set of features the +DNS protocol set currently has. Some implementations offer features outside the +protocol set, and there are implementations that do not conform to standards. + +Also, new features added to - or bugs removed allow for differentiations between +versions of an implementation. +</longdescription> + <upstream> + <remote-id type="github">kirei/fpdns</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-dns/hash-slinger/Manifest b/net-dns/hash-slinger/Manifest new file mode 100644 index 000000000000..0b3d97f69bc1 --- /dev/null +++ b/net-dns/hash-slinger/Manifest @@ -0,0 +1 @@ +DIST hash-slinger-2.6.tar.gz 34864 SHA256 121143efea136958ad6a42cb0a8fa80d95b1e4fc45632019d8f07a534d6efab2 SHA512 1e5d67ed2ef8eae910927fbd7419928d87ba31a91ca43a1c163b05f725da96a50d30e1539c4c55a68a22f0e2c9a2f7c7101fbdcfb5fc903e87fe4c22e20f33af WHIRLPOOL 7ff36bad9db31e6d8769a525fc60691cb6af3bd6970b9bbf55d56f7e3c08a6a97a35fd1363dbed012239432b7dfd2594d616dc4d0a80ae47c82b724e17183f41 diff --git a/net-dns/hash-slinger/hash-slinger-2.6.ebuild b/net-dns/hash-slinger/hash-slinger-2.6.ebuild new file mode 100644 index 000000000000..0d9d838037c6 --- /dev/null +++ b/net-dns/hash-slinger/hash-slinger-2.6.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +inherit python-r1 + +DESCRIPTION="Various tools to generate special DNS records like SSHFP, TLSA, OPENPGPKEY, IPSECKEY" +HOMEPAGE="http://people.redhat.com/pwouters/hash-slinger/" +SRC_URI="http://people.redhat.com/pwouters/${PN}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipsec +openpgp +ssh" + +DEPEND="" +RDEPEND=" + ${PYTHON_DEPS} + dev-python/dnspython[$PYTHON_USEDEP] + dev-python/ipaddr[$PYTHON_USEDEP] + dev-python/m2crypto[$PYTHON_USEDEP] + net-dns/unbound[python,$PYTHON_USEDEP] + ipsec? ( net-misc/libreswan[dnssec] ) + openpgp? ( dev-python/python-gnupg[$PYTHON_USEDEP] ) + ssh? ( net-misc/openssh ) +" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +src_install() { + local tools + tools="tlsa" + use ssh && tools+=" sshfp" + use openpgp && tools+=" openpgpkey" + use ipsec && tools+=" ipseckey" + for tool in $tools ; do + doman ${tool}.1 + python_foreach_impl python_doscript ${tool} + done + dodoc BUGS CHANGES README +} diff --git a/net-dns/hash-slinger/metadata.xml b/net-dns/hash-slinger/metadata.xml new file mode 100644 index 000000000000..4b0698ebfd36 --- /dev/null +++ b/net-dns/hash-slinger/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>mschiff@gentoo.org</email> + <name>Marc Schiffbauer</name> + </maintainer> + <use> + <flag name='ipsec'>Enable support for IPSECKEY records (ipseckey)</flag> + <flag name='openpgp'>Enable support for OPENPGPKEY records (openpgpkey)</flag> + <flag name='ssh'>Enable support for SSHFP records (sshfp)</flag> + </use> +</pkgmetadata> diff --git a/net-dns/hesinfo/Manifest b/net-dns/hesinfo/Manifest new file mode 100644 index 000000000000..285636ad5408 --- /dev/null +++ b/net-dns/hesinfo/Manifest @@ -0,0 +1 @@ +DIST hesinfo-3.1.0.tar.gz 137487 RMD160 b7ac55b67992748cbc7b9cd64b0c6b4b4e4cb6bf SHA1 30a92f80f0e8754a5dfc377c71b50f517b168d3a SHA256 2d3e34a8aa5c703a438b26a93b0662f5fbb58bd08b00f806244c6d01d1ccb91f diff --git a/net-dns/hesinfo/files/hesinfo-3.1.0-autotools.patch b/net-dns/hesinfo/files/hesinfo-3.1.0-autotools.patch new file mode 100644 index 000000000000..7e611c042bee --- /dev/null +++ b/net-dns/hesinfo/files/hesinfo-3.1.0-autotools.patch @@ -0,0 +1,58 @@ +--- Makefile.in 2006-03-30 18:22:39.000000000 +0200 ++++ Makefile.in 2010-03-12 21:34:34.000000000 +0100 +@@ -22,7 +22,7 @@ + all: hesinfo + + hesinfo: hesinfo.o +- ${CC} ${LDFLAGS} -o $@ hesinfo.o -lhesiod ${LIBS} ++ ${CC} ${LDFLAGS} -o $@ hesinfo.o -lhesiod ${LIBS} ${LDFLAGS} + + .c.o: + ${CC} -c ${ALL_CFLAGS} $< +--- configure.in 2006-03-30 18:22:39.000000000 +0200 ++++ configure.in 2010-03-12 21:42:05.000000000 +0100 +@@ -7,6 +7,43 @@ + AC_PROG_CC + AC_PROG_INSTALL + +-ATHENA_HESIOD_REQUIRED ++dnl This file provides local macros for packages which use specific ++dnl external libraries. The public macros are: ++dnl ++dnl ATHENA_HESIOD_REQUIRED ++dnl Generates error if Hesiod not found. ++dnl Specify desired AFS libraries as a parameter. ++dnl ----- Hesiod ----- ++ ++AC_DEFUN(ATHENA_HESIOD_CHECK, ++[AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send)) ++if test "$hesiod" != yes; then ++ CPPFLAGS="$CPPFLAGS -I$hesiod/include" ++ LDFLAGS="$LDFLAGS -L$hesiod/lib" ++fi ++AC_CHECK_LIB(hesiod, hes_resolve, :, ++ [AC_MSG_ERROR(Hesiod library not found)])]) ++ ++AC_DEFUN(ATHENA_HESIOD, ++[AC_ARG_WITH(hesiod, ++ [ --with-hesiod=PREFIX Use Hesiod], ++ [hesiod="$withval"], [hesiod=no]) ++if test "$hesiod" != no; then ++ ATHENA_HESIOD_CHECK ++ HESIOD_LIBS="-lhesiod" ++ AC_DEFINE(HAVE_HESIOD) ++fi ++AC_SUBST(HESIOD_LIBS)]) + ++AC_DEFUN(ATHENA_HESIOD_REQUIRED, ++[AC_ARG_WITH(hesiod, ++ [ --with-hesiod=PREFIX Specify location of Hesiod], ++ [hesiod="$withval"], [hesiod=yes]) ++if test "$hesiod" != no; then ++ ATHENA_HESIOD_CHECK ++else ++ AC_MSG_ERROR(This package requires Hesiod.) ++fi]) ++ ++ATHENA_HESIOD_REQUIRED + AC_OUTPUT(Makefile) diff --git a/net-dns/hesinfo/hesinfo-3.1.0.ebuild b/net-dns/hesinfo/hesinfo-3.1.0.ebuild new file mode 100644 index 000000000000..06f9834c7355 --- /dev/null +++ b/net-dns/hesinfo/hesinfo-3.1.0.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" +inherit flag-o-matic eutils autotools + +DESCRIPTION="A simple command-line interface to the net-dns/hesiod service library" +HOMEPAGE="ftp://athena-dist.mit.edu/pub/ATHENA/hesiod" +SRC_URI="ftp://athena-dist.mit.edu/pub/ATHENA/hesiod/${P}.tar.gz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="" + +DEPEND=">=net-dns/hesiod-${PV}" +RDEPEND="${DEPEND}" + +src_prepare() { + rm -f aclocal.m4 || die "rm failed" + epatch "${FILESDIR}/${P}-autotools.patch" + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + dodoc NEWS README || die +} diff --git a/net-dns/hesinfo/metadata.xml b/net-dns/hesinfo/metadata.xml new file mode 100644 index 000000000000..e8b6c80fb348 --- /dev/null +++ b/net-dns/hesinfo/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>maintainer-needed@gentoo.org</email> +</maintainer> +<longdescription lang="en"> +</longdescription> +</pkgmetadata> + diff --git a/net-dns/hesiod/Manifest b/net-dns/hesiod/Manifest new file mode 100644 index 000000000000..db4e13c7b4a6 --- /dev/null +++ b/net-dns/hesiod/Manifest @@ -0,0 +1,2 @@ +DIST hesiod-3.1.0-patches.tgz 2389 SHA256 0b3d1c6854f7ab4394e116beadacbd4d5d2925aa2d364a50d14c605e97aab055 +DIST hesiod-3.1.0.tar.gz 224294 SHA256 57b288ea736614d630677da7b6fa3f46c6b07a0ec7e798860f318e887e2602b6 diff --git a/net-dns/hesiod/hesiod-3.1.0.ebuild b/net-dns/hesiod/hesiod-3.1.0.ebuild new file mode 100644 index 000000000000..50b113ffd39a --- /dev/null +++ b/net-dns/hesiod/hesiod-3.1.0.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" +inherit flag-o-matic eutils autotools + +DESCRIPTION="Use DNS functionality to provide access to databases of information that changes infrequently" +HOMEPAGE="ftp://athena-dist.mit.edu/pub/ATHENA/hesiod" +SRC_URI="ftp://athena-dist.mit.edu/pub/ATHENA/${PN}/${P}.tar.gz + mirror://gentoo/${P}-patches.tgz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="" + +src_prepare() { + # Bug #26332 + filter-flags -fstack-protector + + # Patches stolen from Fedora hesiod-3.1.0-19.fc14.src.rpm + rm -f aclocal.m4 || die "rm failed" + EPATCH_SOURCE="${WORKDIR}/files/${PV}" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + dodoc NEWS README || die +} + +pkg_postinst() { + elog "hesinfo tools are no longer part of hesiod. Use net-dns/hesinfo + instead" +} diff --git a/net-dns/hesiod/metadata.xml b/net-dns/hesiod/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/net-dns/hesiod/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/net-dns/host/Manifest b/net-dns/host/Manifest new file mode 100644 index 000000000000..44d34daa540a --- /dev/null +++ b/net-dns/host/Manifest @@ -0,0 +1 @@ +DIST host-20070128.tar.gz 152347 SHA256 a2a56ab236f9e8549366175a3055e0dc7758dafd46658ed8bea58d87de39bd9f SHA512 80f4d4878af40c93f33cc6c43d19b01415e66b3939b157544b4921b9f0b83ef1baa9ce0e151d951417be92973c4b038df80efae974be4bca2bbce43299db65fc WHIRLPOOL 7072f75f1f39b25375f38387625ced95469f7baeeed069429718a5cb438ee0751a612e3ac0f76e91af9ca653ebe97487476dac2cdaeb1d1fc21a49d67ba62527 diff --git a/net-dns/host/files/host-20070128-Makefile.patch b/net-dns/host/files/host-20070128-Makefile.patch new file mode 100644 index 000000000000..931c4389db1d --- /dev/null +++ b/net-dns/host/files/host-20070128-Makefile.patch @@ -0,0 +1,62 @@ +--- Makefile.orig 2003-06-05 03:01:45.000000000 +0200 ++++ Makefile 2010-03-12 18:53:17.000000000 +0100 +@@ -117,16 +117,11 @@ + # Compilation definitions. + # ---------------------------------------------------------------------- + +-DEBUGDEFS = -DDEBUG + + DEFS = $(CONFIGDEFS) $(DEBUGDEFS) $(SYSDEFS) $(INCLUDES) + +-COPTS = -pipe + +-COPTIM = -O2 +-COPTIM = -O + +-CDEBUG = -g + + # GCC lint-like warnings -- any warnings are likely bugs in the + # platform headers or in gcc itself.... +@@ -139,7 +134,6 @@ + -Wswitch \ + -Wcomment \ + -Wcast-qual \ +- -Wid-clash-30 \ + -Wpointer-arith \ + -Wshadow + #endif +@@ -147,7 +141,6 @@ + #if $(__GNULD__) >= 1 + GNULDWARNFLAGS = -W \ + -Wall \ +- -Wid-clash-30 + #endif + + #if $(__GNUC__) >= 2 +@@ -169,7 +162,7 @@ + #endif + + CPPFLAGS = $(DEFS) +-CFLAGS = $(COPTS) $(CDEBUG) $(COPTIM) $(GCCWARNFLAGS) $(GCC2WARNFLAGS) $(GCC3WARNFLAGS) ++CFLAGS += $(GCCWARNFLAGS) $(GCC2WARNFLAGS) $(GCC3WARNFLAGS) + + # Select your favorite compiler if make doesn't already know it... + #if defined(next) +@@ -250,7 +243,7 @@ + # Unfortunately SunOS-5.9 has only libresolv.so !!! + # + #if defined(NEED_LIBRESOLV) && !defined(sunos5.x) && !(BIND-8.4.x) +-LDFLAGS = -static $(GNULDWARNFLAGS) ++LDFLAGS += $(GNULDWARNFLAGS) + #else + #LDFLAGS = $(GNULDWARNFLAGS) + #endif +@@ -294,7 +287,7 @@ + # ---------------------------------------------------------------------- + + BINOWN = root +-BINGRP = staff ++BINGRP = root + BINMODE = 755 + #STRIPFLAG = -s + diff --git a/net-dns/host/host-20070128-r1.ebuild b/net-dns/host/host-20070128-r1.ebuild new file mode 100644 index 000000000000..8673e8e03813 --- /dev/null +++ b/net-dns/host/host-20070128-r1.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" +inherit eutils toolchain-funcs multilib + +DESCRIPTION="A powerful command-line DNS query and test tool implementing many additional protocols" +HOMEPAGE="http://www.weird.com/~woods/projects/host.html" +SRC_URI="ftp://ftp.weird.com/pub/Planix/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86" +IUSE="debug" + +# Bug 91515 +RESTRICT="test" + +RDEPEND="" +DEPEND="${RDEPEND} + >=sys-apps/sed-4" + +src_prepare() { + epatch "${FILESDIR}/${P}-Makefile.patch" + sed -i -e "s:^\(# if defined(__alpha).*\):\1 || defined(__x86_64__):" \ + port.h || die "sed failed" +} + +src_compile() { + use debug && export DEBUGDEFS="-DDEBUG" + emake CC="$(tc-getCC)" RES_LIB=/usr/$(get_libdir)/libresolv.a || die "emake failed" +} + +src_install () { + # This tool has slightly different format of output from "standard" host. + # Renaming it to host-woods, hopefully this does not conflict with anything. + + newbin host host-woods || die "newbin failed" + newman host.1 host-woods.1 || die "newman failed" + dodoc RELEASE_NOTES ToDo || die "dodoc failed" +} diff --git a/net-dns/host/metadata.xml b/net-dns/host/metadata.xml new file mode 100644 index 000000000000..681873710b63 --- /dev/null +++ b/net-dns/host/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>george@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/net-dns/idnkit/Manifest b/net-dns/idnkit/Manifest new file mode 100644 index 000000000000..52bd1542c12a --- /dev/null +++ b/net-dns/idnkit/Manifest @@ -0,0 +1 @@ +DIST idnkit-1.0-src.tar.gz 432823 SHA256 16cd5fce81a5180d6a2c61cf20572668b3dc59f5c39c272b75fa98edab3391fc SHA512 74f2db007a1991610f62a7a060d534f724f08395a16a7d76fda0824e9017aa47ffe4e251c90d0481218b70534fcd2b32724a66223042f59c1e16c1ff39f3be19 WHIRLPOOL 739206c47acacb32a7858f10665bdf7259b747291769da917a68f92dd200fbd31340eb2af22e281bd55c1b976e1cf264faa7d2110a9ee6b5a3a0ead6d1947dad diff --git a/net-dns/idnkit/files/idnkit-1.0-autotools.patch b/net-dns/idnkit/files/idnkit-1.0-autotools.patch new file mode 100644 index 000000000000..d0918bc9184a --- /dev/null +++ b/net-dns/idnkit/files/idnkit-1.0-autotools.patch @@ -0,0 +1,64 @@ +--- a/configure.in 2003-03-11 00:53:20.000000000 +0100 ++++ b/configure.in 2010-03-12 14:15:24.000000000 +0100 +@@ -629,6 +629,41 @@ + fi + fi + ++AC_DEFUN(AC_FIND_SYSTEM_SHOBJ,[ ++AC_MSG_CHECKING(for $1 shared object) ++shobj_name=$1 ++shobj_path= ++case "$host" in ++*-hpux*) ++ SOEXT=sl ++ ;; ++*) ++ SOEXT=so ++ ;; ++esac ++for shobj_libdir in /lib /usr/lib; do ++ if test -f $shobj_libdir/$shobj_name.$SOEXT; then ++ shobj_path=$shobj_libdir/$shobj_name.$SOEXT ++ else ++ shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1` ++ if test "$shobj_path" != "" -a -f "$shobj_path"; then ++ : ++ else ++ shobj_path= ++ fi ++ fi ++ if test "$shobj_path" != ""; then ++ AC_MSG_RESULT($shobj_path) ++ shobj_pathsymbol=SOPATH_`echo $shobj_name | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ AC_DEFINE_UNQUOTED($shobj_pathsymbol, "$shobj_path") ++ break ++ fi ++done ++if test "$shobj_path" = ""; then ++ AC_MSG_RESULT(no) ++fi ++])dnl ++ + dnl Find system shared object paths. + AC_FIND_SYSTEM_SHOBJ(libc) + if test "$install_runidn" = yes ; then +--- a/lib/Makefile.in 2003-03-12 17:14:41.000000000 +0100 ++++ b/lib/Makefile.in 2010-03-12 15:54:35.000000000 +0100 +@@ -241,7 +241,7 @@ + + install-common: + $(MKINSTALLDIRS) $(DESTDIR)$(libdir) +- $(LIBTOOL) $(INSTALL_DATA) $(LITELIB).la \ ++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LITELIB).la \ + $(DESTDIR)$(libdir)/$(LITELIB).la + -[ -f $(DESTDIR)$(libdir)/$(LITELIB).a ] \ + && $(RANLIB) $(DESTDIR)$(libdir)/$(LITELIB).a +@@ -262,7 +262,7 @@ + + install-nolite: + $(MKINSTALLDIRS) $(DESTDIR)$(libdir) +- $(LIBTOOL) $(INSTALL_DATA) $(LIB).la \ ++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LIB).la \ + $(DESTDIR)$(libdir)/$(LIB).la + -[ -f $(DESTDIR)$(libdir)/$(LIB).a ] \ + && $(RANLIB) $(DESTDIR)$(libdir)/$(LIB).a diff --git a/net-dns/idnkit/idnkit-1.0-r2.ebuild b/net-dns/idnkit/idnkit-1.0-r2.ebuild new file mode 100644 index 000000000000..961c3bb054ff --- /dev/null +++ b/net-dns/idnkit/idnkit-1.0-r2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit autotools eutils + +DESCRIPTION="Toolkit for Internationalized Domain Names (IDN)" +HOMEPAGE="http://www.nic.ad.jp/ja/idn/idnkit/download/" +SRC_URI="http://www.nic.ad.jp/ja/idn/idnkit/download/sources/${P}-src.tar.gz" + +LICENSE="JNIC" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +IUSE="static-libs" + +DEPEND="virtual/libiconv" + +S=${WORKDIR}/${P}-src + +src_prepare() { + # Bug 263135, old broken libtool bundled + rm -f aclocal.m4 || die "rm failed" + epatch "${FILESDIR}/${P}-autotools.patch" + mv configure.{in,ac} || die + eautoreconf +} + +src_configure() { + local myconf="" + if has_version dev-libs/libiconv; then + myconf="--with-iconv" + fi + econf $(use_enable static-libs static) ${myconf} +} + +src_install() { + default + use static-libs || find "${ED}" -name 'lib*.la' -delete + dodoc ChangeLog DISTFILES NEWS README README.ja +} diff --git a/net-dns/idnkit/metadata.xml b/net-dns/idnkit/metadata.xml new file mode 100644 index 000000000000..52363bff0cba --- /dev/null +++ b/net-dns/idnkit/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jer@gentoo.org</email> + <name>Jeroen Roovers</name> + </maintainer> +</pkgmetadata> diff --git a/net-dns/knot/Manifest b/net-dns/knot/Manifest new file mode 100644 index 000000000000..c3751167f721 --- /dev/null +++ b/net-dns/knot/Manifest @@ -0,0 +1,3 @@ +DIST knot-1.5.3.tar.gz 1175445 SHA256 8d82ad5b2c7162750dc40c57d45dcae2665171a862767a350379fe1c4e0afcdd SHA512 4426ed136e5bcdb0d2b1729ab838418c880728a045dc1a40a6b6fc2a3b77ddcd7a375c8ec160efb6d009fc12eaf55587cf00af141f84d0bd1eb9cdac888fd445 WHIRLPOOL dbc1f59e2f2801f61dfbff4f2fcdc33e72647226e300adc85e9b0febd996aaad9615da33e21ebe22f83c6bf4c52cbcb7ca3a60fef8b66a9339d08f255909f16d +DIST knot-1.6.3.tar.xz 785052 SHA256 48da608e29c2c1ef5937eb692f8ef0462ebb50fa7d128478a23e0a9788533e86 SHA512 c39f74ec49ec13d845705a11cf4b5474f101687db5cc44be0c2c8347faacf2fe4436d684a3e96d99afedd8408da1c7b3ad39fa5dc7bc3e52dafc899ac3a04958 WHIRLPOOL 4d6ae6b05be05c5a0c11f707a2c438801e9e7570d1aa2e946f659d9ccec25728c972cfa6caf96ccedb34f95fa28f4e904179cc123f34a78889961902333ce0f5 +DIST knot-2.0.0-beta.tar.xz 939468 SHA256 7ed997d15b523abcaede51d7ce3670a687d7658b96eb742b9dd87ac5d3e0e9af SHA512 98c872eea28b00b5da52ff8c74c6cf1c88b11e3d68038126a76de99ae2b39c60430294382b14a530fc2912cad419a7d509386deb78b7faa64320cdec21a1bc36 WHIRLPOOL 3b505d757a7591d32e33a07e9a46cb210e886a566bed705b326ce4d5be18d62865fdf165a97e21c8ad756631a5a448ef9ded67bae0002047ad209d7dad2ab5b6 diff --git a/net-dns/knot/files/1.6.3-dont-create-extra-directories.patch b/net-dns/knot/files/1.6.3-dont-create-extra-directories.patch new file mode 100644 index 000000000000..e8d84a188592 --- /dev/null +++ b/net-dns/knot/files/1.6.3-dont-create-extra-directories.patch @@ -0,0 +1,15 @@ +--- src/Makefile.in.orig 2015-05-03 16:34:53.177934984 +0200 ++++ src/Makefile.in 2015-05-03 16:35:11.481325329 +0200 +@@ -2712,12 +2712,6 @@ + uninstall-sbinPROGRAMS + + +-# Create storage and run-time directories +-install-data-hook: +- $(INSTALL) -d $(DESTDIR)/@config_dir@ +- $(INSTALL) -d $(DESTDIR)/@run_dir@ +- $(INSTALL) -d $(DESTDIR)/@storage_dir@ +- + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/net-dns/knot/files/2.0.0_beta-dont-create-extra-directories.patch b/net-dns/knot/files/2.0.0_beta-dont-create-extra-directories.patch new file mode 100644 index 000000000000..538afecc5f62 --- /dev/null +++ b/net-dns/knot/files/2.0.0_beta-dont-create-extra-directories.patch @@ -0,0 +1,15 @@ +--- src/Makefile.in.orig 2015-05-10 20:59:26.854079700 +0200 ++++ src/Makefile.in 2015-05-10 21:00:01.870857369 +0200 +@@ -3401,12 +3401,6 @@ + uninstall-pkgconfigDATA uninstall-sbinPROGRAMS + + +-# Create storage and run-time directories +-@HAVE_DAEMON_TRUE@install-data-hook: +-@HAVE_DAEMON_TRUE@ $(INSTALL) -d $(DESTDIR)/@config_dir@ +-@HAVE_DAEMON_TRUE@ $(INSTALL) -d $(DESTDIR)/@run_dir@ +-@HAVE_DAEMON_TRUE@ $(INSTALL) -d $(DESTDIR)/@storage_dir@ +- + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/net-dns/knot/files/2.0.0_beta-spell-enable-vars-correctly.patch b/net-dns/knot/files/2.0.0_beta-spell-enable-vars-correctly.patch new file mode 100644 index 000000000000..5861ee5841c9 --- /dev/null +++ b/net-dns/knot/files/2.0.0_beta-spell-enable-vars-correctly.patch @@ -0,0 +1,11 @@ +--- configure.orig 2015-05-10 19:25:43.365929384 +0200 ++++ configure 2015-05-10 19:26:00.452648532 +0200 +@@ -12833,7 +12833,7 @@ + if test "$enable_daemon" = "yes"; then : + + +-if test "$enable_system" != "no"; then : ++if test "$enable_systemd" != "no"; then : + + case $enable_systemd in #( + auto) : diff --git a/net-dns/knot/files/knot.init b/net-dns/knot/files/knot.init new file mode 100644 index 000000000000..0894c2080daf --- /dev/null +++ b/net-dns/knot/files/knot.init @@ -0,0 +1,42 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +command=/usr/sbin/knotd +command_args="-d" +pidfile=/var/run/knot/knot.pid +required_files=/etc/knot/knot.conf +extra_started_commands="reload" +description_reload="Reload configuration and changed zones." + +depend() { + need net +} + +start() { + checkpath -d -m 0750 -o knot:knot /var/run/knot/ /var/lib/knot/ + + ebegin "Starting knot" + start-stop-daemon --start \ + --pidfile $pidfile --exec $command -- $command_args + eend $? +} + +stop() { + ebegin "Stoping knot" + /usr/sbin/knotc stop >/dev/null 2>&1 + # In case remote control is not working + if [ "$?" != 0 ]; then + if [ -f $pidfile ]; then + start-stop-daemon --stop --pidfile $pidfile + fi + fi + ewend $? +} + +reload() { + ebegin "Reloading knot" + /usr/sbin/knotc reload >/dev/null + eend $? +} diff --git a/net-dns/knot/knot-1.5.3.ebuild b/net-dns/knot/knot-1.5.3.ebuild new file mode 100644 index 000000000000..77b523f63892 --- /dev/null +++ b/net-dns/knot/knot-1.5.3.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +EGIT_REPO_URI="https://gitlab.labs.nic.cz/labs/${PN}.git" +[[ ${PV} == 9999 ]] && inherit autotools git-r3 +inherit eutils user + +DESCRIPTION="High-performance authoritative-only DNS server" +HOMEPAGE="http://www.knot-dns.cz/" +[[ ${PV} == 9999 ]] || SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +[[ ${PV} == 9999 ]] || \ +KEYWORDS="~amd64 ~x86" +IUSE="debug caps +fastparser idn" + +RDEPEND=" + dev-libs/openssl + dev-libs/userspace-rcu + caps? ( sys-libs/libcap-ng ) + idn? ( net-dns/libidn ) +" +# sys-libs/glibc +DEPEND="${RDEPEND} + virtual/pkgconfig + sys-devel/flex + virtual/yacc + fastparser? ( dev-util/ragel ) +" + +S="${WORKDIR}/${P/_/-}" + +src_prepare() { + [[ ${PV} == 9999 ]] && eautoreconf +} + +src_configure() { + econf \ + --with-storage="${EPREFIX}/var/lib/${PN}" \ + --with-rundir="${EPREFIX}/var/run/${PN}" \ + --disable-lto \ + --enable-recvmmsg \ + $(use_enable fastparser) \ + $(use_enable debug debug server,zones,xfr,packet,dname,rr,ns,hash,compiler) \ + $(use_enable debug debuglevel details) \ + $(use_with idn libidn) +} + +src_install() { + default + newinitd "${FILESDIR}/knot.init" knot +} + +pkg_postinst() { + enewgroup knot 53 + enewuser knot 53 -1 /var/lib/knot knot +} diff --git a/net-dns/knot/knot-1.6.3.ebuild b/net-dns/knot/knot-1.6.3.ebuild new file mode 100644 index 000000000000..9b45a0ef6952 --- /dev/null +++ b/net-dns/knot/knot-1.6.3.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils user + +DESCRIPTION="High-performance authoritative-only DNS server" +HOMEPAGE="http://www.knot-dns.cz/" +SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug dnstap doc caps +fastparser idn lmdb systemd" + +RDEPEND=" + >=dev-libs/openssl-1.0.1 + >=dev-libs/userspace-rcu-0.5.4 + caps? ( >=sys-libs/libcap-ng-0.6.4 ) + dnstap? ( dev-libs/fstrm dev-libs/protobuf-c ) + idn? ( net-dns/libidn ) + lmdb? ( dev-db/lmdb ) + systemd? ( sys-apps/systemd ) +" + +DEPEND="${RDEPEND} + virtual/pkgconfig + sys-devel/flex + sys-devel/bison + doc? ( dev-python/sphinx app-text/texlive-core sys-apps/texinfo ) +" + +S="${WORKDIR}/${P/_/-}" + +src_prepare() { + epatch "${FILESDIR}/${PV}-dont-create-extra-directories.patch" +} + +src_configure() { + econf \ + --with-storage="${EPREFIX}/var/lib/${PN}" \ + --with-rundir="${EPREFIX}/var/run/${PN}" \ + $(use_enable fastparser) \ + $(use_enable debug debug server,zones,xfr,packet,rr,ns,loader,dnssec) \ + $(use_enable debug debuglevel details) \ + $(use_enable dnstap) \ + $(use_enable lmdb) \ + $(use_with idn libidn) \ + $(usex systemd --enable-systemd=yes --enable-systemd=no) +} + +src_compile() { + default + use doc && emake -C doc html-local singlehtml pdf-local info-local +} + +# Portage's automatic test code runs "make -n check" to see if there +# is a "check" target, but that fails here because the test +# infrastructure hasn't been built yet. Just run "make check", which +# will build it and then run the tests. +src_test() { + emake -j1 check +} + +src_install() { + default + keepdir /var/lib/${PN} + + if use doc; then + dodoc doc/_build/latex/KnotDNS.pdf + + docinto html + dodoc doc/_build/html/*.html doc/_build/html/*.js + docinto html/_sources + dodoc doc/_build/html/_sources/* + docinto html/_static + dodoc doc/_build/html/_static/* + + docinto singlehtml + dodoc doc/_build/singlehtml/index.html + docinto singlehtml/_static/ + dodoc doc/_build/singlehtml/_static/* + + doinfo doc/_build/texinfo/KnotDNS.info + fi + + newinitd "${FILESDIR}/knot.init" knot +} + +pkg_postinst() { + enewgroup knot 53 + enewuser knot 53 -1 /var/lib/knot knot +} diff --git a/net-dns/knot/knot-2.0.0_beta.ebuild b/net-dns/knot/knot-2.0.0_beta.ebuild new file mode 100644 index 000000000000..0ed9ae004946 --- /dev/null +++ b/net-dns/knot/knot-2.0.0_beta.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils user + +DESCRIPTION="High-performance authoritative-only DNS server" +HOMEPAGE="http://www.knot-dns.cz/" +SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" +IUSE="debug dnstap doc caps +fastparser idn systemd" + +RDEPEND=" + >=net-libs/gnutls-3.0 + >=dev-libs/jansson-2.3 + dev-db/lmdb + >=dev-libs/userspace-rcu-0.5.4 + caps? ( >=sys-libs/libcap-ng-0.6.4 ) + dnstap? ( dev-libs/fstrm dev-libs/protobuf-c ) + idn? ( net-dns/libidn ) + systemd? ( sys-apps/systemd ) +" + +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( dev-python/sphinx app-text/texlive-core sys-apps/texinfo ) +" + +S="${WORKDIR}/${P/_/-}" + +src_prepare() { + epatch "${FILESDIR}/${PV}-spell-enable-vars-correctly.patch" + epatch "${FILESDIR}/${PV}-dont-create-extra-directories.patch" +} + +src_configure() { + econf \ + --with-storage="${EPREFIX}/var/lib/${PN}" \ + --with-rundir="${EPREFIX}/var/run/${PN}" \ + --with-lmdb \ + $(use_enable fastparser) \ + $(use_enable debug debug server,zones,ns,loader,dnssec) \ + $(use_enable debug debuglevel details) \ + $(use_enable dnstap) \ + $(use_enable doc documentation) \ + $(use_with idn libidn) \ + $(usex systemd --enable-systemd=yes --enable-systemd=no) +} + +src_compile() { + default + use doc && emake -C doc html-local singlehtml pdf-local info-local +} + +# Portage's automatic test code runs "make -n check" to see if there +# is a "check" target, but that fails here because the test +# infrastructure hasn't been built yet. Just run "make check", which +# will build it and then run the tests. +src_test() { + emake -j1 check +} + +src_install() { + default + keepdir /var/lib/${PN} + + if use doc; then + dodoc doc/_build/latex/KnotDNS.pdf + + docinto html + dodoc doc/_build/html/*.html doc/_build/html/*.js + docinto html/_sources + dodoc doc/_build/html/_sources/* + docinto html/_static + dodoc doc/_build/html/_static/* + + docinto singlehtml + dodoc doc/_build/singlehtml/index.html + docinto singlehtml/_static/ + dodoc doc/_build/singlehtml/_static/* + + doinfo doc/_build/texinfo/KnotDNS.info + fi + + newinitd "${FILESDIR}/knot.init" knot +} + +pkg_postinst() { + enewgroup knot 53 + enewuser knot 53 -1 /var/lib/knot knot +} diff --git a/net-dns/knot/metadata.xml b/net-dns/knot/metadata.xml new file mode 100644 index 000000000000..29256af3d08f --- /dev/null +++ b/net-dns/knot/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>ondrej@sury.org</email> + <name>Ondřej Surý</name> + </maintainer> + <maintainer> + <email>scarabeus@gentoo.org</email> + </maintainer> + <use> + <flag name="dnstap">Include support for the dnstap + binary log format (http://dnstap.info/). + </flag> + <flag name="fastparser">Use a zone file parser that is + faster, but requires more memory and CPU time to + compile. + </flag> + <flag name="lmdb">Use the LMDB database to store + timers for slave zones on disk, making the timers + persist across server restarts. + </flag> + </use> +</pkgmetadata> diff --git a/net-dns/ldns-utils/Manifest b/net-dns/ldns-utils/Manifest new file mode 100644 index 000000000000..1c53a2a1a0a7 --- /dev/null +++ b/net-dns/ldns-utils/Manifest @@ -0,0 +1,2 @@ +DIST ldns-1.6.12.tar.gz 1057607 SHA256 b966787510a169ca0ed78f9a8a5de01fb309909575e721ead92095d4677aa51c SHA512 f928be35a5c0bc2b918f005dd592cc531451f373ed9d77a54d5207a2a80b9d525faabf75bba75483d3476cfeff75a66ad4d9527a84a983216dae4fac30213773 WHIRLPOOL 0e8cf513991850b065144568ec1ea3188ddb6bbf6b3cf08490186552884b2b2dd42ae8ab8995f54c183a989976ab292772411f2582a5bd595d4d54d25e2b4096 +DIST ldns-1.6.17.tar.gz 1315403 SHA256 8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd SHA512 5de42b4b8622591db51efb0956735deee9cd5e0bee12249a03b65c5b45d7c51bf9c2edb310ef9d7431af49aef77d968bfa2455a7dedfa80cde3d433436c83785 WHIRLPOOL 08c8a13df3dbeccd5dc5ceeb52730a61ab231e70a85524e826f9275bbcde6e09d6e2fc5234303a6bceb431d2b91f510140ce61a2b59d77afbb2759a0627c7cb7 diff --git a/net-dns/ldns-utils/files/1.6.12-cflags.patch b/net-dns/ldns-utils/files/1.6.12-cflags.patch new file mode 100644 index 000000000000..5e14a20ad37c --- /dev/null +++ b/net-dns/ldns-utils/files/1.6.12-cflags.patch @@ -0,0 +1,22 @@ +diff -Naur ldns-1.6.12.orig/drill/configure.ac ldns-1.6.12/drill/configure.ac +--- ldns-1.6.12.orig/drill/configure.ac 2011-11-17 00:48:16.000000000 +0900 ++++ ldns-1.6.12/drill/configure.ac 2012-01-12 00:20:51.944503474 +0900 +@@ -33,7 +33,6 @@ + ACX_CHECK_COMPILER_FLAG(xc99, [C99FLAG="-xc99"]) + + AC_TYPE_SIZE_T +-ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"]) + + ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600, + [ +diff -Naur ldns-1.6.12.orig/examples/configure.ac ldns-1.6.12/examples/configure.ac +--- ldns-1.6.12.orig/examples/configure.ac 2011-09-29 22:04:19.000000000 +0900 ++++ ldns-1.6.12/examples/configure.ac 2012-01-12 00:21:03.191504702 +0900 +@@ -31,7 +31,6 @@ + + + AC_TYPE_SIZE_T +-ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"]) + + ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600, + [ diff --git a/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild b/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild new file mode 100644 index 000000000000..22a507be91bc --- /dev/null +++ b/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" +inherit autotools eutils + +MY_P="${P/-utils}" +DESCRIPTION="Set of utilities to simplify various dns(sec) tasks" +HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/" +SRC_URI="http://www.nlnetlabs.nl/downloads/ldns/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="examples gost ssl" + +DEPEND=">=net-libs/ldns-${PV}[gost?,ssl?] + examples? ( net-libs/libpcap )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + # bug #369339 + epatch "${FILESDIR}/1.6.12-cflags.patch" + + ( cd drill && eautoreconf ) + ( cd examples && eautoreconf ) +} + +src_configure() { + cd "${S}"/drill + econf $(use_with ssl) || die + + if use examples; then + cd "${S}"/examples + econf \ + $(use_enable gost) \ + $(use_enable ssl sha2) \ + $(use_with ssl) || die + fi +} + +src_compile() { + emake -C drill || die "emake for drill failed" + if use examples; then + emake -C examples || die "emake for examples failed" + fi +} + +src_install() { + cd "${S}"/drill + emake DESTDIR="${D}" install || die "emake install for drill failed" + dodoc ChangeLog.22-nov-2005 README REGRESSIONS || die + + if use examples; then + cd "${S}"/examples + emake DESTDIR="${D}" install || die "emake install for examples failed" + newdoc README README.examples || die + fi +} diff --git a/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild b/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild new file mode 100644 index 000000000000..1893881d6987 --- /dev/null +++ b/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_P=${P/-utils} + +DESCRIPTION="Set of utilities to simplify various dns(sec) tasks" +HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/" +SRC_URI="http://www.nlnetlabs.nl/downloads/ldns/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="dane ecdsa examples gost ssl" + +DEPEND=">=net-libs/ldns-${PV}[dane?,ecdsa?,gost?,ssl?] + examples? ( net-libs/libpcap )" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +src_configure() { + cd "${S}"/drill + econf $(use_with ssl) + + if use examples; then + cd "${S}"/examples + econf \ + $(use_enable dane) \ + $(use_enable ecdsa) \ + $(use_enable gost) \ + $(use_enable ssl sha2) \ + $(use_with ssl) + fi +} + +src_compile() { + emake -C drill + if use examples; then + emake -C examples + fi +} + +src_install() { + cd "${S}"/drill + emake DESTDIR="${D}" install + dodoc ChangeLog.22-nov-2005 README REGRESSIONS + + if use examples; then + cd "${S}"/examples + emake DESTDIR="${D}" install + newdoc README README.examples + fi +} diff --git a/net-dns/ldns-utils/metadata.xml b/net-dns/ldns-utils/metadata.xml new file mode 100644 index 000000000000..b2c0747cedca --- /dev/null +++ b/net-dns/ldns-utils/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>mschiff@gentoo.org</email> + <name>Marc Schiffbauer</name> + </maintainer> + <longdescription lang="en"> + ldns is a library with the aim to simplify DNS programing in C. All + lowlevel DNS/DNSSEC operations are supported. We also define a higher + level API which allows a programmer to (for instance) create or sign + packets. + </longdescription> + <use> + <flag name='dane'>Enable DNS-based Authentication of Named Entities (DANE) support</flag> + <flag name='ecdsa'>Enable ECDSA support</flag> + <flag name='gost'>Enable GOST support</flag> + </use> +</pkgmetadata> diff --git a/net-dns/libidn/Manifest b/net-dns/libidn/Manifest new file mode 100644 index 000000000000..287bbf2c7b59 --- /dev/null +++ b/net-dns/libidn/Manifest @@ -0,0 +1,2 @@ +DIST libidn-1.30.tar.gz 3474545 SHA256 39b9fc94d74081c185757b12e0891ce5a22db55268e7d1bb24533ff4432eb053 SHA512 066b3bd098f2ef39361ee42ec0abfcc69ba695b1565a81905e2047fa453c328a2d674703ac873a4e5a349632151ce5d6d56328b93fae42ca5e658190949a26a9 WHIRLPOOL a6fff4c283e0a556d8d5772f496468761030200935aa649d31e7e305cc1c215e578d13c518470f062b5cf54fb893c6c259023d88aa209216039a2319e7ed5dce +DIST libidn-1.32.tar.gz 3483155 SHA256 ba5d5afee2beff703a34ee094668da5c6ea5afa38784cebba8924105e185c4f5 SHA512 fd48665b65f88210ea504675fc1cd667bd4042b1df3e386847070a465d6753efcec735e6e8572f45f9432235e813c61ef7df09596274935467fdc6f12f80b9bd WHIRLPOOL 1ea67bc1cf1dc9887c6721d5ed15a9227424bdb88f5a915b5854a2ba747228849acaf1a71e9869972cff1887742b031cc57f66c6a1aafac10e65b42dbee9a2f6 diff --git a/net-dns/libidn/files/50libidn-gentoo.el b/net-dns/libidn/files/50libidn-gentoo.el new file mode 100644 index 000000000000..6ab280c64eb9 --- /dev/null +++ b/net-dns/libidn/files/50libidn-gentoo.el @@ -0,0 +1,12 @@ + +;;; libidn site-lisp configuration + +(add-to-list 'load-path "@SITELISP@") +(autoload 'idna-to-ascii "idna" + "Returns an ASCII Compatible Encoding (ACE) of STR.") +(autoload 'idna-to-unicode "idna" + "Returns a possibly multibyte string after decoding STR.") +(autoload 'punycode-encode "punycode" + "Returns a Punycode encoding of STR.") +(autoload 'punycode-decode "punycode" + "Returns a possibly multibyte string which is the punycode decoding of STR.") diff --git a/net-dns/libidn/libidn-1.30.ebuild b/net-dns/libidn/libidn-1.30.ebuild new file mode 100644 index 000000000000..718675dc5504 --- /dev/null +++ b/net-dns/libidn/libidn-1.30.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit elisp-common java-pkg-opt-2 mono-env multilib-minimal + +DESCRIPTION="Internationalized Domain Names (IDN) implementation" +HOMEPAGE="http://www.gnu.org/software/libidn/" +SRC_URI="mirror://gnu/libidn/${P}.tar.gz" + +LICENSE="GPL-2 GPL-3 LGPL-3 java? ( Apache-2.0 )" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc emacs java mono nls static-libs" + +DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS TODO ) +COMMON_DEPEND=" + emacs? ( virtual/emacs ) + mono? ( >=dev-lang/mono-0.95 ) +" +DEPEND="${COMMON_DEPEND} + nls? ( >=sys-devel/gettext-0.17 ) + java? ( + >=virtual/jdk-1.5 + doc? ( dev-java/gjdoc ) + ) +" +RDEPEND="${COMMON_DEPEND} + nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] ) + java? ( >=virtual/jre-1.5 ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20140508-r5 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + ) +" + +pkg_setup() { + mono-env_pkg_setup + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + # bundled, with wrong bytecode + rm "${S}/java/${P}.jar" || die +} + +multilib_src_configure() { + ECONF_SOURCE=${S} \ + econf \ + $(multilib_native_use_enable java) \ + $(multilib_native_use_enable mono csharp mono) \ + $(use_enable nls) \ + $(use_enable static-libs static) \ + --disable-silent-rules \ + --disable-valgrind-tests \ + --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \ + --with-packager-bug-reports="https://bugs.gentoo.org" \ + --with-packager-version="r${PR}" \ + --with-packager="Gentoo" +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use emacs; then + elisp-compile "${S}"/src/*.el || die + fi +} + +multilib_src_test() { + # only run libidn specific tests and not gnulib tests (bug #539356) + emake -C tests check +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi && use java; then + java-pkg_newjar java/${P}.jar ${PN}.jar || die + rm -r "${ED}"/usr/share/java || die + + if use doc ; then + java-pkg_dojavadoc doc/java + fi + fi +} + +multilib_src_install_all() { + if use emacs; then + # *.el are installed by the build system + elisp-install ${PN} "${S}"/src/*.elc + elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" + else + rm -r "${ED}/usr/share/emacs" || die + fi + + einstalldocs + if use doc ; then + dohtml -r doc/reference/html/. + fi + + prune_libtool_files +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/net-dns/libidn/libidn-1.32.ebuild b/net-dns/libidn/libidn-1.32.ebuild new file mode 100644 index 000000000000..dfcda6f7b359 --- /dev/null +++ b/net-dns/libidn/libidn-1.32.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit elisp-common java-pkg-opt-2 mono-env multilib-minimal + +DESCRIPTION="Internationalized Domain Names (IDN) implementation" +HOMEPAGE="http://www.gnu.org/software/libidn/" +SRC_URI="mirror://gnu/libidn/${P}.tar.gz" + +LICENSE="GPL-2 GPL-3 LGPL-3 java? ( Apache-2.0 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc emacs java mono nls static-libs" + +DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS TODO ) +COMMON_DEPEND=" + emacs? ( virtual/emacs ) + mono? ( >=dev-lang/mono-0.95 ) +" +DEPEND="${COMMON_DEPEND} + nls? ( >=sys-devel/gettext-0.17 ) + java? ( + >=virtual/jdk-1.5 + doc? ( dev-java/gjdoc ) + ) +" +RDEPEND="${COMMON_DEPEND} + nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] ) + java? ( >=virtual/jre-1.5 ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20140508-r5 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + ) +" + +pkg_setup() { + mono-env_pkg_setup + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + # bundled, with wrong bytecode + rm "${S}/java/${P}.jar" || die +} + +multilib_src_configure() { + ECONF_SOURCE=${S} \ + econf \ + $(multilib_native_use_enable java) \ + $(multilib_native_use_enable mono csharp mono) \ + $(use_enable nls) \ + $(use_enable static-libs static) \ + --disable-silent-rules \ + --disable-valgrind-tests \ + --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \ + --with-packager-bug-reports="https://bugs.gentoo.org" \ + --with-packager-version="r${PR}" \ + --with-packager="Gentoo" +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use emacs; then + elisp-compile "${S}"/src/*.el || die + fi +} + +multilib_src_test() { + # only run libidn specific tests and not gnulib tests (bug #539356) + emake -C tests check +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi && use java; then + java-pkg_newjar java/${P}.jar ${PN}.jar || die + rm -r "${ED}"/usr/share/java || die + + if use doc ; then + java-pkg_dojavadoc doc/java + fi + fi +} + +multilib_src_install_all() { + if use emacs; then + # *.el are installed by the build system + elisp-install ${PN} "${S}"/src/*.elc + elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" + else + rm -r "${ED}/usr/share/emacs" || die + fi + + einstalldocs + if use doc ; then + dohtml -r doc/reference/html/. + fi + + prune_libtool_files +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/net-dns/libidn/metadata.xml b/net-dns/libidn/metadata.xml new file mode 100644 index 000000000000..52363bff0cba --- /dev/null +++ b/net-dns/libidn/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jer@gentoo.org</email> + <name>Jeroen Roovers</name> + </maintainer> +</pkgmetadata> diff --git a/net-dns/libidn2/Manifest b/net-dns/libidn2/Manifest new file mode 100644 index 000000000000..2e14bdd2ce09 --- /dev/null +++ b/net-dns/libidn2/Manifest @@ -0,0 +1 @@ +DIST libidn2-0.10.tar.gz 1580496 SHA256 3d301890bdbb137424f5ea495f82730a4b85b6a2549e47de3a34afebeac3e0e3 SHA512 a1830ddb50d6c03056bf18c460b05a816988f16dd25c81b85571002b432c96230115b73ecb839a12703ea5c33b44bd844f48ef7a7c97b93d97d1d101ab3e875f WHIRLPOOL 39b37e78ce7b94af9e3170a76852505b364d37ea949bead96eefdd855d480d918a29387ca50d9bcb7f0209f2e831124450315044c2ba8a14d926b1a8e8a2124e diff --git a/net-dns/libidn2/files/libidn2-0.10-Werror.patch b/net-dns/libidn2/files/libidn2-0.10-Werror.patch new file mode 100644 index 000000000000..64b7597b5211 --- /dev/null +++ b/net-dns/libidn2/files/libidn2-0.10-Werror.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -27,7 +27,7 @@ + AC_CONFIG_AUX_DIR([build-aux]) + AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_MACRO_DIR([m4]) +-AM_INIT_AUTOMAKE([-Wall -Werror]) ++AM_INIT_AUTOMAKE([-Wall]) + + AC_PROG_CC + gl_EARLY diff --git a/net-dns/libidn2/files/libidn2-0.10-examples.patch b/net-dns/libidn2/files/libidn2-0.10-examples.patch new file mode 100644 index 000000000000..755f192e828c --- /dev/null +++ b/net-dns/libidn2/files/libidn2-0.10-examples.patch @@ -0,0 +1,11 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -15,7 +15,7 @@ + + DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc + +-SUBDIRS = gl . src doc examples tests ++SUBDIRS = gl . src doc tests + ACLOCAL_AMFLAGS = -I m4 -I gl/m4 + EXTRA_DIST = gl/m4/gnulib-cache.m4 + diff --git a/net-dns/libidn2/libidn2-0.10.ebuild b/net-dns/libidn2/libidn2-0.10.ebuild new file mode 100644 index 000000000000..f33f7e4c71e5 --- /dev/null +++ b/net-dns/libidn2/libidn2-0.10.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="An implementation of the IDNA2008 specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893)" +HOMEPAGE="http://www.gnu.org/software/libidn/#libidn2" +SRC_URI="mirror://gnu-alpha/libidn/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="static-libs" + +src_prepare() { + epatch "${FILESDIR}"/${P}-examples.patch + epatch "${FILESDIR}"/${P}-Werror.patch + eautoreconf +} + +src_configure() { + econf \ + $(use_enable static-libs static) +} diff --git a/net-dns/libidn2/metadata.xml b/net-dns/libidn2/metadata.xml new file mode 100644 index 000000000000..3fcf9a077c2a --- /dev/null +++ b/net-dns/libidn2/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>jer@gentoo.org</email> +</maintainer> +</pkgmetadata> diff --git a/net-dns/maradns/Manifest b/net-dns/maradns/Manifest new file mode 100644 index 000000000000..fa432eb341b7 --- /dev/null +++ b/net-dns/maradns/Manifest @@ -0,0 +1 @@ +DIST maradns-2.0.09.tar.bz2 1139409 SHA256 e1ee80836f0fbc47b9b94ec839e112ea19c40bed0b70d672d231849a4dea1083 SHA512 42bfcafaf4e465d8d566b4d9ea8383b5d0f553486b86dd807b35a07358987227e5dc8187de0e8192fba5b53098d61f91091cec112ef7cc80c5d5e73d8acff3bf WHIRLPOOL 6f3e55d8c6633a465c0e9de576921d833c67332cf0cbc8c01e7bc7d70c46102c32566d0ee867cdbf11c8b2b1d5cdc40d18ee4791bd0a4e045ad0e0bc590e61d6 diff --git a/net-dns/maradns/files/deadwood b/net-dns/maradns/files/deadwood new file mode 100644 index 000000000000..d9e8175ad5eb --- /dev/null +++ b/net-dns/maradns/files/deadwood @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +start() { + ebegin "Starting deadwood" + start-stop-daemon --start --quiet --name deadwood --wait 1000 \ + --exec /usr/bin/duende /usr/sbin/Deadwood -- -f /etc/maradns/dwood3rc + eend $? +} + +stop() { + ebegin "Stopping deadwood" + start-stop-daemon --stop --quiet --name deadwood --wait 1000 \ + --exec /usr/bin/duende + eend $? +} diff --git a/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch b/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch new file mode 100644 index 000000000000..107097159c83 --- /dev/null +++ b/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch @@ -0,0 +1,251 @@ +Author: Nicholas Bamber <nicholas@periapt.co.uk> +Subject: askmara-tcp lazily copies askmara usage and man page +Last-Updated: 2011-09-21 +Forwarded: no +--- a/tools/askmara_labels_en.h ++++ b/tools/askmara_labels_en.h +@@ -1,11 +1,12 @@ + /* Placed in the public domain 2001 by Sam Trenholme */ + +-/* All of the labels for replies used in askmara */ ++/* All of the labels for replies used in askmara(-tcp) */ + + #define L_NEWLINE "\n" + #define L_HARD_ERROR "Hard Error: " + #define L_QUERYING "Querying the server with the IP " + #define L_USAGE "Usage: askmara [-n] [-v | -t timeout] Query [server]\n#Example: askmara Ayahoo.com." ++#define L_USAGE_TCP "Usage: askmara-tcp [-n] [-v | -t timeout] Query [server]\n#Example: askmara-tcp Ayahoo.com." + #define L_JS_CREATE_INDATA "js_create with indata" + #define L_JS_CREATE_UINDATA "js_create with uindata" + #define L_JS_CREATE_OUTDATA "js_create with outdata" +--- a/tools/askmara-tcp.c ++++ b/tools/askmara-tcp.c +@@ -190,7 +190,7 @@ + nrd = 1; + else if(argv[0][0] == '-' && argv[0][1] == 'p') { + if(argc < 2) { +- harderror(L_USAGE); ++ harderror(L_USAGE_TCP); + } + argc--; + argv++; +@@ -201,7 +201,7 @@ + } + else if(argv[0][0] == '-' && argv[0][1] == 't') { + if(argc < 2) { +- harderror(L_USAGE); ++ harderror(L_USAGE_TCP); + } + argc--; + argv++; +@@ -213,14 +213,14 @@ + else if (argv[0][0] != '-') + break; + else +- harderror(L_USAGE); ++ harderror(L_USAGE_TCP); + argc--; + argv++; + } + + /* we expect now the query string and possibly the server */ + if(argc<1) +- harderror(L_USAGE); ++ harderror(L_USAGE_TCP); + + /* Determine what IP address to connect to */ + if(argc>1) +--- /dev/null ++++ b/doc/en/man/askmara-tcp.1 +@@ -0,0 +1,191 @@ ++.\" Do *not* edit this file; it was automatically generated by ej2man ++.\" Look for a name.ej file with the same name as this filename ++.\" ++.\" Process this file with the following ++.\" nroff -man -Tutf8 maradns.8 | tr '\020' ' ' ++.\" ++.\" Last updated Mon Sep 27 15:36:06 2010 ++.\" ++.TH ASKMARA-TCP 1 "askmara-tcp" "January 2002" "askmara-tcp" ++.\" We don't want hyphenation (it's too ugly) ++.\" We also disable justification when using nroff ++.\" Due to the way the -mandoc macro works, this needs to be placed ++.\" after the .TH heading ++.hy 0 ++.if n .na ++.\" ++.\" We need the following stuff so that we can have single quotes ++.\" In both groff and other UNIX *roff processors ++.if \n(.g .mso www.tmac ++.ds aq \(aq ++.if !\n(.g .if '\(aq'' .ds aq \' ++ ++.SH "NAME" ++.PP ++askmara-tcp \- do simple dns queries over TCP ++.SH "DESCRIPTION" ++.PP ++.B "askmara-tcp" ++queries the user-specified dns server for records, and ++outputs the reply in a csv2-compatible format (csv2 is the format of ++zone ++files that ++.B "maradns" ++uses). However unlike ++.B "askmara" ++it uses TCP rather than UDP. ++.SH "USAGE" ++.PP ++.B "askmara-tcp" ++.RB [ -n ] ++.RB [ -v | -t ++.IR timeout ] ++.I query ++.RI [ server ] ++.SH "OPTIONS" ++.PP ++.TP 4 ++.BI -t ++If this is present, the following argument is the askmara-tcp ++.IR timeout , ++in seconds. Note that ++.B "askmara-tcp" ++can not both have a user-defined ++timeout and verbose output. ++.TP 4 ++.BI -v ++If this is set, ++.B "askmara-tcp" ++will verbosely output the complete reply that the server sent. Note ++that this verbose output is not csv2-compatible. ++.TP 4 ++.BI -n ++If this is set, ++.BR "askmara-tcp" "," ++when sending out a query, will not ++request DNS recursion; in other words, askmara-tcp will request that the ++remote DNS server not contact other DNS servers to answer the query in ++question. ++.TP 4 ++.I query ++dns record to be queried. The query has two sections: ++The type of record we desire, and the hostname we want this record for. ++.PP ++The type of query can have two forms: A one-letter mnemonic, or a ++numeric rtype followed by a colon. This is immediately concatenated by ++the full name of the host name we wish to look up. ++.PP ++For example, to ask for the IP of \(aqexample.com.\(aq, we can use the ++one-letter ++mnemonic, in the form \(aqAexample.com.\(aq, or we can use the numeric ++RR followed ++by a colon, giving the query \(aq1:example.com.\(aq (since A has the ++record type ++of one). Note that the query name needs the trailing dot at the end. ++.PP ++Askmara supports a handful one-letter mnemonics, as follows: ++.PP ++.B "A" ++signifies a request for an A (ipv4 address) RR ++.PP ++.B "N" ++signifies a NS RR ++.PP ++.B "C" ++signifies that we are asking for a CNAME RR ++.PP ++.B "S" ++signifies that we want a SOA RR ++.PP ++.B "P" ++signifies that we want a PTR RR ++.PP ++.B "@" ++signifies that we mant a MX RR ++.PP ++.B "T" ++signifies that we want a TXT RR ++.PP ++.B "Z" ++signifies that we want to ask for all RRs. ++.TP 4 ++.I server ++IP address of the dns server to be queried. If no server is given, ++askmara-tcp will query 127.0.0.1. ++.PP ++.SH "EXAMPLES" ++.PP ++Asking the server with the ip 127.0.0.1 for the IP address of ++example.com: ++ ++.nf ++askmara-tcp Aexample.com. ++.fi ++ ++Asking the server with the ip 198.41.0.4 for the IP address of ++example.com: ++ ++.nf ++askmara-tcp Aexample.com. 198.41.0.4 ++.fi ++ ++Asking the server with the ip address 127.0.0.1 for the IP address of ++example.com, using the rr_number:query format: ++ ++.nf ++askmara-tcp 1:example.com. ++.fi ++ ++Asking the server with the ip address 127.0.0.1 for a SRV record. In ++particular, we ask for the "http over tcp" service for example.net. ++Since askmara-tcp doesn\(aqt have a mnemonic for SRV record types, we ++use the numeric code (33 for SRV): ++ ++.nf ++askmara-tcp 33:_http._tcp.example.net. ++.fi ++ ++Asking the server with the ip address 127.0.0.1 for the AAAA (ipv6 ip) ++record for example.net: ++ ++.nf ++askmara-tcp 28:example.net. ++.fi ++ ++Note that the output will be a raw DNS packet in both the SRV ++and AAAA examples. ++.SH "BUGS" ++.PP ++When askmara-tcp is asked for an SOA record, the output of ++.B "askmara-tcp" ++closely resembles the format of a csv2 file, but can not be parsed as a ++csv2 file without modification. ++.PP ++askmara-tcp outputs multi-chunk ("character-string") TXT ++records incorrectly (it only outputs the first chunk). ++.SH "SEE ALSO" ++.PP ++.B maradns(8), ++.B askmara(1) ++ ++.br ++http://www.maradns.org ++.SH "LEGAL DISCLAIMER" ++.PP ++THIS SOFTWARE IS PROVIDED BY THE AUTHORS \(aq\(aqAS IS\(aq\(aq AND ANY ++EXPRESS ++OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE ++LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ++BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ++WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ++OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++.SH "AUTHOR" ++.PP ++MaraDNS is written by Sam Trenholme. Jaakko Niemi used 5 minutes ++to roll this manpage together, which Sam has subsequently revised. ++ diff --git a/net-dns/maradns/files/maradns-2.0.06-duende-man.patch b/net-dns/maradns/files/maradns-2.0.06-duende-man.patch new file mode 100644 index 000000000000..8e9283bc0802 --- /dev/null +++ b/net-dns/maradns/files/maradns-2.0.06-duende-man.patch @@ -0,0 +1,109 @@ +Author: Nicholas Bamber <nicholas@periapt.co.uk> +Subject: Duende man page + We have made various changes to the duende executable and these need to + be reflected in the Debian man page. +Forwarded: yes +Last-Update: 2011-07-18 +--- a/doc/en/man/duende.8 ++++ b/doc/en/man/duende.8 +@@ -29,11 +29,12 @@ + makes a given child process a daemon. The standard output + and standard error + of the child process is logged via syslog() with a priority of +-LOG_INFO. ++LOG_ALERT. + .SH "USAGE" + .PP + .B "duende" +-child_process [ all subsequent arguments passed on to child ] ++.RB [ options ] ++child_process [ arguments passed onto child ] + .SH "DETAILS" + .PP + When +@@ -76,48 +77,52 @@ + duende uses a setuid() call to change the user ID of the logging + process + to the user with ID 66. ++.SH "OPTIONS" ++.PP ++Most of the above behaviour can be configured by command line arguments. ++.TP 4 ++.BI -c | --chroot " directory" ++The log helper process will change its directory and root to this location. ++This defaults to ++.B /etc/maradns/logger "." ++.TP 4 ++.BI -i | --ident " string" ++The log helper process will use this string to identify the process when ++sending messages to syslog. ++This defaults to ++.B log-help "." ++.TP 4 ++.BI -p | --pid " filename" ++If this argument is present, the duende parent process will store its pid in ++this file. ++.TP 4 ++.BI -u | --uid " integer" ++The log helper process will drop its user id to this. This value defaults to ++66. ++.TP 4 ++.BI -g | --gid " integer" ++The log helper process will drop its group id to this. This value defaults to ++66. ++.TP 4 ++.BI -r | --restart_on " integer" ++The log helper process will restart the child process if it exists with this ++status code. This defaults to 8. + .SH "LOGGING" + .PP + .B "duende" + uses the syslog() facility to log the standard output of the + program that it invokes. The name of the program (in other words, the +-"ident" given to openlog()) is the full path of the first argument +-given +-to +-.BR "duende" "." ++"ident" given to openlog()) defaults to ++.BR "log-helper" ++but can be overridden with the ++.RB "--ident" ++argument. + All messages created by the child process are sent +-to syslog() with a priority of LOG_INFO and a "facility" +-of LOG_DAEMON (daemon.info in /etc/syslog.conf); since daemon.info +-messages are not logged by default in FreeBSD, on FreeBSD systems +-messages generated by the child process are logged with a priority of +-LOG_ALERT and a "facility" of LOG_DAEMON (daemon.alert in +-/etc/syslog.conf). ++to syslog() with a priority of LOG_ALERT and a "facility" ++of LOG_DAEMON (daemon.info in /etc/syslog.conf). + Should duende itself encounter an error, it will send + messages to syslog() with a priority of LOG_ALERT. + .PP +-For example, suppose one invokes duende thusly: +- +-.nf +- duende /usr/local/sbin/maradns +-.fi +- +-If invoked thusly, duende will log all messages with the "ident" +-(program +-name) of "/usr/local/sbin/maradns". If this is not desired, invoke +-duende +-with something like: +- +-.nf +- export PATH=$PATH:/usr/local/sbin +- duende maradns +-.fi +- +-This will log messages with a (more sensible) "ident" of maradns. +-.PP +-Note: If a non-POSIX Bourne shell (such as csh, es, rc, or fish) is +-used to +-invoke MaraDNS, the above syntax needs to be changed. +-.PP + Also, the directory /etc/maradns/logger, while used by duende, is not + used + to store any log messages. That is unless, for some reason, one diff --git a/net-dns/maradns/files/maradns-2.0.09-build.patch b/net-dns/maradns/files/maradns-2.0.09-build.patch new file mode 100644 index 000000000000..33622b9bc876 --- /dev/null +++ b/net-dns/maradns/files/maradns-2.0.09-build.patch @@ -0,0 +1,43 @@ +Index: maradns-2.0.09/build/Makefile.linux +=================================================================== +--- maradns-2.0.09.orig/build/Makefile.linux ++++ maradns-2.0.09/build/Makefile.linux +@@ -10,7 +10,7 @@ POBJECTS=parse/ParseMaraRc.o parse/Parse + DOBJECTS=dns/Queries.o dns/Compress.o dns/bobbit.o + # Secure random number generator objects + ROBJECTS=rng/rng-api-fst.o rng/rng-alg-fst.o +-OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS) ++OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS) -lrt + EXECS=server/maradns + + # Uncomment the following three lines to get this to compile on Solaris +@@ -28,19 +28,21 @@ Q="DEFINES=-DSELECT_PROBLEM" + + # Debug + +-FLAGS = -O2 -Wall -DSELECT_PROBLEM ++FLAGS=$(CFLAGS) $(LDFLAGS) -Wall -DSELECT_PROBLEM + M="CC=$(CC) $(FLAGS)" + D="CC=$(CC) $(FLAGS) -DDEBUG -DTHREADS" + #FLAGS = -g + + all: +- cd libs ; make $(M) ; cd ../dns ; make $(M) ; \ +- cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \ +- cd ../qual ; make $(M) ; cd ../server ; \ +- make $(M) $(V) COMPILED=\"$(COMPILED)\" ; \ +- cd ../tools ; make $(M) ; \ +- cd ../deadwood-*/src/ ; make FLAGS=-O2 ; \ +- cd ../../tcp ; make $(M) $(V) ; cat ../00README.FIRST ++ $(MAKE) -C libs $(M) ++ $(MAKE) -C dns $(M) ++ $(MAKE) -C rng $(M) ++ $(MAKE) -C parse $(M) ++ $(MAKE_ -C qual $(M) ++ $(MAKE) -C server $(M) $(V) COMPILED=\"$(COMPILED)\" ++ $(MAKE) -C tools $(M) ++ $(MAKE) -C deadwood-*/src $(M) ++ $(MAKE) -C tcp $(M) $(V) + + debug: + cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \ diff --git a/net-dns/maradns/files/maradns.rc6 b/net-dns/maradns/files/maradns.rc6 new file mode 100644 index 000000000000..32db2e419273 --- /dev/null +++ b/net-dns/maradns/files/maradns.rc6 @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net + provide dns +} + +start() { + ebegin "Starting maradns" + start-stop-daemon --start --quiet --name maradns \ + --exec /usr/bin/duende /usr/sbin/maradns + eend $? +} + +stop() { + ebegin "Stopping maradns" + start-stop-daemon --stop --quiet --name maradns \ + --exec /usr/sbin/duende + eend $? +} diff --git a/net-dns/maradns/files/maradns.service.in b/net-dns/maradns/files/maradns.service.in new file mode 100644 index 000000000000..f27d94653400 --- /dev/null +++ b/net-dns/maradns/files/maradns.service.in @@ -0,0 +1,9 @@ +[Unit] +Description=maradns DNS server +After=network.target + +[Service] +ExecStart=@bindir@/maradns -cf @sysconfdir@/mararc + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/maradns/files/maradns2 b/net-dns/maradns/files/maradns2 new file mode 100644 index 000000000000..cc6915f5b8e2 --- /dev/null +++ b/net-dns/maradns/files/maradns2 @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net + provide dns +} + +start() { + ebegin "Starting maradns" + start-stop-daemon --start --quiet --name maradns --wait 1000 \ + --exec /usr/bin/duende /usr/sbin/maradns -- -f /etc/maradns/mararc + eend $? +} + +stop() { + ebegin "Stopping maradns" + start-stop-daemon --stop --quiet --name maradns --wait 1000 \ + --exec /usr/bin/duende + eend $? +} diff --git a/net-dns/maradns/files/zoneserver.rc6 b/net-dns/maradns/files/zoneserver.rc6 new file mode 100644 index 000000000000..9d175a6320a3 --- /dev/null +++ b/net-dns/maradns/files/zoneserver.rc6 @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +start() { + ebegin "Starting zoneserver" + start-stop-daemon --start --quiet --name zoneserver \ + --exec /usr/bin/duende /usr/sbin/zoneserver + eend $? +} + +stop() { + ebegin "Stopping zoneserver" + start-stop-daemon --stop --quiet --name zoneserver + eend $? +} diff --git a/net-dns/maradns/files/zoneserver2 b/net-dns/maradns/files/zoneserver2 new file mode 100644 index 000000000000..6c6486d5e9ba --- /dev/null +++ b/net-dns/maradns/files/zoneserver2 @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +start() { + ebegin "Starting zoneserver" + start-stop-daemon --start --quiet --name zoneserver --wait 1000 \ + --exec /usr/bin/duende /usr/sbin/zoneserver -- -f /etc/maradns/mararc + eend $? +} + +stop() { + ebegin "Stopping zoneserver" + start-stop-daemon --stop --quiet --name zoneserver --wait 1000 \ + --exec /usr/bin/duende + eend $? +} diff --git a/net-dns/maradns/maradns-2.0.09.ebuild b/net-dns/maradns/maradns-2.0.09.ebuild new file mode 100644 index 000000000000..189839f84464 --- /dev/null +++ b/net-dns/maradns/maradns-2.0.09.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils systemd toolchain-funcs user + +DEADWOOD_VER="3.2.05" + +DESCRIPTION="A security-aware DNS server" +HOMEPAGE="http://www.maradns.org/" +SRC_URI="http://www.maradns.org/download/${PV%.*}/${PV}/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="amd64 ~mips ppc x86" +IUSE="authonly ipv6" + +DEPEND="" +RDEPEND="" + +pkg_setup() { + ebegin "Creating group and users" + enewgroup maradns 99 + enewuser duende 66 -1 -1 maradns + enewuser maradns 99 -1 -1 maradns + eend ${?} +} + +src_prepare() { + # Apply some minor patches from Debian. Last one - from Gentoo + epatch "${FILESDIR}/${PN}-2.0.06-askmara-tcp.patch" \ + "${FILESDIR}/${PN}-2.0.06-duende-man.patch" \ + "${FILESDIR}/${P}-build.patch" + epatch_user +} + +src_configure() { + # Use duende-ng.c. + cp "${S}/tools/duende-ng.c" "${S}/tools/duende.c" || die + + tc-export CC + ./configure $(use ipv6 && echo "--ipv6") || die "Failed to configure ${PN}" +} + +src_install() { + # Install the MaraDNS binaries. + dosbin server/maradns + dosbin tcp/zoneserver + dobin tcp/getzone tcp/fetchzone + dobin tools/askmara tools/askmara-tcp tools/duende + dobin tools/bind2csv2.py tools/csv1tocsv2.pl + + # MaraDNS docs, manpages, misc. + dodoc doc/en/{QuickStart,README,*.txt} + dodoc doc/en/text/*.txt + doman doc/en/man/*.[1-9] + dodoc maradns.gpg.key + dohtml doc/en/*.html + dohtml -r doc/en/webpage + dohtml -r doc/en/tutorial + docinto examples + dodoc doc/en/examples/example_* + + # Deadwood binary, docs, manpages, etc. + if ! use authonly; then + dosbin deadwood-${DEADWOOD_VER}/src/Deadwood + doman deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende}.1 + docinto deadwood + dodoc deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende,FAQ}.txt + dohtml deadwood-${DEADWOOD_VER}/doc/{Deadwood,FAQ}.html + docinto deadwood/internals + dodoc deadwood-${DEADWOOD_VER}/doc/internals/* + insinto /etc/maradns + newins deadwood-${DEADWOOD_VER}/doc/dwood3rc-all dwood3rc_all.dist + fi + + # Example configurations. + insinto /etc/maradns + newins doc/en/examples/example_full_mararc mararc_full.dist + newins doc/en/examples/example_csv2 example_csv2.dist + keepdir /etc/maradns/logger + + # Init scripts. + newinitd "${FILESDIR}"/maradns2 maradns + newinitd "${FILESDIR}"/zoneserver2 zoneserver + if ! use authonly; then + newinitd "${FILESDIR}"/deadwood deadwood + fi + + # systemd unit + # please keep paths in sync! + sed -e "s^@bindir@^${EPREFIX}/usr/sbin^" \ + -e "s^@sysconfdir@^${EPREFIX}/etc/maradns^" \ + "${FILESDIR}"/maradns.service.in > "${T}"/maradns.service + systemd_dounit "${T}"/maradns.service +} diff --git a/net-dns/maradns/metadata.xml b/net-dns/maradns/metadata.xml new file mode 100644 index 000000000000..0057a2e30e34 --- /dev/null +++ b/net-dns/maradns/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>maintainer-needed@gentoo.org</email> +</maintainer> +<use> + <flag name='authonly'>Allows one to build only authoritative DNS server</flag> +</use> +</pkgmetadata> diff --git a/net-dns/metadata.xml b/net-dns/metadata.xml new file mode 100644 index 000000000000..18ee426a8540 --- /dev/null +++ b/net-dns/metadata.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The net-dns category contains DNS (Domain Name Service) related + software. + </longdescription> + <longdescription lang="de"> + Die Kategorie net-dns enthült Software zum Thema DNS (Domain Name Service). + </longdescription> + <longdescription lang="es"> + La categoría net-dns contiene programas relacionados con el DNS, el + sistema de resolución de nombres de dominio. + </longdescription> + <longdescription lang="ja"> + net-dnsカテゴリーにはドメイン・ネーム・サービスに関連したソフトウェアが含まれています。 + </longdescription> + <longdescription lang="nl"> + De net-dns categorie bevat DNS (Domain Name Service) applicaties. + </longdescription> + <longdescription lang="vi"> + Nhóm net-dns chứa các phần mềm liên quan đến DNS. + </longdescription> + <longdescription lang="it"> + La categoria net-dns contiene programmi per DNS (Domain Name Service). + </longdescription> + <longdescription lang="pt"> + A categoria net-dns contém programas relacionados a DNS (Domain + Name Service). + </longdescription> + <longdescription lang="pl"> + Kategoria net-dns zawiera pakiety związane z DNS (Domain Name Service). + </longdescription> +</catmetadata> + diff --git a/net-dns/mydns/Manifest b/net-dns/mydns/Manifest new file mode 100644 index 000000000000..2f4337b6e3b3 --- /dev/null +++ b/net-dns/mydns/Manifest @@ -0,0 +1 @@ +DIST mydns-1.2.8.31.tar.gz 958701 SHA256 cb10de11ccd948d3b86296c03c6fb692489945d58b0aaee5d17be083f3263629 SHA512 471dfed9b4f38b446fd5896939faa4c58f4e1b3a3e6928fa84eddf769eba8f3406ef08c77ab39ee79d2ac85c1e72a499b283c7404a0cae9830ffe0faee9e2737 WHIRLPOOL 615e8e129b4d3d7b426b58446f9fef7aaf78d025d1454ba46266d15030dff4a223a033bf6bbc4e6401159a99e1b2eae3d60b6bd76378a3d9e86e2dfd1d06e84f diff --git a/net-dns/mydns/files/mydns-1.2.8.27-m4.patch b/net-dns/mydns/files/mydns-1.2.8.27-m4.patch new file mode 100644 index 000000000000..c32e7613b466 --- /dev/null +++ b/net-dns/mydns/files/mydns-1.2.8.27-m4.patch @@ -0,0 +1,53 @@ +--- mydns-1.1.0/m4/mydns.m4.orig 2010-12-01 21:57:52.000000000 +0100 ++++ mydns-1.1.0/m4/mydns.m4 2010-12-01 22:07:24.000000000 +0100 +@@ -542,46 +542,10 @@ + ## + AC_DEFUN([AC_LIB_MYSQLCLIENT], + [ +- libmysqlclient_dirs="/usr/local/mysql/lib /usr/local/lib/mysql /usr/local/lib /usr/lib/mysql /usr/lib /lib" +- AC_ARG_WITH(mysql-lib, +- AC_HELP_STRING([--with-mysql-lib=DIR], [look for the MySQL client library in DIR]), +- libmysqlclient_dirs="$withval $libmysqlclient_dirs") +- libmysqlclient_found=no, libmysqlclient_ok=no +- for libmysqlclient_dir in $libmysqlclient_dirs; do +- if test "$libmysqlclient_found" != yes; then +- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient_r.so, libmysqlclient_found=yes, libmysqlclient_found=no) +- if test "$libmysqlclient_found" != yes; then +- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.so, libmysqlclient_found=yes, libmysqlclient_found=no) +- fi +- if test "$libmysqlclient_found" != yes; then +- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.a, libmysqlclient_found=yes, libmysqlclient_found=no) +- fi +- if test "$libmysqlclient_found" = yes; then +- ## libmysqlclient depends on libz +- if ! test -n "$LIBZ"; then +- AC_LIB_Z +- fi +- if ! test -n "$LIBZ"; then +- ## No zlib +- AC_MSG_ERROR([ +- +-][ ### +-][ ### zlib compression library (libz.a) not found. +-][ ### +-][ ### Please download and install the zlib compression +-][ ### library from the following URL: +-][ ### +-][ ### http://www.gzip.org/zlib/ +-][ ### +-][ ### (Error detail might be available in `config.log') +-][ ### +-]) +- fi +- LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient" +- libmysqlclient_found=yes +- fi +- fi +- done ++ AC_CHECK_PROG(LIBMYSQLCLIENT,mysql_config,`mysql_config --libs`) ++ if test -z "$LIBMYSQLCLIENT"; then ++ AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed]) ++ fi + AC_SUBST(LIBMYSQLCLIENT) + ] + ) diff --git a/net-dns/mydns/files/mydns.confd b/net-dns/mydns/files/mydns.confd new file mode 100644 index 000000000000..1040f4b93c15 --- /dev/null +++ b/net-dns/mydns/files/mydns.confd @@ -0,0 +1,4 @@ +MYDNS_CONFFILE="/etc/mydns.conf" + +#MYDNS_EXTRA_OPTS="--verbose" +MYDNS_EXTRA_OPTS="" diff --git a/net-dns/mydns/files/mydns.initd b/net-dns/mydns/files/mydns.initd new file mode 100644 index 000000000000..970876191731 --- /dev/null +++ b/net-dns/mydns/files/mydns.initd @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +MYDNS_CHECKCONF="/usr/bin/mydnscheck" +MYDNS_CONFFILE="${MYDNS_CONFFILE:-/etc/mydns.conf}" + +command="/usr/sbin/mydns" +command_args="--background --conf=${MYDNS_CONFFILE} ${MYDNS_EXTRA_OPTS}" +extra_commands="configtest" +extra_started_commands="reload" +pidfile="$(grep '^pidfile' ${MYDNS_CONFFILE} | sed -e 's/^pidfile\s*=\s*\([^# ]\+\?\)\s*\(#.*\)\?$/\1/')" +pidfile="${pidfile:-/var/run/mydns.pid}" + +depend() { + need net + use logger mysql postgresql +} + +checkconfig() { + "${MYDNS_CHECKCONF}" --conf="${MYDNS_CONFFILE}" + return $? +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +reload() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-dns/mydns/metadata.xml b/net-dns/mydns/metadata.xml new file mode 100644 index 000000000000..64ae6d97c0f6 --- /dev/null +++ b/net-dns/mydns/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <use> + <flag name='alias'>Enable David Phillips aliasing</flag> + <flag name='status'>Enable the STATUS opcode to check server status</flag> + </use> + <upstream> + <remote-id type="sourceforge">mydns-ng</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-dns/mydns/mydns-1.2.8.31.ebuild b/net-dns/mydns/mydns-1.2.8.31.ebuild new file mode 100644 index 000000000000..f415cff53f8e --- /dev/null +++ b/net-dns/mydns/mydns-1.2.8.31.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="A DNS-Server which gets its data from a MySQL-/PostgreSQL-database" +HOMEPAGE="http://www.mydns.pl/" +SRC_URI="mirror://sourceforge/mydns-ng/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ~hppa ia64 ~ppc sparc x86" +IUSE="alias debug nls mysql postgres ssl static status" + +RDEPEND="mysql? ( virtual/mysql ) + nls? ( virtual/libintl ) + postgres? ( dev-db/postgresql ) + ssl? ( dev-libs/openssl ) + virtual/libiconv" +DEPEND="${RDEPEND} + nls? ( >=sys-devel/gettext-0.12 ) + sys-devel/bison" + +REQUIRED_USE="^^ ( mysql postgres )" + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.2.8.27-m4.patch" + eautoreconf +} + +src_configure() { + econf \ + $(use_enable alias) \ + $(use_enable nls) \ + $(use_enable debug) \ + $(use_with mysql) \ + $(use_with postgres pgsql) \ + $(use_enable static) \ + $(use_enable static static-build) \ + $(use_enable status) \ + $(use_with ssl openssl) \ + --without-included-gettext +} + +src_install() { + default + + dodoc AUTHORS BUGS ChangeLog QUICKSTART* NEWS README* TODO + docinto contrib + dodoc contrib/*.php contrib/*.pl contrib/*.pm contrib/README* + + newinitd "${FILESDIR}/mydns.initd" mydns + newconfd "${FILESDIR}/mydns.confd" mydns + + ## Avoid file collision + rm -f "${ED}/usr/share/locale/locale.alias" + + # Install config file + insinto /etc + newins mydns.conf mydns.conf + fowners root:root /etc/mydns.conf + fperms 0600 /etc/mydns.conf +} + +pkg_postinst() { + if use postgres; then + elog "# createdb mydns" + elog "# /usr/sbin/mydns --create-tables | psql mydns" + elog + elog "to create the tables in the PostgreSQL-Database." + elog "For more info see QUICKSTART.postgres." + fi + if use mysql; then + elog "# mysqladmin -u <useruname> -p create mydns" + elog "# /usr/sbin/mydns --create-tables | mysql -u <username> -p mydns" + elog + elog "to create the tables in the MySQL-Database." + elog "For more info see QUICKSTART.mysql." + fi + elog +} diff --git a/net-dns/namecoin-qt/Manifest b/net-dns/namecoin-qt/Manifest new file mode 100644 index 000000000000..13ae953fa3dc --- /dev/null +++ b/net-dns/namecoin-qt/Manifest @@ -0,0 +1 @@ +DIST namecoin-qt-0.3.72.tar.gz 1453901 SHA256 74d088f96735b3397b9a71bc10bbbe1211cd2594baf593c4b9062457c1d4b869 SHA512 63d42fb1a982f725f22d35992fadb192116b7ee73a418cba52285325df5a56d41b47d3de7d1b9b53b816c160d1909ecff70117de94edead0eab343da6809e417 WHIRLPOOL bd2385a3118406a9076bf3587e3cc8f4e25ddac350ec62901e1d577d92fc113de58fa59f9138dac2e82efcb1553d4dba657cd2092f23800e995756fe98c3f012 diff --git a/net-dns/namecoin-qt/metadata.xml b/net-dns/namecoin-qt/metadata.xml new file mode 100644 index 000000000000..1e7587374fdf --- /dev/null +++ b/net-dns/namecoin-qt/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> +</pkgmetadata> diff --git a/net-dns/namecoin-qt/namecoin-qt-0.3.72.ebuild b/net-dns/namecoin-qt/namecoin-qt-0.3.72.ebuild new file mode 100644 index 000000000000..29f3a47aed69 --- /dev/null +++ b/net-dns/namecoin-qt/namecoin-qt-0.3.72.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DB_VER="4.8" + +LANGS="af_ZA ar bg ca_ES cs da de el_GR en es_CL es et eu_ES fa_IR fa fi fr_CA fr gu_IN he hi_IN hr hu it ja lt nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN zh_TW" + +inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2 + +DESCRIPTION="A P2P network based domain name system" +HOMEPAGE="https://dot-bit.org/" +SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT ISC cryptopp GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +#upnp is broken +#IUSE="dbus ipv6 upnp" +IUSE="dbus ipv6" + +RDEPEND=" + dev-libs/boost[threads(+)] + dev-libs/crypto++ + dev-libs/openssl:0[-bindist] + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] + dev-qt/qtgui:4 + dbus? ( + dev-qt/qtdbus:4 + ) +" +# Add this when upnp is fixed +# upnp? ( net-libs/miniupnpc) + +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 +" + +S="${WORKDIR}/namecoinq-v${PV/0/Q}" + +src_prepare() { + cd src || die + + local filt= yeslang= nolang= + + for lan in $LANGS; do + if [ ! -e qt/locale/bitcoin_$lan.ts ]; then + ewarn "Language '$lan' no longer supported. Ebuild needs update." + fi + done + + for ts in $(ls qt/locale/*.ts) + do + x="${ts/*bitcoin_/}" + x="${x/.ts/}" + if ! use "linguas_$x"; then + nolang="$nolang $x" + rm "$ts" + filt="$filt\\|$x" + else + yeslang="$yeslang $x" + fi + done + + filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)" + sed "/${filt}/d" -i 'qt/bitcoin.qrc' + einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang" +} + +src_configure() { + OPTS=() + + use dbus && OPTS+=("USE_DBUS=1") + +#Upnp is broken +# if use upnp; then +# OPTS+=("USE_UPNP=1") +# else +# OPTS+=("USE_UPNP=-") +# fi + + OPTS+=("USE_UPNP=-") + + use ipv6 || OPTS+=("USE_IPV6=-") + + OPTS+=("USE_SYSTEM_LEVELDB=1") + OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")") + OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}") + + if has_version '>=dev-libs/boost-1.52'; then + OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX") + fi + + eqmake4 namecoin-qt.pro "${OPTS[@]}" +} + +#Tests are broken +#src_test() { +# cd src || die +# emake -f makefile.unix "${OPTS[@]}" test_namecoin +# ./test_namecoin || die 'Tests failed' +#} + +src_install() { + qt4-r2_src_install + + dobin ${PN} + + insinto /usr/share/pixmaps + newins "src/qt/res/icons/bitcoin.ico" "${PN}.ico" + + make_desktop_entry "${PN} %u" "Namecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;DNS;" "MimeType=x-scheme-handler/namecoin;\nTerminal=false" +} + +update_caches() { + gnome2_icon_cache_update + fdo-mime_desktop_database_update + buildsycoca +} + +pkg_postinst() { + update_caches +} + +pkg_postrm() { + update_caches +} diff --git a/net-dns/namecoin-qt/namecoin-qt-0.3.80.ebuild b/net-dns/namecoin-qt/namecoin-qt-0.3.80.ebuild new file mode 100644 index 000000000000..c61e7d743261 --- /dev/null +++ b/net-dns/namecoin-qt/namecoin-qt-0.3.80.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DB_VER="4.8" + +LANGS="af_ZA ar bg ca_ES cs da de el_GR en es_CL es et eu_ES fa_IR fa fi fr_CA fr gu_IN he hi_IN hr hu it ja lt nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN zh_TW" + +inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2 git-r3 + +DESCRIPTION="A P2P network based domain name system" +HOMEPAGE="https://dot-bit.org/" +#SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.tar.gz -> ${P}.tar.gz" +# Try to use github +SRC_URI="" +EGIT_REPO_URI="https://github.com/namecoin/namecoin.git" +EGIT_BRANCH="namecoinq-release" +EGIT_COMMIT="nc${PV}" + +LICENSE="MIT ISC cryptopp GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +#upnp is broken +#IUSE="dbus ipv6 upnp" +IUSE="dbus ipv6" + +RDEPEND=" + dev-libs/boost[threads(+)] + dev-libs/crypto++ + dev-libs/openssl:0[-bindist] + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] + dev-qt/qtgui:4 + dbus? ( + dev-qt/qtdbus:4 + ) +" +# Add this when upnp is fixed +# upnp? ( net-libs/miniupnpc) + +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 +" + +S="${WORKDIR}/${PN}-${PV}" + +src_prepare() { + cd src || die + + local filt= yeslang= nolang= + + for lan in $LANGS; do + if [ ! -e qt/locale/bitcoin_$lan.ts ]; then + ewarn "Language '$lan' no longer supported. Ebuild needs update." + fi + done + + for ts in $(ls qt/locale/*.ts) + do + x="${ts/*bitcoin_/}" + x="${x/.ts/}" + if ! use "linguas_$x"; then + nolang="$nolang $x" + rm "$ts" + filt="$filt\\|$x" + else + yeslang="$yeslang $x" + fi + done + + filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)" + sed "/${filt}/d" -i 'qt/bitcoin.qrc' + einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang" +} + +src_configure() { + OPTS=() + + use dbus && OPTS+=("USE_DBUS=1") + +#Upnp is broken +# if use upnp; then +# OPTS+=("USE_UPNP=1") +# else +# OPTS+=("USE_UPNP=-") +# fi + + OPTS+=("USE_UPNP=-") + + use ipv6 || OPTS+=("USE_IPV6=-") + + OPTS+=("USE_SYSTEM_LEVELDB=1") + OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")") + OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}") + + if has_version '>=dev-libs/boost-1.52'; then + OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX") + fi + + eqmake4 namecoin-qt.pro "${OPTS[@]}" +} + +#Tests are broken +#src_test() { +# cd src || die +# emake -f makefile.unix "${OPTS[@]}" test_namecoin +# ./test_namecoin || die 'Tests failed' +#} + +src_install() { + qt4-r2_src_install + + dobin ${PN} + + insinto /usr/share/pixmaps + newins "src/qt/res/icons/bitcoin.ico" "${PN}.ico" + + make_desktop_entry "${PN} %u" "Namecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;DNS;" "MimeType=x-scheme-handler/namecoin;\nTerminal=false" +} + +update_caches() { + gnome2_icon_cache_update + fdo-mime_desktop_database_update + buildsycoca +} + +pkg_postinst() { + update_caches +} + +pkg_postrm() { + update_caches +} diff --git a/net-dns/namecoind/Manifest b/net-dns/namecoind/Manifest new file mode 100644 index 000000000000..4619a47e6307 --- /dev/null +++ b/net-dns/namecoind/Manifest @@ -0,0 +1 @@ +DIST namecoind-0.3.72.tar.gz 1453901 SHA256 74d088f96735b3397b9a71bc10bbbe1211cd2594baf593c4b9062457c1d4b869 SHA512 63d42fb1a982f725f22d35992fadb192116b7ee73a418cba52285325df5a56d41b47d3de7d1b9b53b816c160d1909ecff70117de94edead0eab343da6809e417 WHIRLPOOL bd2385a3118406a9076bf3587e3cc8f4e25ddac350ec62901e1d577d92fc113de58fa59f9138dac2e82efcb1553d4dba657cd2092f23800e995756fe98c3f012 diff --git a/net-dns/namecoind/files/namecoin.conf b/net-dns/namecoind/files/namecoin.conf new file mode 100644 index 000000000000..c6a55f3d9133 --- /dev/null +++ b/net-dns/namecoind/files/namecoin.conf @@ -0,0 +1,8 @@ +# http://www.bitcoin.org/smf/index.php?topic=644.0 +#rpcuser= +#rpcpassword= + + + + + diff --git a/net-dns/namecoind/files/namecoin.confd b/net-dns/namecoind/files/namecoin.confd new file mode 100644 index 000000000000..0120a560b644 --- /dev/null +++ b/net-dns/namecoind/files/namecoin.confd @@ -0,0 +1,10 @@ +# Config file for /etc/init.d/namecoin + +# owner of namecoind process (don't change, must be existing) +NAMECOIN_USER="namecoin" + +# See http://www.bitcoin.org/smf/index.php?topic=1063 +NAMECOIN_OPTS="${NAMECOIN_OPTS}" + +# nice level +NICELEVEL="19" diff --git a/net-dns/namecoind/files/namecoin.initd b/net-dns/namecoind/files/namecoin.initd new file mode 100644 index 000000000000..4330c918e44b --- /dev/null +++ b/net-dns/namecoind/files/namecoin.initd @@ -0,0 +1,104 @@ +#!/sbin/runscript +# Distributed under the terms of the GNU General Public License, v2 or later + +VARDIR="/var/lib/namecoin" +CONFFILE="${VARDIR}/.namecoin/bitcoin.conf" + +depend() { + need net +} + +checkconfig() { + if [[ "${NAMECOIN_USER}" == "" ]] ; then + eerror "Please edit /etc/conf.d/namecoind" + eerror "A user must be specified to run namecoind as that user." + eerror "Modify USER to your needs (you may also add a group after a colon)" + return 1 + fi + if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${NAMECOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then + eerror "Please edit /etc/conf.d/namecoind" + eerror "Specified user must exist!" + return 1 + fi + if `echo "${NAMECOIN_USER}" | grep ':' -sq` ; then + if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${NAMECOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then + eerror "Please edit /etc/conf.d/namecoind" + eerror "Specified group must exist!" + return 1 + fi + fi + if ! grep -q '^rpcpassword=' "${CONFFILE}"; then + eerror "Please edit `readlink -f ${CONFFILE}`" + eerror "There must be at least a line assigning rpcpassword=something-secure" + return 1 + fi + if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then + eerror "`readlink -f ${CONFFILE}` should not be readable by other users" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Starting Namecoind daemon" + + pkg-config openrc + if [ $? = 0 ]; then + start_openrc + else + start_baselayout + fi +} + +stop() { + ebegin "Stopping Namecoin daemon" + + pkg-config openrc + if [ $? = 0 ]; then + stop_openrc + else + stop_baselayout + fi +} + +start_openrc() { + start-stop-daemon \ + --start --user "${NAMECOIN_USER}" --name namecoind \ + --pidfile /var/run/namecoind.pid --make-pidfile \ + --env HOME="${VARDIR}" --exec /usr/bin/namecoind \ + --nicelevel "${NICELEVEL}" \ + --background \ + --wait 2000 \ + -- ${NAMECOIN_OPTS} + eend $? +} + +stop_openrc() { + start-stop-daemon --stop --user "${NAMECOIN_USER}" \ + --name namecoind --pidfile /var/run/namecoind.pid \ + --wait 30000 \ + --progress + eend $? +} + +start_baselayout() { + start-stop-daemon \ + --start --user "${NAMECOIN_USER}" --name namecoind \ + --pidfile /var/run/namecoind.pid --make-pidfile \ + --env HOME="${VARDIR}" --exec /usr/bin/namecoind \ + --chuid "${NAMECOIN_USER}" \ + --nicelevel "${NICELEVEL}" \ + --background \ + -- ${NAMECOIN_OPTS} + eend $? +} + +stop_baselayout() { + start-stop-daemon \ + --stop \ + --user "${NAMECOIN_USER}" \ + --name namecoind \ + --pidfile /var/run/namecoind.pid + eend $? +} diff --git a/net-dns/namecoind/files/namecoind-0.3.72-makefile.patch b/net-dns/namecoind/files/namecoind-0.3.72-makefile.patch new file mode 100644 index 000000000000..f8996944e13c --- /dev/null +++ b/net-dns/namecoind/files/namecoind-0.3.72-makefile.patch @@ -0,0 +1,52 @@ +diff -Naur namecoinq-vQ.3.72.orig/src/Makefile namecoinq-vQ.3.72/src/Makefile +--- namecoinq-vQ.3.72.orig/src/Makefile 2013-10-29 09:38:10.000000000 -0400 ++++ namecoinq-vQ.3.72/src/Makefile 2013-11-30 18:43:25.016028725 -0500 +@@ -1,6 +1,6 @@ +-CXX=g++ ++CXX?=g++ + +-DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL ++DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL + + # Detect MinGW + MINGW=$(shell uname -s|grep -i mingw32) +@@ -8,20 +8,10 @@ + # Link boost statically + DEFS += -DBOOST_THREAD_USE_LIB + +-INCLUDEPATHS= \ +- -I../libs/openssl-1.0.1e/include \ +- -I../libs/db-4.7.25.NC/build_unix \ +- -I../libs/boost_1_50_0 +- +-LIBPATHS= \ +- -L../libs/openssl-1.0.1e \ +- -L../libs/db-4.7.25.NC/build_unix \ +- -L../libs/boost_1_50_0/stage/lib +- + LIBBOOST_SUFFIX= + + LIBS= \ +- -Wl,-Bstatic \ ++ -Wl,-Bdynamic \ + -l boost_system$(LIBBOOST_SUFFIX) \ + -l boost_filesystem$(LIBBOOST_SUFFIX) \ + -l boost_program_options$(LIBBOOST_SUFFIX) \ +@@ -70,7 +60,7 @@ + -l pthread + endif + +-CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS) ++#CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS) + HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ + script.h allocators.h db.h walletdb.h crypter.h net.h irc.h keystore.h main.h wallet.h bitcoinrpc.h uibase.h ui.h noui.h init.h auxpow.h + +@@ -110,7 +100,7 @@ + obj/nogui/namecoin.o: namecoin.h + + namecoind: $(OBJS:obj/%=obj/nogui/%) obj/nogui/namecoin.o +- $(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) ++ $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) + + clean: + -rm -f namecoin namecoind diff --git a/net-dns/namecoind/files/namecoind-0.3.80-makefile.patch b/net-dns/namecoind/files/namecoind-0.3.80-makefile.patch new file mode 100644 index 000000000000..2dce6b5a4f85 --- /dev/null +++ b/net-dns/namecoind/files/namecoind-0.3.80-makefile.patch @@ -0,0 +1,30 @@ +--- Makefile.github 2015-01-01 10:05:04.000000000 +0000 ++++ Makefile 2015-01-01 10:15:05.000000000 +0000 +@@ -1,4 +1,4 @@ +-CXX=g++ ++CXX?=g++ + + DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL + +@@ -8,20 +8,10 @@ + # Link boost statically + DEFS += -DBOOST_THREAD_USE_LIB + +-INCLUDEPATHS= \ +- -I../libs/openssl-1.0.1i/include \ +- -I../libs/db-4.7.25.NC/build_unix \ +- -I../libs/boost_1_50_0 +- +-LIBPATHS= \ +- -L../libs/openssl-1.0.1i \ +- -L../libs/db-4.7.25.NC/build_unix \ +- -L../libs/boost_1_50_0/stage/lib +- + LIBBOOST_SUFFIX= + + LIBS= \ +- -Wl,-Bstatic \ ++ -Wl,-Bdynamic \ + -l boost_system$(LIBBOOST_SUFFIX) \ + -l boost_filesystem$(LIBBOOST_SUFFIX) \ + -l boost_program_options$(LIBBOOST_SUFFIX) \ diff --git a/net-dns/namecoind/metadata.xml b/net-dns/namecoind/metadata.xml new file mode 100644 index 000000000000..1e7587374fdf --- /dev/null +++ b/net-dns/namecoind/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> +</pkgmetadata> diff --git a/net-dns/namecoind/namecoind-0.3.72.ebuild b/net-dns/namecoind/namecoind-0.3.72.ebuild new file mode 100644 index 000000000000..552cf4aea74c --- /dev/null +++ b/net-dns/namecoind/namecoind-0.3.72.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DB_VER="4.8" + +inherit db-use eutils toolchain-funcs user + +DESCRIPTION="A P2P network based domain name system" +HOMEPAGE="https://dot-bit.org/" +SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT ISC cryptopp" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl upnp" + +RDEPEND=" + dev-libs/boost[threads(+)] + dev-libs/glib:2 + dev-libs/crypto++ + dev-libs/openssl[-bindist] + upnp? ( + net-libs/miniupnpc + ) + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] +" +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 +" + +S="${WORKDIR}/namecoinq-v${PV/0/Q}" + +pkg_setup() { + local UG='namecoin' + enewgroup "${UG}" + enewuser "${UG}" -1 -1 /var/lib/namecoin "${UG}" +} + +src_prepare() { + epatch "${FILESDIR}"/namecoind-0.3.72-makefile.patch +} + +src_compile() { + local OPTS=() + + OPTS+=("CXXFLAGS=${CXXFLAGS} -I$(db_includedir "${DB_VER}")") + OPTS+=("LDFLAGS=${LDFLAGS} -ldb_cxx-${DB_VER}") + + use ssl && OPTS+=(USE_SSL=1) + use upnp && OPTS+=(USE_UPNP=1) + + cd src || die + emake CXX="$(tc-getCXX)" "${OPTS[@]}" ${PN} +} + +src_install() { + dobin src/${PN} + + insinto /etc/namecoin + doins "${FILESDIR}/namecoin.conf" + fowners namecoin:namecoin /etc/namecoin/namecoin.conf + fperms 600 /etc/namecoin/namecoin.conf + + newconfd "${FILESDIR}/namecoin.confd" ${PN} + newinitd "${FILESDIR}/namecoin.initd" ${PN} + + keepdir /var/lib/namecoin/.namecoin + fperms 700 /var/lib/namecoin + fowners namecoin:namecoin /var/lib/namecoin/ + fowners namecoin:namecoin /var/lib/namecoin/.namecoin + dosym /etc/namecoin/namecoin.conf /var/lib/namecoin/.namecoin/bitcoin.conf + + dodoc doc/README + dodoc DESIGN-namecoin.md FAQ.md doc/README_merged-mining.md +} diff --git a/net-dns/namecoind/namecoind-0.3.80.ebuild b/net-dns/namecoind/namecoind-0.3.80.ebuild new file mode 100644 index 000000000000..230c2cb4915f --- /dev/null +++ b/net-dns/namecoind/namecoind-0.3.80.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DB_VER="4.8" + +inherit db-use eutils toolchain-funcs user git-r3 + +DESCRIPTION="A P2P network based domain name system" +HOMEPAGE="https://dot-bit.org/" +#SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.tar.gz -> ${P}.tar.gz" +# Try to use github +SRC_URI="" +EGIT_REPO_URI="https://github.com/namecoin/namecoin.git" +EGIT_BRANCH="namecoinq-release" +EGIT_COMMIT="nc${PV}" + +LICENSE="MIT ISC cryptopp" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl upnp" + +RDEPEND=" + dev-libs/boost[threads(+)] + dev-libs/glib:2 + dev-libs/crypto++ + dev-libs/openssl[-bindist] + upnp? ( + net-libs/miniupnpc + ) + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] +" +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 +" + +S="${WORKDIR}/${PN}-${PV}" + +pkg_setup() { + local UG='namecoin' + enewgroup "${UG}" + enewuser "${UG}" -1 -1 /var/lib/namecoin "${UG}" +} + +src_prepare() { + cd src || die + epatch "${FILESDIR}"/namecoind-0.3.80-makefile.patch +} + +src_compile() { + local OPTS=() + + OPTS+=("CXXFLAGS=${CXXFLAGS} -I$(db_includedir "${DB_VER}")") + OPTS+=("LDFLAGS=${LDFLAGS} -ldb_cxx-${DB_VER}") + + use ssl && OPTS+=(USE_SSL=1) + use upnp && OPTS+=(USE_UPNP=1) + + cd src || die + emake CXX="$(tc-getCXX)" "${OPTS[@]}" ${PN} +} + +src_install() { + dobin src/${PN} + + insinto /etc/namecoin + doins "${FILESDIR}/namecoin.conf" + fowners namecoin:namecoin /etc/namecoin/namecoin.conf + fperms 600 /etc/namecoin/namecoin.conf + + newconfd "${FILESDIR}/namecoin.confd" ${PN} + newinitd "${FILESDIR}/namecoin.initd" ${PN} + + keepdir /var/lib/namecoin/.namecoin + fperms 700 /var/lib/namecoin + fowners namecoin:namecoin /var/lib/namecoin/ + fowners namecoin:namecoin /var/lib/namecoin/.namecoin + dosym /etc/namecoin/namecoin.conf /var/lib/namecoin/.namecoin/bitcoin.conf + + dodoc doc/README + dodoc DESIGN-namecoin.md FAQ.md doc/README_merged-mining.md +} diff --git a/net-dns/ndu/Manifest b/net-dns/ndu/Manifest new file mode 100644 index 000000000000..c07a3bb490d4 --- /dev/null +++ b/net-dns/ndu/Manifest @@ -0,0 +1 @@ +DIST ndu-0.4.tar.gz 16118 RMD160 f9273a4428dd30a0bca3416cfcab15aa5fb04aa3 SHA1 10719a426e16291e351ad057784474a0b606078f SHA256 27a2f523cee765db142b5582087866a90050fa00f1b365c800305204fc0c6d40 diff --git a/net-dns/ndu/files/ndu-0.4-binary-locations.patch b/net-dns/ndu/files/ndu-0.4-binary-locations.patch new file mode 100644 index 000000000000..4007b4dc4216 --- /dev/null +++ b/net-dns/ndu/files/ndu-0.4-binary-locations.patch @@ -0,0 +1,14 @@ +diff -Nuar --exclude '*~' ndu-0.4.orig/src/dnsedit ndu-0.4/src/dnsedit +--- ndu-0.4.orig/src/dnsedit 2006-05-22 16:16:47.000000000 -0700 ++++ ndu-0.4/src/dnsedit 2006-05-22 16:20:45.107741010 -0700 +@@ -19,8 +19,8 @@ + if /usr/bin/diff $1 $tempfile >> /dev/null ; then + echo No changed made + else +- /usr/sbin/dnstouch $1 +- /usr/sbin/ndu ++ /usr/bin/dnstouch $1 ++ /usr/bin/ndu + # /usr/sbin/ndc reload + echo updated + fi diff --git a/net-dns/ndu/metadata.xml b/net-dns/ndu/metadata.xml new file mode 100644 index 000000000000..a732fd8b2f03 --- /dev/null +++ b/net-dns/ndu/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> +</pkgmetadata> diff --git a/net-dns/ndu/ndu-0.4-r4.ebuild b/net-dns/ndu/ndu-0.4-r4.ebuild new file mode 100644 index 000000000000..7ae42140425a --- /dev/null +++ b/net-dns/ndu/ndu-0.4-r4.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs + +DESCRIPTION="DNS serial number incrementer and reverse zone builder" +SRC_URI="http://uranus.it.swin.edu.au/~jn/linux/${P}.tar.gz" +HOMEPAGE="http://uranus.it.swin.edu.au/~jn/linux/dns.htm" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" +DEPEND="sys-apps/sed" +RDEPEND="sys-apps/ed" # dnstouch calls ed to do the dirty work + +src_unpack() { + unpack ${A} + + epatch "${FILESDIR}"/${P}-binary-locations.patch + + cd "${S}"/src + # use the correct compiler + sed -e 's|gcc|$(CXX)|g' -i Makefile + # set correct config pathes + sed -e 's|#define CONFIG_PATH "/etc/"|#define CONFIG_PATH "/etc/bind/"|g' -i ndu.cpp + sed -e 's|"/etc/ndu.conf"|"/etc/bind/ndu.conf"|g' -i dnstouch.cpp + # hack up something to work around bug #73858 + sed -e 's|execlp("ed", "ed", filename, 0);|execlp("ed", "ed", "-s", filename, 0);|g' -i dnstouch.cpp + # use the correct editor + sed -e 's|VISUAL|EDITOR|g' -i dnsedit + + cd "${S}" + # match our bind config + sed -e 's|0.0.127.in-addr.arpa|127.in-addr.arpa|g' -i ndu.conf + # document the support for the chrooted BIND setup + echo '// if you use a chrooted setup, then you need to uncomment these lines:' >>ndu.conf + echo '//process "/chroot/dns/named.conf"' >>ndu.conf + echo '//chroot "/chroot/dns"' >>ndu.conf +} + +src_compile() { + cd "${S}"/src + emake CFLAGS="${CFLAGS}" CXX="$(tc-getCXX)" +} + +src_install () { + into /usr + dobin src/{dnsedit,ndu,dnstouch} + into / + insinto /etc/bind + doins ndu.conf + dodoc README INSTALL +} + +pkg_postinst() { + elog "The ndu binary expects to read your configuration" + elog "from /etc/bind/named.conf, however the other binaries" + elog "are useful with BIND locally installed." +} diff --git a/net-dns/noip-updater/Manifest b/net-dns/noip-updater/Manifest new file mode 100644 index 000000000000..5c266764e1d5 --- /dev/null +++ b/net-dns/noip-updater/Manifest @@ -0,0 +1 @@ +DIST noip-2.1.9.tar.gz 152995 SHA256 86ad0a6362263a33f59a658d1b1ce428e255556ddad0d062aa0ee4b7f412f98a SHA512 3e76d39e22383dc3eceee10f8bdf791fc5ed253c756cd2d345fdd8fb9c9ab3bac6a1a6ca123a26cebbf6e615bb8f236c58d4ecf6254fcaf6b92da17f42f0dd6f WHIRLPOOL 4a737490fdf8be0bc6f708c7f73d2025f62a8e7c043e6259ee34738a5ed1b78d34c4243b58f7f61bb7afcf05d9e786b7f80b16bb641be59f5a5a5bd0929adee3 diff --git a/net-dns/noip-updater/files/noip-2.1.9-daemon.patch b/net-dns/noip-updater/files/noip-2.1.9-daemon.patch new file mode 100644 index 000000000000..b2fb4e66d0c7 --- /dev/null +++ b/net-dns/noip-updater/files/noip-2.1.9-daemon.patch @@ -0,0 +1,21 @@ +diff -ur a/noip2.c b/noip2.c +--- a/noip2.c 2004-01-09 14:18:39.000000000 +0000 ++++ b/noip2.c 2007-07-20 14:02:41.100377515 +0100 +@@ -895,16 +895,13 @@ + char *err_string; + static int startup = 1; + +- x = fork(); ++ x = daemon (0, 0); + switch (x) { + case -1: // error + err_string = strerror(errno); + Msg( "Can't fork!! (%s) Ending!\n", err_string); + return FATALERR; +- default: // parent +- exit(0); + case 0: //child +- setsid(); + if (get_shm_info() == FATALERR) + return FATALERR; + log2syslog++; diff --git a/net-dns/noip-updater/files/noip-2.1.9-flags.patch b/net-dns/noip-updater/files/noip-2.1.9-flags.patch new file mode 100644 index 000000000000..9fe05f36ac2d --- /dev/null +++ b/net-dns/noip-updater/files/noip-2.1.9-flags.patch @@ -0,0 +1,11 @@ +--- a/Makefile 2006-09-07 09:52:55.000000000 +0200 ++++ b/Makefile 2006-09-07 09:54:54.000000000 +0200 +@@ -21,7 +21,7 @@ + # ARCH=sun + + ${TGT}: Makefile ${TGT}.c +- ${CC} -Wall -g -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS} ++ ${CC} ${CFLAGS} -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS} ${LDFLAGS} + + install: ${TGT} + if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR};fi diff --git a/net-dns/noip-updater/files/noip.service b/net-dns/noip-updater/files/noip.service new file mode 100644 index 000000000000..b4834e843dd0 --- /dev/null +++ b/net-dns/noip-updater/files/noip.service @@ -0,0 +1,12 @@ +[Unit] +Description=No-IP Dynamic DNS Update Client +Require=network-online.target +After=network-online.target + +[Service] +Type=forking +ExecStart=/usr/sbin/noip2 -c /etc/no-ip2.conf + +[Install] +WantedBy=multi-user.target + diff --git a/net-dns/noip-updater/files/noip2.start b/net-dns/noip-updater/files/noip2.start new file mode 100644 index 000000000000..2330ee669183 --- /dev/null +++ b/net-dns/noip-updater/files/noip2.start @@ -0,0 +1,34 @@ +#!/sbin/runscript + +depend() { + need localmount + need net + use dns +} + +checkconfig() { + if [ ! -f /etc/no-ip2.conf ] + then + einfo "Answer the following questions about your no-ip account." + noip2 -C || return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting noip" + start-stop-daemon --quiet --start -x /usr/sbin/noip2 -- -c /etc/no-ip2.conf + eend $? "noip did not start, error code $?" +} + +stop() { + ebegin "Stopping noip" + start-stop-daemon --quiet --stop -x /usr/sbin/noip2 + noip_ecode=$? + eend $noip_ecode "Error stopping the noip daemon, error $noip_ecode" + checkconfig || return 1 + ebegin "Setting noip addresses to 0.0.0.0" + noip2 -c /etc/no-ip2.conf -i 0.0.0.0 >& /dev/null + eend $? "Failed to set noip addresses to 0.0.0.0, error $?" + return $noip_ecode +} diff --git a/net-dns/noip-updater/metadata.xml b/net-dns/noip-updater/metadata.xml new file mode 100644 index 000000000000..e8f5cc43b3f5 --- /dev/null +++ b/net-dns/noip-updater/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>influencedchaos@gmail.com</email> + <name>Francis Booth</name> + <description>Active Maintainer, Assign bugs</description> + </maintainer> + <longdescription lang="en"> + no-ip.com dynamic DNS updater + </longdescription> +</pkgmetadata> diff --git a/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild b/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild new file mode 100644 index 000000000000..493e086f9ad7 --- /dev/null +++ b/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils readme.gentoo systemd toolchain-funcs + +MY_P=${P/-updater/} +DESCRIPTION="no-ip.com dynamic DNS updater" +HOMEPAGE="http://www.no-ip.com" +SRC_URI="http://www.no-ip.com/client/linux/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ppc64 sparc x86" +IUSE="" + +RDEPEND="" +DEPEND="sys-devel/gcc" + +S=${WORKDIR}/${MY_P} + +DOC_CONTENTS=" + Configuration can be done manually via /usr/sbin/noip2 -C or + by using this ebuild's config option. +" + +src_prepare() { + epatch "${FILESDIR}"/noip-2.1.9-flags.patch + epatch "${FILESDIR}"/noip-2.1.9-daemon.patch + sed -i \ + -e "s:\(#define CONFIG_FILEPATH\).*:\1 \"/etc\":" \ + -e "s:\(#define CONFIG_FILENAME\).*:\1 \"/etc/no-ip2.conf\":" \ + noip2.c || die "sed failed" +} + +src_compile() { + emake \ + CC=$(tc-getCC) \ + PREFIX=/usr \ + CONFDIR=/etc +} + +src_install() { + dosbin noip2 + dodoc README.FIRST + newinitd "${FILESDIR}"/noip2.start noip + systemd_dounit "${FILESDIR}"/noip.service + readme.gentoo_create_doc +} + +pkg_config() { + cd /tmp + einfo "Answer the following questions." + noip2 -C || die +} diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest new file mode 100644 index 000000000000..806cd1e290a6 --- /dev/null +++ b/net-dns/nsd/Manifest @@ -0,0 +1,2 @@ +DIST nsd-3.2.18.tar.gz 924566 SHA256 541047c2114466d6fa7d7b9f397f632e542750475f1fcef5339da86a1ebdfcdb SHA512 888618b51f8ec85413a95a9733198a5affc420b1a8c3b00ed18c8f73f1a0d0654b334ff22076adab23bac56ccb3684cb551ebec426d3d0df939eee24ae66044f WHIRLPOOL 0d4ea8d6e26fc517404e6ebc427774a9c1f4ec7c7c096f7adc5ba51f3fa218215f666dd848a48650bba502ceb4d2795ecb264014f5f31409290937b089b4f062 +DIST nsd-4.1.0.tar.gz 1056649 SHA256 ec3f6902f6f26a6b9248dcd7e9f42472fa52755740b4ba6b9d3bd08910b39b62 SHA512 1e49c14108b201ff8f14f58a9aae8ee4a69fba2e9494bdffc20ac079bff437ce91b069852d0aac639ec860a258b0b222b72269e62ad7b433c3df8d06afea8f03 WHIRLPOOL 6041ed2292412c91d3a7828727b5cf5f85cc6a0088e51cb791d2f56cfab2b8358627e1af7517091c3f119ce83218763dbd54279c88137c509bcf9e48c3049f94 diff --git a/net-dns/nsd/files/nsd.initd b/net-dns/nsd/files/nsd.initd new file mode 100644 index 000000000000..b6eced79e546 --- /dev/null +++ b/net-dns/nsd/files/nsd.initd @@ -0,0 +1,53 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="NSD is an authoritative-only, high performance, open source name server" +extra_commands="configtest" + +# these can be overridden in /etc/conf.d/nsd if necessary +NSD_CONFIG="${NSD_CONFIG:-/etc/nsd/nsd.conf}" +NSD_BINARY="${NSD_BINARY:-/usr/sbin/nsd}" +NSD_CHECKCONF="${NSD_CHECKCONF:-/usr/sbin/nsd-checkconf}" + +depend() { + need net + use logger +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +checkconfig() { + if ! test -e "${NSD_CONFIG}"; then + eerror "You need to create an appropriate config file." + eerror "An example can be found in /etc/nsd/nsd.conf.sample" + return 1 + elif ! "${NSD_CHECKCONF}" "${NSD_CONFIG}"; then + eerror "You have errors in your configfile (${NSD_CONFIG})" + return $? + fi + return 0 +} + +start() { + ebegin "Starting NSD" + checkconfig || return $? + local pidfile=$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}") + checkpath --directory --owner nsd:nsd $(dirname "${pidfile}") + start-stop-daemon --start --pidfile "${pidfile}" \ + --exec "${NSD_BINARY}" -- -c "${NSD_CONFIG}" + eend $? +} + +stop() { + ebegin "Stopping NSD" + checkconfig || return $? + local pidfile=$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}") + start-stop-daemon --stop --pidfile "${pidfile}" + eend $? +} diff --git a/net-dns/nsd/files/nsd.munin-conf b/net-dns/nsd/files/nsd.munin-conf new file mode 100644 index 000000000000..2fbec370f336 --- /dev/null +++ b/net-dns/nsd/files/nsd.munin-conf @@ -0,0 +1,2 @@ +[nsd_munin*] +user root diff --git a/net-dns/nsd/files/nsd.service b/net-dns/nsd/files/nsd.service new file mode 100644 index 000000000000..8337557faeef --- /dev/null +++ b/net-dns/nsd/files/nsd.service @@ -0,0 +1,14 @@ +[Unit] +Description=NSD authoritative DNS server +Wants=network.target +After=network.target + +[Service] +Type=forking +ExecStartPre=/usr/bin/install -d -o nsd -g nsd /run/nsd +ExecStart=/usr/sbin/nsd +KillMode=mixed +PIDFile=/run/nsd/nsd.pid + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/nsd/files/nsd3-patch.cron b/net-dns/nsd/files/nsd3-patch.cron new file mode 100644 index 000000000000..ec27e4e95d4b --- /dev/null +++ b/net-dns/nsd/files/nsd3-patch.cron @@ -0,0 +1,9 @@ +#!/bin/sh +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Cron job: merge zone transfer changes back to zone files +# Needed for nsd3 only + +/etc/init.d/nsd --quiet status && /etc/init.d/nsd patch >/dev/null diff --git a/net-dns/nsd/files/nsd3.initd-r1 b/net-dns/nsd/files/nsd3.initd-r1 new file mode 100644 index 000000000000..46a71489fd2c --- /dev/null +++ b/net-dns/nsd/files/nsd3.initd-r1 @@ -0,0 +1,66 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="NSD is an authoritative-only, high performance, open source name server" +extra_commands="configtest patch" + +# these can be overridden in /etc/conf.d/nsd if necessary +NSD_CONFIG="${NSD_CONFIG:-/etc/nsd/nsd.conf}" +NSD_BINARY="${NSD_BINARY:-/usr/sbin/nsd}" +NSD_CHECKCONF="${NSD_CHECKCONF:-/usr/sbin/nsd-checkconf}" +NSDC_BINARY="${NSDC_BINARY:-/usr/sbin/nsdc}" + +depend() { + need net + use logger +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +checkconfig() { + if ! test -e "${NSD_CONFIG}"; then + eerror "You need to create an appropriate config file." + eerror "An example can be found in /etc/nsd/nsd.conf.sample" + return 1 + elif ! "${NSD_CHECKCONF}" "${NSD_CONFIG}"; then + eerror "You have errors in your configfile (${NSD_CONFIG})" + return $? + fi + return 0 +} + +patch() { + local difffile=$(${NSD_CHECKCONF} -o difffile "${NSD_CONFIG}") + if ! test -s "${difffile}"; then + # no difffile found or difffile empty, so no patching required + return 0 + fi + ebegin "Patching NSD zone files" + "${NSDC_BINARY}" patch >/dev/null + eend $? +} + +start() { + ebegin "Starting NSD" + checkconfig || return $? + local pidfile=$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}") + checkpath --directory --owner nsd:nsd $(dirname "${pidfile}") + start-stop-daemon --start --pidfile "${pidfile}" \ + --exec "${NSD_BINARY}" -- -c "${NSD_CONFIG}" + eend $? +} + +stop() { + ebegin "Stopping NSD" + checkconfig || return $? + local pidfile=$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}") + patch || return $? + start-stop-daemon --stop --pidfile "${pidfile}" + eend $? +} diff --git a/net-dns/nsd/files/nsd_munin_.patch b/net-dns/nsd/files/nsd_munin_.patch new file mode 100644 index 000000000000..96902f4ed195 --- /dev/null +++ b/net-dns/nsd/files/nsd_munin_.patch @@ -0,0 +1,17 @@ +--- contrib/nsd_munin_.orig 2013-08-08 23:14:27.000000000 +0200 ++++ contrib/nsd_munin_ 2013-08-08 23:41:24.000000000 +0200 +@@ -87,10 +87,10 @@ + + =cut + +-state=${statefile:-/usr/local/var/munin/plugin-state/nsd-state} +-conf=${nsd_conf:-/usr/local/etc/nsd.conf} +-ctrl=${nsd_control:-/usr/local/sbin/nsd-control} +-chkconf=${nsd_checkconf:-/usr/local/sbin/nsd-checkconf} ++state=${statefile:-$MUNIN_PLUGSTATE/nsd-state} ++conf=${nsd_conf:-/etc/nsd/nsd.conf} ++ctrl=${nsd_control:-/usr/sbin/nsd-control} ++chkconf=${nsd_checkconf:-/usr/sbin/nsd-checkconf} + lock=$state.lock + + # number of seconds between polling attempts. diff --git a/net-dns/nsd/metadata.xml b/net-dns/nsd/metadata.xml new file mode 100644 index 000000000000..7a19ab55dfe0 --- /dev/null +++ b/net-dns/nsd/metadata.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>tom@whyscream.net</email> + <name>Tom Hendrikx</name> + <description>Please assign bugs</description> + </maintainer> + <maintainer> + <email>wschlich@gentoo.org</email> + <name>Wolfram Schlich</name> + <description>proxy-maintainer, please CC on bugs</description> + </maintainer> + <use> + <flag name='bind8-stats'>Enables BIND8 like NSTATS and XSTATS</flag> + <flag name='libevent'>Use libevent or libev, useful when zone + count is high</flag> + <flag name='minimal-responses'>If minimal responses are disabled, + responses are more likely to get truncated, resulting in TCP + fallback</flag> + <flag name='nsec3'>Enable NSEC3 support</flag> + <flag name='ratelimit'>Enables ratelimiting, based on query name, + type and source</flag> + <flag name='root-server'>Configure NSD as a root server</flag> + <flag name='runtime-checks'>Enable runtime checks, this could lead + to a reduced service level</flag> + <flag name='munin'> + Install a plugin for <pkg>net-analyzer/munin</pkg> to graph + statistical data from nsd.</flag> + <flag name='zone-stats'>Enable per-zone statistics logging, this + could lead to a reduced service level</flag> + </use> +</pkgmetadata> diff --git a/net-dns/nsd/nsd-3.2.18.ebuild b/net-dns/nsd/nsd-3.2.18.ebuild new file mode 100644 index 000000000000..5636fdeafa6e --- /dev/null +++ b/net-dns/nsd/nsd-3.2.18.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit user + +DESCRIPTION="An authoritative only, high performance, open source name server" +HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd" +MY_PV=${PV/_rc/rc} +MY_PV=${MY_PV/_beta/b} +MY_P=${PN}-${MY_PV} +S="${WORKDIR}/${MY_P}" +SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="bind8-stats ipv6 minimal-responses mmap +nsec3 ratelimit root-server runtime-checks zone-stats" + +RDEPEND=" + dev-libs/openssl + virtual/yacc +" +DEPEND=" + ${RDEPEND} + sys-devel/flex +" + +src_configure() { + # ebuild.sh sets localstatedir to /var/lib, but nsd expects /var in several locations + # some of these cannot be changed by arguments to econf/configure, f.i. logfile + econf \ + --localstatedir="${EPREFIX}/var" \ + --with-pidfile="${EPREFIX}/var/run/nsd/nsd.pid" \ + --with-zonesdir="${EPREFIX}/var/lib/nsd" \ + --enable-largefile \ + $(use_enable bind8-stats) \ + $(use_enable ipv6) \ + $(use_enable minimal-responses) \ + $(use_enable mmap) \ + $(use_enable nsec3) \ + $(use_enable ratelimit) \ + $(use_enable root-server) \ + $(use_enable runtime-checks checking) \ + $(use_enable zone-stats) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc doc/{ChangeLog,CREDITS,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS} + + insinto /usr/share/nsd + doins contrib/nsd.zones2nsd.conf + + exeinto /etc/cron.daily + newexe "${FILESDIR}"/nsd3-patch.cron nsd-patch.cron + + newinitd "${FILESDIR}"/nsd3.initd-r1 nsd + + # remove /var/run data created by Makefile, handled by initd script + rm -r "${D}"/var/run || die "could not remove /var/run/ directory" + +} + +pkg_postinst() { + enewgroup nsd + enewuser nsd -1 -1 -1 nsd + + # database directory, writable by nsd for database updates and zone transfers + install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/db/nsd + + # zones directory, writable by root for 'nsdc patch' + install -d -m 750 -o root -g nsd "${EROOT%/}"/var//nsd +} diff --git a/net-dns/nsd/nsd-4.1.0.ebuild b/net-dns/nsd/nsd-4.1.0.ebuild new file mode 100644 index 000000000000..1fb9ee291d0d --- /dev/null +++ b/net-dns/nsd/nsd-4.1.0.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit user eutils systemd + +DESCRIPTION="An authoritative only, high performance, open source name server" +HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd" +# version voodoo needed only for non-release tarballs: 4.0.0_rc1 => 4.0.0rc1 +MY_PV=${PV/_rc/rc} +MY_PV=${MY_PV/_beta/b} +MY_P=${PN}-${MY_PV} +S="${WORKDIR}/${MY_P}" +SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="bind8-stats ipv6 libevent minimal-responses mmap munin +nsec3 ratelimit root-server runtime-checks ssl" + +RDEPEND=" + dev-libs/openssl + virtual/yacc + libevent? ( dev-libs/libevent ) + ssl? ( dev-libs/openssl ) + munin? ( net-analyzer/munin ) +" +DEPEND=" + ${RDEPEND} + sys-devel/flex +" + +src_prepare() { + # Fix the paths in the munin plugin to match our install + epatch "${FILESDIR}"/nsd_munin_.patch +} + +src_configure() { + econf \ + --enable-largefile \ + --with-logfile="${EPREFIX}"/var/log/nsd.log \ + --with-pidfile="${EPREFIX}"/run/nsd/nsd.pid \ + --with-dbfile="${EPREFIX}"/var/db/nsd/nsd.db \ + --with-xfrdir="${EPREFIX}"/var/db/nsd \ + --with-xfrdfile="${EPREFIX}"/var/db/nsd/xfrd.state \ + --with-zonelistfile="${EPREFIX}"/var/db/nsd/zone.list \ + --with-zonesdir="${EPREFIX}"/var/lib/nsd \ + $(use_enable bind8-stats) \ + $(use_enable ipv6) \ + $(use_enable minimal-responses) \ + $(use_enable mmap) \ + $(use_enable nsec3) \ + $(use_enable ratelimit) \ + $(use_enable root-server) \ + $(use_enable runtime-checks checking) \ + $(use_with libevent) \ + $(use_with ssl) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc doc/{ChangeLog,CREDITS,NSD-4-features,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS} + + newinitd "${FILESDIR}"/nsd.initd nsd + + # install munin plugin and config + if use munin; then + exeinto /usr/libexec/munin/plugins + doexe contrib/nsd_munin_ + insinto /etc/munin/plugin-conf.d + newins "${FILESDIR}"/nsd.munin-conf nsd_munin + fi + + systemd_dounit "${FILESDIR}"/nsd.service + + # remove the /run directory that usually resides on tmpfs and is + # being taken care of by the nsd init script anyway (checkpath) + rm -rf "${D}"/run || die "Failed to remove /run" +} + +pkg_postinst() { + # Do this in postinst to ensure the uid/gid is consistent for binpkgs + enewgroup nsd + enewuser nsd -1 -1 -1 nsd + + # database directory, writable by nsd for database updates and zone transfers + install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/db/nsd + + # zones directory, writable by nsd for zone file updates (nsd-control write) + install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/lib/nsd +} diff --git a/net-dns/odsclient/Manifest b/net-dns/odsclient/Manifest new file mode 100644 index 000000000000..affdf3fb054c --- /dev/null +++ b/net-dns/odsclient/Manifest @@ -0,0 +1 @@ +DIST odsclient-1.03.tar.gz 4263 SHA256 4c55c88e2aebce736f2a85fb750da0292d047bfc3bd7a042535cbd9545ecc384 SHA512 12cc8b734314ec23432fc7ca980e099eee04be84134740460b7ab3edcff1abfb116794504653ef0af72b27fdc2b074633b96196e1894092152e1bd0e8300ab11 WHIRLPOOL 8d924616fa70bb90c227b9c67ef93bb5712f97d821023a9aeac96cd2fd7347c2dfab050c75a9450317c4662e52eaf6b4364e29e5686ca6f80e49e0565f8b5d0b diff --git a/net-dns/odsclient/files/1.03-gentoo.patch b/net-dns/odsclient/files/1.03-gentoo.patch new file mode 100644 index 000000000000..76f93016a010 --- /dev/null +++ b/net-dns/odsclient/files/1.03-gentoo.patch @@ -0,0 +1,21 @@ +--- a/client.c ++++ b/client.c +@@ -40,7 +40,8 @@ + ret = getret(s); + if(ret == 795 || ret == 796) + { +- fprintf(stderr, "Updated successfully\n"); ++ fprintf(stderr, "Updated %s to %s successfully\n", ++ argv[3], ipaddress); + mydprintf(s, "QUIT\n"); + close(s); + exit(0); +@@ -50,7 +51,7 @@ + + } + } +- fprintf(stderr, "Unable to update host\n"); ++ fprintf(stderr, "Unable to update %s\n", argv[3]); + return 1; + } + diff --git a/net-dns/odsclient/metadata.xml b/net-dns/odsclient/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/net-dns/odsclient/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/net-dns/odsclient/odsclient-1.03-r1.ebuild b/net-dns/odsclient/odsclient-1.03-r1.ebuild new file mode 100644 index 000000000000..b0d0f82c4ec8 --- /dev/null +++ b/net-dns/odsclient/odsclient-1.03-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit eutils toolchain-funcs + +DESCRIPTION="Client for the Open Domain Server's dynamic dns" +HOMEPAGE="http://www.ods.org/" +SRC_URI="http://www.ods.org/dl/${P}.tar.gz" +LICENSE="LGPL-2.1" + +SLOT="0" +KEYWORDS="~amd64 x86" +IUSE="" + +src_prepare() { + sed -i Makefile -e 's| -o | $(LDFLAGS)&|g' || die "sed failed" + + epatch "${FILESDIR}"/${PV}-gentoo.patch +} + +src_compile() { + emake \ + CC=$(tc-getCC) \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + || die +} + +src_install() { + dosbin odsclient + dodoc README +} diff --git a/net-dns/opendnssec/Manifest b/net-dns/opendnssec/Manifest new file mode 100644 index 000000000000..e16f1786646c --- /dev/null +++ b/net-dns/opendnssec/Manifest @@ -0,0 +1,4 @@ +DIST opendnssec-1.3.17.tar.gz 1140751 SHA256 9f0dcfb53a3e10255b2d85e6a30663548eca1ec2e900b7cd5db9329f1710e323 SHA512 6d3172cf5dc1bee1dbd14a5b9a8ada4ce3ebd954e2cd7adde664ac4b5e0cab81ed1cba2e2efeceacedf16f56d40a0874b73d7c844bbbbb6e1be1f8235a4c99f7 WHIRLPOOL 80e3a99dedb2ea1cc6a1d109bcf4e874cc9cc18abfaa233a2533f7a05b7129543cf2fbeaf6c6cde343755cacbca3125a4426c421805425204725f9ddcb156657 +DIST opendnssec-1.3.18.tar.gz 1143889 SHA256 e61d23ae0cc57b6e09d408bade6872fe5241896c61a03e8bc5ceeb65df13a676 SHA512 5df39ba778c9b1245e88b81df7aa491bca0aad2943845284c4f8b4dd729fa69014d45f07bdf99a048ccf668a1c9675a8dd99efcec1abdbd4e06e9738fec6ab6d WHIRLPOOL 7213b8f2f86651114449bc4734452d6065960e26ee289051949ca27ae3b23280cea45ff707f71942eef91c9009200272c0985ef3d3de43c9343ad2e1e54303ce +DIST opendnssec-1.4.4.tar.gz 1009728 SHA256 71f930d871e3526f930ac57925f5d5b934988e0b2e9e858926bfc73d9ba9d00e SHA512 aa88049cdd9275b7167e8a135beaa0ea6b9b2030818ec9d7815dbceb906cb0ac19d9a8e6e8571b6c37db452bbf9ab2a615785bad8ffb0a8eb21c50de42cd99b1 WHIRLPOOL 0ce1536aa69c394595105c1803761697d8450bc42e84c6a9e80568ade61fc6e0060f8b4d9bdb9547ff0cd17e27671a4c5fa3576c9d58a47188c7ff87043ccfb1 +DIST opendnssec-1.4.6.tar.gz 1014314 SHA256 53f9c454f331822925d76c9d9e5e7cb3fe2dfb03e3c467f67f9412f10d0fd5ec SHA512 c01e6e46e2007d0ae4035253484590d9a892be8284b179b6d3cdb0f8481789a67a79f9043d04de0aecc165fb44d88dac0eb02444f48e0ccd366f118a2bbb5c18 WHIRLPOOL 4535fb49879b27698b0ba88f05b2fd963c69829446a7d5eb8419c19768059347e0adfd1b59efe50b2acd5550758f499290e02ee52b1b92695e8f9061ad465bf0 diff --git a/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch b/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch new file mode 100644 index 000000000000..7c9f72355d20 --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch @@ -0,0 +1,43 @@ +Index: conf/conf.xml.in +=================================================================== +--- conf/conf.xml.in (revision 3022) ++++ conf/conf.xml.in (working copy) +@@ -38,12 +38,10 @@ + </Common> + + <Enforcer> +-<!-- + <Privileges> + <User>opendnssec</User> + <Group>opendnssec</Group> + </Privileges> +---> + + <Datastore><SQLite>@OPENDNSSEC_STATE_DIR@/kasp.db</SQLite></Datastore> + <Interval>PT3600S</Interval> +@@ -56,12 +54,10 @@ + </Enforcer> + + <Signer> +-<!-- + <Privileges> + <User>opendnssec</User> + <Group>opendnssec</Group> + </Privileges> +---> + + <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory> + <WorkerThreads>8</WorkerThreads> +@@ -80,12 +76,10 @@ + </Signer> + + <Auditor> +-<!-- + <Privileges> + <User>opendnssec</User> + <Group>opendnssec</Group> + </Privileges> +---> + + <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory> + </Auditor> diff --git a/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch b/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch new file mode 100644 index 000000000000..39678408264a --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch @@ -0,0 +1,21 @@ +diff -urN opendnssec-1.3.0rc3.old/conf/Makefile.am opendnssec-1.3.0rc3/conf/Makefile.am +--- opendnssec-1.3.0rc3.old/conf/Makefile.am 2011-07-01 21:15:25.000000000 +0200 ++++ opendnssec-1.3.0rc3/conf/Makefile.am 2011-07-01 21:17:00.000000000 +0200 +@@ -7,7 +7,7 @@ + XML = conf.xml kasp.xml zonelist.xml signconf.xml zonefetch.xml + XSL= kasp2html.xsl + +-TRANG= $(srcdir)/trang/trang.jar ++TRANG= /usr/bin/trang + + sysconfdir = @sysconfdir@/opendnssec + datadir = @datadir@/opendnssec +@@ -25,7 +25,7 @@ + .rnc.rng: + @test -x "${JAVA}" || \ + (echo "java is required for converting RelaxNG Compact to RelaxNG"; false) +- ${JAVA} -jar ${TRANG} $< $@ ++ ${TRANG} $< $@ + + regress: $(RNG) + @test -x "${XMLLINT}" || \ diff --git a/net-dns/opendnssec/files/opendnssec-drop-privileges.patch b/net-dns/opendnssec/files/opendnssec-drop-privileges.patch new file mode 100644 index 000000000000..c1972bbc3d1b --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec-drop-privileges.patch @@ -0,0 +1,28 @@ +--- conf/conf.xml.in.orig 2013-05-12 22:36:47.530988182 +0200 ++++ conf/conf.xml.in 2013-05-12 22:37:56.459817918 +0200 +@@ -38,12 +38,10 @@ + </Common> + + <Enforcer> +-<!-- + <Privileges> + <User>opendnssec</User> + <Group>opendnssec</Group> + </Privileges> +---> + <!-- NOTE: Enforcer worker threads are not used; this option is ignored --> + <!-- + <WorkerThreads>4</WorkerThreads> +@@ -60,12 +58,10 @@ + </Enforcer> + + <Signer> +-<!-- + <Privileges> + <User>opendnssec</User> + <Group>opendnssec</Group> + </Privileges> +---> + + <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory> + <WorkerThreads>4</WorkerThreads> diff --git a/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch b/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch new file mode 100644 index 000000000000..3958c6c70ccf --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch @@ -0,0 +1,32 @@ +diff -urN opendnssec-1.3.0rc2.old/Makefile.am opendnssec-1.3.0rc2/Makefile.am +--- opendnssec-1.3.0rc2.old/Makefile.am 2011-06-02 13:48:56.000000000 +0200 ++++ opendnssec-1.3.0rc2/Makefile.am 2011-06-02 13:49:19.000000000 +0200 +@@ -31,11 +31,11 @@ + + install-data-hook: + $(INSTALL) -d $(DESTDIR)$(localstatedir) +- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec +- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/tmp +- $(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/tmp ++ $(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 -urN opendnssec-1.3.0rc2.old/m4/opendnssec_common.m4 opendnssec-1.3.0rc2/m4/opendnssec_common.m4 +--- opendnssec-1.3.0rc2.old/m4/opendnssec_common.m4 2011-06-02 13:48:56.000000000 +0200 ++++ opendnssec-1.3.0rc2/m4/opendnssec_common.m4 2011-06-02 13:49:36.000000000 +0200 +@@ -18,7 +18,7 @@ + OPENDNSSEC_LIBEXEC_DIR=$full_libexecdir/opendnssec + OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec + OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec +-OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/opendnssec" ++OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/opendnssec" + OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec" + + AC_SUBST([OPENDNSSEC_BIN_DIR]) diff --git a/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch b/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch new file mode 100644 index 000000000000..fe5b504344cf --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch @@ -0,0 +1,26 @@ +diff -ur opendnssec-1.3.12.orig/m4/opendnssec_common.m4 opendnssec-1.3.12/m4/opendnssec_common.m4 +--- opendnssec-1.3.12.orig/m4/opendnssec_common.m4 2013-01-31 13:46:01.122201232 +0100 ++++ opendnssec-1.3.12/m4/opendnssec_common.m4 2013-01-31 13:54:47.648861211 +0100 +@@ -19,7 +19,7 @@ + OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec + OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec + OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/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-1.3.12.orig/Makefile.am opendnssec-1.3.12/Makefile.am +--- opendnssec-1.3.12.orig/Makefile.am 2013-01-31 13:46:01.122201232 +0100 ++++ opendnssec-1.3.12/Makefile.am 2013-01-31 13:47:08.569951675 +0100 +@@ -37,8 +37,8 @@ + $(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/files/opendnssec-use-system-trang.patch b/net-dns/opendnssec/files/opendnssec-use-system-trang.patch new file mode 100644 index 000000000000..745b277e1339 --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec-use-system-trang.patch @@ -0,0 +1,20 @@ +--- conf/Makefile.am.orig 2013-05-12 22:45:26.514768943 +0200 ++++ conf/Makefile.am 2013-05-12 22:46:33.399545628 +0200 +@@ -7,7 +7,7 @@ + XML = addns.xml conf.xml kasp.xml zonelist.xml signconf.xml enforcerstate.xml + XSL= kasp2html.xsl + +-TRANG= $(srcdir)/trang/trang.jar ++TRANG= /usr/bin/trang + TRANG_URL "https://code.google.com/p/jing-trang/" + + sysconfdir = @sysconfdir@/opendnssec +@@ -31,7 +31,7 @@ + .rnc.rng: + @test -x "${JAVA}" || \ + (echo "java is required for converting RelaxNG Compact to RelaxNG"; false) +- ${JAVA} -jar ${TRANG} $< $@ ++ ${TRANG} $< $@ + + regress: $(RNG) + @test -x "${XMLLINT}" || \ diff --git a/net-dns/opendnssec/files/opendnssec.confd b/net-dns/opendnssec/files/opendnssec.confd new file mode 100644 index 000000000000..bebe7e0b9d63 --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec.confd @@ -0,0 +1,12 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Variables containing default binaries used in the opendnssec +# initscript. You can alter them to another applications/paths +# if required. + +CHECKCONFIG_BIN=/usr/bin/ods-kaspcheck +CONTROL_BIN=/usr/sbin/ods-control +ENFORCER_BIN=/usr/sbin/ods-enforcerd +SIGNER_BIN=/usr/sbin/ods-signerd diff --git a/net-dns/opendnssec/files/opendnssec.confd-1.3.x b/net-dns/opendnssec/files/opendnssec.confd-1.3.x new file mode 100644 index 000000000000..a6c2a2808701 --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec.confd-1.3.x @@ -0,0 +1,14 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Variables containing default binaries used in the opendnssec +# initscript. You can alter them to another applications/paths +# if required. + +CHECKCONFIG_BIN=/usr/bin/ods-kaspcheck +CONTROL_BIN=/usr/sbin/ods-control +ENFORCER_BIN=/usr/sbin/ods-enforcerd +SIGNER_BIN=/usr/sbin/ods-signerd +EPPCLIENT_BIN=/usr/sbin/eppclientd +EPPCLIENT_PIDFILE=/run/opendnssec/eppclientd.pid diff --git a/net-dns/opendnssec/files/opendnssec.initd b/net-dns/opendnssec/files/opendnssec.initd new file mode 100644 index 000000000000..eebf01148038 --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec.initd @@ -0,0 +1,86 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="An open-source turn-key solution for DNSSEC" + +depend() { + use logger +} + +checkconfig() { + if [ -x "${CHECKCONFIG_BIN}" ]; then + output=$(${CHECKCONFIG_BIN} 2>&1| grep -v -E "^/etc/opendnssec/(conf|kasp).xml validates") + if [ -n "$output" ]; then + echo $output + fi + + errors=$(echo $output | grep ERROR | wc -l) + if [ $errors -gt 0 ]; then + ewarn "$errors error(s) found in OpenDNSSEC configuration." + fi + return $errors + fi + eerror "Unable to execute ${CHECKCONFIG_BIN:-config binary}" + # can't validate config, just die + return 1 +} + + +start_enforcer() { + if [ -n "${ENFORCER_BIN}" ] && [ -x "${ENFORCER_BIN}" ]; then + ebegin "Starting OpenDNSSEC Enforcer" + ${CONTROL_BIN} enforcer start > /dev/null + eend $? + else + if [ -n "${ENFORCER_BIN}" ]; then + eerror "OpenDNSSEC Enforcer binary not executable" + return 1 + fi + einfo "OpenDNSSEC Enforcer not used." + fi +} + +stop_enforcer() { + if [ -x "${ENFORCER_BIN}" ]; then + ebegin "Stopping OpenDNSSEC Enforcer" + ${CONTROL_BIN} enforcer stop > /dev/null + eend $? + fi +} + +start_signer() { + if [ -n "${SIGNER_BIN}" ] && [ -x "${SIGNER_BIN}" ]; then + ebegin "Starting OpenDNSSEC Signer" + ${CONTROL_BIN} signer start > /dev/null 2>&1 + eend $? + else + if [ -n "${SIGNER_BIN}" ]; then + eerror "OpenDNSSEC Signer binary not executable" + return 1 + fi + einfo "OpenDNSSEC Signer not used." + fi +} + +stop_signer() { + if [ -x "${SIGNER_BIN}" ]; then + ebegin "Stopping OpenDNSSEC Signer" + ${CONTROL_BIN} signer stop > /dev/null 2>&1 + eend $? + fi +} + +start() { + checkconfig || return $? + checkpath -d -m 0755 -o opendnssec:opendnssec /run/opendnssec + start_enforcer || return $? + start_signer || return $? +} + +stop() { + stop_signer + stop_enforcer + sleep 5 +} diff --git a/net-dns/opendnssec/files/opendnssec.initd-1.3.x b/net-dns/opendnssec/files/opendnssec.initd-1.3.x new file mode 100644 index 000000000000..d0e256b13d9b --- /dev/null +++ b/net-dns/opendnssec/files/opendnssec.initd-1.3.x @@ -0,0 +1,124 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="An open-source turn-key solution for DNSSEC" + +depend() { + use logger +} + +checkconfig() { + if [ -z "${CHECKCONFIG_BIN}" ]; then + # no config checker configured, skip config check + return 0 + fi + if [ -x "${CHECKCONFIG_BIN}" ]; then + output=$(${CHECKCONFIG_BIN} 2>&1| grep -v -E "^/etc/opendnssec/(conf|kasp).xml validates") + if [ -n "$output" ]; then + echo $output + fi + + errors=$(echo $output | grep ERROR | wc -l) + if [ $errors -gt 0 ]; then + ewarn "$errors error(s) found in OpenDNSSEC configuration." + fi + return $errors + fi + eerror "Unable to execute ${CHECKCONFIG_BIN:-config binary}" + # can't validate config, just die + return 1 +} + +start_enforcer() { + if [ -n "${ENFORCER_BIN}" ] && [ -x "${ENFORCER_BIN}" ]; then + ebegin "Starting OpenDNSSEC Enforcer" + ${CONTROL_BIN} enforcer start > /dev/null + eend $? + else + if [ -n "${ENFORCER_BIN}" ]; then + eerror "OpenDNSSEC Enforcer binary not executable" + return 1 + fi + einfo "OpenDNSSEC Enforcer not used." + fi +} + +stop_enforcer() { + if [ -x "${ENFORCER_BIN}" ]; then + ebegin "Stopping OpenDNSSEC Enforcer" + ${CONTROL_BIN} enforcer stop > /dev/null + eend $? + fi +} + +start_signer() { + if [ -n "${SIGNER_BIN}" ] && [ -x "${SIGNER_BIN}" ]; then + ebegin "Starting OpenDNSSEC Signer" + ${CONTROL_BIN} signer start > /dev/null 2>&1 + eend $? + else + if [ -n "${SIGNER_BIN}" ]; then + eerror "OpenDNSSEC Signer binary not executable" + return 1 + fi + einfo "OpenDNSSEC Signer not used." + fi +} + +stop_signer() { + if [ -x "${SIGNER_BIN}" ]; then + ebegin "Stopping OpenDNSSEC Signer" + ${CONTROL_BIN} signer stop > /dev/null 2>&1 + eend $? + fi +} + +start_eppclient() { + if [ -n "${EPPCLIENT_BIN}" ] && [ -x "${EPPCLIENT_BIN}" ]; then + ebegin "Starting OpenDNSSEC Eppclient" + start-stop-daemon \ + --start \ + --user opendnssec --group opendnssec \ + --exec "${EPPCLIENT_BIN}" \ + --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null + eend $? + else + # eppclient is ofptional so if we use the default binary and it + # is not used we won't die + if [ -n "${EPPCLIENT_BIN}" ] && \ + [ "${EPPCLIENT_BIN}" != "/usr/sbin/eppclientd" ]; then + eerror "OpenDNSSEC Eppclient binary not executable" + return 1 + fi + einfo "OpenDNSSEC Eppclient not used." + fi +} + +stop_eppclient() { + if [ -x "${EPPCLIENT_BIN}" ]; then + ebegin "Stopping OpenDNSSEC Eppclient" + start-stop-daemon \ + --stop \ + --exec "${EPPCLIENT_BIN}" \ + --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null + eend $? + fi +} + +start() { + checkconfig || return $? + test -d /run/opendnssec || mkdir -p /run/opendnssec + chown opendnssec:opendnssec /run/opendnssec + start_enforcer || return $? + start_signer || return $? + start_eppclient || return $? +} + +stop() { + stop_eppclient + stop_signer + stop_enforcer + sleep 5 +} diff --git a/net-dns/opendnssec/metadata.xml b/net-dns/opendnssec/metadata.xml new file mode 100644 index 000000000000..90d860ca7097 --- /dev/null +++ b/net-dns/opendnssec/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>mschiff@gentoo.org</email> + </maintainer> + <use> + <flag name='auditor'>Enables auditing capabilities for OpenDNSSEC</flag> + <flag name='eppclient'>Enables support for automatic submission of DNSSEC keys to an upstream epp server</flag> + <flag name='signer'>Enables signing capabilities for OpenDNSSEC</flag> + <flag name='opensc'>Enables support for storing DNSSEC keys through a <pkg>dev-libs/opensc</pkg> PKCS#11 interface</flag> + <flag name='softhsm'>Enables support for storing DNSSEC keys in a <pkg>dev-libs/softhsm</pkg> PKCS#11 object</flag> + <flag name='external-hsm'>Enables support for storing DNSSEC keys through an arbitrary non-portage PKCS#11 interface, specified through an environment variable</flag> + </use> +</pkgmetadata> + diff --git a/net-dns/opendnssec/opendnssec-1.3.17.ebuild b/net-dns/opendnssec/opendnssec-1.3.17.ebuild new file mode 100644 index 000000000000..eddc1ddcc147 --- /dev/null +++ b/net-dns/opendnssec/opendnssec-1.3.17.ebuild @@ -0,0 +1,203 @@ +# Copyright 1999-2014 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 base autotools 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="-auditor +curl debug doc eppclient mysql +signer +sqlite test ${PKCS11_IUSE}" + +RDEPEND=" + dev-lang/perl + dev-libs/libxml2 + dev-libs/libxslt + net-libs/ldns + curl? ( net-misc/curl ) + mysql? ( + virtual/mysql + dev-perl/DBD-mysql + ) + opensc? ( dev-libs/opensc ) + softhsm? ( dev-libs/softhsm ) + sqlite? ( + dev-db/sqlite:3 + dev-perl/DBD-SQLite + ) +" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + test? ( + app-text/trang + ) +" +# test? dev-util/cunit # Requires running test DB + +REQUIRED_USE=" + ^^ ( mysql sqlite ) + ^^ ( softhsm opensc external-hsm ) + eppclient? ( curl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-fix-localstatedir.patch" + "${FILESDIR}/${PN}-fix-run-dir.patch" + "${FILESDIR}/${PN}-1.3.14-drop-privileges.patch" + "${FILESDIR}/${PN}-1.3.14-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() { + local i + + for i in eppclient mysql; do + if use ${i}; then + ewarn + ewarn "Usage of ${i} is considered experimental." + ewarn "Do not report bugs against this feature." + ewarn + fi + done + + 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() { + base_src_prepare + eautoreconf +} + +src_configure() { + # $(use_with test cunit "${EPREFIX}/usr/") \ + econf \ + --without-cunit \ + --localstatedir="${EPREFIX}/var/" \ + --disable-static \ + --with-database-backend=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \ + --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \ + --disable-auditor \ + $(use_with curl) \ + $(use_enable debug timeshift) \ + $(use_enable eppclient) \ + $(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 update scripts + insinto /usr/share/opendnssec + use sqlite && doins enforcer/utils/migrate_keyshare_sqlite3.pl + use mysql && doins enforcer/utils/migrate_keyshare_mysql.pl + + # fix permissions + fowners root:opendnssec /etc/opendnssec + fowners root:opendnssec /etc/opendnssec/{conf,kasp,zonelist,zonefetch}.xml + use eppclient && fowners root:opendnssec /etc/opendnssec/eppclientd.conf + + fowners opendnssec:opendnssec /var/lib/opendnssec/{,signconf,unsigned,signed,tmp} + + # install conf/init script + newinitd "${FILESDIR}"/opendnssec.initd-1.3.x opendnssec + newconfd "${FILESDIR}"/opendnssec.confd-1.3.x opendnssec + use auditor || sed -i 's/^CHECKCONFIG_BIN=.*/CHECKCONFIG_BIN=/' "${D}"/etc/conf.d/opendnssec +} + +pkg_postinst() { + 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 + if use auditor; then + ewarn + ewarn "Please note that auditor support has been disabled in this version since it" + ewarn "it depends on ruby 1.8 which has been removed from the portage tree." + ewarn "USE=auditor is only provided for this warning but will not install the" + ewarn "auditor anymore." + ewarn + fi +} diff --git a/net-dns/opendnssec/opendnssec-1.3.18.ebuild b/net-dns/opendnssec/opendnssec-1.3.18.ebuild new file mode 100644 index 000000000000..eddc1ddcc147 --- /dev/null +++ b/net-dns/opendnssec/opendnssec-1.3.18.ebuild @@ -0,0 +1,203 @@ +# Copyright 1999-2014 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 base autotools 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="-auditor +curl debug doc eppclient mysql +signer +sqlite test ${PKCS11_IUSE}" + +RDEPEND=" + dev-lang/perl + dev-libs/libxml2 + dev-libs/libxslt + net-libs/ldns + curl? ( net-misc/curl ) + mysql? ( + virtual/mysql + dev-perl/DBD-mysql + ) + opensc? ( dev-libs/opensc ) + softhsm? ( dev-libs/softhsm ) + sqlite? ( + dev-db/sqlite:3 + dev-perl/DBD-SQLite + ) +" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + test? ( + app-text/trang + ) +" +# test? dev-util/cunit # Requires running test DB + +REQUIRED_USE=" + ^^ ( mysql sqlite ) + ^^ ( softhsm opensc external-hsm ) + eppclient? ( curl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-fix-localstatedir.patch" + "${FILESDIR}/${PN}-fix-run-dir.patch" + "${FILESDIR}/${PN}-1.3.14-drop-privileges.patch" + "${FILESDIR}/${PN}-1.3.14-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() { + local i + + for i in eppclient mysql; do + if use ${i}; then + ewarn + ewarn "Usage of ${i} is considered experimental." + ewarn "Do not report bugs against this feature." + ewarn + fi + done + + 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() { + base_src_prepare + eautoreconf +} + +src_configure() { + # $(use_with test cunit "${EPREFIX}/usr/") \ + econf \ + --without-cunit \ + --localstatedir="${EPREFIX}/var/" \ + --disable-static \ + --with-database-backend=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \ + --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \ + --disable-auditor \ + $(use_with curl) \ + $(use_enable debug timeshift) \ + $(use_enable eppclient) \ + $(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 update scripts + insinto /usr/share/opendnssec + use sqlite && doins enforcer/utils/migrate_keyshare_sqlite3.pl + use mysql && doins enforcer/utils/migrate_keyshare_mysql.pl + + # fix permissions + fowners root:opendnssec /etc/opendnssec + fowners root:opendnssec /etc/opendnssec/{conf,kasp,zonelist,zonefetch}.xml + use eppclient && fowners root:opendnssec /etc/opendnssec/eppclientd.conf + + fowners opendnssec:opendnssec /var/lib/opendnssec/{,signconf,unsigned,signed,tmp} + + # install conf/init script + newinitd "${FILESDIR}"/opendnssec.initd-1.3.x opendnssec + newconfd "${FILESDIR}"/opendnssec.confd-1.3.x opendnssec + use auditor || sed -i 's/^CHECKCONFIG_BIN=.*/CHECKCONFIG_BIN=/' "${D}"/etc/conf.d/opendnssec +} + +pkg_postinst() { + 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 + if use auditor; then + ewarn + ewarn "Please note that auditor support has been disabled in this version since it" + ewarn "it depends on ruby 1.8 which has been removed from the portage tree." + ewarn "USE=auditor is only provided for this warning but will not install the" + ewarn "auditor anymore." + ewarn + fi +} diff --git a/net-dns/opendnssec/opendnssec-1.4.4.ebuild b/net-dns/opendnssec/opendnssec-1.4.4.ebuild new file mode 100644 index 000000000000..118902c8fc16 --- /dev/null +++ b/net-dns/opendnssec/opendnssec-1.4.4.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2014 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 base autotools 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 +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 ) + 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.patch" + "${FILESDIR}/${PN}-fix-run-dir.patch" + "${FILESDIR}/${PN}-drop-privileges.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() { + 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() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + --without-cunit \ + --localstatedir="${EPREFIX}/var/" \ + --disable-static \ + --with-database-backend=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \ + --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \ + $(use_enable debug timeshift) \ + $(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 update scripts + insinto /usr/share/opendnssec + if use sqlite; then + doins enforcer/utils/migrate_keyshare_sqlite3.pl + doins enforcer/utils/migrate_adapters_1.sqlite3 + fi + if use mysql; then + doins enforcer/utils/migrate_keyshare_mysql.pl + doins enforcer/utils/migrate_adapters_1.mysql + fi + + # fix permissions + fowners root:opendnssec /etc/opendnssec + fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml + fowners opendnssec:opendnssec /var/lib/opendnssec/{,signconf,unsigned,signed,tmp} + + # 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.3.*) + ewarn "" + ewarn "You are upgrading from version 1.3." + ewarn "" + ewarn "Please be aware of the following:" + ewarn " * OpenDNSSEC now supports both input and output adapters for" + ewarn " AXFR and IXFR in addition to file transfer." + ewarn " -> The zonefetch.xml file has been replaced by addns.xml" + ewarn " to support this enhancement." + ewarn " -> changes to the KASP database mean that a database" + ewarn " migration is required to upgrade to 1.4 from earlier" + ewarn " versions of OpenDNSSEC." + ewarn " * The auditor is no longer supported." + ewarn "" + ewarn "You can find more information here:" + ewarn " * /usr/share/doc/opendnssec*/MIGRATION*" + ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+zone+fetcher+to+DNS+adapters" + ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+from+earlier+versions+of+OpenDNSSEC" + ewarn "" + ;; + esac + done +} diff --git a/net-dns/opendnssec/opendnssec-1.4.6.ebuild b/net-dns/opendnssec/opendnssec-1.4.6.ebuild new file mode 100644 index 000000000000..118902c8fc16 --- /dev/null +++ b/net-dns/opendnssec/opendnssec-1.4.6.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2014 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 base autotools 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 +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 ) + 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.patch" + "${FILESDIR}/${PN}-fix-run-dir.patch" + "${FILESDIR}/${PN}-drop-privileges.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() { + 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() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + --without-cunit \ + --localstatedir="${EPREFIX}/var/" \ + --disable-static \ + --with-database-backend=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \ + --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \ + $(use_enable debug timeshift) \ + $(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 update scripts + insinto /usr/share/opendnssec + if use sqlite; then + doins enforcer/utils/migrate_keyshare_sqlite3.pl + doins enforcer/utils/migrate_adapters_1.sqlite3 + fi + if use mysql; then + doins enforcer/utils/migrate_keyshare_mysql.pl + doins enforcer/utils/migrate_adapters_1.mysql + fi + + # fix permissions + fowners root:opendnssec /etc/opendnssec + fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml + fowners opendnssec:opendnssec /var/lib/opendnssec/{,signconf,unsigned,signed,tmp} + + # 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.3.*) + ewarn "" + ewarn "You are upgrading from version 1.3." + ewarn "" + ewarn "Please be aware of the following:" + ewarn " * OpenDNSSEC now supports both input and output adapters for" + ewarn " AXFR and IXFR in addition to file transfer." + ewarn " -> The zonefetch.xml file has been replaced by addns.xml" + ewarn " to support this enhancement." + ewarn " -> changes to the KASP database mean that a database" + ewarn " migration is required to upgrade to 1.4 from earlier" + ewarn " versions of OpenDNSSEC." + ewarn " * The auditor is no longer supported." + ewarn "" + ewarn "You can find more information here:" + ewarn " * /usr/share/doc/opendnssec*/MIGRATION*" + ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+zone+fetcher+to+DNS+adapters" + ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+from+earlier+versions+of+OpenDNSSEC" + ewarn "" + ;; + esac + done +} diff --git a/net-dns/openresolv/Manifest b/net-dns/openresolv/Manifest new file mode 100644 index 000000000000..65e7f0deddaa --- /dev/null +++ b/net-dns/openresolv/Manifest @@ -0,0 +1,3 @@ +DIST openresolv-3.6.1.tar.bz2 16803 SHA256 38a6908c07b8474cf489095026808d1c5ea5c53bb299beaecd23c05593b09eab SHA512 9735eba662a2b1299db5bfb7ae3bf19b32ca4eb349883011c3752af3bb3becd2f58ede5743d32bc38b17dcae7b0cfa28dc8a57079de90cb141412bd01033637f WHIRLPOOL d589bb982bb3c68077b70498ddb57a23a44a1a4e33235bb92f092f89b450cd10ebab55283e78c7c7bf012d1470f41e2702f5fecd8ff0730c17f9b6e163abc387 +DIST openresolv-3.6.2.tar.bz2 17430 SHA256 b0fd1ca59d2ee407db5e9b35d1ef8b670bc808fcc9db7aa31b0784cdd01825d0 SHA512 c3f987c7a45d4c06a2474b8f37a24eb4f9f86b8742486b4e533199003e188209231429aee7c670649fa0f5c0bc45b3a2cd02aab2d0177032cd6bd6bc52162399 WHIRLPOOL 2cfe53c2d62d9f4396f23299d52ed247f910ac32e7c1a52a61856826736e04d012bc379137275e7dcbdbb6fe71181875bb2f73525e6370b3a0166123e38aa19a +DIST openresolv-3.7.0.tar.bz2 17699 SHA256 8b7c0b2f6165b51893bceeb2ea1d3e85c08cbd1afc65319003a912166f8c35de SHA512 230df582176f7ade598e2a92834a10f4fd5d1b7d020804694924fe281b5a78fdb73d94eeff32e2a285b0c1557f4517e6b31cf8a3162fc3fa3928283f50527946 WHIRLPOOL 320122ae3dac8f4772badae533da65b8a6fb8ccabf72dbc0d6096fffd8ad5ad4109bc7170e3b73494da94a27db46c96bfea9d5c87aae16a008f4f87772e45616 diff --git a/net-dns/openresolv/files/pdnsd b/net-dns/openresolv/files/pdnsd new file mode 100644 index 000000000000..7a2d8601e4bc --- /dev/null +++ b/net-dns/openresolv/files/pdnsd @@ -0,0 +1,673 @@ +#!/bin/sh +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# /etc/pdnsd/pdnsd.conf updater +# Written by Oldrich Jedlicka (oldium.pro@seznam.cz) + +# Implementation notes: +# * The assumptions are same as for other scripts like bind and dnsmasq: +# - We assume that we are a local dns cache - after all, why would a server +# use resolvconf? +# - Now that we have assumed this, we also assume that generic DHCP clients +# will enter their domains and search domains ONLY in the "search" field +# in their resolv.confs and VPN clients will put the domain they are for +# into the domain field only. +# - This allows pdnsd to forward domains for a specific VPN domain to the +# VPN nameserver and everything else to the standard name servers. +# +# HOW-TO CONFIGURE: +# +# To get this working, you need to do only two steps +# +# 1. Create a basic configuration of /etc/pdnsd/pdnsd.conf, you can use +# /etc/pdnsd/pdnsd.conf.example to start. +# +# Additional configuration will be created automatically be resolvconf. +# The generated server sections has labels starting with "resolvconf", so +# +# DO NOT USE "resolvconf" IN YOUR LABELS! +# +# Check if the status_ctl is set to "on", otherwise the configuration +# will not be automatically reloaded - see sample config file. +# +# You are free to edit automatically created server sections, but always +# write one option per line. There are few options that are always recreated +# and your changes in them will be lost. Here is the list (with example +# values): +# +# preset=on; +# ip="192.168.0.1","192.168.0.2"; +# include=".net",".com";' +# +# The exclude directive in "resolvconf" server section is partly recreated. +# Known (configured) domains in the form ".<domain>" or ".<domain>." are +# added and removed automatically, unknown domains (also those not in +# the format above) found in this directive are kept. +# +# The sample configuration file /etc/pdnsd/pdnsd.conf prepared to work +# with resolvconf would look like this: +# +#global { +# perm_cache=2048; +# run_as="pdnsd"; +# status_ctl = on; # Important to enable status control +# run_ipv4=on; +# par_queries=2; # How many servers are probed in parallel +# interface = "lo"; # Interface on which the pdnsd listens +#} +# +# 2. The last step is to configure dns configuration for /etc/resolv.conf. +# +# a) For <net-dns/openresolv-2.0, configure the lo interface to use +# 127.0.0.1. In Gentoo we set it up like so in /etc/conf.d/net +# +# dns_servers_lo=( "127.0.0.1" ) +# +# b) For net-dns/openresolv-2* the configuration has been changed. Add +# the following line to the top of your /etc/resolvconf/resolv.conf.d/base +# (possibly create one) +# +# nameserver 127.0.0.1 +# +# c) For net-dns/openresolv-3* the configuration has been changed again. +# Uncomment the following line in your /etc/resolvconf.conf +# +# # If you run a local name server, you should uncomment the below line and +# # configure your subscribers configuration files below. +# name_servers=127.0.0.1 +# + +# pdnsd config file +PDNSDCONFIG="/etc/pdnsd/pdnsd.conf" + +# Backup suffix +BACKUPSUFFIX=".backup" + +# Load our variables from resolvconf +eval "$(/sbin/resolvconf -v)" + +COMMENT=' +# Automatically generated by resolvconf. +# +# Following server sections are automatically enabled and disabled. +# +# !!! WARNING !!! +# DO NOT RENAME LABELS! +# +# No section will be deleted and only some options are automatically changed. +# Feel free to add your own options, but do not use pair comments /* */ as they +# are not recognised. +# +# DO NOT USE resolvconf ANYWHERE IN YOUR LABELS! +# +# Automatically changed options are (with examples): +# preset=on; +# ip="192.168.0.1","192.168.0.2"; +# include=".net",".com"; +# exclude=".domain.net",".domain.com"; +# policy=excluded; +# +# The exclude directive is changed automatically only in "resolvconf" server +# section. Not handled servers are kept in the directive. +#' +BASIC_SETTINGS='server { + label="resolvconf"; + preset=off; +}' + +INSTALLATION_CHECK='^[[:space:]]*label[[:space:]]*=[[:space:]]*"resolvconf"' + +### +# Sed script configuration +# +# Composed sequence of lines: +# +# (1) SED_LOOP with @MATCH_LABELS@ substituted by several SED_MATCH_ONE_LABEL +# (2) SED_EDIT_ONE_SERVER several times +# (3) SED_ADDING with new servers +# +# Notes: +# +# * @LABEL@ is a string "resolvconf-<domain>" or "resolvconf" for global +# section +# * @RULE@ is @LABEL@ with translated characters '-' and '.' into '_'. +### + +### +# Main loop with label match - it will redirect the processing to +# SED_EDIT_ONE_SERVER, when the label match is found. Special match is +# for "resolvconf" label - the control flow is redirected to SED_ADDING to +# allow adding new sections. +# +# To summarize: Old sections are edited as they appear in the file and new +# sections are added before the "resolvconf" section. +SED_LOOP=\ +'/^[[:space:]]*server[[:space:]]*[\{]/ b server; +p; d; +:server; h; +:server_loop; n; +/^[[:space:]]*server[[:space:]]*[\{]/ { x; p; b server_loop; }; +@MATCH_LABELS@/^[[:space:]]*label[[:space:]]*=[[:space:]]*"resolvconf"/ { H; b adding; }; +/^[[:space:]]*[\}]/ { H; x; p; d; }; +H; +b server_loop;' + +### +# Match for one label with a jump to SED_EDIT_ONE_SERVER +SED_MATCH_ONE_LABEL=\ +'/^[[:space:]]*label[[:space:]]*=[[:space:]]*"@LABEL@"/ { H; x; b main_@RULE@; };' + +### +# Editing one server. New lines are put into @SETUP@, lines are composed +# in function compose_lines(). After the new lines are added, all "preset", +# "ip" and "include" options are removed (not printed). +# +# Sanity checks: Check if there is a second label or another server directive. +# In both cases, there is some error in the file, so go to the beginning by +# jumping to SED_LOOP's :server. +SED_EDIT_ONE_SERVER=\ +':main_@RULE@; +p; @SETUP@ +:loop_@RULE@; +n; +/^[[:space:]]*server[[:space:]]*[\{]/ b server; +/^[[:space:]]*label[[:space:]]*=/ b server; +/^[[:space:]]*preset[[:space:]]*=/ b loop_@RULE@; +/^[[:space:]]*ip[[:space:]]*=/ b loop_@RULE@; +/^[[:space:]]*include[[:space:]]*=/ b loop_@RULE@; +/^[[:space:]]*policy[[:space:]]*=/ b loop_@RULE@; +/^[[:space:]]*exclude[[:space:]]*=/ b exclude_logic_@RULE@; +p; +/^[[:space:]]*[\}]/ d; +b loop_@RULE@; + +:exclude_logic_@RULE@; +@EXCLUDE_LOGIC@ +b loop_@RULE@; +' + +### +# Add new servers. All lines composed by function compose_lines() are put into +# @SETUP@. Then the control flow is returned to one special SED_EDIT_ONE_SERVER +# section with label "resolvconf". +SED_ADDING=\ +':adding; +@SETUP@ +x; b main_resolvconf; +' + + +### +# Edit the domain list (include/exclude). All empty fields and matching domains +# are removed. Unmaintained domains (not in resolvconf-<domain>) are kept. All +# domains should be in a pipe (|) separated list and should begin, but not end +# with a dot. The list is put into @DOMAINS@. The control flow continues, where +# it ended in SED_EDIT_ONE_SERVER. +# +SED_DOMAIN_LIST_LOGIC=\ +'h; +s/^([[:space:]]*@DIRECTIVE@[[:space:]]*=[[:space:]]*).*/\\1/; +x; +s/^[[:space:]]*@DIRECTIVE@[[:space:]]*=[[:space:]]*//; + +:@DIRECTIVE@_loop_@RULE@; +/([[:space:]]*("[^"]"*|[^,;]*)[[:space:]]*,)*[[:space:]]*("(@DOMAINS@|)\.?"|(@DOMAINS@)\.?|,)[[:space:]]*[,;]/ { + s/(([[:space:]]*("[^"]"*|[^,;]*)[[:space:]]*,)*[[:space:]]*)("(@DOMAINS@|)\.?"|(@DOMAINS@)\.?|,)[[:space:]]*([,;])/\\1\\7/; + b @DIRECTIVE@_loop_@RULE@; +}; + +s/^[,;]//g; +/^[[:space:]]*$/ b @DIRECTIVE@_end_@RULE@; +H; x; s/\\n//; p; +:@DIRECTIVE@_end_@RULE@; +' + +################################################################################ +# Functions + +### +# char* [] uniqify(char* list[]) +# +# Uniqify the items in the list +uniqify() { + local result= + while [ -n "$1" ] ; do + case " ${result} " in + *" $1 "*) ;; + *) result="${result} $1" ;; + esac + shift + done + printf "%s" "${result# *}" +} + +### +# char *make_pdnsd_label(char *domain) +# +# Translate domain name into pdnsd's label +make_pdnsd_label() { + local domain="$1" + if [ -n "${domain}" ] ; then + printf "%s" "resolvconf-${domain}" + else + printf "%s" "resolvconf" + fi +} + + +### +# char *replace(char *text, char *search, char *replace) +# +# Replaces all the found "search" occurences in the "text" with the "replace". +replace() { + local text="$1" search="$2" replace="$3" + local pre post="${text}" result="" + while [ x"${pre}" != x"${text}" ] ; do + post="${text}" + pre="${text%%$search*}" + post="${text#*$search}" + if [ x"${pre}" != x"${text}" ] ; then + result="${result}${pre}${replace}" + text="${post}" + fi + done + printf "%s" "${result}${post}" +} + +### +# char *make_sed_label(char *pdnsd_label) +# +# Translate pdnsd's label into sed's label +make_sed_label() { + local label="$1" + label="$(replace "${label}" "-" "_")" + label="$(replace "${label}" "." "_")" + printf "%s" "${label}" +} + +# char *compose_lines(...) +# +# Compose a sed command that prints lines +compose_lines() { + local line result + for line in "$@" ; do + result="${result}i\\\\\\n$(replace "${line}" " " "\\t")\\n" + done + printf "%s" "${result}" +} + +### +# char *build_settings(char *nameservers, char *domains, char *directive) +# +# Builds configuration part @SETUP@ of sed script. The directive parameter denotes +# if the domains are to be included ("include") or excluded ("exclude"). This +# involves options like +# +# (1) # [nameserver list is empty] +# preset=off; +# +# (2) # [domain list is empty] +# preset=on; +# ip="address","address"...; +# +# (3) # [directive=="include"] +# preset=on; +# ip="address","address"...; +# include=".domain.",".domain."...; +# policy=excluded; +# +# (4) # [directive=="exclude"] +# preset=on; +# ip="address","address"...; +# exclude=".domain.",".domain."...; +# policy=included; +# +# Note: Currently there will always be only one domain in "include" directive. +# +build_settings() { + local ns="$1" domains="$2" directive="$3" + if [ -n "${ns}" ] ; then + local x list_ns list_domains + for x in ${ns} ; do + list_ns="${list_ns},\"${x}\"" + done + list_ns="${list_ns#,}" + if [ -n "${domains}" ] ; then + for x in ${domains} ; do + list_domains="${list_domains},\".${x}.\"" + done + list_domains="${list_domains#,}" + if [ x"$directive" = x"include" ]; then + compose_lines \ + " preset=on;" \ + " ip=${list_ns};" \ + " include=${list_domains};" \ + " policy=excluded;" + else + compose_lines \ + " preset=on;" \ + " ip=${list_ns};" \ + " exclude=${list_domains};" \ + " policy=included;" + fi + else + compose_lines \ + " preset=on;" \ + " ip=${list_ns};" + fi + else + compose_lines \ + " preset=off;" + fi +} + +### +# char *build_match_labels(char *domains...) +# +# Build the label match part of the sed script +# +build_match_labels() { + local domain result label destination new_match + for domain in "$@" ; do + label="$(make_pdnsd_label "${domain}")" + rule="$(make_sed_label "${label}")" + new_match="$(replace "${SED_MATCH_ONE_LABEL}" "@LABEL@" "${label}")" + new_match="$(replace "${new_match}" "@RULE@" "${rule}")" + result="${result}${new_match}\n" + done + printf "%s" "${result}" +} + +### +# char *build_domain_list_logic(char *domains, char *directive) +# +# Build a logic for changing (removing) domains from a directive. +# +build_domain_list_logic() { + local domains="$1" directive="$2" + local x domain_list logic + + # Domains should be pipe separated list + for x in ${domains}; do + x=".${x%.}" + x="$(replace "${x}" "." "\\.")" + domain_list="${domain_list}|${x}" + done + domain_list="${domain_list#|}" + + if [ -z "${domain_list}" ]; then + logic="p;" + else + logic="$(replace "${SED_DOMAIN_LIST_LOGIC}" "@DOMAINS@" "${domain_list}")" + logic="$(replace "${logic}" "@DIRECTIVE@" "${directive}")" + fi + printf "%s" "${logic}" +} + +### +# char *build_edit_part(char *domain, char *nameservers, \ +# char *add_domains, char *remove_domains, +# char *directive) +# +# Build edit part of the sed script for a particular domain. Domain can be +# empty in the case it is the "resolvconf" server part. +# +build_edit_part() { + local domain="$1" nameservers="$2" add_domains="$3" remove_domains="$4" + local directive="$5" + local setup label rule logic result + + setup="$(build_settings "${nameservers}" "${add_domains}" "${directive}")" + label="$(make_pdnsd_label "${domain}")" + rule="$(make_sed_label "${label}")" + logic="$(build_domain_list_logic "${remove_domains}" "${directive}")" + result="$(replace "${SED_EDIT_ONE_SERVER}" "@SETUP@" "${setup}")" + result="$(replace "${result}" "@EXCLUDE_LOGIC@" "${logic}")" + result="$(replace "${result}" "@RULE@" "${rule}")" + printf "%s\n" "${result}" +} + +### +# char *get_domain_nameservers(char *domain, char *domain_config...) +# +# Get the list of nameservers belonging to one particular domain. +# +# Domain configuration is a space separated list of pair <domain>,<ip>. +# +get_domain_nameservers() { + local domain="$1" ns + shift + for x in "$@" ; do + if [ x"${x%,*}" = x"${domain}" ] ; then + ns="${ns} ${x#*,}" + fi + done + ns="$(uniqify ${ns})" + printf "%s" "${ns}" +} + +### +# char *build_domain_edit_part(char *domain, char *domain_config...) +# +# Parse the list of domain configurations and build settings for one particular +# domain for the sed script. +# +# Domain configuration is a space separated list of pair <domain>,<ip>. +# +build_domain_edit_part() { + local domain="$1" ns + shift + ns="$(get_domain_nameservers "${domain}" "$@")" + build_edit_part "${domain}" "${ns}" "${domain}" "" "include" +} + +### +# char *build_add_part(char *add, char *domains...) +# +# Build add part of the sed script for all domains that needs to be added +# +build_add_part() { + local add="$1" x label rule add_part new_part result + shift + for x in ${add} ; do + local domain="${x}" ns + ns="$(get_domain_nameservers "${domain}" "$@")" + label="$(make_pdnsd_label "${domain}")" + rule="$(make_sed_label ${label})" + new_part="$(compose_lines "server {" " label=\"${label}\";")" + new_part="${new_part}$(build_settings "${ns}" "${domain}" "include")" + new_part="${new_part}$(compose_lines "}" "")" + add_part="${add_part}${new_part}" + done + result="$(replace "${SED_ADDING}" "@SETUP@" "${add_part}")" + printf "%s" "${result}" +} + +### +# char *build_sed_script(char *nameservers, char *domain_config, +# char *change, char *add, +# char *active_domains, char *known_domains) +# +# Build the full sed script from the list of nameservers, list of domains +# (in format <domain>,<ip>), list of changed domains, list of added domains, +# list of activly used domains and a list of all known domains. +# +build_sed_script() { + local ns="$1" domain_config="$2" change="$3" add="$4" + local active_domains="$5" known_domains="$6" + + local match_labels="$(build_match_labels ${change})" + + local edit_changed x + for x in ${change} ; do + edit_changed="${edit_changed}$( \ + build_domain_edit_part "${x}" ${domain_config})" + done + edit_changed="${edit_changed}$( \ + build_edit_part "" "${ns}" "${active_domains}" "${known_domains}" "exclude")" + + local added + added="$(build_add_part "${add}" ${domain_config})" + + local full + full="$(replace "${SED_LOOP}" "@MATCH_LABELS@" "${match_labels}")" + printf "%b\n" "${full}" + printf "%b\n" "${edit_changed}" + printf "%b" "${added}" +} + +### +# char *read_configured_domains(char *config_file) +# +# Reads labels of servers starting with resolvconf* from the configuration file. +# +read_configured_domains() { + local config_file="$1" result + result="\ + $(sed -nre 's/^[[:space:]]+label=\"?resolvconf-([^;\"]*)\";.*/\1/p' \ + ${config_file})" + printf "%s" "${result}" +} + +### +# void installation_check(char *config_file) +# +# Check if the pdnsd is installed and can be configured. Prepare also the file +# for resolvconf. +# +installation_check() { + local config_file="$1" + if [ -e "${config_file}" ] ; then + if ! grep ${INSTALLATION_CHECK} "${config_file}" >/dev/null 2>&1; then + printf "%s\n" "${COMMENT}" >> "${config_file}" + printf "\n%s\n" "${BASIC_SETTINGS}" >> "${config_file}" + fi + return 0 + else + return 1 + fi +} + +### +# void initialization(char *config_file) +# +# Setup basic variables NAMESERVERS, DOMAINS an CONFIGURED_DOMAINS +# +initialization() { + local config_file="$1" + + # Compatibility fix for new openresolv-2.0 + if [ -z "${NEWNS}" -a -n "${NAMESERVERS}" ]; then + NEWDOMAIN=$(replace "${DOMAINS}" ":" ",") + NEWSEARCH= + NEWNS=${NAMESERVERS} + DOMAINS= + NAMESERVERS= + SEARCH= + fi + + for N in ${NEWNS} ; do + NAMESERVERS="${NAMESERVERS} ${N}" + done + + for N in ${NEWSEARCH} ; do + NAMESERVERS="${NAMESERVERS} ${N#*,}" + done + + for DN in ${NEWDOMAIN} ; do + DOMAINS="${DOMAINS} ${DN%%,*}" + done + + CONFIGURED_DOMAINS=$(read_configured_domains ${config_file}) + + NAMESERVERS=$(uniqify ${NAMESERVERS}) + DOMAINS=$(uniqify ${DOMAINS}) + CONFIGURED_DOMAINS=$(uniqify ${CONFIGURED_DOMAINS}) +} + +### +# void find_changed_and_added(char *configured, char *domains) +# +# Find already configured and newly added domains. Sets variables +# CHANGE_DOMAINS, ADD_DOMAINS and KNOWN_DOMAINS. +# +find_changed_and_added() { + local configured="$1" domains="$2" x + + KNOWN_DOMAINS="${CONFIGURED_DOMAINS} ${DOMAINS}" + + # Find what has to be disabled + for x in ${configured} ; do + case " ${domains} " in + *" ${x} "*) ;; + *) CHANGE_DOMAINS="${CHANGE_DOMAINS} ${x}" ;; + esac + done + + # Find what has to be added + for x in ${domains} ; do + case " ${configured} " in + *" ${x} "*) CHANGE_DOMAINS="${CHANGE_DOMAINS} ${x}" ;; + *) ADD_DOMAINS="${ADD_DOMAINS} ${x}" ;; + esac + done + + ADD_DOMAINS=$(uniqify ${ADD_DOMAINS}) + CHANGE_DOMAINS=$(uniqify ${CHANGE_DOMAINS}) + KNOWN_DOMAINS=$(uniqify ${KNOWN_DOMAINS}) +} + +### +# bool make_configuration_change(char *config_file, char *backup_suffix, +# char *sed_script) +# +# Applies any configuration change. Returns true, if there was a change. +# +make_configuration_change() { + local config_file="$1" backup_suffix="$2" sed_script="$3" + local old_config new_config + + old_config="$(cat "${config_file}")" + + # Sanity check: add '}' at the end of the file + new_config=$( (printf "%s" "${old_config}" && printf "\n}" ) | \ + sed -nre "${sed_script}") + # Now remove what we added + new_config=${new_config%?\}} + + if [ x"${old_config}" != x"${new_config}" ] ; then + cp ${config_file} ${config_file}${backup_suffix} + printf "%s\n" "${new_config}" > "${config_file}" + return 0 + else + return 1 + fi +} + +################################################################################ +# Main part + +# Check, if pdnsd configuration file is installed and possibly prepare it +installation_check "${PDNSDCONFIG}" || exit 0 + +# Basic initialization of NAMESERVERS, DOMAINS and CONFIGURED_DOMAINS +initialization "${PDNSDCONFIG}" + +find_changed_and_added "${CONFIGURED_DOMAINS}" "${DOMAINS}" + +sed_script="$(build_sed_script "${NAMESERVERS}" "${NEWDOMAIN}" \ + "${CHANGE_DOMAINS}" "${ADD_DOMAINS}" \ + "${DOMAINS}" "${KNOWN_DOMAINS}")" + +# Check if the config changed +if make_configuration_change "${PDNSDCONFIG}" "${BACKUPSUFFIX}" "${sed_script}" ; then + # Checks for running pdnsd + [ -x /usr/sbin/pdnsd-ctl ] || exit 0 + [ -e /var/cache/pdnsd/pdnsd.status ] || exit 0 + + # Reload config files + /usr/sbin/pdnsd-ctl config >/dev/null 2>&1 +fi + +exit 0 diff --git a/net-dns/openresolv/files/restartcmd b/net-dns/openresolv/files/restartcmd new file mode 100644 index 000000000000..bc2196e54524 --- /dev/null +++ b/net-dns/openresolv/files/restartcmd @@ -0,0 +1,20 @@ +#!/bin/sh +# This script currently supports: +# - openrc +# - systemd + +if [ -z "${1}" ]; then + echo "Missing arguments." >&2 + exit 1 +fi + +if [ -e /run/openrc/softlevel ]; then + if /sbin/rc-service -e ${1}; then + exec rc-service ${1} -- -Ds restart + fi +elif [ -d /run/systemd/system ]; then + exec systemctl try-restart ${1} +else + echo "Unsupported init system." >&2 + exit 1 +fi diff --git a/net-dns/openresolv/metadata.xml b/net-dns/openresolv/metadata.xml new file mode 100644 index 000000000000..2316192c638a --- /dev/null +++ b/net-dns/openresolv/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>alonbl@gentoo.org</email> + </maintainer> + <longdescription lang="en"> + A framework for managing DNS information + </longdescription> +</pkgmetadata> diff --git a/net-dns/openresolv/openresolv-3.6.1.ebuild b/net-dns/openresolv/openresolv-3.6.1.ebuild new file mode 100644 index 000000000000..991fdf5d22f7 --- /dev/null +++ b/net-dns/openresolv/openresolv-3.6.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="A framework for managing DNS information" +HOMEPAGE="http://roy.marples.name/projects/openresolv" +SRC_URI="http://roy.marples.name/downloads/${PN}/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="selinux" + +DEPEND="!net-dns/resolvconf-gentoo + !<net-dns/dnsmasq-2.40-r1" +RDEPEND="selinux? ( sec-policy/selinux-resolvconf )" + +src_configure() { + econf \ + --prefix= \ + --rundir=/var/run \ + --libexecdir=/lib/resolvconf \ + --restartcmd="/lib/resolvconf/helpers/restartcmd \1" +} + +src_install() { + default + exeinto /lib/resolvconf/helpers + doexe "${FILESDIR}"/restartcmd +} + +pkg_config() { + if [ "${ROOT}" != "/" ]; then + eerror "We cannot configure unless \$ROOT=/" + return 1 + fi + + if [ -n "$(resolvconf -l)" ]; then + einfo "${PN} already has DNS information" + else + ebegin "Copying /etc/resolv.conf to resolvconf -a dummy" + resolvconf -a dummy </etc/resolv.conf + eend $? || return $? + einfo "The dummy interface will disappear when you next reboot" + fi +} diff --git a/net-dns/openresolv/openresolv-3.6.2.ebuild b/net-dns/openresolv/openresolv-3.6.2.ebuild new file mode 100644 index 000000000000..05385255faf0 --- /dev/null +++ b/net-dns/openresolv/openresolv-3.6.2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="A framework for managing DNS information" +HOMEPAGE="http://roy.marples.name/projects/openresolv" +SRC_URI="http://roy.marples.name/downloads/${PN}/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="selinux" + +DEPEND="!net-dns/resolvconf-gentoo + !<net-dns/dnsmasq-2.40-r1" +RDEPEND="selinux? ( sec-policy/selinux-resolvconf )" + +src_configure() { + econf \ + --prefix= \ + --rundir=/var/run \ + --libexecdir=/lib/resolvconf \ + --restartcmd="/lib/resolvconf/helpers/restartcmd \1" +} + +src_install() { + default + exeinto /lib/resolvconf/helpers + doexe "${FILESDIR}"/restartcmd +} + +pkg_config() { + if [ "${ROOT}" != "/" ]; then + eerror "We cannot configure unless \$ROOT=/" + return 1 + fi + + if [ -n "$(resolvconf -l)" ]; then + einfo "${PN} already has DNS information" + else + ebegin "Copying /etc/resolv.conf to resolvconf -a dummy" + resolvconf -a dummy </etc/resolv.conf + eend $? || return $? + einfo "The dummy interface will disappear when you next reboot" + fi +} diff --git a/net-dns/openresolv/openresolv-3.7.0.ebuild b/net-dns/openresolv/openresolv-3.7.0.ebuild new file mode 100644 index 000000000000..24e622727256 --- /dev/null +++ b/net-dns/openresolv/openresolv-3.7.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="A framework for managing DNS information" +HOMEPAGE="http://roy.marples.name/projects/openresolv" +SRC_URI="http://roy.marples.name/downloads/${PN}/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="selinux" + +DEPEND="!net-dns/resolvconf-gentoo + !<net-dns/dnsmasq-2.40-r1" +RDEPEND="selinux? ( sec-policy/selinux-resolvconf )" + +src_configure() { + econf \ + --prefix= \ + --rundir=/var/run \ + --libexecdir=/lib/resolvconf \ + --restartcmd="/lib/resolvconf/helpers/restartcmd \1" +} + +src_install() { + default + exeinto /lib/resolvconf/helpers + doexe "${FILESDIR}"/restartcmd +} + +pkg_config() { + if [ "${ROOT}" != "/" ]; then + eerror "We cannot configure unless \$ROOT=/" + return 1 + fi + + if [ -n "$(resolvconf -l)" ]; then + einfo "${PN} already has DNS information" + else + ebegin "Copying /etc/resolv.conf to resolvconf -a dummy" + resolvconf -a dummy </etc/resolv.conf + eend $? || return $? + einfo "The dummy interface will disappear when you next reboot" + fi +} diff --git a/net-dns/pdns-ldap-backend/Manifest b/net-dns/pdns-ldap-backend/Manifest new file mode 100644 index 000000000000..b32ebe54729a --- /dev/null +++ b/net-dns/pdns-ldap-backend/Manifest @@ -0,0 +1 @@ +DIST pdns-ldap-backend-0.2.tar.gz 745650 SHA256 6bad9b104129eeffebe2679dbc39c01183cc062b1b02c8eb5ba7903625240473 SHA512 1a9eb0282abd9dea945150412a77d9cad4ee5fb114b621396928adb6db5994a0ee54b084281b723460e2943c15570c783da518a51314636302d9179832a26990 WHIRLPOOL bb66feec72a7ad999b366ddd40c3b112b60173dfc937d4808e74a804b03bd6b85186dad0fa8ad0d8e21c47fe5c870e100dd3d9717d30b5054ba0046fb50b1736 diff --git a/net-dns/pdns-ldap-backend/metadata.xml b/net-dns/pdns-ldap-backend/metadata.xml new file mode 100644 index 000000000000..d3839a9b58dc --- /dev/null +++ b/net-dns/pdns-ldap-backend/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>dev-zero@gentoo.org</email> + <name>Tiziano Müller</name> + <description>Primary Maintainer</description> +</maintainer> +</pkgmetadata> diff --git a/net-dns/pdns-ldap-backend/pdns-ldap-backend-0.2.ebuild b/net-dns/pdns-ldap-backend/pdns-ldap-backend-0.2.ebuild new file mode 100644 index 000000000000..01fa5dbf8b7b --- /dev/null +++ b/net-dns/pdns-ldap-backend/pdns-ldap-backend-0.2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils multilib + +DESCRIPTION="Fork of the official but unmaintained LDAP backend" +HOMEPAGE="http://repo.or.cz/w/pdns-ldap-backend.git http://sequanux.org/cgi-bin/mailman/listinfo/pdns-ldap-backend" +SRC_URI="http://sequanux.org/dl/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="sasl" + +DEPEND=">=net-dns/pdns-3.2[-ldap] + net-nds/openldap[sasl=] + virtual/krb5" +RDEPEND="${DEPEND}" + +src_prepare() { + eautoreconf +} + +src_configure() { + econf \ + --disable-static \ + --with-pdns="${EPREFIX}/usr/include" \ + --libdir=/usr/$(get_libdir)/powerdns +} + +src_install() { + DOCS="AUTHORS ChangeLog NEWS README USAGE* src/dns.ldif" + default + prune_libtool_files --all + insinto /etc/openldap/schema + doins schema/* +} diff --git a/net-dns/pdns-recursor/Manifest b/net-dns/pdns-recursor/Manifest new file mode 100644 index 000000000000..91ba46d8b3d6 --- /dev/null +++ b/net-dns/pdns-recursor/Manifest @@ -0,0 +1,8 @@ +DIST pdns-recursor-3.5.3.tar.bz2 176298 SHA256 192c0b47a1cfcdccaa88d70fd33766a4c381f4223f966416f15e169df5d58eaa SHA512 2cfc1706cd1a4a06cae89e4f20da8458629fd9a2c4be6c30037f7162cb1dc91e98a22e602d890a9da09c7d495fb0c61855ae937e39a75ef99e08a095f7062312 WHIRLPOOL eeb888b317b04be86c16c47d48064820b31718074a8e1d0d4e7b7744c9ac3e2b600fde53122ef19f3f144186370474a2a50b2c38772be2af2ce6baa6d6d01194 +DIST pdns-recursor-3.6.1.tar.bz2 196460 SHA256 e57bad320d67d08604fc6f6b7e49b5553cfb5baf3460a3e06d53ba2f7d8de396 SHA512 cd878ed28345129bb0aca2c15a238ea5a0b5fe94e9aae1d0ae023a9a66ec4abae3667aa82e3950e46e9cdde8168878aaaeb759bb247de1841b5cff471ffb347a WHIRLPOOL c645e1cb269ad551d8a4c7f2b413e361898f1ac5561fa2ddf9a627edfe961fce8b1b84a09ea4a82a4a4f67a8f1d5fdce226a08ebacb28adf57ebbe8c1a13d3a5 +DIST pdns-recursor-3.6.2.tar.bz2 200313 SHA256 d9abf5bb5982cee1c3ba6eaa684d2777b7c0d3f038e201dd4e7362b4652750a4 SHA512 1476ccdb84c20dcb116b7e1d808b1cf2745acca78cd3b72a6985f19429d40af658a1ae85e8d5bc31c36c9858f76f5536b1f335e7dbfad5988db410a7931aa209 WHIRLPOOL c8fb1a861276f6e18d4288f78d119e7731caaec31b040919c9b6fcc93d53b05c5c7cb75cf2aedb4c3c975f822d6a33bb12d57a1402d88dab51459906c147e319 +DIST pdns-recursor-3.6.3.tar.bz2 200302 SHA256 6fc28c953b24710349e288bb1338d483e55ac299dcc801c62d831a66cc2aea5e SHA512 4e15061f3776063e30f4098d655dcc8e55864976c8256d38218c8554ac7c58d820f2575f56a4c8e9559c446412fbb53c74f1cfb04b6c06bbd0d4228b459f1ce0 WHIRLPOOL a51b50f44e073eb66a08216851b2a4845df16dfc73bbbde1fe1a5cf305f02afe8a0a12b5296cda27ca0b64db12177c774eea2e3731997a3c5745580552ceed55 +DIST pdns-recursor-3.6.4.tar.bz2 200278 SHA256 b1ab90cd91b10a4888d0641b39195d5b3dc85d780a9b20c8fd95c117a1c171aa SHA512 c803b3118f5fa75060538fcc7c5ad94458aaee2c989389a10b74f9b476d25dcd9b457e47fed1d4fb73b201b518c6d0581a5cd995db6a9b67a881a73a8e719833 WHIRLPOOL fca1d9d2eb2ef6b54fff54860aa0585fdb2890bade817498d99d52e95a6ac701f6950a8fb49254c631bd9c8ef47d22735489bb4426f8cdf7c6e4f8c3c2f36257 +DIST pdns-recursor-3.7.1.tar.bz2 245155 SHA256 e6b0d255a0d8cd023ebd63c50f453a305c649d04873859b4119745d64b8bd36d SHA512 34f12c94ae5d6273cf6c79ad0171f49a6bae99c2ef92cd139119961a0c134863e80f145c17953e9131f80ebefba85d4a278ca64e2ac74a8814d9e2f6c5c83cd3 WHIRLPOOL 8324be055570bd7cadc8f2bbb0859c5444ff4fb537cf21579a40a7d0b30569d818d8341b0988aec1142b667b325321af3e9cd2ab821206de01ef9aada60d3ca7 +DIST pdns-recursor-3.7.2.tar.bz2 244582 SHA256 1366bc1bed7c96fbd3926cf7a9e6d365c53b8a99182642debe1b2863dd015a7e SHA512 7dd3c950e1ba5fc7a00b57ec8cfbf52a894272609c17231b88228cfc8d1f5adcdd9797ccb84ee9801da48630652dd4e93135c8a218ee75746238123a64a97274 WHIRLPOOL d80d1de37c20e50ec865be926e4315411cb767af7986e376352277d3c6fa74657e9a51f6a9f91c1736f605219f7efab896f055869fb3b16414fe4c74490d0c5b +DIST pdns-recursor-3.7.3.tar.bz2 245192 SHA256 859ca6071147dd2e2ac1b2a5c3d5c2cbff0f5cbc501660db4259e7cbf27fea11 SHA512 35b95130e46d04c91adc3c4676a6e5546ac25d21ec576734162764732993d876d34f0e8124b7b6934c8354c0d042ffa5ec30f138b83a9aeaafcefa3808adcf23 WHIRLPOOL 62bc6b2cb5d6b8350da378af1b3fdf621e5719cd07968603c57dabfdbe384f56971e45c0a757c0b654a727729de55d59798683fe92f5338fc23684d22e372c9a diff --git a/net-dns/pdns-recursor/files/pdns-recursor-3.1.7.2-error-message.patch b/net-dns/pdns-recursor/files/pdns-recursor-3.1.7.2-error-message.patch new file mode 100644 index 000000000000..7fdf208037cd --- /dev/null +++ b/net-dns/pdns-recursor/files/pdns-recursor-3.1.7.2-error-message.patch @@ -0,0 +1,11 @@ +--- pdns-recursor-3.1.7.2/rec_channel.cc ++++ pdns-recursor-3.1.7.2/rec_channel.cc +@@ -100,7 +100,7 @@ + strcpy(remote.sun_path,(path+"/"+fname).c_str()); + if(::connect(d_fd, (sockaddr*)&remote, sizeof(remote)) < 0) { + unlink(d_local.sun_path); +- throw AhuException("Unable to connect to remote '"+path+fname+"': "+string(strerror(errno))); ++ throw AhuException("Unable to connect to remote '"+path+"/"+fname+"': "+string(strerror(errno))); + } + } + diff --git a/net-dns/pdns-recursor/files/pdns-recursor-3.5.3-fdlimit.patch b/net-dns/pdns-recursor/files/pdns-recursor-3.5.3-fdlimit.patch new file mode 100644 index 000000000000..3b6e8e25d972 --- /dev/null +++ b/net-dns/pdns-recursor/files/pdns-recursor-3.5.3-fdlimit.patch @@ -0,0 +1,67 @@ +--- pdns-recursor-3.5.3/misc.cc ++++ pdns-recursor-3.5.3/misc.cc +@@ -22,6 +22,7 @@ + #include <netdb.h> + #include <sys/time.h> + #include <time.h> ++#include <sys/resource.h> + #include <netinet/in.h> + #include <unistd.h> + #endif // WIN32 +@@ -697,3 +698,22 @@ + } while(!strchr(buffer, '\n')); + return true; + } ++ ++unsigned int getFilenumLimit(bool hardOrSoft) ++{ ++ struct rlimit rlim; ++ if(getrlimit(RLIMIT_NOFILE, &rlim) < 0) ++ unixDie("Requesting number of available file descriptors"); ++ return hardOrSoft ? rlim.rlim_max : rlim.rlim_cur; ++} ++ ++void setFilenumLimit(unsigned int lim) ++{ ++ struct rlimit rlim; ++ ++ if(getrlimit(RLIMIT_NOFILE, &rlim) < 0) ++ unixDie("Requesting number of available file descriptors"); ++ rlim.rlim_cur=lim; ++ if(setrlimit(RLIMIT_NOFILE, &rlim) < 0) ++ unixDie("Setting number of available file descriptors"); ++} +--- pdns-recursor-3.5.3/misc.hh ++++ pdns-recursor-3.5.3/misc.hh +@@ -445,4 +445,6 @@ + regex_t d_preg; + }; + ++unsigned int getFilenumLimit(bool hardOrSoft=0); ++void setFilenumLimit(unsigned int lim); + #endif +--- pdns-recursor-3.5.3/pdns_recursor.cc ++++ pdns-recursor-3.5.3/pdns_recursor.cc +@@ -1740,7 +1740,21 @@ + + g_tcpTimeout=::arg().asNum("client-tcp-timeout"); + g_maxTCPPerClient=::arg().asNum("max-tcp-per-client"); +- g_maxMThreads=::arg().asNum("max-mthreads"); ++ g_maxMThreads=::arg().asNum("max-mthreads"); ++ unsigned int availFDs=getFilenumLimit(); ++ if(g_maxMThreads * g_numThreads > availFDs) { ++ if(getFilenumLimit(true) >= g_maxMThreads * g_numThreads) { ++ setFilenumLimit(g_maxMThreads * g_numThreads); ++ L<<Logger::Warning<<"Raised soft limit on number of filedescriptors to "<<g_maxMThreads * g_numThreads<<" to match max-mthreads and threads settings"<<endl; ++ } ++ else { ++ int newval = getFilenumLimit(true) / g_numThreads; ++ L<<Logger::Warning<<"Insufficient number of filedescriptors available for max-mthreads*threads setting! ("<<availFDs<<" < "<<g_maxMThreads*g_numThreads<<"), reducing max-mthreads to "<<newval<<endl; ++ g_maxMThreads = newval; ++ } ++ ++ ++ } + + if(g_numThreads == 1) { + L<<Logger::Warning<<"Operating unthreaded"<<endl; diff --git a/net-dns/pdns-recursor/files/pdns-recursor-3.6.1-CVE-2014-8601.patch b/net-dns/pdns-recursor/files/pdns-recursor-3.6.1-CVE-2014-8601.patch new file mode 100644 index 000000000000..44ccc2803848 --- /dev/null +++ b/net-dns/pdns-recursor/files/pdns-recursor-3.6.1-CVE-2014-8601.patch @@ -0,0 +1,52 @@ +https://downloads.powerdns.com/patches/2014-02/3.6.1.patch + +diff --git a/pdns_recursor.cc b/pdns_recursor.cc +index f1ef93c..8e43d6e 100644 +--- a/pdns_recursor.cc ++++ b/pdns_recursor.cc +@@ -550,7 +550,14 @@ void startDoResolve(void *p) + + // if there is a RecursorLua active, and it 'took' the query in preResolve, we don't launch beginResolve + if(!t_pdl->get() || !(*t_pdl)->preresolve(dc->d_remote, g_listenSocketsAddresses[dc->d_socket], dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), ret, res, &variableAnswer)) { +- res = sr.beginResolve(dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), dc->d_mdp.d_qclass, ret); ++ try { ++ res = sr.beginResolve(dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), dc->d_mdp.d_qclass, ret); ++ } ++ catch(ImmediateServFailException &e) { ++ L<<Logger::Error<<"Sending SERVFAIL during resolve of '"<<dc->d_mdp.d_qname<<"' because: "<<e.reason<<endl; ++ ++ res = RCode::ServFail; ++ } + + if(t_pdl->get()) { + if(res == RCode::NoError) { +diff --git a/syncres.cc b/syncres.cc +index 4dc78b4..d09e44b 100644 +--- a/syncres.cc ++++ b/syncres.cc +@@ -923,6 +923,7 @@ int SyncRes::doResolveAt(set<string, CIStringCompare> nameservers, string auth, + } + else { + s_outqueries++; d_outqueries++; ++ if(d_outqueries > 50) throw ImmediateServFailException("more than 50 queries sent while resolving "+qname); + TryTCP: + if(doTCP) { + LOG(prefix<<qname<<": using TCP with "<< remoteIP->toStringWithPort() <<endl); +diff --git a/syncres.hh b/syncres.hh +index 5182527..b22de89 100644 +--- a/syncres.hh ++++ b/syncres.hh +@@ -593,6 +593,13 @@ private: + static AtomicCounter s_currentConnections; //!< total number of current TCP connections + }; + ++class ImmediateServFailException ++{ ++public: ++ ImmediateServFailException(string r){reason=r;}; ++ ++ string reason; //! Print this to tell the user what went wrong ++}; + + struct RemoteKeeper + { diff --git a/net-dns/pdns-recursor/files/precursor b/net-dns/pdns-recursor/files/precursor new file mode 100644 index 000000000000..aea84531e5ee --- /dev/null +++ b/net-dns/pdns-recursor/files/precursor @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="ping" + +depend() { + need net +} + +start() { + ebegin "Starting PowerDNS Recursor" + /usr/sbin/pdns_recursor --daemon=yes &>/dev/null + eend $? +} + +stop() { + ebegin "Stopping PowerDNS Recursor" + /usr/sbin/rec_control quit &>/dev/null + eend $? +} + +ping() { + ebegin "Pinging PowerDNS Recursor" + /usr/sbin/rec_control ping &>/dev/null + eend $? +} diff --git a/net-dns/pdns-recursor/files/recursor.conf b/net-dns/pdns-recursor/files/recursor.conf new file mode 100644 index 000000000000..e231b9fc6f10 --- /dev/null +++ b/net-dns/pdns-recursor/files/recursor.conf @@ -0,0 +1,21 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Drop uid +setuid=nobody + +# Drop gid +setgid=nobody + +# Don't log queries +quiet=on + +# Local IP address to bind to +local-address=127.0.0.1 + +# Local port to bind to +local-port=53 + +# Change root for safety +chroot=/var/lib/powerdns diff --git a/net-dns/pdns-recursor/metadata.xml b/net-dns/pdns-recursor/metadata.xml new file mode 100644 index 000000000000..0f057ee9135e --- /dev/null +++ b/net-dns/pdns-recursor/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>swegener@gentoo.org</email> + <name>Sven Wegener</name> + <description>Primary Maintainer</description> +</maintainer> +<longdescription> +With a small codebase, the PowerDNS Recursor is an advanced recursor currently +serving the DNS resolving needs of over 2 million Internet connections. Besides +high performance (using kqueue or epoll, over 15 thousand qps on commodity +hardware), it provides advanced anti-spoofing measures. In addition, the program +caches server performance and timeouts, making it both network and user friendly. +It also has built-in hooks for making graphs with rrdtool, providing insight into +nameserver performance. +</longdescription> +</pkgmetadata> diff --git a/net-dns/pdns-recursor/pdns-recursor-3.5.3-r1.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.5.3-r1.ebuild new file mode 100644 index 000000000000..a4080d80710f --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.5.3-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.1.7.2-error-message.patch \ + "${FILESDIR}"/${P}-fdlimit.patch + + sed -i -e s:/var/run/:/var/lib/powerdns: "${S}"/config.h || die +} + +src_configure() { + true +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns-recursor/pdns-recursor-3.6.1-r1.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.6.1-r1.ebuild new file mode 100644 index 000000000000..c90dfa2b2c19 --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.6.1-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-CVE-2014-8601.patch +} + +src_configure() { + true +} + +src_compile() { + emake \ + LOCALSTATEDIR=/var/lib/powerdns \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns-recursor/pdns-recursor-3.6.1.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.6.1.ebuild new file mode 100644 index 000000000000..cb321f43f0f4 --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.6.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_configure() { + true +} + +src_compile() { + emake \ + LOCALSTATEDIR=/var/lib/powerdns \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns-recursor/pdns-recursor-3.6.2.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.6.2.ebuild new file mode 100644 index 000000000000..cb321f43f0f4 --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.6.2.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_configure() { + true +} + +src_compile() { + emake \ + LOCALSTATEDIR=/var/lib/powerdns \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns-recursor/pdns-recursor-3.6.3.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.6.3.ebuild new file mode 100644 index 000000000000..bb2f19e8323e --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.6.3.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_configure() { + true +} + +src_compile() { + emake \ + LOCALSTATEDIR=/var/lib/powerdns \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns-recursor/pdns-recursor-3.6.4.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.6.4.ebuild new file mode 100644 index 000000000000..bb2f19e8323e --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.6.4.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_configure() { + true +} + +src_compile() { + emake \ + LOCALSTATEDIR=/var/lib/powerdns \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns-recursor/pdns-recursor-3.7.1.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.7.1.ebuild new file mode 100644 index 000000000000..5b5d2c80a043 --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.7.1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_configure() { + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" \ + ./configure +} + +src_compile() { + emake \ + LOCALSTATEDIR=/var/lib/powerdns \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns-recursor/pdns-recursor-3.7.2.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.7.2.ebuild new file mode 100644 index 000000000000..5b5d2c80a043 --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.7.2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_configure() { + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" \ + ./configure +} + +src_compile() { + emake \ + LOCALSTATEDIR=/var/lib/powerdns \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns-recursor/pdns-recursor-3.7.3.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.7.3.ebuild new file mode 100644 index 000000000000..5b5d2c80a043 --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-3.7.3.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua" + +DEPEND="lua? ( >=dev-lang/lua-5.1 )" +RDEPEND="${DEPEND} + !<net-dns/pdns-2.9.20-r1" +DEPEND="${DEPEND} + >=dev-libs/boost-1.33.1" + +pkg_setup() { + filter-flags -ftree-vectorize +} + +src_configure() { + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" \ + ./configure +} + +src_compile() { + emake \ + LOCALSTATEDIR=/var/lib/powerdns \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + OPTFLAGS="" \ + LUA_LIBS_CONFIG="-llua" \ + LUA_CPPFLAGS_CONFIG="" \ + LUA="$(use lua && echo 1)" +} + +src_install() { + dosbin pdns_recursor rec_control + doman pdns_recursor.1 rec_control.1 + + insinto /etc/powerdns + doins "${FILESDIR}"/recursor.conf + + doinitd "${FILESDIR}"/precursor + + # Pretty ugly, uh? + dodir /var/lib/powerdns/var/lib + dosym ../.. /var/lib/powerdns/var/lib/powerdns +} diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest new file mode 100644 index 000000000000..dc729f420554 --- /dev/null +++ b/net-dns/pdns/Manifest @@ -0,0 +1,8 @@ +DIST pdns-3.3.1.tar.gz 1403435 SHA256 feb566994725e049391e9b862c9437ca545f1bb970143d2387e474a6ff645bf3 SHA512 b56fa8afce0eb2f881c269f4deedf61b4313dea80563c11f75af5c4bcc35d4e59d52629351abace534e7b810759baf0aaa30ee42fcf030aa5b9684e18dc43bb4 WHIRLPOOL dd688c3da04231571217516aabdd0dc71609e216e66b40c38c68b5f0209cf57ec4075f15e211c1b941fa5ed651d58a6443fc10906bc73710ba9ea66e69369dc7 +DIST pdns-3.3.2.tar.gz 1404985 SHA256 39bd47eb299ffbb8ca5e87a8b0a6671dfea24a8167ddcbc5be0ceb49399bd7bb SHA512 5aea28b3d9b064ab7f6cc11a8f4a4a25d5f30f76f06878bc486f7e05c6b0cdd130743e9ef563c22029bb751d587464ffe0732aaac68cf99092095a3f2f9b54d7 WHIRLPOOL 8be3f6c16ecc8d35e5e8fd7626e8b9b3206954a401cb387f60f8d09d5afbf483231ac3e718a11b7bbc03923f404699e69d178e46d06a50113f080ef03529a8b8 +DIST pdns-3.3.3.tar.gz 1405282 SHA256 0ee98a94c9272e42a8c2ccb816b2c57de3751cfa7242005d5b68b29cffaa057c SHA512 8db850abafcf725e9b3baf682ce885b5d55777dde4769dfec6ea69675cdd6328a7ea9d650b413f5dc2069e2ca6c36604a4a9708c1157708317224475e4c759ed WHIRLPOOL 96a1eda8c1a9eda33daa16a110c6e8e7d4ff09b1013f6608724b91c263d4733748952962d06f5a1180dbade48f86b563ecc4d7170db583bb9a2afddea34ce48a +DIST pdns-3.4.0.tar.bz2 1234318 SHA256 0780f7a7fe768f9debc9decadb5d3a555b716eed14296e7c41f355bf8db4825e SHA512 2bc20d290366708cb6580d9bd4a6cbbb27534168e83f380118ba005ec2f2c7777a96cc86e24ef4efc974043d3eeeb56d830479a6d900a00c047ee378130bf7a5 WHIRLPOOL 8b6242b44a384604ee3581e1786f739d2b7be2ddd19f542557a5f90818455ab96782c35b6afca6afbd66c8d98bc20fe839ab8eb41929aa05125c5cb7a9d0c66e +DIST pdns-3.4.1.tar.bz2 1237002 SHA256 13e32a31759e7fd341b98c89fe551723a5c6a768350b3609c576f70602deb24a SHA512 5c65a52bbf5ab72f6887c5b862d75b0f712323c6f682eda3dd337f6cbdc0c5824306eb620d97b40d76912392751a170c3783b14e4308cba855c4288291ff4c14 WHIRLPOOL 8c9daaa27b1d434956ce76357f98ad8f24f0a291e7252598ba13acbafbd25acd2e9d9d2f327fe7b4348f3d39d435bc315bfedf9719a395e754c1e0248f68367c +DIST pdns-3.4.2.tar.bz2 1331062 SHA256 a6ab05459a0118cb921092deee06362722c45fa69ed0166ebc3696d526014b5b SHA512 e04e0d0a9d6a10f6104a1b4e399e1b84b66aaa5561696281f85898f900bcbcbd41e49a110cddffc12e1f5043d60663ce679af91e4b76f8e1823528a5f38098ed WHIRLPOOL 84d8cd1ec0604e2dd7cb80ef8c7b0379569576e0a48541fcfa0eaaf31fc1d976129bf4d4cb0fb055940236bdcc8a791d56f78d68a94dd9a2e563f5faaeb7eb73 +DIST pdns-3.4.4.tar.bz2 1336624 SHA256 ec49f5a0b55b69ba057bf9ce28ab81e5258fc60c8d4954d9100fe3bb3efd09c8 SHA512 c4567c5e09c3396af99263cbe370ffd8409a90e2583d968d7fa4760d0867ecb1696904e9ba8f6551d815b11b20b5862d789edfb599b9c5571110d3b785f2e08a WHIRLPOOL 4e744dd75a712a9928fda2d09339e7cc922ba63e8ebb11fee88d08d8e5046730d4ea23417bcc4251dc91edb3ec7aefaa480f832fc8167cc50c685435faee4256 +DIST pdns-3.4.5.tar.bz2 1337222 SHA256 f3e1441532b0af05a6b5efe5346f02d0c55f252fbed62d5b4f2e4a80997c507d SHA512 cdf6496a832cff05519a02714aaab4b689541b01a83fe2415d360f8653db4e51a00b90ea86103dd535b22881420337b32ab8a33bb0d405df590cbed322b0827c WHIRLPOOL ee3287e2ac0c3d82e60daed2021b081fbb1e78a63847e98bfddef5fab5ce5ef43d6fea8ba5583a5f70ecc104b77814a7911b77b754492169c72bdbbec5ccb377 diff --git a/net-dns/pdns/files/dnsdomain2.schema b/net-dns/pdns/files/dnsdomain2.schema new file mode 100644 index 000000000000..a89aeafb3746 --- /dev/null +++ b/net-dns/pdns/files/dnsdomain2.schema @@ -0,0 +1,195 @@ +# A schema for storing DNS zones in LDAP +# +# ORDERING is not necessary, and some servers don't support +# integerOrderingMatch. Omit or change if you like + +attributetype ( 1.3.6.1.4.1.2428.20.0.0 NAME 'dNSTTL' + DESC 'An integer denoting time to live' + EQUALITY integerMatch + ORDERING integerOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 ) + +attributetype ( 1.3.6.1.4.1.2428.20.0.1 NAME 'dNSClass' + DESC 'The class of a resource record' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.11 NAME 'wKSRecord' + DESC 'a well known service description, RFC 1035' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.12 NAME 'pTRRecord' + DESC 'domain name pointer, RFC 1035' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.13 NAME 'hInfoRecord' + DESC 'host information, RFC 1035' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.14 NAME 'mInfoRecord' + DESC 'mailbox or mail list information, RFC 1035' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.16 NAME 'tXTRecord' + DESC 'text string, RFC 1035' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.17 NAME 'rPRecord' + DESC 'for Responsible Person, RFC 1183' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.18 NAME 'aFSDBRecord' + DESC 'for AFS Data Base location, RFC 1183' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.24 NAME 'SigRecord' + DESC 'Signature, RFC 2535' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.25 NAME 'KeyRecord' + DESC 'Key, RFC 2535' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.27 NAME 'gPosRecord' + DESC 'Geographical Position, RFC 1712' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.28 NAME 'aAAARecord' + DESC 'IPv6 address, RFC 1886' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.29 NAME 'LocRecord' + DESC 'Location, RFC 1876' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.30 NAME 'nXTRecord' + DESC 'non-existant, RFC 2535' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.33 NAME 'sRVRecord' + DESC 'service location, RFC 2782' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.35 NAME 'nAPTRRecord' + DESC 'Naming Authority Pointer, RFC 2915' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.36 NAME 'kXRecord' + DESC 'Key Exchange Delegation, RFC 2230' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.37 NAME 'certRecord' + DESC 'certificate, RFC 2538' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.38 NAME 'a6Record' + DESC 'A6 Record Type, RFC 2874' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.39 NAME 'dNameRecord' + DESC 'Non-Terminal DNS Name Redirection, RFC 2672' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.42 NAME 'aPLRecord' + DESC 'Lists of Address Prefixes, RFC 3123' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.43 NAME 'dSRecord' + DESC 'Delegation Signer, RFC 3658' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.44 NAME 'sSHFPRecord' + DESC 'SSH Key Fingerprint, RFC 4255' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.45 NAME 'iPSecKeyRecord' + DESC 'SSH Key Fingerprint, RFC 4025' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.46 NAME 'rRSIGRecord' + DESC 'RRSIG, RFC 3755' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.47 NAME 'nSECRecord' + DESC 'NSEC, RFC 3755' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.48 NAME 'dNSKeyRecord' + DESC 'DNSKEY, RFC 3755' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.49 NAME 'dHCIDRecord' + DESC 'DHCID, RFC 4701' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.4.1.2428.20.1.99 NAME 'sPFRecord' + DESC 'Sender Policy Framework, RFC 4408' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +objectclass ( 1.3.6.1.4.1.2428.20.2 NAME 'dNSDomain2' + SUP 'dNSDomain' STRUCTURAL + MAY ( DNSTTL $ DNSClass $ WKSRecord $ PTRRecord $ + HINFORecord $ MINFORecord $ TXTRecord $ RPRecord $ + AFSDBRecord $ SIGRecord $ KEYRecord $ GPOSRecord $ + AAAARecord $ LOCRecord $ NXTRecord $ SRVRecord $ + NAPTRRecord $ KXRecord $ CERTRecord $ A6Record $ + DNAMERecord $ APLRecord $ DSRecord $ SSHFPRecord $ + IPSECKEYRecord $ RRSIGRecord $ NSECRecord $ + DNSKEYRecord $ DHCIDRecord $ SPFRecord + ) ) diff --git a/net-dns/pdns/files/pdns b/net-dns/pdns/files/pdns new file mode 100644 index 000000000000..6fd30219fe0f --- /dev/null +++ b/net-dns/pdns/files/pdns @@ -0,0 +1,61 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="monitor" +extra_started_commands="reload dump" + +PDNS_INSTANCE="${SVCNAME#pdns[.-]}" +PDNS_CONFIG="" + +if [ -n "${PDNS_INSTANCE}" ] && [ "${PDNS_INSTANCE}" != "pdns" ] +then + PDNS_CONFIG="--config-name=${PDNS_INSTANCE}" +else + PDNS_INSTANCE="default" +fi + +depend() { + need net +} + +start() { + ebegin "Starting PowerDNS (${PDNS_INSTANCE})" + /usr/sbin/pdns_server \ + ${PDNS_CONFIG} \ + --daemon=yes \ + --guardian=yes + eend $? +} + +stop() { + ebegin "Stopping PowerDNS (${PDNS_INSTANCE})" + /usr/bin/pdns_control ${PDNS_CONFIG} quit &>/dev/null + eend $? +} + +reload() { + ebegin "Reloading PowerDNS (${PDNS_INSTANCE})" + /usr/bin/pdns_control ${PDNS_CONFIG} cycle &>/dev/null + eend $? +} + +dump() { + ebegin "Dumping PowerDNS (${PDNS_INSTANCE}) variables" + /usr/bin/pdns_control ${PDNS_CONFIG} list + eend $? +} + +monitor() { + ebegin "Starting PowerDNS (${PDNS_INSTANCE}) in monitor mode" + /usr/sbin/pdns_server \ + ${PDNS_CONFIG} \ + --daemon=no \ + --guardian=no \ + --control-console=yes \ + --loglevel=9 \ + --log-dns-details=yes \ + --query-logging=yes + eend $? +} diff --git a/net-dns/pdns/files/pdns-3.3.1-fix-curl-link.patch b/net-dns/pdns/files/pdns-3.3.1-fix-curl-link.patch new file mode 100644 index 000000000000..5ab2889ee853 --- /dev/null +++ b/net-dns/pdns/files/pdns-3.3.1-fix-curl-link.patch @@ -0,0 +1,11 @@ +--- a/modules/remotebackend/Makefile.am 2013-12-10 11:45:24.487559267 +0100 ++++ b/modules/remotebackend/Makefile.am 2013-12-10 11:45:48.887215368 +0100 +@@ -16,7 +16,7 @@ + libremotebackend_la_SOURCES=remotebackend.hh remotebackend.cc unixconnector.cc httpconnector.cc pipeconnector.cc + + libremotebackend_la_LDFLAGS=-module -avoid-version +-libremotebackend_la_LIBS=$(LIBCURL_LIBS) ++libremotebackend_la_LIBADD=$(LIBCURL_LIBS) + + TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message REMOTEBACKEND_HTTP=$(REMOTEBACKEND_HTTP) ./testrunner.sh + TESTS=test_remotebackend_pipe test_remotebackend_http test_remotebackend_post test_remotebackend_json diff --git a/net-dns/pdns/metadata.xml b/net-dns/pdns/metadata.xml new file mode 100644 index 000000000000..ec7b58d9d788 --- /dev/null +++ b/net-dns/pdns/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>swegener@gentoo.org</email> + <name>Sven Wegener</name> + <description>Primary Maintainer</description> +</maintainer> +<longdescription> +The PowerDNS Nameserver is a modern, advanced and high performance authoritative- +only nameserver. It is written from scratch and conforms to all relevant DNS +standards documents. Furthermore, PowerDNS interfaces with almost any database. +</longdescription> +<use> + <flag name='botan'>Make it possible to use the <pkg>dev-libs/botan</pkg> library for crypto-related stuff (like DNSSec) which can be significantly faster than PolarSSL.</flag> + <flag name='cryptopp'>Make it possible to use the <pkg>dev-libs/crypto++</pkg> library for crypto-related stuff (like DNSSec) which can be significantly faster than PolarSSL.</flag> + <flag name='mydns'>Making it possible to use a MyDNS MySQL database with PowerDNS (not recommended for new deployments).</flag> + <flag name='opendbx'>Use a database supported by <pkg>dev-db/opendbx</pkg> as backend.</flag> + <flag name='remote'>Use a generic socket or pipe as a backend (via JSON RPC requests).</flag> + <flag name='remote-http'>Enable remote connections to HTTP as backends (via RESTful JSON requests).</flag> + <flag name='tinydns'>Use a TinyDNS CDB database as backend.</flag> + <flag name='tools'>Build optional tools (dnsscan, dnsscope, etc..).</flag> +</use> +</pkgmetadata> diff --git a/net-dns/pdns/pdns-3.3.1.ebuild b/net-dns/pdns/pdns-3.3.1.ebuild new file mode 100644 index 000000000000..d1585d46d008 --- /dev/null +++ b/net-dns/pdns/pdns-3.3.1.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc ldap lua mydns mysql odbc opendbx postgres remote +remote-http sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + odbc? ( dev-db/unixODBC ) + opendbx? ( dev-db/opendbx ) + remote-http? ( net-misc/curl ) + tinydns? ( dev-db/cdb ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + odbc? ( dev-db/unixODBC[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + remote-http? ( net-misc/curl[static-libs(+)] ) + tinydns? ( dev-db/cdb ) ) + doc? ( app-doc/doxygen )" + +src_prepare() { + epatch \ + "${FILESDIR}/${P}-fix-curl-link.patch" + eautoreconf + + # fix for automake now generating .hh instead of .h, bug #504244 and #504246 + cp -a pdns/backends/bind/{bindparser.h,bindparser.hh} +} + +src_configure() { + local dynmodules="pipe geo" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use odbc && dynmodules+=" godbc" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + use remote-http && myconf+=" --enable-remotebackend-http" + + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdns/pdns-3.3.2.ebuild b/net-dns/pdns/pdns-3.3.2.ebuild new file mode 100644 index 000000000000..fc34067af2f6 --- /dev/null +++ b/net-dns/pdns/pdns-3.3.2.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc ldap lua mydns mysql odbc opendbx postgres remote +remote-http sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua:= ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + odbc? ( dev-db/unixODBC ) + opendbx? ( dev-db/opendbx ) + remote-http? ( net-misc/curl ) + tinydns? ( dev-db/cdb ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua:=[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + odbc? ( dev-db/unixODBC[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + remote-http? ( net-misc/curl[static-libs(+)] ) + tinydns? ( dev-db/cdb ) ) + doc? ( app-doc/doxygen )" + +src_prepare() { + epatch \ + "${FILESDIR}/${PN}-3.3.1-fix-curl-link.patch" + eautoreconf + + # fix for automake now generating .hh instead of .h, bug #504244 and #504246 + cp -a pdns/backends/bind/{bindparser.h,bindparser.hh} +} + +src_configure() { + local dynmodules="pipe geo" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use odbc && dynmodules+=" godbc" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + use remote-http && myconf+=" --enable-remotebackend-http" + + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdns/pdns-3.3.3.ebuild b/net-dns/pdns/pdns-3.3.3.ebuild new file mode 100644 index 000000000000..fc34067af2f6 --- /dev/null +++ b/net-dns/pdns/pdns-3.3.3.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc ldap lua mydns mysql odbc opendbx postgres remote +remote-http sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua:= ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + odbc? ( dev-db/unixODBC ) + opendbx? ( dev-db/opendbx ) + remote-http? ( net-misc/curl ) + tinydns? ( dev-db/cdb ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua:=[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + odbc? ( dev-db/unixODBC[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + remote-http? ( net-misc/curl[static-libs(+)] ) + tinydns? ( dev-db/cdb ) ) + doc? ( app-doc/doxygen )" + +src_prepare() { + epatch \ + "${FILESDIR}/${PN}-3.3.1-fix-curl-link.patch" + eautoreconf + + # fix for automake now generating .hh instead of .h, bug #504244 and #504246 + cp -a pdns/backends/bind/{bindparser.h,bindparser.hh} +} + +src_configure() { + local dynmodules="pipe geo" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use odbc && dynmodules+=" godbc" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + use remote-http && myconf+=" --enable-remotebackend-http" + + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdns/pdns-3.4.0-r1.ebuild b/net-dns/pdns/pdns-3.4.0-r1.ebuild new file mode 100644 index 000000000000..13994c3432ef --- /dev/null +++ b/net-dns/pdns/pdns-3.4.0-r1.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc geoip ldap lua mydns mysql opendbx postgres remote sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + opendbx? ( dev-db/opendbx ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip ) + tinydns? ( dev-db/cdb ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip[static-libs(+)] ) + tinydns? ( dev-db/cdb ) ) + doc? ( app-doc/doxygen )" + +src_configure() { + local dynmodules="pipe geo bind" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + use geoip && dynmodules+=" geoip" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdns/pdns-3.4.0.ebuild b/net-dns/pdns/pdns-3.4.0.ebuild new file mode 100644 index 000000000000..0a1732ba9147 --- /dev/null +++ b/net-dns/pdns/pdns-3.4.0.ebuild @@ -0,0 +1,170 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc ldap lua mydns mysql opendbx postgres remote sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + opendbx? ( dev-db/opendbx ) + tinydns? ( dev-db/cdb ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + tinydns? ( dev-db/cdb ) ) + doc? ( app-doc/doxygen )" + +src_configure() { + local dynmodules="pipe geo" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdns/pdns-3.4.1.ebuild b/net-dns/pdns/pdns-3.4.1.ebuild new file mode 100644 index 000000000000..13994c3432ef --- /dev/null +++ b/net-dns/pdns/pdns-3.4.1.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc geoip ldap lua mydns mysql opendbx postgres remote sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + opendbx? ( dev-db/opendbx ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip ) + tinydns? ( dev-db/cdb ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip[static-libs(+)] ) + tinydns? ( dev-db/cdb ) ) + doc? ( app-doc/doxygen )" + +src_configure() { + local dynmodules="pipe geo bind" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + use geoip && dynmodules+=" geoip" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdns/pdns-3.4.2.ebuild b/net-dns/pdns/pdns-3.4.2.ebuild new file mode 100644 index 000000000000..25ead561a7d0 --- /dev/null +++ b/net-dns/pdns/pdns-3.4.2.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc geoip ldap lua mydns mysql opendbx postgres remote sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua:= ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + opendbx? ( dev-db/opendbx ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip ) + tinydns? ( dev-db/cdb ) + )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua:=[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip[static-libs(+)] ) + tinydns? ( dev-db/cdb ) + ) + doc? ( app-doc/doxygen )" + +src_configure() { + local dynmodules="pipe geo bind" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + use geoip && dynmodules+=" geoip" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdns/pdns-3.4.4.ebuild b/net-dns/pdns/pdns-3.4.4.ebuild new file mode 100644 index 000000000000..77d6d55f103d --- /dev/null +++ b/net-dns/pdns/pdns-3.4.4.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc geoip ldap lua mydns mysql opendbx postgres remote sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua:= ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + opendbx? ( dev-db/opendbx ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip ) + tinydns? ( >=dev-db/tinycdb-0.77 ) + )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua:=[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip[static-libs(+)] ) + tinydns? ( >=dev-db/tinycdb-0.77 ) + ) + doc? ( app-doc/doxygen )" + +src_configure() { + local dynmodules="pipe geo bind" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + use geoip && dynmodules+=" geoip" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + + CRYPTOPP_CFLAGS=" " \ + CRYPTOPP_LIBS="-lcrypto++" \ + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdns/pdns-3.4.5.ebuild b/net-dns/pdns/pdns-3.4.5.ebuild new file mode 100644 index 000000000000..77d6d55f103d --- /dev/null +++ b/net-dns/pdns/pdns-3.4.5.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib systemd user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="http://www.powerdns.com/" +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan cryptopp debug doc geoip ldap lua mydns mysql opendbx postgres remote sqlite static tools tinydns test" + +REQUIRED_USE="mydns? ( mysql )" + +RDEPEND="!static? ( + net-libs/polarssl + >=dev-libs/boost-1.34:= + botan? ( =dev-libs/botan-1.10* ) + cryptopp? ( dev-libs/crypto++ ) + lua? ( dev-lang/lua:= ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + opendbx? ( dev-db/opendbx ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip ) + tinydns? ( >=dev-db/tinycdb-0.77 ) + )" +DEPEND="${RDEPEND} + virtual/pkgconfig + static? ( + >=net-libs/polarssl-1.3.0[static-libs(+)] + >=dev-libs/boost-1.34[static-libs(+)] + botan? ( =dev-libs/botan-1.10*[static-libs(+)] ) + cryptopp? ( dev-libs/crypto++[static-libs(+)] ) + lua? ( dev-lang/lua:=[static-libs(+)] ) + mysql? ( virtual/mysql[static-libs(+)] ) + postgres? ( dev-db/postgresql[static-libs(+)] ) + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] ) + sqlite? ( dev-db/sqlite:3[static-libs(+)] ) + opendbx? ( dev-db/opendbx[static-libs(+)] ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip[static-libs(+)] ) + tinydns? ( >=dev-db/tinycdb-0.77 ) + ) + doc? ( app-doc/doxygen )" + +src_configure() { + local dynmodules="pipe geo bind" # the default backends, always enabled + local modules="" + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + use geoip && dynmodules+=" geoip" + #use xdb && dynmodules+=" xdb" + + if use static ; then + modules="${dynmodules}" + dynmodules="" + fi + + use botan && myconf+=" --enable-botan1.10" + use cryptopp && myconf+=" --enable-cryptopp" + use debug && myconf+=" --enable-verbose-logging" + + CRYPTOPP_CFLAGS=" " \ + CRYPTOPP_LIBS="-lcrypto++" \ + econf \ + --with-system-polarssl \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules="${modules}" \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable test unit-tests) \ + $(use_with lua) \ + $(use_enable static static-binaries) \ + $(use_enable tools) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install () { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + doinitd "${FILESDIR}"/pdns + systemd_newunit contrib/systemd-pdns.service pdns.service + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local fix_perms=0 + + for rv in ${REPLACING_VERSIONS} ; do + version_compare ${rv} 3.2 + [[ $? -eq 1 ]] && fix_perms=1 + done + + if [[ $fix_perms -eq 1 ]] ; then + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/pdns" + ewarn " ${EPREFIX}/etc/pdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf} + fi + +} diff --git a/net-dns/pdnsd/Manifest b/net-dns/pdnsd/Manifest new file mode 100644 index 000000000000..effc5db1c47f --- /dev/null +++ b/net-dns/pdnsd/Manifest @@ -0,0 +1 @@ +DIST pdnsd-1.2.9a-par.tar.gz 516061 SHA256 bb5835d0caa8c4b31679d6fd6a1a090b71bdf70950db3b1d0cea9cf9cb7e2a7b SHA512 4fde296642306aa986ddb7cad0b5991bcd397656d93ef4962706276848c7fa62c664a40198e807d029637f116e8000c237d98b91cbbfec5c08b134d8bb3adf81 WHIRLPOOL 9f1f94d6aece1d5cdffe4799e532b1f88217e8d0fef83d097fd03a24a958ad551154efa1f1b719a31315be5e225f33cc7da5c40e3f13a0acba6686e0f6376573 diff --git a/net-dns/pdnsd/files/pdnsd.conf.test b/net-dns/pdnsd/files/pdnsd.conf.test new file mode 100644 index 000000000000..aa351f71a0dd --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd.conf.test @@ -0,0 +1,27 @@ +// $Id$ + +global { + perm_cache=512; + cache_dir=; + max_ttl=604800; + paranoid=on; + server_port=33455; + server_ip=127.0.0.1; + status_ctl=on; +} + +server { + ip= + timeout=30; + interval=30; + uptest=ping; + ping_timeout=50; + purge_cache=off; +} + +source { + ttl=86400; + owner="localhost."; + serve_aliases=on; + file="/etc/hosts"; +} diff --git a/net-dns/pdnsd/files/pdnsd.online.2 b/net-dns/pdnsd/files/pdnsd.online.2 new file mode 100644 index 000000000000..ba4c19d39e19 --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd.online.2 @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +command="/usr/sbin/pdnsd-ctl" + +depend() { + need pdnsd +} + +wait_for_socket() { + local i=0 pdnsd_socket="/var/cache/pdnsd/pdnsd.status" + while [ $i -lt 10 ]; do + [ -S "${pdnsd_socket}" ] && return 0 + i=$(($i+1)) + sleep 1s + done + + return 1 +} + +start() { + wait_for_socket || return 1 + ebegin "Starting pdnsd-online" + ${command} -q server all up + eend $? +} + +stop() { + ebegin "Stopping pdnsd-online" + ${command} -q server all down + eend $? +} diff --git a/net-dns/pdnsd/files/pdnsd.rc8 b/net-dns/pdnsd/files/pdnsd.rc8 new file mode 100644 index 000000000000..0c10698075dd --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd.rc8 @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +pidfile="/run/pdnsd.pid" +command="/usr/sbin/pdnsd" +command_args="-s -t -d -p ${pidfile} ${PDNSDCONFIG}" +extra_started_commands="reload" + +depend() { + use net + provide dns +} + +start_pre() { + if [ ! -e /etc/pdnsd/pdnsd.conf ] ; then + eerror "You need an /etc/pdnsd/pdnsd.conf file first." + eerror "There is a sample in /etc/pdnsd/pdnsd.conf.sample" + return 1 + fi +} + +reload() { + ebegin "Reloading pdnsd.conf" + /usr/sbin/pdnsd-ctl config + eend $? +} diff --git a/net-dns/pdnsd/files/pdnsd.resolvconf-r1 b/net-dns/pdnsd/files/pdnsd.resolvconf-r1 new file mode 100644 index 000000000000..edc1c9994f0a --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd.resolvconf-r1 @@ -0,0 +1,631 @@ +#!/bin/bash +# Copyright 2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# /etc/pdnsd/pdnsd.conf updater +# Written by Oldrich Jedlicka (oldium.pro@seznam.cz) + +# Implementation notes: +# * The assumptions are same as for other scripts like bind and dnsmasq: +# - We assume that we are a local dns cache - after all, why would a server +# use resolvconf? +# - Now that we have assumed this, we also assume that generic DHCP clients +# will enter their domains and search domains ONLY in the "search" field +# in their resolv.confs and VPN clients will put the domain they are for +# into the domain field only. +# - This allows pdnsd to forward domains for a specific VPN domain to the +# VPN nameserver and everything else to the standard name servers. +# +# HOW-TO CONFIGURE: +# +# To get this working, you need to do only two steps +# +# 1. Create a basic configuration of /etc/pdnsd/pdnsd.conf, you can use +# /etc/pdnsd/pdnsd.conf.example to start. +# +# Additional configuration will be created automatically be resolvconf. +# The generated server sections has labels starting with "resolvconf", so +# +# DO NOT USE "resolvconf" IN YOUR LABELS! +# +# Check if the status_ctl is set to "on", otherwise the configuration +# will not be automatically reloaded - see sample config file. +# +# You are free to edit automatically created server sections, but always +# write one option per line. There are few options that are always recreated +# and your changes in them will be lost. Here is the list (with example +# values): +# +# preset=on; +# ip="192.168.0.1","192.168.0.2"; +# include=".net",".com";' +# +# The exclude directive in "resolvconf" server section is partly recreated. +# Known (configured) domains in the form ".<domain>" or ".<domain>." are +# added and removed automatically, unknown domains (also those not in +# the format above) found in this directive are kept. +# +# The sample configuration file /etc/pdnsd/pdnsd.conf prepared to work +# with resolvconf would look like this: +# +#global { +# perm_cache=2048; +# run_as="pdnsd"; +# status_ctl = on; # Important to enable status control +# run_ipv4=on; +# par_queries=2; # How many servers are probed in parallel +# interface = "lo"; # Interface on which the pdnsd listens +#} +# +# 2. The last step is to configure dns configuration for /etc/resolv.conf +# for the lo interface. In Gentoo we set it up like so in /etc/conf.d/net +# +# dns_servers_lo=( "127.0.0.1" ) + +# pdnsd config file +PDNSDCONFIG="/etc/pdnsd/pdnsd.conf" + +# Backup suffix +BACKUPSUFFIX=".backup" + +# Load our variables from resolvconf +VARS="$(resolvconf -v)" +eval "${VARS}" + +COMMENT=' +# Automatically generated by resolvconf. +# +# Following server sections are automatically enabled and disabled. +# +# !!! WARNING !!! +# DO NOT RENAME LABELS! +# +# No section will be deleted and only some options are automatically changed. +# Feel free to add your own options, but do not use pair comments /* */ as they +# are not recognised. +# +# DO NOT USE resolvconf ANYWHERE IN YOUR LABELS! +# +# Automatically changed options are (with examples): +# preset=on; +# ip="192.168.0.1","192.168.0.2"; +# include=".net",".com"; +# exclude=".domain.net",".domain.com"; +# policy=excluded; +# +# The exclude directive is changed automatically only in "resolvconf" server +# section. Not handled servers are kept in the directive. +#' +BASIC_SETTINGS='server { + label="resolvconf"; + preset=off; +}' + +INSTALLATION_CHECK='^[[:space:]]*label[[:space:]]*=[[:space:]]*"resolvconf"' + +### +# Sed script configuration +# +# Composed sequence of lines: +# +# (1) SED_LOOP with @MATCH_LABELS@ substituted by several SED_MATCH_ONE_LABEL +# (2) SED_EDIT_ONE_SERVER several times +# (3) SED_ADDING with new servers +# +# Notes: +# +# * @LABEL@ is a string "resolvconf-<domain>" or "resolvconf" for global +# section +# * @RULE@ is @LABEL@ with translated characters '-' and '.' into '_'. +### + +### +# Main loop with label match - it will redirect the processing to +# SED_EDIT_ONE_SERVER, when the label match is found. Special match is +# for "resolvconf" label - the control flow is redirected to SED_ADDING to +# allow adding new sections. +# +# To summarize: Old sections are edited as they appear in the file and new +# sections are added before the "resolvconf" section. +SED_LOOP=\ +'/^[[:space:]]*server[[:space:]]*[\{]/ b server; +p; d; +:server; h; +:server_loop; n; +/^[[:space:]]*server[[:space:]]*[\{]/ { x; p; b server_loop; }; +@MATCH_LABELS@ +/^[[:space:]]*label[[:space:]]*=[[:space:]]*"resolvconf"/ { H; b adding; }; +/^[[:space:]]*[\}]/ { H; x; p; d; }; +H; +b server_loop; +' + +### +# Match for one label with a jump to SED_EDIT_ONE_SERVER +SED_MATCH_ONE_LABEL=\ +'/^[[:space:]]*label[[:space:]]*=[[:space:]]*"@LABEL@"/ { H; x; b main_@RULE@; }; +' + +### +# Editing one server. New lines are put into @SETUP@, lines are composed +# in function compose_lines(). After the new lines are added, all "preset", +# "ip" and "include" options are removed (not printed). +# +# Sanity checks: Check if there is a second label or another server directive. +# In both cases, there is some error in the file, so go to the beginning by +# jumping to SED_LOOP's :server. +SED_EDIT_ONE_SERVER=\ +':main_@RULE@; +p; @SETUP@ +:loop_@RULE@; +n; +/^[[:space:]]*server[[:space:]]*[\{]/ b server; +/^[[:space:]]*label[[:space:]]*=/ b server; +/^[[:space:]]*preset[[:space:]]*=/ b loop_@RULE@; +/^[[:space:]]*ip[[:space:]]*=/ b loop_@RULE@; +/^[[:space:]]*include[[:space:]]*=/ b loop_@RULE@; +/^[[:space:]]*policy[[:space:]]*=/ b loop_@RULE@; +/^[[:space:]]*exclude[[:space:]]*=/ b exclude_logic_@RULE; +p; +/^[[:space:]]*[\}]/ d; +b loop_@RULE@; + +:exclude_logic_@RULE; +@EXCLUDE_LOGIC@ +b loop_@RULE@; +' + +### +# Add new servers. All lines composed by function compose_lines() are put into +# @SETUP@. Then the control flow is returned to one special SED_EDIT_ONE_SERVER +# section with label "resolvconf". +SED_ADDING=\ +':adding; +@SETUP@ +x; b main_resolvconf; +' + + +### +# Edit the domain list (include/exclude). All empty fields and matching domains +# are removed. Unmaintained domains (not in resolvconf-<domain>) are kept. All +# domains should be in a pipe (|) separated list and should begin, but not end +# with a dot. The list is put into @DOMAINS@. The control flow continues, where +# it ended in SED_EDIT_ONE_SERVER. +# +SED_DOMAIN_LIST_LOGIC=\ +'h; +s/^([[:space:]]*@DIRECTIVE@[[:space:]]*=[[:space:]]*).*/\\1/; +x; +s/^[[:space:]]*@DIRECTIVE@[[:space:]]*=[[:space:]]*//; + +:@DIRECTIVE@_loop_@RULE@; +/([[:space:]]*("[^"]"*|[^,;]*)[[:space:]]*,)*[[:space:]]*("(@DOMAINS@|)\.?"|(@DOMAINS@)\.?|,)[[:space:]]*[,;]/ { + s/(([[:space:]]*("[^"]"*|[^,;]*)[[:space:]]*,)*[[:space:]]*)("(@DOMAINS@|)\.?"|(@DOMAINS@)\.?|,)[[:space:]]*([,;])/\\1\\7/; + b @DIRECTIVE@_loop_@RULE@; +}; + +s/^[,;]//g; +/^[[:space:]]*$/ b @DIRECTIVE@_end_@RULE@; +H; x; s/\\n//; p; +:@DIRECTIVE@_end_@RULE@; +' + +################################################################################ +# Functions + +### +# char* [] uniqify(char* list[]) +# +# Uniqify the items in the list +uniqify() { + local result= + while [ -n "$1" ] ; do + case " ${result} " in + *" $1 "*) ;; + *) result="${result} $1" ;; + esac + shift + done + echo "${result# *}" +} + +### +# char *make_pdnsd_label(char *domain) +# +# Translate domain name into pdnsd's label +make_pdnsd_label() { + local domain=$1 + if [[ -n ${domain} ]] ; then + echo -n "resolvconf-${domain}" + else + echo -n "resolvconf" + fi +} + +### +# char *make_sed_label(char *pdnsd_label) +# +# Translate pdnsd's label into sed's label +make_sed_label() { + local label="$1" + label="${label//-/_}" + label="${label//./_}" + echo -n "${label}" +} + +# char *compose_lines(...) +# +# Compose a sed command that prints lines +compose_lines() { + local line result + for line in "$@" ; do + result="${result}i\\\\\\n${line// /\\t}\\n" + done + echo "${result}" +} + +### +# char *build_settings(char *nameservers, char *domains, char *directive) +# +# Builds configuration part @SETUP@ of sed script. The directive parameter denotes +# if the domains are to be included ("include") or excluded ("exclude"). This +# involves options like +# +# (1) # [nameserver list is empty] +# preset=off; +# +# (2) # [domain list is empty] +# preset=on; +# ip="address","address"...; +# +# (3) # [directive=="include"] +# preset=on; +# ip="address","address"...; +# include=".domain.",".domain."...; +# policy=excluded; +# +# (4) # [directive=="exclude"] +# preset=on; +# ip="address","address"...; +# exclude=".domain.",".domain."...; +# policy=included; +# +# Note: Currently there will always be only one domain in "include" directive. +# +build_settings() { + local ns="$1" domains="$2" directive="$3" + if [[ -n ${ns} ]] ; then + local x list_ns list_domains + for x in ${ns} ; do + list_ns="${list_ns},\"${x}\"" + done + list_ns="${list_ns#,}" + if [[ -n ${domains} ]] ; then + for x in ${domains} ; do + list_domains="${list_domains},\".${x}.\"" + done + list_domains="${list_domains#,}" + if [[ $directive == "include" ]]; then + compose_lines \ + " preset=on;" \ + " ip=${list_ns};" \ + " include=${list_domains};" \ + " policy=excluded;" + else + compose_lines \ + " preset=on;" \ + " ip=${list_ns};" \ + " exclude=${list_domains};" \ + " policy=included;" + fi + else + compose_lines \ + " preset=on;" \ + " ip=${list_ns};" + fi + else + compose_lines \ + " preset=off;" + fi +} + +### +# char *build_match_labels(char *domains...) +# +# Build the label match part of the sed script +# +build_match_labels() { + local domain result label destination new_match + for domain in "$@" ; do + label="$(make_pdnsd_label "${domain}")" + rule="$(make_sed_label "${label}")" + new_match="${SED_MATCH_ONE_LABEL//@LABEL@/${label}}" + new_match="${new_match//@RULE@/${rule}}" + result="${result}${new_match}" + done + echo "${result}" +} + +### +# char *build_domain_list_logic(char *domains, char *directive) +# +# Build a logic for changing (removing) domains from a directive. +# +build_domain_list_logic() { + local domains="$1" directive="$2" + local x domain_list logic + + # Domains should be pipe separated list + for x in ${domains}; do + x=".${x%.}" + x="${x//./\.}" + domain_list="${domain_list}|${x}" + done + domain_list="${domain_list#|}" + + if [[ -z ${domain_list} ]]; then + logic="p;" + else + logic="${SED_DOMAIN_LIST_LOGIC//@DOMAINS@/${domain_list}}" + logic="${logic//@DIRECTIVE@/${directive}}" + fi + echo "${logic}" +} + +### +# char *build_edit_part(char *domain, char *nameservers, \ +# char *add_domains, char *remove_domains, +# char *directive) +# +# Build edit part of the sed script for a particular domain. Domain can be +# empty in the case it is the "resolvconf" server part. +# +build_edit_part() { + local domain="$1" nameservers="$2" add_domains="$3" remove_domains="$4" + local directive="$5" + local setup label rule logic result + + setup="$(build_settings "${nameservers}" "${add_domains}" "${directive}")" + label="$(make_pdnsd_label "${domain}")" + rule="$(make_sed_label "${label}")" + logic="$(build_domain_list_logic "${remove_domains}" "${directive}")" + result="${SED_EDIT_ONE_SERVER//@SETUP@/${setup}}" + result="${result//@EXCLUDE_LOGIC@/${logic}}" + result="${result//@RULE@/${rule}}" + echo "${result}" +} + +### +# char *get_domain_nameservers(char *domain, char *domain_config...) +# +# Get the list of nameservers belonging to one particular domain. +# +# Domain configuration is a space separated list of pair <domain>,<ip>. +# +get_domain_nameservers() { + local domain="$1" ns + shift + for x in "$@" ; do + if [[ ${x%,*} == ${domain} ]] ; then + ns="${ns} ${x#*,}" + fi + done + ns="$(uniqify ${ns})" + echo -n "${ns}" +} + +### +# char *build_domain_edit_part(char *domain, char *domain_config...) +# +# Parse the list of domain configurations and build settings for one particular +# domain for the sed script. +# +# Domain configuration is a space separated list of pair <domain>,<ip>. +# +build_domain_edit_part() { + local domain="$1" ns + shift + ns="$(get_domain_nameservers "${domain}" "$@")" + build_edit_part "${domain}" "${ns}" "${domain}" "" "include" +} + +### +# char *build_add_part(char *add, char *domains...) +# +# Build add part of the sed script for all domains that needs to be added +# +build_add_part() { + local add="$1" x label rule add_part new_part result + shift + for x in ${add} ; do + local domain="${x}" ns + ns="$(get_domain_nameservers "${domain}" "$@")" + label="$(make_pdnsd_label "${domain}")" + rule="$(make_sed_label ${label})" + new_part="$(compose_lines "server {" " label=\"${label}\";")" + new_part="${new_part}$(build_settings "${ns}" "${domain}" "include")" + new_part="${new_part}$(compose_lines "}" "")" + add_part="${add_part}${new_part}" + done + result="${SED_ADDING//@SETUP@/${add_part}}" + echo "${result}" +} + +### +# char *build_sed_script(char *nameservers, char *domain_config, +# char *change, char *add, +# char *active_domains, char *known_domains) +# +# Build the full sed script from the list of nameservers, list of domains +# (in format <domain>,<ip>), list of changed domains, list of added domains, +# list of activly used domains and a list of all known domains. +# +build_sed_script() { + local ns="$1" domain_config="$2" change="$3" add="$4" + local active_domains="$5" known_domains="$6" + + local match_labels="$(build_match_labels ${change})" + + local edit_changed x + for x in ${change} ; do + edit_changed="${edit_changed}$( \ + build_domain_edit_part "${x}" ${domain_config})" + done + edit_changed="${edit_changed}$( \ + build_edit_part "" "${ns}" "${active_domains}" "${known_domains}" "exclude")" + + local added + added="$(build_add_part "${add}" ${domain_config})" + + local full + full="${SED_LOOP//@MATCH_LABELS@/${match_labels}}" + echo -ne "${full}" + echo -ne "${edit_changed}" + echo -ne "${added}" +} + +### +# char *read_configured_domains(char *config_file) +# +# Reads labels of servers starting with resolvconf* from the configuration file. +# +read_configured_domains() { + local config_file="$1" result + result="\ + $(sed -nre 's/^[[:space:]]+label=\"?resolvconf-([^;\"]*)\";.*/\1/p' \ + ${config_file})" + echo -n "${result}" +} + +### +# void installation_check(char *config_file) +# +# Check if the pdnsd is installed and can be configured. Prepare also the file +# for resolvconf. +# +installation_check() { + local config_file="$1" + if [[ -e ${config_file} ]] ; then + if ! grep ${INSTALLATION_CHECK} ${config_file} &>/dev/null ; then + echo -e "${COMMENT}" >> ${config_file} + echo -e "\n${BASIC_SETTINGS}" >> ${config_file} + fi + return 0 + else + return 1 + fi +} + +### +# void initialization(char *config_file) +# +# Setup basic variables NAMESERVERS, DOMAINS an CONFIGURED_DOMAINS +# +initialization() { + local config_file="$1" + + for N in ${NEWNS} ; do + NAMESERVERS="${NAMESERVERS} ${N}" + done + + for N in ${NEWSEARCH} ; do + NAMESERVERS="${NAMESERVERS} ${N#*,}" + done + + for DN in ${NEWDOMAIN} ; do + DOMAINS="${DOMAINS} ${DN%,*}" + done + + CONFIGURED_DOMAINS=$(read_configured_domains ${config_file}) + + NAMESERVERS=$(uniqify ${NAMESERVERS}) + DOMAINS=$(uniqify ${DOMAINS}) + CONFIGURED_DOMAINS=$(uniqify ${CONFIGURED_DOMAINS}) +} + +### +# void find_changed_and_added(char *configured, char *domains) +# +# Find already configured and newly added domains. Sets variables +# CHANGE_DOMAINS, ADD_DOMAINS and KNOWN_DOMAINS. +# +find_changed_and_added() { + local configured="$1" domains="$2" x + + KNOWN_DOMAINS="${CONFIGURED_DOMAINS} ${DOMAINS}" + + # Find what has to be disabled + for x in ${configured} ; do + if [[ " ${domains} " != *" ${x} "* ]] ; then + CHANGE_DOMAINS="${CHANGE_DOMAINS} ${x}" + fi + done + + # Find what has to be added + for x in ${domains} ; do + if [[ " ${configured} " != *" ${x} "* ]] ; then + ADD_DOMAINS="${ADD_DOMAINS} ${x}" + else + CHANGE_DOMAINS="${CHANGE_DOMAINS} ${x}" + fi + done + + ADD_DOMAINS=$(uniqify ${ADD_DOMAINS}) + CHANGE_DOMAINS=$(uniqify ${CHANGE_DOMAINS}) + KNOWN_DOMAINS=$(uniqify ${KNOWN_DOMAINS}) +} + +### +# bool make_configuration_change(char *config_file, char *backup_suffix, +# char *sed_script) +# +# Applies any configuration change. Returns true, if there was a change. +# +make_configuration_change() { + local config_file="$1" backup_suffix="$2" sed_script="$3" + local old_config new_config + + old_config=$(< ${config_file}) + + # Sanity check: add '}' at the end of the file + new_config=$( (echo -n "${old_config}" && echo -ne "\n}" ) | \ + sed -nre "${sed_script}") + # Now remove what we added + new_config=${new_config%?\}} + + if [[ "${old_config}" != "${new_config}" ]] ; then + cp ${config_file} ${config_file}${backup_suffix} + echo "${new_config}" > "${config_file}" + return 0 + else + return 1 + fi +} + +################################################################################ +# Main part + +# Check, if pdnsd configuration file is installed and possibly prepare it +installation_check "${PDNSDCONFIG}" || exit 0 + +# Basic initialization of NAMESERVERS, DOMAINS and CONFIGURED_DOMAINS +initialization "${PDNSDCONFIG}" + +find_changed_and_added "${CONFIGURED_DOMAINS}" "${DOMAINS}" + +sed_script="$(build_sed_script "${NAMESERVERS}" "${NEWDOMAIN}" \ + "${CHANGE_DOMAINS}" "${ADD_DOMAINS}" \ + "${DOMAINS}" "${KNOWN_DOMAINS}")" + +# Check if the config changed +if make_configuration_change "${PDNSDCONFIG}" "${BACKUPSUFFIX}" "${sed_script}" ; then + # Checks for running pdnsd + [ -x /usr/sbin/pdnsd-ctl ] || exit 0 + [ -e /var/cache/pdnsd/pdnsd.status ] || exit 0 + + # Reload config files + /usr/sbin/pdnsd-ctl config &>/dev/null +fi + +exit 0 diff --git a/net-dns/pdnsd/files/pdnsd.service b/net-dns/pdnsd/files/pdnsd.service new file mode 100644 index 000000000000..d1812a53b384 --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd.service @@ -0,0 +1,11 @@ +[Unit] +Description=pdnsd private name-server cache daemon +After=syslog.target network.target auditd.service +ConditionPathExists=/etc/pdnsd/pdnsd.conf + +[Service] +ExecStart=/usr/sbin/pdnsd -s -t +ExecReload=/usr/sbin/pdnsd-ctl config + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/pdnsd/files/pdnsd.tmpfiles b/net-dns/pdnsd/files/pdnsd.tmpfiles new file mode 100644 index 000000000000..dc538151fe32 --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd.tmpfiles @@ -0,0 +1 @@ +d /var/cache/pdnsd 750 pdnsd pdnsd - diff --git a/net-dns/pdnsd/metadata.xml b/net-dns/pdnsd/metadata.xml new file mode 100644 index 000000000000..796f42735df4 --- /dev/null +++ b/net-dns/pdnsd/metadata.xml @@ -0,0 +1,25 @@ +<?xml version = '1.0' encoding = 'UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>net-dialup</herd> + <maintainer> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + </maintainer> + <longdescription> + A proxy DNS server with permanent caching (the cache contents are + written to hard disk on exit) that is designed to cope with + unreachable or down DNS servers (for example in dial-in + networking). + </longdescription> + <use> + <flag name='isdn'> + Linux-only: check status of ippp interfaces with ISDN-specific + system calls. + </flag> + <flag name='urandom'> + Linux-only: use /dev/urandom (pseudo-random number generation) + instead of the default use of random() PRNG. + </flag> + </use> +</pkgmetadata> diff --git a/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild b/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild new file mode 100644 index 000000000000..c2cfea0ce924 --- /dev/null +++ b/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit systemd user + +DESCRIPTION="Proxy DNS server with permanent caching" +HOMEPAGE="http://members.home.nl/p.a.rombouts/pdnsd/" +SRC_URI="http://members.home.nl/p.a.rombouts/pdnsd/releases/${P}-par.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="alpha amd64 arm ia64 ppc ~s390 sparc x86" +IUSE="debug ipv6 isdn +urandom test" + +RDEPEND="" +DEPEND="test? ( net-dns/bind-tools )" + +pkg_setup() { + enewgroup pdnsd + enewuser pdnsd -1 -1 /var/lib/pdnsd pdnsd +} + +src_configure() { + local myconf="" + use debug && myconf="${myconf} --with-debug=3" + use urandom && myconf="${myconf} --with-random-device=/dev/urandom" + + econf \ + --disable-dependency-tracking \ + --sysconfdir=/etc/pdnsd \ + --with-cachedir=/var/cache/pdnsd \ + --with-default-id=pdnsd \ + $(use_enable ipv6) $(use_enable ipv6 ipv6-startup) \ + $(use_enable isdn) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS ChangeLog* NEWS README THANKS TODO README.par + docinto contrib ; dodoc contrib/{README,dhcp2pdnsd,pdnsd_dhcp.pl} + docinto html ; dohtml doc/html/* + docinto txt ; dodoc doc/txt/* + newdoc doc/pdnsd.conf pdnsd.conf.sample + + newinitd "${FILESDIR}/pdnsd.rc8" pdnsd + newinitd "${FILESDIR}/pdnsd.online.2" pdnsd-online + systemd_newtmpfilesd "${FILESDIR}/pdnsd.tmpfiles" pdnsd.conf + systemd_dounit "${FILESDIR}/pdnsd.service" + + mkdir "${T}"/confd || die + + cat - > "${T}"/confd/pdnsd-online <<EOF +# Make sure to change the rc_need variable to the service for the +# interface that connects you to the dns servers. +# +# For instance if you use a PPP connection on ppp0 to connect, set +# rc_need="net.ppp0" + +rc_need="net.lo" +EOF + + # Don't try to do the smart thing and add the --help output here: + # it will cause the file to be etc-updated if the help text + # changes and fails when cross-compiling. + cat - > "${T}"/confd/pdnsd <<EOF +# Command line options, check pdnsd --help for a list of valid +# parameters. Note that most of the options that can be given at +# command-line are also available as configuration parameters in +# /etc/pdnsd/pdnsd.conf +PDNSDCONFIG="" +EOF + + doconfd "${T}"/confd/* + + # gentoo resolvconf support + exeinto /etc/resolvconf/update.d + newexe "${FILESDIR}/pdnsd.resolvconf-r1" pdnsd +} + +src_test() { + fail_kill() { + kill -9 $(<"${T}"/pid) + die "$1" + } + + mkdir "${T}/pdnsd" || die + echo -n -e "pd12\0\0\0\0" > "${T}/pdnsd/pdnsd.cache" + IPS=$(grep ^nameserver /etc/resolv.conf | sed -e 's/nameserver \(.*\)/\tip=\1;/g' | xargs) + sed -e "s/\tip=/${IPS}/" -e "s:cache_dir=:cache_dir=${T}/pdnsd:" "${FILESDIR}/pdnsd.conf.test" \ + > "${T}/pdnsd.conf.test" + src/pdnsd -c "${T}/pdnsd.conf.test" -g -s -d -p "${T}/pid" || die "couldn't start daemon" + sleep 3 + + find "${T}" -ls + [ -s "${T}/pid" ] || die "empty or no pid file created" + [ -S "${T}/pdnsd/pdnsd.status" ] || fail_kill "no socket created" + src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" server all up || fail_kill "failed to start the daemon" + src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" status || fail_kill "failed to communicate with the daemon" + sleep 3 + + dig @127.0.0.1 -p 33455 localhost > "${T}"/dig.output 2>&1 + cat "${T}"/dig.output || die + fgrep -q "status: NOERROR" "${T}"/dig.output || fail_kill "www.gentoo.org lookup failed" + + kill $(<"${T}/pid") || fail_kill "failed to terminate daemon" +} + +pkg_postinst() { + elog + elog "Add pdnsd to your default runlevel - rc-update add pdnsd default" + elog "" + elog "Add pdnsd-online to your online runlevel." + elog "The online interface will be listed in /etc/conf.d/pdnsd-online" + elog "" + elog "Sample config file in /etc/pdnsd/pdnsd.conf.sample" + + # The tmpfiles.d configuration does not come into effect before the + # next reboot so create the cachedir now. + local cachedir="/var/cache/pdnsd" + if [[ ! -d ${cachedir} ]] ; then + mkdir ${cachedir} || eerror "Failed to create cache" + fi + chown pdnsd:pdnsd ${cachedir} \ + || eerror "Failed to set ownership for cachedir" + chmod 0750 ${cachedir} \ + || eerror "Failed to set permissions for cachedir" +} diff --git a/net-dns/rbldnsd/Manifest b/net-dns/rbldnsd/Manifest new file mode 100644 index 000000000000..f7cc9b5a71e8 --- /dev/null +++ b/net-dns/rbldnsd/Manifest @@ -0,0 +1,2 @@ +DIST rbldnsd-0.997a.tar.gz 144771 SHA256 9c17c6bde6995058204a66805444039d31523a7d4ef40cec059e505a0882a8ef SHA512 9a3e1a0ad2cd9dd08bcc114c70213a875e984f3761fa32c44fe544d8173f54330fe355ad229a120e64b8f4c8286187d0baa055526d3a85bc846df070bb213529 WHIRLPOOL b453396c9876fd4972c6028b5916ae9717d60d555e5bb33bc97f0a8910ee516a80d1a3cb6030a3850ec304794f4a00fd9f3dced0d5c7fd1388e7d87d53fedb24 +DIST rbldnsd_0.996b.tar.gz 113128 SHA256 475afe5be8729a76b7c23e2f3d5ce1c773775140406a58bfb7477fac5a528342 SHA512 ff5060d719becd7b1e08cd86f213830a1232774abce3de56599743c9e44b4e3d59e7f9ace18d2619c967038aad728908091efb2ac1591a5ca6c7aa9f84d3a084 WHIRLPOOL 1016bb55746fe772b44705ad65b9153971cc34a737697e3b5d2a0cd8972341e9ecacf8e9c28285a2729c18181891d38569b3b8e5a72e7b3ab6b175d2f123098b diff --git a/net-dns/rbldnsd/files/confd b/net-dns/rbldnsd/files/confd new file mode 100644 index 000000000000..ccbe1e91da0d --- /dev/null +++ b/net-dns/rbldnsd/files/confd @@ -0,0 +1,20 @@ +# +# options for rbldnsd +# +# for initial testing, copy example zone file to /var/db/rbldnsd +# NOTE: make sure nothing listens on 127.0.0.1:53 +# +# OPTIONS="-q -r /var/db/rbldnsd -b 127.0.0.1 \ +# -u rbldns -p /var/run/rbldnsd.pid \ +# rbl.example.com:ip4set:example" + +# check if it works by executing +# dig @localhost 1.0.0.127.rbl.example.com. any +# - or - +# host -a 1.0.0.127.rbl.example.com. localhost + +# the result should include something like + +# ANSWER SECTION: +# 1.0.0.127.rbl.example.com. 2100 IN A 127.0.0.2 +# 1.0.0.127.rbl.example.com. 2100 IN TXT "spam received, see http://rbl.example.com/lookup?127.0.0.1" diff --git a/net-dns/rbldnsd/files/confd-0.997a b/net-dns/rbldnsd/files/confd-0.997a new file mode 100644 index 000000000000..e7abb81fbc78 --- /dev/null +++ b/net-dns/rbldnsd/files/confd-0.997a @@ -0,0 +1,35 @@ +# A whitespace-separated list of addresses on which to listen. The +# syntax is "host/port", where the port defaults to 53. +# +# Note that by default the rbldnsd init script does not require any +# interfaces other than lo to be "up" (see bug #439092). So if you +# LISTEN on a non-loopback interface, you should specify a dependency +# on that interface using rc_need. An example is given below assuming +# that net.lan0 provides 192.168.0.1. +# +# rc_need="net.lan0" +# +# LISTEN="127.0.0.1 +# 192.168.0.1/5353" +# +LISTEN="localhost" + + +# A whitespace-separated list of RBL zones. For the correct syntax, please +# see the rbldnsd(8) man page. The following $ZONES will look for +# files named "badguys.example.com" and "spammers.example.net" (in the +# appropriate format) under /var/db/rbldnsd, and use those same names +# for the blacklists contained therein. +ZONES="badguys.example.com:ip4set:badguys.example.com + spammers.example.net:ip4tset:spammers.example.net" + + +# Add any additional options for the rbldnsd daemon below. The -a and +# -vv below are suggested for performance/security reasons. They are +# described in the man page. +# +# The rootdir (-r) and PID (-p) options are passed automatically, with +# rootdir set to /var/db/rbldnsd (where you should put your zone +# files). The daemon will run as the rbldns user, which was created by +# portage. +OPTIONS="-a -vv" diff --git a/net-dns/rbldnsd/files/example b/net-dns/rbldnsd/files/example new file mode 100644 index 000000000000..ab3458edd26a --- /dev/null +++ b/net-dns/rbldnsd/files/example @@ -0,0 +1,23 @@ +# SOA and NS record +$SOA 1800 rbl.example.com abuse.example.com 0 600 600 86400 600 + +# note: NS record should have reasonably longer TTL +$NS 86400 rbl.example.com + +# default value if LHS of key is omitted: +:127.0.0.2:spam received, see http://rbl.example.com/lookup?$ + +# a key without value: returns the default value above +127.0.0.1 + +# CIDR notation: +10.200/16 + +# without netmask, it works as well: same as 10.201/16 +10.201 + +# whitelisting: +!10.202.0.1 + +# domain-based DNSBL: +evil.example.com diff --git a/net-dns/rbldnsd/files/initd b/net-dns/rbldnsd/files/initd new file mode 100644 index 000000000000..29de0001f073 --- /dev/null +++ b/net-dns/rbldnsd/files/initd @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +depend() { + need net +} + +start() { + ebegin "Starting rbldnsd-server" + start-stop-daemon --start --quiet --pidfile /var/run/rbldnsd.pid --exec /usr/sbin/rbldnsd -- ${OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping rbldnsd-server" + start-stop-daemon --stop --quiet --pidfile /var/run/rbldnsd.pid --exec /usr/sbin/rbldnsd + eend $? +} + diff --git a/net-dns/rbldnsd/files/initd-0.997a b/net-dns/rbldnsd/files/initd-0.997a new file mode 100644 index 000000000000..c3ade4d15e36 --- /dev/null +++ b/net-dns/rbldnsd/files/initd-0.997a @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +start() { + ebegin "Starting rbldnsd" + + start-stop-daemon --start --quiet --pidfile /run/rbldnsd.pid \ + --exec /usr/sbin/rbldnsd -- \ + -r /var/db/rbldnsd \ + -p /run/rbldnsd.pid \ + $(for x in ${LISTEN}; do echo "-b ${x}"; done) \ + ${OPTIONS} \ + ${ZONES} + + eend $? +} + +stop() { + ebegin "Stopping rbldnsd" + start-stop-daemon --stop --quiet --pidfile /run/rbldnsd.pid \ + --exec /usr/sbin/rbldnsd + eend $? +} diff --git a/net-dns/rbldnsd/files/rbldnsd-0.996b-asneeded.patch b/net-dns/rbldnsd/files/rbldnsd-0.996b-asneeded.patch new file mode 100644 index 000000000000..77af1d915928 --- /dev/null +++ b/net-dns/rbldnsd/files/rbldnsd-0.996b-asneeded.patch @@ -0,0 +1,11 @@ +--- configure.lib.orig 2009-01-04 16:52:52.112984801 +0100 ++++ configure.lib 2009-01-04 16:53:07.680980305 +0100 +@@ -105,7 +105,7 @@ + # run a compiler + ac_run_compiler() { + rm -f conftest*; cat >conftest.c +- ac_run $CC $CFLAGS "$@" conftest.c ++ ac_run $CC $CFLAGS conftest.c "$@" + } + + ac_compile() { diff --git a/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch b/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch new file mode 100644 index 000000000000..03da010336e3 --- /dev/null +++ b/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch @@ -0,0 +1,30 @@ +From 5d3455065f84fe1ef4673552a27d2e6e8f02c97a Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Mon, 22 Sep 2014 10:09:27 -0400 +Subject: [PATCH 1/1] Fix compilation with -Werror=format-security. + +The dslog() function takes an optional format string, analogous to +e.g. printf(), and a list of arguments to be substituted into the +format string. A call to dslog() in do_reload() omitted the format +string causing GCC to throw a format-security warning. To silence the +warning, a trivial format string of "%s" was provided. +--- + rbldnsd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rbldnsd.c b/rbldnsd.c +index abf1d01..e791231 100644 +--- a/rbldnsd.c ++++ b/rbldnsd.c +@@ -959,7 +959,7 @@ static int do_reload(int do_fork) { + # undef kb + } + #endif /* NO_MEMINFO */ +- dslog(LOG_INFO, 0, ibuf); ++ dslog(LOG_INFO, 0, "%s", ibuf); + + check_expires(); + +-- +1.8.5.5 + diff --git a/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch b/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch new file mode 100644 index 000000000000..5621075fbae2 --- /dev/null +++ b/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch @@ -0,0 +1,329 @@ +diff --git a/NEWS b/NEWS +index 8d8bdd9..4d8c01d 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,6 +1,19 @@ + This file describes user-visible changes in rbldnsd. + Newer news is at the top. + ++Next release ++ ++ - fix tests for systems without ipv6 support, or when ipv6 is ++ disabled in rbldnsd at compile-time ++ ++ - fix tests for API change in pydns >= 2.3.6 ++ ++ - It is no longer an error to request binding to a particular ++ address/port more than once. (The subsequent requests are simply ++ ignored.) (This avoids confusion on certain systems/configurations ++ where gethostbyname("localhost") can return 127.0.0.1 multiple ++ times.) ++ + 0.997a (23 Jul 2013) + + - minor fixes/changes in packaging, no code changes. +diff --git a/rbldnsd.c b/rbldnsd.c +index abf1d01..8322bdd 100644 +--- a/rbldnsd.c ++++ b/rbldnsd.c +@@ -203,10 +203,79 @@ static volatile int signalled; + #define SIGNALLED_ZSTATS 0x10 + #define SIGNALLED_TERM 0x20 + ++static inline int sockaddr_in_equal(const struct sockaddr_in *addr1, ++ const struct sockaddr_in *addr2) ++{ ++ return (addr1->sin_port == addr2->sin_port ++ && addr1->sin_addr.s_addr == addr2->sin_addr.s_addr); ++} ++ ++#ifndef NO_IPv6 ++static inline int sockaddr_in6_equal(const struct sockaddr_in6 *addr1, ++ const struct sockaddr_in6 *addr2) ++{ ++ if (memcmp(addr1->sin6_addr.s6_addr, addr2->sin6_addr.s6_addr, 16) != 0) ++ return 0; ++ return (addr1->sin6_port == addr2->sin6_port ++ && addr1->sin6_flowinfo == addr2->sin6_flowinfo ++ && addr1->sin6_scope_id == addr2->sin6_scope_id); ++} ++#endif ++ ++static inline int sockaddr_equal(const struct sockaddr *addr1, ++ const struct sockaddr *addr2) ++{ ++ if (addr1->sa_family != addr2->sa_family) ++ return 0; ++ switch (addr1->sa_family) { ++ case AF_INET: ++ return sockaddr_in_equal((const struct sockaddr_in *)addr1, ++ (const struct sockaddr_in *)addr2); ++#ifndef NO_IPv6 ++ return sockaddr_in6_equal((const struct sockaddr_in6 *)addr1, ++ (const struct sockaddr_in6 *)addr2); ++#endif ++ default: ++ error(0, "unknown address family (%d)", addr1->sa_family); ++ } ++} ++ ++/* already_bound(addr, addrlen) ++ * ++ * Determine whether we've already bound to a particular address. ++ * This is here mostly to deal with the fact that on certain systems, ++ * gethostbyname()/getaddrinfo() can return a duplicate 127.0.0.1 ++ * for 'localhost'. See ++ * - http://sourceware.org/bugzilla/show_bug.cgi?id=4980 ++ * - https://bugzilla.redhat.com/show_bug.cgi?id=496300 ++ */ ++static int already_bound(const struct sockaddr *addr, socklen_t addrlen) { ++#ifdef NO_IPv6 ++ struct sockaddr_in addr_buf; ++#else ++ struct sockaddr_in6 addr_buf; ++#endif ++ struct sockaddr *boundaddr = (struct sockaddr *)&addr_buf; ++ socklen_t buflen; ++ int i; ++ ++ for (i = 0; i < numsock; i++) { ++ buflen = sizeof(addr_buf); ++ if (getsockname(sock[i], boundaddr, &buflen) < 0) ++ error(errno, "getsockname failed"); ++ if (buflen == addrlen && sockaddr_equal(boundaddr, addr)) ++ return 1; ++ } ++ return 0; ++} ++ + #ifdef NO_IPv6 + static void newsocket(struct sockaddr_in *sin) { + int fd; + const char *host = ip4atos(ntohl(sin->sin_addr.s_addr)); ++ ++ if (already_bound((struct sockaddr *)sin, sizeof(*sin))) ++ return; + if (numsock >= MAXSOCK) + error(0, "too many listening sockets (%d max)", MAXSOCK); + fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); +@@ -223,6 +292,8 @@ static int newsocket(struct addrinfo *ai) { + int fd; + char host[NI_MAXHOST], serv[NI_MAXSERV]; + ++ if (already_bound(ai->ai_addr, ai->ai_addrlen)) ++ return 1; + if (numsock >= MAXSOCK) + error(0, "too many listening sockets (%d max)", MAXSOCK); + fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); +diff --git a/rbldnsd.py b/rbldnsd.py +index 9300ef2..4b78dee 100644 +--- a/rbldnsd.py ++++ b/rbldnsd.py +@@ -2,6 +2,7 @@ + + + """ ++import errno + from itertools import count + import subprocess + from tempfile import NamedTemporaryFile, TemporaryFile +@@ -12,6 +13,14 @@ try: + import DNS + except ImportError: + raise RuntimeError("The pydns library is not installed") ++try: ++ from DNS import SocketError as DNS_SocketError ++except ImportError: ++ class DNS_SocketError(Exception): ++ """ Dummy, never raised. ++ ++ (Older versions of pydns before 2.3.6 do not raise SocketError.) ++ """ + + DUMMY_ZONE_HEADER = """ + $SOA 0 example.org. hostmaster.example.com. 0 1h 1h 2d 1h +@@ -113,7 +122,6 @@ class Rbldnsd(object): + stderr=self.stderr) + + # wait for rbldnsd to start responding +- time.sleep(0.1) + for retry in count(): + if daemon.poll() is not None: + raise DaemonError( +@@ -124,12 +132,18 @@ class Rbldnsd(object): + break + except QueryRefused: + break ++ except DNS_SocketError as ex: ++ # pydns >= 2.3.6 ++ wrapped_error = ex.args[0] ++ if wrapped_error.errno != errno.ECONNREFUSED: ++ raise + except DNS.DNSError as ex: ++ # pydns < 2.3.6 + if str(ex) != 'no working nameservers found': + raise +- elif retries > 10: +- raise DaemonError( +- "rbldnsd does not seem to be responding") ++ if retry > 10: ++ raise DaemonError("rbldnsd does not seem to be responding") ++ time.sleep(0.1) + + def _stop_daemon(self): + daemon = self._daemon +@@ -150,6 +164,22 @@ class Rbldnsd(object): + raise DaemonError("rbldnsd exited with code %d" + % daemon.returncode) + ++ @property ++ def no_ipv6(self): ++ """ Was rbldnsd compiled with -DNO_IPv6? ++ """ ++ # If rbldnsd was compiled with -DNO_IPv6, the (therefore ++ # unsupported) '-6' command-line switch will not be described ++ # in the help message ++ cmd = [self.daemon_bin, '-h'] ++ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) ++ help_message = proc.stdout.readlines() ++ if proc.wait() != 0: ++ raise subprocess.CalledProcessError(proc.returncode, cmd) ++ return not any(line.lstrip().startswith('-6 ') ++ for line in help_message) ++ ++ + class TestRbldnsd(unittest.TestCase): + def test(self): + rbldnsd = Rbldnsd() +diff --git a/test_acl.py b/test_acl.py +index d93ca0a..10bed1c 100644 +--- a/test_acl.py ++++ b/test_acl.py +@@ -1,5 +1,8 @@ + """ Tests for the acl dataset + """ ++from functools import wraps ++import socket ++import sys + from tempfile import NamedTemporaryFile + import unittest + +@@ -9,6 +12,35 @@ __all__ = [ + 'TestAclDataset', + ] + ++try: ++ from unittest import skipIf ++except ImportError: ++ # hokey replacement (for python <= 2.6) ++ def skipIf(condition, reason): ++ if condition: ++ def decorate(f): ++ @wraps(f) ++ def skipped(*args, **kw): ++ sys.stderr.write("skipped test: %s " % reason) ++ return skipped ++ return decorate ++ else: ++ return lambda f: f ++ ++def _have_ipv6(): ++ # Check for IPv6 support ++ if not getattr(socket, 'has_ipv6', False): ++ return False # no python support for ipv6 ++ elif Rbldnsd().no_ipv6: ++ return False # rbldnsd compiled with -DNO_IPv6 ++ try: ++ socket.socket(socket.AF_INET6, socket.SOCK_DGRAM).close() ++ except socket.error: ++ return False # no kernel (or libc) support for ipv6? ++ return True ++ ++no_ipv6 = not _have_ipv6() ++ + def daemon(acl, addr='localhost'): + """ Create an Rbldnsd instance with given ACL + """ +@@ -33,11 +65,13 @@ class TestAclDataset(unittest.TestCase): + addr='127.0.0.1') as dnsd: + self.assertEqual(dnsd.query('test.example.com'), 'Success') + ++ @skipIf(no_ipv6, "IPv6 unsupported") + def test_refuse_ipv6(self): + with daemon(acl=["::1 :refuse"], + addr='::1') as dnsd: + self.assertRaises(QueryRefused, dnsd.query, 'test.example.com') + ++ @skipIf(no_ipv6, "IPv6 unsupported") + def test_pass_ipv6(self): + with daemon(acl=[ "0/0 :refuse", + "0::1 :pass" ], +diff --git a/test_ip4trie.py b/test_ip4trie.py +index fe9e78f..2cce09b 100644 +--- a/test_ip4trie.py ++++ b/test_ip4trie.py +@@ -9,7 +9,7 @@ __all__ = [ + ] + + def ip4trie(zone_data): +- """ Run rbldnsd with an ip6trie dataset ++ """ Run rbldnsd with an ip4trie dataset + """ + dnsd = Rbldnsd() + dnsd.add_dataset('ip4trie', ZoneFile(zone_data)) +diff --git a/test_ip6trie.py b/test_ip6trie.py +index d3600db..377c5dd 100644 +--- a/test_ip6trie.py ++++ b/test_ip6trie.py +@@ -15,15 +15,6 @@ def ip6trie(zone_data): + dnsd.add_dataset('ip6trie', ZoneFile(zone_data)) + return dnsd + +-def rfc3152(ip6addr, domain='example.com'): +- from socket import inet_pton, AF_INET6 +- from struct import unpack +- +- bytes = unpack("16B", inet_pton(AF_INET6, ip6addr)) +- nibbles = '.'.join("%x.%x" % (byte & 0xf, (byte >> 4) & 0xf) +- for byte in reversed(bytes)) +- return "%s.%s" % (nibbles, domain) +- + class TestIp6TrieDataset(unittest.TestCase): + def test_exclusion(self): + with ip6trie(["dead::/16 listed", +@@ -31,5 +22,35 @@ class TestIp6TrieDataset(unittest.TestCase): + self.assertEqual(dnsd.query(rfc3152("dead::beef")), None) + self.assertEqual(dnsd.query(rfc3152("dead::beee")), "listed") + ++ ++def rfc3152(ip6addr, domain='example.com'): ++ return "%s.%s" % ('.'.join(reversed(_to_nibbles(ip6addr))), domain) ++ ++def _to_nibbles(ip6addr): ++ """ Convert ip6 address (in rfc4291 notation) to a sequence of nibbles ++ ++ NB: We avoid the use of socket.inet_pton(AF_INET6, ip6addr) here ++ because it fails (with 'error: can't use AF_INET6, IPv6 is ++ disabled') when python has been compiled without IPv6 support. See ++ http://www.corpit.ru/pipermail/rbldnsd/2013q3/001181.html ++ ++ """ ++ def _split_words(addr): ++ return [ int(w, 16) for w in addr.split(':') ] if addr else [] ++ ++ if '::' in ip6addr: ++ head, tail = [ _split_words(s) for s in ip6addr.split('::', 1) ] ++ nzeros = 8 - len(head) - len(tail) ++ assert nzeros >= 0 ++ words = head + [ 0 ] * nzeros + tail ++ else: ++ words = _split_words(ip6addr) ++ ++ assert len(words) == 8 ++ for word in words: ++ assert 0 <= word <= 0xffff ++ ++ return ''.join("%04x" % word for word in words) ++ + if __name__ == '__main__': + unittest.main() diff --git a/net-dns/rbldnsd/metadata.xml b/net-dns/rbldnsd/metadata.xml new file mode 100644 index 000000000000..2fcc88b5af33 --- /dev/null +++ b/net-dns/rbldnsd/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + + <longdescription lang="en"> + rbldnsd is a small and fast DNS daemon which is especially made to + serve DNSBL zones. This daemon was inspired by Dan J. Bernstein's + rbldns program found in the djbdns package. + + rbldnsd is extremely fast - it outperforms both bind and djbdns + greatly. It has very small memory footprint. + + The daemon can serve both IP-based (ordb.org, dsbl.org etc) and + name-based (rfc-ignorant.org) blocklists. Unlike DJB's rbldns, it + has ability to specify individual values for every entry, can + serve as many zones on a single IP address as you wish, and, + finally, it is a real nameserver: it can reply to DNS metadata + requests. The daemon keeps all zones in memory for faster + operations, but its memory usage is very efficient, especially for + repeated TXT values which are stored only once. + </longdescription> +</pkgmetadata> diff --git a/net-dns/rbldnsd/rbldnsd-0.996b.ebuild b/net-dns/rbldnsd/rbldnsd-0.996b.ebuild new file mode 100644 index 000000000000..48f541d51024 --- /dev/null +++ b/net-dns/rbldnsd/rbldnsd-0.996b.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs user + +DESCRIPTION="a DNS daemon which is designed to serve DNSBL zones" +HOMEPAGE="http://www.corpit.ru/mjt/rbldnsd.html" +SRC_URI="http://www.corpit.ru/mjt/rbldnsd/${PN}_${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa ~sparc x86 ~x86-fbsd" +IUSE="ipv6 zlib" + +RDEPEND="zlib? ( sys-libs/zlib )" +DEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-asneeded.patch +} + +src_compile() { + # econf doesn't work + ./configure \ + $(use_enable ipv6) \ + $(use_enable zlib) || die "./configure failed" + + emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \ + || die "emake failed" +} + +src_install() { + dosbin rbldnsd || die "dosbin failed" + doman rbldnsd.8 + keepdir /var/db/rbldnsd + dodoc CHANGES* TODO NEWS README* "${FILESDIR}"/example + newinitd "${FILESDIR}"/initd rbldnsd + newconfd "${FILESDIR}"/confd rbldnsd +} + +pkg_postinst() { + enewgroup rbldns + enewuser rbldns -1 -1 /var/db/rbldnsd rbldns + chown rbldns:rbldns /var/db/rbldnsd + + elog "for testing purpose, example zone file has been installed" + elog "Look in /usr/share/doc/${PF}/" +} diff --git a/net-dns/rbldnsd/rbldnsd-0.997a-r1.ebuild b/net-dns/rbldnsd/rbldnsd-0.997a-r1.ebuild new file mode 100644 index 000000000000..d67487cb2c4e --- /dev/null +++ b/net-dns/rbldnsd/rbldnsd-0.997a-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils toolchain-funcs user python-single-r1 + +DESCRIPTION="DNS server designed to serve blacklist zones" +HOMEPAGE="http://www.corpit.ru/mjt/rbldnsd.html" +SRC_URI="http://www.corpit.ru/mjt/rbldnsd/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa ~sparc x86 ~x86-fbsd" +IUSE="ipv6 test zlib" + +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + test? ( ${PYTHON_DEPS} + dev-python/pydns:2[${PYTHON_USEDEP}] )" + +src_prepare() { + epatch "${FILESDIR}/${P}-robust-ipv6-test-support.patch" + epatch "${FILESDIR}/${P}-format-security-compile-fix.patch" +} + +src_configure() { + # The ./configure file is handwritten and doesn't support a `make + # install` target, so there are no --prefix options. The econf + # function appends those automatically, so we can't use it. + ./configure \ + $(use_enable ipv6) \ + $(use_enable zlib) \ + || die "./configure failed" +} + +src_compile() { + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + RANLIB="$(tc-getRANLIB)" +} + +src_test() { + emake check \ + CC="$(tc-getCC)" \ + PYTHON="${PYTHON}" +} + +src_install() { + dosbin rbldnsd + doman rbldnsd.8 + keepdir /var/db/rbldnsd + dodoc CHANGES* TODO NEWS README* + newinitd "${FILESDIR}"/initd-${PV} rbldnsd + newconfd "${FILESDIR}"/confd-${PV} rbldnsd +} + +pkg_postinst() { + enewgroup rbldns + enewuser rbldns -1 -1 /var/db/rbldnsd rbldns + chown rbldns:rbldns /var/db/rbldnsd +} diff --git a/net-dns/rbldnsd/rbldnsd-0.997a-r2.ebuild b/net-dns/rbldnsd/rbldnsd-0.997a-r2.ebuild new file mode 100644 index 000000000000..2135fd3d744c --- /dev/null +++ b/net-dns/rbldnsd/rbldnsd-0.997a-r2.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils toolchain-funcs user python-single-r1 + +DESCRIPTION="DNS server designed to serve blacklist zones" +HOMEPAGE="http://www.corpit.ru/mjt/rbldnsd.html" +SRC_URI="http://www.corpit.ru/mjt/rbldnsd/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~hppa ~sparc ~x86 ~x86-fbsd" +IUSE="ipv6 test zlib" + +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + test? ( ${PYTHON_DEPS} + dev-python/pydns:2[${PYTHON_USEDEP}] )" + +src_prepare() { + epatch "${FILESDIR}/${P}-robust-ipv6-test-support.patch" + epatch "${FILESDIR}/${P}-format-security-compile-fix.patch" +} + +src_configure() { + # The ./configure file is handwritten and doesn't support a `make + # install` target, so there are no --prefix options. The econf + # function appends those automatically, so we can't use it. + ./configure \ + $(use_enable ipv6) \ + $(use_enable zlib) \ + || die "./configure failed" +} + +src_compile() { + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + RANLIB="$(tc-getRANLIB)" +} + +src_test() { + emake check \ + CC="$(tc-getCC)" \ + PYTHON="${PYTHON}" +} + +src_install() { + dosbin rbldnsd + doman rbldnsd.8 + keepdir /var/db/rbldnsd + dodoc CHANGES* TODO NEWS README* + newinitd "${FILESDIR}"/initd-${PV} rbldnsd + newconfd "${FILESDIR}"/confd-${PV} rbldnsd +} + +pkg_postinst() { + enewgroup rbldns + enewuser rbldns -1 -1 /var/db/rbldnsd rbldns + chown rbldns:rbldns /var/db/rbldnsd +} diff --git a/net-dns/resolvconf-symlink/metadata.xml b/net-dns/resolvconf-symlink/metadata.xml new file mode 100644 index 000000000000..6f4ca865947f --- /dev/null +++ b/net-dns/resolvconf-symlink/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> + <use> + <flag name='symlink'>Actually replace /etc/resolv.conf with a + symlink. Without this flag, the ebuild is a no-op.</flag> + </use> +</pkgmetadata> diff --git a/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild b/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild new file mode 100644 index 000000000000..b2a2ef9b532a --- /dev/null +++ b/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="Make /etc/resolv.conf a symlink to a runtime-writable location" +HOMEPAGE="http://www.gentoo.org" +SRC_URI="" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+symlink" + +S=${WORKDIR} + +pkg_preinst() { + if use symlink; then + if [[ -f "${ROOT}"etc/resolv.conf && ! -L "${ROOT}"etc/resolv.conf ]] + then # migrate existing resolv.conf + if [[ "$(head -n 1 "${ROOT}"etc/resolv.conf)" \ + != "# Generated by "* ]]; then + + eerror "${ROOT}etc/resolv.conf seems not to be autogenerated." + eerror "Aborting build to avoid removing user data. If that file is supposed" + eerror "to be autogenerated, please remove it manually. Otherwise, please" + eerror "set USE=-symlink to avoid installing resolv.conf symlink." + + die "${ROOT}etc/resolv.conf not autogenerated" + else + ebegin "Moving ${ROOT}etc/resolv.conf to ${ROOT}var/run/" + mv "${ROOT}"etc/resolv.conf "${ROOT}"var/run/ + eend ${?} || die + fi + fi + fi +} + +src_install() { + # XXX: /run should be more correct, when it's supported by baselayout + + use symlink && dosym /var/run/resolv.conf /etc/resolv.conf +} + +pkg_postrm() { + # Don't leave the user with no resolv.conf + if [[ ! -e "${ROOT}"etc/resolv.conf && -f "${ROOT}"var/run/resolv.conf ]]; then + ebegin "Moving ${ROOT}var/run/resolv.conf to ${ROOT}etc/" + mv "${ROOT}"var/run/resolv.conf "${ROOT}"etc/ + eend ${?} || die + fi +} diff --git a/net-dns/sheerdns/Manifest b/net-dns/sheerdns/Manifest new file mode 100644 index 000000000000..7a4bcba7f3fd --- /dev/null +++ b/net-dns/sheerdns/Manifest @@ -0,0 +1 @@ +DIST sheerdns-1.0.3.tar.gz 22937 SHA256 4155c0ad33defb8bc7ce90fa4ecc31bd7e7562478cbfc7b46aaa0f25f0b5b4fb SHA512 c24b33d5ed9cdf501a3c685398f694c2c8e31814c30caec7406d3d819e3d2affd854da23f3e1f1e0621fbd7e81f189f3316346c4d1c48abeef9ee0b9b47e4c12 WHIRLPOOL 29c5e3ec88b79a4c1e326099518babcffa259c7f1ac19bf832c1812e171a1b47f920f34d28368a11721f5de8b9e9367dcc6f1476bc705ff41d337942f94bdd77 diff --git a/net-dns/sheerdns/metadata.xml b/net-dns/sheerdns/metadata.xml new file mode 100644 index 000000000000..c8897a3e8105 --- /dev/null +++ b/net-dns/sheerdns/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> + +<pkgmetadata> + <maintainer><email>maintainer-needed@gentoo.org</email></maintainer> + <longdescription> + SheerDNS was written to be a simple replacement master DNS server that can + be used where atomic updates are required. Because it stores each record in + a small file, updating records does not require the sheerdns process to be + notified or restarted. Each update is immediately available and served + as-is. + SheerDNS is extremely light-weight, simple, and fast, and written with + security in mind. + </longdescription> +</pkgmetadata> diff --git a/net-dns/sheerdns/sheerdns-1.0.3.ebuild b/net-dns/sheerdns/sheerdns-1.0.3.ebuild new file mode 100644 index 000000000000..e062ebaca882 --- /dev/null +++ b/net-dns/sheerdns/sheerdns-1.0.3.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils toolchain-funcs multilib + +DESCRIPTION="Sheerdns is a small, simple, fast master only DNS server" +HOMEPAGE="http://threading.2038bug.com/sheerdns/" +SRC_URI="http://threading.2038bug.com/sheerdns/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" +DEPEND="" + +S="${WORKDIR}/${PN}" + +src_prepare() { + # Fix multilib support + sed -i "/^CFLAGS/s:usr/lib:usr/$(get_libdir):" Makefile +} + +src_compile() { + emake CC=$(tc-getCC) || die +} + +src_install() { + dodoc ChangeLog + doman sheerdns.8 + dosbin sheerdns sheerdnshash +} diff --git a/net-dns/tinystats/Manifest b/net-dns/tinystats/Manifest new file mode 100644 index 000000000000..d102035d9911 --- /dev/null +++ b/net-dns/tinystats/Manifest @@ -0,0 +1 @@ +DIST tinystats-1.1.tar.gz 8102 SHA256 84b46ecc2c136cd286f24593dff6e0e9dacf5ca92a48193ee95455151c077957 diff --git a/net-dns/tinystats/metadata.xml b/net-dns/tinystats/metadata.xml new file mode 100644 index 000000000000..04f644041724 --- /dev/null +++ b/net-dns/tinystats/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>maintainer-needed@gentoo.org</email> +</maintainer> +<longdescription lang="en">tinystats is a filter that reads tinydns logs and stores stats +about query types and errors of your authoritative dns.</longdescription> +</pkgmetadata> diff --git a/net-dns/tinystats/tinystats-1.1.ebuild b/net-dns/tinystats/tinystats-1.1.ebuild new file mode 100644 index 000000000000..1b6ac24658ec --- /dev/null +++ b/net-dns/tinystats/tinystats-1.1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit toolchain-funcs + +DESCRIPTION="A tinydns logging helper app" +HOMEPAGE="http://www.morettoni.net/tinystats.en.html" +SRC_URI="http://www.morettoni.net/bsd/${P}.tar.gz" +IUSE="ipv6" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~x86" +RDEPEND="net-dns/djbdns" +S=${WORKDIR}/${PN} + +src_compile() { + use ipv6 && IPV6="-D WITH_IPV6" + $(tc-getCC) ${CFLAGS} ${IPV6} -o tinystats ${LDFLAGS} tinystats.c || \ + die "compile failed" +} + +src_install() { + dobin tinystats || die 'dobin failed' + dodoc README + docinto sample + dodoc start_slave.sh.sample update_slave.sh.sample \ + tinydns.log.run.sample tinydns.sh.sample +} diff --git a/net-dns/totd/Manifest b/net-dns/totd/Manifest new file mode 100644 index 000000000000..69a16babd201 --- /dev/null +++ b/net-dns/totd/Manifest @@ -0,0 +1 @@ +DIST totd-1.5.1.tar.gz 235809 SHA256 1a09ef6dcf382beea3546eec3138eadfbaeec198a6f921c96e8937e91a1e06fa diff --git a/net-dns/totd/files/totd b/net-dns/totd/files/totd new file mode 100755 index 000000000000..b2ffcaa10007 --- /dev/null +++ b/net-dns/totd/files/totd @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +checkconfig() { + if [ ! -f /etc/totd.conf ] + then + eerror "The config file /etc/totd.conf does not exist." + return 1 + else + return 0 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting totd" + start-stop-daemon --start --quiet --exec /usr/sbin/totd + eend $? +} + +stop() { + local pid_file + pid_file="`grep ^pidfile /etc/totd.conf | cut -f2 -d ' '`" + ebegin "Stopping totd" + if [ -n "$pid_file" ] + then + start-stop-daemon --stop --quiet --pidfile $pid_file + else + start-stop-daemon --stop --quiet --pidfile /var/run/totd.pid + fi + eend $? +} diff --git a/net-dns/totd/files/totd-1.5.1-no_werror.patch b/net-dns/totd/files/totd-1.5.1-no_werror.patch new file mode 100644 index 000000000000..246e709d5109 --- /dev/null +++ b/net-dns/totd/files/totd-1.5.1-no_werror.patch @@ -0,0 +1,11 @@ +--- totd-1.5.1/Makefile.in 2005-01-31 12:55:14.000000000 +0100 ++++ totd-1.5.1_new/Makefile.in 2007-06-30 22:51:07.000000000 +0200 +@@ -19,7 +19,7 @@ + + INSTALL = /usr/bin/install + +-CFLAGS = @CFLAGS@ @DEFS@ -Werror -Wall -DTOTCONF=\"$(TOT_CONFIG_FILE)\" @OPTFLAGS@ $(INCLUDEPATH) ++CFLAGS = @CFLAGS@ @DEFS@ -Wall -DTOTCONF=\"$(TOT_CONFIG_FILE)\" @OPTFLAGS@ $(INCLUDEPATH) + + # When debugging is enabled by --enable-malloc-debug flag to the configure + # script, the @DBMALLOC@ substitution will contain the empty string, thus diff --git a/net-dns/totd/metadata.xml b/net-dns/totd/metadata.xml new file mode 100644 index 000000000000..9ae02f6ed318 --- /dev/null +++ b/net-dns/totd/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> + </maintainer> + <longdescription lang="en"> + Totd ( Trick Or Treat Daemon ) is a small DNS proxy nameserver that + supports IPv6 only hosts/networks that communicate with the IPv4 world + using some translation mechanism. + </longdescription> +</pkgmetadata> diff --git a/net-dns/totd/totd-1.5.1.ebuild b/net-dns/totd/totd-1.5.1.ebuild new file mode 100644 index 000000000000..e0ee9fea7fb9 --- /dev/null +++ b/net-dns/totd/totd-1.5.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="Trick Or Treat Daemon, a DNS proxy for 6to4" +HOMEPAGE="http://www.dillema.net/software/totd.html" +SRC_URI="http://www.dillema.net/software/${PN}/${P}.tar.gz" + +LICENSE="totd BSD BSD-4" +SLOT="0" +KEYWORDS="~amd64 x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-no_werror.patch +} + +src_configure() { + econf \ + --enable-ipv4 \ + --enable-ipv6 \ + --enable-stf \ + --enable-scoped-rewrite \ + --disable-http-server +} + +src_install() { + dosbin totd + doman totd.8 + dodoc totd.conf.sample README INSTALL + + doinitd "${FILESDIR}"/totd +} + +pkg_postinst() { + elog "The totd.conf.sample file in /usr/share/doc/${P}/ contains" + elog "a sample config file for totd. Make sure you create" + elog "/etc/totd.conf with the necessary configurations" +} diff --git a/net-dns/unbound/Manifest b/net-dns/unbound/Manifest new file mode 100644 index 000000000000..e52eac000c58 --- /dev/null +++ b/net-dns/unbound/Manifest @@ -0,0 +1,3 @@ +DIST unbound-1.4.22.tar.gz 4735801 SHA256 1caf5081b2190ecdb23fc4d998b7999e28640c941f53baff7aee03c092a7d29f SHA512 0593cad3966f24f76b93bbc9c906c096c645e9360a57034c5ed4f04baeaa021eb9169a8e9cd0a98651c7a564d9feda8b9490e3b87ad469f6ce1dd1fcb05d9974 WHIRLPOOL 4de27d6c4548c46c83b95a7f21efd8d75898ddb92e3af84fbd1d07a39e29a121e593ddbf13676f914d4ee428942bf345c9b93937165725ece5031fc67ab9eacc +DIST unbound-1.5.1.tar.gz 4805176 SHA256 0ff82709fb2bd7ecbde8dbdcf60fa417d2b43379570a3d460193a76a169900ec SHA512 85d7069cf47709aceb7d9457c8befb1b327adfb098d8aa98082fc9bf710274e8ba86b56d796c86917639bb7e57ab5c40af1bc79090de038c6375be2c3877e0c4 WHIRLPOOL e23f7d399a1f01da5aec98ff0fa3b377e8a76789d237ceaf0e9146c96a97088716a0ec6c0f68f95f57af16743e73c1bc7209889a04a698bf7aa5d0706c7514f5 +DIST unbound-1.5.4.tar.gz 4844273 SHA256 a1e1c1a578cf8447cb51f6033714035736a0f04444854a983123c094cc6fb137 SHA512 af8032b09ce75bb1aefab31ce5583c0fa8aaca544e13d6d7eaea8e44a940b1797397951f06f453ef80653038b5966d6053ddeb79818a66825925186ee351c65c WHIRLPOOL 874bca4abe3ea246cfccd6f4bb8084026b82d1d1868aa365f1bc6075c2c625fb517f46f9c8282f1bc030f759bd0d0b26582e4288cf1a2cd7d88212a38590723d diff --git a/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch b/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch new file mode 100644 index 000000000000..c1be28cbc0db --- /dev/null +++ b/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch @@ -0,0 +1,72 @@ +From 858da540f70a4411ad8fbe7144cef6ce9da18f89 Mon Sep 17 00:00:00 2001 +From: wouter <wouter@be551aaa-1e26-0410-a405-d3ace91eadb9> +Date: Mon, 5 Jan 2015 13:51:22 +0000 +Subject: [PATCH] - Fix #634: fix fail to start on Linux LTS 3.14.X, ignores + missing IP_MTU_DISCOVER OMIT option. + +--- a/services/listen_dnsport.c ++++ b/services/listen_dnsport.c +@@ -368,29 +368,47 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr, + * (and also uses the interface mtu to determine the size of the packets). + * So there won't be any EMSGSIZE error. Against DNS fragmentation attacks. + * FreeBSD already has same semantics without setting the option. */ +-# if defined(IP_PMTUDISC_OMIT) +- int action = IP_PMTUDISC_OMIT; +-# else +- int action = IP_PMTUDISC_DONT; +-# endif ++ int omit_set = 0; ++ int action; ++# if defined(IP_PMTUDISC_OMIT) ++ action = IP_PMTUDISC_OMIT; + if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER, + &action, (socklen_t)sizeof(action)) < 0) { +- log_err("setsockopt(..., IP_MTU_DISCOVER, " +-# if defined(IP_PMTUDISC_OMIT) +- "IP_PMTUDISC_OMIT" ++ ++ if (errno != EINVAL) { ++ log_err("setsockopt(..., IP_MTU_DISCOVER, IP_PMTUDISC_OMIT...) failed: %s", ++ strerror(errno)); ++ ++# ifndef USE_WINSOCK ++ close(s); + # else +- "IP_PMTUDISC_DONT" ++ closesocket(s); + # endif +- "...) failed: %s", +- strerror(errno)); ++ *noproto = 0; ++ *inuse = 0; ++ return -1; ++ } ++ } ++ else ++ { ++ omit_set = 1; ++ } ++# endif ++ if (omit_set == 0) { ++ action = IP_PMTUDISC_DONT; ++ if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER, ++ &action, (socklen_t)sizeof(action)) < 0) { ++ log_err("setsockopt(..., IP_MTU_DISCOVER, IP_PMTUDISC_DONT...) failed: %s", ++ strerror(errno)); + # ifndef USE_WINSOCK +- close(s); ++ close(s); + # else +- closesocket(s); ++ closesocket(s); + # endif +- *noproto = 0; +- *inuse = 0; +- return -1; ++ *noproto = 0; ++ *inuse = 0; ++ return -1; ++ } + } + # elif defined(IP_DONTFRAG) + int off = 0; diff --git a/net-dns/unbound/files/unbound-1.4.12-gentoo.patch b/net-dns/unbound/files/unbound-1.4.12-gentoo.patch new file mode 100644 index 000000000000..57920689783e --- /dev/null +++ b/net-dns/unbound/files/unbound-1.4.12-gentoo.patch @@ -0,0 +1,12 @@ +diff -Naur unbound-1.4.12.orig/doc/example.conf.in unbound-1.4.12/doc/example.conf.in +--- unbound-1.4.12.orig/doc/example.conf.in 2011-07-14 17:33:37.000000000 +0900 ++++ unbound-1.4.12/doc/example.conf.in 2011-07-16 10:01:06.644402341 +0900 +@@ -334,7 +334,7 @@ + # with several entries, one file per entry. + # Zone file format, with DS and DNSKEY entries. + # Note this gets out of date, use auto-trust-anchor-file please. +- # trust-anchor-file: "" ++ # trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" + + # Trusted key for validation. DS or DNSKEY. specify the RR on a + # single line, surrounded by "". TTL is ignored. class is IN default. diff --git a/net-dns/unbound/files/unbound-anchor.service b/net-dns/unbound/files/unbound-anchor.service new file mode 100644 index 000000000000..f55cf9db5d1e --- /dev/null +++ b/net-dns/unbound/files/unbound-anchor.service @@ -0,0 +1,13 @@ +[Unit] +Description=Update of the root trust anchor for DNSSEC validation +After=network.target +Before=nss-lookup.target +Wants=nss-lookup.target +Before=unbound.service + +[Service] +Type=oneshot +ExecStart=/usr/sbin/unbound-anchor + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/unbound/files/unbound.confd b/net-dns/unbound/files/unbound.confd new file mode 100644 index 000000000000..b4de7cf1142e --- /dev/null +++ b/net-dns/unbound/files/unbound.confd @@ -0,0 +1,4 @@ +# Settings should normally not need any changes. + +# Location of the unbound configuration file. Leave empty for the default. +#UNBOUND_CONFFILE="/etc/unbound/unbound.conf" diff --git a/net-dns/unbound/files/unbound.initd b/net-dns/unbound/files/unbound.initd new file mode 100644 index 000000000000..f17d0720b8f8 --- /dev/null +++ b/net-dns/unbound/files/unbound.initd @@ -0,0 +1,56 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +name="unbound daemon" +extra_commands="configtest" +extra_started_commands="reload" +description="unbound is a Domain Name Server (DNS) that is used to resolve host names to IP address." +description_configtest="Run syntax tests for configuration files only." +description_reload="Kills all children and reloads the configuration." + + +UNBOUND_BINARY=${UNBOUND_BINARY:-/usr/sbin/unbound} +UNBOUND_CHECKCONF=${UNBOUND_CHECKCONF:-/usr/sbin/unbound-checkconf} +UNBOUND_CONFFILE=${UNBOUND_CONFFILE:-/etc/unbound/${SVCNAME}.conf} + +depend() { + need net + use logger + provide dns + after auth-dns +} + +checkconfig() { + UNBOUND_PIDFILE=$("${UNBOUND_CHECKCONF}" -o pidfile "${UNBOUND_CONFFILE}") + return $? +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --pidfile "${UNBOUND_PIDFILE}" \ + --exec "${UNBOUND_BINARY}" -- -c "${UNBOUND_CONFFILE}" + eend $? +} + +stop() { + checkconfig || return $? + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile "${UNBOUND_PIDFILE}" + eend $? +} + +reload() { + checkconfig || return $? + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${UNBOUND_PIDFILE}" + eend $? +} diff --git a/net-dns/unbound/files/unbound.service b/net-dns/unbound/files/unbound.service new file mode 100644 index 000000000000..41dd6fabd290 --- /dev/null +++ b/net-dns/unbound/files/unbound.service @@ -0,0 +1,12 @@ +[Unit] +Description=Unbound recursive Domain Name Server +After=network.target +Before=nss-lookup.target +Wants=nss-lookup.target + +[Service] +ExecStartPre=/usr/sbin/unbound-checkconf +ExecStart=/usr/sbin/unbound -d + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/unbound/files/unbound_at.service b/net-dns/unbound/files/unbound_at.service new file mode 100644 index 000000000000..84b34af45446 --- /dev/null +++ b/net-dns/unbound/files/unbound_at.service @@ -0,0 +1,13 @@ +[Unit] +Description=Unbound recursive Domain Name Server +After=network.target +Before=nss-lookup.target +Wants=nss-lookup.target + +[Service] +Type=simple +ExecStartPre=/usr/sbin/unbound-checkconf /etc/unbound/%i.conf +ExecStart=/usr/sbin/unbound -d -c /etc/unbound/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/unbound/metadata.xml b/net-dns/unbound/metadata.xml new file mode 100644 index 000000000000..75f7246c048b --- /dev/null +++ b/net-dns/unbound/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>mschiff@gentoo.org</email> + <name>Marc Schiffbauer</name> + </maintainer> + <maintainer> + <email>nabeken@tknetworks.org</email> + <description>Proxied developer. Please CC on bugs.</description> + <name>TANABE Ken-ichi</name> + </maintainer> + <longdescription lang="en"> + Unbound is a validating, recursive, and caching DNS resolver. + + The C implementation of Unbound is developed and maintained by NLnet + Labs. It is based on ideas and algorithms taken from a java prototype + developed by Verisign labs, Nominet, Kirei and ep.net. + + Unbound is designed as a set of modular components, so that also + DNSSEC (secure DNS) validation and stub-resolvers (that do not run + as a server, but are linked into an application) are easily possible. + </longdescription> + <use> + <flag name='dnstap'>Enable dnstap support</flag> + <flag name='ecdsa'>Enable ECDSA support</flag> + <flag name='gost'>Enable GOST support</flag> + </use> +</pkgmetadata> diff --git a/net-dns/unbound/unbound-1.4.22-r1.ebuild b/net-dns/unbound/unbound-1.4.22-r1.ebuild new file mode 100644 index 000000000000..fff8e87add5f --- /dev/null +++ b/net-dns/unbound/unbound-1.4.22-r1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user + +DESCRIPTION="A validating, recursive and caching DNS resolver" +HOMEPAGE="http://unbound.net/" +SRC_URI="http://unbound.net/downloads/${P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x64-macos" +IUSE="debug gost python selinux static-libs test threads" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# Note: expat is needed by executable only but the Makefile is custom +# and doesn't make it possible to easily install the library without +# the executables. MULTILIB_USEDEP may be dropped once build system +# is fixed. + +CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] + >=dev-libs/libevent-2.0.21[${MULTILIB_USEDEP}] + >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] + python? ( ${PYTHON_DEPS} )" + +DEPEND="${CDEPEND} + python? ( dev-lang/swig ) + test? ( + net-dns/ldns-utils[examples] + dev-util/splint + app-text/wdiff + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-bind )" + +# bug #347415 +RDEPEND="${RDEPEND} + net-dns/dnssec-root" + +pkg_setup() { + enewgroup unbound + enewuser unbound -1 -1 /etc/unbound unbound + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # To avoid below error messages, set 'trust-anchor-file' to same value in + # 'auto-trust-anchor-file'. + # [23109:0] error: Could not open autotrust file for writing, + # /etc/dnssec/root-anchors.txt: Permission denied + epatch "${FILESDIR}"/${PN}-1.4.12-gentoo.patch + + # required for the python part + multilib_copy_sources +} + +src_configure() { + [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack + multilib-minimal_src_configure +} + +multilib_src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable gost) \ + $(use_enable static-libs static) \ + $(multilib_native_use_with python pythonmodule) \ + $(multilib_native_use_with python pyunbound) \ + $(use_with threads pthreads) \ + --disable-rpath \ + --enable-ecdsa \ + --with-libevent="${EPREFIX}"/usr \ + --with-pidfile="${EPREFIX}"/var/run/unbound.pid \ + --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \ + --with-ssl="${EPREFIX}"/usr \ + --with-libexpat="${EPREFIX}"/usr + + # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html + # $(use_enable debug lock-checks) \ + # $(use_enable debug alloc-checks) \ + # $(use_enable debug alloc-lite) \ + # $(use_enable debug alloc-nonregional) \ +} + +multilib_src_install_all() { + prune_libtool_files --modules + use python && python_optimize + + newinitd "${FILESDIR}"/unbound.initd unbound + newconfd "${FILESDIR}"/unbound.confd unbound + + systemd_dounit "${FILESDIR}"/unbound.service + systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service" + systemd_dounit "${FILESDIR}"/unbound-anchor.service + + dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES} + + # bug #315519 + dodoc contrib/unbound_munin_ + + docinto selinux + dodoc contrib/selinux/* + + exeinto /usr/share/${PN} + doexe contrib/update-anchor.sh +} diff --git a/net-dns/unbound/unbound-1.5.1-r2.ebuild b/net-dns/unbound/unbound-1.5.1-r2.ebuild new file mode 100644 index 000000000000..8f51b7fcd493 --- /dev/null +++ b/net-dns/unbound/unbound-1.5.1-r2.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user + +MY_P=${PN}-${PV/_/} +DESCRIPTION="A validating, recursive and caching DNS resolver" +HOMEPAGE="http://unbound.net/" +SRC_URI="http://unbound.net/downloads/${MY_P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ppc ppc64 x86" +IUSE="debug dnstap +ecdsa gost python selinux static-libs test threads" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# Note: expat is needed by executable only but the Makefile is custom +# and doesn't make it possible to easily install the library without +# the executables. MULTILIB_USEDEP may be dropped once build system +# is fixed. + +CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] + >=dev-libs/libevent-2.0.21[${MULTILIB_USEDEP}] + >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] + dnstap? ( + dev-libs/fstrm[${MULTILIB_USEDEP}] + >=dev-libs/protobuf-c-1.0.2-r1[${MULTILIB_USEDEP}] + ) + ecdsa? ( dev-libs/openssl:0[-bindist] ) + python? ( ${PYTHON_DEPS} )" + +DEPEND="${CDEPEND} + python? ( dev-lang/swig ) + test? ( + net-dns/ldns-utils[examples] + dev-util/splint + app-text/wdiff + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-bind )" + +# bug #347415 +RDEPEND="${RDEPEND} + net-dns/dnssec-root" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup unbound + enewuser unbound -1 -1 /etc/unbound unbound + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # To avoid below error messages, set 'trust-anchor-file' to same value in + # 'auto-trust-anchor-file'. + # [23109:0] error: Could not open autotrust file for writing, + # /etc/dnssec/root-anchors.txt: Permission denied + epatch "${FILESDIR}"/${PN}-1.4.12-gentoo.patch + epatch "${FILESDIR}"/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch + + # required for the python part + multilib_copy_sources +} + +src_configure() { + [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack + multilib-minimal_src_configure +} + +multilib_src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable gost) \ + $(use_enable dnstap) \ + $(use_enable ecdsa) \ + $(use_enable static-libs static) \ + $(multilib_native_use_with python pythonmodule) \ + $(multilib_native_use_with python pyunbound) \ + $(use_with threads pthreads) \ + --disable-flto \ + --disable-rpath \ + --with-libevent="${EPREFIX}"/usr \ + --with-pidfile="${EPREFIX}"/var/run/unbound.pid \ + --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \ + --with-ssl="${EPREFIX}"/usr \ + --with-libexpat="${EPREFIX}"/usr + + # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html + # $(use_enable debug lock-checks) \ + # $(use_enable debug alloc-checks) \ + # $(use_enable debug alloc-lite) \ + # $(use_enable debug alloc-nonregional) \ +} + +multilib_src_install_all() { + prune_libtool_files --modules + use python && python_optimize + + newinitd "${FILESDIR}"/unbound.initd unbound + newconfd "${FILESDIR}"/unbound.confd unbound + + systemd_dounit "${FILESDIR}"/unbound.service + systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service" + systemd_dounit "${FILESDIR}"/unbound-anchor.service + + dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES} + + # bug #315519 + dodoc contrib/unbound_munin_ + + docinto selinux + dodoc contrib/selinux/* + + exeinto /usr/share/${PN} + doexe contrib/update-anchor.sh +} diff --git a/net-dns/unbound/unbound-1.5.4.ebuild b/net-dns/unbound/unbound-1.5.4.ebuild new file mode 100644 index 000000000000..a67b9d97bcae --- /dev/null +++ b/net-dns/unbound/unbound-1.5.4.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user + +MY_P=${PN}-${PV/_/} +DESCRIPTION="A validating, recursive and caching DNS resolver" +HOMEPAGE="http://unbound.net/" +SRC_URI="http://unbound.net/downloads/${MY_P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" +IUSE="debug dnstap +ecdsa gost python selinux static-libs test threads" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# Note: expat is needed by executable only but the Makefile is custom +# and doesn't make it possible to easily install the library without +# the executables. MULTILIB_USEDEP may be dropped once build system +# is fixed. + +CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] + >=dev-libs/libevent-2.0.21[${MULTILIB_USEDEP}] + >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] + dnstap? ( + dev-libs/fstrm[${MULTILIB_USEDEP}] + >=dev-libs/protobuf-c-1.0.2-r1[${MULTILIB_USEDEP}] + ) + ecdsa? ( dev-libs/openssl:0[-bindist] ) + python? ( ${PYTHON_DEPS} )" + +DEPEND="${CDEPEND} + python? ( dev-lang/swig ) + test? ( + net-dns/ldns-utils[examples] + dev-util/splint + app-text/wdiff + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-bind )" + +# bug #347415 +RDEPEND="${RDEPEND} + net-dns/dnssec-root" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup unbound + enewuser unbound -1 -1 /etc/unbound unbound + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # To avoid below error messages, set 'trust-anchor-file' to same value in + # 'auto-trust-anchor-file'. + # [23109:0] error: Could not open autotrust file for writing, + # /etc/dnssec/root-anchors.txt: Permission denied + epatch "${FILESDIR}"/${PN}-1.4.12-gentoo.patch + + # required for the python part + multilib_copy_sources +} + +src_configure() { + [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack + multilib-minimal_src_configure +} + +multilib_src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable gost) \ + $(use_enable dnstap) \ + $(use_enable ecdsa) \ + $(use_enable static-libs static) \ + $(multilib_native_use_with python pythonmodule) \ + $(multilib_native_use_with python pyunbound) \ + $(use_with threads pthreads) \ + --disable-flto \ + --disable-rpath \ + --with-libevent="${EPREFIX}"/usr \ + --with-pidfile="${EPREFIX}"/var/run/unbound.pid \ + --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \ + --with-ssl="${EPREFIX}"/usr \ + --with-libexpat="${EPREFIX}"/usr + + # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html + # $(use_enable debug lock-checks) \ + # $(use_enable debug alloc-checks) \ + # $(use_enable debug alloc-lite) \ + # $(use_enable debug alloc-nonregional) \ +} + +multilib_src_install_all() { + prune_libtool_files --modules + use python && python_optimize + + newinitd "${FILESDIR}"/unbound.initd unbound + newconfd "${FILESDIR}"/unbound.confd unbound + + systemd_dounit "${FILESDIR}"/unbound.service + systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service" + systemd_dounit "${FILESDIR}"/unbound-anchor.service + + dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES} + + # bug #315519 + dodoc contrib/unbound_munin_ + + docinto selinux + dodoc contrib/selinux/* + + exeinto /usr/share/${PN} + doexe contrib/update-anchor.sh +} diff --git a/net-dns/updatedd/Manifest b/net-dns/updatedd/Manifest new file mode 100644 index 000000000000..f9f3d3e11b74 --- /dev/null +++ b/net-dns/updatedd/Manifest @@ -0,0 +1 @@ +DIST updatedd_2.6.tar.gz 667104 SHA256 9d240c7e9fcc3f6cb1d32410ca2dee10d359c53f1a5a30d8f3ec49b18b73f1d0 diff --git a/net-dns/updatedd/files/updatedd-2.6-options.patch b/net-dns/updatedd/files/updatedd-2.6-options.patch new file mode 100644 index 000000000000..17fe89b3e49d --- /dev/null +++ b/net-dns/updatedd/files/updatedd-2.6-options.patch @@ -0,0 +1,12 @@ +--- updatedd-2.6/src/updatedd.c.orig 2008-04-01 19:00:30.000000000 +1100 ++++ updatedd-2.6/src/updatedd.c 2008-04-01 19:01:17.000000000 +1100 +@@ -272,7 +272,8 @@ + int c, option_index = 0; + static struct option long_options[] = { + { "help", 0, 0, 'h' }, +- { "version", 0, 0, 'v' } ++ { "version", 0, 0, 'v' }, ++ { 0, 0, 0, 0 } + }; + + c = getopt_long(argc, argv, "LY", diff --git a/net-dns/updatedd/metadata.xml b/net-dns/updatedd/metadata.xml new file mode 100644 index 000000000000..1076258a0ce8 --- /dev/null +++ b/net-dns/updatedd/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>maintainer-needed@gentoo.org</email> +</maintainer> +<longdescription></longdescription> +</pkgmetadata> diff --git a/net-dns/updatedd/updatedd-2.6.ebuild b/net-dns/updatedd/updatedd-2.6.ebuild new file mode 100644 index 000000000000..31525eddc6fa --- /dev/null +++ b/net-dns/updatedd/updatedd-2.6.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils + +DESCRIPTION="Dynamic DNS client with plugins for several dynamic dns services" +HOMEPAGE="http://savannah.nongnu.org/projects/updatedd/" +SRC_URI="http://savannah.nongnu.org/download/updatedd/${PN}_${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ppc x86" +IUSE="" + +RDEPEND="" + +src_unpack() { + unpack ${A} + epatch "${FILESDIR}"/${P}-options.patch +} + +src_install() { + emake DESTDIR="${D}" install || die + mv "${D}"/usr/share/doc/updatedd "${D}"/usr/share/doc/${PF} + dodoc AUTHORS +} diff --git a/net-dns/validns/Manifest b/net-dns/validns/Manifest new file mode 100644 index 000000000000..7c9de298e57e --- /dev/null +++ b/net-dns/validns/Manifest @@ -0,0 +1,2 @@ +DIST validns-0.7.tar.gz 185377 SHA256 372f37f2ae2ff44251ffc0ceed7ad60bdb3e6a3a692e69d186566b9d19407591 SHA512 2309aabdf863ff51b035ecf4536f2499d9373aed057a07546bdf4498c06c8e6cb36fc8094a8e3b26b49bd12c245ea705421744b354e46c3cc3927f6c3b33e72a WHIRLPOOL d405c33b640a9f21608021bbc1e634393b8a36097f5a0b20c87b330ab3948facfcaab25f9f2596b9401759b534618a53b1dcdd384790f9f5144e2778ae3a185f +DIST validns-0.8.tar.gz 190325 SHA256 df2db0eaa998a0411ff4c1c4e417eb82d32aec4835f92f45f26c66c8d1d5bd22 SHA512 2443bb8a7373f27d41ab3be1a92b61696d05b74afa42c19db54f6e999e4a634499faa44a5feefd3bc515bc677a8ef0a076092cf13316eff6d1cc504ff9702038 WHIRLPOOL e9a743409457452461a22dd5f57efee7df1e96a9f20665490d7066c87a4609e0a13e6a8a2866f18cc017eee82120b22ddce3794ad381702cda7a82de9935339e diff --git a/net-dns/validns/metadata.xml b/net-dns/validns/metadata.xml new file mode 100644 index 000000000000..cce03d071dbf --- /dev/null +++ b/net-dns/validns/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>tom@whyscream.net</email> + <name>Tom Hendrikx</name> + <description>Please assign bugs</description> + </maintainer> + <maintainer> + <email>wschlich@gentoo.org</email> + <name>Wolfram Schlich</name> + <description>proxy-maintainer, please CC on bugs</description> + </maintainer> + <longdescription>Validns is a standalone command line RFC 1034/1035 zone file validation tool that, in addition to basic syntactic and semantic zone checks, includes DNSSEC signature verification and NSEC/NSEC3 chain validation, as well a number of optional policy checks on the zone.</longdescription> +</pkgmetadata> diff --git a/net-dns/validns/validns-0.7.ebuild b/net-dns/validns/validns-0.7.ebuild new file mode 100644 index 000000000000..481f0ac27ad3 --- /dev/null +++ b/net-dns/validns/validns-0.7.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="A high performance DNS/DNSSEC zone validator" +HOMEPAGE="http://www.validns.net/" +SRC_URI="http://www.validns.net/download/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND="dev-libs/judy" +DEPEND=" + ${RDEPEND} + test? ( dev-perl/Test-Command-Simple ) +" + +src_install() { + dobin validns + doman validns.1 + dodoc {notes,technical-notes,todo,usage}.mdwn Changes README +} diff --git a/net-dns/validns/validns-0.8.ebuild b/net-dns/validns/validns-0.8.ebuild new file mode 100644 index 000000000000..481f0ac27ad3 --- /dev/null +++ b/net-dns/validns/validns-0.8.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="A high performance DNS/DNSSEC zone validator" +HOMEPAGE="http://www.validns.net/" +SRC_URI="http://www.validns.net/download/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND="dev-libs/judy" +DEPEND=" + ${RDEPEND} + test? ( dev-perl/Test-Command-Simple ) +" + +src_install() { + dobin validns + doman validns.1 + dodoc {notes,technical-notes,todo,usage}.mdwn Changes README +} diff --git a/net-dns/valtz/Manifest b/net-dns/valtz/Manifest new file mode 100644 index 000000000000..3a6834b1982d --- /dev/null +++ b/net-dns/valtz/Manifest @@ -0,0 +1 @@ +DIST valtz.tgz 10638 SHA256 f09a6c7b79bfb201f18ab658953c6b58119731f127fb9e9f38601a0897019a13 diff --git a/net-dns/valtz/metadata.xml b/net-dns/valtz/metadata.xml new file mode 100644 index 000000000000..9cc4baef61fa --- /dev/null +++ b/net-dns/valtz/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>maintainer-needed@gentoo.org</email> +</maintainer> +<longdescription>Simple validation tool for tinydns-data zonefiles. Also able to +filter file(s) from errors, not allowed zones and not allowed record types.</longdescription> +</pkgmetadata> diff --git a/net-dns/valtz/valtz-0.7.ebuild b/net-dns/valtz/valtz-0.7.ebuild new file mode 100644 index 000000000000..604ab9fb7154 --- /dev/null +++ b/net-dns/valtz/valtz-0.7.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="Validation tool for tinydns-data zone files" +SRC_URI="http://x42.com/software/valtz/${PN}.tgz" +HOMEPAGE="http://x42.com/software/valtz/" +IUSE="" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64 ~x86" + +RDEPEND="dev-lang/perl" + +src_install() { + dobin valtz || die + dodoc README CHANGES +} |