Hello community, here is the log from the commit of package autoyast2 for openSUSE:Factory checked in at 2016-07-16 22:12:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old) and /work/SRC/openSUSE:Factory/.autoyast2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autoyast2" Changes: -------- --- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes 2016-07-07 15:10:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.autoyast2.new/autoyast2.changes 2016-07-16 22:12:59.000000000 +0200 @@ -1,0 +2,30 @@ +Tue Jul 14 15:01:29 CEST 2016 - [email protected] + +- Exporting NFS root partition correctly. (bnc#986124) +- 3.1.140 + +------------------------------------------------------------------- +Wed Jul 13 09:15:05 CEST 2016 - [email protected] + +- Moved ssh_import AutoYaST schema file to yast2-installation + package. + This is a part of Fate#319624. +- 3.1.139 + +------------------------------------------------------------------- +Mon Jul 11 14:21:48 CEST 2016 - [email protected] + +- Adapt docu to new AutoYaST developer docu. +- 3.1.138 + +------------------------------------------------------------------- +Wed Jul 6 17:56:38 CEST 2016 - [email protected] + +- The entry "kexec_reboot" in the Product description can be set + by the AutoYaST configuration setting (general/forceboot) and should + not be reset by any other Product description file. + Fix: Set it again after reading a new Product description. + (bnc#981434) +- 3.1.137 + +------------------------------------------------------------------- Old: ---- autoyast2-3.1.136.tar.bz2 New: ---- autoyast2-3.1.140.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autoyast2.spec ++++++ --- /var/tmp/diff_new_pack.fOYj7O/_old 2016-07-16 22:13:00.000000000 +0200 +++ /var/tmp/diff_new_pack.fOYj7O/_new 2016-07-16 22:13:00.000000000 +0200 @@ -17,7 +17,7 @@ Name: autoyast2 -Version: 3.1.136 +Version: 3.1.140 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ autoyast2-3.1.136.tar.bz2 -> autoyast2-3.1.140.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/README.md new/autoyast2-3.1.140/README.md --- old/autoyast2-3.1.136/README.md 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/README.md 2016-07-15 14:03:26.000000000 +0200 @@ -11,6 +11,8 @@ This module is developed as part of YaST. See the [development documentation](http://yastgithubio.readthedocs.org/en/latest/development/). +Have a look to the [AutoYaST Development Documentation](http://yastgithubio.readthedocs.io/en/latest/autoyast-development/) if you would like to implement AutoYaST support for your YaST module. + Getting the Sources =================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/package/autoyast2.changes new/autoyast2-3.1.140/package/autoyast2.changes --- old/autoyast2-3.1.136/package/autoyast2.changes 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/package/autoyast2.changes 2016-07-15 14:03:26.000000000 +0200 @@ -1,4 +1,34 @@ ------------------------------------------------------------------- +Tue Jul 14 15:01:29 CEST 2016 - [email protected] + +- Exporting NFS root partition correctly. (bnc#986124) +- 3.1.140 + +------------------------------------------------------------------- +Wed Jul 13 09:15:05 CEST 2016 - [email protected] + +- Moved ssh_import AutoYaST schema file to yast2-installation + package. + This is a part of Fate#319624. +- 3.1.139 + +------------------------------------------------------------------- +Mon Jul 11 14:21:48 CEST 2016 - [email protected] + +- Adapt docu to new AutoYaST developer docu. +- 3.1.138 + +------------------------------------------------------------------- +Wed Jul 6 17:56:38 CEST 2016 - [email protected] + +- The entry "kexec_reboot" in the Product description can be set + by the AutoYaST configuration setting (general/forceboot) and should + not be reset by any other Product description file. + Fix: Set it again after reading a new Product description. + (bnc#981434) +- 3.1.137 + +------------------------------------------------------------------- Wed Jul 6 16:56:38 CEST 2016 - [email protected] - While AutoYaST installation the user can change the path of the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/package/autoyast2.spec new/autoyast2-3.1.140/package/autoyast2.spec --- old/autoyast2-3.1.136/package/autoyast2.spec 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/package/autoyast2.spec 2016-07-15 14:03:26.000000000 +0200 @@ -17,7 +17,7 @@ Name: autoyast2 -Version: 3.1.136 +Version: 3.1.140 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/src/Makefile.am new/autoyast2-3.1.140/src/Makefile.am --- old/autoyast2-3.1.136/src/Makefile.am 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/src/Makefile.am 2016-07-15 14:03:26.000000000 +0200 @@ -93,7 +93,6 @@ autoyast-rnc/classes-use.rnc \ autoyast-rnc/classes-decl.rnc \ autoyast-rnc/software.rnc \ - autoyast-rnc/ssh_import.rnc \ autoyast-rnc/reporting.rnc \ autoyast-rnc/partitioning.rnc \ autoyast-rnc/profile-misc.rnc \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/src/autoyast-rnc/ssh_import.rnc new/autoyast2-3.1.140/src/autoyast-rnc/ssh_import.rnc --- old/autoyast2-3.1.136/src/autoyast-rnc/ssh_import.rnc 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/src/autoyast-rnc/ssh_import.rnc 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -default namespace = "http://www.suse.com/1.0/yast2ns" -namespace config = "http://www.suse.com/1.0/configns" -namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" - -ssh_import = - element ssh_import { - element import { BOOLEAN }? & - element copy_config { BOOLEAN }? & - element device { text }? - } \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/src/clients/inst_autosetup.rb new/autoyast2-3.1.140/src/clients/inst_autosetup.rb --- old/autoyast2-3.1.136/src/clients/inst_autosetup.rb 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/src/clients/inst_autosetup.rb 2016-07-15 14:03:26.000000000 +0200 @@ -188,6 +188,12 @@ ["Import", Ops.get_map(Profile.current, "add-on", {})] ) Call.Function("add-on_auto", ["Write"]) + # The entry "kexec_reboot" in the Product description can be set + # by the AutoYaST configuration setting (general/forceboot) and should + # not be reset by any other Product description file. + # So we set it here again. + # bnc#981434 + AutoinstGeneral.SetRebootAfterFirstStage end @use_utf8 = true # utf8 is default diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/src/modules/AutoinstDrive.rb new/autoyast2-3.1.140/src/modules/AutoinstDrive.rb --- old/autoyast2-3.1.136/src/modules/AutoinstDrive.rb 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/src/modules/AutoinstDrive.rb 2016-07-15 14:03:26.000000000 +0200 @@ -332,6 +332,10 @@ def parseDrive(drive) drive = deep_copy(drive) + # If it is a root nfs partition we do not need any additional + # conversation. (bnc#986124) + return drive if drive["type"] == :CT_NFS + newDrive = new("auto", Ops.get_symbol(drive, "type", :CT_DISK)) newDrive = set( newDrive, @@ -384,7 +388,7 @@ exportDrive, "use", symbol2string(Ops.get_symbol(exportDrive, "use", :Empty)) - ) + ) if exportDrive.fetch("use", :Empty).is_a?( Symbol ) # let AutoinstPartition do it's own filtering Ops.set( exportDrive, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/src/modules/AutoinstGeneral.rb new/autoyast2-3.1.140/src/modules/AutoinstGeneral.rb --- old/autoyast2-3.1.136/src/modules/AutoinstGeneral.rb 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/src/modules/AutoinstGeneral.rb 2016-07-15 14:03:26.000000000 +0200 @@ -433,12 +433,12 @@ end end - # Write General Configuration - # @return [Boolean] true on success - def Write - AutoinstConfig.Confirm = Ops.get_boolean(@mode, "confirm", true) - AutoinstConfig.cio_ignore = @cio_ignore - AutoinstConfig.second_stage = @mode["second_stage"] if @mode.has_key?("second_stage") + # Set the "kexec_reboot" flag in the product + # description in order to force a reboot with + # kexec at the end of the first installation + # stage. + # @return [void] + def SetRebootAfterFirstStage if Builtins.haskey(@mode, "forceboot") ProductFeatures.SetBooleanFeature( "globals", @@ -446,6 +446,15 @@ !Ops.get_boolean(@mode, "forceboot", false) ) end + end + + # Write General Configuration + # @return [Boolean] true on success + def Write + AutoinstConfig.Confirm = Ops.get_boolean(@mode, "confirm", true) + AutoinstConfig.cio_ignore = @cio_ignore + AutoinstConfig.second_stage = @mode["second_stage"] if @mode.has_key?("second_stage") + SetRebootAfterFirstStage() AutoinstConfig.Halt = Ops.get_boolean(@mode, "halt", false) AutoinstConfig.RebootMsg = Ops.get_boolean(@mode, "rebootmsg", false) AutoinstConfig.setProposalList(@proposals) @@ -494,6 +503,7 @@ publish :function => :Export, :type => "map ()" publish :function => :SetSignatureHandling, :type => "void ()" publish :function => :SetMultipathing, :type => "void ()" + publish :function => :SetRebootAfterFirstStage, :type => "void ()" publish :function => :Write, :type => "boolean ()" publish :function => :AutoinstGeneral, :type => "void ()" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/src/modules/AutoinstPartPlan.rb new/autoyast2-3.1.140/src/modules/AutoinstPartPlan.rb --- old/autoyast2-3.1.136/src/modules/AutoinstPartPlan.rb 2016-07-07 11:14:34.000000000 +0200 +++ new/autoyast2-3.1.140/src/modules/AutoinstPartPlan.rb 2016-07-15 14:03:26.000000000 +0200 @@ -340,14 +340,18 @@ _StorageMap = Builtins.eval(Storage.GetTargetMap) _StorageMap = _StorageMap.select do |d, p| - ok = d != "/dev/evms" && d != "/dev/nfs" + ok = true + if( d == "/dev/nfs" && p["partitions"] != nil) + # Checking if /dev/nfs container has a root partition. + # If yes, it can be taken for the plan (bnc#986124) + ok = p["partitions"].any?{ |part| part["mount"] == "/" } + end if( ok && p.fetch("partitions", []).size==0 ) ok = p.fetch("used_by_type",:UB_NONE)==:UB_LVM end ok end Builtins.y2milestone("Storagemap %1", _StorageMap) - # list evms_vgs = []; drives = Builtins.maplist(_StorageMap) do |k, v| partitions = [] @@ -360,6 +364,17 @@ Builtins.foreach(Ops.get_list(v, "partitions", [])) do |pe| next if Ops.get_symbol(pe, "type", :x) == :extended new_pe = {} + + # Handling nfs root partitions. (bnc#986124) + if pe["type"] == :nfs + new_pe["type"] = pe["type"] + new_pe["device"] = pe["device"] + new_pe["mount"] = pe["mount"] + new_pe["fstopt"] = pe["fstopt"] + partitions << new_pe + end + next if pe["type"] == :nfs + Ops.set(new_pe, "create", true) new_pe["ignore_fstab"] = pe["ignore_fstab"] if pe.has_key?("ignore_fstab") skipwin = false @@ -587,7 +602,8 @@ # they must exist drive = {} Ops.set(drive, "type", Ops.get_symbol(v, "type", :CT_DISK)) - Ops.set(drive, "disklabel", Ops.get_string(v, "label", "msdos")) + # A disklabel for the container of NFS mounts is useless. + Ops.set(drive, "disklabel", Ops.get_string(v, "label", "msdos")) unless drive["type"] == :CT_NFS if no_create partitions = Builtins.maplist( Convert.convert(partitions, :from => "list", :to => "list <map>") @@ -644,13 +660,6 @@ end deep_copy(drive) end - # drives = filter( map v, (list<map>)drives, ``{ - # if( ! (contains( evms_vgs, v["device"]:"") && v["type"]:`x == `CT_LVM ) ) - # return true; - # y2milestone("kicking LVM %1 out of the profile because an EVMS with that name exists",v); - # return false; - # }); - # remove drives with no mountpoint drives = Builtins.filter( Convert.convert(drives, :from => "list", :to => "list <map>") ) do |v| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/test/AutoinstPartPlan_test.rb new/autoyast2-3.1.140/test/AutoinstPartPlan_test.rb --- old/autoyast2-3.1.136/test/AutoinstPartPlan_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-3.1.140/test/AutoinstPartPlan_test.rb 2016-07-15 14:03:26.000000000 +0200 @@ -0,0 +1,33 @@ +#!/usr/bin/env rspec + +require_relative "test_helper" +require "yaml" + +Yast.import "AutoinstPartPlan" +Yast.import "Profile" + +describe Yast::AutoinstPartPlan do + FIXTURES_PATH = File.join(File.dirname(__FILE__), 'fixtures') + let(:target_map_path) { File.join(FIXTURES_PATH, 'storage', "nfs_root.yml") } + + describe "#read partition target" do + + it "exporting nfs root partition" do + target_map = YAML.load_file(target_map_path) + + expect(Yast::Storage).to receive(:GetTargetMap).and_return(target_map) + expect(Yast::AutoinstPartPlan.Read).to eq(true) + expect(Yast::AutoinstPartPlan.Export).to eq( + [{"type"=>:CT_NFS, + "partitions"=>[{"type"=>:nfs, + "device"=>"192.168.4.1:/srv/nfsroot/sles12sp1", + "mount"=>"/", + "fstopt"=>"minorversion=1"}], + "device"=>"/dev/nfs", "use"=>"all"} + ] + ) + end + + end + +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.136/test/fixtures/storage/nfs_root.yml new/autoyast2-3.1.140/test/fixtures/storage/nfs_root.yml --- old/autoyast2-3.1.136/test/fixtures/storage/nfs_root.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-3.1.140/test/fixtures/storage/nfs_root.yml 2016-07-15 14:03:26.000000000 +0200 @@ -0,0 +1,63 @@ +--- +"/dev/nfs": + device: "/dev/nfs" + name: "nfs" + partitions: + - detected_fs: :nfs4 + device: "192.168.4.1:/srv/nfsroot/sles12sp1" + fstopt: "minorversion=1" + fstype: "NFS" + mount: "/" + mountby: :device + name: "192.168.4.1:/srv/nfsroot/sles12sp1" + size_k: 41943040 + type: :nfs + used_by_device: "" + used_by_type: :UB_NONE + used_fs: :nfs4 + type: :CT_NFS + used_by_device: "" + used_by_type: :UB_NONE +"/dev/tmpfs": + device: "/dev/tmpfs" + name: "tmpfs" + partitions: + - detected_fs: :tmpfs + device: "tmpfs" + fstype: "TMPFS" + ignore_fstab: true + mount: "/dev/shm" + mountby: :uuid + name: "none" + size_k: 1026484 + type: :tmpfs + used_by_device: "" + used_by_type: :UB_NONE + used_fs: :tmpfs + - detected_fs: :tmpfs + device: "tmpfs" + fstype: "TMPFS" + ignore_fstab: true + mount: "/run" + mountby: :uuid + name: "none" + size_k: 1026484 + type: :tmpfs + used_by_device: "" + used_by_type: :UB_NONE + used_fs: :tmpfs + - detected_fs: :tmpfs + device: "tmpfs" + fstype: "TMPFS" + ignore_fstab: true + mount: "/sys/fs/cgroup" + mountby: :uuid + name: "none" + size_k: 1026484 + type: :tmpfs + used_by_device: "" + used_by_type: :UB_NONE + used_fs: :tmpfs + type: :CT_TMPFS + used_by_device: "" + used_by_type: :UB_NONE \ No newline at end of file
