Hello community,
here is the log from the commit of package yast2-installation for
openSUSE:Factory checked in at 2014-01-21 07:02:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
2014-01-09 17:26:58.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes
2014-01-23 15:59:03.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Jan 13 09:58:46 UTC 2014 - [email protected]
+
+- add clone proposal and finish client (FATE#308539)
+- 3.1.19
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-3.1.18.tar.bz2
New:
----
yast2-installation-3.1.19.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.QMQtG9/_old 2014-01-23 15:59:04.000000000 +0100
+++ /var/tmp/diff_new_pack.QMQtG9/_new 2014-01-23 15:59:04.000000000 +0100
@@ -17,12 +17,13 @@
Name: yast2-installation
-Version: 3.1.18
+Version: 3.1.19
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
+Url: http://github.com/yast/yast-installation
Requires: yast2-ruby-bindings >= 1.0.0
Summary: YaST2 - Installation Parts
@@ -42,8 +43,8 @@
# Linuxrc.keys
BuildRequires: yast2 >= 3.1.9
-# AutoinstConfig::getProposalList
-Requires: autoyast2-installation >= 2.17.1
+# clone_system client
+Requires: autoyast2-installation >= 3.1.5
# ProductProfile
Requires: yast2 >= 3.1.9
@@ -193,6 +194,7 @@
%dir /usr/share/autoinstall/modules
%dir %{yast_yncludedir}/installation
%{yast_yncludedir}/installation/*
+%{yast_libdir}/installation
# agents
%{yast_scrconfdir}/etc_passwd.scr
++++++ yast2-installation-3.1.18.tar.bz2 -> yast2-installation-3.1.19.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.18/doc/installation_clients.md
new/yast2-installation-3.1.19/doc/installation_clients.md
--- old/yast2-installation-3.1.18/doc/installation_clients.md 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.19/doc/installation_clients.md 2014-01-20
16:55:14.000000000 +0100
@@ -0,0 +1,61 @@
+Installation Clients
+======================
+
+Installation uses some special clients for inst modules. The goal of this
+article is to describe which one is needed for each task.
+
+
+Wizard Plug-in (`inst_` client)
+-----------------------------------------
+
+When a new dialog needs to be added into the installation work-flow then a new
+client with `inst_` prefix needs to be created. (In general it can be any
+client, this is a convention. The work-flow manager can find also the clients
+without the prefix.)
+
+The new client needs to be added to the installation control file to (the
work-flow
+section)[TODO link], and the file must be present in the inst-sys during
+installation. (It can be part of the inst-sys or it can be added dynamically
+from an add-on media or via (Driver
Update)[http://en.opensuse.org/SDB:Linuxrc#p_dud])
+
+
+Installation Summary Plug-in (`_proposal` client)
+-----------------------------------------------------------
+
+When a new module should be seen only in the installation summary page or in a
+different proposal screen, then a client with suffix `_proposal` is used. Such
+client must accept string as the first parameter which specifies the action
+which is being performed and a `Hash` as the second parameter with optional
+arguments.
+
+The proposals are defined in the installation control file in (the proposal
+section)[TODO link].
+
+The actions can be:
+
+- `"MakeProposal"` that creates a proposal for the module. It can have
parameter `"force_reset"`
+ that can force reset and create a new one from scratch. Response is a `Hash`
with proposal text,
+ optional link definitions and a help text. **TODO specify exactly format.**
+- `"AskUser"` for automatic or manual user request to change the proposed
configuration. Parameter is
+ `"chosen_id"` which specify action. It can be `"id"` from `"Description"`
action
+ which should open dialog to modify values or links specified in
`"MakeProposal"`
+ which should do action depending on link like disable service. Returns if
proposal changed. **TODO exact structure**
+- `"Description"` to get the description of the proposal in rich text, menu
item and its `"id"`.
+ **TODO describe here exact structure and examples**
+- `"Write"` to write the settings. Called only if the proposal is not skipped.
**TODO looks like now all proposals are skipped**
+
+
+Write Plug-in at the End of Installation (`_finish` client )
+--------------------------------------------
+
+When a module needs to write its settings at the end of installation then a
+client with suffix `_finish` is used. Such client must accept string as the
+first parameter which specifies the action that is being performed.
+
+The list finish clients is specified in `inst_finish.rb` client.
+
+Actions can be:
+
+- `"Info"` that gets the information about client (like number of steps, its
title
+ and in which mode it should be used). **TODO exact structure and example**
+- `"Write"` to write the settings.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.18/package/yast2-installation.changes
new/yast2-installation-3.1.19/package/yast2-installation.changes
--- old/yast2-installation-3.1.18/package/yast2-installation.changes
2014-01-08 15:45:47.000000000 +0100
+++ new/yast2-installation-3.1.19/package/yast2-installation.changes
2014-01-20 16:55:14.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Jan 13 09:58:46 UTC 2014 - [email protected]
+
+- add clone proposal and finish client (FATE#308539)
+- 3.1.19
+
+-------------------------------------------------------------------
Wed Jan 8 12:46:34 UTC 2014 - [email protected]
- added capability to install OEM images (fate#316326)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.18/package/yast2-installation.spec
new/yast2-installation-3.1.19/package/yast2-installation.spec
--- old/yast2-installation-3.1.18/package/yast2-installation.spec
2014-01-08 15:45:47.000000000 +0100
+++ new/yast2-installation-3.1.19/package/yast2-installation.spec
2014-01-20 16:55:14.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.18
+Version: 3.1.19
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -25,6 +25,7 @@
Group: System/YaST
License: GPL-2.0
+Url: http://github.com/yast/yast-installation
Requires: yast2-ruby-bindings >= 1.0.0
Summary: YaST2 - Installation Parts
@@ -39,8 +40,8 @@
# Linuxrc.keys
BuildRequires: yast2 >= 3.1.9
-# AutoinstConfig::getProposalList
-Requires: autoyast2-installation >= 2.17.1
+# clone_system client
+Requires: autoyast2-installation >= 3.1.5
# ProductProfile
Requires: yast2 >= 3.1.9
@@ -190,6 +191,7 @@
%dir /usr/share/autoinstall/modules
%dir %{yast_yncludedir}/installation
%{yast_yncludedir}/installation/*
+%{yast_libdir}/installation
# agents
%{yast_scrconfdir}/etc_passwd.scr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-installation-3.1.18/src/Makefile.am
new/yast2-installation-3.1.19/src/Makefile.am
--- old/yast2-installation-3.1.18/src/Makefile.am 2014-01-08
15:45:47.000000000 +0100
+++ new/yast2-installation-3.1.19/src/Makefile.am 2014-01-20
16:55:14.000000000 +0100
@@ -8,6 +8,8 @@
modules/SystemFilesCopy.rb
client_DATA = \
+ clients/clone_proposal.rb \
+ clients/clone_finish.rb \
clients/copy_files_finish.rb \
clients/copy_logs_finish.rb \
clients/copy_systemfiles_finish.rb \
@@ -100,6 +102,11 @@
fillup_DATA = \
fillup/sysconfig.security-checksig
-EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA)
$(schemafiles_DATA) $(desktop_DATA) $(fillup_DATA)
+ylibdir = "${yast2dir}/lib/installation"
+ylib_DATA = \
+ lib/installation/clone_settings.rb
+
+
+EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA)
$(schemafiles_DATA) $(desktop_DATA) $(fillup_DATA) $(ylib_DATA)
include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.18/src/clients/clone_finish.rb
new/yast2-installation-3.1.19/src/clients/clone_finish.rb
--- old/yast2-installation-3.1.18/src/clients/clone_finish.rb 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.19/src/clients/clone_finish.rb 2014-01-20
16:55:14.000000000 +0100
@@ -0,0 +1,70 @@
+# encoding: utf-8
+
+#
------------------------------------------------------------------------------
+# Copyright (c) 2014 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.
+#
------------------------------------------------------------------------------
+
+
+module Yast
+ import "Installation"
+
+ class CloneFinishClient < Client
+ def main
+
+ textdomain "installation"
+
+ func = ""
+
+ # Check arguments
+ args = WFM.Args
+ if args.size > 0 && args[0].is_a?(::String)
+ func = args[0]
+ end
+
+ Builtins.y2milestone("starting clone_finish")
+ Builtins.y2debug("func=%1", func)
+
+ case func
+ when "Info"
+ return {
+ "steps" => 1,
+ # progress step title
+ "title" => _(
+ "Generating AutoYaST profile if needed..."
+ ),
+ "when" => [:installation]
+ }
+ when "Write"
+ WFM.call("clone_proposal", ["Write"])
+
+ # copy from insts_sys to target system
+ if File.exists? "/root/autoinst.xml"
+ WFM.Execute(path(".local.bash"), "cp /root/autoinst.xml
#{Installation.destdir}/root/autoinst.xml")
+ end
+
+ Builtins.y2milestone("clone_finish Write finished")
+ else
+ raise ("unknown function: #{func}")
+ end
+
+ return nil
+ end
+ end
+end
+
+Yast::CloneFinishClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.18/src/clients/clone_proposal.rb
new/yast2-installation-3.1.19/src/clients/clone_proposal.rb
--- old/yast2-installation-3.1.18/src/clients/clone_proposal.rb 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.19/src/clients/clone_proposal.rb 2014-01-20
16:55:14.000000000 +0100
@@ -0,0 +1,125 @@
+require "installation/clone_settings"
+
+module Yast
+ import "UI"
+ import "Label"
+
+ class CloneProposalClient < Client
+ CLONE_ENABLE_LINK = "clone_enable"
+ CLONE_DISABLE_LINK = "clone_disable"
+ CLONE_ACTION_ID = "clone"
+
+ def main
+ textdomain "installation"
+
+ @clone_settings = ::Installation::CloneSettings.instance
+ Yast.import "Installation"
+ Yast.import "ProductFeatures"
+
+ func = WFM.Args(0)
+ param = WFM.Args(1)
+
+ product_clone_active = ProductFeatures.GetBooleanFeature(
+ "globals",
+ "enable_clone"
+ )
+ if @clone_settings.enabled.nil?
+ y2milestone("Set default value for cloning")
+ @clone_settings.enabled = product_clone_active
+ end
+
+ case func
+ when "MakeProposal"
+ @clone_settings.enabled = product_clone_active if param["force_reset"]
+
+ ret = {
+ "preformatted_proposal" => proposal_text,
+ "links" => [CLONE_ENABLE_LINK, CLONE_DISABLE_LINK],
+ # TRANSLATORS: help text
+ "help" => _(
+ "<p>Use <b>Clone System Settings</b> if you want to create an
AutoYaST profile.\n" +
+ "AutoYaST is a way to do a complete SUSE Linux installation
without user interaction. AutoYaST\n" +
+ "needs a profile to know what the installed system should look
like. If this option is\n" +
+ "selected, a profile of the current system is stored in
<tt>/root/autoinst.xml</tt>.</p>"
+ )
+ }
+ when "AskUser"
+ chosen_id = Ops.get(param, "chosen_id")
+ Builtins.y2milestone(
+ "Clone proposal change requested, id %1",
+ chosen_id
+ )
+
+ case chosen_id
+ when CLONE_DISABLE_LINK
+ @clone_settings.enabled = false
+ when CLONE_ENABLE_LINK
+ @clone_settings.enabled = true
+ when CLONE_ACTION_ID
+ clone_dialog
+ else
+ raise "Unexpected value #{chosen_id}"
+ end
+
+ ret = { "workflow_sequence" => :next }
+ when "Description"
+ ret = {
+ # this is a heading
+ "rich_text_title" => _("Clone System Configuration"),
+ # this is a menu entry
+ "menu_title" => _("&Clone System Configuration"),
+ "id" => CLONE_ACTION_ID
+ }
+ when "Write"
+ WFM.call "clone_system" if @clone_settings.enabled?
+ ret = true
+ else
+ raise "Unsuported action #{func}"
+ end
+
+ return ret
+ end
+
+ def proposal_text
+ ret = "<ul><li>\n"
+
+ if @clone_settings.enabled?
+ ret << Builtins.sformat(
+ # TRANSLATORS: Installation overview
+ # IMPORTANT: Please, do not change the HTML link <a
href="...">...</a>, only visible text
+ _(
+ "The AutoYaST profile will be written under /root/autoinst.xml (<a
href=\"%1\">do not write it</a>)."
+ ),
+ CLONE_DISABLE_LINK
+ )
+ else
+ ret << Builtins.sformat(
+ # TRANSLATORS: Installation overview
+ # IMPORTANT: Please, do not change the HTML link <a
href="...">...</a>, only visible text
+ _(
+ "The AutoYaST profile will not be saved (<a href=\"%1\">write
it</a>)."
+ ),
+ CLONE_ENABLE_LINK
+ )
+ end
+
+ ret << "</li></ul>\n"
+ end
+
+ def clone_dialog
+ dialog = VBox(
+ CheckBox(Id(:value_holder), _("Write AutoYaST profile to
/root/autoinst.xml"),
+ @clone_settings.enabled?
+ ),
+ PushButton(Id(:ok), Label.OKButton)
+ )
+
+ UI.OpenDialog dialog
+ UI.UserInput
+ @clone_settings.enabled = UI.QueryWidget(:value_holder, :Value)
+ UI.CloseDialog
+ end
+ end
+end
+
+Yast::CloneProposalClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-installation-3.1.18/src/clients/inst_finish.rb
new/yast2-installation-3.1.19/src/clients/inst_finish.rb
--- old/yast2-installation-3.1.18/src/clients/inst_finish.rb 2014-01-08
15:45:47.000000000 +0100
+++ new/yast2-installation-3.1.19/src/clients/inst_finish.rb 2014-01-20
16:55:14.000000000 +0100
@@ -129,6 +129,7 @@
"autoinst_scripts1",
"copy_files",
"copy_systemfiles",
+ "clone",
# For live installer only
Mode.live_installation ? "live_copy_files" : "",
"switch_scr"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.18/src/lib/installation/clone_settings.rb
new/yast2-installation-3.1.19/src/lib/installation/clone_settings.rb
--- old/yast2-installation-3.1.18/src/lib/installation/clone_settings.rb
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.19/src/lib/installation/clone_settings.rb
2014-01-20 16:55:14.000000000 +0100
@@ -0,0 +1,11 @@
+require "singleton"
+
+module Installation
+ # helper module to make proposal value persistent
+ class CloneSettings
+ include Singleton
+
+ attr_accessor :enabled
+ alias_method :enabled?, :enabled
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-installation-3.1.18/startup/Makefile.am
new/yast2-installation-3.1.19/startup/Makefile.am
--- old/yast2-installation-3.1.18/startup/Makefile.am 2014-01-08
15:45:47.000000000 +0100
+++ new/yast2-installation-3.1.19/startup/Makefile.am 2014-01-20
16:55:14.000000000 +0100
@@ -4,7 +4,6 @@
ystartupbindir=$(ystartupdir)/startup
ystartupbin_SCRIPTS = \
- AUTHOR \
YaST2.First-Stage \
YaST2.Second-Stage \
YaST2.call \
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]