Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package autoyast2 for openSUSE:Factory checked in at 2021-07-21 19:06:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old) and /work/SRC/openSUSE:Factory/.autoyast2.new.2632 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autoyast2" Wed Jul 21 19:06:20 2021 rev:304 rq:907242 version:4.4.14 Changes: -------- --- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes 2021-07-12 21:39:54.940260662 +0200 +++ /work/SRC/openSUSE:Factory/.autoyast2.new.2632/autoyast2.changes 2021-07-21 19:07:26.087401462 +0200 @@ -1,0 +2,15 @@ +Fri Jul 16 11:20:20 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Copy the files to the right location when a <file_location> + is given (bsc#1188357). +- 4.4.14 + +------------------------------------------------------------------- +Fri Jul 9 13:46:05 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Recognize the 'dialog' section as a legal element of rules.xml + files (bsc#1188153). +- Do not export the general/storage section when it is empty + (related to bsc#1171356 and bsc#1187916). + +------------------------------------------------------------------- Old: ---- autoyast2-4.4.13.tar.bz2 New: ---- autoyast2-4.4.14.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autoyast2.spec ++++++ --- /var/tmp/diff_new_pack.lOSu9Z/_old 2021-07-21 19:07:26.679402491 +0200 +++ /var/tmp/diff_new_pack.lOSu9Z/_new 2021-07-21 19:07:26.683402499 +0200 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.4.13 +Version: 4.4.14 Release: 0 Summary: YaST2 - Automated Installation License: GPL-2.0-only @@ -44,6 +44,7 @@ # GPG symmetric methods and Password dialog BuildRequires: yast2 >= 4.3.25 # FileSystems.read_default_subvol_from_target +BuildRequires: yast2-xml BuildRequires: yast2-country BuildRequires: yast2-network >= 3.1.145 BuildRequires: yast2-packager @@ -51,7 +52,6 @@ BuildRequires: yast2-slp BuildRequires: yast2-transfer BuildRequires: yast2-update >= 3.3.0 -BuildRequires: yast2-xml # Required for test suite testing one time sync BuildRequires: yast2-ntp-client >= 4.0.1 # New API for Y2Storage::PackageHandler and storage features @@ -78,8 +78,8 @@ Requires: yast2-transfer >= 2.21.0 Requires: yast2-xml # New API for Y2Storage::PackageHandler and storage features -Requires: yast2-ruby-bindings >= 1.0.0 Requires: yast2-storage-ng >= 4.2.95 +Requires: yast2-ruby-bindings >= 1.0.0 Conflicts: yast2-installation < 3.1.166 ++++++ autoyast2-4.4.13.tar.bz2 -> autoyast2-4.4.14.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.4.13/package/autoyast2.changes new/autoyast2-4.4.14/package/autoyast2.changes --- old/autoyast2-4.4.13/package/autoyast2.changes 2021-07-06 14:42:51.000000000 +0200 +++ new/autoyast2-4.4.14/package/autoyast2.changes 2021-07-19 11:38:58.000000000 +0200 @@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Fri Jul 16 11:20:20 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Copy the files to the right location when a <file_location> + is given (bsc#1188357). +- 4.4.14 + +------------------------------------------------------------------- +Fri Jul 9 13:46:05 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Recognize the 'dialog' section as a legal element of rules.xml + files (bsc#1188153). +- Do not export the general/storage section when it is empty + (related to bsc#1171356 and bsc#1187916). + +------------------------------------------------------------------- Tue Jul 6 08:57:22 UTC 2021 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com> - Add run-erb option to check-profile command. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.4.13/package/autoyast2.spec new/autoyast2-4.4.14/package/autoyast2.spec --- old/autoyast2-4.4.13/package/autoyast2.spec 2021-07-06 14:42:51.000000000 +0200 +++ new/autoyast2-4.4.14/package/autoyast2.spec 2021-07-19 11:38:58.000000000 +0200 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.4.13 +Version: 4.4.14 Release: 0 Summary: YaST2 - Automated Installation License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.4.13/src/autoyast-rnc/rules.rnc new/autoyast2-4.4.14/src/autoyast-rnc/rules.rnc --- old/autoyast2-4.4.13/src/autoyast-rnc/rules.rnc 2021-07-06 14:42:51.000000000 +0200 +++ new/autoyast2-4.4.14/src/autoyast-rnc/rules.rnc 2021-07-19 11:38:58.000000000 +0200 @@ -30,7 +30,8 @@ ( y2_match_to+ & result & - operator? + operator? & + dialog? ) } @@ -105,6 +106,19 @@ ) } +dialog = +element dialog { + element dialog_nr { INTEGER }? & + element element { INTEGER }? & + element title { STRING }? & + element question { STRING }? & + element timeout { INTEGER }? & + element conflicts { + LIST, + element (element | listentry) { INTEGER }* + } +} + profile = element profile { STRING } continue = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.4.13/src/modules/AutoinstFile.rb new/autoyast2-4.4.14/src/modules/AutoinstFile.rb --- old/autoyast2-4.4.13/src/modules/AutoinstFile.rb 2021-07-06 14:42:51.000000000 +0200 +++ new/autoyast2-4.4.14/src/modules/AutoinstFile.rb 2021-07-19 11:38:58.000000000 +0200 @@ -12,6 +12,7 @@ textdomain "autoinst" Yast.import "AutoinstConfig" + Yast.import "Installation" Yast.import "Summary" Yast.include self, "autoinstall/io.rb" @@ -149,14 +150,15 @@ Ops.set(file, "file_location", newloc) Builtins.y2milestone("changed relurl to %1 for file", newloc) end + file_location = File.join(Installation.destdir, file["file_path"] || alternate_location) Builtins.y2milestone( "trying to get file from %1 storing in %2", Ops.get_string(file, "file_location", ""), - Ops.get_string(file, "file_path", alternate_location) + file_location ) if !GetURL( Ops.get_string(file, "file_location", ""), - Ops.get_string(file, "file_path", alternate_location) + file_location ) Builtins.y2error("file could not be retrieved") else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.4.13/src/modules/AutoinstGeneral.rb new/autoyast2-4.4.14/src/modules/AutoinstGeneral.rb --- old/autoyast2-4.4.13/src/modules/AutoinstGeneral.rb 2021-07-06 14:42:51.000000000 +0200 +++ new/autoyast2-4.4.14/src/modules/AutoinstGeneral.rb 2021-07-19 11:38:58.000000000 +0200 @@ -214,7 +214,7 @@ end end - deep_copy(general) + general.reject { |_k, v| v.nil? || (v.respond_to?(:empty?) && v.empty?) } end # set the sigature handling diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.4.13/test/AutoinstGeneral_test.rb new/autoyast2-4.4.14/test/AutoinstGeneral_test.rb --- old/autoyast2-4.4.13/test/AutoinstGeneral_test.rb 2021-07-06 14:42:51.000000000 +0200 +++ new/autoyast2-4.4.14/test/AutoinstGeneral_test.rb 2021-07-19 11:38:58.000000000 +0200 @@ -244,6 +244,19 @@ expect(subject.Export).to include("storage" => profile["storage"]) end + context "when there are no storage settings" do + let(:profile) do + { + "storage" => {}, + "mode" => { "confirm" => false } + } + end + + it "does not export storage settings" do + expect(subject.Export.keys).to_not include("storage") + end + end + it "exports mode settings" do expect(subject.Export).to include("mode" => profile["mode"]) end @@ -252,10 +265,30 @@ expect(subject.Export).to include("signature-handling" => profile["signature-handling"]) end + context "when there are no signature-handling settings" do + let(:profile) do + { "signature-handling" => {} } + end + + it "does not export the signature handling settings" do + expect(subject.Export.keys).to_not include("signature-handling") + end + end + it "exports ask-list settings" do expect(subject.Export).to include("ask-list" => profile["ask-list"]) end + context "when there are no ask-list settings" do + let(:profile) do + { "ask-list" => [] } + end + + it "does not export the ask-list settings" do + expect(subject.Export.keys).to_not include("ask-list") + end + end + it "exports proposals settings" do expect(subject.Export).to include("proposals" => profile["proposals"]) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.4.13/test/autoinst_file_test.rb new/autoyast2-4.4.14/test/autoinst_file_test.rb --- old/autoyast2-4.4.13/test/autoinst_file_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-4.4.14/test/autoinst_file_test.rb 2021-07-19 11:38:58.000000000 +0200 @@ -0,0 +1,108 @@ +# Copyright (c) [2021] SUSE LLC +# +# 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 SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. + +# !/usr/bin/env rspec + +require_relative "test_helper" +require "tmpdir" + +Yast.import "AutoinstFile" + +describe Yast::AutoinstFile do + subject { Yast::AutoinstFile } + + describe "#Write" do + let(:scr_root_dir) { Dir.mktmpdir("YaST-") } + + before do + allow(Yast::Installation).to receive(:destdir).and_return(scr_root_dir) + allow(Yast::SCR).to receive(:Execute).and_call_original + subject.Import(profile) + end + + around do |example| + change_scr_root(scr_root_dir, &example) + FileUtils.remove_entry(scr_root_dir) if Dir.exist?(scr_root_dir) + end + + context "when the file path ends with a slash" do + let(:profile) do + [{ "file_path" => "/etc/", "file_permissions" => "750", "file_owner" => "root" }] + end + + it "considers the file to be a directory" do + expect(Yast::SCR) + .to receive(:Execute).with(Yast::Path.new(".target.bash"), "chmod 750 /etc/") + expect(Yast::SCR) + .to receive(:Execute).with(Yast::Path.new(".target.bash"), "chown root /etc/") + + subject.Write + + expect(Dir).to exist(File.join(scr_root_dir, "etc")) + end + end + + context "when file contents are given" do + let(:profile) do + [ + { "file_path" => "/etc/" }, + { + "file_contents" => "hello!", "file_path" => "/etc/motd", + "file_permissions" => "644", "file_owner" => "root" + } + ] + end + + it "writes the contents to the destdir" do + expect(Yast::SCR) + .to receive(:Execute).with(Yast::Path.new(".target.bash"), "chmod 644 /etc/motd") + expect(Yast::SCR) + .to receive(:Execute).with(Yast::Path.new(".target.bash"), "chown root /etc/motd") + + subject.Write + + content = File.read(File.join(scr_root_dir, "etc", "motd")) + expect(content).to eq("hello!") + end + end + + context "when a file location is given" do + let(:profile) do + [ + { + "file_location" => "http://example.net/test", "file_path" => "/test.txt", + "file_permissions" => "644", "file_owner" => "root" + } + ] + end + + it "copies the file to the destdir" do + expect(Yast::SCR) + .to receive(:Execute).with(Yast::Path.new(".target.bash"), "chmod 644 /test.txt") + expect(Yast::SCR) + .to receive(:Execute).with(Yast::Path.new(".target.bash"), "chown root /test.txt") + expect(subject) + .to receive(:GetURL).with("http://example.net/test", File.join(scr_root_dir, "test.txt")) + + subject.Write + end + + end + end +end