
| Msg # 26 of 505 on ZZLI4427, Thursday 8-20-25, 12:37 |
| From: SIMON MCVITTIE |
| To: ALL |
| Subj: Bug#1111600: bookworm-pu: package glib2. |
[continued from previous message]
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glib/gstring.c b/glib/gstring.c
+index 1a79759..4cba302 100644
+--- a/glib/gstring.c
++++ b/glib/gstring.c
+@@ -875,7 +875,7 @@ g_string_overwrite_len (GString *string,
+ const gchar *val,
+ gssize len)
+ {
+- gssize len_unsigned;
++ gsize len_unsigned;
+ gsize end;
+
+ g_return_val_if_fail (string != NULL, NULL);
diff -Nru glib2.0-2.74.6/debian/patches/series glib2.0-2.74.6/de
ian/patches/series
--- glib2.0-2.74.6/debian/patches/series 2025-04-12 14:52:16.000000000 +0100
+++ glib2.0-2.74.6/debian/patches/series 2025-08-18 09:27:51.000000000 +0100
@@ -49,3 +49,7 @@
0003-gdatetime-Track-timezone-length-as-an-unsigned-size_.patch
0004-gdatetime-Factor-out-some-string-pointer-arithmetic.patch
0005-gdatetime-Factor-out-an-undersized-variable.patch
+gstring-carefully-handle-gssize-parameters.patch
+gstring-Make-len_unsigned-unsigned.patch
+glib-gfileutils.c-use-64-bits-for-value-in-get_tmp_file.patch
+gfileutils-fix-computation-of-temporary-file-name.patch
diff -Nru glib2.0-2.74.6/debian/tests/1065022-futureproofing gli
2.0-2.74.6/debian/tests/1065022-futureproofing
--- glib2.0-2.74.6/debian/tests/1065022-futureproofing 1970-01-01
01:00:00.000000000 +0100
+++ glib2.0-2.74.6/debian/tests/1065022-futureproofing 2025-08-18
09:27:51.000000000 +0100
@@ -0,0 +1,137 @@
+#!/bin/sh
+# Copyright 2024 Simon McVittie
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+# Ensure that if the content of libglib2.0-0 is taken over by some
+# other package like libglib2.0-0t64 (in this test it is named
+# libglib2.0-0xyz), then that other package will not trigger
+# #1065022.
+
+set -eux
+
+export DEBIAN_FRONTEND=noninteractive
+n=0
+failed=0
+binary_package="libglib2.0-0"
+future_binary_package="libglib2.0-0xyz"
+srcdir="$(pwd)"
+tmpdir="$(mktemp -d)"
+cd "$tmpdir"
+
+# Machine-readable TAP on fd 3, human-readable diagnostics on fds 1 and 2
+exec 3>&1 >&2
+
+assert () {
+ n=$(( n + 1 ))
+
+ if "$@"; then
+ echo "ok $n - $*" >&3
+ else
+ echo "not ok $n - $* exit status $?" >&3
+ failed=1
+ fi
+}
+
+assert_not () {
+ n=$(( n + 1 ))
+
+ if ! "$@"; then
+ echo "ok $n - unsuccessful as expected: $*" >&3
+ else
+ echo "not ok $n - should not have succeeded: $*" >&3
+ failed=1
+ fi
+}
+
+# Add a deb822-formatted apt source at this location if you are testing a
+# locally-built glib2.0 before upload
+if [ -e "$srcdir/debian/tests/manual/local-1065022.sources" ]; then
+ install -m644 -t /etc/apt/sources.list.d/ -D \\
+ "$srcdir/debian/tests/manual/local-1065022.sources"
+fi
+
+# For more convenient manual testing
+if ! dpkg-query -W dpkg-repack; then
+ apt-get -y update
+ apt-get -y install "$binary_package"
+ apt-get -y install dconf-gsettings-backend dpkg-repack gset
ings-desktop-schemas
+fi
+
+# This assumes that libglib2.0-0 has at least one Breaks but no Provides
+# or Replaces, and will need to be adjusted if that assumption is broken in
+# the future for whatever reason.
+dpkg-query -s "$binary_package"
+# The $ substitution is to be expanded by dpkg-query:
+# shellcheck disable=SC2016
+binary_version="$(dpkg-query -W -f '${Version}' "$binary_package")"
+dpkg-repack --generate "$binary_package"
+assert grep -q '^Breaks:' dpkg-repack.*/DEBIAN/control
+assert_not grep -q '^Provides:' dpkg-repack.*/DEBIAN/control
+assert_not grep -q '^Replaces:' dpkg-repack.*/DEBIAN/control
+# The $ substitutions in the Perl expressions are to be expanded by Perl,
+# not by the shell, so:
+# shellcheck disable=SC2016
+env \\
+ binary_package="$binary_package" \\
+ binary_version="$binary_version" \\
+ future_binary_package="$future_binary_package" \\
+ perl -p -i \\
+ -e 's/^Package:.*$/Package: $ENV{future_binary_package}/;' \\
+ -e 's/^(Breaks:.*)$/$1, $ENV{binary_package}/;' \\
+ dpkg-repack.*/DEBIAN/control
+echo "Replaces: ${binary_package}" | tee -a dpkg-repack.*/DEBIAN/control
+echo "Provides: ${binary_package} (= ${binary_version})" | tee -a
dpkg-repack.*/DEBIAN/control
+dpkg-deb --build dpkg-repack.* "$future_binary_package.deb"
+dpkg-deb --info "$future_binary_package.deb"
+dpkg-deb --contents "$future_binary_package.deb"
+apt-get -y install ./"$future_binary_package.deb" dconf-gsettings-backend
gsettings-desktop-schemas
+
+assert test -e /usr/share/glib-2.0/schemas/org.gnome.desktop.in
erface.gschema.xml
+assert test -s /usr/share/glib-2.0/schemas/gschemas.compiled
+
+for f in /usr/lib/*/gio/modules/libdconfsettings.so; do
+ assert test -e "$f"
+ assert test -s "$f"
+done
+
+for f in /usr/lib/*/gio/modules/giomodule.cache; do
+ assert test -e "$f"
+ assert test -s "$f"
+done
+
+# Purging the "old" (pre-transition) binary package does not destroy the
+# GIO modules and GSettings schema summaries
+apt-get -y purge "$binary_package"
+
+assert test -e /usr/share/glib-2.0/schemas/org.gnome.desktop.in
erface.gschema.xml
+assert test -s /usr/share/glib-2.0/schemas/gschemas.compiled
+
+for f in /usr/lib/*/gio/modules/libdconfsettings.so; do
+ assert test -e "$f"
+ assert test -s "$f"
+done
+
+for f in /usr/lib/*/gio/modules/giomodule.cache; do
+ assert test -e "$f"
+ assert test -s "$f"
+done
+
+# Purging the "new" (post-transition) binary package still *does* destroy
the
+# GIO modules and GSettings schema summaries
+apt-get -y purge "$future_binary_package"
+
+assert_not test -e /usr/share/glib-2.0/schemas/org.gnome.deskto
.interface.gschema.xml
+assert_not test -e /usr/share/glib-2.0/schemas/gschemas.compiled
+
+for f in /usr/lib/*/gio/modules/libdconfsettings.so; do
+ assert_not test -e "$f"
+done
+
+for f in /usr/lib/*/gio/modules/giomodule.cache; do
+ assert_not test -e "$f"
+done
+
+echo "1..$n" >&3
+exit "$failed"
+
+# vim:set sw=4 sts=4 et:
diff -Nru glib2.0-2.74.6/debian/tests/control glib2.0-2.74.6/deb
an/tests/control
--- glib2.0-2.74.6/debian/tests/control 2024-11-14 09:42:34.000000000 +0000
+++ glib2.0-2.74.6/debian/tests/control 2025-08-18 09:27:51.000000000 +0100
@@ -9,3 +9,7 @@
Tests: closure-refcount debugcontroller gdbus-server-auth gdbus-threading
gmenumodel mainloop memory-monitor-dbus socket testfilemonitor threadtests
timeout timer
Depends: dbus-daemon (>= 1.8), dbus-x11, gnome-desktop-testing,
libglib2.0-tests, locales | locales-all, xauth, xvfb
Restrictions: allow-stderr flaky
+
+Tests: 1065022-futureproofing
+Depends: dconf-gsettings-backend, dpkg-repack, gsettings-desktop-schemas,
libglib2.0-0
+Restrictions: allow-stderr breaks-testbed flaky needs-root
diff -Nru glib2.0-2.74.6/glib/gfileutils.c glib2.0-2.74.6/glib/gfileutils.c
--- glib2.0-2.74.6/glib/gfileutils.c 2023-02-23 13:54:27.000000000 +0000
+++ glib2.0-2.74.6/glib/gfileutils.c 2025-08-18 10:52:22.000000000 +0100
@@ -1483,9 +1483,9 @@
static const char letters[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
static const int NLETTERS = sizeof (letters) - 1;
- glong value;
- gint64 now_us;
- static int counter = 0;
+ guint64 value;
+ guint64 now_us;
+ static guint counter = 0;
g_return_val_if_fail (tmpl != NULL, -1);
@@ -1504,7 +1504,7 @@
for (count = 0; count < 100; value += 7777, ++count)
{
- glong v = value;
+ guint64 v = value;
/* Fill in the random bits. */
XXXXXX[0] = letters[v % NLETTERS];
[continued in next message]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)
|
328,100 visits
(c) 1994, bbs@darkrealms.ca