From 17d49dd8f38807b6001aff1158b495b1c7d4ab85 Mon Sep 17 00:00:00 2001 From: compile_success <980965867@qq.com> Date: Sat, 7 Aug 2021 17:00:11 +0800 Subject: [PATCH] delete time zone map (cherry picked from commit bf24ddea736b1399433964562c96ad5e5db76842) --- anaconda.spec | 26 ++++++-- delete-datezone-map.patch | 132 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 delete-datezone-map.patch diff --git a/anaconda.spec b/anaconda.spec index 6319db0..603ad80 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -4,7 +4,7 @@ %endif Name: anaconda Version: 33.19 -Release: 25 +Release: 28 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -115,6 +115,7 @@ Patch6071: bugfix-do-not-mount-dbus-source.patch Patch6072: fix-xorg-timeout-and-throw-exception.patch Patch6073: bugfix-Fix-issue-when-ns_info-cannot-be-retrieved-for-NVDim.patch Patch6074: bugfix-Fix-SECTION-headers-in-docstrings.patch +Patch6075: delete-datezone-map.patch %define dbusver 1.2.3 %define dnfver 3.6.0 @@ -127,7 +128,6 @@ Patch6074: bugfix-Fix-SECTION-headers-in-docstrings.patch %define langtablever 0.0.49 %define libarchivever 3.0.4 %define libblockdevver 2.1 -%define libtimezonemapver 0.4.1-2 %define libxklavierver 5.4 %define mehver 0.23-1 %define nmver 1.0 @@ -144,7 +144,7 @@ BuildRequires: gtk-doc gtk3-devel-docs >= %{gtk3ver} glib2-doc gobject-introspec BuildRequires: glade-devel libgnomekbd-devel libxklavier-devel >= %{libxklavierver} pango-devel BuildRequires: python3-kickstart >= %{pykickstartver} python3-devel python3-nose systemd BuildRequires: rpm-devel >= %{rpmver} libarchive-devel >= %{libarchivever} gdk-pixbuf2-devel -BuildRequires: libtimezonemap-devel >= %{libtimezonemapver} libxml2 +BuildRequires: libxml2 BuildRequires: gsettings-desktop-schemas metacity Requires: anaconda-core = %{version}-%{release} @@ -153,7 +153,7 @@ Requires: libblockdev-plugins-all >= %{libblockdevver} realmd isomd5sum >= %{iso Requires: kexec-tools createrepo_c tmux gdb rsync python3-meh-gui >= %{mehver} Requires: adwaita-icon-theme python3-kickstart Requires: tigervnc-server-minimal libxklavier >= %{libxklavierver} libgnomekbd -Requires: libtimezonemap >= %{libtimezonemapver} xz +Requires: xz Requires: nm-connection-editor keybinder3 anaconda-user-help >= %{helpver} yelp system-logos Requires: python3 dracut >= %{dracutver} dracut-network dracut-live %ifarch %{ix86} x86_64 @@ -331,6 +331,24 @@ update-desktop-database &> /dev/null || : %{_datadir}/gtk-doc %changelog +* Sat Aug 7 2021 zhujunhao - 33.19-28 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:delete date zone map + +* Wed Jul 28 2021 zhujunhao - 33.19-27 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:rollback set default filesystem is xfs when x86 + +* Mon Jul 19 2021 zhujunhao - 33.19-26 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:set default filesystem is xfs when x86 + * Mon Jun 21 2021 liuxin - 33.19-25 - Type:bugfix - ID:NA diff --git a/delete-datezone-map.patch b/delete-datezone-map.patch new file mode 100644 index 0000000..2286eb6 --- /dev/null +++ b/delete-datezone-map.patch @@ -0,0 +1,132 @@ +diff -Nur anaconda-33.19.org/pyanaconda/ui/gui/spokes/datetime_spoke.glade anaconda-33.19/pyanaconda/ui/gui/spokes/datetime_spoke.glade +--- anaconda-33.19.org/pyanaconda/ui/gui/spokes/datetime_spoke.glade 2021-08-07 16:25:21.547621965 +0800 ++++ anaconda-33.19/pyanaconda/ui/gui/spokes/datetime_spoke.glade 2021-08-07 16:26:20.137758256 +0800 +@@ -3,7 +3,6 @@ + + + +- + + True + False +@@ -548,19 +547,6 @@ + + + +- +- True +- False +- +- +- +- True +- True +- 6 +- 1 +- +- +- + + True + False +diff -Nur anaconda-33.19.org/pyanaconda/ui/gui/spokes/datetime_spoke.py anaconda-33.19/pyanaconda/ui/gui/spokes/datetime_spoke.py +--- anaconda-33.19.org/pyanaconda/ui/gui/spokes/datetime_spoke.py 2021-08-07 16:25:21.547621965 +0800 ++++ anaconda-33.19/pyanaconda/ui/gui/spokes/datetime_spoke.py 2021-08-07 16:30:03.958279259 +0800 +@@ -53,9 +53,8 @@ + import gi + gi.require_version("Gdk", "3.0") + gi.require_version("Gtk", "3.0") +-gi.require_version("TimezoneMap", "1.0") + +-from gi.repository import Gdk, Gtk, TimezoneMap ++from gi.repository import Gdk, Gtk + + log = get_module_logger(__name__) + +@@ -377,11 +376,6 @@ + icon = "preferences-system-time-symbolic" + title = CN_("GUI|Spoke", "_Time & Date") + +- # Hack to get libtimezonemap loaded for GtkBuilder +- # see https://bugzilla.gnome.org/show_bug.cgi?id=712184 +- _hack = TimezoneMap.TimezoneMap() +- del(_hack) +- + def __init__(self, *args): + NormalSpoke.__init__(self, *args) + +@@ -407,7 +401,6 @@ + self._yearsStore = self.builder.get_object("years") + self._regionsStore = self.builder.get_object("regions") + self._citiesStore = self.builder.get_object("cities") +- self._tzmap = self.builder.get_object("tzmap") + self._dateBox = self.builder.get_object("dateBox") + + # we need to know it the new value is the same as previous or not +@@ -530,10 +523,6 @@ + else: + return _("Invalid timezone") + else: +- location = self._tzmap.get_location() +- if location and location.get_property("zone"): +- return _("%s timezone") % get_xlated_timezone(location.get_property("zone")) +- else: + return _("Nothing selected") + + def apply(self): +@@ -585,7 +574,6 @@ + kickstart_timezone = self._timezone_module.Timezone + + if is_valid_timezone(kickstart_timezone): +- self._tzmap.set_timezone(kickstart_timezone) + time.tzset() + + self._update_datetime() +@@ -960,7 +948,6 @@ + if region == "Etc": + # Etc timezones cannot be displayed on the map, so let's reset the + # location and manually set a highlight with no location pin. +- self._tzmap.clear_location() + if city in ("GMT", "UTC"): + offset = 0.0 + # The tzdb data uses POSIX-style signs for the GMT zones, which is +@@ -971,13 +958,14 @@ + # Take the part after "GMT" + offset = -float(city[3:]) + +- self._tzmap.set_selected_offset(offset) + time.tzset() + else: + # we don't want the timezone-changed signal to be emitted +- self._tzmap.set_timezone(timezone) + time.tzset() + ++ self._tz = get_timezone(timezone) ++ self._update_datetime() ++ + # update "old" values + self._old_city = city + +@@ -1027,22 +1015,6 @@ + self._stop_and_maybe_start_time_updating(interval=5) + self._daysFilter.refilter() + +- def on_location_changed(self, tz_map, location): +- if not location: +- return +- +- timezone = location.get_property('zone') +- +- # Updating the timezone will update the region/city combo boxes to match. +- # The on_city_changed handler will attempt to convert the timezone back +- # to a location and set it in the map, which we don't want, since we +- # already have a location. That's why we're here. +- with blockedHandler(self._cityCombo, self.on_city_changed): +- if self._set_timezone(timezone): +- # timezone successfully set +- self._tz = get_timezone(timezone) +- self._update_datetime() +- + def on_timeformat_changed(self, button24h, *args): + hours = int(self._hoursLabel.get_text()) + amPm = self._amPmLabel.get_text()