diff --git a/0001-gnome-control-center-can-t-get-cpu-information-on-lo.patch b/0001-gnome-control-center-can-t-get-cpu-information-on-lo.patch deleted file mode 100644 index a461a48109ba071ad0affa9b294568cf6c221ab9..0000000000000000000000000000000000000000 --- a/0001-gnome-control-center-can-t-get-cpu-information-on-lo.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 884a6d5f828a0760c9c7fd94291550a12c061a45 Mon Sep 17 00:00:00 2001 -From: Huang Yang -Date: Fri, 6 Dec 2024 03:10:47 +0000 -Subject: [PATCH] gnome-control-center can't get cpu information on loongarch - ---- - panels/info-overview/cc-info-overview-panel.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c -index 609042b..e2bae46 100644 ---- a/panels/info-overview/cc-info-overview-panel.c -+++ b/panels/info-overview/cc-info-overview-panel.c -@@ -478,7 +478,7 @@ get_cpu_info (const glibtop_sysinfo *info) - /* count duplicates */ - for (i = 0; i != info->ncpu; ++i) - { -- const char * const keys[] = { "model name", "cpu", "Processor" }; -+ const char * const keys[] = { "model name", "Model Name", "cpu", "Processor" }; - char *model; - int *count; - --- -2.41.0 - diff --git a/0002-network-Add-ToastOverlay-to-connection-editor.patch b/0002-network-Add-ToastOverlay-to-connection-editor.patch deleted file mode 100644 index 411d8f436de20815ad0d44645d966a6dd52d9aec..0000000000000000000000000000000000000000 --- a/0002-network-Add-ToastOverlay-to-connection-editor.patch +++ /dev/null @@ -1,176 +0,0 @@ -From e6336ec43336794a1ed3d61752fa55f45eb18561 Mon Sep 17 00:00:00 2001 -From: Felipe Borges -Date: Wed, 3 May 2023 12:04:43 +0200 -Subject: [PATCH] network: Add ToastOverlay to connection-editor - ---- - .../connection-editor/connection-editor.ui | 52 ++++++++++--------- - .../connection-editor/net-connection-editor.c | 50 +++++++----------- - 2 files changed, 46 insertions(+), 56 deletions(-) - -diff --git a/panels/network/connection-editor/connection-editor.ui b/panels/network/connection-editor/connection-editor.ui -index 18031e8ac..2bff4d0ab 100644 ---- a/panels/network/connection-editor/connection-editor.ui -+++ b/panels/network/connection-editor/connection-editor.ui -@@ -28,41 +28,45 @@ - vertical - 0 - -- -- True -- True -- -- -- center -- center -- True -- -- -- -- -- False -- -- -- -- -+ -+ -+ -+ True - True - -- -- True -+ -+ center -+ center -+ True -+ -+ -+ -+ -+ False -+ -+ -+ -+ - True -- vertical - -- -+ - True - True -- 300 -- start -+ vertical -+ -+ -+ True -+ True -+ 300 -+ start -+ -+ - - - - - -- -+ - - - -diff --git a/panels/network/connection-editor/net-connection-editor.c b/panels/network/connection-editor/net-connection-editor.c -index 297c6607e..e67da42b2 100644 ---- a/panels/network/connection-editor/net-connection-editor.c -+++ b/panels/network/connection-editor/net-connection-editor.c -@@ -56,6 +56,7 @@ struct _NetConnectionEditor - GtkButton *apply_button; - GtkButton *cancel_button; - GtkNotebook *notebook; -+ AdwToastOverlay *toast_overlay; - GtkStack *toplevel_stack; - - NMClient *client; -@@ -335,6 +336,7 @@ net_connection_editor_class_init (NetConnectionEditorClass *class) - gtk_widget_class_bind_template_child (widget_class, NetConnectionEditor, apply_button); - gtk_widget_class_bind_template_child (widget_class, NetConnectionEditor, cancel_button); - gtk_widget_class_bind_template_child (widget_class, NetConnectionEditor, notebook); -+ gtk_widget_class_bind_template_child (widget_class, NetConnectionEditor, toast_overlay); - gtk_widget_class_bind_template_child (widget_class, NetConnectionEditor, toplevel_stack); - - gtk_widget_class_bind_template_callback (widget_class, cancel_clicked_cb); -@@ -342,33 +344,6 @@ net_connection_editor_class_init (NetConnectionEditorClass *class) - gtk_widget_class_bind_template_callback (widget_class, apply_clicked_cb); - } - --static void --net_connection_editor_error_dialog (NetConnectionEditor *self, -- const char *primary_text, -- const char *secondary_text) --{ -- GtkWidget *dialog; -- GtkWindow *parent; -- -- if (gtk_widget_is_visible (GTK_WIDGET (self))) -- parent = GTK_WINDOW (self); -- else -- parent = gtk_window_get_transient_for (GTK_WINDOW (self)); -- -- dialog = gtk_message_dialog_new (parent, -- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -- GTK_MESSAGE_ERROR, -- GTK_BUTTONS_OK, -- "%s", primary_text); -- -- if (secondary_text) { -- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), -- "%s", secondary_text); -- } -- -- gtk_window_present (GTK_WINDOW (dialog)); --} -- - static void - net_connection_editor_do_fallback (NetConnectionEditor *self, const gchar *type) - { -@@ -384,10 +359,15 @@ net_connection_editor_do_fallback (NetConnectionEditor *self, const gchar *type) - - g_spawn_command_line_async (cmdline, &error); - -- if (error) -- net_connection_editor_error_dialog (self, -- _("Unable to open connection editor"), -- error->message); -+ if (error) { -+ AdwToast *toast; -+ g_autofree gchar *message = NULL; -+ -+ message = g_strdup_printf (_("Unable to open connection editor: %s"), error->message); -+ toast = adw_toast_new (message); -+ -+ adw_toast_overlay_add_toast (self->toast_overlay, toast); -+ } - - g_signal_emit (self, signals[DONE], 0, FALSE); - } -@@ -745,7 +725,13 @@ vpn_import_complete (NMConnection *connection, gpointer user_data) - NMSettingConnection *s_con; - - if (!connection) { -- /* The import code shows its own error dialogs. */ -+ AdwToast *toast; -+ g_autofree gchar *message = NULL; -+ -+ message = g_strdup_printf (_("Invalid VPN configuration file")); -+ toast = adw_toast_new (message); -+ adw_toast_overlay_add_toast (self->toast_overlay, toast); -+ - g_signal_emit (self, signals[DONE], 0, FALSE); - return; - } --- -2.39.3 - diff --git a/0003-network-connection-editor-Close-the-editor-when-nm-c.patch b/0003-network-connection-editor-Close-the-editor-when-nm-c.patch deleted file mode 100644 index b17960cfd8b61bbb904eabf4cdd2571ffd060b7b..0000000000000000000000000000000000000000 --- a/0003-network-connection-editor-Close-the-editor-when-nm-c.patch +++ /dev/null @@ -1,85 +0,0 @@ -From f0d04a180f969ee5b3b703ab39746a55c800ecf3 Mon Sep 17 00:00:00 2001 -From: Jonathan Kang -Date: Mon, 9 Oct 2023 09:14:03 +0800 -Subject: [PATCH] network-connection-editor: Close the editor when - nm-connection-editor exits - -Previously, when editing a connection that doesn't have native editor -support, nm-connection-editor is spawned to do the work. But after -closing nm-connection-editor, an empty editor dialog still exists. - -Fix that in this commit. ---- - .../connection-editor/net-connection-editor.c | 40 ++++++++++++++++--- - 1 file changed, 35 insertions(+), 5 deletions(-) - -diff --git a/panels/network/connection-editor/net-connection-editor.c b/panels/network/connection-editor/net-connection-editor.c -index d3e351080..6a3194114 100644 ---- a/panels/network/connection-editor/net-connection-editor.c -+++ b/panels/network/connection-editor/net-connection-editor.c -@@ -362,20 +362,48 @@ net_connection_editor_class_init (NetConnectionEditorClass *class) - gtk_widget_class_bind_template_callback (widget_class, apply_clicked_cb); - } - -+static void -+nm_connection_editor_watch_cb (GPid pid, -+ gint status, -+ gpointer user_data) -+{ -+ g_debug ("Child %d" G_PID_FORMAT " exited %s", pid, -+ g_spawn_check_wait_status (status, NULL) ? "normally" : "abnormally"); -+ -+ g_spawn_close_pid (pid); -+ /* Close the dialog when nm-connection-editor exits. */ -+ gtk_window_destroy (GTK_WINDOW (user_data)); -+} -+ - static void - net_connection_editor_do_fallback (NetConnectionEditor *self, const gchar *type) - { -- g_autofree gchar *cmdline = NULL; - g_autoptr(GError) error = NULL; -+ g_autoptr(GStrvBuilder) builder = NULL; -+ g_auto(GStrv) argv = NULL; -+ GPid child_pid; -+ -+ builder = g_strv_builder_new (); -+ g_strv_builder_add (builder, "nm-connection-editor"); - - if (self->is_new_connection) { -- cmdline = g_strdup_printf ("nm-connection-editor --type='%s' --create", type); -+ g_autofree gchar *type_str = NULL; -+ -+ type_str = g_strdup_printf ("--type=%s", type); -+ g_strv_builder_add (builder, type_str); -+ g_strv_builder_add (builder, "--create"); - } else { -- cmdline = g_strdup_printf ("nm-connection-editor --edit='%s'", -- nm_connection_get_uuid (self->connection)); -+ g_autofree gchar *edit_str = NULL; -+ -+ edit_str = g_strdup_printf ("--edit=%s", nm_connection_get_uuid (self->connection)); -+ g_strv_builder_add (builder, edit_str); - } - -- g_spawn_command_line_async (cmdline, &error); -+ g_strv_builder_add (builder, NULL); -+ argv = g_strv_builder_end (builder); -+ -+ g_spawn_async_with_pipes (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, -+ NULL, NULL, &child_pid, NULL, NULL, NULL, &error); - - if (error) { - AdwToast *toast; -@@ -385,6 +413,8 @@ net_connection_editor_do_fallback (NetConnectionEditor *self, const gchar *type) - toast = adw_toast_new (message); - - adw_toast_overlay_add_toast (self->toast_overlay, toast); -+ } else { -+ g_child_watch_add (child_pid, nm_connection_editor_watch_cb, self); - } - - g_signal_emit (self, signals[DONE], 0, FALSE); --- -2.39.3 - diff --git a/0004-Add-glib-2.80-compatibility-macros-for-older-version.patch b/0004-Add-glib-2.80-compatibility-macros-for-older-version.patch new file mode 100644 index 0000000000000000000000000000000000000000..0776a32cfa07f3a25e59c49b142482c819e32a12 --- /dev/null +++ b/0004-Add-glib-2.80-compatibility-macros-for-older-version.patch @@ -0,0 +1,38 @@ +From 0cd9a203a60dfb716bf72e76bb2207aeb980d07b Mon Sep 17 00:00:00 2001 +From: tomcruiseqi +Date: Mon, 28 Jul 2025 17:46:19 +0800 +Subject: [PATCH] Add glib 2.80 compatibility macros for older versions + +Add GTYPE_TO_POINTER and GPOINTER_TO_TYPE macro definitions to support +compilation with glib versions prior to 2.80. These macros are used in +cc-panel.c for type conversions in the subpages hash table operations. + +The macros are conditionally defined to avoid conflicts when building +with glib 2.80 or later where they are natively available. +--- + shell/cc-panel.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/shell/cc-panel.h b/shell/cc-panel.h +index f3d9f0d..8554aa0 100644 +--- a/shell/cc-panel.h ++++ b/shell/cc-panel.h +@@ -24,6 +24,15 @@ + + #include + ++/* Compatibility macros for glib < 2.80 */ ++#ifndef GTYPE_TO_POINTER ++#define GTYPE_TO_POINTER(type) ((gpointer) (gsize) (type)) ++#endif ++ ++#ifndef GPOINTER_TO_TYPE ++#define GPOINTER_TO_TYPE(pointer) ((GType) (gsize) (pointer)) ++#endif ++ + /** + * Utility macro used to register panels + * +-- +2.47.3 + diff --git a/gnome-control-center-44.1.tar.xz b/gnome-control-center-47.3.tar.xz similarity index 48% rename from gnome-control-center-44.1.tar.xz rename to gnome-control-center-47.3.tar.xz index 3b45a6fa642daaf1d0914ff5360a3b79e6415144..720d0fe3b6aa65bd11263486e43a68a178fc12c0 100644 Binary files a/gnome-control-center-44.1.tar.xz and b/gnome-control-center-47.3.tar.xz differ diff --git a/gnome-control-center.spec b/gnome-control-center.spec index c0ab9ca335d056413e8c8c2b541a9c0eceb62543..7ffb698f753a1e17eab15b61c25b236fe4512e4e 100644 --- a/gnome-control-center.spec +++ b/gnome-control-center.spec @@ -1,78 +1,98 @@ -%define anolis_release 4 +%define anolis_release 1 + +%define gcr_version 4.1.0 +%define gnome_online_accounts_version 3.50.0 +%define glib2_version 2.76.6 +%define gnome_desktop_version 44.0 +%define gsd_version 41.0 +%define gsettings_desktop_schemas_version 46~beta +%define upower_version 0.99.8 +%define gtk4_version 4.15.2 +%define gnome_bluetooth_version 42~alpha +%define libadwaita_version 1.6~alpha +%define nm_version 1.24.0 Name: gnome-control-center -Version: 44.1 +Version: 47.3 Release: %{anolis_release}%{?dist} Summary: Utilities to configure the GNOME desktop - + License: GPLv2+ and CC-BY-SA URL: http://www.gnome.org -Source0: https://download.gnome.org/sources/%{name}/44/%{name}-%{version}.tar.xz -Patch0001: 0001-gnome-control-center-can-t-get-cpu-information-on-lo.patch -Patch0002: 0002-network-Add-ToastOverlay-to-connection-editor.patch -Patch0003: 0003-network-connection-editor-Close-the-editor-when-nm-c.patch +Source0: https://download.gnome.org/sources/%{name}/47/%{name}-%{version}.tar.xz +# The cc-panel.c file uses two MACROs from glib-2.80 +Patch0004: 0004-Add-glib-2.80-compatibility-macros-for-older-version.patch -BuildRequires: docbook-style-xsl libxslt -BuildRequires: gcc gettext meson >= 0.57.0 + +BuildRequires: desktop-file-utils +BuildRequires: docbook-style-xsl +BuildRequires: libxslt +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: meson >= 0.57.0 BuildRequires: pkgconfig(accountsservice) >= 0.6.39 BuildRequires: pkgconfig(colord) >= 0.1.34 BuildRequires: pkgconfig(colord-gtk4) >= 0.1.24 BuildRequires: pkgconfig(cups) >= 1.4 BuildRequires: pkgconfig(epoxy) -BuildRequires: pkgconfig(gcr-base-3) +BuildRequires: pkgconfig(gcr-4) >= %{gcr_version} BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.23.0 -BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(gnome-desktop-4) >= %{gnome_desktop_version} +BuildRequires: pkgconfig(gnome-settings-daemon) >= %{gsd_version} +BuildRequires: pkgconfig(goa-1.0) >= %{gnome_online_accounts_version} BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(glib-2.0) >= 2.75.0 BuildRequires: pkgconfig(gnome-bg-4) BuildRequires: pkgconfig(gnome-bluetooth-ui-3.0) -BuildRequires: pkgconfig(gnome-desktop-4) BuildRequires: pkgconfig(gnome-rr-4) -BuildRequires: pkgconfig(gnome-settings-daemon) >= 41.0 BuildRequires: pkgconfig(gnutls) -BuildRequires: pkgconfig(goa-1.0) >= 3.25.3 -BuildRequires: pkgconfig(gsettings-desktop-schemas) >= 42 +BuildRequires: pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version} BuildRequires: pkgconfig(gsound) BuildRequires: pkgconfig(gthread-2.0) -BuildRequires: pkgconfig(gtk4) >= 4.9.3 +BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} BuildRequires: pkgconfig(gudev-1.0) >= 232 BuildRequires: pkgconfig(ibus-1.0) >= 1.5.2 BuildRequires: pkgconfig(krb5) -BuildRequires: pkgconfig(libadwaita-1) >= 1.2 +BuildRequires: pkgconfig(libadwaita-1) >= %{libadwaita_version} BuildRequires: pkgconfig(libgtop-2.0) -BuildRequires: pkgconfig(libnm) >= 1.24.0 +BuildRequires: pkgconfig(libnm) >= %{nm_version} BuildRequires: pkgconfig(libnma-gtk4) >= 1.10.2 BuildRequires: pkgconfig(libpulse) >= 2.0 BuildRequires: pkgconfig(libpulse-mainloop-glib) >= 2.0 BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libwacom) >= 0.7 +BuildRequires: pkgconfig(libsoup-3.0) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(malcontent-0) >= 0.10.0 BuildRequires: pkgconfig(mm-glib) >= 0.7 BuildRequires: pkgconfig(polkit-gobject-1) >= 0.103 BuildRequires: pkgconfig(pwquality) >= 1.2.2 BuildRequires: pkgconfig(smbclient) +BuildRequires: pkgconfig(tecla) BuildRequires: pkgconfig(udisks2) >= 2.8.2 -BuildRequires: pkgconfig(upower-glib) >= 0.99.8 +BuildRequires: pkgconfig(upower-glib) >= %{upower_version} BuildRequires: pkgconfig(x11) >= 1.8 BuildRequires: pkgconfig(xi) >= 1.2 -%if 0%{?alinux} +%if 0%{?alinux} BuildRequires: alinux-logos -%else +%else BuildRequires: anolis-logos %endif - + # Versioned library deps -Requires: libadwaita >= 1.2 -Requires: glib2 >= 2.75.0 -Requires: gnome-desktop4 -Requires: gnome-online-accounts >= 3.25.3 -Requires: gnome-settings-daemon >= 41.0 -Requires: gsettings-desktop-schemas >= 42 -Requires: gtk4 >= 4.9.3 -Requires: upower >= 0.99.8 -Requires: gnome-bluetooth - +Requires: libadwaita >= %{libadwaita_version} +Requires: glib2 >= %{glib2_version} +Requires: gnome-desktop4 >= %{gnome_desktop_version} +Requires: gnome-online-accounts >= %{gnome_online_accounts_version} +Requires: gnome-settings-daemon >= %{gsd_version} +Requires: gsettings-desktop-schemas >= %{gsettings_desktop_schemas_version} +Requires: gtk4 >= %{gtk4_version} +Requires: upower >= %{upower_version} +%ifnarch s390 s390x +Recommends: gnome-bluetooth >= 1:%{gnome_bluetooth_version} +%endif + Requires: %{name}-filesystem = %{version}-%{release} # For user accounts Requires: accountsservice alsa-lib @@ -103,21 +123,21 @@ Recommends: power-profiles-daemon Provides: control-center = 1:%{version}-%{release} Provides: control-center = 1:%{version}-%{release} Obsoletes: control-center < 1:%{version}-%{release} - + %description GNOME Settings is GNOME's main interface for configuration of various aspects of your desktop. - + %package filesystem Summary: GNOME Control Center directories BuildArch: noarch Provides: control-center-filesystem = 1:%{version}-%{release} Obsoletes: control-center-filesystem < 1:%{version}-%{release} - + %description filesystem The GNOME control-center provides a number of extension points for applications. This package contains directories where applications can install configuration files that are picked up by the control-center utilities. - + %package doc Summary: Documentation files for %{name} Requires: %{name} = %{EVR} @@ -128,7 +148,7 @@ The %{name}-doc package contains documentation files for %{name}. %prep %autosetup -p1 -n %{name}-%{version} - + %build %meson \ -Ddocumentation=true \ @@ -141,11 +161,11 @@ The %{name}-doc package contains documentation files for %{name}. %install %meson_install mkdir -p $RPM_BUILD_ROOT%{_datadir}/gnome/wm-properties - + # We don't want these rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/autostart rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/cursor-fonts - + %find_lang %{name} --all-name --with-gnome %files -f %{name}.lang @@ -169,11 +189,9 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/cursor-fonts %{_datadir}/polkit-1/actions/org.gnome.controlcenter.*.policy %{_datadir}/polkit-1/rules.d/gnome-control-center.rules %{_datadir}/sounds/gnome/default/*/*.ogg -%{_libexecdir}/cc-remote-login-helper -%{_libexecdir}/gnome-control-center-goa-helper %{_libexecdir}/gnome-control-center-search-provider %{_libexecdir}/gnome-control-center-print-renderer - + %files filesystem %dir %{_datadir}/gnome-control-center %dir %{_datadir}/gnome-control-center/keybindings @@ -181,8 +199,15 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/cursor-fonts %files doc %doc NEWS README.md - + %changelog +* Fri Jul 25 2025 tomcruiseqi - 47.3-1 +- Update to 47.3 to fix CVE-2023-5616 +- Remove patch0001, because on 47.3, there is no file to patch +- Remove patch0002, because on 47.3, the ToastOverlay function is working, no need to patch +- Remove patch0003, because we have confirmed that there is no problem to remove the patch +- Add patch0004 to patch the missing MACROs from glib 2.80 + * Thu Jun 26 2025 Kaiqiang Wang - 44.1-4 - fix bug #22196 - Close the editor when nm-connection-editor exits