Hello community, here is the log from the commit of package yast2-country for openSUSE:Factory checked in at 2017-10-23 16:42:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-country (Old) and /work/SRC/openSUSE:Factory/.yast2-country.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-country" Mon Oct 23 16:42:53 2017 rev:185 rq:535470 version:4.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes 2017-09-21 12:34:24.163000732 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-country.new/yast2-country.changes 2017-10-23 16:42:58.237666715 +0200 @@ -1,0 +2,7 @@ +Fri Oct 20 11:32:05 UTC 2017 - [email protected] + +- Use `systemd-firstboot` call for setting the keyboard in the + first stage (bsc#1046436) +- 4.0.3 + +------------------------------------------------------------------- Old: ---- yast2-country-4.0.2.tar.bz2 New: ---- yast2-country-4.0.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-country.spec ++++++ --- /var/tmp/diff_new_pack.niZMgH/_old 2017-10-23 16:43:00.085580234 +0200 +++ /var/tmp/diff_new_pack.niZMgH/_new 2017-10-23 16:43:00.089580047 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.0.2 +Version: 4.0.3 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-country-4.0.2.tar.bz2 -> yast2-country-4.0.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.0.2/keyboard/Makefile.am new/yast2-country-4.0.3/keyboard/Makefile.am --- old/yast2-country-4.0.2/keyboard/Makefile.am 2017-09-20 16:54:09.345372957 +0200 +++ new/yast2-country-4.0.3/keyboard/Makefile.am 2017-10-20 14:38:26.429377370 +0200 @@ -1,4 +1,5 @@ # # Makefile.am for country/keyboard SUBDIRS = src +# TODO: test dir is not included as it is failing during obs build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.0.2/keyboard/src/modules/Keyboard.rb new/yast2-country-4.0.3/keyboard/src/modules/Keyboard.rb --- old/yast2-country-4.0.2/keyboard/src/modules/Keyboard.rb 2017-09-20 16:54:09.349372957 +0200 +++ new/yast2-country-4.0.3/keyboard/src/modules/Keyboard.rb 2017-10-20 14:38:26.433377370 +0200 @@ -111,6 +111,7 @@ Yast.import "Directory" Yast.import "FileUtils" Yast.import "Initrd" + Yast.import "Installation" Yast.import "Label" Yast.import "Language" Yast.import "Linuxrc" @@ -885,10 +886,17 @@ ) SCR.Write(path(".sysconfig.keyboard"), nil) # flush - cmd = "/usr/bin/localectl --no-convert set-keymap #{@keymap.gsub(/(.*)\.map\.gz/, '\1')}" + chomped_keymap = @keymap.chomp(".map.gz") + cmd = if Stage.initial + "/usr/bin/systemd-firstboot --root #{Installation.destdir} --keymap '#{chomped_keymap}'" + else + "/usr/bin/localectl --no-convert set-keymap #{chomped_keymap}" + end log.info "Making console keyboard persistent: #{cmd}" - if SCR.Execute(path(".target.bash"), cmd) != 0 + result = SCR.Execute(path(".target.bash_output"), cmd) + if result["exit"] != 0 log.error "Console keyboard configuration not written. Failed to execute '#{cmd}'" + log.error "output: #{result.inspect}" end # Write systemd settings for X11 @@ -1545,9 +1553,15 @@ end def call_set_x11_keymap + if Stage.initial + # see https://bugzilla.opensuse.org/show_bug.cgi?id=1046436#c57 for reasoning + log.info "Skipping setting of x11 keymap in installation" + return + end + args = [@XkbLayout, @XkbModel, @XkbVariant, @XkbOptions] return if args.all?(&:empty?) - + # The localectl syntax enforces a fixed order for the X11 options. # Empty options at the end of the command can (must) be skipped. # Other empty options must be specified as "". diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.0.2/keyboard/test/SCRStub.rb new/yast2-country-4.0.3/keyboard/test/SCRStub.rb --- old/yast2-country-4.0.2/keyboard/test/SCRStub.rb 2017-09-20 16:54:09.349372957 +0200 +++ new/yast2-country-4.0.3/keyboard/test/SCRStub.rb 2017-10-20 14:38:26.433377370 +0200 @@ -42,6 +42,14 @@ receive(:Execute).with(path(".target.bash"), command) end + # Matcher for executing commands using SCR.Execute and .target.bash_output + # + # @return [RSpec::Mocks::Matchers::Receive] + def execute_bash_output(command) + receive(:Execute).with(path(".target.bash_output"), command).and_return("exit" => 0) + end + + # Stub all calls to SCR.Write storing the value for future comparison def stub_scr_write @written_values = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.0.2/keyboard/test/keyboard_test.rb new/yast2-country-4.0.3/keyboard/test/keyboard_test.rb --- old/yast2-country-4.0.2/keyboard/test/keyboard_test.rb 2017-09-20 16:54:09.349372957 +0200 +++ new/yast2-country-4.0.3/keyboard/test/keyboard_test.rb 2017-10-20 14:38:26.433377370 +0200 @@ -36,6 +36,7 @@ allow(Linuxrc).to receive(:text).and_return false allow(SCR).to receive(:Execute).with(path(".target.remove"), udev_file) allow(SCR).to receive(:Write).with(anything, udev_file, anything) + allow(Installation).to receive(:destdir).and_return("/mnt") init_root_path(chroot) if defined?(chroot) end @@ -71,11 +72,8 @@ let(:new_lang) { "spanish" } it "writes the configuration" do - expect(SCR).to execute_bash( - /localectl --no-convert set-x11-keymap es microsoftpro$/ - ) - expect(SCR).to execute_bash( - /localectl --no-convert set-keymap es$/ + expect(SCR).to execute_bash_output( + /systemd-firstboot --root \/mnt --keymap 'es'$/ ) expect(AsciiFile).to receive(:AppendLine).with(anything, ["Keytable:", "es.map.gz"]) @@ -105,7 +103,7 @@ expect(SCR).to execute_bash( /localectl --no-convert set-x11-keymap us,ru microsoftpro ,winkeys grp:ctrl_shift_toggle,grp_led:scroll$/ ) - expect(SCR).to execute_bash( + expect(SCR).to execute_bash_output( /localectl --no-convert set-keymap ruwin_alt-UTF-8$/ ) @@ -443,6 +441,7 @@ context "when user did not make any decision" do it "sets the keyboard for the current language" do + allow(Yast::Language).to receive(:language).and_return("english-us") expect(Keyboard).to receive(:Set).with("english-us") Keyboard.MakeProposal(false, false) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.0.2/keyboard/test/widgets/keyboard_selection_test.rb new/yast2-country-4.0.3/keyboard/test/widgets/keyboard_selection_test.rb --- old/yast2-country-4.0.2/keyboard/test/widgets/keyboard_selection_test.rb 2017-09-20 16:54:09.349372957 +0200 +++ new/yast2-country-4.0.3/keyboard/test/widgets/keyboard_selection_test.rb 2017-10-20 14:38:26.433377370 +0200 @@ -40,6 +40,7 @@ context "when keyboard layout not yet set" do before do allow(Yast::Keyboard).to receive(:user_decision).and_return(false) + allow(Yast::Language).to receive(:language).and_return("english-us") end it "initializes widget to english us layout" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.0.2/package/yast2-country.changes new/yast2-country-4.0.3/package/yast2-country.changes --- old/yast2-country-4.0.2/package/yast2-country.changes 2017-09-20 16:54:09.361372957 +0200 +++ new/yast2-country-4.0.3/package/yast2-country.changes 2017-10-20 14:38:26.453377370 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Oct 20 11:32:05 UTC 2017 - [email protected] + +- Use `systemd-firstboot` call for setting the keyboard in the + first stage (bsc#1046436) +- 4.0.3 + +------------------------------------------------------------------- Wed Sep 20 15:22:55 CEST 2017 - [email protected] - Removed dependency on yast-storage (bsc#1058869): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.0.2/package/yast2-country.spec new/yast2-country-4.0.3/package/yast2-country.spec --- old/yast2-country-4.0.2/package/yast2-country.spec 2017-09-20 16:54:09.361372957 +0200 +++ new/yast2-country-4.0.3/package/yast2-country.spec 2017-10-20 14:38:26.453377370 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.0.2 +Version: 4.0.3 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.0.2/test/test_helper.rb new/yast2-country-4.0.3/test/test_helper.rb --- old/yast2-country-4.0.2/test/test_helper.rb 2017-09-20 16:54:09.361372957 +0200 +++ new/yast2-country-4.0.3/test/test_helper.rb 2017-10-20 14:38:26.457377370 +0200 @@ -2,6 +2,9 @@ inc_dirs = Dir.glob("#{root_location}/*/src") ENV["Y2DIR"] = inc_dirs.join(":") +ENV["LANG"] = "en_US.UTF-8" +ENV["LC_ALL"] = "en_US.UTF-8" + require "yast" require "rspec" require "yast/rspec"
