Hello community,
here is the log from the commit of package yast2-firstboot for openSUSE:Factory
checked in at 2019-12-16 17:26:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-firstboot (Old)
and /work/SRC/openSUSE:Factory/.yast2-firstboot.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-firstboot"
Mon Dec 16 17:26:23 2019 rev:84 rq:756862 version:4.2.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-firstboot/yast2-firstboot.changes
2019-10-27 13:35:52.492880001 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-firstboot.new.4691/yast2-firstboot.changes
2019-12-16 17:26:24.823959072 +0100
@@ -1,0 +2,10 @@
+Fri Dec 13 00:11:32 UTC 2019 - David Diaz <[email protected]>
+
+- Improve the "firstboot_licenses" client to give precedence to
+ the directory argument, allowing to use it multiple times to show
+ different licenses (bsc#1154708).
+- Remove the references to the already dropped automatic
+ configuration feature (FATE#314695).
+- 4.2.5
+
+-------------------------------------------------------------------
Old:
----
yast2-firstboot-4.2.4.tar.bz2
New:
----
yast2-firstboot-4.2.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-firstboot.spec ++++++
--- /var/tmp/diff_new_pack.YSsNfw/_old 2019-12-16 17:26:25.219958913 +0100
+++ /var/tmp/diff_new_pack.YSsNfw/_new 2019-12-16 17:26:25.219958913 +0100
@@ -17,7 +17,7 @@
Name: yast2-firstboot
-Version: 4.2.4
+Version: 4.2.5
Release: 0
Summary: YaST2 - Initial System Configuration
License: GPL-2.0-only
++++++ yast2-firstboot-4.2.4.tar.bz2 -> yast2-firstboot-4.2.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-firstboot-4.2.4/control/firstboot.xml
new/yast2-firstboot-4.2.5/control/firstboot.xml
--- old/yast2-firstboot-4.2.4/control/firstboot.xml 2019-10-23
16:56:27.000000000 +0200
+++ new/yast2-firstboot-4.2.5/control/firstboot.xml 2019-12-13
17:31:27.000000000 +0100
@@ -30,35 +30,6 @@
For more variables that can be in this section, look into the control
file
(/etc/YaST2/control.xml or root directory of installation media)
-->
-
- <!--
- Definition of Automatic Configuration Steps follows - each step
- runs non-interactive configuration. To enable steps defined in
- Automatic Configuration, enable inst_automatic_configuration in the
- workflow.
- -->
- <automatic_configuration config:type="list">
- <!-- Configure network -->
- <ac_step>
- <text_id>ac_label_1</text_id>
- <icon>yast-lan</icon>
- <type>proposals</type>
- <ac_items config:type="list">
- <ac_item>lan</ac_item>
- </ac_items>
- </ac_step>
- <!--
- Configure printer (needs configured network for net-detection)
- -->
- <ac_step>
- <text_id>ac_label_2</text_id>
- <icon>yast-hwinfo</icon>
- <type>proposals</type>
- <ac_items config:type="list">
- <ac_item>printer</ac_item>
- </ac_items>
- </ac_step>
- </automatic_configuration>
</globals>
<proposals config:type="list">
<proposal>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-firstboot-4.2.4/doc/firstboot-section_mod.xml
new/yast2-firstboot-4.2.5/doc/firstboot-section_mod.xml
--- old/yast2-firstboot-4.2.4/doc/firstboot-section_mod.xml 2019-10-23
16:56:27.000000000 +0200
+++ new/yast2-firstboot-4.2.5/doc/firstboot-section_mod.xml 2019-12-13
17:31:27.000000000 +0100
@@ -216,23 +216,6 @@
variable in /etc/sysconfig/firstboot.
</para>
</section>
- <section>
- <title>Using Automatic Configuration</title>
- <para>
- Since openSUSE11.0, installer does most part of the system configuration
- automatically, without user interaction. This feature is also available
- in firstboot stage. If you have the system installed and only partially
- configured (e.g. because of different hardware on your computers),
- enable inst_automatic_configuration step in the firstboot workflow.
- In the "globals" section of your workflow description file
- (firstboot.xml), define the steps that should be part of the
- Automatic Configuration process.
- </para>
- <para>
- For detailed information, see "Automatic Configuration" section of
-
<filename>/usr/share/doc/packages/yast2-installation/control-doc/index.html</filename>
file, part of yast2-installation-devel-doc package.
- </para>
- </section>
</section>
<section>
<title>Scripting</title>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-firstboot-4.2.4/package/yast2-firstboot.changes
new/yast2-firstboot-4.2.5/package/yast2-firstboot.changes
--- old/yast2-firstboot-4.2.4/package/yast2-firstboot.changes 2019-10-23
16:56:27.000000000 +0200
+++ new/yast2-firstboot-4.2.5/package/yast2-firstboot.changes 2019-12-13
17:31:27.000000000 +0100
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Fri Dec 13 00:11:32 UTC 2019 - David Diaz <[email protected]>
+
+- Improve the "firstboot_licenses" client to give precedence to
+ the directory argument, allowing to use it multiple times to show
+ different licenses (bsc#1154708).
+- Remove the references to the already dropped automatic
+ configuration feature (FATE#314695).
+- 4.2.5
+
+-------------------------------------------------------------------
Fri Oct 11 12:08:36 CEST 2019 - [email protected]
- Adapted to refactored Keyboard module (part of bsc#1142957).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-firstboot-4.2.4/package/yast2-firstboot.spec
new/yast2-firstboot-4.2.5/package/yast2-firstboot.spec
--- old/yast2-firstboot-4.2.4/package/yast2-firstboot.spec 2019-10-23
16:56:27.000000000 +0200
+++ new/yast2-firstboot-4.2.5/package/yast2-firstboot.spec 2019-12-13
17:31:27.000000000 +0100
@@ -16,7 +16,7 @@
#
Name: yast2-firstboot
-Version: 4.2.4
+Version: 4.2.5
Release: 0
Summary: YaST2 - Initial System Configuration
Group: System/YaST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-firstboot-4.2.4/src/lib/y2firstboot/clients/licenses.rb
new/yast2-firstboot-4.2.5/src/lib/y2firstboot/clients/licenses.rb
--- old/yast2-firstboot-4.2.4/src/lib/y2firstboot/clients/licenses.rb
2019-10-23 16:56:27.000000000 +0200
+++ new/yast2-firstboot-4.2.5/src/lib/y2firstboot/clients/licenses.rb
2019-12-13 17:31:27.000000000 +0100
@@ -35,6 +35,8 @@
class Licenses < Yast::Client
def initialize
textdomain "firstboot"
+
+ @args = GetInstArgs.argmap
end
def run
@@ -47,13 +49,14 @@
private
+ attr_accessor :args
+
# Build, log, and returns args to be used for calling InstLicense client
#
# @return [Array]
def inst_license_args
- args = GetInstArgs.argmap
args["action"] = refusal_action
- args["directories"] = licenses_directories
+ args["directories"] = directories
Builtins.y2milestone("inst_license options: %1", args)
@@ -69,12 +72,35 @@
# Directories in which look for the license agreement texts
#
- # NOTE: if that result in an empty list, {Yast::InstLicenseClient} will
do
- # an extra attemp to look for the license agreement in the path given as
- # "base_product_license_directory" global param through the control file.
+ # NOTE: if that result in an empty list, {Yast::InstLicenseClient} will
do an extra attemp to
+ # look for the license agreement in the path given as
"base_product_license_directory" global
+ # param through the control file.
+ #
+ # @return [Array<String>] license agreement paths
+ def directories
+ return module_license_directories if module_license_directories.any?
+
+ sysconfig_license_directories
+ end
+
+ # Directories defined by the module arguments
+ #
+ # NOTE: right now license module can only define a directory path, but
it could be extended to
+ # support more than one (e.g., by a "directories" list).
+ #
+ # @return [Array<String>] license agreement paths
+ def module_license_directories
+ directories = [
+ args["directory"]
+ ]
+
+ directories.map(&:to_s).reject(&:empty?)
+ end
+
+ # Directories defined in the sysconfig firstboot file
#
# @return [Array<String>] license agreement paths
- def licenses_directories
+ def sysconfig_license_directories
directories = [
Misc.SysconfigRead(path(".sysconfig.firstboot.FIRSTBOOT_LICENSE_DIR"), ""),
Misc.SysconfigRead(path(".sysconfig.firstboot.FIRSTBOOT_NOVELL_LICENSE_DIR"),
"")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-firstboot-4.2.4/test/y2firstboot/clients/licenses_test.rb
new/yast2-firstboot-4.2.5/test/y2firstboot/clients/licenses_test.rb
--- old/yast2-firstboot-4.2.4/test/y2firstboot/clients/licenses_test.rb
2019-10-23 16:56:27.000000000 +0200
+++ new/yast2-firstboot-4.2.5/test/y2firstboot/clients/licenses_test.rb
2019-12-13 17:31:27.000000000 +0100
@@ -26,6 +26,7 @@
describe Y2Firstboot::Clients::Licenses do
subject(:client) { described_class.new }
+ let(:directory) { "" }
let(:firstboot_license_dir) { "" }
let(:firstboot_novell_license_dir) { "" }
let(:client_response) { :whatever }
@@ -44,53 +45,68 @@
allow(Yast::WFM).to receive(:CallFunction)
.and_return(client_response)
+
+ allow(Yast::GetInstArgs).to receive(:argmap)
+ .and_return("directory" => directory)
end
describe "#run" do
- context "when FIRSTBOOT_LICENSE_DIR is defined" do
- let(:firstboot_license_dir) { "/path/to/licenses" }
- let(:firstboot_novell_license_dir) { "" }
- let(:expected_arg) do
- { "directories" => [firstboot_license_dir] }
- end
+ context "when 'directory' argument is given" do
+ let(:directory) { "/path/to/somewhere" }
- it "includes it as arg for InstLicense client" do
+ it "includes it in the 'directories' argument sent to InstLicense
client" do
expect(Yast::WFM).to receive(:CallFunction)
- .with("inst_license", array_including(hash_including(expected_arg)))
+ .with("inst_license", array_including(hash_including("directories"
=> [directory])))
subject.run
end
end
- context "when FIRSTBOOT_NOVELL_LICENSE_DIR is defined" do
- let(:firstboot_license_dir) { "" }
- let(:firstboot_novell_license_dir) { "/path/to/novell/licenses" }
- let(:expected_arg) do
- { "directories" => [firstboot_novell_license_dir] }
+ shared_examples "calls client giving the right directories" do
|*defined_dir|
+ it "includes it in the 'directories' argument sent to InstLicense
client" do
+ expect(Yast::WFM)
+ .to receive(:CallFunction)
+ .with(
+ "inst_license",
+ array_including(hash_including("directories" => defined_dir))
+ )
+
+ subject.run
end
- it "includes it as arg for InstLicense client" do
- expect(Yast::WFM).to receive(:CallFunction)
- .with("inst_license", array_including(hash_including(expected_arg)))
+ context "but the 'directory' module argument is given too" do
+ let(:directory) { "/path/to/somewhere" }
- subject.run
+ it "includes only it in the 'directories' argument sent to InstLicense
client" do
+ expect(Yast::WFM)
+ .to receive(:CallFunction)
+ .with(
+ "inst_license",
+ array_including(hash_including("directories" => [directory]))
+ )
+
+ subject.run
+ end
end
end
- context "when both, FIRSTBOOT_LICENSE_DIR and
FIRSTBOOT_NOVELL_LICENSE_DIR, are defined" do
- let(:firstboot_license_dir) { "/path/to/licenses" }
- let(:firstboot_novell_license_dir) { "/path/to/novell/licenses" }
- let(:expected_arg) do
- { "directories" => [firstboot_license_dir,
firstboot_novell_license_dir] }
- end
+ context "when FIRSTBOOT_LICENSE_DIR is defined" do
+ let(:firstboot_license_dir) { "/path/to/license" }
- it "includes them as arg for InstLicense client" do
- # the matcher is also ensuring the right licenses order
- expect(Yast::WFM).to receive(:CallFunction)
- .with("inst_license", array_including(hash_including(expected_arg)))
+ include_examples "calls client giving the right directories",
"/path/to/license"
+ end
- subject.run
- end
+ context "when FIRSTBOOT_NOVELL_LICENSE_DIR is defined" do
+ let(:firstboot_novell_license_dir) { "/path/to/novell/license" }
+
+ include_examples "calls client giving the right directories",
"/path/to/novell/license"
+ end
+
+ context "when both, FIRSTBOOT_LICENSE_DIR and
FIRSTBOOT_NOVELL_LICENSE_DIR, are defined" do
+ let(:firstboot_license_dir) { "/p/t/license" }
+ let(:firstboot_novell_license_dir) { "/p/t/n/license" }
+
+ include_examples "calls client giving the right directories",
"/p/t/license", "/p/t/n/license"
end
end