summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordudemanguy2023-09-10 12:25:50 -0500
committerdudemanguy2023-09-10 12:25:50 -0500
commit0b2dcc779e8eb3ffbfa3355c019f4beb502de9d7 (patch)
tree212548794ba95a72a6356a7c79e681d64f716cbf
parent88c35b4f06cc1603cf3a74b84f3bc31cc038e031 (diff)
downloadaur-0b2dcc779e8eb3ffbfa3355c019f4beb502de9d7.tar.gz
2.78.0-1
-rw-r--r--.SRCINFO10
-rw-r--r--0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch68
-rw-r--r--0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch160
-rw-r--r--PKGBUILD15
4 files changed, 6 insertions, 247 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0429f9a37c64..e30d290b5eb4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = glib2-patched-thumbnailer
pkgdesc = GLib2 patched with ahodesuka's thumbnailer patch.
- pkgver = 2.76.5
+ pkgver = 2.78.0
pkgrel = 1
url = https://gist.github.com/Dudemanguy/d199759b46a79782cc1b301649dec8a5
arch = x86_64
@@ -27,7 +27,7 @@ pkgbase = glib2-patched-thumbnailer
optdepends = python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report
optdepends = libelf: gresource inspection tool
optdepends = gvfs: most gio functionality
- provides = glib2=2.76.5
+ provides = glib2=2.78.0
provides = libgio-2.0.so
provides = libglib-2.0.so
provides = libgmodule-2.0.so
@@ -36,21 +36,17 @@ pkgbase = glib2-patched-thumbnailer
conflicts = glib2
options = !docs
options = staticlibs
- source = git+https://gitlab.gnome.org/GNOME/glib.git#commit=f0171c9eccdf9ebeabb074d4683fc9cfc41f4e60
+ source = git+https://gitlab.gnome.org/GNOME/glib.git#commit=3c543ef69ffab7c78e29eaf383e7fe2c7df6cd49
source = git+https://gitlab.gnome.org/GNOME/gvdb.git
source = 0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
source = 0002-glocalfileinfo-add-a-dbus-thumbnail-generator.patch
source = gio-querymodules.hook
source = glib-compile-schemas.hook
- source = 0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch
- source = 0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch
b2sums = SKIP
b2sums = SKIP
b2sums = 94c73ca7070c239494873dd52d6ee09382bbb5b1201f7afd737cfa140b1a2fb0744b2c2831baf3943d1d072550c35888d21ce6f19f89481ff9d1a60d9a0b30e0
b2sums = 7f6bc830e8ccf0ef8d1afa178af5141f2ff6b9387efd6675a27627ff90548b854c68bfc928b680833352b055de316f92726391909884f89c7a042825a942c03b
b2sums = 14c9211c0557f6d8d9a914f1b18b7e0e23f79f4abde117cb03ab119b95bf9fa9d7a712aa0a29beb266468aeb352caa3a9e4540503cfc9fe0bbaf764371832a96
b2sums = d30d349b4cb4407839d9074ce08f5259b8a5f3ca46769aabc621f17d15effdb89c4bf19bd23603f6df3d59f8d1adaded0f4bacd0333afcab782f2d048c882858
- b2sums = 6bcbcba60208162f7221701d6a642eabfc92c2fc6a476bcb42da5967577f8f0c75b688d149be01c9c48cd644aafa7fbdd63d9086385b8f7607fc981756d71a68
- b2sums = 257bf37d304cc161dedcde0a2c4d01e297f8263cde48b49d3ee47ca95a8fb9ad44bbb9bf99da51ec766ffb6f9d502e0a8fdc6b86346e6755373ee515e23b9419
pkgname = glib2-patched-thumbnailer
diff --git a/0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch b/0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch
deleted file mode 100644
index 8e96aaf3008a..000000000000
--- a/0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Joan Bruguera <joanbrugueram@gmail.com>
-Date: Thu, 23 Mar 2023 02:24:30 +0000
-Subject: [PATCH] glocalfile: Sum apparent size only for files and symlinks
-
-Since GNU Coreutils 9.2 (commit 110bcd28386b1f47a4cd876098acb708fdcbbb25),
-`du --apparent-size` (including `du --bytes`) no longer counts all kinds of
-files (directories, FIFOs, etc.), but only those for which `st_size` in
-`struct stat` is defined by POSIX, namely regular files and symlinks
-(and also rarely supported memory objects).
-
-This aligns the behaviour of GLib's `G_FILE_MEASURE_APPARENT_SIZE` flag
-with the new GNU Coreutils `du` and correct POSIX use.
-
-Note that this may be a breaking change for some uses.
-
-Link: https://lists.gnu.org/archive/html/bug-coreutils/2023-03/msg00007.html
-Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/2965
----
- gio/glocalfile.c | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/gio/glocalfile.c b/gio/glocalfile.c
-index 67d4b99fb741..e53216962faf 100644
---- a/gio/glocalfile.c
-+++ b/gio/glocalfile.c
-@@ -86,6 +86,9 @@
- #define FILE_READ_ONLY_VOLUME 0x00080000
- #endif
-
-+#ifndef S_ISREG
-+#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
-+#endif
- #ifndef S_ISDIR
- #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
- #endif
-@@ -2777,6 +2780,23 @@ g_local_file_measure_size_of_contents (gint fd,
- MeasureState *state,
- GError **error);
-
-+inline static gboolean _g_stat_is_size_usable (const GLocalFileStat *buf)
-+{
-+#ifndef HAVE_STATX
-+ // Memory objects are defined by POSIX, but are not supported by statx nor Windows
-+#ifdef S_TYPEISSHM
-+ if (S_TYPEISSHM (buf))
-+ return TRUE;
-+#endif
-+#ifdef S_TYPEISTMO
-+ if (S_TYPEISTMO (buf))
-+ return TRUE;
-+#endif
-+#endif
-+
-+ return S_ISREG (_g_stat_mode (buf)) || S_ISLNK (_g_stat_mode (buf));
-+}
-+
- static gboolean
- g_local_file_measure_size_of_file (gint parent_fd,
- GSList *name,
-@@ -2836,6 +2856,7 @@ g_local_file_measure_size_of_file (gint parent_fd,
- state->disk_usage += _g_stat_blocks (&buf) * G_GUINT64_CONSTANT (512);
- else
- #endif
-+ if (_g_stat_is_size_usable (&buf))
- state->disk_usage += _g_stat_size (&buf);
-
- if (S_ISDIR (_g_stat_mode (&buf)))
diff --git a/0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch b/0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch
deleted file mode 100644
index 5c9c53da8c9e..000000000000
--- a/0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Joan Bruguera <joanbrugueram@gmail.com>
-Date: Thu, 23 Mar 2023 02:19:03 +0000
-Subject: [PATCH] tests/file: Do not rely on du --bytes behaviour
-
-As explained in the previous commit, GNU Coreutils 9.2 changes the behaviour
-of `du --bytes` to only count regular files and symlinks.
-
-The previous commit makes the test pass with GNU Coreutils >=9.2, but the
-machine running the tests may have an older version, or perhaps even a
-reimplementation such as uutils. So we can't rely on the size returned by `du`
-to be the consistent across systems any more.
-
-However, the plus side of the new behaviour is that the size reported by `du`
-/ `G_FILE_MEASURE_APPARENT_SIZE` is now well-defined across filesystems
-(as the sum of the sizes of regular files & symlinks), so we can hardcode it.
-
-Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/2965
----
- gio/tests/file.c | 85 ++----------------------------------------------
- 1 file changed, 3 insertions(+), 82 deletions(-)
-
-diff --git a/gio/tests/file.c b/gio/tests/file.c
-index d16eda5c0b8c..ad2f945f9397 100644
---- a/gio/tests/file.c
-+++ b/gio/tests/file.c
-@@ -2515,105 +2515,33 @@ test_copy_preserve_mode (void)
- #endif
- }
-
--static gchar *
--splice_to_string (GInputStream *stream,
-- GError **error)
--{
-- GMemoryOutputStream *buffer = NULL;
-- char *ret = NULL;
--
-- buffer = (GMemoryOutputStream*)g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
-- if (g_output_stream_splice ((GOutputStream*)buffer, stream, 0, NULL, error) < 0)
-- goto out;
--
-- if (!g_output_stream_write ((GOutputStream*)buffer, "\0", 1, NULL, error))
-- goto out;
--
-- if (!g_output_stream_close ((GOutputStream*)buffer, NULL, error))
-- goto out;
--
-- ret = g_memory_output_stream_steal_data (buffer);
-- out:
-- g_clear_object (&buffer);
-- return ret;
--}
--
--static gboolean
--get_size_from_du (const gchar *path, guint64 *size)
--{
-- GSubprocess *du;
-- gboolean ok;
-- gchar *result;
-- gchar *endptr;
-- GError *error = NULL;
-- gchar *du_path = NULL;
--
--#ifndef __APPLE__
-- du_path = g_find_program_in_path ("du");
--#endif
--
-- /* If we can’t find du, don’t try and run the test. */
-- if (du_path == NULL)
-- return FALSE;
--
-- g_free (du_path);
--
-- du = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE,
-- &error,
-- "du", "--bytes", "-s", path, NULL);
-- g_assert_no_error (error);
--
-- result = splice_to_string (g_subprocess_get_stdout_pipe (du), &error);
-- g_assert_no_error (error);
--
-- *size = g_ascii_strtoll (result, &endptr, 10);
--
-- g_subprocess_wait (du, NULL, &error);
-- g_assert_no_error (error);
--
-- ok = g_subprocess_get_successful (du);
--
-- g_object_unref (du);
-- g_free (result);
--
-- return ok;
--}
--
- static void
- test_measure (void)
- {
- GFile *file;
-- guint64 size;
- guint64 num_bytes;
- guint64 num_dirs;
- guint64 num_files;
- GError *error = NULL;
- gboolean ok;
- gchar *path;
-
- path = g_test_build_filename (G_TEST_DIST, "desktop-files", NULL);
- file = g_file_new_for_path (path);
-
-- if (!get_size_from_du (path, &size))
-- {
-- g_test_message ("du not found or fail to run, skipping byte measurement");
-- size = 0;
-- }
--
- ok = g_file_measure_disk_usage (file,
- G_FILE_MEASURE_APPARENT_SIZE,
- NULL,
- NULL,
- NULL,
- &num_bytes,
- &num_dirs,
- &num_files,
- &error);
- g_assert_true (ok);
- g_assert_no_error (error);
-
-- if (size > 0)
-- g_assert_cmpuint (num_bytes, ==, size);
-+ g_assert_cmpuint (num_bytes, ==, 74478);
- g_assert_cmpuint (num_dirs, ==, 6);
- g_assert_cmpuint (num_files, ==, 32);
-
-@@ -2665,8 +2593,7 @@ measure_done (GObject *source,
- g_assert_true (ok);
- g_assert_no_error (error);
-
-- if (data->expected_bytes > 0)
-- g_assert_cmpuint (data->expected_bytes, ==, num_bytes);
-+ g_assert_cmpuint (data->expected_bytes, ==, num_bytes);
- g_assert_cmpuint (data->expected_dirs, ==, num_dirs);
- g_assert_cmpuint (data->expected_files, ==, num_files);
-
-@@ -2695,15 +2622,9 @@ test_measure_async (void)
-
- path = g_test_build_filename (G_TEST_DIST, "desktop-files", NULL);
- file = g_file_new_for_path (path);
--
-- if (!get_size_from_du (path, &data->expected_bytes))
-- {
-- g_test_message ("du not found or fail to run, skipping byte measurement");
-- data->expected_bytes = 0;
-- }
--
- g_free (path);
-
-+ data->expected_bytes = 74478;
- data->expected_dirs = 6;
- data->expected_files = 32;
-
diff --git a/PKGBUILD b/PKGBUILD
index 39eb61c54798..084527e99645 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=glib2-patched-thumbnailer
-pkgver=2.76.5
+pkgver=2.78.0
pkgrel=1
pkgdesc="GLib2 patched with ahodesuka's thumbnailer patch."
url="https://gist.github.com/Dudemanguy/d199759b46a79782cc1b301649dec8a5"
@@ -21,7 +21,7 @@ optdepends=('python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-repor
'gvfs: most gio functionality')
options=(!docs staticlibs)
license=(LGPL)
-_commit=f0171c9eccdf9ebeabb074d4683fc9cfc41f4e60 # tags/2.76.5^0
+_commit=3c543ef69ffab7c78e29eaf383e7fe2c7df6cd49 # tags/2.78.0^0
source=(
"git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
"git+https://gitlab.gnome.org/GNOME/gvdb.git"
@@ -29,17 +29,13 @@ source=(
0002-glocalfileinfo-add-a-dbus-thumbnail-generator.patch
gio-querymodules.hook
glib-compile-schemas.hook
- 0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch
- 0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch
)
b2sums=('SKIP'
'SKIP'
'94c73ca7070c239494873dd52d6ee09382bbb5b1201f7afd737cfa140b1a2fb0744b2c2831baf3943d1d072550c35888d21ce6f19f89481ff9d1a60d9a0b30e0'
'7f6bc830e8ccf0ef8d1afa178af5141f2ff6b9387efd6675a27627ff90548b854c68bfc928b680833352b055de316f92726391909884f89c7a042825a942c03b'
'14c9211c0557f6d8d9a914f1b18b7e0e23f79f4abde117cb03ab119b95bf9fa9d7a712aa0a29beb266468aeb352caa3a9e4540503cfc9fe0bbaf764371832a96'
- 'd30d349b4cb4407839d9074ce08f5259b8a5f3ca46769aabc621f17d15effdb89c4bf19bd23603f6df3d59f8d1adaded0f4bacd0333afcab782f2d048c882858'
- '6bcbcba60208162f7221701d6a642eabfc92c2fc6a476bcb42da5967577f8f0c75b688d149be01c9c48cd644aafa7fbdd63d9086385b8f7607fc981756d71a68'
- '257bf37d304cc161dedcde0a2c4d01e297f8263cde48b49d3ee47ca95a8fb9ad44bbb9bf99da51ec766ffb6f9d502e0a8fdc6b86346e6755373ee515e23b9419')
+ 'd30d349b4cb4407839d9074ce08f5259b8a5f3ca46769aabc621f17d15effdb89c4bf19bd23603f6df3d59f8d1adaded0f4bacd0333afcab782f2d048c882858')
pkgver() {
cd glib
@@ -55,11 +51,6 @@ prepare() {
# Apply patch to generate thumbnails
git apply -3 ../0002-glocalfileinfo-add-a-dbus-thumbnail-generator.patch
- # fix test suite issues with coreutils >=9.2
- # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3358
- git apply -3 ../0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch
- git apply -3 ../0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch
-
git submodule init
git submodule set-url subprojects/gvdb "$srcdir/gvdb"
git -c protocol.file.allow=always submodule update