Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2013-06-05 13:26:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-network.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes      
2013-05-02 12:08:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 
2013-06-05 13:26:09.000000000 +0200
@@ -1,0 +2,16 @@
+Thu May 16 06:51:35 UTC 2013 - [email protected]
+
+- bnc#817943
+    - do not propose bridge devices when a virtualization is installed
+    on s390
+- 2.25.2
+
+-------------------------------------------------------------------
+Thu May  2 12:21:37 UTC 2013 - [email protected]
+
+- bnc#813232
+    - fixed parsing hostname in DNS module. Number from begining is
+    not stripped anymore.
+- 2.25.1
+
+-------------------------------------------------------------------

Old:
----
  yast2-network-2.25.0.tar.bz2

New:
----
  yast2-network-2.25.2.tar.bz2

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.WHf3kh/_old  2013-06-05 13:26:10.000000000 +0200
+++ /var/tmp/diff_new_pack.WHf3kh/_new  2013-06-05 13:26:10.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        2.25.0
+Version:        2.25.2
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-network-2.25.0.tar.bz2 -> yast2-network-2.25.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.25.0/VERSION 
new/yast2-network-2.25.2/VERSION
--- old/yast2-network-2.25.0/VERSION    2013-04-30 14:01:38.000000000 +0200
+++ new/yast2-network-2.25.2/VERSION    2013-05-16 14:01:47.000000000 +0200
@@ -1 +1 @@
-2.25.0
+2.25.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.25.0/configure 
new/yast2-network-2.25.2/configure
--- old/yast2-network-2.25.0/configure  2013-04-30 14:01:48.000000000 +0200
+++ new/yast2-network-2.25.2/configure  2013-05-28 15:04:27.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for yast2-network 2.25.0.
+# Generated by GNU Autoconf 2.69 for yast2-network 2.25.2.
 #
 # Report bugs to <http://bugs.opensuse.org/>.
 #
@@ -579,8 +579,8 @@
 # Identity of this package.
 PACKAGE_NAME='yast2-network'
 PACKAGE_TARNAME='yast2-network'
-PACKAGE_VERSION='2.25.0'
-PACKAGE_STRING='yast2-network 2.25.0'
+PACKAGE_VERSION='2.25.2'
+PACKAGE_STRING='yast2-network 2.25.2'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
 PACKAGE_URL=''
 
@@ -1247,7 +1247,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures yast2-network 2.25.0 to adapt to many kinds of systems.
+\`configure' configures yast2-network 2.25.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1318,7 +1318,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of yast2-network 2.25.0:";;
+     short | recursive ) echo "Configuration of yast2-network 2.25.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1398,7 +1398,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-yast2-network configure 2.25.0
+yast2-network configure 2.25.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1415,7 +1415,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by yast2-network $as_me 2.25.0, which was
+It was created by yast2-network $as_me 2.25.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2354,7 +2354,7 @@
 
 # Define the identity of the package.
  PACKAGE='yast2-network'
- VERSION='2.25.0'
+ VERSION='2.25.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2477,7 +2477,7 @@
 
 
 
-VERSION="2.25.0"
+VERSION="2.25.2"
 RPMNAME="yast2-network"
 MAINTAINER="Michal Filka <[email protected]>"
 
@@ -3403,7 +3403,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by yast2-network $as_me 2.25.0, which was
+This file was extended by yast2-network $as_me 2.25.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3456,7 +3456,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-yast2-network config.status 2.25.0
+yast2-network config.status 2.25.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.25.0/configure.in 
new/yast2-network-2.25.2/configure.in
--- old/yast2-network-2.25.0/configure.in       2013-04-30 14:01:45.000000000 
+0200
+++ new/yast2-network-2.25.2/configure.in       2013-05-28 15:04:22.000000000 
+0200
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 2.24.0 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-network, 2.25.0, http://bugs.opensuse.org/, yast2-network)
+AC_INIT(yast2-network, 2.25.2, http://bugs.opensuse.org/, yast2-network)
 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.25.0"
+VERSION="2.25.2"
 RPMNAME="yast2-network"
 MAINTAINER="Michal Filka <[email protected]>"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.25.0/src/clients/lan_proposal.ycp 
new/yast2-network-2.25.2/src/clients/lan_proposal.ycp
--- old/yast2-network-2.25.0/src/clients/lan_proposal.ycp       2013-04-17 
13:23:13.000000000 +0200
+++ new/yast2-network-2.25.2/src/clients/lan_proposal.ycp       2013-05-16 
14:01:47.000000000 +0200
@@ -48,11 +48,38 @@
 
 list args = WFM::Args();
 
+// yast2-installation calls the method this way:
+//
+//  WFM::CallFunction( <proposal>, [<client function>, <map of arguments>])
+//
+// particularly for AutomaticConfiguration:
+//
+//  WFM::CallFunction( <proposal>, ["MakeProposal", $[ 
"AutomaticConfiguration":true ]])
+//
+// see inst_proposal.ycp and inst_automatic_configuration.ycp
 string func = args[0]:"";
 map param = args[1]:$[];
+
 map ret = $[];
 
-Lan::automatic_configuration = GetInstArgs::automatic_configuration();
+/*
+ * Decides if a proposal for virtualization host machine is required.
+ */
+define boolean VirtProposalRequired()
+{
+    // S390 has special requirements. See bnc#817943
+    if( Arch::s390() )
+        return false;
+
+    if( PackageSystem::Installed("xen") && !Arch::is_xenU()) 
+        return true;
+    if( PackageSystem::Installed("kvm") )
+        return true;
+    if( PackageSystem::Installed("qemu"))
+        return true;
+
+    return false;
+}
 
 /* create a textual proposal */
 if(func == "MakeProposal") {
@@ -60,36 +87,47 @@
     string warning = nil;
     symbol warning_level = nil;
     boolean force_reset = param["force_reset"]:false;
+    boolean automatic_configuration = GetInstArgs::automatic_configuration();
+
+    Lan::automatic_configuration = automatic_configuration;
+
+    y2milestone("lan_proposal/MakeProposal automatic_configuration: %1", 
automatic_configuration);
+    y2milestone("lan_proposal/MakeProposal force_reset: %1", force_reset);
+
+    if(force_reset || !LanItems::proposal_valid) 
+    {
+        LanItems::proposal_valid = true;
 
-    if(force_reset || !LanItems::proposal_valid) {
-       LanItems::proposal_valid = true;
-       if (! GetInstArgs::automatic_configuration())
-           /* Popup text */
-           BusyPopup(_("Detecting network cards..."));
-       boolean progress_orig = Progress::set (false);
-       // NM wants us to repropose but while at it Lan::Read should not
-       // think it does a full reread and unset Lan::modified. #147270
-       Lan::Read (force_reset? `nocache: `cache);
-       if (Lan::virt_net_proposal==nil){
-         if((PackageSystem::Installed("xen") && !Arch::is_xenU()) || 
PackageSystem::Installed("kvm")||
-               PackageSystem::Installed("qemu"))
-               Lan::virt_net_proposal = true;
-        else Lan::virt_net_proposal = false;
-       }
-       Lan::Propose();
-       Progress::set (progress_orig);
-       if (! GetInstArgs::automatic_configuration())
-           BusyPopupClose();
+        if (! automatic_configuration)
+            BusyPopup(_("Detecting network cards..."));
+
+        boolean progress_orig = Progress::set (false);
+
+        // NM wants us to repropose but while at it Lan::Read should not
+        // think it does a full reread and unset Lan::modified. #147270
+        Lan::Read (force_reset ? `nocache : `cache);
+
+        if (Lan::virt_net_proposal==nil)
+        {
+            Lan::virt_net_proposal = VirtProposalRequired();
+        }
+
+        Lan::Propose();
+        Progress::set (progress_orig);
+
+        if (! automatic_configuration) 
+            BusyPopupClose();
     }
+
     list sum = Lan::Summary("proposal");
     proposal = sum[0]:"";
 
     ret = $[
-       "preformatted_proposal" : proposal,
-       "warning_level" : warning_level, // TODO `warning
-       "warning" : warning,    // TODO WiFi but no encryption
-       "links" : sum[1]:[],
-    ];
+        "preformatted_proposal" : proposal,
+        "warning_level" : warning_level, // TODO `warning
+        "warning" : warning,   // TODO WiFi but no encryption
+        "links" : sum[1]:[],
+        ];
 }
 /* run the module */
 else if(func == "AskUser") {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.25.0/src/modules/DNS.ycp 
new/yast2-network-2.25.2/src/modules/DNS.ycp
--- old/yast2-network-2.25.0/src/modules/DNS.ycp        2013-03-01 
13:16:35.000000000 +0100
+++ new/yast2-network-2.25.2/src/modules/DNS.ycp        2013-05-03 
13:21:36.000000000 +0200
@@ -127,21 +127,54 @@
     return ret;
 }
 
-//Copied from former Detection.ycp
+/**
+ * Handles input as one line of getent output. Returns first hostname found on 
the line.
+ */
+string GetHostnameFromGetent( string line)
+{
+    // hosts line is formatted this way:
+    //
+    // <ip address> <canonical hostname> [<alias> ...]
+    //
+    // field separators are at least one space and/or tab.
+
+    string hostname = regexpsub( line, sformat( "^[%1]+[[:blank:]]+(.*)", 
IP::ValidChars), "\\1");
+
+    hostname = String::FirstChunk( hostname, " \t\n");
+    hostname = String::CutBlanks( hostname);
+
+    if( ! Hostname::Check( hostname))
+    {
+        y2error( "GetHostnameFromGetent: Invalid hostname detected (%1)", 
hostname);
+        y2error( "GetHostnameFromGetent: input params - begin");
+        y2error( "%1", line);
+        y2error( "GetHostnameFromGetent: input params - end");
+
+        return "";
+    }
+
+    return hostname;
+}
+
 /**
  * Resolve IP to hostname
  * @param ip given IP address
- * @return resolved host
+ * @return resolved host or empty string in case of failure.
  */
-string ResolveIP(string ip) {
-    string command = "/usr/bin/getent hosts \"%1\" | sed \"s/^[0-9.: 
\t]\\+//g\"";
+string ResolveIP(string ip) 
+{
+    string command = "/usr/bin/getent hosts \"%1\"";
     map getent = (map) SCR::Execute(.target.bash_output, sformat(command, ip));
-    string hnent = getent["stdout"]:"";
-    y2debug("%1", hnent);
-    hnent = String::FirstChunk (hnent, " \t\n");
-    if(hnent == nil) hnent = "";
-    y2debug("'%1'", hnent);
-    return String::CutBlanks(hnent);
+    integer exit_code = getent[ "exit"]:-1;
+
+    if( exit_code != 0)
+    {
+        y2error( "ResolveIP: getent call failed (%1)", exit_code);
+    
+        return "";
+    }
+
+    return GetHostnameFromGetent( getent[ "stdout"]:"");
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.25.0/testsuite/tests/dns.out 
new/yast2-network-2.25.2/testsuite/tests/dns.out
--- old/yast2-network-2.25.0/testsuite/tests/dns.out    1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-network-2.25.2/testsuite/tests/dns.out    2013-05-03 
13:21:36.000000000 +0200
@@ -0,0 +1,6 @@
+Read   .target.tmpdir nil
+Log    Failed to set temporary directory: nil
+Log    GetHostnameFromGetent: Invalid hostname detected (-invalid_hostname-)
+Log    GetHostnameFromGetent: input params - begin
+Log    3.3.3.3         -invalid_hostname-
+Log    GetHostnameFromGetent: input params - end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.25.0/testsuite/tests/dns.ycp 
new/yast2-network-2.25.2/testsuite/tests/dns.ycp
--- old/yast2-network-2.25.0/testsuite/tests/dns.ycp    1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-network-2.25.2/testsuite/tests/dns.ycp    2013-05-03 
13:21:36.000000000 +0200
@@ -0,0 +1,42 @@
+{
+
+import "Assert";
+import "Testsuite";
+
+map READ = $[
+
+    "probe" : $[
+        "architecture" : "i386",
+    ],
+    "sysconfig" : $[
+        "console" : $[
+            "CONSOLE_ENCODING" : "UTF-8",
+        ],
+    ],
+];
+
+map EXEC = $[ 
+    "target": $[
+        "bash_output": $[
+                "exit": 0,
+                "stdout": "charset=UTF-8",
+                "stderr":"",
+        ],
+    ],
+];
+
+list<string> hostnames = [
+    "127.0.0.1       localhost",
+    "1.1.1.1         1-hostname alias",
+    "2.2.2.2         hostname-2",
+    "3.3.3.3         -invalid_hostname-",
+];
+
+import "DNS";
+
+Assert::Equal( "localhost", DNS::GetHostnameFromGetent( hostnames[ 0]:"") );
+Assert::Equal( "1-hostname", DNS::GetHostnameFromGetent( hostnames[ 1]:"") );
+Assert::Equal( "hostname-2", DNS::GetHostnameFromGetent( hostnames[ 2]:"") );
+Assert::Equal( "", DNS::GetHostnameFromGetent( hostnames[ 3]:"") );
+
+} /* EOF */

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

Reply via email to