Hello community,

here is the log from the commit of package yast2-dns-server for 
openSUSE:Factory checked in at 2014-12-10 23:45:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-dns-server (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-dns-server.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-dns-server"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-dns-server/yast2-dns-server.changes        
2014-12-05 21:04:02.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-dns-server.new/yast2-dns-server.changes   
2014-12-10 23:44:57.000000000 +0100
@@ -2 +2,32 @@
-Thu Dec  4 09:50:05 UTC 2014 - [email protected]
+Tue Dec  9 16:35:24 CET 2014 - [email protected]
+
+- Fixed handling of zones (bnc#898659)
+  - Checking for system zones was moved to separate function
+  - Extended list of zones marked as system (internal) ones with
+    (0\.)+ip6.arpa
+  - Not allowing to edit system zones (belong to bind package)
+  - Added check for 'bind' package to be installed before writing
+    the configuration
+  - Marking all imported zones as 'modified' to be written later
+  - Marking all imported non-system zones as 'is_new' to create
+    a zone file for them
+  - Flushing /etc/named.conf cache 'after' writing zones (instead
+    of 'before')
+  - Using "" as the default NETCONFIG_DNS_POLICY (instead of 0)
+  - Do not write system zones to LDAP (bnc#746401)
+  - If systems zones are marked as modified, they are written to
+    named configuration (if LDAP is not in use)
+- 3.1.10
+
+-------------------------------------------------------------------
+Fri Dec  5 16:44:27 CET 2014 - [email protected]
+
+- Fixed Import() and Write() in AutoYast (bnc#898659)
+  - Imported zones were not written to the system as they were not
+    marked as 'modified'
+  - Directory /etc/named.d/ was used even if it didn't exist
+  - The whole named.conf was rewritten from scratch as Yast thought
+    that something has changed that file while Yast was running
+- 3.1.9
+
+-------------------------------------------------------------------
@@ -4,0 +36 @@
+- 3.1.8

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

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

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

Other differences:
------------------
++++++ yast2-dns-server.spec ++++++
--- /var/tmp/diff_new_pack.sj0YeD/_old  2014-12-10 23:44:58.000000000 +0100
+++ /var/tmp/diff_new_pack.sj0YeD/_new  2014-12-10 23:44:58.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-dns-server
-Version:        3.1.8
+Version:        3.1.10
 Release:        0
 Url:            https://github.com/yast/yast-dns-server
 

++++++ yast2-dns-server-3.1.8.tar.bz2 -> yast2-dns-server-3.1.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/package/yast2-dns-server.changes 
new/yast2-dns-server-3.1.10/package/yast2-dns-server.changes
--- old/yast2-dns-server-3.1.8/package/yast2-dns-server.changes 2014-12-04 
10:56:53.000000000 +0100
+++ new/yast2-dns-server-3.1.10/package/yast2-dns-server.changes        
2014-12-10 11:46:10.000000000 +0100
@@ -1,7 +1,39 @@
 -------------------------------------------------------------------
-Thu Dec  4 09:50:05 UTC 2014 - [email protected]
+Tue Dec  9 16:35:24 CET 2014 - [email protected]
+
+- Fixed handling of zones (bnc#898659)
+  - Checking for system zones was moved to separate function
+  - Extended list of zones marked as system (internal) ones with
+    (0\.)+ip6.arpa
+  - Not allowing to edit system zones (belong to bind package)
+  - Added check for 'bind' package to be installed before writing
+    the configuration
+  - Marking all imported zones as 'modified' to be written later
+  - Marking all imported non-system zones as 'is_new' to create
+    a zone file for them
+  - Flushing /etc/named.conf cache 'after' writing zones (instead
+    of 'before')
+  - Using "" as the default NETCONFIG_DNS_POLICY (instead of 0)
+  - Do not write system zones to LDAP (bnc#746401)
+  - If systems zones are marked as modified, they are written to
+    named configuration (if LDAP is not in use)
+- 3.1.10
+
+-------------------------------------------------------------------
+Fri Dec  5 16:44:27 CET 2014 - [email protected]
+
+- Fixed Import() and Write() in AutoYast (bnc#898659)
+  - Imported zones were not written to the system as they were not
+    marked as 'modified'
+  - Directory /etc/named.d/ was used even if it didn't exist
+  - The whole named.conf was rewritten from scratch as Yast thought
+    that something has changed that file while Yast was running
+- 3.1.9
+
+-------------------------------------------------------------------
 
 - remove X-KDE-Library from desktop file (bnc#899104)
+- 3.1.8
 
 -------------------------------------------------------------------
 Thu Sep  4 12:20:11 UTC 2014 - [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-dns-server-3.1.8/package/yast2-dns-server.spec 
new/yast2-dns-server-3.1.10/package/yast2-dns-server.spec
--- old/yast2-dns-server-3.1.8/package/yast2-dns-server.spec    2014-12-04 
10:56:53.000000000 +0100
+++ new/yast2-dns-server-3.1.10/package/yast2-dns-server.spec   2014-12-10 
11:46:10.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-dns-server
-Version:        3.1.8
+Version:        3.1.10
 Release:        0
 Url:            https://github.com/yast/yast-dns-server
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/src/clients/dns-server_auto.rb 
new/yast2-dns-server-3.1.10/src/clients/dns-server_auto.rb
--- old/yast2-dns-server-3.1.8/src/clients/dns-server_auto.rb   2014-12-04 
10:56:53.000000000 +0100
+++ new/yast2-dns-server-3.1.10/src/clients/dns-server_auto.rb  2014-12-10 
11:46:10.000000000 +0100
@@ -46,8 +46,7 @@
 
       # Create a summary
       if @func == "Summary"
-        @ret_list = DnsServer.Summary
-        @ret = Ops.get_string(@ret_list, 0, "")
+        @ret = DnsServer.Summary.join("<br>\n")
       # Reset configuration
       elsif @func == "Reset"
         DnsServer.Import({})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-dns-server-3.1.8/src/modules/DnsServer.pm 
new/yast2-dns-server-3.1.10/src/modules/DnsServer.pm
--- old/yast2-dns-server-3.1.8/src/modules/DnsServer.pm 2014-12-04 
10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/src/modules/DnsServer.pm        2014-12-10 
11:46:10.000000000 +0100
@@ -34,6 +34,7 @@
 YaST::YCP::Import ("Hostname");
 YaST::YCP::Import ("FileUtils");
 YaST::YCP::Import ("DnsServerHelperFunctions");
+YaST::YCP::Import ("String");
 
 use DnsZones;
 use DnsTsigKeys;
@@ -52,7 +53,9 @@
 
 my %reverse_zones_connections_data = ();
 
-my $forwarders_include = '/etc/named.d/forwarders.conf';
+my $includes_dir = '/etc/named.d/';
+
+my $forwarders_include = $includes_dir.'forwarders.conf';
 
 my $data_file = Directory->vardir."/dns_server";
 
@@ -69,7 +72,7 @@
 
 #my $modify_resolv_conf_dynamically = 0;
 
-my $netconfig_dns_policy = 0;
+my $netconfig_dns_policy = "";
 
 my @acl = ();
 
@@ -108,6 +111,21 @@
     $found;
 }
 
+# System zones are not allowed to be edited in YaST DNS Server
+#
+# @param [String] zone name
+# @return [Boolean] whether zone is a system one (included in bind package)
+sub is_system_zone {
+    my $zone_name = shift;
+
+    return (
+        $zone_name eq "localhost" ||
+        $zone_name eq "0.0.127.in-addr.arpa" ||
+        $zone_name =~ /^(0\.)+ip6.arpa$/ ||
+        $zone_name eq "."
+    );
+}
+
 ##------------------------------------
 # Routines for reading/writing configuration
 
@@ -123,9 +141,10 @@
        return 0;
     }
 
-    if ($zone_name eq "localhost" || $zone_name eq "0.0.127.in-addr.arpa")
+    # Do not write system zones to LDAP (bnc#746401)
+    if ($use_ldap && is_system_zone($zone_name))
     {
-       y2milestone ("Skipping system zone $zone_name");
+       y2milestone ("Using LDAP, skipping system zone $zone_name");
        return 1;
     }
 
@@ -387,16 +406,23 @@
     my @del_zones = grep {
        ! $self->contains (\@current_zones, $_);
     } @old_zones;
+
+    # Do not remove system zones
     @del_zones = grep {
-       $_ ne "zone \".\" in" && $_ ne "zone \"localhost\" in"
-           && $_ ne "zone \"0.0.127.in-addr.arpa\" in"
+        $_ =~ /^zone[ \t]+\"([^ \t]+)\".*/;
+        my $zone = $1;
+        !is_system_zone($zone)
     } @del_zones;
-    y2milestone ("Deleting zones @del_zones");
-    foreach my $z (@del_zones) {
-       $z =~ /^zone[ \t]+\"([^ \t]+)\".*/;
-       $z = $1;
-       $z = "zone \"$z\" in";
-       SCR->Write (".dns.named.section.\"\Q$z\E\"", undef);
+
+    if (@del_zones > 0) {
+        y2milestone ("Deleting zones @del_zones");
+        foreach my $z (@del_zones) {
+            $z =~ /^zone[ \t]+\"([^ \t]+)\".*/;
+            $z = $1;
+            y2milestone("Deleting zone: ".$z);
+            $z = "zone \"$z\" in";
+            SCR->Write (".dns.named.section.\"\Q$z\E\"", undef);
+        }
     }
 
     if ($use_ldap)
@@ -1187,9 +1213,16 @@
        }
        \%zd;
     } @zone_headers;
+
     @zones = grep {
        scalar (keys (%{$_})) > 0
     } @zones;
+
+    # System zones cannot be edited in Yast
+    @zones = grep {
+        ! is_system_zone($_->{"zone"})
+    } @zones;
+
     $modified = 0;
 
     Progress->NextStage ();
@@ -1263,6 +1296,35 @@
     $self->write_local_forwarder();
 }
 
+# Server package should be installed already, but we have to check, e.g.,
+# when applying configuration in AutoYast config module
+sub check_and_install_package {
+    my $self = shift;
+    return 1 if (PackageSystem->Installed("bind"));
+
+    my $installed = 0;
+
+    # Try to install the required package
+    if (Mode->autoinst()) {
+        # Non-interactively, as we can't ask user in this case
+        $installed = PackageSystem->CheckAndInstallPackages(["bind"]);
+    } else {
+        # Package cannot be installed in some modes, changing the mode 
temporarily
+        my $previous_mode = Mode->mode();
+        Mode->SetMode("normal");
+        $installed = 
PackageSystem->CheckAndInstallPackagesInteractive(["bind"]);
+
+        # Reread the configuration stat if it has changed
+        $configuration_timestamp = $self->GetConfigurationStat() if $installed;
+        Mode->SetMode($previous_mode);
+    }
+
+    return 1 if $installed;
+
+    y2error("Server package cannot be installed, cannot write configuration");
+    return 0;
+}
+
 BEGIN { $TYPEINFO{Write} = ["function", "boolean"]; }
 sub Write {
     my $self = shift;
@@ -1309,6 +1371,8 @@
 
     Progress->NextStage ();
 
+    return 0 unless $self->check_and_install_package();
+
     my $ok = 1;
 
     foreach my $z (@zones) {
@@ -1338,6 +1402,9 @@
        }
     }
 
+    # Make sure the includes dir really exists
+    SCR->Execute(".target.bash", "mkdir -pv 
'".String->Quote($includes_dir)."'");
+
     foreach my $z (@zones) {
 
        if (defined $z->{"connected_with"} && $z->{"connected_with"} ne "") {
@@ -1391,18 +1458,10 @@
     #ensure that if there is an include file, named.conf.include gets recreated
     $ok = $self->EnsureNamedConfIncludeIsRecreated () && $ok;
 
-    #be sure the named.conf file is saved
-    SCR->Write (".dns.named", undef);
-    
     #set daemon starting
     SCR->Write (".sysconfig.named.NAMED_RUN_CHROOTED", $chroot ? "yes" : "no");
     SCR->Write (".sysconfig.named", undef);
 
-#    SCR->Write (".sysconfig.network.config.MODIFY_NAMED_CONF_DYNAMICALLY",
-#      $modify_named_conf_dynamically ? "yes" : "no");
-#    SCR->Write (".sysconfig.network.config.MODIFY_RESOLV_CONF_DYNAMICALLY",
-#      $modify_resolv_conf_dynamically ? "yes" : "no");
-
     # Store the NETCONFIG_DNS_POLICY 
     # Note: NETCONFIG_DNS_STATIC_SERVERS is stored in SaveGlobals();
     SCR->Write (".sysconfig.network.config.NETCONFIG_DNS_POLICY", 
$netconfig_dns_policy);
@@ -1420,6 +1479,10 @@
        $ok = $self->ZoneWrite ($z) && $ok;
     }
 
+    # Flush the cache after writing zones, but before re/starting service
+    # (otherwise new zones aren't written before closing Yast)
+    SCR->Write (".dns.named", undef);
+
     my $ret = 1;
     if (scalar (@zones_update_actions) > 0)
     {
@@ -1472,7 +1535,7 @@
        if (! $success)
        {
            # Cannot start service 'named', because of error that follows 
Error:.  Do not translate named.
-           Report->Error (__("Error occurred while starting service 
named.\n\n".Service->FullInfo("named")));
+           Report->Error (__("Error occurred while starting service 
named.\n\n"));
            $ok = 0;
            # There's no 'named' running -> prevent from blocking DNS queries
            $self->SetLocalForwarder("resolver") if GetLocalForwarder() eq 
"bind";
@@ -1547,11 +1610,24 @@
     my $self = shift;
     my %settings = %{+shift};
 
+    # Cache the timestamp as done in Read() otherwise the named.conf
+    # is re-created from scratch in Write() as is pretends to be changed
+    # while Yast was running.
+    $configuration_timestamp = $self->GetConfigurationStat();
+
     $start_service = $settings{"start_service"} || 0;
     $chroot = $settings{"chroot"} || 1;
     $use_ldap = $settings{"use_ldap"} || 0;
     @allowed_interfaces = @{$settings{"allowed_interfaces"} || []};
-    @zones = @{$settings{"zones"} || []}; 
+
+    @zones = @{$settings{"zones"} || []};
+    for my $zone (@zones) {
+      $zone->{"modified"} = 1;
+      # Local zones are already part of the 'bind' package
+      $zone->{"is_new"} = 1 unless is_system_zone($zone->{"zone"});
+      y2milestone("Imported zone: ".$zone->{"zone"});
+    }
+
     @options = @{$settings{"options"} || []};
     @logging = @{$settings{"logging"} || []};
 
@@ -1604,8 +1680,7 @@
     }
 
     my @zones_descr = map {
-       my $zone_ref = $_;
-       my %zone_map = %{$zone_ref};    
+       my %zone_map = %{$_};
        my $zone_name = $zone_map{"zone"} || "";
        my $zone_type = $zone_map{"type"} || "";
        $zone_type = $zone_types{$zone_type} || $zone_type;
@@ -1627,7 +1702,7 @@
        $_ ne "";
     } @zones_descr;
 
-    my $zones_list = join (", ", @zones_descr);
+    my $zones_list = join (",<br>\n", @zones_descr);
     #  summary string, %s is list of DNS zones (their names), coma separated
     push (@ret, sprintf (__("Configured Zones: %s"), $zones_list));
     return \@ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-dns-server-3.1.8/testsuite/tests/Read.out 
new/yast2-dns-server-3.1.10/testsuite/tests/Read.out
--- old/yast2-dns-server-3.1.8/testsuite/tests/Read.out 2014-12-04 
10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/Read.out        2014-12-10 
11:46:10.000000000 +0100
@@ -4,21 +4,21 @@
 Read   .sysconfig.named.NAMED_RUN_CHROOTED 0
 Read   .sysconfig.network.config.NETCONFIG_DNS_POLICY "STATIC"
 Read   .sysconfig.network.config.NETCONFIG_DNS_FORWARDER 0
-Dir    .dns.named.section: ["options", "zone \"localhost\" in"]
+Dir    .dns.named.section: ["options", "zone \"example.org\" in"]
 Dir    .dns.named.value.options: ["directory", "notify"]
 Read   .dns.named.value.options.directory ["\"/var/lib/named\""]
 Read   .dns.named.value.options.notify ["no"]
 Read   .sysconfig.network.config.NETCONFIG_DNS_STATIC_SERVERS ""
-Dir    .dns.named.section: ["options", "zone \"localhost\" in"]
+Dir    .dns.named.section: ["options", "zone \"example.org\" in"]
 Read   .dns.named.value.acl []
 Read   .sysconfig.named.NAMED_CONF_INCLUDE_FILES 0
 Read   .target.ycp "/var/lib/YaST2/yast2-dns-server_reverse-zones" $[]
-Read   .dns.named.value."zone \"localhost\" in".type ["master"]
-Read   .dns.named.value."zone \"localhost\" in".file ["\"localhost.zone\""]
-Read   .dns.zone "/var/lib/named/localhost.zone" $["TTL":"1W", 
"records":[$["key":"", "type":"NS", "value":"@"], $["key":"", "type":"A", 
"value":"127.0.0.1"], $["key":"localhost2", "type":"A", "value":"127.0.0.2"]], 
"soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", 
"retry":"4H", "serial":42, "server":"@", "zone":"@"]]
-Dir    .dns.named.value."zone \"localhost\" in": ["file", "type"]
-Read   .dns.named.value."zone \"localhost\" in"."file" ["\"localhost.zone\""]
-Read   .dns.named.value."zone \"localhost\" in"."type" ["master"]
+Read   .dns.named.value."zone \"example.org\" in".type ["master"]
+Read   .dns.named.value."zone \"example.org\" in".file 
["\"master/example.org\""]
+Read   .dns.zone "/var/lib/named/master/example.org" $["TTL":"1W", 
"records":[$["key":"", "type":"NS", "value":"@"], $["key":"", "type":"A", 
"value":"10.0.0.1"], $["key":"server_name", "type":"A", "value":"10.0.0.2"]], 
"soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", 
"retry":"4H", "serial":42, "server":"@", "zone":"@"]]
+Dir    .dns.named.value."zone \"example.org\" in": ["file", "type"]
+Read   .dns.named.value."zone \"example.org\" in"."file" 
["\"master/example.org\""]
+Read   .dns.named.value."zone \"example.org\" in"."type" ["master"]
 Return true
 Dump   =======================
-Return $["allowed_interfaces":[], "chroot":"1", "logging":[], 
"options":[$["key":"directory", "value":"\"/var/lib/named\""], 
$["key":"notify", "value":"no"], $["key":"forwarders", "value":""]], 
"start_service":"0", "use_ldap":"0", "zones":[$["file":"localhost.zone", 
"options":[$["key":"file", "value":"\"localhost.zone\""], $["key":"type", 
"value":"master"]], "records":[$["key":"localhost.", "type":"NS", "value":"@"], 
$["key":"localhost.", "type":"A", "value":"127.0.0.1"], $["key":"localhost2", 
"type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", 
"minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", 
"zone":"@"], "this_zone_had_NS_record_at_start":"1", "ttl":"1W", 
"type":"master", "zone":"localhost"]]]
+Return $["allowed_interfaces":[], "chroot":"1", "logging":[], 
"options":[$["key":"directory", "value":"\"/var/lib/named\""], 
$["key":"notify", "value":"no"], $["key":"forwarders", "value":""]], 
"start_service":"0", "use_ldap":"0", "zones":[$["file":"master/example.org", 
"options":[$["key":"file", "value":"\"master/example.org\""], $["key":"type", 
"value":"master"]], "records":[$["key":"example.org.", "type":"NS", 
"value":"@"], $["key":"example.org.", "type":"A", "value":"10.0.0.1"], 
$["key":"server_name", "type":"A", "value":"10.0.0.2"]], "soa":$["expiry":"6W", 
"mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", 
"server":"@", "zone":"@"], "this_zone_had_NS_record_at_start":"1", "ttl":"1W", 
"type":"master", "zone":"example.org"]]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-dns-server-3.1.8/testsuite/tests/Read.rb 
new/yast2-dns-server-3.1.10/testsuite/tests/Read.rb
--- old/yast2-dns-server-3.1.8/testsuite/tests/Read.rb  2014-12-04 
10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/Read.rb 2014-12-10 
11:46:10.000000000 +0100
@@ -178,15 +178,15 @@
         },
         "dns"       => {
           "named" => {
-            "section" => { "options" => "", "zone \"localhost\" in" => "" },
+            "section" => { "options" => "", "zone \"example.org\" in" => "" },
             "value"   => {
               "options"               => {
                 "directory" => ["\"/var/lib/named\""],
                 "notify"    => ["no"]
               },
-              "zone \"localhost\" in" => {
+              "zone \"example.org\" in" => {
                 "type" => ["master"],
-                "file" => ["\"localhost.zone\""]
+                "file" => ["\"master/example.org\""]
               },
               "acl"                   => []
             }
@@ -195,8 +195,8 @@
             "TTL"     => "1W",
             "records" => [
               { "key" => "", "type" => "NS", "value" => "@" },
-              { "key" => "", "type" => "A", "value" => "127.0.0.1" },
-              { "key" => "localhost2", "type" => "A", "value" => "127.0.0.2" }
+              { "key" => "", "type" => "A", "value" => "10.0.0.1" },
+              { "key" => "server_name", "type" => "A", "value" => "10.0.0.2" }
             ],
             "soa"     => {
               "expiry"  => "6W",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-dns-server-3.1.8/testsuite/tests/Write.out 
new/yast2-dns-server-3.1.10/testsuite/tests/Write.out
--- old/yast2-dns-server-3.1.8/testsuite/tests/Write.out        2014-12-04 
10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/Write.out       2014-12-10 
11:46:10.000000000 +0100
@@ -1,10 +1,10 @@
 Dump   =======================
+Execute        .target.bash_output "stat --format='rights: %a, blocks: %b, 
size: %s, owner: %u:%g changed: %Z, modifyied: %Y' /etc/named.conf" $["exit":0, 
"stderr":"", "stdout":"20030806"]
 Return true
 Dump   =======================
+Execute        .target.bash "mkdir -pv '/etc/named.d/'" 0
 Write  .target.ycp "/var/lib/YaST2/yast2-dns-server_reverse-zones" $[] true
 Execute        .target.bash_output "stat --format='rights: %a, blocks: %b, 
size: %s, owner: %u:%g changed: %Z, modifyied: %Y' /etc/named.conf" $["exit":0, 
"stderr":"", "stdout":"20030806"]
-Execute        .target.bash_output "mv --force /etc/named.conf 
/etc/named.conf.yast2-save" $["exit":0, "stderr":"", "stdout":"20030806"]
-Execute        .target.bash "touch /etc/named.conf" 0
 Write  .dns.named.value.acl [] true
 Dir    .dns.named.section: ["options", "zone \"localhost\" in"]
 Dir    .dns.named.value.options: ["directory", "notify", "xxx"]
@@ -22,19 +22,20 @@
 Read   .sysconfig.named.NAMED_INITIALIZE_SCRIPTS 0
 Write  .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "createNamedConfInclude" true
 Write  .sysconfig.named nil true
-Write  .dns.named nil true
 Write  .sysconfig.named.NAMED_RUN_CHROOTED "yes" true
 Write  .sysconfig.named nil true
-Write  .sysconfig.network.config.NETCONFIG_DNS_POLICY "0" true
+Write  .sysconfig.network.config.NETCONFIG_DNS_POLICY "" true
 Read   .sysconfig.named.NAMED_INITIALIZE_SCRIPTS 0
 Write  .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "" true
 Write  .sysconfig.named nil true
+Read   .target.size "/var/lib/named/master/example.com" 0
 Write  .dns.named.value."zone \"example.com\" in".type ["master"] true
 Dir    .dns.named.value."zone \"example.com\" in": []
 Execute        .target.bash_output "/bin/hostname --fqdn" $["exit":0, 
"stderr":"", "stdout":"20030806"]
-Write  .dns.zone ["/var/lib/named/example.com", $["TTL":"1W", 
"records":[$["key":"localhost", "type":"A", "value":"127.0.0.1"], 
$["key":"localhost", "type":"NS", "value":"127.0.0.1"], $["key":"localhost2", 
"type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", 
"minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", 
"zone":"@"]]] true
-Write  .dns.named.value."zone \"example.com\" in".file ["\"example.com\""] true
+Write  .dns.zone ["/var/lib/named/master/example.com", $["TTL":"1W", 
"records":[$["key":"localhost", "type":"A", "value":"127.0.0.1"], 
$["key":"localhost", "type":"NS", "value":"127.0.0.1"], $["key":"localhost2", 
"type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", 
"minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", 
"zone":"@"]]] true
+Write  .dns.named.value."zone \"example.com\" in".file 
["\"master/example.com\""] true
 Write  .dns.named.value."zone \"example.com\" in".type ["master"] true
+Write  .dns.named nil true
 Write  .sysconfig.network.config.NETCONFIG_DNS_FORWARDER "bind" true
 Write  .sysconfig.network.config nil true
 Execute        .target.bash_output "/sbin/netconfig update -m dns" $["exit":0, 
"stderr":"", "stdout":"20030806"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-dns-server-3.1.8/testsuite/tests/Write.rb 
new/yast2-dns-server-3.1.10/testsuite/tests/Write.rb
--- old/yast2-dns-server-3.1.8/testsuite/tests/Write.rb 2014-12-04 
10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/Write.rb        2014-12-10 
11:46:10.000000000 +0100
@@ -98,7 +98,12 @@
         }
       }
       @I_WRITE = {}
-      @I_EXEC = {}
+      @I_EXEC = {
+        "target" => {
+          "bash_output" => { "exit" => 0, "stdout" => "20030806", "stderr"=>"" 
},
+          "bash" => 0,
+        }
+      }
 
       TESTSUITE_INIT([@I_READ, @I_WRITE, @I_EXEC], nil)
 
@@ -255,7 +260,10 @@
       }
       @WRITE = {}
       @EXEC = {
-        "target" => { "bash_output" => { "exit" => 0, "stdout" => "20030806", 
"stderr"=>"" } }
+        "target" => {
+          "bash_output" => { "exit" => 0, "stdout" => "20030806", "stderr"=>"" 
},
+          "bash" => 0,
+        }
       }
 
       DUMP("=======================")
@@ -270,7 +278,7 @@
             "start_service" => false,
             "zones"         => [
               {
-                "file"     => "example.com",
+                "file"     => "master/example.com",
                 "records"  => [
                   {
                     "key"   => "localhost",
@@ -306,7 +314,7 @@
             ]
           }
         )
-      end, [], 0)
+      end, [@READ, @WRITE, @EXEC], 0)
       DUMP("=======================")
       TEST(lambda { DnsServer.Write }, [@READ, @WRITE, @EXEC], 0)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/testsuite/tests/YaPIReadGlobalOptions.rb 
new/yast2-dns-server-3.1.10/testsuite/tests/YaPIReadGlobalOptions.rb
--- old/yast2-dns-server-3.1.8/testsuite/tests/YaPIReadGlobalOptions.rb 
2014-12-04 10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/YaPIReadGlobalOptions.rb        
2014-12-10 11:46:10.000000000 +0100
@@ -264,7 +264,8 @@
       @WRITE = {}
       @EXEC = {
         "target" => {
-          "bash_output" => { "exit" => 1, "stdout" => "", "stderr" => "" }
+          "bash_output" => { "exit" => 1, "stdout" => "", "stderr" => "" },
+          "bash" => 0
         },
         "passwd" => { "init" => true }
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/testsuite/tests/YaPIReadZones.out 
new/yast2-dns-server-3.1.10/testsuite/tests/YaPIReadZones.out
--- old/yast2-dns-server-3.1.8/testsuite/tests/YaPIReadZones.out        
2014-12-04 10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/YaPIReadZones.out       
2014-12-10 11:46:10.000000000 +0100
@@ -4,20 +4,20 @@
 Read   .sysconfig.named.NAMED_RUN_CHROOTED nil
 Read   .sysconfig.network.config.NETCONFIG_DNS_POLICY "auto"
 Read   .sysconfig.network.config.NETCONFIG_DNS_FORWARDER "resolver"
-Dir    .dns.named.section: ["options", "zone \"localhost\" in"]
+Dir    .dns.named.section: ["options", "zone \"example.org\" in"]
 Dir    .dns.named.value.options: ["directory", "notify"]
 Read   .dns.named.value.options.directory ["\"/var/lib/named\""]
 Read   .dns.named.value.options.notify ["no"]
 Read   .sysconfig.network.config.NETCONFIG_DNS_STATIC_SERVERS ""
-Dir    .dns.named.section: ["options", "zone \"localhost\" in"]
+Dir    .dns.named.section: ["options", "zone \"example.org\" in"]
 Read   .dns.named.value.acl []
 Read   .sysconfig.named.NAMED_CONF_INCLUDE_FILES nil
 Read   .target.ycp "/var/lib/YaST2/yast2-dns-server_reverse-zones" $[]
-Read   .dns.named.value."zone \"localhost\" in".type ["master"]
-Read   .dns.named.value."zone \"localhost\" in".file ["\"localhost.zone\""]
-Read   .dns.zone "/var/lib/named/localhost.zone" $["TTL":"1W", 
"records":[$["key":"", "type":"NS", "value":"@"], $["key":"", "type":"A", 
"value":"127.0.0.1"], $["key":"localhost2", "type":"A", "value":"127.0.0.2"]], 
"soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", 
"retry":"4H", "serial":42, "server":"@", "zone":"@"]]
-Dir    .dns.named.value."zone \"localhost\" in": ["file", "type"]
-Read   .dns.named.value."zone \"localhost\" in"."file" ["\"localhost.zone\""]
-Read   .dns.named.value."zone \"localhost\" in"."type" ["master"]
-Return [$["file":"localhost.zone", "options":[$["key":"file", 
"value":"\"localhost.zone\""], $["key":"type", "value":"master"]], 
"records":[$["key":"localhost.", "type":"NS", "value":"@"], 
$["key":"localhost.", "type":"A", "value":"127.0.0.1"], $["key":"localhost2", 
"type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", 
"minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", 
"zone":"@"], "this_zone_had_NS_record_at_start":"1", "ttl":"1W", 
"type":"master", "zone":"localhost"]]
+Read   .dns.named.value."zone \"example.org\" in".type ["master"]
+Read   .dns.named.value."zone \"example.org\" in".file 
["\"/master/example.org\""]
+Read   .dns.zone "/var/lib/named//master/example.org" $["TTL":"1W", 
"records":[$["key":"", "type":"NS", "value":"@"], $["key":"", "type":"A", 
"value":"10.0.0.1"], $["key":"server2", "type":"A", "value":"10.0.0.2"]], 
"soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", 
"retry":"4H", "serial":42, "server":"@", "zone":"@"]]
+Dir    .dns.named.value."zone \"example.org\" in": ["file", "type"]
+Read   .dns.named.value."zone \"example.org\" in"."file" 
["\"/master/example.org\""]
+Read   .dns.named.value."zone \"example.org\" in"."type" ["master"]
+Return [$["file":"/master/example.org", "options":[$["key":"file", 
"value":"\"/master/example.org\""], $["key":"type", "value":"master"]], 
"records":[$["key":"example.org.", "type":"NS", "value":"@"], 
$["key":"example.org.", "type":"A", "value":"10.0.0.1"], $["key":"server2", 
"type":"A", "value":"10.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", 
"minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", 
"zone":"@"], "this_zone_had_NS_record_at_start":"1", "ttl":"1W", 
"type":"master", "zone":"example.org"]]
 Dump   ==========================================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/testsuite/tests/YaPIReadZones.rb 
new/yast2-dns-server-3.1.10/testsuite/tests/YaPIReadZones.rb
--- old/yast2-dns-server-3.1.8/testsuite/tests/YaPIReadZones.rb 2014-12-04 
10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/YaPIReadZones.rb        
2014-12-10 11:46:10.000000000 +0100
@@ -166,15 +166,15 @@
         },
         "dns"       => {
           "named" => {
-            "section" => { "options" => "", "zone \"localhost\" in" => "" },
+            "section" => { "options" => "", "zone \"example.org\" in" => "" },
             "value"   => {
               "options"               => {
                 "directory" => ["\"/var/lib/named\""],
                 "notify"    => ["no"]
               },
-              "zone \"localhost\" in" => {
+              "zone \"example.org\" in" => {
                 "type" => ["master"],
-                "file" => ["\"localhost.zone\""]
+                "file" => ["\"/master/example.org\""]
               },
               "acl"                   => []
             }
@@ -183,8 +183,8 @@
             "TTL"     => "1W",
             "records" => [
               { "key" => "", "type" => "NS", "value" => "@" },
-              { "key" => "", "type" => "A", "value" => "127.0.0.1" },
-              { "key" => "localhost2", "type" => "A", "value" => "127.0.0.2" }
+              { "key" => "", "type" => "A", "value" => "10.0.0.1" },
+              { "key" => "server2", "type" => "A", "value" => "10.0.0.2" }
             ],
             "soa"     => {
               "expiry"  => "6W",
@@ -263,7 +263,8 @@
       @WRITE = {}
       @EXEC = {
         "target" => {
-          "bash_output" => { "exit" => 1, "stdout" => "", "stderr" => "" }
+          "bash_output" => { "exit" => 1, "stdout" => "", "stderr" => "" },
+          "bash" => 0,
         },
         "passwd" => { "init" => true }
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/testsuite/tests/YaPIWriteGlobalOptions.out 
new/yast2-dns-server-3.1.10/testsuite/tests/YaPIWriteGlobalOptions.out
--- old/yast2-dns-server-3.1.8/testsuite/tests/YaPIWriteGlobalOptions.out       
2014-12-04 10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/YaPIWriteGlobalOptions.out      
2014-12-10 11:46:10.000000000 +0100
@@ -19,6 +19,7 @@
 Dir    .dns.named.value."zone \"localhost\" in": ["file", "type"]
 Read   .dns.named.value."zone \"localhost\" in"."file" ["\"localhost.zone\""]
 Read   .dns.named.value."zone \"localhost\" in"."type" ["master"]
+Execute        .target.bash "mkdir -pv '/etc/named.d/'" 0
 Write  .target.ycp "/var/lib/YaST2/yast2-dns-server_reverse-zones" $[] true
 Execute        .target.bash_output "stat --format='rights: %a, blocks: %b, 
size: %s, owner: %u:%g changed: %Z, modifyied: %Y' /etc/named.conf" $["exit":1, 
"stderr":"", "stdout":""]
 Write  .dns.named.value.acl [] true
@@ -39,13 +40,13 @@
 Read   .sysconfig.named.NAMED_INITIALIZE_SCRIPTS nil
 Write  .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "createNamedConfInclude" true
 Write  .sysconfig.named nil true
-Write  .dns.named nil true
 Write  .sysconfig.named.NAMED_RUN_CHROOTED "yes" true
 Write  .sysconfig.named nil true
 Write  .sysconfig.network.config.NETCONFIG_DNS_POLICY "auto" true
 Read   .sysconfig.named.NAMED_INITIALIZE_SCRIPTS nil
 Write  .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "" true
 Write  .sysconfig.named nil true
+Write  .dns.named nil true
 Write  .sysconfig.network.config.NETCONFIG_DNS_FORWARDER "bind" true
 Write  .sysconfig.network.config nil true
 Execute        .target.bash_output "/sbin/netconfig update -m dns" $["exit":1, 
"stderr":"", "stdout":""]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/testsuite/tests/YaPIWriteGlobalOptions.rb 
new/yast2-dns-server-3.1.10/testsuite/tests/YaPIWriteGlobalOptions.rb
--- old/yast2-dns-server-3.1.8/testsuite/tests/YaPIWriteGlobalOptions.rb        
2014-12-04 10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/YaPIWriteGlobalOptions.rb       
2014-12-10 11:46:10.000000000 +0100
@@ -241,7 +241,7 @@
       @EXEC = {
         "target" => {
           "bash_output" => { "exit" => 1, "stdout" => "", "stderr" => "" },
-          "bash"        => 1
+          "bash"        => 0
         },
         "passwd" => { "init" => true }
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/testsuite/tests/YaPIWriteZones.out 
new/yast2-dns-server-3.1.10/testsuite/tests/YaPIWriteZones.out
--- old/yast2-dns-server-3.1.8/testsuite/tests/YaPIWriteZones.out       
2014-12-04 10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/YaPIWriteZones.out      
2014-12-10 11:46:10.000000000 +0100
@@ -19,6 +19,7 @@
 Dir    .dns.named.value."zone \"localhost\" in": ["file", "type"]
 Read   .dns.named.value."zone \"localhost\" in"."file" ["\"localhost.zone\""]
 Read   .dns.named.value."zone \"localhost\" in"."type" ["master"]
+Execute        .target.bash "mkdir -pv '/etc/named.d/'" 0
 Write  .target.ycp "/var/lib/YaST2/yast2-dns-server_reverse-zones" $[] true
 Execute        .target.bash_output "stat --format='rights: %a, blocks: %b, 
size: %s, owner: %u:%g changed: %Z, modifyied: %Y' /etc/named.conf" $["exit":1, 
"stderr":"", "stdout":""]
 Write  .dns.named.value.acl [] true
@@ -37,7 +38,6 @@
 Read   .sysconfig.named.NAMED_INITIALIZE_SCRIPTS nil
 Write  .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "createNamedConfInclude" true
 Write  .sysconfig.named nil true
-Write  .dns.named nil true
 Write  .sysconfig.named.NAMED_RUN_CHROOTED "yes" true
 Write  .sysconfig.named nil true
 Write  .sysconfig.network.config.NETCONFIG_DNS_POLICY "STATIC" true
@@ -52,6 +52,7 @@
 Write  .dns.zone ["/var/lib/named/example.com", $["TTL":"1W", 
"records":[$["key":"host", "type":"A", "value":"127.0.0.1"], 
$["key":"example.com.", "type":"NS", "value":"@"]], "soa":$["expiry":"6W", 
"mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", 
"serial":"2004012701", "server":"@", "zone":"@"]]] true
 Write  .dns.named.value."zone \"example.com\" in".file ["\"example.com\""] true
 Write  .dns.named.value."zone \"example.com\" in".type ["master"] true
+Write  .dns.named nil true
 Write  .sysconfig.network.config.NETCONFIG_DNS_FORWARDER "bind" true
 Write  .sysconfig.network.config nil true
 Execute        .target.bash_output "/sbin/netconfig update -m dns" $["exit":1, 
"stderr":"", "stdout":""]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-dns-server-3.1.8/testsuite/tests/YaPIWriteZones.rb 
new/yast2-dns-server-3.1.10/testsuite/tests/YaPIWriteZones.rb
--- old/yast2-dns-server-3.1.8/testsuite/tests/YaPIWriteZones.rb        
2014-12-04 10:56:54.000000000 +0100
+++ new/yast2-dns-server-3.1.10/testsuite/tests/YaPIWriteZones.rb       
2014-12-10 11:46:10.000000000 +0100
@@ -263,7 +263,7 @@
       @EXEC = {
         "target" => {
           "bash_output" => { "exit" => 1, "stdout" => "", "stderr" => "" },
-          "bash"        => 1
+          "bash"        => 0
         },
         "passwd" => { "init" => true }
       }

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

Reply via email to