mirror of https://gitee.com/openkylin/glib2.0.git
apply new patches
This commit is contained in:
parent
22f2c5ccc8
commit
ce0704e452
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,27 @@
|
|||
From: Yue-Lan <lanyue@kylinos.cn>
|
||||
Date: Thu, 29 Feb 2024 16:14:23 +0800
|
||||
Subject: =?utf-8?b?5L+u5aSN57yW6K+R6Zeu6aKY?=
|
||||
|
||||
---
|
||||
gio/gportalsupport.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
|
||||
index 0efbc73..04fb589 100644
|
||||
--- a/gio/gportalsupport.c
|
||||
+++ b/gio/gportalsupport.c
|
||||
@@ -194,12 +194,12 @@ glib_has_dconf_access_in_sandbox (void)
|
||||
gboolean
|
||||
glib_is_force_use_portal (void)
|
||||
{
|
||||
- read_flatpak_info ();
|
||||
+ sandbox_info_read ();
|
||||
return force_use_portal;
|
||||
}
|
||||
|
||||
gboolean glib_should_use_kylin_process_manager (void)
|
||||
{
|
||||
- read_flatpak_info ();
|
||||
+ sandbox_info_read ();
|
||||
return use_kylin_process_manager;
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
From: Ryan Lortie <desrt@desrt.ca>
|
||||
Date: Tue, 4 Mar 2014 09:20:38 -0500
|
||||
Subject: timer test: use 'volatile' for locals
|
||||
|
||||
GCC seems to be failing to follow the letter of the C spec by allowing extra
|
||||
precision in floating point values to persist across assignments which are
|
||||
optimised away.
|
||||
|
||||
Force its hand by using 'volatile' on the locals in question.
|
||||
|
||||
Bug: https://gitlab.gnome.org/GNOME/glib/issues/820
|
||||
Forwarded: yes
|
||||
---
|
||||
glib/tests/timer.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/glib/tests/timer.c b/glib/tests/timer.c
|
||||
index ae44dc8..5b1b43c 100644
|
||||
--- a/glib/tests/timer.c
|
||||
+++ b/glib/tests/timer.c
|
||||
@@ -32,7 +32,7 @@ static void
|
||||
test_timer_basic (void)
|
||||
{
|
||||
GTimer *timer;
|
||||
- gdouble elapsed;
|
||||
+ volatile gdouble elapsed;
|
||||
gulong micros;
|
||||
|
||||
timer = g_timer_new ();
|
||||
@@ -67,7 +67,7 @@ static void
|
||||
test_timer_stop (void)
|
||||
{
|
||||
GTimer *timer;
|
||||
- gdouble elapsed, elapsed2;
|
||||
+ volatile gdouble elapsed, elapsed2;
|
||||
|
||||
timer = g_timer_new ();
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
From: Debian GNOME Maintainers
|
||||
<pkg-gnome-maintainers@lists.alioth.debian.org>
|
||||
Date: Wed, 29 Jun 2022 16:00:15 +0800
|
||||
Subject: =?utf-8?b?dmZhdOaWh+S7tui2hei/hzRH56e75Yqo5oiW5aSN5Yi255u05o6l5oql?=
|
||||
=?utf-8?b?6ZSZ?=
|
||||
|
||||
===================================================================
|
||||
---
|
||||
gio/gfile.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 70 insertions(+)
|
||||
|
||||
diff --git a/gio/gfile.c b/gio/gfile.c
|
||||
index 16ff09f..14ce34e 100644
|
||||
--- a/gio/gfile.c
|
||||
+++ b/gio/gfile.c
|
||||
@@ -55,6 +55,9 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
+#include <mntent.h>
|
||||
+#include <sys/vfs.h>
|
||||
+#include <syslog.h>
|
||||
|
||||
#include "gfile.h"
|
||||
#include "glib/gstdio.h"
|
||||
@@ -385,6 +388,29 @@ static gboolean g_file_real_measure_disk_usage_finish (GFile
|
||||
guint64 *num_files,
|
||||
GError **error);
|
||||
|
||||
+static const char* get_fs_type (char* path)
|
||||
+{
|
||||
+ const char* fs_type = NULL;
|
||||
+ struct mntent* m = NULL;
|
||||
+ FILE* f = NULL;
|
||||
+
|
||||
+ f = setmntent ("/etc/mtab", "r");
|
||||
+ if (!f) {
|
||||
+ syslog (LOG_ERR, "error:%s", strerror(errno));
|
||||
+ }
|
||||
+
|
||||
+ while ((m = getmntent(f))) {
|
||||
+ if (!path) continue;
|
||||
+ if (!m->mnt_dir) continue;
|
||||
+ if (!strcmp (path, m->mnt_dir)) {
|
||||
+ fs_type = g_strdup_printf("%s", m->mnt_type);
|
||||
+ }
|
||||
+ }
|
||||
+ endmntent (f);
|
||||
+
|
||||
+ return fs_type;
|
||||
+}
|
||||
+
|
||||
typedef GFileIface GFileInterface;
|
||||
G_DEFINE_INTERFACE (GFile, g_file, G_TYPE_OBJECT)
|
||||
|
||||
@@ -3682,10 +3708,32 @@ g_file_copy (GFile *source,
|
||||
GFileIface *iface;
|
||||
GError *my_error;
|
||||
gboolean res;
|
||||
+ const char* fs_type;
|
||||
+ GMount* destination_mount;
|
||||
+ GFile* root;
|
||||
+ struct stat s;
|
||||
|
||||
g_return_val_if_fail (G_IS_FILE (source), FALSE);
|
||||
g_return_val_if_fail (G_IS_FILE (destination), FALSE);
|
||||
|
||||
+ destination_mount = g_file_find_enclosing_mount(g_file_get_parent(destination), NULL, NULL);
|
||||
+ if ( destination_mount != NULL) {
|
||||
+ root = g_mount_get_default_location (destination_mount);
|
||||
+ fs_type = get_fs_type (g_file_get_path(root));
|
||||
+ if(fs_type != NULL) {
|
||||
+ if(!strcmp(fs_type,"vfat") || !strcmp(fs_type,"fat32")) {
|
||||
+ if (stat(g_file_get_path(source), &s) == 0) {
|
||||
+ if(s.st_size > 4294967296) {
|
||||
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, _("The file is too large, the fat format file system only supports files within 4G,can be imported in device after compression"));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ g_free(fs_type);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
@@ -3886,10 +3934,32 @@ g_file_move (GFile *source,
|
||||
GFileIface *iface;
|
||||
GError *my_error;
|
||||
gboolean res;
|
||||
+ const char* fs_type;
|
||||
+ GMount* destination_mount;
|
||||
+ GFile* root;
|
||||
+ struct stat s;
|
||||
|
||||
g_return_val_if_fail (G_IS_FILE (source), FALSE);
|
||||
g_return_val_if_fail (G_IS_FILE (destination), FALSE);
|
||||
|
||||
+ destination_mount = g_file_find_enclosing_mount(g_file_get_parent(destination), NULL, NULL);
|
||||
+ if ( destination_mount != NULL) {
|
||||
+ root = g_mount_get_default_location (destination_mount);
|
||||
+
|
||||
+ fs_type = get_fs_type (g_file_get_path(root));
|
||||
+ if(fs_type != NULL) {
|
||||
+ if(!strcmp(fs_type,"vfat") || !strcmp(fs_type,"fat32")) {
|
||||
+ if (stat(g_file_get_path(source), &s) == 0) {
|
||||
+ if(s.st_size > 4294967296) {
|
||||
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, _("The file is too large, the fat format file system only supports files within 4G,can be moved in device after compression"));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ g_free(fs_type);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
||||
return FALSE;
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From: Debian GNOME Maintainers
|
||||
<pkg-gnome-maintainers@lists.alioth.debian.org>
|
||||
Date: Wed, 29 Jun 2022 16:00:15 +0800
|
||||
Subject: fix-trash-issue-in-data-usershare
|
||||
|
||||
===================================================================
|
||||
---
|
||||
gio/glocalfile.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
|
||||
index dbb5690..9303902 100644
|
||||
--- a/gio/glocalfile.c
|
||||
+++ b/gio/glocalfile.c
|
||||
@@ -1995,6 +1995,7 @@ g_local_file_trash (GFile *file,
|
||||
GVfsClass *class;
|
||||
GVfs *vfs;
|
||||
int errsv;
|
||||
+ gboolean is_local_file_in_usershare = FALSE;
|
||||
|
||||
if (glib_should_use_portal ())
|
||||
return g_trash_portal_trash_file (file, error);
|
||||
@@ -2049,7 +2050,8 @@ g_local_file_trash (GFile *file,
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
- if (file_stat.st_dev == home_stat.st_dev)
|
||||
+ is_local_file_in_usershare = g_str_has_prefix(local->filename, "/data/usershare");
|
||||
+ if (file_stat.st_dev == home_stat.st_dev && !is_local_file_in_usershare)
|
||||
{
|
||||
is_homedir_trash = TRUE;
|
||||
errno = 0;
|
||||
@@ -2088,7 +2090,7 @@ g_local_file_trash (GFile *file,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- if (ignore_trash_path (topdir))
|
||||
+ if (ignore_trash_path (topdir) && !is_local_file_in_usershare)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Trashing on system internal mounts is not supported"));
|
23
debian/patches/5c52117c4ae9367c96609915fde5a280101a9b0b-GLIB_FORCE_USE_P.patch
vendored
Normal file
23
debian/patches/5c52117c4ae9367c96609915fde5a280101a9b0b-GLIB_FORCE_USE_P.patch
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
From: Yue-Lan <lanyue@kylinos.cn>
|
||||
Date: Wed, 6 Dec 2023 09:39:18 +0800
|
||||
Subject: =?utf-8?b?5L+u5pS5IDVjNTIxMTdjNGFlOTM2N2M5NjYwOTkxNWZkZTVhMjgwMTAx?=
|
||||
=?utf-8?b?YTliMGIg5YWz5LqOR0xJQl9GT1JDRV9VU0VfUE9SVEFM55qE5Yid5aeL5YyW6YC7?=
|
||||
=?utf-8?b?6L6R77yM5LiN5YaN5L6d6LWWR1RLX1VTRV9QT1JUQUw=?=
|
||||
|
||||
---
|
||||
gio/gportalsupport.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
|
||||
index 12c5d6a..f8d866f 100644
|
||||
--- a/gio/gportalsupport.c
|
||||
+++ b/gio/gportalsupport.c
|
||||
@@ -142,7 +142,7 @@ sandbox_info_read (void)
|
||||
network_available = TRUE;
|
||||
dconf_access = TRUE;
|
||||
env_var = g_getenv ("GLIB_FORCE_USE_PORTAL");
|
||||
- if (env_var && env_var[0] == '1' && use_portal)
|
||||
+ if (env_var && env_var[0] == '1')
|
||||
force_use_portal = TRUE;
|
||||
}
|
||||
break;
|
|
@ -0,0 +1,70 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Sun, 24 Oct 2021 22:40:11 +0100
|
||||
Subject: Add extra debug to memory-monitor-dbus test
|
||||
|
||||
Hopefully this will give us the necessary information to find out why
|
||||
this test isn't reliable.
|
||||
|
||||
Bug-Debian: https://bugs.debian.org/995178
|
||||
Forwarded: no
|
||||
---
|
||||
gio/tests/memory-monitor-dbus.py.in | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in
|
||||
index 17862e3..61e6f94 100755
|
||||
--- a/gio/tests/memory-monitor-dbus.py.in
|
||||
+++ b/gio/tests/memory-monitor-dbus.py.in
|
||||
@@ -74,18 +74,29 @@ try:
|
||||
Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
|
||||
printed on failure.
|
||||
'''
|
||||
+ print('Waiting up to {}/10 seconds for {!r} to be true'.format(timeout, condition))
|
||||
+ orig_timeout = timeout
|
||||
+
|
||||
while timeout >= 0:
|
||||
+ print('Loop iteration')
|
||||
context = GLib.MainContext.default()
|
||||
while context.iteration(False):
|
||||
+ print('Iterating main loop')
|
||||
pass
|
||||
if condition():
|
||||
+ print('Condition reached')
|
||||
break
|
||||
timeout -= 1
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
+ print('Condition not reached in {}/10 seconds'.format(orig_timeout))
|
||||
self.fail(message or 'timed out waiting for ' + str(condition))
|
||||
|
||||
def memory_warning_cb(self, monitor, level):
|
||||
+ print('low-memory-warning: monitor {!r} reports level {}'.format(
|
||||
+ monitor,
|
||||
+ level,
|
||||
+ ))
|
||||
self.last_warning = level
|
||||
self.main_context.wakeup()
|
||||
|
||||
@@ -95,17 +106,20 @@ try:
|
||||
# Wait 2 seconds
|
||||
timeout = 2
|
||||
while timeout > 0:
|
||||
+ print('Waiting 0.5s for stray events...')
|
||||
time.sleep(0.5)
|
||||
timeout -= 0.5
|
||||
self.main_context.iteration(False)
|
||||
|
||||
+ print('Emitting mock low-memory warning, level 100: try to free memory')
|
||||
self.dbusmock.EmitWarning(100)
|
||||
# Wait 2 seconds or until warning
|
||||
- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20)
|
||||
+ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 100)
|
||||
|
||||
+ print('Emitting mock low-memory warning, level 255: OOM imminent')
|
||||
self.dbusmock.EmitWarning(255)
|
||||
# Wait 2 seconds or until warning
|
||||
- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20)
|
||||
+ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 100)
|
||||
|
||||
except ImportError as e:
|
||||
@unittest.skip("Cannot import %s" % e.name)
|
167
debian/patches/Call-gettext-if-.desktop-file-does-not-have-inline-transl.patch
vendored
Normal file
167
debian/patches/Call-gettext-if-.desktop-file-does-not-have-inline-transl.patch
vendored
Normal file
|
@ -0,0 +1,167 @@
|
|||
From: Philip Withnall <withnall@endlessm.com>
|
||||
Date: Thu, 23 Nov 2017 18:48:58 +0000
|
||||
Subject: Call gettext if .desktop file does not have inline translations
|
||||
|
||||
Patch from OpenSUSE via Ubuntu, original author unknown. Martin Pitt and
|
||||
Vincent Untz appear to be the main authors.
|
||||
|
||||
Reworked slightly by Philip Withnall to avoid exposing new public API
|
||||
for the non-standard keys.
|
||||
|
||||
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=569829
|
||||
Bug-Ubuntu: https://launchpad.net/bugs/3935
|
||||
Applied-upstream: no, rejected because "this will be solved soon" (in 2013)
|
||||
---
|
||||
glib/gkeyfile.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 83 insertions(+)
|
||||
|
||||
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
|
||||
index d08a485..63d17ca 100644
|
||||
--- a/glib/gkeyfile.c
|
||||
+++ b/glib/gkeyfile.c
|
||||
@@ -497,6 +497,17 @@
|
||||
* Since: 2.14
|
||||
*/
|
||||
|
||||
+/* Downstream Debian defines for calling gettext() if a .desktop file doesn’t
|
||||
+ * contain translations. These are not standardised.
|
||||
+ *
|
||||
+ * See: https://launchpad.net/bugs/3935
|
||||
+ * See:http://bugzilla.gnome.org/show_bug.cgi?id=569829
|
||||
+ */
|
||||
+#define G_KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX "Desktop Action"
|
||||
+#define G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN "X-GNOME-Gettext-Domain"
|
||||
+#define G_KEY_FILE_DESKTOP_KEY_FULLNAME "X-GNOME-FullName"
|
||||
+#define G_KEY_FILE_DESKTOP_KEY_KEYWORDS "Keywords"
|
||||
+
|
||||
typedef struct _GKeyFileGroup GKeyFileGroup;
|
||||
|
||||
/**
|
||||
@@ -521,6 +532,7 @@ struct _GKeyFile
|
||||
|
||||
gboolean checked_locales; /* TRUE if @locales has been initialised */
|
||||
gchar **locales; /* (nullable) */
|
||||
+ gchar *gettext_domain;
|
||||
|
||||
gint ref_count; /* (atomic) */
|
||||
};
|
||||
@@ -647,6 +659,7 @@ g_key_file_init (GKeyFile *key_file)
|
||||
key_file->parse_buffer = NULL;
|
||||
key_file->list_separator = ';';
|
||||
key_file->flags = 0;
|
||||
+ key_file->gettext_domain = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -667,6 +680,12 @@ g_key_file_clear (GKeyFile *key_file)
|
||||
key_file->parse_buffer = NULL;
|
||||
}
|
||||
|
||||
+ if (key_file->gettext_domain)
|
||||
+ {
|
||||
+ g_free (key_file->gettext_domain);
|
||||
+ key_file->gettext_domain = NULL;
|
||||
+ }
|
||||
+
|
||||
tmp = key_file->groups;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
@@ -887,6 +906,11 @@ g_key_file_load_from_fd (GKeyFile *key_file,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ key_file->gettext_domain = g_key_file_get_string (key_file,
|
||||
+ G_KEY_FILE_DESKTOP_GROUP,
|
||||
+ G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN,
|
||||
+ NULL);
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -999,6 +1023,11 @@ g_key_file_load_from_data (GKeyFile *key_file,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ key_file->gettext_domain = g_key_file_get_string (key_file,
|
||||
+ G_KEY_FILE_DESKTOP_GROUP,
|
||||
+ G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN,
|
||||
+ NULL);
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2241,6 +2270,8 @@ g_key_file_get_locale_string (GKeyFile *key_file,
|
||||
GError *key_file_error;
|
||||
gchar **languages;
|
||||
gboolean free_languages = FALSE;
|
||||
+ gboolean try_gettext = FALSE;
|
||||
+ const gchar *msg_locale;
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail (key_file != NULL, NULL);
|
||||
@@ -2262,6 +2293,25 @@ g_key_file_get_locale_string (GKeyFile *key_file,
|
||||
free_languages = FALSE;
|
||||
}
|
||||
|
||||
+ /* we're only interested in gettext translation if we don't have a
|
||||
+ * translation in the .desktop file itself and if the key is one of the keys
|
||||
+ * we know we want to translate: Name, GenericName, Comment, Keywords.
|
||||
+ * Blindly doing this for all keys can give strange result for the icons,
|
||||
+ * since the Icon is a locale string in the spec, eg. We also only get
|
||||
+ * translation in the mo file if the requested locale is the LC_MESSAGES one.
|
||||
+ * Ideally, we should do more and change LC_MESSAGES to use the requested
|
||||
+ * locale, but there's no guarantee it's installed on the system and it might
|
||||
+ * have some side-effects. Since this is a corner case, let's ignore it. */
|
||||
+ msg_locale = setlocale (LC_MESSAGES, NULL);
|
||||
+ try_gettext = msg_locale && key_file->gettext_domain &&
|
||||
+ (strcmp (group_name, G_KEY_FILE_DESKTOP_GROUP) == 0 ||
|
||||
+ g_str_has_prefix (group_name, G_KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX)) &&
|
||||
+ (strcmp (key, G_KEY_FILE_DESKTOP_KEY_NAME) == 0 ||
|
||||
+ strcmp (key, G_KEY_FILE_DESKTOP_KEY_FULLNAME) == 0 ||
|
||||
+ strcmp (key, G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME) == 0 ||
|
||||
+ strcmp (key, G_KEY_FILE_DESKTOP_KEY_KEYWORDS) == 0 ||
|
||||
+ strcmp (key, G_KEY_FILE_DESKTOP_KEY_COMMENT) == 0);
|
||||
+
|
||||
for (i = 0; languages[i]; i++)
|
||||
{
|
||||
candidate_key = g_strdup_printf ("%s[%s]", key, languages[i]);
|
||||
@@ -2275,6 +2325,39 @@ g_key_file_get_locale_string (GKeyFile *key_file,
|
||||
break;
|
||||
}
|
||||
|
||||
+ /* Fallback to gettext */
|
||||
+ if (try_gettext && !translated_value)
|
||||
+ {
|
||||
+ gchar *orig_value = g_key_file_get_string (key_file, group_name, key, NULL);
|
||||
+
|
||||
+ if (orig_value)
|
||||
+ {
|
||||
+ gboolean codeset_set;
|
||||
+ const gchar *translated;
|
||||
+ gboolean has_gettext;
|
||||
+
|
||||
+ codeset_set = bind_textdomain_codeset (key_file->gettext_domain, "UTF-8") != NULL;
|
||||
+ translated = NULL;
|
||||
+
|
||||
+ translated = g_dgettext (key_file->gettext_domain,
|
||||
+ orig_value);
|
||||
+ has_gettext = translated != orig_value;
|
||||
+
|
||||
+ g_free (orig_value);
|
||||
+
|
||||
+ if (has_gettext)
|
||||
+ {
|
||||
+ if (codeset_set)
|
||||
+ translated_value = g_strdup (translated);
|
||||
+ else
|
||||
+ translated_value = g_locale_to_utf8 (translated,
|
||||
+ -1, NULL, NULL, NULL);
|
||||
+ }
|
||||
+ else
|
||||
+ translated_value = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Fallback to untranslated key
|
||||
*/
|
||||
if (!translated_value)
|
34
debian/patches/Disable-some-tests-on-slow-architectures-which-keep-faili.patch
vendored
Normal file
34
debian/patches/Disable-some-tests-on-slow-architectures-which-keep-faili.patch
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
From: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
Date: Thu, 27 Sep 2012 11:22:56 +0200
|
||||
Subject: Disable some tests on slow architectures which keep failing the
|
||||
tests
|
||||
|
||||
[smcv: Modified to use g_test_skip() instead of omitting those test cases
|
||||
completely, and allow them to be re-enabled with a Debian-specific
|
||||
environment variable]
|
||||
|
||||
Co-authored-by: Simon McVittie <smcv@debian.org>
|
||||
Forwarded: no
|
||||
---
|
||||
gobject/tests/threadtests.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gobject/tests/threadtests.c b/gobject/tests/threadtests.c
|
||||
index dee4d6e..eacf617 100644
|
||||
--- a/gobject/tests/threadtests.c
|
||||
+++ b/gobject/tests/threadtests.c
|
||||
@@ -486,6 +486,14 @@ test_threaded_toggle_notify (void)
|
||||
"safely from another (the main) thread without causing the "
|
||||
"notifying thread to abort");
|
||||
|
||||
+#if defined(__arm__)
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("Intermittently takes more than 5 minutes on 32-bit ARM (Debian#1023652)");
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
g_object_add_toggle_ref (object, on_toggle_notify, &data);
|
||||
g_object_unref (object);
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
From: Yue-Lan <lanyue@ubuntukylin.com>
|
||||
Date: Mon, 12 Jun 2023 17:07:42 +0800
|
||||
Subject: =?utf-8?b?W0ZJWF0gIzE2Njk2MCDjgJDmlofku7bnrqHnkIblmajjgJHlnKjmnYM=?=
|
||||
=?utf-8?b?6ZmQ57uG5YyW55WM6Z2i5re75Yqg5a6M5YW25LuW55So5oi35p2D6ZmQ5ZCO77yM?=
|
||||
=?utf-8?b?5a+56K+l5paH5qGj6L+b6KGM57yW6L6R5L+d5a2Y5ZCO77yM57uG5YyW5p2D6ZmQ?=
|
||||
=?utf-8?b?55WM6Z2i6ZyA6KaB6YeN5paw5re75Yqg5YW25LuW55So5oi35p2D6ZmQ?=
|
||||
|
||||
---
|
||||
gio/glocalfileoutputstream.c | 25 ++++++++++++++++++++++++-
|
||||
1 file changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
|
||||
index 6875811..da63d6e 100644
|
||||
--- a/gio/glocalfileoutputstream.c
|
||||
+++ b/gio/glocalfileoutputstream.c
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <unistd.h>
|
||||
#include "gfiledescriptorbased.h"
|
||||
#include <sys/uio.h>
|
||||
+#include <sys/xattr.h>
|
||||
#endif
|
||||
|
||||
#include "glib-private.h"
|
||||
@@ -860,6 +861,21 @@ handle_overwrite_open (const char *filename,
|
||||
int errsv = 0;
|
||||
gboolean replace_destination_set = (flags & G_FILE_CREATE_REPLACE_DESTINATION);
|
||||
|
||||
+ #ifdef G_OS_UNIX
|
||||
+ char acl_buf[1024];
|
||||
+ ssize_t acl_size = getxattr(filename, "system.posix_acl_access", acl_buf, sizeof(acl_buf));
|
||||
+
|
||||
+ gboolean has_acl_buf = FALSE;
|
||||
+ if (acl_size == -1) {
|
||||
+ g_debug("Error getting ACL with %s", filename);
|
||||
+ } else if (acl_size == 0) {
|
||||
+ g_debug("No ACL found with %s.\n", filename);
|
||||
+ } else {
|
||||
+ g_debug("%s ACL: %.*s\n", filename, (int)acl_size, acl_buf);
|
||||
+ has_acl_buf = TRUE;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
mode = mode_from_flags_or_info (flags, reference_info);
|
||||
|
||||
/* We only need read access to the original file if we are creating a backup.
|
||||
@@ -1038,6 +1054,7 @@ handle_overwrite_open (const char *filename,
|
||||
|
||||
dirname = g_path_get_dirname (filename);
|
||||
tmp_filename = g_build_filename (dirname, ".goutputstream-XXXXXX", NULL);
|
||||
+
|
||||
g_free (dirname);
|
||||
|
||||
tmpfd = g_mkstemp_full (tmp_filename, (readable ? O_RDWR : O_WRONLY) | O_BINARY | O_CLOEXEC, mode);
|
||||
@@ -1045,7 +1062,13 @@ handle_overwrite_open (const char *filename,
|
||||
{
|
||||
g_free (tmp_filename);
|
||||
goto fallback_strategy;
|
||||
- }
|
||||
+ } else {
|
||||
+#ifdef G_OS_UNIX
|
||||
+ if (has_acl_buf) {
|
||||
+ setxattr(tmp_filename, "system.posix_acl_access", acl_buf, acl_size, 0);
|
||||
+ }
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
/* try to keep permissions (unless replacing) */
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
From: Yue-Lan <lanyue@ubuntukylin.com>
|
||||
Date: Mon, 8 May 2023 10:48:52 +0800
|
||||
Subject: =?utf-8?b?W0ZJWF0gIzE2OTM1OSDjgJDluILlnLrjgJHjgJDkurrooYzmuIXnrpc=?=
|
||||
=?utf-8?b?5Lit5b+D44CR5oyC6L29VeebmOWQjuaWh+S7tueuoeeQhuWZqOaYvuekuuaWhw==?=
|
||||
=?utf-8?b?5Lu25byC5bi4?=
|
||||
|
||||
---
|
||||
gio/glocalfileenumerator.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/glocalfileenumerator.c b/gio/glocalfileenumerator.c
|
||||
index 3694896..2057a49 100644
|
||||
--- a/gio/glocalfileenumerator.c
|
||||
+++ b/gio/glocalfileenumerator.c
|
||||
@@ -435,7 +435,11 @@ g_local_file_enumerator_next_file (GFileEnumerator *enumerator,
|
||||
{
|
||||
g_error_free (my_error);
|
||||
goto next_file;
|
||||
- }
|
||||
+ } else if (g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE))
|
||||
+ {
|
||||
+ g_error_free (my_error);
|
||||
+ goto next_file;
|
||||
+ }
|
||||
else
|
||||
g_propagate_error (error, my_error);
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
From: Yue-Lan <lanyue@ubuntukylin.com>
|
||||
Date: Wed, 19 Jul 2023 11:32:14 +0800
|
||||
Subject: =?utf-8?b?W0ZJWF0gIzE4MjgzMSDjgJDmlofku7bnrqHnkIblmajjgJHliKDpmaQ=?=
|
||||
=?utf-8?b?5LuOVeebmOaLt+i0neWIsOacrOWcsOmVv+aWh+S7tuWQjeensOeahOaWh+S7tg==?=
|
||||
=?utf-8?b?6Iez5Zue5pS256uZ77yM5Zue5pS256uZ5Lit6K+l5paH5Lu25LiN5pi+56S65Y6f?=
|
||||
=?utf-8?b?5aeL6Lev5b6E?=
|
||||
|
||||
---
|
||||
gio/glocalfile.c | 28 ++++++++++++++++++----------
|
||||
1 file changed, 18 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
|
||||
index c357267..0f37547 100644
|
||||
--- a/gio/glocalfile.c
|
||||
+++ b/gio/glocalfile.c
|
||||
@@ -1996,6 +1996,8 @@ g_local_file_trash (GFile *file,
|
||||
GVfs *vfs;
|
||||
int errsv;
|
||||
gboolean is_local_file_in_usershare = FALSE;
|
||||
+ GError *set_contents_error;
|
||||
+ FILE *info_file;
|
||||
|
||||
if (glib_should_use_portal ())
|
||||
return g_trash_portal_trash_file (file, error);
|
||||
@@ -2285,18 +2287,24 @@ g_local_file_trash (GFile *file,
|
||||
original_name_escaped, delete_time);
|
||||
g_free (delete_time);
|
||||
|
||||
- if (!g_file_set_contents_full (infofile, data, -1,
|
||||
+ set_contents_error = NULL;
|
||||
+ g_file_set_contents_full (infofile, data, -1,
|
||||
G_FILE_SET_CONTENTS_CONSISTENT | G_FILE_SET_CONTENTS_ONLY_EXISTING,
|
||||
- 0600, error))
|
||||
- {
|
||||
- g_unlink (infofile);
|
||||
-
|
||||
- g_free (filesdir);
|
||||
- g_free (trashname);
|
||||
- g_free (infofile);
|
||||
-
|
||||
- return FALSE;
|
||||
+ 0600, &set_contents_error);
|
||||
+ if (set_contents_error) {
|
||||
+#ifdef G_OS_UNIX
|
||||
+ if (g_error_matches (set_contents_error, G_FILE_ERROR, G_FILE_ERROR_NAMETOOLONG)) {
|
||||
+ // direct write file
|
||||
+ info_file = fopen (infofile, "w");
|
||||
+ if (info_file) {
|
||||
+ fwrite (data, 1, strlen(data), info_file);
|
||||
+ fflush (info_file);
|
||||
+ fclose (info_file);
|
||||
+ }
|
||||
}
|
||||
+#endif
|
||||
+ g_error_free (set_contents_error);
|
||||
+ }
|
||||
|
||||
/* TODO: Maybe we should verify that you can delete the file from the trash
|
||||
* before moving it? OTOH, that is hard, as it needs a recursive scan
|
153
debian/patches/GLIB_FORCE_USE_PORTAL-GTK_USE_PORTAL-1-GLIB_FORCE_USE_POR.patch
vendored
Normal file
153
debian/patches/GLIB_FORCE_USE_PORTAL-GTK_USE_PORTAL-1-GLIB_FORCE_USE_POR.patch
vendored
Normal file
|
@ -0,0 +1,153 @@
|
|||
From: Yue-Lan <lanyue@kylinos.cn>
|
||||
Date: Fri, 1 Dec 2023 11:39:02 +0800
|
||||
Subject: =?utf-8?b?5re75YqgR0xJQl9GT1JDRV9VU0VfUE9SVEFM546v5aKD5Y+Y6YeP77yM?=
|
||||
=?utf-8?b?5b2TR1RLX1VTRV9QT1JUQUw9MeS4lEdMSUJfRk9SQ0VfVVNFX1BPUlRBTD0x5pe2?=
|
||||
=?utf-8?b?77yMZ19hcHBfaW5mb19sYXVuY2hfZGVmYXVsdF9mb3JfdXJpKCnlkoxnX2FwcF9p?=
|
||||
=?utf-8?b?bmZvX2xhdW5jaF9kZWZhdWx0X2Zvcl91cmlfYXN5bmMoKeS8muW8uuWItui1sHhk?=
|
||||
=?utf-8?b?Zy1kZXNrdG9wLXBvcnRhbOaJk+W8gOaWh+S7tg==?=
|
||||
|
||||
---
|
||||
gio/gappinfo.c | 57 ++++++++++++++++++++++++++++------------------------
|
||||
gio/gportalsupport.c | 15 ++++++++++++++
|
||||
gio/gportalsupport.h | 1 +
|
||||
3 files changed, 47 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/gio/gappinfo.c b/gio/gappinfo.c
|
||||
index 787b774..4e74ab2 100644
|
||||
--- a/gio/gappinfo.c
|
||||
+++ b/gio/gappinfo.c
|
||||
@@ -991,33 +991,38 @@ g_app_info_launch_default_for_uri (const char *uri,
|
||||
char *uri_scheme;
|
||||
GAppInfo *app_info = NULL;
|
||||
gboolean res = FALSE;
|
||||
+ gboolean force_use_portal = FALSE;
|
||||
+ force_use_portal = glib_is_force_use_portal ();
|
||||
|
||||
- /* g_file_query_default_handler() calls
|
||||
- * g_app_info_get_default_for_uri_scheme() too, but we have to do it
|
||||
- * here anyway in case GFile can't parse @uri correctly.
|
||||
- */
|
||||
- uri_scheme = g_uri_parse_scheme (uri);
|
||||
- if (uri_scheme && uri_scheme[0] != '\0')
|
||||
- app_info = g_app_info_get_default_for_uri_scheme (uri_scheme);
|
||||
- g_free (uri_scheme);
|
||||
-
|
||||
- if (!app_info)
|
||||
- {
|
||||
- GFile *file;
|
||||
-
|
||||
- file = g_file_new_for_uri (uri);
|
||||
- app_info = g_file_query_default_handler (file, NULL, error);
|
||||
- g_object_unref (file);
|
||||
- }
|
||||
-
|
||||
- if (app_info)
|
||||
+ if (!force_use_portal)
|
||||
{
|
||||
- GList l;
|
||||
-
|
||||
- l.data = (char *)uri;
|
||||
- l.next = l.prev = NULL;
|
||||
- res = g_app_info_launch_uris (app_info, &l, launch_context, error);
|
||||
- g_object_unref (app_info);
|
||||
+ /* g_file_query_default_handler() calls
|
||||
+ * g_app_info_get_default_for_uri_scheme() too, but we have to do it
|
||||
+ * here anyway in case GFile can't parse @uri correctly.
|
||||
+ */
|
||||
+ uri_scheme = g_uri_parse_scheme (uri);
|
||||
+ if (uri_scheme && uri_scheme[0] != '\0')
|
||||
+ app_info = g_app_info_get_default_for_uri_scheme (uri_scheme);
|
||||
+ g_free (uri_scheme);
|
||||
+
|
||||
+ if (!app_info)
|
||||
+ {
|
||||
+ GFile *file;
|
||||
+
|
||||
+ file = g_file_new_for_uri (uri);
|
||||
+ app_info = g_file_query_default_handler (file, NULL, error);
|
||||
+ g_object_unref (file);
|
||||
+ }
|
||||
+
|
||||
+ if (app_info)
|
||||
+ {
|
||||
+ GList l;
|
||||
+
|
||||
+ l.data = (char *)uri;
|
||||
+ l.next = l.prev = NULL;
|
||||
+ res = g_app_info_launch_uris (app_info, &l, launch_context, error);
|
||||
+ g_object_unref (app_info);
|
||||
+ }
|
||||
}
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
@@ -1148,7 +1153,7 @@ launch_default_for_uri_default_handler_cb (GObject *object,
|
||||
GError *error = NULL;
|
||||
|
||||
app_info = g_file_query_default_handler_finish (file, result, &error);
|
||||
- if (app_info)
|
||||
+ if (app_info && !glib_is_force_use_portal())
|
||||
launch_default_for_uri_launch_uris (g_steal_pointer (&task), g_steal_pointer (&app_info));
|
||||
else
|
||||
launch_default_for_uri_portal_open_uri (g_steal_pointer (&task), g_steal_pointer (&error));
|
||||
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
|
||||
index 7e1da22..a2cbed8 100644
|
||||
--- a/gio/gportalsupport.c
|
||||
+++ b/gio/gportalsupport.c
|
||||
@@ -29,6 +29,8 @@ static gboolean use_portal;
|
||||
static gboolean network_available;
|
||||
static gboolean dconf_access;
|
||||
|
||||
+static gboolean force_use_portal;
|
||||
+
|
||||
#ifdef G_PORTAL_SUPPORT_TEST
|
||||
static const char *snapctl = "snapctl";
|
||||
#else
|
||||
@@ -70,6 +72,8 @@ sandbox_info_read (void)
|
||||
if (!g_once_init_enter (&sandbox_info_is_read))
|
||||
return;
|
||||
|
||||
+ force_use_portal = FALSE;
|
||||
+
|
||||
sandbox_type = glib_get_sandbox_type ();
|
||||
|
||||
switch (sandbox_type)
|
||||
@@ -124,12 +128,16 @@ sandbox_info_read (void)
|
||||
case G_SANDBOX_TYPE_UNKNOWN:
|
||||
{
|
||||
const char *var;
|
||||
+ const char *env_var;
|
||||
|
||||
var = g_getenv ("GTK_USE_PORTAL");
|
||||
if (var && var[0] == '1')
|
||||
use_portal = TRUE;
|
||||
network_available = TRUE;
|
||||
dconf_access = TRUE;
|
||||
+ env_var = g_getenv ("GLIB_FORCE_USE_PORTAL");
|
||||
+ if (env_var && env_var[0] == '1' && use_portal)
|
||||
+ force_use_portal = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -176,3 +184,10 @@ glib_has_dconf_access_in_sandbox (void)
|
||||
|
||||
return dconf_access;
|
||||
}
|
||||
+
|
||||
+gboolean
|
||||
+glib_is_force_use_portal (void)
|
||||
+{
|
||||
+ read_flatpak_info ();
|
||||
+ return force_use_portal;
|
||||
+}
|
||||
diff --git a/gio/gportalsupport.h b/gio/gportalsupport.h
|
||||
index 5fe5d82..e26fbbe 100644
|
||||
--- a/gio/gportalsupport.h
|
||||
+++ b/gio/gportalsupport.h
|
||||
@@ -28,6 +28,7 @@ G_BEGIN_DECLS
|
||||
gboolean glib_should_use_portal (void);
|
||||
gboolean glib_network_available_in_sandbox (void);
|
||||
gboolean glib_has_dconf_access_in_sandbox (void);
|
||||
+gboolean glib_is_force_use_portal (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
142
debian/patches/GLIB_USE_KYLIN_PROCESS_MANAGER-GLIB_USE_KYLIN_PROCESS_MAN.patch
vendored
Normal file
142
debian/patches/GLIB_USE_KYLIN_PROCESS_MANAGER-GLIB_USE_KYLIN_PROCESS_MAN.patch
vendored
Normal file
|
@ -0,0 +1,142 @@
|
|||
From: Yue-Lan <lanyue@kylinos.cn>
|
||||
Date: Fri, 1 Dec 2023 17:37:45 +0800
|
||||
Subject: =?utf-8?b?5re75YqgR0xJQl9VU0VfS1lMSU5fUFJPQ0VTU19NQU5BR0VS546v5aKD?=
|
||||
=?utf-8?b?5Y+Y6YeP77yM5b2TR0xJQl9VU0VfS1lMSU5fUFJPQ0VTU19NQU5BR0VSPTHml7Y=?=
|
||||
=?utf-8?b?77yMZ19hcHBfaW5mb19sYXVuY2hfdXJpcygp5ZKMZ19hcHBfaW5mb19sYXVuY2hf?=
|
||||
=?utf-8?b?dXJpc19hc3luYygp5Lya6LWwa3lsaW4tcHJvY2Vzcy1tYW5hZ2Vy5o+Q5L6b55qE?=
|
||||
=?utf-8?b?ZGJ1c+aOpeWPo+aJk+W8gOW6lOeUqOaIluiAheaWh+S7tg==?=
|
||||
|
||||
---
|
||||
gio/gdesktopappinfo.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
|
||||
gio/gportalsupport.c | 12 ++++++++++++
|
||||
gio/gportalsupport.h | 1 +
|
||||
3 files changed, 55 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
|
||||
index 1f16132..d14db3e 100644
|
||||
--- a/gio/gdesktopappinfo.c
|
||||
+++ b/gio/gdesktopappinfo.c
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "gappinfoprivate.h"
|
||||
#include "glocalfilemonitor.h"
|
||||
#include "gutilsprivate.h"
|
||||
+#include "gportalsupport.h"
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
#include "gdocumentportal.h"
|
||||
@@ -3268,6 +3269,33 @@ launch_uris_with_dbus (GDesktopAppInfo *info,
|
||||
g_variant_dict_clear (&dict);
|
||||
}
|
||||
|
||||
+static void
|
||||
+g_desktop_app_info_launch_with_kylin_process_manager (GDesktopAppInfo *info,
|
||||
+ GDBusConnection *session_bus,
|
||||
+ GList *uris,
|
||||
+ GAppLaunchContext *launch_context,
|
||||
+ GCancellable *cancellable,
|
||||
+ GAsyncReadyCallback callback,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ const gchar *cmd = g_app_info_get_commandline (G_DESKTOP_APP_INFO (info));
|
||||
+ gchar *args = g_strdup (cmd);
|
||||
+ GList *iter = uris;
|
||||
+ GVariantBuilder builder;
|
||||
+ while (iter) {
|
||||
+ char *uri = iter->data;
|
||||
+ char *tmp_args = g_strconcat (args, " ", uri, NULL);
|
||||
+ g_free (args);
|
||||
+ args = tmp_args;
|
||||
+ iter = iter->next;
|
||||
+ }
|
||||
+ g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
|
||||
+ g_variant_builder_add (&builder, "s", args);
|
||||
+ g_free (args);
|
||||
+ g_dbus_connection_call (session_bus, "com.kylin.ProcessManager", "/com/kylin/ProcessManager/AppLauncher", "com.kylin.ProcessManager.AppLauncher", "RunCommand",
|
||||
+ g_variant_builder_end (&builder), NULL, G_DBUS_CALL_FLAGS_NONE, -1, cancellable, callback, user_data);
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
g_desktop_app_info_launch_uris_with_dbus (GDesktopAppInfo *info,
|
||||
GDBusConnection *session_bus,
|
||||
@@ -3320,10 +3348,16 @@ g_desktop_app_info_launch_uris_internal (GAppInfo *appinfo,
|
||||
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||
GDBusConnection *session_bus;
|
||||
gboolean success = TRUE;
|
||||
+ gboolean use_kylin_process_manager = glib_should_use_kylin_process_manager ();
|
||||
|
||||
session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
|
||||
|
||||
- if (session_bus && info->app_id)
|
||||
+ if (session_bus && use_kylin_process_manager)
|
||||
+ {
|
||||
+ g_desktop_app_info_launch_with_kylin_process_manager(info, session_bus, uris, launch_context,
|
||||
+ NULL, NULL, NULL);
|
||||
+ }
|
||||
+ else if (session_bus && info->app_id)
|
||||
/* This is non-blocking API. Similar to launching via fork()/exec()
|
||||
* we don't wait around to see if the program crashed during startup.
|
||||
* This is what startup-notification's job is...
|
||||
@@ -3424,10 +3458,16 @@ launch_uris_bus_get_cb (GObject *object,
|
||||
GCancellable *cancellable = g_task_get_cancellable (task);
|
||||
GDBusConnection *session_bus;
|
||||
GError *local_error = NULL;
|
||||
+ gboolean use_kylin_process_manager = glib_should_use_kylin_process_manager ();
|
||||
|
||||
session_bus = g_bus_get_finish (result, NULL);
|
||||
|
||||
- if (session_bus && info->app_id)
|
||||
+ if (session_bus && use_kylin_process_manager)
|
||||
+ {
|
||||
+ g_desktop_app_info_launch_with_kylin_process_manager(info, session_bus, data->uris, data->context,
|
||||
+ cancellable, launch_uris_with_dbus_cb, g_steal_pointer (&task));
|
||||
+ }
|
||||
+ else if (session_bus && info->app_id)
|
||||
{
|
||||
/* FIXME: The g_document_portal_add_documents() function, which is called
|
||||
* from the g_desktop_app_info_launch_uris_with_dbus() function, still
|
||||
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
|
||||
index a2cbed8..12c5d6a 100644
|
||||
--- a/gio/gportalsupport.c
|
||||
+++ b/gio/gportalsupport.c
|
||||
@@ -30,6 +30,7 @@ static gboolean network_available;
|
||||
static gboolean dconf_access;
|
||||
|
||||
static gboolean force_use_portal;
|
||||
+static gboolean use_kylin_process_manager;
|
||||
|
||||
#ifdef G_PORTAL_SUPPORT_TEST
|
||||
static const char *snapctl = "snapctl";
|
||||
@@ -129,6 +130,11 @@ sandbox_info_read (void)
|
||||
{
|
||||
const char *var;
|
||||
const char *env_var;
|
||||
+ const char *kylin_var;
|
||||
+
|
||||
+ kylin_var = g_getenv ("GLIB_USE_KYLIN_PROCESS_MANAGER");
|
||||
+ if (kylin_var && kylin_var[0] == '1')
|
||||
+ use_kylin_process_manager = TRUE;
|
||||
|
||||
var = g_getenv ("GTK_USE_PORTAL");
|
||||
if (var && var[0] == '1')
|
||||
@@ -191,3 +197,9 @@ glib_is_force_use_portal (void)
|
||||
read_flatpak_info ();
|
||||
return force_use_portal;
|
||||
}
|
||||
+
|
||||
+gboolean glib_should_use_kylin_process_manager (void)
|
||||
+{
|
||||
+ read_flatpak_info ();
|
||||
+ return use_kylin_process_manager;
|
||||
+}
|
||||
diff --git a/gio/gportalsupport.h b/gio/gportalsupport.h
|
||||
index e26fbbe..9a07de2 100644
|
||||
--- a/gio/gportalsupport.h
|
||||
+++ b/gio/gportalsupport.h
|
||||
@@ -29,6 +29,7 @@ gboolean glib_should_use_portal (void);
|
||||
gboolean glib_network_available_in_sandbox (void);
|
||||
gboolean glib_has_dconf_access_in_sandbox (void);
|
||||
gboolean glib_is_force_use_portal (void);
|
||||
+gboolean glib_should_use_kylin_process_manager (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
File diff suppressed because it is too large
Load Diff
51
debian/patches/Provide-backwards-compatibility-for-01_gettext-desktopfil.patch
vendored
Normal file
51
debian/patches/Provide-backwards-compatibility-for-01_gettext-desktopfil.patch
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
From: Martin Pitt <mpitt@debian.org>
|
||||
Date: Tue, 24 Feb 2009 16:08:05 +0100
|
||||
Subject: Provide backwards compatibility for 01_gettext-desktopfiles.patch
|
||||
for X-{Debian,Ubuntu}-Gettext-Domain
|
||||
|
||||
Ubuntu-specific. 01_gettext-desktopfiles.patch was changed to use
|
||||
X-GNOME-, so this is necessary until all our .desktop files are converted.
|
||||
|
||||
Forwarded: no
|
||||
---
|
||||
glib/gkeyfile.c | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
|
||||
index 63d17ca..370c094 100644
|
||||
--- a/glib/gkeyfile.c
|
||||
+++ b/glib/gkeyfile.c
|
||||
@@ -910,6 +910,16 @@ g_key_file_load_from_fd (GKeyFile *key_file,
|
||||
G_KEY_FILE_DESKTOP_GROUP,
|
||||
G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN,
|
||||
NULL);
|
||||
+ if (!key_file->gettext_domain)
|
||||
+ key_file->gettext_domain = g_key_file_get_string (key_file,
|
||||
+ G_KEY_FILE_DESKTOP_GROUP,
|
||||
+ "X-Ubuntu-Gettext-Domain",
|
||||
+ NULL);
|
||||
+ if (!key_file->gettext_domain)
|
||||
+ key_file->gettext_domain = g_key_file_get_string (key_file,
|
||||
+ G_KEY_FILE_DESKTOP_GROUP,
|
||||
+ "X-Debian-Gettext-Domain",
|
||||
+ NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1027,6 +1037,16 @@ g_key_file_load_from_data (GKeyFile *key_file,
|
||||
G_KEY_FILE_DESKTOP_GROUP,
|
||||
G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN,
|
||||
NULL);
|
||||
+ if (!key_file->gettext_domain)
|
||||
+ key_file->gettext_domain = g_key_file_get_string (key_file,
|
||||
+ G_KEY_FILE_DESKTOP_GROUP,
|
||||
+ "X-Ubuntu-Gettext-Domain",
|
||||
+ NULL);
|
||||
+ if (!key_file->gettext_domain)
|
||||
+ key_file->gettext_domain = g_key_file_get_string (key_file,
|
||||
+ G_KEY_FILE_DESKTOP_GROUP,
|
||||
+ "X-Debian-Gettext-Domain",
|
||||
+ NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
25
debian/patches/Skip-memory-monitor-dbus-test-if-not-specifically-request.patch
vendored
Normal file
25
debian/patches/Skip-memory-monitor-dbus-test-if-not-specifically-request.patch
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Sun, 24 Oct 2021 22:38:20 +0100
|
||||
Subject: Skip memory-monitor-dbus test if not specifically requested
|
||||
|
||||
This seems to be unreliable, particularly on non-x86.
|
||||
|
||||
Bug-Debian: https://bugs.debian.org/995178
|
||||
Forwarded: no
|
||||
---
|
||||
gio/tests/memory-monitor-dbus.py.in | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in
|
||||
index bf32918..17862e3 100755
|
||||
--- a/gio/tests/memory-monitor-dbus.py.in
|
||||
+++ b/gio/tests/memory-monitor-dbus.py.in
|
||||
@@ -39,6 +39,8 @@ try:
|
||||
klass.start_system_bus()
|
||||
klass.dbus_con = klass.get_dbus(True)
|
||||
|
||||
+ @unittest.skipIf('DEB_ALLOW_FLAKY_TESTS' not in os.environ,
|
||||
+ 'https://bugs.debian.org/995178')
|
||||
def setUp(self):
|
||||
try:
|
||||
Gio.MemoryMonitor
|
|
@ -0,0 +1,48 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Fri, 4 Jan 2019 08:37:20 +0000
|
||||
Subject: Skip unreliable gdbus-threading tests by default
|
||||
|
||||
test_threaded_singleton() test to reproduce a race condition between
|
||||
last-unref of the global singleton GDBusConnection and g_bus_get_sync().
|
||||
|
||||
test_method_calls_in_thread() checks that multiple threads can all make
|
||||
method calls to the same proxy.
|
||||
|
||||
However, test setup intermittently times out with:
|
||||
|
||||
# GLib-GIO-DEBUG: run 0: refcount is 2, sleeping
|
||||
Bail out! GLib-GIO-FATAL-ERROR: connection had too many refs
|
||||
|
||||
The current theory upstream is that this might be a reference leak in
|
||||
test_delivery_in_thread().
|
||||
|
||||
Furthermore, test teardown is now often failing when destroying the test
|
||||
bus.
|
||||
|
||||
Demote these tests to be run as part of the "flaky" autopkgtests, but
|
||||
not at build time or in the part of the autopkgtest run that gates
|
||||
progress into testing.
|
||||
|
||||
Bug: https://gitlab.gnome.org/GNOME/glib/issues/1515
|
||||
Forwarded: no
|
||||
---
|
||||
gio/tests/gdbus-threading.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gio/tests/gdbus-threading.c b/gio/tests/gdbus-threading.c
|
||||
index 9f1f918..e829e26 100644
|
||||
--- a/gio/tests/gdbus-threading.c
|
||||
+++ b/gio/tests/gdbus-threading.c
|
||||
@@ -679,6 +679,12 @@ main (int argc,
|
||||
|
||||
g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
|
||||
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_print("ok 1 # SKIP all gdbus-threading tests skipped because they are too unreliable (glib#1515)\n");
|
||||
+ return 77;
|
||||
+ }
|
||||
+
|
||||
if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
{
|
||||
g_print("ok 1 # SKIP all gdbus-threading tests skipped because they are too unreliable (glib#1515)\n");
|
|
@ -0,0 +1,32 @@
|
|||
From: smiley286 <hebing@kylinos.cn>
|
||||
Date: Mon, 17 Jul 2023 16:22:34 +0800
|
||||
Subject: =?utf-8?b?KiDmlLnliqjor7TmmI7vvJrpgILphY3pupLpup/ns7vnu5/mlofku7Y=?=
|
||||
=?utf-8?b?5aSn5bCP55qE6K6h566X6KeE6IyD77yIWELku6UxMDI06L+b5Yi277yJ77yMZ2xp?=
|
||||
=?utf-8?b?YuWOn+acrOWunueOsO+8iFhC5LulMTAwMOi/m+WItu+8m1hpQuS7pTEwMjTov5s=?=
|
||||
=?utf-8?b?5Yi277yJICogQlVH5Y+377yaMTU2NTI4IOOAkEdUS+mcgOaxgjE5MjU044CR44CQ?=
|
||||
=?utf-8?b?5paH5qGj5p+l55yL5Zmo44CR6YCa6L+H5paH5qGj5p+l55yL5Zmo5omT5byA5paH?=
|
||||
=?utf-8?b?5Lu25YiX6KGo55qE5paH5Lu25aSn5bCP5LiO5bGe5oCn6YeM55qE5aSn5bCP5LiN?=
|
||||
=?utf-8?b?5LiA6Ie0ICAgICAgICAgIDEwMzY1MiDjgJDnlKjkvosyNDI0NTbjgJHjgJDlvZI=?=
|
||||
=?utf-8?b?5qGj566h55CG5Zmo44CR5b2S5qGj5paH5Lu2LeaJk+W8gOeql+WPo+aYvuekug==?=
|
||||
=?utf-8?b?5paH5Lu25aSn5bCP5LiO5paH5Lu2566h55CG5Zmo5LiN5LiA6Ie0ICog6ZyA5rGC?=
|
||||
=?utf-8?b?L+S7u+WKoeWPt++8miAqIOWFtuS7luaUueWKqO+8miAqIOW9seWTjeWfn+ivtA==?=
|
||||
=?utf-8?b?5piO77ya5b2x5ZON5paH5Lu244CB56OB55uY5aSn5bCP5o2i566X57uT5p6c55qE?=
|
||||
=?utf-8?b?5pi+56S6?=
|
||||
|
||||
---
|
||||
glib/gutils.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/glib/gutils.c b/glib/gutils.c
|
||||
index 362c55a..713d146 100644
|
||||
--- a/glib/gutils.c
|
||||
+++ b/glib/gutils.c
|
||||
@@ -2860,7 +2860,7 @@ g_nullify_pointer (gpointer *nullify_location)
|
||||
*nullify_location = NULL;
|
||||
}
|
||||
|
||||
-#define KILOBYTE_FACTOR (G_GOFFSET_CONSTANT (1000))
|
||||
+#define KILOBYTE_FACTOR (G_GOFFSET_CONSTANT (1024))
|
||||
#define MEGABYTE_FACTOR (KILOBYTE_FACTOR * KILOBYTE_FACTOR)
|
||||
#define GIGABYTE_FACTOR (MEGABYTE_FACTOR * KILOBYTE_FACTOR)
|
||||
#define TERABYTE_FACTOR (GIGABYTE_FACTOR * KILOBYTE_FACTOR)
|
|
@ -1,16 +1,16 @@
|
|||
From: Yue-Lan <lanyue@ubuntukylin.com>
|
||||
Date: Tue, 25 Apr 2023 15:32:05 +0800
|
||||
Subject: update changelog.
|
||||
Date: Tue, 25 Apr 2023 15:31:20 +0800
|
||||
Subject: =?utf-8?b?57un57ut5L+u5aSNYXJtNjTnvJbor5Hpl67popg=?=
|
||||
|
||||
---
|
||||
gobject/tests/threadtests.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/gobject/tests/threadtests.c b/gobject/tests/threadtests.c
|
||||
index 6ea9a48..799dc79 100644
|
||||
index eacf617..48e7b53 100644
|
||||
--- a/gobject/tests/threadtests.c
|
||||
+++ b/gobject/tests/threadtests.c
|
||||
@@ -492,6 +492,11 @@ test_threaded_toggle_notify (void)
|
||||
@@ -494,6 +494,11 @@ test_threaded_toggle_notify (void)
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
From: luzp <luzp775191792@163.com>
|
||||
Date: Wed, 29 Jun 2022 16:02:18 +0800
|
||||
Subject: change format
|
||||
|
||||
---
|
||||
debian/source/format | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/debian/source/format b/debian/source/format
|
||||
index 163aaf8..89ae9db 100644
|
||||
--- a/debian/source/format
|
||||
+++ b/debian/source/format
|
||||
@@ -1 +1 @@
|
||||
-3.0 (quilt)
|
||||
+3.0 (native)
|
|
@ -0,0 +1,36 @@
|
|||
From: Iain Lane <iain.lane@canonical.com>
|
||||
Date: Mon, 10 Sep 2012 16:25:18 +0100
|
||||
Subject: Disable confusing (to users) warning about deprecated schema paths
|
||||
|
||||
Disable a warning when compiling schemas which are installed
|
||||
into 'deprecated' locations. Users see this very often due to
|
||||
glib-compile-schemas being called from libglib2.0-0's trigger and it is
|
||||
not very useful for them.
|
||||
|
||||
Forwarded: not-needed
|
||||
---
|
||||
gio/glib-compile-schemas.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
|
||||
index 04ef404..3c60d5f 100644
|
||||
--- a/gio/glib-compile-schemas.c
|
||||
+++ b/gio/glib-compile-schemas.c
|
||||
@@ -1232,6 +1232,9 @@ parse_state_start_schema (ParseState *state,
|
||||
return;
|
||||
}
|
||||
|
||||
+ // Disable this warning: it confuses users and there is unlikely to be much
|
||||
+ // progress towards fixing
|
||||
+ /*
|
||||
if (path && (g_str_has_prefix (path, "/apps/") ||
|
||||
g_str_has_prefix (path, "/desktop/") ||
|
||||
g_str_has_prefix (path, "/system/")))
|
||||
@@ -1244,6 +1247,7 @@ parse_state_start_schema (ParseState *state,
|
||||
g_printerr ("%s\n", message);
|
||||
g_free (message);
|
||||
}
|
||||
+ */
|
||||
|
||||
state->schema_state = schema_state_new (path, gettext_domain,
|
||||
extends, extends_name, list_of);
|
70
debian/patches/debian/Disable-some-tests-on-slow-architectures-which-keep-faili.patch
vendored
Normal file
70
debian/patches/debian/Disable-some-tests-on-slow-architectures-which-keep-faili.patch
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
From: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
Date: Thu, 27 Sep 2012 11:22:56 +0200
|
||||
Subject: Disable some tests on slow architectures which keep failing the
|
||||
tests
|
||||
|
||||
[smcv: Modified to use g_test_skip() instead of omitting those test cases
|
||||
completely, and allow them to be re-enabled with a Debian-specific
|
||||
environment variable]
|
||||
|
||||
Co-authored-by: Simon McVittie <smcv@debian.org>
|
||||
Forwarded: no
|
||||
---
|
||||
glib/tests/mainloop.c | 16 ++++++++++++++++
|
||||
glib/tests/timeout.c | 9 +++++++++
|
||||
2 files changed, 25 insertions(+)
|
||||
|
||||
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
|
||||
index 152e74b..1aac153 100644
|
||||
--- a/glib/tests/mainloop.c
|
||||
+++ b/glib/tests/mainloop.c
|
||||
@@ -524,6 +524,14 @@ test_child_sources (void)
|
||||
GMainLoop *loop;
|
||||
GSource *parent, *child_b, *child_c, *end;
|
||||
|
||||
+#if defined(__arm__)
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("Not reliable on older ARM hardware");
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
ctx = g_main_context_new ();
|
||||
loop = g_main_loop_new (ctx, FALSE);
|
||||
|
||||
@@ -602,6 +610,14 @@ test_recursive_child_sources (void)
|
||||
GMainLoop *loop;
|
||||
GSource *parent, *child_b, *child_c, *end;
|
||||
|
||||
+#if defined(__arm__)
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("Not reliable on older ARM hardware");
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
ctx = g_main_context_new ();
|
||||
loop = g_main_loop_new (ctx, FALSE);
|
||||
|
||||
diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c
|
||||
index 1ae3f3a..f838c9c 100644
|
||||
--- a/glib/tests/timeout.c
|
||||
+++ b/glib/tests/timeout.c
|
||||
@@ -196,6 +196,15 @@ test_func (gpointer data)
|
||||
static void
|
||||
test_rounding (void)
|
||||
{
|
||||
+
|
||||
+#if defined(__arm__)
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("Not reliable on older ARM hardware");
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
last_time = g_get_monotonic_time ();
|
32
debian/patches/debian/Skip-test-which-performs-some-unreliable-floating-point-c.patch
vendored
Normal file
32
debian/patches/debian/Skip-test-which-performs-some-unreliable-floating-point-c.patch
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
From: Iain Lane <laney@debian.org>
|
||||
Date: Tue, 18 Mar 2014 15:43:35 +0000
|
||||
Subject: Skip test which performs some unreliable floating point comparisons
|
||||
|
||||
[smcv: Modified to use g_test_skip() instead of omitting those test cases
|
||||
completely, and allow them to be re-enabled with a Debian-specific
|
||||
environment variable]
|
||||
|
||||
Co-authored-by: Simon McVittie <smcv@debian.org>
|
||||
Bug: https://gitlab.gnome.org/GNOME/glib/issues/820
|
||||
Forwarded: no
|
||||
---
|
||||
glib/tests/timer.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/glib/tests/timer.c b/glib/tests/timer.c
|
||||
index 5b1b43c..c09f768 100644
|
||||
--- a/glib/tests/timer.c
|
||||
+++ b/glib/tests/timer.c
|
||||
@@ -35,6 +35,12 @@ test_timer_basic (void)
|
||||
volatile gdouble elapsed;
|
||||
gulong micros;
|
||||
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("Not reliable due to floating-point rounding (glib#820)");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
timer = g_timer_new ();
|
||||
|
||||
g_timer_start (timer);
|
48
debian/patches/debian/Skip-unreliable-gdbus-threading-tests--by-default.patch
vendored
Normal file
48
debian/patches/debian/Skip-unreliable-gdbus-threading-tests--by-default.patch
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Fri, 4 Jan 2019 08:37:20 +0000
|
||||
Subject: Skip unreliable gdbus-threading tests by default
|
||||
|
||||
test_threaded_singleton() test to reproduce a race condition between
|
||||
last-unref of the global singleton GDBusConnection and g_bus_get_sync().
|
||||
|
||||
test_method_calls_in_thread() checks that multiple threads can all make
|
||||
method calls to the same proxy.
|
||||
|
||||
However, test setup intermittently times out with:
|
||||
|
||||
# GLib-GIO-DEBUG: run 0: refcount is 2, sleeping
|
||||
Bail out! GLib-GIO-FATAL-ERROR: connection had too many refs
|
||||
|
||||
The current theory upstream is that this might be a reference leak in
|
||||
test_delivery_in_thread().
|
||||
|
||||
Furthermore, test teardown is now often failing when destroying the test
|
||||
bus.
|
||||
|
||||
Demote these tests to be run as part of the "flaky" autopkgtests, but
|
||||
not at build time or in the part of the autopkgtest run that gates
|
||||
progress into testing.
|
||||
|
||||
Bug: https://gitlab.gnome.org/GNOME/glib/issues/1515
|
||||
Forwarded: no
|
||||
---
|
||||
gio/tests/gdbus-threading.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gio/tests/gdbus-threading.c b/gio/tests/gdbus-threading.c
|
||||
index 755b490..9f1f918 100644
|
||||
--- a/gio/tests/gdbus-threading.c
|
||||
+++ b/gio/tests/gdbus-threading.c
|
||||
@@ -679,6 +679,12 @@ main (int argc,
|
||||
|
||||
g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
|
||||
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_print("ok 1 # SKIP all gdbus-threading tests skipped because they are too unreliable (glib#1515)\n");
|
||||
+ return 77;
|
||||
+ }
|
||||
+
|
||||
session_bus_up ();
|
||||
|
||||
/* this is safe; testserver will exit once the bus goes away */
|
37
debian/patches/debian/closures-test-Skip-on-arm-unless-flaky-tests-are-allowed.patch
vendored
Normal file
37
debian/patches/debian/closures-test-Skip-on-arm-unless-flaky-tests-are-allowed.patch
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Thu, 3 Jan 2019 09:01:03 +0000
|
||||
Subject: closures test: Skip on arm* unless flaky tests are allowed
|
||||
|
||||
Choosing the right number of iterations to avoid either taking literally
|
||||
hours on some hardware, or getting spurious failures when one thread
|
||||
starves another, seems to be too hard to get right in practice.
|
||||
Make this test opt-in so that its failures aren't release-critical.
|
||||
We can run it as a separate autopkgtest that is marked flaky.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Bug-Debian: https://bugs.debian.org/880883
|
||||
Bug-Debian: https://bugs.debian.org/917983
|
||||
Forwarded: not-needed
|
||||
---
|
||||
gobject/tests/closure-refcount.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gobject/tests/closure-refcount.c b/gobject/tests/closure-refcount.c
|
||||
index 574a5ec..5629298 100644
|
||||
--- a/gobject/tests/closure-refcount.c
|
||||
+++ b/gobject/tests/closure-refcount.c
|
||||
@@ -262,6 +262,14 @@ test_closure_refcount (void)
|
||||
GTest *object;
|
||||
guint i, n_iterations;
|
||||
|
||||
+#if defined(__aarch64__) || defined(__arm__)
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") != NULL)
|
||||
+ {
|
||||
+ g_print ("SKIP: Test is known to be flaky on arm* (#880883, #917983)\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
object = g_object_new (G_TYPE_TEST, NULL);
|
||||
closure = g_cclosure_new (G_CALLBACK (test_signal_handler), &test_data, destroy_data);
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Fri, 26 Jul 2019 23:49:03 +0100
|
||||
Subject: gmenumodel test: Mark as flaky
|
||||
|
||||
This test has not had a great history of reliability.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Bug-Debian: https://bugs.debian.org/932678
|
||||
Forwarded: no
|
||||
---
|
||||
gio/tests/gmenumodel.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c
|
||||
index d75f36a..1c83987 100644
|
||||
--- a/gio/tests/gmenumodel.c
|
||||
+++ b/gio/tests/gmenumodel.c
|
||||
@@ -1153,6 +1153,12 @@ test_dbus_peer_subscriptions (void)
|
||||
#else
|
||||
PeerConnection peer;
|
||||
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("Not reliable? #932678");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
peer_connection_up (&peer);
|
||||
do_subscriptions (peer.server_connection, peer.client_connection);
|
||||
peer_connection_down (&peer);
|
|
@ -0,0 +1,36 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Fri, 26 Jul 2019 23:51:39 +0100
|
||||
Subject: gvariant test: Don't run at build-time on mips
|
||||
|
||||
DEB_ALLOW_FLAKY_TESTS is not quite right here, because we don't know
|
||||
that the test would fail if left for long enough - the problem is that
|
||||
it doesn't get there, because generating random floating-point numbers
|
||||
is very slow on some of our mips hardware. However, it has the right
|
||||
practical effect.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Bug: https://bugs.debian.org/932678
|
||||
Forwarded: no
|
||||
---
|
||||
glib/tests/gvariant.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
|
||||
index c8f1336..93c2058 100644
|
||||
--- a/glib/tests/gvariant.c
|
||||
+++ b/glib/tests/gvariant.c
|
||||
@@ -2466,6 +2466,14 @@ test_fuzzes (gpointer data)
|
||||
gdouble fuzziness;
|
||||
int i;
|
||||
|
||||
+#ifdef __mips__
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("Extremely slow on some mips CPUs: #932678");
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
fuzziness = GPOINTER_TO_INT (data) / 100.;
|
||||
|
||||
for (i = 0; i < 200; i++)
|
24
debian/patches/debian/taptestrunner-Stop-looking-like-an-executable-script.patch
vendored
Normal file
24
debian/patches/debian/taptestrunner-Stop-looking-like-an-executable-script.patch
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Wed, 30 Oct 2019 08:44:52 +0000
|
||||
Subject: taptestrunner: Stop looking like an executable script
|
||||
|
||||
This file is installed as non-executable but starts with the #! that
|
||||
indicates an executable script, causing warnings from Debian's Lintian
|
||||
tool. In fact it is imported as a Python module rather than being run
|
||||
as an executable, so there is no need for the #! line.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Forwarded: no
|
||||
---
|
||||
gobject/tests/taptestrunner.py | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/gobject/tests/taptestrunner.py b/gobject/tests/taptestrunner.py
|
||||
index 9adbd8d..bfe33e6 100644
|
||||
--- a/gobject/tests/taptestrunner.py
|
||||
+++ b/gobject/tests/taptestrunner.py
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
# coding=utf-8
|
||||
|
||||
# Copyright (c) 2015 Remko Tronçon (https://el-tramo.be)
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,20 @@
|
|||
From: Yue-Lan <lanyue@kylinos.cn>
|
||||
Date: Thu, 29 Feb 2024 16:32:19 +0800
|
||||
Subject: =?utf-8?b?5L+u5aSNZGhfbWlzc2luZ+aKpemUmQ==?=
|
||||
|
||||
---
|
||||
debian/libglib2.0-dev.install | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/debian/libglib2.0-dev.install b/debian/libglib2.0-dev.install
|
||||
index 5317a40..0c02e08 100644
|
||||
--- a/debian/libglib2.0-dev.install
|
||||
+++ b/debian/libglib2.0-dev.install
|
||||
@@ -9,6 +9,7 @@ usr/lib/*/libgthread*.so
|
||||
usr/lib/*/pkgconfig
|
||||
usr/share/gdb
|
||||
usr/share/gettext/its
|
||||
+usr/share/glib-2.0/dtds
|
||||
usr/share/glib-2.0/gdb
|
||||
usr/share/glib-2.0/schemas
|
||||
usr/share/glib-2.0/valgrind
|
|
@ -0,0 +1,23 @@
|
|||
From: Debian GNOME Maintainers
|
||||
<pkg-gnome-maintainers@lists.alioth.debian.org>
|
||||
Date: Wed, 29 Jun 2022 16:00:15 +0800
|
||||
Subject: fix-trash-issue-in-data
|
||||
|
||||
===================================================================
|
||||
---
|
||||
gio/glocalfile.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
|
||||
index 9303902..c357267 100644
|
||||
--- a/gio/glocalfile.c
|
||||
+++ b/gio/glocalfile.c
|
||||
@@ -2050,7 +2050,7 @@ g_local_file_trash (GFile *file,
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
- is_local_file_in_usershare = g_str_has_prefix(local->filename, "/data/usershare");
|
||||
+ is_local_file_in_usershare = g_str_has_prefix(local->filename, "/data") && g_file_test ("/data/usershare", G_FILE_TEST_EXISTS);
|
||||
if (file_stat.st_dev == home_stat.st_dev && !is_local_file_in_usershare)
|
||||
{
|
||||
is_homedir_trash = TRUE;
|
35
debian/patches/gdbus-server-auth-Normally-skip-flaky-DBUS_COOKIE_SHA1-te.patch
vendored
Normal file
35
debian/patches/gdbus-server-auth-Normally-skip-flaky-DBUS_COOKIE_SHA1-te.patch
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Thu, 19 Nov 2020 10:44:39 +0000
|
||||
Subject: gdbus-server-auth: Normally skip flaky DBUS_COOKIE_SHA1 tests
|
||||
|
||||
These intermittently fail on the buildds, but the failure cannot be
|
||||
reproduced in a debugging environment.
|
||||
|
||||
We do not expect to use D-Bus over TCP on non-Windows platforms: we use
|
||||
an AF_UNIX socket, which is much more robust and secure. However, when
|
||||
using AF_UNIX, DBUS_COOKIE_SHA1 is unnecessary, because we can use the
|
||||
more reliable EXTERNAL authentication.
|
||||
|
||||
Forwarded: not-needed
|
||||
---
|
||||
gio/tests/gdbus-server-auth.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/gio/tests/gdbus-server-auth.c b/gio/tests/gdbus-server-auth.c
|
||||
index 319a994..e7f112a 100644
|
||||
--- a/gio/tests/gdbus-server-auth.c
|
||||
+++ b/gio/tests/gdbus-server-auth.c
|
||||
@@ -327,6 +327,13 @@ do_test_server_auth (InteropFlags flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
+ if ((flags & (INTEROP_FLAGS_TCP | INTEROP_FLAGS_SHA1)) &&
|
||||
+ g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("https://gitlab.gnome.org/GNOME/glib/-/issues/2206");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
if (flags & INTEROP_FLAGS_ANONYMOUS)
|
||||
server_flags |= G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS;
|
||||
if (flags & INTEROP_FLAGS_REQUIRE_SAME_USER)
|
|
@ -0,0 +1,45 @@
|
|||
From: Yue-Lan <lanyue@kylinos.cn>
|
||||
Date: Tue, 5 Dec 2023 15:31:42 +0800
|
||||
Subject: =?utf-8?b?57un57ut6YCC6YWNa3lsaW4tcHJvY2Vzcy1tYW5hZ2Vy55qEZGJ1cw==?=
|
||||
=?utf-8?b?5o6l5Y+j77yM5bCd6K+V5L+u5aSN57yW56CB6Zeu6aKY?=
|
||||
|
||||
---
|
||||
gio/gdesktopappinfo.c | 20 ++++++++++----------
|
||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
|
||||
index 1d9bb67..2023bd6 100644
|
||||
--- a/gio/gdesktopappinfo.c
|
||||
+++ b/gio/gdesktopappinfo.c
|
||||
@@ -3278,21 +3278,21 @@ g_desktop_app_info_launch_with_kylin_process_manager (GDesktopAppInfo *info,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
- const gchar *cmd = g_app_info_get_executable (G_DESKTOP_APP_INFO (info));
|
||||
- gchar *args = g_strdup (cmd);
|
||||
- GList *iter = uris;
|
||||
+ const gchar *path = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info));
|
||||
GVariantBuilder builder;
|
||||
+ GList *iter;
|
||||
+ g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
|
||||
+ g_variant_builder_add (&builder, "s", path);
|
||||
+ g_variant_builder_open (&builder, G_VARIANT_TYPE_STRING_ARRAY);
|
||||
+ iter = uris;
|
||||
while (iter) {
|
||||
char *uri = iter->data;
|
||||
- char *tmp_args = g_strconcat (args, " ", uri, NULL);
|
||||
- g_free (args);
|
||||
- args = tmp_args;
|
||||
+ g_variant_builder_add (&builder, "s", uri);
|
||||
iter = iter->next;
|
||||
}
|
||||
- g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
|
||||
- g_variant_builder_add (&builder, "s", args);
|
||||
- g_free (args);
|
||||
- g_dbus_connection_call (session_bus, "com.kylin.ProcessManager", "/com/kylin/ProcessManager/AppLauncher", "com.kylin.ProcessManager.AppLauncher", "RunCommand",
|
||||
+ g_variant_builder_close (&builder);
|
||||
+
|
||||
+ g_dbus_connection_call (session_bus, "com.kylin.ProcessManager", "/com/kylin/ProcessManager/AppLauncher", "com.kylin.ProcessManager.AppLauncher", "LaunchAppWithArguments",
|
||||
g_variant_builder_end (&builder), NULL, G_DBUS_CALL_FLAGS_NONE, -1, cancellable, callback, user_data);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
From: Yue-Lan <lanyue@kylinos.cn>
|
||||
Date: Mon, 4 Dec 2023 16:47:37 +0800
|
||||
Subject: =?utf-8?b?6YCC6YWNa3lsaW4tcHJvY2Vzcy1tYW5hZ2Vy55qEZGJ1c+aOpeWPow==?=
|
||||
=?utf-8?b?6Kej5p6Q6KeE5YiZ?=
|
||||
|
||||
---
|
||||
gio/gdesktopappinfo.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
|
||||
index d14db3e..1d9bb67 100644
|
||||
--- a/gio/gdesktopappinfo.c
|
||||
+++ b/gio/gdesktopappinfo.c
|
||||
@@ -3278,7 +3278,7 @@ g_desktop_app_info_launch_with_kylin_process_manager (GDesktopAppInfo *info,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
- const gchar *cmd = g_app_info_get_commandline (G_DESKTOP_APP_INFO (info));
|
||||
+ const gchar *cmd = g_app_info_get_executable (G_DESKTOP_APP_INFO (info));
|
||||
gchar *args = g_strdup (cmd);
|
||||
GList *iter = uris;
|
||||
GVariantBuilder builder;
|
|
@ -0,0 +1,39 @@
|
|||
0001-timer-test-use-volatile-for-locals.patch
|
||||
debian/03_disble_glib_compile_schemas_warning.patch
|
||||
debian/closures-test-Skip-on-arm-unless-flaky-tests-are-allowed.patch
|
||||
debian/Disable-some-tests-on-slow-architectures-which-keep-faili.patch
|
||||
debian/Skip-test-which-performs-some-unreliable-floating-point-c.patch
|
||||
debian/Skip-unreliable-gdbus-threading-tests--by-default.patch
|
||||
debian/gmenumodel-test-Mark-as-flaky.patch
|
||||
debian/gvariant-test-Don-t-run-at-build-time-on-mips.patch
|
||||
debian/taptestrunner-Stop-looking-like-an-executable-script.patch
|
||||
change-format.patch
|
||||
Call-gettext-if-.desktop-file-does-not-have-inline-transl.patch
|
||||
Provide-backwards-compatibility-for-01_gettext-desktopfil.patch
|
||||
Disable-some-tests-on-slow-architectures-which-keep-faili.patch
|
||||
Skip-unreliable-gdbus-threading-tests-by-default.patch
|
||||
gdbus-server-auth-Normally-skip-flaky-DBUS_COOKIE_SHA1-te.patch
|
||||
Skip-memory-monitor-dbus-test-if-not-specifically-request.patch
|
||||
Add-extra-debug-to-memory-monitor-dbus-test.patch
|
||||
tests-Skip-debugcontroller-test.patch
|
||||
testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch
|
||||
spawn-test-riscv64.patch
|
||||
arm64.patch
|
||||
FIX-169359-U.patch
|
||||
FIX-166960.patch
|
||||
20210325-file-type.patch
|
||||
20210726-fix-trash-issue-in-data-usershare.patch
|
||||
user-directory-i18n.patch
|
||||
fix-trash-issue-in-data.patch
|
||||
XB-1024-glib-XB-1000-XiB-1024.patch
|
||||
FIX-182831-U.patch
|
||||
GLIB_FORCE_USE_PORTAL-GTK_USE_PORTAL-1-GLIB_FORCE_USE_POR.patch
|
||||
GLIB_USE_KYLIN_PROCESS_MANAGER-GLIB_USE_KYLIN_PROCESS_MAN.patch
|
||||
kylin-process-manager-dbus.patch
|
||||
kylin-process-manager-dbus-1.patch
|
||||
5c52117c4ae9367c96609915fde5a280101a9b0b-GLIB_FORCE_USE_P.patch
|
||||
tryfix-I8OAV1-kylin-process-manager.patch
|
||||
.patch
|
||||
dh_missing.patch
|
||||
dh_makeshlibs.patch
|
||||
-1.patch
|
|
@ -1,20 +1,21 @@
|
|||
From: Yue-Lan <lanyue@ubuntukylin.com>
|
||||
Date: Tue, 25 Apr 2023 11:50:47 +0800
|
||||
Subject: update changelog.
|
||||
Date: Tue, 25 Apr 2023 11:48:35 +0800
|
||||
Subject: =?utf-8?b?5aKe5Yqgc3Bhd24tdGVzdOeahOaXpeW/l+i+k+WHuu+8jOebruWJjXJp?=
|
||||
=?utf-8?b?c2N2NjTmnrbmnoTkuIrmiqXplJnpnIDopoHlpITnkIY=?=
|
||||
|
||||
---
|
||||
glib/tests/spawn-test.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/glib/tests/spawn-test.c b/glib/tests/spawn-test.c
|
||||
index e4f2efc..95975f6 100644
|
||||
index fdc35e8..f5f8776 100644
|
||||
--- a/glib/tests/spawn-test.c
|
||||
+++ b/glib/tests/spawn-test.c
|
||||
@@ -110,6 +110,7 @@ test_spawn_basics (void)
|
||||
NULL, &erroutput, NULL, &err);
|
||||
@@ -290,6 +290,7 @@ test_spawn_basics (void)
|
||||
#endif
|
||||
g_assert_no_error (err);
|
||||
g_assert_true (result);
|
||||
+ g_test_message ("sort non-existing-file.txt error output: %s", erroutput);
|
||||
#ifndef G_OS_WIN32
|
||||
/* Test against output of coreutils sort */
|
||||
g_assert_true (g_str_has_prefix (erroutput, "sort: "));
|
||||
g_assert_nonnull (strstr (erroutput, g_strerror (ENOENT)));
|
|
@ -0,0 +1,117 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Tue, 25 Feb 2020 10:45:07 +0000
|
||||
Subject: testfilemonitor: Skip if we are avoiding flaky tests
|
||||
|
||||
See https://gitlab.gnome.org/GNOME/glib/issues/1634
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Forwarded: no
|
||||
---
|
||||
gio/tests/testfilemonitor.c | 38 +++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 37 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/tests/testfilemonitor.c b/gio/tests/testfilemonitor.c
|
||||
index 52a5302..99c1dd0 100644
|
||||
--- a/gio/tests/testfilemonitor.c
|
||||
+++ b/gio/tests/testfilemonitor.c
|
||||
@@ -32,6 +32,12 @@ setup (Fixture *fixture,
|
||||
gchar *path = NULL;
|
||||
GError *local_error = NULL;
|
||||
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("https://gitlab.gnome.org/GNOME/glib/issues/1634");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
path = g_dir_make_tmp ("gio-test-testfilemonitor_XXXXXX", &local_error);
|
||||
g_assert_no_error (local_error);
|
||||
|
||||
@@ -48,7 +54,9 @@ teardown (Fixture *fixture,
|
||||
{
|
||||
GError *local_error = NULL;
|
||||
|
||||
- g_file_delete (fixture->tmp_dir, NULL, &local_error);
|
||||
+ if (fixture->tmp_dir != NULL)
|
||||
+ g_file_delete (fixture->tmp_dir, NULL, &local_error);
|
||||
+
|
||||
g_assert_no_error (local_error);
|
||||
g_clear_object (&fixture->tmp_dir);
|
||||
}
|
||||
@@ -375,6 +383,10 @@ test_atomic_replace (Fixture *fixture,
|
||||
if (skip_win32 ())
|
||||
return;
|
||||
|
||||
+ /* respect g_test_skip() during setup() */
|
||||
+ if (g_test_failed ())
|
||||
+ return;
|
||||
+
|
||||
data.step = 0;
|
||||
data.events = NULL;
|
||||
|
||||
@@ -483,6 +495,10 @@ test_file_changes (Fixture *fixture,
|
||||
if (skip_win32 ())
|
||||
return;
|
||||
|
||||
+ /* respect g_test_skip() during setup() */
|
||||
+ if (g_test_failed ())
|
||||
+ return;
|
||||
+
|
||||
data.step = 0;
|
||||
data.events = NULL;
|
||||
|
||||
@@ -603,6 +619,10 @@ test_dir_monitor (Fixture *fixture,
|
||||
if (skip_win32 ())
|
||||
return;
|
||||
|
||||
+ /* respect g_test_skip() during setup() */
|
||||
+ if (g_test_failed ())
|
||||
+ return;
|
||||
+
|
||||
data.step = 0;
|
||||
data.events = NULL;
|
||||
|
||||
@@ -703,6 +723,10 @@ test_dir_non_existent (Fixture *fixture,
|
||||
if (skip_win32 ())
|
||||
return;
|
||||
|
||||
+ /* respect g_test_skip() during setup() */
|
||||
+ if (g_test_failed ())
|
||||
+ return;
|
||||
+
|
||||
data.step = 0;
|
||||
data.events = NULL;
|
||||
|
||||
@@ -815,6 +839,10 @@ test_cross_dir_moves (Fixture *fixture,
|
||||
if (skip_win32 ())
|
||||
return;
|
||||
|
||||
+ /* respect g_test_skip() during setup() */
|
||||
+ if (g_test_failed ())
|
||||
+ return;
|
||||
+
|
||||
data[0].step = 0;
|
||||
data[0].events = NULL;
|
||||
|
||||
@@ -984,6 +1012,10 @@ test_file_hard_links (Fixture *fixture,
|
||||
GError *error = NULL;
|
||||
TestData data;
|
||||
|
||||
+ /* respect g_test_skip() during setup() */
|
||||
+ if (g_test_failed ())
|
||||
+ return;
|
||||
+
|
||||
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=755721");
|
||||
|
||||
if (skip_win32 ())
|
||||
@@ -1043,6 +1075,10 @@ test_finalize_in_callback (Fixture *fixture,
|
||||
GFile *file = NULL;
|
||||
guint i;
|
||||
|
||||
+ /* respect g_test_skip() during setup() */
|
||||
+ if (g_test_failed ())
|
||||
+ return;
|
||||
+
|
||||
g_test_summary ("Test that finalization of a GFileMonitor in one of its "
|
||||
"callbacks doesn’t cause a deadlock.");
|
||||
g_test_bug ("https://gitlab.gnome.org/GNOME/glib/-/issues/1941");
|
|
@ -0,0 +1,28 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Tue, 15 Feb 2022 20:42:53 +0000
|
||||
Subject: tests: Skip debugcontroller test
|
||||
|
||||
This is known to be flaky upstream.
|
||||
|
||||
Forwarded: not-needed
|
||||
---
|
||||
gio/tests/debugcontroller.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gio/tests/debugcontroller.c b/gio/tests/debugcontroller.c
|
||||
index 862e8f6..ebe90ef 100644
|
||||
--- a/gio/tests/debugcontroller.c
|
||||
+++ b/gio/tests/debugcontroller.c
|
||||
@@ -191,6 +191,12 @@ test_dbus_properties (void)
|
||||
|
||||
g_test_summary ("Test getting and setting properties on a #GDebugControllerDBus.");
|
||||
|
||||
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2486#note_1384102");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* Set up a test session bus and connection. Set up a separate second
|
||||
* connection to simulate a remote peer. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
|
@ -0,0 +1,27 @@
|
|||
From: Yue-Lan <lanyue@kylinos.cn>
|
||||
Date: Thu, 14 Dec 2023 17:19:57 +0800
|
||||
Subject: =?utf-8?b?dHJ5Zml4ICNJOE9BVjEg5Y246L29a3lsaW4tcHJvY2Vzcy1tYW5hZ2Vy?=
|
||||
=?utf-8?b?5ZCO5peg5rOV6YCa6L+H5qGM6Z2i5Zu+5qCH44CB5byA5aeL6I+c5Y2V44CB5Lu7?=
|
||||
=?utf-8?b?5Yqh5qCP5Zu+5qCH5omT5byA?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
确保使用gio接口的部分能够正常打开
|
||||
---
|
||||
gio/gportalsupport.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
|
||||
index f8d866f..0efbc73 100644
|
||||
--- a/gio/gportalsupport.c
|
||||
+++ b/gio/gportalsupport.c
|
||||
@@ -133,7 +133,7 @@ sandbox_info_read (void)
|
||||
const char *kylin_var;
|
||||
|
||||
kylin_var = g_getenv ("GLIB_USE_KYLIN_PROCESS_MANAGER");
|
||||
- if (kylin_var && kylin_var[0] == '1')
|
||||
+ if (kylin_var && kylin_var[0] == '1' && g_file_test ("/usr/bin/kylin-process-manager", G_FILE_TEST_EXISTS))
|
||||
use_kylin_process_manager = TRUE;
|
||||
|
||||
var = g_getenv ("GTK_USE_PORTAL");
|
|
@ -1,21 +0,0 @@
|
|||
From: Yue-Lan <lanyue@ubuntukylin.com>
|
||||
Date: Tue, 25 Apr 2023 14:51:53 +0800
|
||||
Subject: update changelog.
|
||||
|
||||
---
|
||||
glib/tests/spawn-test.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/glib/tests/spawn-test.c b/glib/tests/spawn-test.c
|
||||
index 95975f6..9fcf45f 100644
|
||||
--- a/glib/tests/spawn-test.c
|
||||
+++ b/glib/tests/spawn-test.c
|
||||
@@ -112,7 +112,7 @@ test_spawn_basics (void)
|
||||
g_assert_true (result);
|
||||
g_test_message ("sort non-existing-file.txt error output: %s", erroutput);
|
||||
#ifndef G_OS_WIN32
|
||||
- g_assert_true (g_str_has_prefix (erroutput, "sort: "));
|
||||
+ g_assert_true (g_str_has_prefix (erroutput, "sort: ") || g_str_has_prefix (erroutput, "/usr/bin/sort: "));
|
||||
g_assert_nonnull (strstr (erroutput, g_strerror (ENOENT)));
|
||||
#else
|
||||
{
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,75 @@
|
|||
From: Debian GNOME Maintainers
|
||||
<pkg-gnome-maintainers@lists.alioth.debian.org>
|
||||
Date: Wed, 29 Jun 2022 16:00:15 +0800
|
||||
Subject: user-directory-i18n
|
||||
|
||||
===================================================================
|
||||
---
|
||||
gio/glocalfileinfo.c | 33 ++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 32 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
|
||||
index 7c2524e..ad5dfb8 100644
|
||||
--- a/gio/glocalfileinfo.c
|
||||
+++ b/gio/glocalfileinfo.c
|
||||
@@ -124,6 +124,9 @@ static GHashTable *gid_cache = NULL;
|
||||
|
||||
#endif /* !G_OS_WIN32 */
|
||||
|
||||
+char* update_xdg_directory_display_name (const char *path,
|
||||
+ char *display_name);
|
||||
+
|
||||
char *
|
||||
_g_local_file_info_create_etag (GLocalFileStat *statbuf)
|
||||
{
|
||||
@@ -1777,6 +1780,7 @@ _g_local_file_info_get_nostat (GFileInfo *info,
|
||||
G_FILE_ATTRIBUTE_ID_STANDARD_DISPLAY_NAME))
|
||||
{
|
||||
char *display_name = g_filename_display_basename (path);
|
||||
+ char *xdg_display_name = NULL;
|
||||
|
||||
/* look for U+FFFD REPLACEMENT CHARACTER */
|
||||
if (strstr (display_name, "\357\277\275") != NULL)
|
||||
@@ -1785,7 +1789,9 @@ _g_local_file_info_get_nostat (GFileInfo *info,
|
||||
display_name = g_strconcat (display_name, _(" (invalid encoding)"), NULL);
|
||||
g_free (p);
|
||||
}
|
||||
- g_file_info_set_display_name (info, display_name);
|
||||
+ xdg_display_name = update_xdg_directory_display_name (path, display_name);
|
||||
+ g_file_info_set_display_name (info, xdg_display_name);
|
||||
+ g_free (xdg_display_name);
|
||||
g_free (display_name);
|
||||
}
|
||||
|
||||
@@ -1865,6 +1871,31 @@ get_icon_name (const char *path,
|
||||
return name;
|
||||
}
|
||||
|
||||
+char *update_xdg_directory_display_name (const char *path,
|
||||
+ char *display_name)
|
||||
+{
|
||||
+ char *retval = g_strdup (display_name);
|
||||
+ if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0)
|
||||
+ {
|
||||
+ retval = g_strdup (_("Desktop"));
|
||||
+ } else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS)) == 0) {
|
||||
+ retval = g_strdup (_("Documents"));
|
||||
+ } else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD)) == 0) {
|
||||
+ retval = g_strdup (_("Download"));
|
||||
+ } else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_MUSIC)) == 0) {
|
||||
+ retval = g_strdup (_("Music"));
|
||||
+ } else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_PICTURES)) == 0) {
|
||||
+ retval = g_strdup (_("Pictures"));
|
||||
+ } else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_PUBLIC_SHARE)) == 0) {
|
||||
+ retval = g_strdup (_("Public Share"));
|
||||
+ } else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_TEMPLATES)) == 0) {
|
||||
+ retval = g_strdup (_("Templates"));
|
||||
+ } else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS)) == 0) {
|
||||
+ retval = g_strdup (_("Videos"));
|
||||
+ }
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
static GIcon *
|
||||
get_icon (const char *path,
|
||||
const char *content_type,
|
Loading…
Reference in New Issue