Hello community,
here is the log from the commit of package yast2-dns-server
checked in at Thu Jul 27 17:53:16 CEST 2006.
--------
--- yast2-dns-server/yast2-dns-server.changes 2006-07-25 08:48:40.000000000 +0200
+++ yast2-dns-server/yast2-dns-server.changes 2006-07-27 09:15:47.000000000 +0200
@@ -1,0 +2,16 @@
+Thu Jul 27 09:14:08 CEST 2006 - locilka@suse.cz
+
+- Fixed testsuites because of changes in yast2-pam.
+- Adjusted master-zone dialog to show Punycode records in their
+ decoded form.
+- 2.13.14
+
+-------------------------------------------------------------------
+Wed Jul 26 16:27:03 CEST 2006 - locilka@suse.cz
+
+- Created new YCP module DnsServerPunycode that transforms strings
+ (relative zone names, or FQDNs) into the Punycode encoding
+ described in RFC 3492 (FaTE #300589, Bugzilla #162217).
+- DnsServerPunycode used for adding and editing DNS zones.
+
+-------------------------------------------------------------------
Old:
----
yast2-dns-server-2.13.13.tar.bz2
New:
----
yast2-dns-server-2.13.14.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-dns-server.spec ++++++
--- /var/tmp/diff_new_pack.IR8D0h/_old 2006-07-27 17:53:05.000000000 +0200
+++ /var/tmp/diff_new_pack.IR8D0h/_new 2006-07-27 17:53:05.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-dns-server (Version 2.13.13)
+# spec file for package yast2-dns-server (Version 2.13.14)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-dns-server
-Version: 2.13.13
+Version: 2.13.14
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-dns-server-2.13.13.tar.bz2
+Source0: yast2-dns-server-2.13.14.tar.bz2
prefix: /usr
BuildRequires: perl-Digest-SHA1 perl-X500-DN perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-ldap-client yast2-perl-bindings yast2-testsuite
Requires: yast2 /usr/bin/host perl-gettext yast2-perl-bindings bind-utils yast2-ldap perl-X500-DN perl-Digest-SHA1 perl-Parse-RecDescent yast2-ldap-client
@@ -33,7 +33,7 @@
Jiri Srain
%prep
-%setup -n yast2-dns-server-2.13.13
+%setup -n yast2-dns-server-2.13.14
%build
%{prefix}/bin/y2tool y2autoconf
@@ -76,6 +76,16 @@
%doc %{prefix}/share/doc/packages/yast2-dns-server
%changelog -n yast2-dns-server
+* Thu Jul 27 2006 - locilka@suse.cz
+- Fixed testsuites because of changes in yast2-pam.
+- Adjusted master-zone dialog to show Punycode records in their
+ decoded form.
+- 2.13.14
+* Wed Jul 26 2006 - locilka@suse.cz
+- Created new YCP module DnsServerPunycode that transforms strings
+ (relative zone names, or FQDNs) into the Punycode encoding
+ described in RFC 3492 (FaTE #300589, Bugzilla #162217).
+- DnsServerPunycode used for adding and editing DNS zones.
* Mon Jul 24 2006 - locilka@suse.cz
- Added support for forward zones (FaTE #120041). The only option
thats is possible to set is a 'forwarders' option.
++++++ yast2-dns-server-2.13.13.tar.bz2 -> yast2-dns-server-2.13.14.tar.bz2 ++++++
++++ 3572 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-dns-server-2.13.13/VERSION new/yast2-dns-server-2.13.14/VERSION
--- old/yast2-dns-server-2.13.13/VERSION 2006-07-24 15:02:48.000000000 +0200
+++ new/yast2-dns-server-2.13.14/VERSION 2006-07-27 08:31:37.000000000 +0200
@@ -1 +1 @@
-2.13.13
+2.13.14
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-dns-server-2.13.13/configure.in new/yast2-dns-server-2.13.14/configure.in
--- old/yast2-dns-server-2.13.13/configure.in 2006-07-25 08:49:42.000000000 +0200
+++ new/yast2-dns-server-2.13.14/configure.in 2006-07-27 10:17:47.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.13.19 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-dns-server, 2.13.13, http://bugs.opensuse.org/, yast2-dns-server)
+AC_INIT(yast2-dns-server, 2.13.14, http://bugs.opensuse.org/, yast2-dns-server)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.13"
+VERSION="2.13.14"
RPMNAME="yast2-dns-server"
MAINTAINER="Lukas Ocilka "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-dns-server-2.13.13/src/DnsServerPunycode.ycp new/yast2-dns-server-2.13.14/src/DnsServerPunycode.ycp
--- old/yast2-dns-server-2.13.13/src/DnsServerPunycode.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-dns-server-2.13.14/src/DnsServerPunycode.ycp 2006-07-26 16:26:41.000000000 +0200
@@ -0,0 +1,115 @@
+/**
+ * File: modules/DnsServerPunycode.ycp
+ * Package: Configuration of dns-server
+ * Summary: DNS Punycode Handling
+ * Authors: Lukas Ocilka
+ * Tags: Unstable
+ *
+ * $Id:$
+ *
+ * Representation of the configuration of dns-server.
+ * Input and output routines.
+ */
+
+{
+
+ module "DnsServerPunycode";
+ textdomain "dns-server";
+
+ string tmp_dir = nil;
+
+ /**
+ * Returns the current temporary directory.
+ * Lazy loading for the initialization is used.
+ */
+ define string GetTmpDirectory () {
+ if (tmp_dir == nil) {
+ tmp_dir = (string) SCR::Read(.target.tmpdir);
+ }
+
+ return tmp_dir;
+ }
+
+ define list <string> ConvertBackAndForth (list <string> strings_in, boolean to_punycode) {
+ string tmp_in = GetTmpDirectory() + "/tmp-idnconv-in.ycp";
+ string tmp_out = GetTmpDirectory() + "/tmp-idnconv-out.ycp";
+
+ list <string> strings_out = [];
+ SCR::Write(.target.ycp, tmp_in, strings_in);
+ string convert_command = sformat("/usr/bin/idnconv %1 %2 > %3",
+ (to_punycode ? "":"-reverse"), tmp_in, tmp_out
+ );
+
+ if ((integer) SCR::Execute(.target.bash, convert_command) != 0) {
+ y2error("Conversion failed!");
+ } else {
+ strings_out = (list <string>) SCR::Read(.target.ycp, tmp_out);
+ // Parsing the YCP file failed
+ if (strings_out == nil) {
+ y2error("Erroneous YCP file: %1", SCR::Read(.target.string, tmp_out));
+ }
+ }
+
+ return strings_out;
+ }
+
+ /**
+ * Converts list of UTF-8 strings into their Punycode
+ * ASCII repserentation.
+ *
+ * @param list <string> punycode_strings
+ * @return list <string> encoded_strings
+ */
+ global define list <string> EncodePunycodes (list <string> punycode_strings) {
+ return ConvertBackAndForth(punycode_strings, true);
+ }
+
+ /**
+ * Converts list of Punycode strings into their UTF-8
+ * representation.
+ *
+ * @param list <string> punycode_strings
+ * @return list <string> decoded_strings
+ */
+ global define list <string> DecodePunycodes (list <string> punycode_strings) {
+ return ConvertBackAndForth(punycode_strings, false);
+ }
+
+ /**
+ * Encodes the domain name (relative or FQDN) to the Punycode.
+ *
+ * @param string decoded domain_name
+ * @return string encoded domain_name
+ *
+ * @example
+ * EncodeDomainName("žížala.jůlinka.go.home")
+ * -> "xn--ala-qma83eb.xn--jlinka-3mb.go.home"
+ */
+ global define string EncodeDomainName (string decoded_domain_name) {
+ return mergestring(
+ EncodePunycodes(
+ splitstring(decoded_domain_name, ".")
+ ),
+ "."
+ );
+ }
+
+ /**
+ * Decodes the domain name (relative or FQDN) from the Punycode.
+ *
+ * @param string encoded_domain_name
+ * @return string decoded domain_name
+ *
+ * @example
+ * DecodeDomainName("xn--ala-qma83eb.xn--jlinka-3mb.go.home")
+ * -> "žížala.jůlinka.go.home"
+ */
+ global define string DecodeDomainName (string encoded_domain_name) {
+ return mergestring(
+ DecodePunycodes(
+ splitstring(encoded_domain_name, ".")
+ ),
+ "."
+ );
+ }
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-dns-server-2.13.13/src/Makefile.am new/yast2-dns-server-2.13.14/src/Makefile.am
--- old/yast2-dns-server-2.13.13/src/Makefile.am 2006-06-26 09:07:34.000000000 +0200
+++ new/yast2-dns-server-2.13.14/src/Makefile.am 2006-07-26 15:57:15.000000000 +0200
@@ -33,7 +33,8 @@
DnsTsigKeys.pm \
DnsServerUI.ycp \
DnsFakeTabs.ycp \
- DnsServerAPI.pm
+ DnsServerAPI.pm \
+ DnsServerPunycode.ycp
YaPI_perldir = @moduledir@/YaPI
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-dns-server-2.13.13/src/dialog-main.ycp new/yast2-dns-server-2.13.14/src/dialog-main.ycp
--- old/yast2-dns-server-2.13.13/src/dialog-main.ycp 2006-07-24 15:11:08.000000000 +0200
+++ new/yast2-dns-server-2.13.14/src/dialog-main.ycp 2006-07-26 17:04:21.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Jiri Srain
* Lukas Ocilka
*
- * $Id: dialog-main.ycp 31967 2006-07-24 13:12:35Z locilka $
+ * $Id: dialog-main.ycp 32011 2006-07-26 15:05:52Z locilka $
*/
{
@@ -34,6 +34,7 @@
import "Hostname";
import "Confirm";
import "DnsServerAPI";
+import "DnsServerPunycode";
/* String defines the initial screen for the expert dialog */
string initial_screen = "start_up";
@@ -207,17 +208,6 @@
),
`VSpacing ( 1 ),
// Frame label for DNS-Forwarders options
-// `Frame ( _("Options"),
-// `Left (
-// `VBox (
-// // Checkbox - DNS-Forwarders options
-// `Left ( `CheckBox ( `id ( "forward_first" ), `opt (`notify), _("Forward &First") ) ),
-// // Checkbox - DNS-Forwarders options
-// `Left ( `CheckBox ( `id ( "forward_only" ), `opt (`notify), _("Fo&rward Only") ) )
-// )
-// )
-// ),
-// `VSpacing ( 0.5 ),
`VSquash (
`Frame (
// Frame label for DNS-Forwarders adding IP
@@ -265,8 +255,6 @@
// Selectionbox for listing current DNS-Forwarders
_("Forwarder &List"),
forwarders));
-// UI::ChangeWidget (`id ("forward_first"), `Value, forward == "first");
-// UI::ChangeWidget (`id ("forward_only"), `Value, forward == "only");
UI::ChangeWidget (`id ("forwarders_delete_ip_address"),
`Enabled, forwarders != []);
if (forwarders != [])
@@ -292,16 +280,6 @@
return f;
});
}
-/* else if (o["key"]:"" == "forward")
- {
- if (issubstring (o["value"]:"", "first"))
- forward = "first";
- else if (issubstring (o["value"]:"", "only"))
- forward = "only";
- else
- forward = "";
- }*/
-
});
}
@@ -358,13 +336,6 @@
"value" : forwarders_str,
]);
}
-/* if (forward != "")
- {
- options = add (options, $[
- "key" : "forward",
- "value" : forward,
- ]);
- }*/
DnsServer::SetGlobalOptions (options);
}
@@ -374,33 +345,8 @@
*/
symbol HandleExpertForwardersPage (string key, map event) {
any ret = event["ID"]:nil;
-/* if (ret == "forward_first")
- {
- if ((boolean)UI::QueryWidget (`id ("forward_first"), `Value))
- {
- UI::ChangeWidget (`id ("forward_only"), `Value, false);
- forward = "first";
- }
- else
- {
- forward = "";
- }
- return nil;
- }
- else if (ret == "forward_only")
- {
- if ((boolean)UI::QueryWidget (`id ("forward_only"), `Value))
- {
- UI::ChangeWidget (`id ("forward_first"), `Value, false);
- forward = "only";
- }
- else
- {
- forward = "";
- }
- return nil;
- }
- else */ if (ret == "forwarders_add_ip_address")
+
+ if (ret == "forwarders_add_ip_address")
{
string new_addr = (string)
UI::QueryWidget (`id ("forwarders_new_ip_address"), `Value);
@@ -1440,6 +1386,7 @@
void RedrawZonesListWidget () {
integer index = -1;
+
list items = maplist (map z, zones, ``{
index = index + 1;
string zone_name = z["zone"]:"";
@@ -1471,7 +1418,7 @@
y2warning("Unknown zone type %1", type_trans);
}
- return `item (`id (index), zone_name, type_trans);
+ return `item (`id (index), DnsServerPunycode::DecodeDomainName(zone_name), type_trans);
});
items = filter (any i, items, ``(i != `item ()));
@@ -1482,20 +1429,11 @@
}
/**
- * Setting `ValidChars for the dialog
- */
-void ValidCharsZonesPage () {
- // setting `ValidChars
- UI::ChangeWidget( `id("new_zone_name"), `ValidChars, Hostname::ValidCharsDomain);
-}
-
-/**
* Initialize the tab of the dialog
*/
void InitExpertZonesPage (string key) {
zones = DnsServer::FetchZones ();
RedrawZonesListWidget ();
- ValidCharsZonesPage ();
}
/**
@@ -1512,6 +1450,7 @@
any ret = event["ID"]:nil;
integer index = (integer)
UI::QueryWidget (`id ("zones_list_table"), `CurrentItem);
+
if (ret == "delete_zone")
{
zones[index] = nil;
@@ -1526,15 +1465,20 @@
UI::QueryWidget (`id ("new_zone_name"), `Value);
string zone_type = (string)
UI::QueryWidget (`id ("new_zone_type"), `Value);
+
+ string encoded_zone_name = DnsServerPunycode::EncodeDomainName(zone_name);
+
// zone validation
- if ( Hostname::CheckDomain (zone_name) != true )
+ if ( Hostname::CheckDomain (encoded_zone_name) != true )
{
UI::SetFocus ( `id ("new_zone_name") );
+ // FIXME: another message!
Popup::Error ( Hostname::ValidDomain() );
return nil;
}
+
list<map> zones_same = filter (map z, zones, {
- return z["zone"]:"" == zone_name;
+ return z["zone"]:"" == encoded_zone_name;
});
if (size (zones_same) != 0)
{
@@ -1548,11 +1492,11 @@
DnsServer::SelectZone (-1);
map z = DnsServer::FetchCurrentZone ();
z = (map)union (z, $[
- "zone" : zone_name,
+ "zone" : encoded_zone_name,
"type" : zone_type,
]);
- y2milestone ("Created zone: %1", z);
+ y2milestone ("Created zone: %1 (%2)", z, zone_name);
DnsServer::StoreCurrentZone (z);
DnsServer::StoreZone ();
zones = DnsServer::FetchZones ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-dns-server-2.13.13/src/dialog-masterzone.ycp new/yast2-dns-server-2.13.14/src/dialog-masterzone.ycp
--- old/yast2-dns-server-2.13.13/src/dialog-masterzone.ycp 2006-07-24 15:11:08.000000000 +0200
+++ new/yast2-dns-server-2.13.14/src/dialog-masterzone.ycp 2006-07-27 10:17:29.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Jiri Srain ,
* Lukas Ocilka
*
- * $Id: dialog-masterzone.ycp 31967 2006-07-24 13:12:35Z locilka $
+ * $Id: dialog-masterzone.ycp 32017 2006-07-27 08:19:03Z locilka $
*/
{
@@ -342,6 +342,7 @@
));
current_zone_ns = maplist (map r, records, ``(r["value"]:""));
current_zone_ns = filter (string z, current_zone_ns, ``(z != ""));
+ current_zone_ns = DnsServerPunycode::DecodePunycodes(current_zone_ns);
RedrawNsListWidget ();
ValidCharsNsListWidget ();
}
@@ -486,15 +487,22 @@
}
void RedrawMxListWidget () {
+ // get the map of zone mail servers
+ list