Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2013-11-07 09:15:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
and /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2013-10-25 11:37:59.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2013-11-07 09:15:07.000000000 +0100
@@ -1,0 +2,22 @@
+Mon Nov 4 16:56:18 CET 2013 - locilka@suse.com
+
+- Removed obsolete clients: password, remotechooser, remoteinstall
+ (gh#yast/yast-yast2#100)
+
+-------------------------------------------------------------------
+Fri Nov 1 14:54:16 CET 2013 - locilka@suse.com
+
+- Removed checking for a fallback control file, that file is always
+ outdated and cannot work for all products
+ (gh#yast/yast-installation#86)
+- 3.1.3
+
+-------------------------------------------------------------------
+Thu Oct 31 21:50:05 CET 2013 - locilka@suse.com
+
+- Configuration of Kernel modules loaded on boot has been moved
+ to /etc/modules-load.d/*.conf files. Adapted Kernel library
+ internal handling (bnc#838185).
+- 3.1.2
+
+-------------------------------------------------------------------
Old:
----
yast2-3.1.2.tar.bz2
New:
----
yast2-3.1.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.fculeO/_old 2013-11-07 09:15:08.000000000 +0100
+++ /var/tmp/diff_new_pack.fculeO/_new 2013-11-07 09:15:08.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2
-Version: 3.1.2
+Version: 3.1.3
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -36,6 +36,7 @@
BuildRequires: yast2-ycp-ui-bindings >= 2.18.4
# Needed for tests
+BuildRequires: grep
BuildRequires: rubygem-rspec
# for symlinking yardoc duplicates
++++++ yast2-3.1.2.tar.bz2 -> yast2-3.1.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/.yardopts new/yast2-3.1.3/.yardopts
--- old/yast2-3.1.2/.yardopts 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.3/.yardopts 2013-11-04 18:12:02.000000000 +0100
@@ -0,0 +1 @@
+--no-private --markup markdown --protected library/*/src/**/*.rb --readme README.md --output-dir ./doc/autodocs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/CONTRIBUTING.md new/yast2-3.1.3/CONTRIBUTING.md
--- old/yast2-3.1.2/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.3/CONTRIBUTING.md 2013-11-04 18:12:02.000000000 +0100
@@ -0,0 +1,87 @@
+YaST Contribution Guidelines
+============================
+
+YaST is an open source project and as such it welcomes all kinds of
+contributions. If you decide to contribute, please follow these guidelines to
+ensure the process is effective and pleasant both for you and YaST maintainers.
+
+There are two main forms of contribution: reporting bugs and performing code
+changes.
+
+Bug Reports
+-----------
+
+If you find a problem, please report it either using
+[Bugzilla](https://bugzilla.novell.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
+or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
+registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
+if you don't have an account yet.)
+
+If you find a problem, please report it either using
+[Bugzilla](https://bugzilla.novell.com/) or GitHub issues. We can't guarantee
+that every bug will be fixed, but we'll try.
+
+When creating a bug report, please follow our [bug reporting
+guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
+
+Code Changes
+------------
+
+We welcome all kinds of code contributions, from simple bug fixes to significant
+refactorings and implementation of new features. However, before making any
+non-trivial contribution, get in touch with us first — this can prevent wasted
+effort on both sides. Also, have a look at our [development
+documentation](http://en.opensuse.org/openSUSE:YaST_development).
+
+To send us your code change, use GitHub pull requests. The workflow is as
+follows:
+
+ 1. Fork the project.
+
+ 2. Create a topic branch based on `master`.
+
+ 3. Implement your change, including tests (if possible). Make sure you adhere
+ to the [Ruby style
+ guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md).
+
+ 4. Make sure your change didn't break anything by building the RPM package
+ (`rake osc:build`). The build process includes running the full testsuite.
+
+ 5. Publish the branch and create a pull request.
+
+ 6. YaST developers will review your change and possibly point out issues.
+ Adapt the code under their guidance until they are all resolved.
+
+ 7. Finally, the pull request will get merged or rejected.
+
+See also [GitHub's guide on
+contributing](https://help.github.com/articles/fork-a-repo).
+
+If you want to do multiple unrelated changes, use separate branches and pull
+requests.
+
+Do not change the `VERSION` and `*.changes` files as this could lead to
+conflicts.
+
+### Commits
+
+Each commit in the pull request should do only one thing, which is clearly
+described by its commit message. Especially avoid mixing formatting changes and
+functional changes into one commit. When writing commit messages, adhere to
+[widely used
+conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
+
+If your commit is related to a bug in Buzgilla or an issue on GitHub, make sure
+you mention it in the commit message for cross-reference. Use format like
+bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
+autolinking](https://help.github.com/articles/github-flavored-markdown#references)
+and [openSUSE abbreviation
+reference](http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_...).
+
+Additional Information
+----------------------
+
+If you have any question, feel free to ask at the [development mailing
+list](http://lists.opensuse.org/yast-devel/) or at the
+[#yast](http://webchat.freenode.net/?channels=%23yast) IRC channel on freenode.
+We'll do our best to provide a timely and accurate answer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/VERSION new/yast2-3.1.3/VERSION
--- old/yast2-3.1.2/VERSION 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/VERSION 2013-11-04 18:12:02.000000000 +0100
@@ -1 +1 @@
-3.1.2
+3.1.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/control/src/modules/ProductControl.rb new/yast2-3.1.3/library/control/src/modules/ProductControl.rb
--- old/yast2-3.1.2/library/control/src/modules/ProductControl.rb 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/control/src/modules/ProductControl.rb 2013-11-04 18:12:03.000000000 +0100
@@ -80,17 +80,14 @@
# The custom control file location, usually copied from
# the root of the CD to the installation directory by linuxrc
- @default_control_file = "/control.xml"
+ @installation_control_file = "/control.xml"
# The file above get saved into the installed system for later
# processing
@saved_control_file = Ops.add(Directory.etcdir, "/control.xml")
- # The packaged file which contains all default worklfows
- @packaged_control_file = "/usr/share/YaST2/control/control.xml"
-
# The control file we are using for this session.
- @current_control_file = ""
+ @current_control_file = nil
# Current Wizard Step
@@ -1327,37 +1324,32 @@
# Initialize Product Control
# @return [Boolean] True on success
def Init
- ret = false
- @current_control_file = ""
- order = [
- @y2update_control_file, # /y2update/control.xml
- @default_control_file, # /control.xml
- @saved_control_file, # /etc/YaST2/control.xml
- @packaged_control_file
- ] # /usr/share/YaST2/control/control.xml
+ # Ordered list
+ control_file_candidates = [
+ @y2update_control_file, # /y2update/control.xml
+ @installation_control_file, # /control.xml
+ @saved_control_file, # /etc/YaST2/control.xml
+ ]
- if @custom_control_file != ""
- order = Builtins.prepend(order, @custom_control_file)
+ if @custom_control_file.nil?
+ Bultins.y2error("Incorrectly set custom control file: #{@custom_control_file}")
+ return false
end
- Builtins.y2milestone("Candidates: %1", order)
- Builtins.foreach(order) do |control_file|
- if FileUtils.Exists(control_file) && @current_control_file == ""
- @current_control_file = control_file
- raise Break
- end
- end
+ control_file_candidates.unshift(@custom_control_file) if !@custom_control_file.empty?
- if @current_control_file == ""
- Builtins.y2error("No control file found")
+ Builtins.y2milestone("Candidates: #{control_file_candidates.inspect}")
+ @current_control_file = control_file_candidates.find { |f| FileUtils.Exists(f) }
+ if @current_control_file.nil?
+ Builtins.y2error("No control file found within #{control_file_candidates.inspect}")
return false
end
- Builtins.y2milestone("Reading control file: %1", @current_control_file)
+ Builtins.y2milestone("Reading control file: #{@current_control_file}")
ReadControlFile(@current_control_file)
- @current_control_file != ""
+ true
end
# Re-translate static part of wizard dialog and other predefined messages
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/general/src/Makefile.am new/yast2-3.1.3/library/general/src/Makefile.am
--- old/yast2-3.1.2/library/general/src/Makefile.am 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/general/src/Makefile.am 2013-11-04 18:12:03.000000000 +0100
@@ -36,11 +36,6 @@
modules/MailTable.pm \
modules/MailTableInclude.pm
-client_DATA = \
- clients/remoteinstall.rb \
- clients/remotechooser.rb \
- clients/password.rb
-
scrconf_DATA = \
scrconf/content.scr \
scrconf/cfg_hotplug.scr \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/general/src/clients/password.rb new/yast2-3.1.3/library/general/src/clients/password.rb
--- old/yast2-3.1.2/library/general/src/clients/password.rb 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/general/src/clients/password.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-# encoding: utf-8
-
-# ***************************************************************************
-#
-# Copyright (c) 2002 - 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/password.ycp
-# Package: yast2
-# Summary: Ask user for password
-# Authors: Michal Svec
-#
-# $Id$
-#
-# Return the password, if user entered one.
-# Return nil, if user canceled or closed the window.
-module Yast
- class PasswordClient < Client
- def main
- Yast.import "UI"
-
- textdomain "base"
- Yast.import "Label"
-
- @contents = VBox(
- # TextEntry label
- Password(Id(:pw), _("&Enter Password:")),
- HBox(
- PushButton(Id(:ok), Opt(:hstretch, :default), Label.OKButton),
- PushButton(Id(:cancel), Opt(:hstretch), Label.CancelButton)
- )
- )
-
- UI.OpenDialog(@contents)
- UI.SetFocus(Id(:pw))
- @ret = nil
- if UI.UserInput == :ok
- @ret = Convert.to_string(UI.QueryWidget(Id(:pw), :Value))
- end
- UI.CloseDialog
- @ret
-
- # EOF
- end
- end
-end
-
-Yast::PasswordClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/general/src/clients/remotechooser.rb new/yast2-3.1.3/library/general/src/clients/remotechooser.rb
--- old/yast2-3.1.2/library/general/src/clients/remotechooser.rb 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/general/src/clients/remotechooser.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,190 +0,0 @@
-# encoding: utf-8
-
-# ***************************************************************************
-#
-# Copyright (c) 2002 - 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/remotechooser.ycp
-# Package: yast2
-# Summary: Remote administration client
-# Authors: Michal Svec
-#
-# $Id$
-module Yast
- class RemotechooserClient < Client
- def main
- Yast.import "UI"
-
- textdomain "base"
- Yast.import "Label"
-
- @host = "localhost"
- @user = ""
- @modul = "menu"
- @protocol = "ssh"
-
- @hosts = []
-
-
- Builtins.y2milestone("----------------------------------------")
- Builtins.y2milestone("Remote chooser module started")
-
- # Label text
- UI.OpenDialog(Label(_("Scanning for hosts in the local network...")))
- @hosts = Builtins.sort(Convert.to_list(SCR.Read(path(".net.hostnames"))))
- @hosts = [] if @hosts == nil
- UI.CloseDialog
-
- # Get the current user name
- @output = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), "echo \"$USER\"")
- )
- @user = Ops.get(
- Builtins.splitstring(Ops.get_string(@output, "stdout", ""), "\n"),
- 0,
- ""
- )
-
- @ret = nil
- while true
- @ret = ChooseDialog()
-
- if @ret == :abort || @ret == :cancel || @ret == :back
- break
- # Launch it
- elsif @ret == :next
- @launch = Ops.add(Ops.add(@protocol, "://"), @user)
- if @protocol != "su" && @protocol != "sudo"
- @launch = Ops.add(Ops.add(@launch, "@"), @host)
- end
- @launch = Ops.add(Ops.add(@launch, "/"), @modul)
-
- Builtins.y2milestone("Launching %1", @launch)
- WFM.CallFunction(@launch, [])
- next
- else
- Builtins.y2error("Unexpected return code: %1", @ret)
- next
- end
- end
-
- Builtins.y2milestone("Remote chooser module finished")
- Builtins.y2milestone("----------------------------------------")
-
- # EOF
-
- nil
- end
-
- def ChooseDialog
- # `Left(`HSquash(`RadioButtonGroup(`id(`protocol),
- # `VBox(
- # `Left(`RadioButton(`id("telnet"), "telnet", true)),
- # `Left(`RadioButton(`id("rlogin"), "rlogin")),
- # `Left(`RadioButton(`id("rsh"), "rsh")),
- # `Left(`RadioButton(`id("ssh"), "ssh")),
- # `Left(`RadioButton(`id("su"), "su")),
- # `Left(`RadioButton(`id("sudo"), "sudo"))))));
-
- contents = VBox(
- HSpacing(50),
- HBox(
- # SelectionBox label
- SelectionBox(Id(:hosts), Opt(:notify), _("&Available Hosts:"), @hosts),
- HSpacing(1.0),
- VBox(
- # TextEntry label
- TextEntry(Id(:host), _("&Host:"), @host),
- # TextEntry label
- TextEntry(Id(:user), _("&User name:"), @user),
- # TextEntry label
- TextEntry(Id(:modul), _("&Module to Start:"), @modul),
- # ComboBox label
- Left(
- ComboBox(
- Id(:protocol),
- _("Connection &Protocol:"),
- [
- Item(Id("ssh"), "ssh", @protocol == "ssh"),
- Item(Id("rsh"), "rsh", @protocol == "rsh"),
- Item(Id("rlogin"), "rlogin", @protocol == "rlogin"),
- Item(Id("telnet"), "telnet", @protocol == "telnet"),
- Item(Id("sudo"), "sudo", @protocol == "sudo"),
- Item(Id("su"), "su", @protocol == "su")
- ]
- )
- ),
- # `VCenter(ProtocolSelection()),
- VSpacing(1),
- HBox(
- # PushButton label
- PushButton(Id(:next), Opt(:default), _("&Launch")),
- HStretch(),
- PushButton(Id(:cancel), Label.CancelButton)
- )
- )
- )
- )
-
- UI.OpenDialog(contents)
-
- ret = nil
- while true
- ret = UI.UserInput
-
- if ret == :abort || ret == :cancel
- # if(ReallyAbort()) break;
- # else continue;
- break
- elsif ret == :hosts
- UI.ChangeWidget(
- Id(:host),
- :Value,
- UI.QueryWidget(Id(:hosts), :CurrentItem)
- )
- next
- elsif ret == :back
- break
- elsif ret == :next
- # FIXME check_*
- break
- else
- Builtins.y2error("Unexpected return code: %1", ret)
- next
- end
- end
-
- if ret == :next
- @protocol = Convert.to_string(UI.QueryWidget(Id(:protocol), :Value))
- @modul = Convert.to_string(UI.QueryWidget(Id(:modul), :Value))
- @user = Convert.to_string(UI.QueryWidget(Id(:user), :Value))
- @host = Convert.to_string(UI.QueryWidget(Id(:host), :Value))
-
- @host = "localhost" if @host == ""
- @modul = "menu" if @modul == ""
- end
-
- UI.CloseDialog
- deep_copy(ret)
- end
- end
-end
-
-Yast::RemotechooserClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/general/src/clients/remoteinstall.rb new/yast2-3.1.3/library/general/src/clients/remoteinstall.rb
--- old/yast2-3.1.2/library/general/src/clients/remoteinstall.rb 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/general/src/clients/remoteinstall.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,119 +0,0 @@
-# encoding: utf-8
-
-# ***************************************************************************
-#
-# Copyright (c) 2002 - 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/remoteinstall.ycp
-# Package: yast2
-# Summary: Remote installation client
-# Authors: Michal Svec
-#
-# $Id$
-module Yast
- class RemoteinstallClient < Client
- def main
- Yast.import "UI"
-
- textdomain "base"
- Yast.import "Label"
-
- Builtins.y2milestone("----------------------------------------")
- Builtins.y2milestone("Remote installation module started")
-
- @device = ""
- # Initialize the serial device
- @device = Convert.to_string(
- SCR.Read(path(".sysconfig.mouse.MOUSEDEVICE"))
- )
- if @device == "/dev/ttyS0"
- @device = "/dev/ttyS1"
- else
- @device = "/dev/ttyS0"
- end
- Builtins.y2debug("device=%1", @device)
-
- # Dialog contents
- @contents = HBox(
- HSpacing(1),
- VBox(
- VSpacing(0.2),
- # ComboBox label
- ComboBox(
- Id(:device),
- Opt(:editable),
- _("Select the Serial &Interface to Use:"),
- [
- Item(Id("/dev/ttyS0"), "/dev/ttyS0", @device == "/dev/ttyS0"),
- Item(Id("/dev/ttyS1"), "/dev/ttyS1", @device == "/dev/ttyS1")
- ]
- ),
- VSpacing(1),
- HBox(
- # PushButton label
- PushButton(Id(:next), Opt(:default), _("&Launch")),
- HStretch(),
- PushButton(Id(:cancel), Label.CancelButton)
- )
- ),
- HSpacing(1)
- )
-
- UI.OpenDialog(@contents)
- UI.SetFocus(Id(:device))
-
- # Main cycle
- @ret = nil
- while true
- @ret = UI.UserInput
-
- if @ret == :abort || @ret == :cancel || @ret == :back
- # if(ReallyAbort()) break;
- # else continue;
- break
- elsif @ret == :next
- # FIXME check_* device!="" and device exists
- break
- else
- Builtins.y2error("Unexpected return code: %1", @ret)
- next
- end
- end
-
- @device = Convert.to_string(UI.QueryWidget(Id(:device), :Value))
- UI.CloseDialog
-
- if @ret == :next
- @modulename = Ops.add("serial(115200):", @device)
- Builtins.y2debug("modulename=%1", @modulename)
- WFM.CallFunction(@modulename, [])
- end
-
- Builtins.y2milestone("Remote installation module finished")
- Builtins.y2milestone("----------------------------------------")
-
- # EOF
-
- nil
- end
- end
-end
-
-Yast::RemoteinstallClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/general/src/modules/Report.rb new/yast2-3.1.3/library/general/src/modules/Report.rb
--- old/yast2-3.1.2/library/general/src/modules/Report.rb 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/general/src/modules/Report.rb 2013-11-04 18:12:03.000000000 +0100
@@ -29,16 +29,20 @@
#
# $Id$
#
-# Report module collects warnings and errors from modules in auto installation mode.
-# Collected messages can be displayed later.
#
require "yast"
module Yast
+ # Report module is universal reporting module. It properly display messages
+ # in CLI, TUI, GUI or even in automatic installation. It also collects
+ # warnings and errors. Collected messages can be displayed later.
+ # @TODO not all methods respect all environment, feel free to open issue with
+ # method that doesn't respect it.
class ReportClass < Module
def main
textdomain "base"
+ Yast.import "Mode"
Yast.import "Popup"
Yast.import "Summary"
@@ -542,14 +546,19 @@
end
- # Store new error text
+ # Display and record error string.
+ #
+ # @note Displaying can be globally disabled using Display* methods.
# @param [String] error_string error text, it can contain new line characters ("\n")
- # @return [void]
+ # @return [nil]
def Error(error_string)
Builtins.y2error(1, "%1", error_string) if @log_errors
if @display_errors
- if Ops.greater_than(@timeout_errors, 0)
+ if Mode.commandline
+ Yast.import "CommandLine"
+ CommandLine.Print error_string
+ elsif Ops.greater_than(@timeout_errors, 0)
Popup.TimedError(error_string, @timeout_errors)
else
Popup.Error(error_string)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/Makefile.am new/yast2-3.1.3/library/system/Makefile.am
--- old/yast2-3.1.2/library/system/Makefile.am 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/system/Makefile.am 2013-11-04 18:12:03.000000000 +0100
@@ -1,3 +1,3 @@
# Makefile.am for yast2/library/system
-SUBDIRS = doc src testsuite
+SUBDIRS = doc src testsuite test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/src/modules/Kernel.rb new/yast2-3.1.3/library/system/src/modules/Kernel.rb
--- old/yast2-3.1.2/library/system/src/modules/Kernel.rb 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/system/src/modules/Kernel.rb 2013-11-04 18:12:03.000000000 +0100
@@ -38,6 +38,16 @@
module Yast
class KernelClass < Module
+
+ # default configuration file for Kernel modules loaded on boot
+ MODULES_CONF_FILE = "yast.conf"
+
+ # directory where configuration for Kernel modules loaded on boot is stored
+ MODULES_DIR = "/etc/modules-load.d/"
+
+ # SCR path for reading/writing Kernel modules
+ MODULES_SCR = Path.new(".kernel_modules_to_load")
+
def main
Yast.import "Pkg"
@@ -80,13 +90,9 @@
# modules loaded on boot
- # List of changes in /etc/sysconfig/kernel:MODULES_LOADED_ON_BOOT
- # Needs to be stored as a list of changes due to the fact that some RPMs
- # change the variable during installation
- # list member is a map with keys "operation" (value "add" or "detete") and
- # "name" (name of the module)
- @kernel_modules_to_load = []
-
+ # Kernel modules configured to be loaded on boot
+ @modules_to_load = nil
+ @modules_to_load_old = nil
# kernel was reinstalled
@@ -547,74 +553,78 @@
# functions related to kernel's modules loaded on boot
+
+
+ # Resets the internal cache
+ def reset_modules_to_load
+ @modules_to_load = nil
+ end
+
+ # Returns hash of kernel modules to be loaded on boot
+ # - key is the config file
+ # - value is list of modules in that particular file
+ #
+ # @return [Hash] of modules
+ def modules_to_load
+ read_modules_to_load if @modules_to_load.nil?
+
+ @modules_to_load
+ end
+
+ # Returns whether the given kernel module is included in list of modules
+ # to be loaded on boot
+ #
+ # @param [String] kernel module
+ # @return [Boolean] whether the given module is in the list
+ def module_to_be_loaded?(kernel_module)
+ modules_to_load.values.any? {|m| m.include?(kernel_module)}
+ end
+
# Add a kernel module to the list of modules to load after boot
# @param string module name
- # add the module name to sysconfig variable
def AddModuleToLoad(name)
Builtins.y2milestone("Adding module to be loaded at boot: %1", name)
- @kernel_modules_to_load = Builtins.add(
- @kernel_modules_to_load,
- { "operation" => "add", "name" => name }
- )
- nil
+ unless module_to_be_loaded?(name)
+ @modules_to_load[MODULES_CONF_FILE] << name
+ end
end
# Remove a kernel module from the list of modules to load after boot
# @param [String] name string the name of the module
def RemoveModuleToLoad(name)
- Builtins.y2milestone("Removing module to be loaded at boot: %1", name)
- @kernel_modules_to_load = Builtins.add(
- @kernel_modules_to_load,
- { "operation" => "remove", "name" => name }
- )
+ modules_to_load
- nil
+ return true unless module_to_be_loaded?(name)
+
+ Builtins.y2milestone("Removing module to be loaded at boot: %1", name)
+ @modules_to_load.each do |key, val|
+ val.delete(name)
+ end
end
# SaveModuleToLoad ()
- # save the sysconfig variable to the file
+ # save the sysconfig variable to /etc/modules-load.d/*.conf configuration files
# @return [Boolean] true on success
def SaveModulesToLoad
- # if nothing changed, just return success
- return true if Builtins.size(@kernel_modules_to_load) == 0
+ modules_to_load
+ success = true
- # first read current status
- modules_to_load_str = Convert.to_string(
- SCR.Read(path(".sysconfig.kernel.MODULES_LOADED_ON_BOOT"))
- )
- modules_to_load_str = "" if modules_to_load_str == nil
- modules_to_load = Builtins.splitstring(modules_to_load_str, " ")
- modules_to_load = Builtins.filter(modules_to_load) { |s| s != "" }
- Builtins.y2milestone(
- "Read modules to be loaded at boot: %1",
- modules_to_load
- )
+ @modules_to_load.each do |file, modules|
+ # The content hasn't changed
+ next if (modules.sort == @modules_to_load_old[file].sort)
- # apply operations on the list
- Builtins.foreach(@kernel_modules_to_load) do |op_desc|
- op = Ops.get(op_desc, "operation", "")
- name = Ops.get(op_desc, "name", "")
- if op == "remove"
- modules_to_load = Builtins.filter(modules_to_load) { |m| m != name }
- elsif op == "add"
- if !Builtins.contains(modules_to_load, name)
- modules_to_load = Builtins.add(modules_to_load, name)
- end
+ if !register_modules_agent(file)
+ Builtins.y2error("Cannot register new SCR agent for #{file_path} file")
+ success = false
+ next
end
+
+ SCR::Write(MODULES_SCR, modules)
+ SCR.UnregisterAgent(MODULES_SCR)
end
- # and sabe the list
- Builtins.y2milestone(
- "Saving modules to be loaded at boot: %1",
- modules_to_load
- )
- modules_to_load_str = Builtins.mergestring(modules_to_load, " ")
- SCR.Write(
- path(".sysconfig.kernel.MODULES_LOADED_ON_BOOT"),
- modules_to_load_str
- )
- SCR.Write(path(".sysconfig.kernel"), nil)
+ success
end
# kernel was reinstalled stuff
@@ -640,6 +650,65 @@
@inform_about_kernel_change
end
+ private
+
+ # Registers new SCR agent for a file given as parameter
+ #
+ # @param [String] file name in directory defined in MODULES_DIR
+ def register_modules_agent(file_name)
+ full_path = File.join(MODULES_DIR, file_name)
+
+ SCR::RegisterAgent(
+ MODULES_SCR,
+ term(
+ :ag_anyagent,
+ term(
+ :Description,
+
+ term(
+ :File,
+ full_path
+ ),
+
+ # Comments
+ "#\n",
+
+ # Read-only?
+ false,
+
+ term(
+ :List,
+ term(:String, "^\n"),
+ "\n"
+ )
+ )
+ )
+ )
+ end
+
+ # Loads the current configuration of Kernel modules
+ # to be loaded on boot to the internal cache
+ #
+ # @return [Hash] with the configuration
+ def read_modules_to_load
+ @modules_to_load = {MODULES_CONF_FILE => []}
+
+ SCR::Read(path(".target.dir"), MODULES_DIR).each do |file_name|
+ next unless file_name =~ /^.+\.conf$/
+
+ if !register_modules_agent(file_name)
+ Builtins.y2error("Cannot register new SCR agent for #{file_path} file")
+ next
+ end
+
+ @modules_to_load[file_name] = SCR::Read(MODULES_SCR)
+ SCR.UnregisterAgent(MODULES_SCR)
+ end
+
+ @modules_to_load_old = deep_copy(@modules_to_load)
+ @modules_to_load
+ end
+
publish :function => :AddCmdLine, :type => "void (string, string)"
publish :function => :GetVgaType, :type => "string ()"
publish :function => :SetVgaType, :type => "void (string)"
@@ -654,12 +723,16 @@
publish :function => :GetFinalKernel, :type => "string ()"
publish :function => :ComputePackagesForBase, :type => "list <string> (string, boolean)"
publish :function => :ComputePackages, :type => "list <string> ()"
- publish :function => :AddModuleToLoad, :type => "void (string)"
- publish :function => :RemoveModuleToLoad, :type => "void (string)"
- publish :function => :SaveModulesToLoad, :type => "boolean ()"
publish :function => :SetInformAboutKernelChange, :type => "void (boolean)"
publish :function => :GetInformAboutKernelChange, :type => "boolean ()"
publish :function => :InformAboutKernelChange, :type => "boolean ()"
+
+ # Handling for Kernel modules loaded on boot
+ publish :function => :AddModuleToLoad, :type => "void (string)"
+ publish :function => :RemoveModuleToLoad, :type => "void (string)"
+ publish :function => :SaveModulesToLoad, :type => "boolean ()"
+ publish :function => :reset_modules_to_load, :type => "void ()"
+ publish :function => :modules_to_load, :type => "map ()"
end
Kernel = KernelClass.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/test/Makefile.am new/yast2-3.1.3/library/system/test/Makefile.am
--- old/yast2-3.1.2/library/system/test/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.3/library/system/test/Makefile.am 2013-11-04 18:12:03.000000000 +0100
@@ -0,0 +1,7 @@
+TESTS = \
+ kernel_test.rb
+
+TEST_EXTENSIONS = .rb
+RB_LOG_COMPILER = rspec
+VERBOSE = 1
+EXTRA_DIST = $(TESTS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/test/data/modules.d/MODULES_LOADED_ON_BOOT.conf new/yast2-3.1.3/library/system/test/data/modules.d/MODULES_LOADED_ON_BOOT.conf
--- old/yast2-3.1.2/library/system/test/data/modules.d/MODULES_LOADED_ON_BOOT.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.3/library/system/test/data/modules.d/MODULES_LOADED_ON_BOOT.conf 2013-11-04 18:12:03.000000000 +0100
@@ -0,0 +1,10 @@
+#
+# These kernel modules will be loaded on boot
+# One module per line
+#
+
+# Some comment
+module-a
+
+# Another comment
+module-b
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/test/data/modules.d/not_a_conf_file new/yast2-3.1.3/library/system/test/data/modules.d/not_a_conf_file
--- old/yast2-3.1.2/library/system/test/data/modules.d/not_a_conf_file 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.3/library/system/test/data/modules.d/not_a_conf_file 2013-11-04 18:12:03.000000000 +0100
@@ -0,0 +1,4 @@
+Whatever is here
+must not be loaded
+as a kernel
+module
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/test/data/modules.d/user-added-1.conf new/yast2-3.1.3/library/system/test/data/modules.d/user-added-1.conf
--- old/yast2-3.1.2/library/system/test/data/modules.d/user-added-1.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.3/library/system/test/data/modules.d/user-added-1.conf 2013-11-04 18:12:03.000000000 +0100
@@ -0,0 +1,7 @@
+user-module-1
+user-module-2
+
+# User comment
+# on several
+# lines
+user-module-3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/test/data/modules.d/user-added-2.conf new/yast2-3.1.3/library/system/test/data/modules.d/user-added-2.conf
--- old/yast2-3.1.2/library/system/test/data/modules.d/user-added-2.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.3/library/system/test/data/modules.d/user-added-2.conf 2013-11-04 18:12:03.000000000 +0100
@@ -0,0 +1 @@
+user-module-4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/test/kernel_test.rb new/yast2-3.1.3/library/system/test/kernel_test.rb
--- old/yast2-3.1.2/library/system/test/kernel_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.3/library/system/test/kernel_test.rb 2013-11-04 18:12:03.000000000 +0100
@@ -0,0 +1,116 @@
+#! /usr/bin/env rspec
+
+ENV["Y2DIR"] = File.expand_path("../../src", __FILE__)
+
+require "yast"
+require "tmpdir"
+
+include Yast
+
+Yast.import "Kernel"
+
+DEFAULT_DATA_DIR = File.join(File.expand_path(File.dirname(__FILE__)), "data/modules.d")
+
+describe "Kernel" do
+ before (:each) do
+ stub_const("Yast::KernelClass::MODULES_DIR", DEFAULT_DATA_DIR)
+ @default_modules = {
+ Yast::KernelClass::MODULES_CONF_FILE => [],
+ "MODULES_LOADED_ON_BOOT.conf"=>["module-a", "module-b"],
+ "user-added-1.conf" => ["user-module-1", "user-module-2", "user-module-3"],
+ "user-added-2.conf"=>["user-module-4"],
+ }
+ Yast::Kernel.reset_modules_to_load
+ end
+
+ describe "#modules_to_load" do
+ it "returns hash of modules to load" do
+ expect(Yast::Kernel.modules_to_load).to eq(@default_modules)
+ end
+ end
+
+ describe "#module_to_be_loaded?" do
+ it "tests whether module is loaded on boot" do
+ ["module-a", "module-b", "user-module-1", "user-module-2", "user-module-3", "user-module-4"].each do |kernel_module|
+ expect(Yast::Kernel.module_to_be_loaded?(kernel_module)).to be_true
+ end
+
+ ["module-c", "user-module-5"].each do |kernel_module|
+ expect(Yast::Kernel.module_to_be_loaded?(kernel_module)).to be_false
+ end
+ end
+ end
+
+ describe "#AddModuleToLoad" do
+ it "adds new module to be loaded on boot" do
+ new_module = "new-kernel-module"
+ expect(Yast::Kernel.module_to_be_loaded?(new_module)).to be_false
+ Yast::Kernel.AddModuleToLoad new_module
+ expect(Yast::Kernel.module_to_be_loaded?(new_module)).to be_true
+ end
+
+ it "adds module only once" do
+ new_module = "new-kernel-module"
+ Yast::Kernel.AddModuleToLoad new_module
+ Yast::Kernel.AddModuleToLoad new_module
+ expect(Yast::Kernel.modules_to_load.values.flatten.select{|m| m == new_module}.size).to eq(1)
+ end
+ end
+
+ describe "#RemoveModuleToLoad" do
+ it "removes module from list of modules to be loaded on boot" do
+ module_to_remove = "user-module-2"
+ expect(Yast::Kernel.module_to_be_loaded?(module_to_remove)).to be_true
+ Yast::Kernel.RemoveModuleToLoad module_to_remove
+ expect(Yast::Kernel.module_to_be_loaded?(module_to_remove)).to be_false
+ end
+
+ it "does not remove module which is not in list" do
+ module_to_remove = "not-in-list"
+ expect(Yast::Kernel.module_to_be_loaded?(module_to_remove)).to be_false
+ Yast::Kernel.RemoveModuleToLoad module_to_remove
+ expect(Yast::Kernel.module_to_be_loaded?(module_to_remove)).to be_false
+ end
+ end
+
+ describe "#SaveModulesToLoad" do
+ it "stores all modules to be loaded to configuration files" do
+ Dir.mktmpdir do |tmpdir|
+ FileUtils.cp_r(DEFAULT_DATA_DIR + "/.", tmpdir)
+
+ stub_const("Yast::KernelClass::MODULES_DIR", tmpdir)
+ Yast::Kernel.reset_modules_to_load
+
+ # Tests on the default data
+ ["module-a", "module-b", "user-module-1", "user-module-2", "user-module-3", "user-module-4"].each do |kernel_module|
+ expect(Yast::Kernel.module_to_be_loaded?(kernel_module)).to be_true
+ end
+
+ new_module = "new-kernel-module"
+ remove_module = "user-module-2"
+
+ # Modifying data
+ Yast::Kernel.AddModuleToLoad new_module
+ Yast::Kernel.RemoveModuleToLoad remove_module
+
+ expect(Yast::Kernel.SaveModulesToLoad).to be_true
+
+ # Tests on the stored modified data
+ Yast::Kernel.reset_modules_to_load
+ ["module-a", "module-b", "user-module-1", "user-module-3", "user-module-4", new_module].each do |kernel_module|
+ expect(Yast::Kernel.module_to_be_loaded?(kernel_module)).to be_true
+ end
+
+ expect(Yast::Kernel.module_to_be_loaded?(remove_module)).to be_false
+
+ # Tests directly on the system
+ number_of_nkm = `grep --count --no-filename #{new_module} #{tmpdir}/*`
+ expect(number_of_nkm.split.map(&:to_i).inject(:+)).to eq(1)
+
+ number_of_rkm = `grep --count --no-filename #{remove_module} #{tmpdir}/*`
+ expect(number_of_rkm.split.map(&:to_i).inject(:+)).to eq(0)
+ end
+ end
+ end
+
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/testsuite/tests/kernel.out new/yast2-3.1.3/library/system/testsuite/tests/kernel.out
--- old/yast2-3.1.2/library/system/testsuite/tests/kernel.out 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/system/testsuite/tests/kernel.out 2013-11-04 18:12:03.000000000 +0100
@@ -1,11 +1,4 @@
Dump ----------------------------------------
-Dump Testing modules to load on boot behavior
-Return nil
-Return nil
-Read .sysconfig.kernel.MODULES_LOADED_ON_BOOT "reiserfs xfs"
-Write .sysconfig.kernel.MODULES_LOADED_ON_BOOT "xfs ext2" true
-Write .sysconfig.kernel nil true
-Return true
Return nil
Return
Return ABC=213 DEF=324
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/library/system/testsuite/tests/kernel.rb new/yast2-3.1.3/library/system/testsuite/tests/kernel.rb
--- old/yast2-3.1.2/library/system/testsuite/tests/kernel.rb 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/library/system/testsuite/tests/kernel.rb 2013-11-04 18:12:03.000000000 +0100
@@ -78,14 +78,7 @@
# test behavior of modules loaded on boot
DUMP("----------------------------------------")
- DUMP("Testing modules to load on boot behavior")
- TEST(lambda { Kernel.AddModuleToLoad("ext2") }, [@READ, @WRITE, @EXEC], 0)
- TEST(lambda { Kernel.RemoveModuleToLoad("reiserfs") }, [
- @READ,
- @WRITE,
- @EXEC
- ], 0)
- TEST(lambda { Kernel.SaveModulesToLoad }, [@READ, @WRITE, @EXEC], 0)
+
TEST(lambda { Kernel.HidePasswords(nil) }, [@READ, @WRITE, @EXEC], 0)
TEST(lambda { Kernel.HidePasswords("") }, [@READ, @WRITE, @EXEC], 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/package/yast2.changes new/yast2-3.1.3/package/yast2.changes
--- old/yast2-3.1.2/package/yast2.changes 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/package/yast2.changes 2013-11-04 18:12:03.000000000 +0100
@@ -1,4 +1,26 @@
-------------------------------------------------------------------
+Mon Nov 4 16:56:18 CET 2013 - locilka@suse.com
+
+- Removed obsolete clients: password, remotechooser, remoteinstall
+ (gh#yast/yast-yast2#100)
+
+-------------------------------------------------------------------
+Fri Nov 1 14:54:16 CET 2013 - locilka@suse.com
+
+- Removed checking for a fallback control file, that file is always
+ outdated and cannot work for all products
+ (gh#yast/yast-installation#86)
+- 3.1.3
+
+-------------------------------------------------------------------
+Thu Oct 31 21:50:05 CET 2013 - locilka@suse.com
+
+- Configuration of Kernel modules loaded on boot has been moved
+ to /etc/modules-load.d/*.conf files. Adapted Kernel library
+ internal handling (bnc#838185).
+- 3.1.2
+
+-------------------------------------------------------------------
Tue Oct 22 11:17:25 UTC 2013 - mfilka@suse.com
- bnc#846550
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.2/package/yast2.spec new/yast2-3.1.3/package/yast2.spec
--- old/yast2-3.1.2/package/yast2.spec 2013-10-22 15:58:03.000000000 +0200
+++ new/yast2-3.1.3/package/yast2.spec 2013-11-04 18:12:03.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2
-Version: 3.1.1
+Version: 3.1.3
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -33,7 +33,7 @@
BuildRequires: yast2-core >= 2.18.12 yast2-pkg-bindings >= 2.20.3 yast2-ycp-ui-bindings >= 2.18.4
# Needed for tests
-BuildRequires: rubygem-rspec
+BuildRequires: rubygem-rspec grep
# for symlinking yardoc duplicates
BuildRequires: fdupes
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org