Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2014-05-10 07:48:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      
2014-05-06 13:40:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 
2014-05-10 07:48:59.000000000 +0200
@@ -1,0 +2,14 @@
+Tue May  6 12:53:02 UTC 2014 - mfi...@suse.com
+
+- bnc#874178
+  - fixed help for "Global Options"
+- 3.1.55 
+
+-------------------------------------------------------------------
+Tue May  6 10:26:57 UTC 2014 - mfi...@suse.com
+
+- bnc872381
+  - installer sets target's hostname and hosts properly
+- 3.1.54
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.QeyqmW/_old  2014-05-10 07:49:01.000000000 +0200
+++ /var/tmp/diff_new_pack.QeyqmW/_new  2014-05-10 07:49:01.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.53
+Version:        3.1.55
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-network-3.1.53.tar.bz2 -> yast2-network-3.1.55.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.53/package/yast2-network.changes 
new/yast2-network-3.1.55/package/yast2-network.changes
--- old/yast2-network-3.1.53/package/yast2-network.changes      2014-05-06 
07:33:51.000000000 +0200
+++ new/yast2-network-3.1.55/package/yast2-network.changes      2014-05-06 
15:03:52.000000000 +0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Tue May  6 12:53:02 UTC 2014 - mfi...@suse.com
+
+- bnc#874178
+  - fixed help for "Global Options"
+- 3.1.55 
+
+-------------------------------------------------------------------
+Tue May  6 10:26:57 UTC 2014 - mfi...@suse.com
+
+- bnc872381
+  - installer sets target's hostname and hosts properly
+- 3.1.54
+
+-------------------------------------------------------------------
 Mon May  5 22:31:45 UTC 2014 - mfi...@suse.com
 
 - fixed testsuite - adapted to API changes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.53/package/yast2-network.spec 
new/yast2-network-3.1.55/package/yast2-network.spec
--- old/yast2-network-3.1.53/package/yast2-network.spec 2014-05-06 
07:33:51.000000000 +0200
+++ new/yast2-network-3.1.55/package/yast2-network.spec 2014-05-06 
15:03:52.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.53
+Version:        3.1.55
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.53/src/Makefile.am 
new/yast2-network-3.1.55/src/Makefile.am
--- old/yast2-network-3.1.53/src/Makefile.am    2014-05-06 07:33:51.000000000 
+0200
+++ new/yast2-network-3.1.55/src/Makefile.am    2014-05-06 15:03:52.000000000 
+0200
@@ -33,7 +33,6 @@
   clients/lan.rb \
   clients/host_auto.rb \
   clients/inst_ask_net_test.rb \
-  clients/inst_hostname.rb \
   clients/firewall_stage1_proposal.rb \
   clients/routing_auto.rb \
   clients/remote.rb \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.53/src/clients/inst_hostname.rb 
new/yast2-network-3.1.55/src/clients/inst_hostname.rb
--- old/yast2-network-3.1.53/src/clients/inst_hostname.rb       2014-05-06 
07:33:51.000000000 +0200
+++ new/yast2-network-3.1.55/src/clients/inst_hostname.rb       1970-01-01 
01:00:00.000000000 +0100
@@ -1,83 +0,0 @@
-# encoding: utf-8
-
-#***************************************************************************
-#
-# Copyright (c) 2012 Novell, Inc.
-# All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of version 2 of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, contact Novell, Inc.
-#
-# To contact Novell about this file by physical or electronic mail,
-# you may find current contact information at www.novell.com
-#
-#**************************************************************************
-# File:        clients/inst_hostname.ycp
-# Package:     Network configuration
-# Summary:     Mandatory hostname configuration
-# Authors:     Martin Vidner <mvid...@suse.cz>
-#
-module Yast
-  class InstHostnameClient < Client
-    def main
-      Yast.import "UI"
-
-      textdomain "network"
-
-      Yast.import "Arch"
-      Yast.import "DNS"
-      Yast.import "Host"
-      Yast.import "NetworkConfig"
-      Yast.import "String"
-      Yast.import "Wizard"
-      Yast.import "ProductControl"
-      Yast.import "ProductFeatures"
-
-      Yast.include self, "network/services/dns.rb"
-
-      # only once, do not re-propose if user gets back to this dialog from
-      # the previous screen - bnc#438124
-      if !DNS.proposal_valid
-        DNS.Read # handles NetworkConfig too
-        DNS.ProposeHostname # generate random hostname, if none known so far
-
-        # propose settings
-        DNS.dhcp_hostname = !Arch.is_laptop
-
-        # get default value, from control.xml
-        DNS.write_hostname = DNS.DefaultWriteHostname
-      end
-
-      Wizard.SetDesktopIcon("dns")
-      @ret = HostnameDialog()
-
-      if @ret == :next
-        Host.Read
-        Host.ResolveHostnameToStaticIPs
-        Host.Write
-
-        # do not let Lan override us, #152218
-        DNS.proposal_valid = true 
-
-        # delay writing, write along with the rest of network configuration
-        # in lan_proposal
-        # DNS::Write ();
-      end
-
-      @ret 
-
-      # EOF
-    end
-  end
-end
-
-Yast::InstHostnameClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.53/src/clients/save_network.rb 
new/yast2-network-3.1.55/src/clients/save_network.rb
--- old/yast2-network-3.1.53/src/clients/save_network.rb        2014-05-06 
07:33:52.000000000 +0200
+++ new/yast2-network-3.1.55/src/clients/save_network.rb        2014-05-06 
15:03:52.000000000 +0200
@@ -89,38 +89,51 @@
       end
     end
 
+    ETC = "/etc/"
+    SYSCONFIG = "/etc/sysconfig/network/"
+
     def CopyConfiguredNetworkFiles
-      Builtins.y2milestone(
+      log.info(
         "Copy network configuration files from 1st stage into installed system"
       )
-      sysconfig = "/etc/sysconfig/network/"
-      copy_to = String.Quote(
-        Builtins.sformat("%1%2", Installation.destdir, sysconfig)
-      )
+
+      inst_dir = Installation.destdir
+
+      copy_receipts = [
+        { dir: SYSCONFIG, file: "ifcfg-*" },
+        { dir: SYSCONFIG, file: "ifroute-*" },
+        { dir: SYSCONFIG, file: "routes" },
+        { dir: ETC, file: "HOSTNAME" }
+      ]
 
       # just copy files
-      Builtins.foreach(["ifcfg-*", "ifroute-*", "routes"]) do |file|
-        if file.include?("ifcfg-")
-          adjust_for_network_disks("#{sysconfig}/#{file}")
-        end
-
-        copy_from = String.Quote(Builtins.sformat("%1%2", sysconfig, file))
-        Builtins.y2milestone("Copy %1 into %2", copy_from, copy_to)
-        cmd = Builtins.sformat("cp %1 %2", copy_from, copy_to)
+      copy_receipts.each do |receipt|
+        file = receipt[:dir] + receipt[:file]
+        adjust_for_network_disks(file) if file.include?("ifcfg-")
+
+        copy_from = String.Quote(file)
+        copy_to = String.Quote(inst_dir + receipt[:dir])
+
+        log.info("Copying #{copy_from} to #{copy_to}")
+
+        cmd = "cp " << copy_from << " " << copy_to
         ret = SCR.Execute(path(".target.bash_output"), cmd)
 
-        Builtins.y2warning("cmd: '#{cmd}' failed: #{ret}") if ret["exit"] != 0
+        log.warn("cmd: '#{cmd}' failed: #{ret}") if ret["exit"] != 0
       end
 
+      copy_to = String.Quote(inst_dir + SYSCONFIG)
+
       # merge files with default installed by sysconfig
-      Builtins.foreach(["dhcp", "config"]) do |file|
-        source_file = Builtins.sformat("%1%2", sysconfig, file)
-        dest_file = Builtins.sformat("%1%2", copy_to, file)
+      ["dhcp", "config"].each do |file|
+        source_file = SYSCONFIG + file
+        dest_file = copy_to + file
         # apply options from initrd configuration files into installed system
         # i.e. just modify (not replace) files from sysconfig rpm
         # FIXME this must be ripped out, refactored and tested
         # In particular, values containing slashes will break the last sed
-        cmd2 = "\n" +
+        command = "\n" +
+          "source_file=#{source_file};dest_file=#{dest_file}\n" +
           "grep -v \"^[[:space:]]*#\" $source_file | grep = | while read 
option\n" +
           " do\n" +
           "  key=${option%=*}=\n" +
@@ -132,73 +145,30 @@
           "    sed -i s/\"^[[:space:]]*$key.*\"/\"$option\"/g $dest_file\n" +
           "  fi\n" +
           " done"
-        cmd1 = Builtins.sformat(
-          "source_file=%1;dest_file=%2\n",
-          source_file,
-          dest_file
-        )
-        # merge commands (add file-path variables) because of some sformat 
limits with % character
-        command = Builtins.sformat("%1%2", cmd1, cmd2)
-        Builtins.y2milestone(
-          "Execute file merging script : %1",
-          SCR.Execute(path(".target.bash_output"), command)
-        )
-      end 
+        ret = SCR.Execute(path(".target.bash_output"), command)
+
+        log.error("Execute file merging script failed: #{ret}") if ret["exit"] 
!= 0
+      end
       #FIXME: proxy
 
       nil
     end
 
-
-
-    # this replaces bash script create_interface
-    def save_network
-      Builtins.y2milestone("starting save_network")
-      # skip from chroot
-      old_SCR = WFM.SCRGetDefault
-      new_SCR = WFM.SCROpen("chroot=/:scr", false)
-      WFM.SCRSetDefault(new_SCR)
-
-      # when root is on nfs/iscsi set startmode=nfsroot #176804
-      device = NetworkStorage.getDevice(Installation.destdir)
-      Builtins.y2debug(
-        "%1 directory is on %2 device",
-        Installation.destdir,
-        device
-      )
+    def copy_udev_rules
+      dest_root = String.Quote(Installation.destdir)
 
       if Arch.s390
-        Builtins.y2milestone(
-          "For s390 architecture copy udev rule files (/etc/udev/rules/51*)"
-        )
+        log.info("Copy S390 specific udev rule files (/etc/udev/rules/51*)")
+
         WFM.Execute(
           path(".local.bash"),
           Builtins.sformat(
             "/bin/cp -p %1/51-* '%2%1'",
             "/etc/udev/rules.d",
-            String.Quote(Installation.destdir)
+            dest_root
           )
         )
       end
-      # --------------------------------------------------------------
-      # Copy DHCP client cache so that we can request the same IP (#43974).
-      WFM.Execute(
-        path(".local.bash"),
-        Builtins.sformat(
-          "mkdir -p '%2%1'; /bin/cp -p %1/dhcpcd-*.cache '%2%1'",
-          "/var/lib/dhcpcd",
-          String.Quote(Installation.destdir)
-        )
-      )
-      # Copy DHCPv6 (DHCP for IPv6) client cache.
-      WFM.Execute(
-        path(".local.bash"),
-        Builtins.sformat(
-          "/bin/cp -p %1/ '%2%1'",
-          "/var/lib/dhcpv6",
-          String.Quote(Installation.destdir)
-        )
-      )
 
       #Deleting lockfiles and re-triggering udev events for *net is not needed 
any more
       #(#292375 c#18)
@@ -206,60 +176,93 @@
       udev_rules_srcdir = "/etc/udev/rules.d"
       net_srcfile = "70-persistent-net.rules"
 
-      udev_rules_destdir = Builtins.sformat(
-        "%1%2",
-        String.Quote(Installation.destdir),
-        udev_rules_srcdir
-      )
-      net_destfile = Builtins.sformat(
-        "%1%2/%3",
-        String.Quote(Installation.destdir),
-        udev_rules_srcdir,
-        net_srcfile
-      )
+      udev_rules_destdir = dest_root + udev_rules_srcdir
+      net_destfile = dest_root + udev_rules_srcdir + "/" + net_srcfile
 
-      Builtins.y2milestone("udev_rules_destdir %1", udev_rules_destdir)
-      Builtins.y2milestone("net_destfile %1", net_destfile)
+      log.info("udev_rules_destdir #{udev_rules_destdir}")
+      log.info("net_destfile #{net_destfile}")
 
       #Do not create udev_rules_destdir if it already exists (in case of 
update)
       #(bug #293366, c#7)
 
       if !FileUtils.Exists(udev_rules_destdir)
-        Builtins.y2milestone(
-          "%1 does not exist yet, creating it",
-          udev_rules_destdir
-        )
+        log.info("#{udev_rules_destdir} does not exist yet, creating it")
         WFM.Execute(
           path(".local.bash"),
-          Builtins.sformat("mkdir -p '%1'", udev_rules_destdir)
+          "mkdir -p '#{udev_rules_destdir}'"
         )
       else
-        Builtins.y2milestone("File %1 exists", udev_rules_destdir)
+        log.info("File #{udev_rules_destdir} exists")
       end
 
       if !FileUtils.Exists(net_destfile)
-        Builtins.y2milestone("Copying %1 to the installed system ", 
net_srcfile)
+        log.info("Copying #{net_srcfile} to the installed system ")
         WFM.Execute(
           path(".local.bash"),
-          Builtins.sformat(
-            "/bin/cp -p '%1/%2' '%3'",
-            udev_rules_srcdir,
-            net_srcfile,
-            net_destfile
-          )
+          "/bin/cp -p '#{udev_rules_srcdir}/#{net_srcfile}' '#{net_destfile}'"
         )
       else
-        Builtins.y2milestone("Not copying file %1 - it already exists", 
net_destfile)
+        log.info("Not copying file #{net_destfile} - it already exists")
       end
 
+      nil
+    end
+
+    # Copies parts configuration created during installation.
+    #
+    # Copies several config files which should be preserved when installation
+    # is done. E.g. ifcfg-* files, custom udev rules and so on.
+    def copy_from_instsys
+      # skip from chroot
+      old_SCR = WFM.SCRGetDefault
+      new_SCR = WFM.SCROpen("chroot=/:scr", false)
+      WFM.SCRSetDefault(new_SCR)
+
+      # when root is on nfs/iscsi set startmode=nfsroot #176804
+      device = NetworkStorage.getDevice(Installation.destdir)
+      Builtins.y2debug(
+        "%1 directory is on %2 device",
+        Installation.destdir,
+        device
+      )
+
+      # --------------------------------------------------------------
+      # Copy DHCP client cache so that we can request the same IP (#43974).
+      WFM.Execute(
+        path(".local.bash"),
+        Builtins.sformat(
+          "mkdir -p '%2%1'; /bin/cp -p %1/dhcpcd-*.cache '%2%1'",
+          "/var/lib/dhcpcd",
+          String.Quote(Installation.destdir)
+        )
+      )
+      # Copy DHCPv6 (DHCP for IPv6) client cache.
+      WFM.Execute(
+        path(".local.bash"),
+        Builtins.sformat(
+          "/bin/cp -p %1/ '%2%1'",
+          "/var/lib/dhcpv6",
+          String.Quote(Installation.destdir)
+        )
+      )
+
+      copy_udev_rules
       CopyConfiguredNetworkFiles()
 
       # close and chroot back
       WFM.SCRSetDefault(old_SCR)
       WFM.SCRClose(new_SCR)
 
+      nil
+    end
+
+    # It does an automatic configuration of installed system
+    #
+    # Basically, it runs several proposals.
+    def configure_target
       NetworkAutoconfiguration.instance.configure_virtuals
       NetworkAutoconfiguration.instance.configure_dns
+      NetworkAutoconfiguration.instance.configure_hosts
 
       LanUdevAuto.Write if Mode.autoinst
 
@@ -273,6 +276,16 @@
 
       nil
     end
+
+    # this replaces bash script create_interface
+    def save_network
+      log.info("starting save_network")
+
+      copy_from_instsys
+      configure_target
+
+      nil
+    end
   end
 end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.53/src/include/network/lan/help.rb 
new/yast2-network-3.1.55/src/include/network/lan/help.rb
--- old/yast2-network-3.1.53/src/include/network/lan/help.rb    2014-05-06 
07:33:52.000000000 +0200
+++ new/yast2-network-3.1.55/src/include/network/lan/help.rb    2014-05-06 
15:03:52.000000000 +0200
@@ -252,7 +252,7 @@
             # DHCP dialog help 3/7
             _(
               "<p>The <b>Hostname to Send</b> specifies a string used for 
the\n" +
-                "hostname option field when dhcpcd sends messages to the DHCP 
server. Some \n" +
+                "hostname option field when the DHCP client sends messages to 
the DHCP server. Some \n" +
                 "DHCP servers update name server zones (forward and reverse 
records) \n" +
                 "according to this hostname (dynamic DNS).</p>\n" +
                 "Some DHCP servers require the <b>Hostname to Send</b> option 
field to\n" +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-3.1.53/src/lib/network/network_autoconfiguration.rb 
new/yast2-network-3.1.55/src/lib/network/network_autoconfiguration.rb
--- old/yast2-network-3.1.53/src/lib/network/network_autoconfiguration.rb       
2014-05-06 07:33:52.000000000 +0200
+++ new/yast2-network-3.1.55/src/lib/network/network_autoconfiguration.rb       
2014-05-06 15:03:52.000000000 +0200
@@ -17,6 +17,7 @@
     Yast.import "Package"
     Yast.import "DNS"
     Yast.import "Arch"
+    Yast.import "Host"
 
     BASH_PATH = Path.new(".target.bash")
 
@@ -95,6 +96,16 @@
       DNS.Write
     end
 
+    # Proposes updates for /etc/hosts
+    #
+    # Expected to be used for updating target system's config.
+    # Currently it only updates /etc/hosts with static IP if any.
+    def configure_hosts
+      Host.Read
+      Host.ResolveHostnameToStaticIPs
+      Host.Write
+    end
+
   private
     def network_cards
       LanItems.Read

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to