Hello community,
here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2016-05-10 09:26:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
and /work/SRC/openSUSE:Factory/.yast2-installation.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2016-04-28 20:31:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes 2016-05-10 09:26:39.000000000 +0200
@@ -1,0 +2,14 @@
+Fri May 6 11:09:28 UTC 2016 - jsrain@suse.cz
+
+- get more texts for roles dialog from control file, allow
+ a general label (bsc#974625)
+- 3.1.184
+
+-------------------------------------------------------------------
+Thu May 5 13:39:46 UTC 2016 - ancor@suse.com
+
+- Always read the lists of local users in the previous system to
+ have them available during user importing (part of fate#319624)
+- 3.1.183
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-3.1.182.tar.bz2
New:
----
yast2-installation-3.1.184.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.zpvWN2/_old 2016-05-10 09:26:40.000000000 +0200
+++ /var/tmp/diff_new_pack.zpvWN2/_new 2016-05-10 09:26:40.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.182
+Version: 3.1.184
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -121,7 +121,8 @@
Recommends: yast2-registration
Recommends: yast2-online-update
-Recommends: yast2-users
+# UsersDatabase class
+Recommends: yast2-users >= 3.1.49
Recommends: yast2-firewall
Recommends: release-notes
Recommends: curl
++++++ yast2-installation-3.1.182.tar.bz2 -> yast2-installation-3.1.184.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.182/doc/SELF_UPDATE.md new/yast2-installation-3.1.184/doc/SELF_UPDATE.md
--- old/yast2-installation-3.1.182/doc/SELF_UPDATE.md 2016-04-28 15:04:36.000000000 +0200
+++ new/yast2-installation-3.1.184/doc/SELF_UPDATE.md 2016-05-09 14:24:55.000000000 +0200
@@ -73,3 +73,14 @@
self-update is performed).
However, the user changes will be re-applied on top of the installer updates.
+
+## Resume installation
+
+Any client called before the self update step is responsible to remember its state (if
+needed) and automatically going to the next dialog after the YaST restart.
+Once the self update step is reached again it will remove the restarting flag.
+
+Currently there is no API available for remembering the client states. The easiest
+way is to store the configuration into an YAML file and load it when restarting the
+installer. See the [example](https://github.com/yast/yast-installation/pull/367/files#diff-4c91d6424e08c9...)
+in the `inst_complex_welcome` client.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.182/doc/control-file.md new/yast2-installation-3.1.184/doc/control-file.md
--- old/yast2-installation-3.1.182/doc/control-file.md 2016-04-28 15:04:36.000000000 +0200
+++ new/yast2-installation-3.1.184/doc/control-file.md 2016-05-09 14:24:55.000000000 +0200
@@ -875,6 +875,24 @@
<texts>
+ <!-- Caption of the whole dialog -->
+ <label>System Role</label>
+ <!-- Few lines of text above the selection of the roles -->
+
+ <label>System Roles are predefined use cases which adjust the system
+to be installed tailored for the selected scenario.
+Choose the one which matches your system best.</label>
+
+ <!-- Help text of the roles dialog -->
+
+ <label><p>The system roles adjustments are in the range from package selection up
+to disk partitioning. By choosing a system role, the system is
+configured accordingly to match the use case of the role. The settings
+defined by a role can be overridden in the next steps if necessary.</p></label>
+
+
+
+
<plain><label>General Server</label></plain>
<label>Suitable for physical machines.</label>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.182/package/yast2-installation.changes new/yast2-installation-3.1.184/package/yast2-installation.changes
--- old/yast2-installation-3.1.182/package/yast2-installation.changes 2016-04-28 15:04:36.000000000 +0200
+++ new/yast2-installation-3.1.184/package/yast2-installation.changes 2016-05-09 14:24:55.000000000 +0200
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Fri May 6 11:09:28 UTC 2016 - jsrain@suse.cz
+
+- get more texts for roles dialog from control file, allow
+ a general label (bsc#974625)
+- 3.1.184
+
+-------------------------------------------------------------------
+Thu May 5 13:39:46 UTC 2016 - ancor@suse.com
+
+- Always read the lists of local users in the previous system to
+ have them available during user importing (part of fate#319624)
+- 3.1.183
+
+-------------------------------------------------------------------
Wed Apr 20 10:47:12 UTC 2016 - knut.anderssen@suse.com
- Disk Activation step will be skipped in case of installer update
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.182/package/yast2-installation.spec new/yast2-installation-3.1.184/package/yast2-installation.spec
--- old/yast2-installation-3.1.182/package/yast2-installation.spec 2016-04-28 15:04:36.000000000 +0200
+++ new/yast2-installation-3.1.184/package/yast2-installation.spec 2016-05-09 14:24:55.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.182
+Version: 3.1.184
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -117,7 +117,8 @@
Recommends: yast2-registration
Recommends: yast2-online-update
-Recommends: yast2-users
+# UsersDatabase class
+Recommends: yast2-users >= 3.1.49
Recommends: yast2-firewall
Recommends: release-notes
Recommends: curl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.182/src/lib/installation/clients/inst_pre_install.rb new/yast2-installation-3.1.184/src/lib/installation/clients/inst_pre_install.rb
--- old/yast2-installation-3.1.182/src/lib/installation/clients/inst_pre_install.rb 2016-04-28 15:04:36.000000000 +0200
+++ new/yast2-installation-3.1.184/src/lib/installation/clients/inst_pre_install.rb 2016-05-09 14:24:55.000000000 +0200
@@ -20,6 +20,8 @@
# ------------------------------------------------------------------------------
module Yast
class InstPreInstallClient < Client
+ include Yast::Logger
+
def main
Yast.import "Storage"
Yast.import "FileSystems"
@@ -83,6 +85,8 @@
end
end
+ read_users
+
# free the memory
@useful_partitions = nil
@@ -124,46 +128,10 @@
wanted_files = deep_copy(wanted_files)
optional_files = deep_copy(optional_files)
Builtins.y2milestone("Searching for files: %1", wanted_files)
- mnt_tmpdir = Ops.add(Directory.tmpdir, "/tmp_mnt_for_check")
-
- mnt_tmpdir = SystemFilesCopy.CreateDirectoryIfMissing(mnt_tmpdir)
-
- # CreateDirectory failed
- return nil if mnt_tmpdir.nil?
files_found_on_partitions = {}
- Builtins.foreach(@useful_partitions) do |partition|
- partition_device = Ops.get_string(partition, "device", "")
- Builtins.y2milestone("Mounting %1 to %2", partition_device, mnt_tmpdir)
- already_mounted = Builtins.sformat(
- "grep '[\\t ]%1[\\t ]' /proc/mounts",
- mnt_tmpdir
- )
- am = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), already_mounted)
- )
- if Ops.get_integer(am, "exit", -1) == 0 &&
- Ops.greater_than(Builtins.size(Ops.get_string(am, "stdout", "")), 0)
- Builtins.y2warning(
- "%1 is already mounted, trying to umount...",
- mnt_tmpdir
- )
- if Convert.to_boolean(SCR.Execute(path(".target.umount"), mnt_tmpdir)) != true
- Builtins.y2error("Cannot umount %1", mnt_tmpdir)
- end
- end
- # mounting read-only
- if !Convert.to_boolean(
- SCR.Execute(
- path(".target.mount"),
- [partition_device, mnt_tmpdir],
- "-o ro,noatime"
- )
- )
- Builtins.y2error("Mounting falied!")
- next
- end
+ each_mounted_partition do |device, mnt_tmpdir|
files_found = true
one_partition_files_found = {}
Builtins.foreach(wanted_files) do |wanted_file|
@@ -197,28 +165,8 @@
end
Ops.set(one_partition_files_found, wanted_file, file_time)
end
- if files_found
- Ops.set(
- files_found_on_partitions,
- partition_device,
- one_partition_files_found
- )
- end
- # bnc #427879
- exec = Convert.to_map(
- SCR.Execute(
- path(".target.bash_output"),
- Builtins.sformat("fuser -v '%1' 2>&1", String.Quote(mnt_tmpdir))
- )
- )
- if Ops.get_string(exec, "stdout", "") != ""
- Builtins.y2error("Processes in %1: %2", mnt_tmpdir, exec)
- end
- # umounting
- Builtins.y2milestone("Umounting %1", partition_device)
- if !Convert.to_boolean(SCR.Execute(path(".target.umount"), mnt_tmpdir))
- Builtins.y2error("Umount failed!")
- end
+ next unless files_found
+ Ops.set(files_found_on_partitions, device, one_partition_files_found)
end
Builtins.y2milestone("Files found: %1", files_found_on_partitions)
@@ -257,6 +205,23 @@
nil
end
+ # Stores all found user databases (/etc/passwd and friends) into
+ # UsersDatabase.all, so it can be used during the users import step
+ def read_users
+ require_users_database
+ return unless defined? Users::UsersDatabase
+ each_mounted_partition do |device, mount_point|
+ log.info "Reading users information from #{device}"
+ Users::UsersDatabase.import(mount_point)
+ end
+ end
+
+ def require_users_database
+ require "users/users_database"
+ rescue LoadError
+ log.error "UsersDatabase not found. YaST2-users is missing, old or broken."
+ end
+
def Initialize
Builtins.y2milestone("Evaluating all current partitions")
@@ -332,5 +297,49 @@
nil
end
+
+ protected
+
+ def each_mounted_partition(&block)
+ mnt_tmpdir = "#{Directory.tmpdir}/tmp_mnt_for_check"
+ mnt_tmpdir = SystemFilesCopy.CreateDirectoryIfMissing(mnt_tmpdir)
+
+ # CreateDirectory failed
+ if mnt_tmpdir.nil?
+ log.error "Error creating temporary directory"
+ return
+ end
+
+ @useful_partitions.each do |partition|
+ partition_device = partition["device"] || ""
+ log.info "Mounting #{partition_device} to #{mnt_tmpdir}"
+ already_mounted = Builtins.sformat(
+ "grep '[\\t ]%1[\\t ]' /proc/mounts",
+ mnt_tmpdir
+ )
+ am = SCR.Execute(path(".target.bash_output"), already_mounted)
+ if am["exit"] == 0 && !am["stdout"].to_s.empty?
+ log.warning "#{mnt_tmpdir} is already mounted, trying to umount..."
+ log.error("Cannot umount #{mnt_tmpdir}") unless SCR.Execute(path(".target.umount"), mnt_tmpdir)
+ end
+ # mounting read-only
+ if !SCR.Execute(path(".target.mount"), [partition_device, mnt_tmpdir], "-o ro,noatime")
+ log.error "Mounting falied!"
+ next
+ end
+
+ block.call(partition_device, mnt_tmpdir)
+
+ # bnc #427879
+ exec = SCR.Execute(
+ path(".target.bash_output"),
+ Builtins.sformat("fuser -v '%1' 2>&1", String.Quote(mnt_tmpdir))
+ )
+ log.error("Processes in #{mnt_tmpdir}: #{exec}") unless exec["stdout"].to_s.empty?
+ # umounting
+ log.info "Umounting #{partition_device}"
+ log.error("Umount failed!") unless SCR.Execute(path(".target.umount"), mnt_tmpdir)
+ end
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.182/src/lib/installation/select_system_role.rb new/yast2-installation-3.1.184/src/lib/installation/select_system_role.rb
--- old/yast2-installation-3.1.182/src/lib/installation/select_system_role.rb 2016-04-28 15:04:36.000000000 +0200
+++ new/yast2-installation-3.1.184/src/lib/installation/select_system_role.rb 2016-05-09 14:24:55.000000000 +0200
@@ -45,24 +45,19 @@
end
def dialog_title
- _("System Role")
+ Yast::ProductControl.GetTranslatedText("roles_caption")
end
def help_text
- "" # no Help, besides the descriptions in dialog body
+ Yast::ProductControl.GetTranslatedText("roles_help")
end
def dialog_content
- ui_roles = role_attributes.each_with_object(VBox()) do |r, vbox|
- vbox << Left(RadioButton(Id(r[:id]), r[:label]))
- vbox << HBox(
- HSpacing(Yast::UI.TextMode ? 4 : 2),
- Left(Label(r[:description]))
- )
- vbox << VSpacing(2)
- end
-
- RadioButtonGroup(Id(:roles), ui_roles)
+ VBox(
+ Left(Label(Yast::ProductControl.GetTranslatedText("roles_text"))),
+ VSpacing(2),
+ role_buttons
+ )
end
def create_dialog
@@ -95,6 +90,19 @@
Yast::ProductFeatures.ClearOverlay
end
+ def role_buttons
+ ui_roles = role_attributes.each_with_object(VBox()) do |r, vbox|
+ vbox << Left(RadioButton(Id(r[:id]), r[:label]))
+ vbox << HBox(
+ HSpacing(Yast::UI.TextMode ? 4 : 2),
+ Left(Label(r[:description]))
+ )
+ vbox << VSpacing(2)
+ end
+
+ RadioButtonGroup(Id(:roles), ui_roles)
+ end
+
def apply_role(role_id)
log.info "Applying system role '#{role_id}'"
features = raw_roles.find { |r| r["id"] == role_id }