From cbf2337d54cb9375f9c4b0e3ca510d71365be6a4 Mon Sep 17 00:00:00 2001 From: geos_one Date: Mon, 30 Mar 2009 11:14:02 +0000 Subject: [PATCH] add powerdens git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@906 6952d904-891a-0410-993b-d76249ca496b --- .../mmc-web-network-2.3.2-powerdns-1.patch | 70 +++++++++++++++++++ .../mmc-web-network-2.3.2-r1.ebuild | 30 ++++++++ 2 files changed, 100 insertions(+) create mode 100644 app-admin/mmc-web-network/files/mmc-web-network-2.3.2-powerdns-1.patch create mode 100644 app-admin/mmc-web-network/mmc-web-network-2.3.2-r1.ebuild diff --git a/app-admin/mmc-web-network/files/mmc-web-network-2.3.2-powerdns-1.patch b/app-admin/mmc-web-network/files/mmc-web-network-2.3.2-powerdns-1.patch new file mode 100644 index 0000000..de3fc81 --- /dev/null +++ b/app-admin/mmc-web-network/files/mmc-web-network-2.3.2-powerdns-1.patch @@ -0,0 +1,70 @@ +Submitted By: Mario Fetka (mario dot fetka at gmail dot com) +Date: 2009-03-30 +Initial Package Version: 2.3.2 +Origin: http://mds.mandriva.org/ticket/244 +Upstream Status: accepted +Description: add PowerDNS support to mmc + +diff -Naur mmc-web-network-2.3.2.orig/network/network/ajaxZoneFilter.php mmc-web-network-2.3.2/network/network/ajaxZoneFilter.php +--- mmc-web-network-2.3.2.orig/network/network/ajaxZoneFilter.php 2007-11-15 14:29:44.000000000 +0000 ++++ mmc-web-network-2.3.2/network/network/ajaxZoneFilter.php 2009-03-30 10:10:41.062435101 +0000 +@@ -11,7 +11,11 @@ + $count = array(); + + foreach(getZones($filter) as $dn => $entry) { +- $zonename = $entry[1]["zoneName"][0]; ++ if (in_array("associatedDomain",array_keys($entry[1]))) { ++ $zonename = $entry[1]["associatedDomain"][0]; ++ } else { ++ $zonename = $entry[1]["zoneName"][0]; ++ } + $zones[$zonename] = array(); + $zones[$zonename]["description"] = ""; + if (isset($entry[1]["tXTRecord"])) { +diff -Naur mmc-web-network-2.3.2.orig/network/network/ajaxZoneMembersFilter.php mmc-web-network-2.3.2/network/network/ajaxZoneMembersFilter.php +--- mmc-web-network-2.3.2.orig/network/network/ajaxZoneMembersFilter.php 2007-11-30 15:08:09.000000000 +0000 ++++ mmc-web-network-2.3.2/network/network/ajaxZoneMembersFilter.php 2009-03-30 10:10:41.062435101 +0000 +@@ -15,7 +15,11 @@ + /* Build a $hostname => IP array using A record only */ + $records = array(); + foreach($rrs as $dn => $entry) { +- $hostname = $entry[1]["relativeDomainName"][0]; ++ if (in_array("associatedDomain",array_keys($entry[1]))) { ++ $hostname = $entry[1]["associatedDomain"][0]; ++ } else { ++ $hostname = $entry[1]["zoneName"][0]; ++ } + if (isset($entry[1]["aRecord"])) { + $address = ip2long($entry[1]["aRecord"][0]); + $records[$hostname] = $address; +@@ -24,7 +28,11 @@ + /* Complete the array using CNAME entries */ + $cnames = array(); + foreach($rrs as $dn => $entry) { +- $alias = $entry[1]["relativeDomainName"][0]; ++ if (in_array("associatedDomain",array_keys($entry[1]))) { ++ $alias = $entry[1]["associatedDomain"][0]; ++ } else { ++ $alias = $entry[1]["zoneName"][0]; ++ } + if (isset($entry[1]["cNAMERecord"])) { + $cname = $entry[1]["cNAMERecord"][0]; + $records[$alias] = $records[$cname]; +@@ -80,4 +88,4 @@ + $n->addActionItemArray($actionsDel); + $n->display(); + +-?> +\ No newline at end of file ++?> +diff -Naur mmc-web-network-2.3.2.orig/network/network/edithost.php mmc-web-network-2.3.2/network/network/edithost.php +--- mmc-web-network-2.3.2.orig/network/network/edithost.php 2008-12-10 15:13:01.000000000 +0000 ++++ mmc-web-network-2.3.2/network/network/edithost.php 2009-03-30 10:10:41.062435101 +0000 +@@ -89,6 +89,7 @@ + + if ($_GET["action"] == "edithost") { + $hostname = $_GET["host"]; ++ $hostname = str_replace('.' . $zone, '', $hostname); + $data = getResourceRecord($zone, $hostname); + if (empty($data)) die("Record $hostname does not exist."); + else if (isset($data[0][1]["aRecord"])) { diff --git a/app-admin/mmc-web-network/mmc-web-network-2.3.2-r1.ebuild b/app-admin/mmc-web-network/mmc-web-network-2.3.2-r1.ebuild new file mode 100644 index 0000000..efee8c6 --- /dev/null +++ b/app-admin/mmc-web-network/mmc-web-network-2.3.2-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils depend.apache depend.php + +DESCRIPTION="Mandriva Directory Server - Identity and network services management made easy !" +HOMEPAGE="http://mds.mandriva.org/" +SRC_URI="http://mds.mandriva.org/pub/mds/sources/${PV}/${P}.tar.gz + http://ftp.mars.arge.at/mds/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="" +DEPEND="sys-apps/lsb-release + sys-devel/gettext" +RDEPEND=">=app-admin/mmc-web-base-${PV}" +SLOT="0" + +need_php_httpd + +src_unpack() { + unpack ${A} + cd ${S} + epatch "${FILESDIR}"/${PN}-2.3.2-powerdns-1.patch +} + +src_install() { + emake DESTDIR="${D}" PREFIX=/usr install +}