Hello community,

here is the log from the commit of package yast2-dns-server for 
openSUSE:Factory checked in at 2012-02-29 14:12:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-dns-server (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-dns-server.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-dns-server", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-dns-server/yast2-dns-server.changes        
2011-11-16 17:23:31.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-dns-server.new/yast2-dns-server.changes   
2012-02-29 14:12:46.000000000 +0100
@@ -0,0 +1,23 @@
+------------------------------------------------------------------
+Mon Feb 13 18:06:25 CET 2012 - [email protected]
+
+- Checking for and adding required LDAP schemas (yast, dnszone)
+  while writing the configuration. Fixed handling if configuration
+  cannot be written to LDAP (bnc#690237).
+- 2.22.1
+
+------------------------------------------------------------------
+Fri Feb 10 13:13:43 CET 2012 - [email protected]
+
+- Fixed transforming records from absolute to relative format
+  while they are listed in UI (bnc#746363).
+- Fixed saving the current status of all zones to LDAP/files while
+  switching from using files to LDAP and vice versa (bnc#746401).
+
+------------------------------------------------------------------
+Thu Feb  9 15:16:58 CET 2012 - [email protected]
+
+- Fixed transforming records from relative to absolute format.
+  The final dot is added only to records including a zone name
+  (bnc#745560).
+

Old:
----
  yast2-dns-server-2.22.0.tar.bz2

New:
----
  yast2-dns-server-2.22.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-dns-server.spec ++++++
--- /var/tmp/diff_new_pack.v06vOl/_old  2012-02-29 14:12:50.000000000 +0100
+++ /var/tmp/diff_new_pack.v06vOl/_new  2012-02-29 14:12:50.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-dns-server
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,11 +15,10 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
 
 
 Name:           yast2-dns-server
-Version:        2.22.0
+Version:        2.22.1
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -72,7 +71,6 @@
 export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
 export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
 
-%{?suse_update_config:%{suse_update_config -f}}
 ./configure --libdir=%{_libdir} --prefix=%{_prefix} --mandir=%{_mandir}
 # V=1: verbose build in case we used AM_SILENT_RULES(yes)
 # so that RPM_OPT_FLAGS check works

++++++ yast2-dns-server-2.22.0.tar.bz2 -> yast2-dns-server-2.22.1.tar.bz2 ++++++
++++ 3196 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.22.0/VERSION new/yast2-dns-server-2.22.1/VERSION
--- old/yast2-dns-server-2.22.0/VERSION 2011-11-16 11:55:21.000000000 +0100
+++ new/yast2-dns-server-2.22.1/VERSION 2012-02-28 13:18:10.000000000 +0100
@@ -1 +1 @@
-2.22.0
+2.22.1
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.22.0/configure.in 
new/yast2-dns-server-2.22.1/configure.in
--- old/yast2-dns-server-2.22.0/configure.in    2011-11-16 11:54:34.000000000 
+0100
+++ new/yast2-dns-server-2.22.1/configure.in    2012-02-28 13:19:36.000000000 
+0100
@@ -1,9 +1,9 @@
 dnl configure.in for yast2-dns-server
 dnl
-dnl -- This file is generated by y2autoconf 2.21.6 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.21.8 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-dns-server, 2.21.3, http://bugs.opensuse.org/, yast2-dns-server)
+AC_INIT(yast2-dns-server, 2.22.1, http://bugs.opensuse.org/, yast2-dns-server)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -18,7 +18,7 @@
 AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
 
 dnl Important YaST2 variables
-VERSION="2.21.3"
+VERSION="2.22.1"
 RPMNAME="yast2-dns-server"
 MAINTAINER="Lukas Ocilka <[email protected]>"
 
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.22.0/src/DnsServer.pm 
new/yast2-dns-server-2.22.1/src/DnsServer.pm
--- old/yast2-dns-server-2.22.0/src/DnsServer.pm        2011-11-16 
11:54:54.000000000 +0100
+++ new/yast2-dns-server-2.22.1/src/DnsServer.pm        2012-02-20 
11:02:10.000000000 +0100
@@ -120,15 +120,21 @@
        return 0;
     }
 
-    if (! ($zone_map{"modified"} || $save_all))
+    if ($zone_name eq "localhost" || $zone_name eq "0.0.127.in-addr.arpa")
     {
-       y2milestone ("Skipping zone $zone_name, wasn't modified");
+       y2milestone ("Skipping system zone $zone_name");
        return 1;
     }
 
-    if ($zone_name eq "localhost" || $zone_name eq "0.0.127.in-addr.arpa")
+    if ($save_all) {
+       y2milestone ("Saving all zones, flagging ".$zone_name." zone as 
modified");
+       $zone_map{"modified"} = 1;
+    }
+
+    # zone not modified (it's not modified if the flag is not set)
+    if (! (defined $zone_map{"modified"} ? $zone_map{"modified"} : 0))
     {
-       y2milestone ("Skipping system zone $zone_name");
+       y2milestone ("Skipping zone $zone_name, wasn't modified");
        return 1;
     }
 
@@ -645,12 +651,20 @@
     return $start_service;
 }
 
+sub UseLdapModified {
+    my $self = shift;
+
+    $self->SetModified ();
+    # Save all zones as they are into the new config location (LDAP/files)
+    $save_all = 1;
+}
+
 BEGIN { $TYPEINFO{SetUseLdap} = [ "function", "boolean", "boolean" ];}
 sub SetUseLdap {
     my $self = shift;
-    $use_ldap = shift;
+    my $new_use_ldap = shift;
 
-    if ($use_ldap) {
+    if ($new_use_ldap) {
        # trying init LDAP if use_ldap selected
        my $success = $self->LdapInit (1, 1);
 
@@ -659,9 +673,10 @@
        }
     }
 
-    $self->SetModified ();
+    $use_ldap = $new_use_ldap;
+    y2milestone ("Using LDAP set to: ".$use_ldap);
 
-    $save_all = 1;
+    $self->UseLdapModified();
 
     return 1;
 }
@@ -1266,7 +1281,10 @@
     # authenticate to LDAP 
     if ($use_ldap)
     {
-       LdapPrepareToWrite ();
+       unless (LdapPrepareToWrite ()) {
+           y2error ("Cannot write to LDAP");
+           return 0;
+       }
     }
 
     foreach my $z (@zones) {
@@ -1674,7 +1692,8 @@
            if ($ask_user_to_enable_ldap) {
                # yes-no popup
                $use_ldap = Popup->YesNo (__("Enable LDAP support?"));
-               y2milestone ("User choose to use LDAP: $use_ldap");
+               $self->UseLdapModified();
+               y2milestone ("User chose to use LDAP: $use_ldap");
            # just disable LDAP
            } else {
                $use_ldap = 0;
@@ -1774,6 +1793,31 @@
     return;
 }
 
+# Checks whether all required schemas are correctly included
+# Gets an LDAP Domain as a parameter
+# Returns boolean
+sub LdapSchemasPresent ($) {
+    my $ldap_domain = shift;
+    my $ret = 1;
+    local $Data::Dumper::Indent = 0;
+
+    my $default_config = "ou=ldapconfig,".$ldap_domain;
+    my $dc_ret = Ldap->GetLDAPEntry ($default_config);
+    y2milestone ("LDAP: Default config (".$default_config.") found: 
".Dumper($dc_ret));
+
+    # Record not found
+    $ret = 0 if (! defined $dc_ret || keys(%{$dc_ret}) == 0);
+
+    my $dns_zone = "ou=DNS,".$ldap_domain;
+    my $dz_ret = Ldap->GetLDAPEntry ($dns_zone);
+    y2milestone ("LDAP: DNS (".$dns_zone.") found: ".Dumper($dz_ret));
+
+    # Record not found
+    $ret = 0 if (! defined $dz_ret || keys(%{$dz_ret}) == 0);
+
+    return $ret;
+}
+
 BEGIN { $TYPEINFO{LdapPrepareToWrite} = ["function", "boolean"];}
 sub LdapPrepareToWrite {
     my $self = shift;
@@ -1789,6 +1833,7 @@
        || 0 != scalar (@{NetworkInterfaces->Locate ("IPADDR", $ldap_server)}))
     {
        y2milestone ("LDAP server is local, checking included schemas");
+       
LdapServerAccess->AddLdapSchemas(["/etc/openldap/schema/yast.schema"],1);
        
LdapServerAccess->AddLdapSchemas(["/etc/openldap/schema/dnszone.schema"],1);
     }
     else
@@ -1840,6 +1885,14 @@
     } 
     Ldap->SetGUI(YaST::YCP::Boolean(1)); 
 
+    # If non-local server is used, schemas are not handled but required anyway
+    # BNC #710430 and BNC #690237
+    unless (LdapSchemasPresent($ldap_domain)) {
+       y2error ("Required schemas not found.");
+       Report->Error (__("Required LDAP schemas (yast, dnszone) are not 
included.\nCannot write to LDAP."));
+       return 0;
+    }
+
     # find suseDnsConfiguration object
     %ldap_query = (
         "base_dn" => $ldap_config_dn,
@@ -1870,7 +1923,7 @@
            my $err = SCR->Read (".ldap.error") || {};
            my $err_descr = Dumper ($err);
            y2error ("Error descr: $err_descr");
-           return;
+           return 0;
        }
        %found = %ldap_object;
     }
@@ -1896,7 +1949,7 @@
                my $err = SCR->Read (".ldap.error") || {};
                my $err_descr = Dumper ($err);
                y2error ("Error descr: $err_descr");
-               return;
+               return 0;
            }
            @bases = ("ou=DNS,$ldap_domain");
        }
@@ -1931,9 +1984,11 @@
            my $err = SCR->Read (".ldap.error") || {};
            my $err_descr = Dumper ($err);
            y2error ("Error descr: $err_descr");
-           return;
+           return 0;
        }
     }
+
+    return 1;
 }
 
 BEGIN { $TYPEINFO{LdapStore} = ["function", "void" ]; }
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.22.0/src/DnsServerHelperFunctions.ycp 
new/yast2-dns-server-2.22.1/src/DnsServerHelperFunctions.ycp
--- old/yast2-dns-server-2.22.0/src/DnsServerHelperFunctions.ycp        
2009-12-18 14:50:37.000000000 +0100
+++ new/yast2-dns-server-2.22.1/src/DnsServerHelperFunctions.ycp        
2012-02-20 11:02:10.000000000 +0100
@@ -4,7 +4,7 @@
  * Summary:    Module containing helper functions.
  * Authors:    Lukas Ocilka <[email protected]>
  *
- * $Id: DnsServerHelperFunctions.ycp 57028 2009-04-29 10:58:09Z lslezak $
+ * $Id: DnsServerHelperFunctions.ycp 67408 2012-02-10 12:27:51Z locilka $
  *
  * Module handles dynamic update of zone using 'nsupdate' command.
  * Automatic generation of connected zones and much more!
@@ -216,5 +216,39 @@
     DnsServer::StoreZone ();
 }
 
+map <string, list <string> > skip_converting_to_relative = $[
+    "key" : [
+    ],
+    "value" : [
+        "TXT", "SPF", "SRV"
+    ]
+];
+
+global string RRToRelativeName (string absolute_name, string zone_name, string 
record_type, string key_or_value) {
+    if (absolute_name == nil || zone_name == nil) {
+       y2error ("Erroneous record: %1/%2/%3/%4", absolute_name, zone_name, 
record_type, key_or_value);
+        return nil;
+    }
+
+    if (key_or_value != "key" && key_or_value != "value") {
+        y2error ("Unknown key/value %1", key_or_value);
+        return absolute_name;
+    }
+
+    // these records are not wanted to be converted to a relative name
+    if (contains (skip_converting_to_relative[key_or_value]:[], 
toupper(record_type))) {
+        y2debug ("Not converting %1/%2", key_or_value, record_type);
+        return absolute_name;
+    }
+
+    string remove_this_to_be_relative = "\\." + zone_name + "\\.$";
+    string relative_name = regexpsub (absolute_name, "([^ \t]*)" + 
remove_this_to_be_relative, "\\1");
+    if (relative_name != nil) {
+        return relative_name;
+    }
+
+    return absolute_name;
+}
+
 /* EOF */
 }
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.22.0/src/cmdline.ycp 
new/yast2-dns-server-2.22.1/src/cmdline.ycp
--- old/yast2-dns-server-2.22.0/src/cmdline.ycp 2011-11-16 11:54:54.000000000 
+0100
+++ new/yast2-dns-server-2.22.1/src/cmdline.ycp 2011-11-25 10:38:38.000000000 
+0100
@@ -6,7 +6,7 @@
  * Summary:    Command Line for YaST2 DNS Server
  * Authors:    Lukas Ocilka <[email protected]>
  *
- * $Id: cmdline.ycp 33316 2006-10-10 13:17:16Z locilka $
+ * $Id: cmdline.ycp 66820 2011-11-16 10:56:18Z jsuchome $
  */
 
 {
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.22.0/src/dialog-installwizard.ycp 
new/yast2-dns-server-2.22.1/src/dialog-installwizard.ycp
--- old/yast2-dns-server-2.22.0/src/dialog-installwizard.ycp    2011-11-16 
11:54:54.000000000 +0100
+++ new/yast2-dns-server-2.22.1/src/dialog-installwizard.ycp    2011-11-25 
10:38:38.000000000 +0100
@@ -5,7 +5,7 @@
  * Authors:    Jiri Srain <[email protected]>
  *              Lukas Ocilka <[email protected]>
  *
- * $Id: dialog-installwizard.ycp 54960 2009-01-23 17:40:03Z locilka $
+ * $Id: dialog-installwizard.ycp 66820 2011-11-16 10:56:18Z jsuchome $
  */
 
 {
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.22.0/src/dialog-main.ycp 
new/yast2-dns-server-2.22.1/src/dialog-main.ycp
--- old/yast2-dns-server-2.22.0/src/dialog-main.ycp     2011-11-16 
11:54:54.000000000 +0100
+++ new/yast2-dns-server-2.22.1/src/dialog-main.ycp     2011-11-25 
10:38:38.000000000 +0100
@@ -5,7 +5,7 @@
  * Authors:    Jiri Srain <[email protected]>
  *              Lukas Ocilka <[email protected]>
  *
- * $Id: dialog-main.ycp 64493 2011-06-21 07:33:30Z locilka $
+ * $Id: dialog-main.ycp 66820 2011-11-16 10:56:18Z jsuchome $
  */
 
 {
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.22.0/src/dialog-masterzone.ycp 
new/yast2-dns-server-2.22.1/src/dialog-masterzone.ycp
--- old/yast2-dns-server-2.22.0/src/dialog-masterzone.ycp       2011-11-16 
11:54:54.000000000 +0100
+++ new/yast2-dns-server-2.22.1/src/dialog-masterzone.ycp       2012-02-20 
11:02:10.000000000 +0100
@@ -5,7 +5,7 @@
  * Authors:    Jiri Srain <[email protected]>,
  *              Lukas Ocilka <[email protected]>
  *
- * $Id: dialog-masterzone.ycp 64704 2011-07-01 12:54:54Z locilka $
+ * $Id: dialog-masterzone.ycp 67408 2012-02-10 12:27:51Z locilka $
  */
 
 {
@@ -32,20 +32,6 @@
 
 include "dns-server/misc.ycp";
 
-string ToRelativeName (string absolute_name, string zone_name) {
-    if (absolute_name == nil || zone_name == nil) {
-       return nil;
-    }
-
-    string remove_this_to_be_relative = "." + zone_name + ".";
-    string relative_name = regexpsub(absolute_name, "(.*)" + 
remove_this_to_be_relative, "\\1");
-    if ((relative_name != nil) && (! regexpmatch(relative_name, "\\."))) {
-       return relative_name;
-    }
-
-    return absolute_name;
-}
-
 // zone ACL -->
 
 list <string> available_zones_to_connect = [];
@@ -1198,14 +1184,14 @@
 
        // Applies to all
        UI::ChangeWidget (`id ("add_record_name"), `Value,
-           ToRelativeName(
-               Punycode::DecodeDomainName (current_key), decoded_zone_name
+           DnsServerHelperFunctions::RRToRelativeName(
+               Punycode::DecodeDomainName (current_key), decoded_zone_name, 
current_type, "key"
            )
        );
        UI::ChangeWidget (`id ("add_record_type"), `Value, current_type);
        UI::ChangeWidget (`id ("add_record_val"), `Value,
-           ToRelativeName(
-               Punycode::DecodeDomainName (current_val), decoded_zone_name
+           DnsServerHelperFunctions::RRToRelativeName(
+               Punycode::DecodeDomainName (current_val), decoded_zone_name, 
current_type, "value"
            )
        );
 }
@@ -1252,11 +1238,17 @@
     list items = maplist (integer r, ret, {
        counter = counter + 1;
 
+       string record_type = current_zone["records", r, "type"]:"";
+
        return `item (
            `id (r),
-           ToRelativeName (decoded_names[counter]:current_zone["records", r, 
"key"]:"", decoded_zone_name),
-           current_zone["records", r, "type"]:"",
-           ToRelativeName 
(decoded_names[counter+const_plus]:current_zone["records", r, "value"]:"", 
decoded_zone_name)
+           DnsServerHelperFunctions::RRToRelativeName (
+               decoded_names[counter]:current_zone["records", r, "key"]:"", 
decoded_zone_name, record_type, "key"
+           ),
+           record_type,
+           DnsServerHelperFunctions::RRToRelativeName (
+               decoded_names[counter+const_plus]:current_zone["records", r, 
"value"]:"", decoded_zone_name, record_type, "value"
+           )
        );
     });
 
@@ -1561,6 +1553,21 @@
     return false;
 }
 
+// Transform a given key/value by adding the ending dot if
+// it ends with the current zone name
+string TransformRecord (string record) {
+    string zone_regexp = mergestring (
+       splitstring (current_zone["zone"]:"", "."),
+       "\\."
+    );
+
+    // key terminated with zone name without dot
+    if (regexpmatch (record, ".*\\." + zone_regexp + "$"))
+       record = record + ".";
+
+    return record;
+}
+
 boolean CheckAndModifyRecord (string & type, string & key, string & val) {
        // (SYNTAX) Checking the record by record-type (true or false)
        if (CheckNewZoneRecordSyntax ($[ "key" : key, "type" : type, "val" : 
val ]) != true) {
@@ -1601,11 +1608,15 @@
                        y2milestone("MX Priority decrased to maximal 65535 from 
%1", prio);
                    }
                }
-           } else if (contains (["ns", "mx", "cname"], tolower_type)) {
-               if (regexpmatch (val, "\\..*[^.]$"))
-                   val = val + ".";
-           } else if (regexpmatch (key, "\\..*[^.]$")) {
-               key = key + ".";
+           }
+
+           if (tolower_type == "cname") {
+               key = TransformRecord (key);
+               val = TransformRecord (val);
+           } else if (contains (["ns", "mx"], tolower_type)) {
+               val = TransformRecord (val);
+           } else if (tolower_type == "a") {
+               key = TransformRecord (key);
            }
        }
 
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.22.0/src/helps.ycp 
new/yast2-dns-server-2.22.1/src/helps.ycp
--- old/yast2-dns-server-2.22.0/src/helps.ycp   2011-11-16 11:54:54.000000000 
+0100
+++ new/yast2-dns-server-2.22.1/src/helps.ycp   2011-11-25 10:38:38.000000000 
+0100
@@ -5,7 +5,7 @@
  * Authors:    Jiri Srain <[email protected]>,
  *             Lukas Ocilka <[email protected]>
  *
- * $Id: helps.ycp 64704 2011-07-01 12:54:54Z locilka $
+ * $Id: helps.ycp 66820 2011-11-16 10:56:18Z jsuchome $
  */
 
 {
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.22.0/testsuite/tests/DnsServerHelperFunctions.out 
new/yast2-dns-server-2.22.1/testsuite/tests/DnsServerHelperFunctions.out
--- old/yast2-dns-server-2.22.0/testsuite/tests/DnsServerHelperFunctions.out    
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-dns-server-2.22.1/testsuite/tests/DnsServerHelperFunctions.out    
2012-02-20 11:02:10.000000000 +0100
@@ -0,0 +1,12 @@
+Dump   ==========================================================
+Return dhcp1
+Return relative-name-1
+Return relative-name-2
+Return dhcp1.subdomain
+Return dhcp1.different-example.com.
+Return v=spf1 include:example.com -all
+Return some-text
+Return v=spf1 include:example.com -all
+Return _http._tcp
+Return 0    5      80   example.com.
+Dump   ==========================================================
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.22.0/testsuite/tests/DnsServerHelperFunctions.ycp 
new/yast2-dns-server-2.22.1/testsuite/tests/DnsServerHelperFunctions.ycp
--- old/yast2-dns-server-2.22.0/testsuite/tests/DnsServerHelperFunctions.ycp    
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-dns-server-2.22.1/testsuite/tests/DnsServerHelperFunctions.ycp    
2012-02-20 11:02:10.000000000 +0100
@@ -0,0 +1,113 @@
+/**
+ * File:       DnsServerHelperFunctions.ycp
+ * Package:    Configuration of dns-server
+ * Summary:    Testsuite helper module
+ * Authors:    Lukas Ocilka <[email protected]>
+ * Copyright:  Copyright 2012, Novell, Inc.  All rights reserved.
+ *
+ * $Id$
+ *
+ * Testsuite for helper functions module
+ */
+
+{
+    include "testsuite.ycp";
+    // testedfiles: DnsServerHelperFunctions.ycp
+
+    map READ = $[];
+    map WRITE = $[];
+    map EXEC = $[];
+
+    TESTSUITE_INIT ([READ, WRITE, EXEC], nil);
+
+    import "DnsServerHelperFunctions";
+    import "Mode";
+
+    Mode::SetMode("test");
+
+    string zone = "example.com";
+
+    DUMP ("==========================================================");
+
+    // cuts the zone name off
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "dhcp1." + zone + ".",
+       zone,
+       "A",
+       "key"
+    )), [READ, WRITE, EXEC], nil);
+
+    // CNAME - key can be relative
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "relative-name-1." + zone + ".",
+       zone,
+       "cname",
+       "key"
+    )), [READ, WRITE, EXEC], nil);
+
+    // CNAME - value can be relative
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "relative-name-2." + zone + ".",
+       zone,
+       "cname",
+       "value"
+    )), [READ, WRITE, EXEC], nil);
+
+    // cuts the zone name off (leaves subdomain)
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "dhcp1.subdomain." + zone + ".",
+       zone,
+       "A",
+       "key"
+    )), [READ, WRITE, EXEC], nil);
+
+    // different zone name
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "dhcp1.different-" + zone + ".",
+       zone,
+       "A",
+       "key"
+    )), [READ, WRITE, EXEC], nil);
+
+    // TXT record (value), not changed
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "v=spf1 include:" + zone + " -all",
+       zone,
+       "TXT",
+       "value"
+    )), [READ, WRITE, EXEC], nil);
+
+    // TXT record (key), can be realtive
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "some-text." + zone + ".",
+       zone,
+       "TXT",
+       "key"
+    )), [READ, WRITE, EXEC], nil);
+
+    // SPF record (value), not changed
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "v=spf1 include:" + zone + " -all",
+       zone,
+       "SPF",
+       "value"
+    )), [READ, WRITE, EXEC], nil);
+
+    // SRV record (key) can be realtive
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "_http._tcp." + zone + ".",
+       zone,
+       "SRV",
+       "key"
+    )), [READ, WRITE, EXEC], nil);
+
+    // SRV record (value) can't be realtive
+    TEST (``(DnsServerHelperFunctions::RRToRelativeName (
+       "0    5      80   " + zone + ".",
+       zone,
+       "SRV",
+       "value"
+    )), [READ, WRITE, EXEC], nil);
+
+    DUMP ("==========================================================");
+}

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to