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-10-25 15:17:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-country (Old) and /work/SRC/openSUSE:Factory/.yast2-country.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-country" Mon Oct 25 15:17:13 2021 rev:227 rq:926692 version:4.4.7 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes 2021-09-11 22:24:26.479381334 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-country.new.1890/yast2-country.changes 2021-10-25 15:17:50.069690679 +0200 @@ -1,0 +2,6 @@ +Thu Oct 21 08:45:47 UTC 2021 - Stefan Hundhammer <shundham...@suse.com> + +- Use official China timezone Asia/Shanghai (bsc#1187857) +- 4.4.7 + +------------------------------------------------------------------- @@ -16 +21,0 @@ -Wed Aug 18 10:23:48 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> Old: ---- yast2-country-4.4.6.tar.bz2 New: ---- yast2-country-4.4.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-country.spec ++++++ --- /var/tmp/diff_new_pack.gIfdJy/_old 2021-10-25 15:17:50.537690972 +0200 +++ /var/tmp/diff_new_pack.gIfdJy/_new 2021-10-25 15:17:50.541690974 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.4.6 +Version: 4.4.7 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only ++++++ yast2-country-4.4.6.tar.bz2 -> yast2-country-4.4.7.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.6/.github/workflows/ci.yml new/yast2-country-4.4.7/.github/workflows/ci.yml --- old/yast2-country-4.4.6/.github/workflows/ci.yml 2021-09-07 10:57:41.000000000 +0200 +++ new/yast2-country-4.4.7/.github/workflows/ci.yml 2021-10-21 12:09:06.000000000 +0200 @@ -8,7 +8,9 @@ jobs: Tests: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: + image: registry.opensuse.org/yast/head/containers/yast-ruby:latest + options: --privileged steps: @@ -46,7 +48,9 @@ Package: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: + image: registry.opensuse.org/yast/head/containers/yast-ruby:latest + options: --privileged steps: @@ -58,7 +62,9 @@ Yardoc: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: + image: registry.opensuse.org/yast/head/containers/yast-ruby:latest + options: --privileged steps: @@ -73,7 +79,9 @@ # checks into one job avoids that overhead Checks: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: + image: registry.opensuse.org/yast/head/containers/yast-ruby:latest + options: --privileged steps: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.6/package/yast2-country.changes new/yast2-country-4.4.7/package/yast2-country.changes --- old/yast2-country-4.4.6/package/yast2-country.changes 2021-09-07 10:57:41.000000000 +0200 +++ new/yast2-country-4.4.7/package/yast2-country.changes 2021-10-21 12:09:06.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Oct 21 08:45:47 UTC 2021 - Stefan Hundhammer <shundham...@suse.com> + +- Use official China timezone Asia/Shanghai (bsc#1187857) +- 4.4.7 + +------------------------------------------------------------------- Mon Sep 6 13:48:04 UTC 2021 - Knut Anderssen <kanders...@suse.com> - Use only one server when proposing the default NTP servers to @@ -13,7 +19,6 @@ - 4.4.5 ------------------------------------------------------------------- -Wed Aug 18 10:23:48 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> Thu Aug 5 10:21:22 UTC 2021 - Martin Vidner <mvid...@suse.com> - Offer the fr-afnor keyboard only if it is defined (bsc#1188867) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.6/package/yast2-country.spec new/yast2-country-4.4.7/package/yast2-country.spec --- old/yast2-country-4.4.6/package/yast2-country.spec 2021-09-07 10:57:41.000000000 +0200 +++ new/yast2-country-4.4.7/package/yast2-country.spec 2021-10-21 12:09:06.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-country -Version: 4.4.6 +Version: 4.4.7 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.6/timezone/src/data/timezone_raw.ycp new/yast2-country-4.4.7/timezone/src/data/timezone_raw.ycp --- old/yast2-country-4.4.6/timezone/src/data/timezone_raw.ycp 2021-09-07 10:57:41.000000000 +0200 +++ new/yast2-country-4.4.7/timezone/src/data/timezone_raw.ycp 2021-10-21 12:09:06.000000000 +0200 @@ -522,8 +522,6 @@ // time zone "Asia/Gaza" : _("Gaza"), // time zone - "Asia/Harbin" : _("Harbin"), // CN - // time zone "Asia/Hong_Kong" : _("Hongkong"), // time zone "Asia/Hovd" : _("Hovd"), // MN @@ -604,8 +602,6 @@ // time zone "Asia/Shanghai" : _("Shanghai"), // time zone - "Asia/Beijing" : _("Beijing"), - // time zone "Asia/Taipei" : _("Taipei"), // time zone "Asia/Seoul" : _("Seoul"), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.6/timezone/src/lib/y2country/clients/timezone_auto.rb new/yast2-country-4.4.7/timezone/src/lib/y2country/clients/timezone_auto.rb --- old/yast2-country-4.4.6/timezone/src/lib/y2country/clients/timezone_auto.rb 2021-09-07 10:57:41.000000000 +0200 +++ new/yast2-country-4.4.7/timezone/src/lib/y2country/clients/timezone_auto.rb 2021-10-21 12:09:06.000000000 +0200 @@ -26,7 +26,9 @@ end def import(data) - Timezone.Import(data) + result = Timezone.Import(data) + fix_obsolete_timezones + result end def summary @@ -60,7 +62,18 @@ end def modified - Timezone.modified = true + Timezone.modified = true + end + + def fix_obsolete_timezones + old_timezone = Timezone.timezone + new_timezone = Timezone.UpdateTimezone(old_timezone) + return if new_timezone == old_timezone + + Timezone.Set(new_timezone, true) + Timezone.modified = true + log.info("Changed obsolete timezone #{old_timezone} to #{new_timezone}") + nil end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.6/timezone/src/modules/Timezone.rb new/yast2-country-4.4.7/timezone/src/modules/Timezone.rb --- old/yast2-country-4.4.6/timezone/src/modules/Timezone.rb 2021-09-07 10:57:41.000000000 +0200 +++ new/yast2-country-4.4.7/timezone/src/modules/Timezone.rb 2021-10-21 12:09:06.000000000 +0200 @@ -76,7 +76,7 @@ @diff = 0 - # if anyuthing was modified (currently for auto client only) + # if anything was modified (currently for auto client only) @modified = false # If there is windows partition, assume that local time is used @@ -137,6 +137,8 @@ "Mexico/BajaSur" => "America/Mazatlan", "Mexico/General" => "America/Mexico_City", "Jamaica" => "America/Jamaica", + "Asia/Beijing" => "Asia/Shanghai", + "Asia/Harbin" => "Asia/Shanghai", "Asia/Macao" => "Asia/Macau", "Israel" => "Asia/Jerusalem", "Asia/Tel_Aviv" => "Asia/Jerusalem", @@ -973,7 +975,7 @@ @hwclock = Ops.get_string(settings, "hwclock", "UTC") == "UTC" ? "-u" : "--localtime" @user_hwclock = true end - # FIXME: this set modify system which is a bit unusual for import operation + # FIXME: this set modifies the system which is very unusual for an import operation Set(Ops.get_string(settings, "timezone", @timezone), true) true end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.6/timezone/test/Timezone_test.rb new/yast2-country-4.4.7/timezone/test/Timezone_test.rb --- old/yast2-country-4.4.6/timezone/test/Timezone_test.rb 2021-09-07 10:57:41.000000000 +0200 +++ new/yast2-country-4.4.7/timezone/test/Timezone_test.rb 2021-10-21 12:09:06.000000000 +0200 @@ -558,13 +558,24 @@ end describe "#UpdateTimezone" do - it "returns its param if it is non obsolete timezone" do + it "returns its param if it is a non-obsolete timezone" do expect(subject.UpdateTimezone("Australia/Adelaide")).to eq "Australia/Adelaide" end - it "returns replacement for obsolete timezone" do + it "returns a replacement for an obsolete timezone" do expect(subject.UpdateTimezone("US/Pacific")).to eq "America/Los_Angeles" end + + it "fixes obsolete Chinese timezones (bsc#1190586)" do + expect(subject.UpdateTimezone("Asia/Beijing")).to eq "Asia/Shanghai" + expect(subject.UpdateTimezone("Asia/Harbin")).to eq "Asia/Shanghai" + end + + it "keeps valid Chinese timezones (bsc#1190586)" do + expect(subject.UpdateTimezone("Asia/Shanghai")).to eq "Asia/Shanghai" + expect(subject.UpdateTimezone("Asia/Hong_Kong")).to eq "Asia/Hong_Kong" + expect(subject.UpdateTimezone("Asia/Macau")).to eq "Asia/Macau" + end end describe "#Save" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.6/timezone/test/timezone_auto_test.rb new/yast2-country-4.4.7/timezone/test/timezone_auto_test.rb --- old/yast2-country-4.4.6/timezone/test/timezone_auto_test.rb 2021-09-07 10:57:41.000000000 +0200 +++ new/yast2-country-4.4.7/timezone/test/timezone_auto_test.rb 2021-10-21 12:09:06.000000000 +0200 @@ -67,6 +67,10 @@ } } + before do + allow(Yast::Timezone).to receive(:Set) + end + it "imports the profile" do expect(Yast::Timezone).to receive(:Import).with(profile) client.import(profile) @@ -118,13 +122,48 @@ it "timezone settings are modified ?" do expect(Yast::Timezone).to receive(:Modified) client.modified? - end + end end describe "#modified" do it "set to modified" do client.modified expect(client.modified?).to eq(true) - end + end + end + + describe "#fix_obsolete_timezones" do + context "with an obsolete timezone" do + let(:tz1) { "Asia/Beijing" } + let(:tz2) { "Asia/Shanghai" } + + before do + allow(Yast::Timezone).to receive(:Import) + allow(Yast::Timezone).to receive(:timezone).and_return(tz1, tz2) + allow(Yast::Timezone).to receive(:Set) + end + + it "fixes the timezone to a valid one" do + expect(Yast::Timezone).to receive(:Set) + client.import("timezone" => tz1) + expect(Yast::Timezone.timezone).to eq tz2 + end + end + + context "with a valid timezone" do + let(:tz1) { "Asia/Hong_Kong" } + let(:tz2) { tz1 } + + before do + allow(Yast::Timezone).to receive(:Import) + allow(Yast::Timezone).to receive(:timezone).and_return(tz1, tz2) + end + + it "leaves the timezone as it is" do + expect(Yast::Timezone).not_to receive(:Set) + client.import("timezone" => tz1) + expect(Yast::Timezone.timezone).to eq tz2 + end + end end end