From patchwork Sat Nov 2 01:43:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kei Kebreau X-Patchwork-Id: 15932 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7C116176B8; Sat, 2 Nov 2019 01:46:00 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id E51BA176B3 for ; Sat, 2 Nov 2019 01:45:59 +0000 (GMT) Received: from localhost ([::1]:44572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQiUJ-0008SX-C8 for patchwork@mira.cbaines.net; Fri, 01 Nov 2019 21:45:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59700) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQiTW-0007so-P5 for guix-patches@gnu.org; Fri, 01 Nov 2019 21:45:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQiTU-0001jG-CA for guix-patches@gnu.org; Fri, 01 Nov 2019 21:45:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49040) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQiTU-0001iw-77 for guix-patches@gnu.org; Fri, 01 Nov 2019 21:45:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQiTU-00089i-0s for guix-patches@gnu.org; Fri, 01 Nov 2019 21:45:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#38029] [PATCH 16/80] gnu: gnome-control-center: Update to 3.32.2. Resent-From: Kei Kebreau Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Nov 2019 01:45:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38029 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 38029@debbugs.gnu.org Cc: Kei Kebreau Received: via spool by 38029-submit@debbugs.gnu.org id=B38029.157265906431222 (code B ref 38029); Sat, 02 Nov 2019 01:45:07 +0000 Received: (at 38029) by debbugs.gnu.org; 2 Nov 2019 01:44:24 +0000 Received: from localhost ([127.0.0.1]:57851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQiSi-00087L-T0 for submit@debbugs.gnu.org; Fri, 01 Nov 2019 21:44:23 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQiSW-00084X-F3 for 38029@debbugs.gnu.org; Fri, 01 Nov 2019 21:44:11 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2420B2400FB for <38029@debbugs.gnu.org>; Sat, 2 Nov 2019 02:44:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1572659041; bh=xV2z9e9bKHgrCRBL3BSAfTR4Y/bkyVQ0CoZaAFiPwYw=; h=From:To:Cc:Subject:Date:From; b=cvbQeEe+q5rDrHWLxFssM62FjVm79FK9J17iXzPgRLWu3mf5DO86fJYdjd3fzseFM fq/lWEltlo0/GBBk//Z686sDHqKtS606exzrR4n4NrQzua0prdI0ZbAaPfR1xp9/5m K8d649WgjktRKAIf0JhghbgI9UrduavffXyj1LmTUwfyxbxOkdHNKICz89KBHzBEx/ ZTmUx+Da/FZN8zRJ2TQuHO7YolZxQ6M0QR+MH/Islq+wVF31hLTeXELA+wMEE0Qmbe CQJ15FP3NlY+kqoSmQvvttjtYNqIWsj6KzCjn0kMC+nupJsachJHxF9dQLuL7GRVZ0 FQbSxGY06KpNA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 474hg42kvNz9s23; Sat, 2 Nov 2019 02:44:00 +0100 (CET) From: Kei Kebreau Date: Fri, 1 Nov 2019 21:43:45 -0400 Message-Id: <20191102014348.3191-7-kkebreau@posteo.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191102014348.3191-1-kkebreau@posteo.net> References: <20191102014348.3191-1-kkebreau@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gnome.scm (gnome-control-center): Update to 3.32.2. [source]: Remove patch. [arguments]: Adjust 'patch-paths' phase accordingly. [native-inputs]: Add hicolor-icon-theme, python-dbusmock and xorg-server-for-tests. [inputs]: Add gnome-session and gsound. * gnu/packages/patches/gnome-control-center-udisks.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 13 +- .../patches/gnome-control-center-udisks.patch | 221 ------------------ 3 files changed, 8 insertions(+), 227 deletions(-) delete mode 100644 gnu/packages/patches/gnome-control-center-udisks.patch diff --git a/gnu/local.mk b/gnu/local.mk index 9f5bce3d2b..4b62f806ff 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -913,7 +913,6 @@ dist_patch_DATA = \ %D%/packages/patches/glusterfs-use-PATH-instead-of-hardcodes.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ %D%/packages/patches/gmp-faulty-test.patch \ - %D%/packages/patches/gnome-control-center-udisks.patch \ %D%/packages/patches/gnome-shell-theme.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 195e9dd567..edb676de6a 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -6016,7 +6016,7 @@ devices using the GNOME desktop.") (define-public gnome-control-center (package (name "gnome-control-center") - (version "3.30.3") + (version "3.32.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -6024,9 +6024,7 @@ devices using the GNOME desktop.") name "-" version ".tar.xz")) (sha256 (base32 - "0gih1cmqbv803kp30704sllghb0impa0mmv3j8pndfg4zr2mnq9r")) - (patches - (search-patches "gnome-control-center-udisks.patch")))) + "03np0mhfl9kkdw4cb711pda0cli9zgh2bq2gqn2zwbdi3qnhk9gs")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t @@ -6073,7 +6071,11 @@ devices using the GNOME desktop.") ("gtk+:bin" ,gtk+ "bin") ; for gtk-update-icon-cache ("intltool" ,intltool) ("pkg-config" ,pkg-config) - ("xsltproc" ,libxslt))) + ("xsltproc" ,libxslt) + ;; For tests + ("hicolor-icon-theme" ,hicolor-icon-theme) + ("python-dbusmock" ,python-dbusmock) + ("xorg-server" ,xorg-server-for-tests))) (inputs `(("accountsservice" ,accountsservice) ("clutter-gtk" ,clutter-gtk) @@ -6089,6 +6091,7 @@ devices using the GNOME desktop.") ("gnome-session" ,gnome-session) ("gnome-settings-daemon" ,gnome-settings-daemon) ("grilo" ,grilo) + ("gsound" ,gsound) ("ibus" ,ibus) ("libcanberra" ,libcanberra) ("libgnomekbd" ,libgnomekbd) diff --git a/gnu/packages/patches/gnome-control-center-udisks.patch b/gnu/packages/patches/gnome-control-center-udisks.patch deleted file mode 100644 index 823684b2e9..0000000000 --- a/gnu/packages/patches/gnome-control-center-udisks.patch +++ /dev/null @@ -1,221 +0,0 @@ -This patch is derived from upstream commit 2520aea6 and fixes upstream issues -285 and 302. See https://gitlab.gnome.org/GNOME/gcr/merge_requests/387, -https://gitlab.gnome.org/GNOME/gnome-control-center/issues/285 and -https://gitlab.gnome.org/GNOME/gnome-control-center/issues/302. - -diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c -index e2276a295b3fd9de01b30fc3369069b5d33ba5b7..ff47c1fef2493bcc7ab34f9e8716d570d8d370ed 100644 ---- a/panels/info/cc-info-overview-panel.c -+++ b/panels/info/cc-info-overview-panel.c -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - - #include - -@@ -81,9 +82,7 @@ typedef struct - - GCancellable *cancellable; - -- /* Free space */ -- GList *primary_mounts; -- guint64 total_bytes; -+ UDisksClient *client; - - GraphicsData *graphics_data; - } CcInfoOverviewPanelPrivate; -@@ -96,8 +95,6 @@ struct _CcInfoOverviewPanel - CcInfoOverviewPanelPrivate *priv; - }; - --static void get_primary_disc_info_start (CcInfoOverviewPanel *self); -- - typedef struct - { - char *major; -@@ -486,111 +483,51 @@ get_os_type (void) - } - - static void --query_done (GFile *file, -- GAsyncResult *res, -- CcInfoOverviewPanel *self) -+get_primary_disc_info (CcInfoOverviewPanel *self) - { - CcInfoOverviewPanelPrivate *priv; -- g_autoptr(GFileInfo) info = NULL; -- g_autoptr(GError) error = NULL; -- -- info = g_file_query_filesystem_info_finish (file, res, &error); -- if (info != NULL) -- { -- priv = cc_info_overview_panel_get_instance_private (self); -- priv->total_bytes += g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE); -- } -- else -- { -- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) -- return; -- else -- { -- g_autofree char *path = NULL; -- path = g_file_get_path (file); -- g_warning ("Failed to get filesystem free space for '%s': %s", path, error->message); -- } -- } -+ GDBusObjectManager *manager; -+ g_autolist(GDBusObject) objects = NULL; -+ GList *l; -+ guint64 total_size; - -- /* And onto the next element */ -- get_primary_disc_info_start (self); --} -- --static void --get_primary_disc_info_start (CcInfoOverviewPanel *self) --{ -- GUnixMountEntry *mount; -- g_autoptr(GFile) file = NULL; -- CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); -+ priv = cc_info_overview_panel_get_instance_private (self); -+ total_size = 0; - -- if (priv->primary_mounts == NULL) -+ if (!priv->client) - { -- g_autofree char *size = NULL; -- -- size = g_format_size (priv->total_bytes); -- gtk_label_set_text (GTK_LABEL (priv->disk_label), size); -- -+ gtk_label_set_text (GTK_LABEL (priv->disk_label), _("Unknown")); - return; - } - -- mount = priv->primary_mounts->data; -- priv->primary_mounts = g_list_remove (priv->primary_mounts, mount); -- file = g_file_new_for_path (g_unix_mount_get_mount_path (mount)); -- g_unix_mount_free (mount); -- -- g_file_query_filesystem_info_async (file, -- G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, -- 0, -- priv->cancellable, -- (GAsyncReadyCallback) query_done, -- self); --} -- --static void --get_primary_disc_info (CcInfoOverviewPanel *self) --{ -- GList *points; -- GList *p; -- GHashTable *hash; -- CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); -- -- hash = g_hash_table_new (g_str_hash, g_str_equal); -- points = g_unix_mount_points_get (NULL); -- -- /* If we do not have /etc/fstab around, try /etc/mtab */ -- if (points == NULL) -- points = g_unix_mounts_get (NULL); -+ manager = udisks_client_get_object_manager (priv->client); -+ objects = g_dbus_object_manager_get_objects (manager); - -- for (p = points; p != NULL; p = p->next) -+ for (l = objects; l != NULL; l = l->next) - { -- GUnixMountEntry *mount = p->data; -- const char *mount_path; -- const char *device_path; -- -- mount_path = g_unix_mount_get_mount_path (mount); -- device_path = g_unix_mount_get_device_path (mount); -- -- /* Do not count multiple mounts with same device_path, because it is -- * probably something like btrfs subvolume. Use only the first one in -- * order to count the real size. */ -- if (gsd_should_ignore_unix_mount (mount) || -- gsd_is_removable_mount (mount) || -- g_str_has_prefix (mount_path, "/media/") || -- g_str_has_prefix (mount_path, g_get_home_dir ()) || -- g_hash_table_lookup (hash, device_path) != NULL) -+ UDisksDrive *drive; -+ drive = udisks_object_peek_drive (UDISKS_OBJECT (l->data)); -+ -+ /* Skip removable devices */ -+ if (drive == NULL || -+ udisks_drive_get_removable (drive) || -+ udisks_drive_get_ejectable (drive)) - { -- g_unix_mount_free (mount); - continue; - } - -- priv->primary_mounts = g_list_prepend (priv->primary_mounts, mount); -- g_hash_table_insert (hash, (gpointer) device_path, (gpointer) device_path); -+ total_size += udisks_drive_get_size (drive); - } -- g_list_free (points); -- g_hash_table_destroy (hash); - -- priv->cancellable = g_cancellable_new (); -- get_primary_disc_info_start (self); -+ if (total_size > 0) -+ { -+ g_autofree gchar *size = g_format_size (total_size); -+ gtk_label_set_text (GTK_LABEL (priv->disk_label), size); -+ } -+ else -+ { -+ gtk_label_set_text (GTK_LABEL (priv->disk_label), _("Unknown")); -+ } - } - - static char * -@@ -852,8 +789,7 @@ cc_info_overview_panel_finalize (GObject *object) - g_clear_object (&priv->cancellable); - } - -- if (priv->primary_mounts) -- g_list_free_full (priv->primary_mounts, (GDestroyNotify) g_unix_mount_free); -+ g_clear_object (&priv->client); - - g_free (priv->gnome_version); - g_free (priv->gnome_date); -@@ -895,6 +831,7 @@ static void - cc_info_overview_panel_init (CcInfoOverviewPanel *self) - { - CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); -+ g_autoptr(GError) error = NULL; - - gtk_widget_init_template (GTK_WIDGET (self)); - -@@ -907,6 +844,12 @@ cc_info_overview_panel_init (CcInfoOverviewPanel *self) - else - gtk_widget_destroy (priv->updates_button); - -+ priv->client = udisks_client_new_sync (NULL, &error); -+ -+ if (error != NULL) -+ g_warning ("Unable to get UDisks client: %s. Disk information will not be available.", -+ error->message); -+ - info_overview_panel_setup_overview (self); - info_overview_panel_setup_virt (self); - } -diff --git a/panels/info/meson.build b/panels/info/meson.build -index 03742551314f91b60e3ec1caad153ff314b93310..c54e5fdaff3c6ddb59cca8ee9a2bf5a0212bf196 100644 ---- a/panels/info/meson.build -+++ b/panels/info/meson.build -@@ -61,6 +61,7 @@ sources += gnome.compile_resources( - - deps = common_deps + [ - polkit_gobject_dep, -+ dependency('udisks2', version: '>= 2.1.8'), - dependency('libgtop-2.0') - ] -