Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-country for openSUSE:Factory checked in at 2021-08-05 20:47:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-country (Old) and /work/SRC/openSUSE:Factory/.yast2-country.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-country" Thu Aug 5 20:47:58 2021 rev:224 rq:910319 version:4.4.4 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes 2021-08-02 12:05:38.093648823 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-country.new.1899/yast2-country.changes 2021-08-05 20:48:24.547911429 +0200 @@ -1,0 +2,14 @@ +Thu Aug 5 10:21:22 UTC 2021 - Martin Vidner <[email protected]> + +- Offer the fr-afnor keyboard only if it is defined (bsc#1188867) + It is not part of SLE15 so far. +- 4.4.4 + +------------------------------------------------------------------- +Tue Aug 3 16:38:40 UTC 2021 - Jos?? Iv??n L??pez Gonz??lez <[email protected]> + +- AutoYaST: allow empty /profile/timezone/timezone setting, + meaning to keep the UTC default (bsc#1188406). +- 4.4.3 + +------------------------------------------------------------------- Old: ---- yast2-country-4.4.2.tar.bz2 New: ---- yast2-country-4.4.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-country.spec ++++++ --- /var/tmp/diff_new_pack.WbTEbq/_old 2021-08-05 20:48:25.095910814 +0200 +++ /var/tmp/diff_new_pack.WbTEbq/_new 2021-08-05 20:48:25.099910810 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.4.2 +Version: 4.4.4 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only ++++++ yast2-country-4.4.2.tar.bz2 -> yast2-country-4.4.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.2/keyboard/src/data/keyboards.rb new/yast2-country-4.4.4/keyboard/src/data/keyboards.rb --- old/yast2-country-4.4.2/keyboard/src/data/keyboards.rb 2021-07-29 09:31:00.000000000 +0200 +++ new/yast2-country-4.4.4/keyboard/src/data/keyboards.rb 2021-08-05 14:28:41.000000000 +0200 @@ -37,6 +37,11 @@ # - suggested_for_lang [Array<String>] optional, language codes # to suggest this layout for def self.all_keyboards + always_present_keyboards + optional_keyboards + end + + # @see all_keyboards + def self.always_present_keyboards [ { "description" => _("English (US)"), "alias" => "english-us", @@ -66,11 +71,6 @@ "code" => "fr-latin1", "suggested_for_lang" => ["br_FR", "fr", "fr_BE"] }, - { "description" => _("French (AFNOR)"), - "alias" => "french-afnor", - "code" => "fr-afnor", - "suggested_for_lang" => ["br_FR", "fr", "fr_BE"] - }, { "description" => _("French (Switzerland)"), "alias" => "french-ch", "code" => "fr_CH-latin1", @@ -266,6 +266,31 @@ ] end + # Some keyboards are present in new openSUSE releases but not in older SLE + # @see all_keyboards + def self.optional_keyboards + # memoize this + return @optional_keyboards unless @optional_keyboards.nil? + + @optional_keyboards = [] + + # The afnor layout was added to xkeyboard-config in 2019-06 + # but SLE15-SP4 only has 2.23 released in 2018 + afnor_test = lambda do + kmm = File.read("/usr/share/systemd/kbd-model-map") rescue "" + kmm.match?("^fr-afnor") + end + afnor = { + "description" => _("French (AFNOR)"), + "alias" => "french-afnor", + "code" => "fr-afnor", + "suggested_for_lang" => ["br_FR", "fr", "fr_BE"] + } + @optional_keyboards.push(afnor) if afnor_test.call + + @optional_keyboards + end + # Evaluate the proposed keyboard for a given language # # @param [String] language e.g. "de_CH" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.2/package/yast2-country.changes new/yast2-country-4.4.4/package/yast2-country.changes --- old/yast2-country-4.4.2/package/yast2-country.changes 2021-07-29 09:31:00.000000000 +0200 +++ new/yast2-country-4.4.4/package/yast2-country.changes 2021-08-05 14:28:41.000000000 +0200 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Thu Aug 5 10:21:22 UTC 2021 - Martin Vidner <[email protected]> + +- Offer the fr-afnor keyboard only if it is defined (bsc#1188867) + It is not part of SLE15 so far. +- 4.4.4 + +------------------------------------------------------------------- +Tue Aug 3 16:38:40 UTC 2021 - Jos?? Iv??n L??pez Gonz??lez <[email protected]> + +- AutoYaST: allow empty /profile/timezone/timezone setting, + meaning to keep the UTC default (bsc#1188406). +- 4.4.3 + +------------------------------------------------------------------- Wed Jul 28 16:10:33 UTC 2021 - Martin Vidner <[email protected]> - Add the AFNOR standardized French keyboard layout (NF Z71-300) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.2/package/yast2-country.spec new/yast2-country-4.4.4/package/yast2-country.spec --- old/yast2-country-4.4.2/package/yast2-country.spec 2021-07-29 09:31:00.000000000 +0200 +++ new/yast2-country-4.4.4/package/yast2-country.spec 2021-08-05 14:28:41.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-country -Version: 4.4.2 +Version: 4.4.4 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.2/timezone/src/modules/Timezone.rb new/yast2-country-4.4.4/timezone/src/modules/Timezone.rb --- old/yast2-country-4.4.2/timezone/src/modules/Timezone.rb 2021-07-29 09:31:00.000000000 +0200 +++ new/yast2-country-4.4.4/timezone/src/modules/Timezone.rb 2021-08-05 14:28:41.000000000 +0200 @@ -837,27 +837,7 @@ return end - cmd = if Stage.initial - # do use --root option, running in chroot does not work - "/usr/bin/systemd-firstboot --root '#{Installation.destdir}' --timezone '#{@timezone}'" - else - # this sets both the locale (see "man localectl") - "/usr/bin/timedatectl set-timezone #{@timezone}" - end - log.info "Making timezone setting persistent: #{cmd}" - result = if Stage.initial - WFM.Execute(path(".local.bash_output"), cmd) - else - SCR.Execute(path(".target.bash_output"), cmd) - end - if result["exit"] != 0 - log.error "Timezone configuration not written. Failed to execute '#{cmd}'" - log.error "output: #{result.inspect}" - # TRANSLATORS: the "%s" is replaced by the executed command - Report.Error(_("Could not save the timezone setting, the command\n%s\nfailed.") % cmd) - else - log.info "output: #{result.inspect}" - end + write_timezone SCR.Write(path(".sysconfig.clock.DEFAULT_TIMEZONE"), @default_timezone) @@ -1142,6 +1122,40 @@ def disk_analyzer Y2Storage::StorageManager.instance.probed_disk_analyzer end + + # Writes the timezone configuration + def write_timezone + if @timezone.nil? || @timezone.strip.empty? + log.warn("Timezone configuration not written. No value was given.") + return + end + + cmd = if Stage.initial + # do use --root option, running in chroot does not work + "/usr/bin/systemd-firstboot --root '#{Installation.destdir}' --timezone '#{@timezone}'" + else + # this sets both the locale (see "man localectl") + "/usr/bin/timedatectl set-timezone #{@timezone}" + end + + log.info "Making timezone setting persistent: #{cmd}" + + result = if Stage.initial + WFM.Execute(path(".local.bash_output"), cmd) + else + SCR.Execute(path(".target.bash_output"), cmd) + end + + if result["exit"] != 0 + log.error "Timezone configuration not written. Failed to execute '#{cmd}'" + log.error "output: #{result.inspect}" + + # TRANSLATORS: the "%s" is replaced by the executed command + Report.Error(_("Could not save the timezone setting, the command\n%s\nfailed.") % cmd) + else + log.info "output: #{result.inspect}" + end + end end Timezone = TimezoneClass.new diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.2/timezone/test/Timezone_test.rb new/yast2-country-4.4.4/timezone/test/Timezone_test.rb --- old/yast2-country-4.4.2/timezone/test/Timezone_test.rb 2021-07-29 09:31:00.000000000 +0200 +++ new/yast2-country-4.4.4/timezone/test/Timezone_test.rb 2021-08-05 14:28:41.000000000 +0200 @@ -566,4 +566,75 @@ expect(subject.UpdateTimezone("US/Pacific")).to eq "America/Los_Angeles" end end + + describe "#Save" do + before do + allow(Yast::SCR).to receive(:Write) + + allow(Yast::Mode).to receive(:mode).and_return(mode) + end + + context "when the system is being updated" do + let(:mode) { "update" } + + it "does not write the timezone" do + expect(Yast::WFM).to_not receive(:Execute) + expect(Yast::SCR).to_not receive(:Execute) + + subject.Save + end + end + + context "when the system is not being updated" do + let(:mode) { "autoinstallation" } + + before do + allow(Yast::SCR).to receive(:Write) + + allow(subject).to receive(:ReadAdjTime).and_return(nil) + + allow(subject).to receive(:CallMkinitrd) + + subject.Import(settings) + end + + + context "and no timezone value is given" do + let(:settings) { { "hwclock" => "UTC", "timezone" => "" } } + + it "does not write the timezone" do + expect(Yast::WFM).to_not receive(:Execute) + expect(Yast::SCR).to_not receive(:Execute) + + subject.Save + end + end + + context "and a timezone value is given" do + let(:settings) { {"hwclock" => "UTC", "timezone" => "US/Pacific"} } + + context "and it is running in the initial stage" do + let(:initial) { true } + + it "uses systemd-firstboot command to set the timezone" do + expect(Yast::WFM).to receive(:Execute).with(anything, /systemd-firstboot/) + .and_return("exit" => 0) + + subject.Save + end + end + + context "and it is not running in the initial stage" do + let(:initial) { false } + + it "uses timedatectl command to set the timezone" do + expect(Yast::SCR).to receive(:Execute).with(anything, /timedatectl/) + .and_return("exit" => 0) + + subject.Save + end + end + end + end + end end
