diff --git a/backport-telepathy-glib-test-cm-with-newer-glib.patch b/backport-telepathy-glib-test-cm-with-newer-glib.patch new file mode 100644 index 0000000000000000000000000000000000000000..ba0c74d23342836a367a191535582bd377422c1a --- /dev/null +++ b/backport-telepathy-glib-test-cm-with-newer-glib.patch @@ -0,0 +1,34 @@ +From aa858698d7ede76b3b4c825ca14b8061c24f14e1 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Mon, 4 Sep 2023 17:56:15 +0900 +Subject: [PATCH] test: make test-cm accepted with newer GLib + +With GLib 2.77.3, the key value "foo\;bar" is no longer accepted +with g_key_file_get_string and it returns null string result. + +Modify key value in test file to get it accepted by new GLib. +--- + tests/dbus/telepathy/managers/test_manager_file.manager | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/tests/dbus/telepathy/managers/test_manager_file.manager b/tests/dbus/telepathy/managers/test_manager_file.manager +index 426ad4a7e..bdb3f90f1 100644 +--- a/tests/dbus/telepathy/managers/test_manager_file.manager ++++ b/tests/dbus/telepathy/managers/test_manager_file.manager +@@ -79,11 +79,9 @@ default-triply-escaped-semicolon-in-list = list\\\;of;misc; + param-empty-list = as + default-empty-list = + +-# this is probably technically a Desktop Entry spec violation? +-# we should be permissive, interpreting this as either "foo\;bar" or "foo;bar" +-# seems reasonable ++# the value is "foo\\;bar" + param-escaped-semicolon = s +-default-escaped-semicolon = foo\;bar ++default-escaped-semicolon = foo\\;bar + + # all the other types + param-object = o +-- +GitLab + diff --git a/expected-gtypes-body-f30.h b/expected-gtypes-body-f30.h deleted file mode 100644 index 14ab76fc903f1cb9fd6701b1cf52a1839a1534d8..0000000000000000000000000000000000000000 --- a/expected-gtypes-body-f30.h +++ /dev/null @@ -1,100 +0,0 @@ -/* Auto-generated, do not edit. - * - * This file may be distributed under the same terms - * as the specification from which it was generated. - */ - -GType -the_prefix_type_dbus_hash_sv (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE); - return t; -} - -GType -the_prefix_type_dbus_hash_ss (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING); - return t; -} - -GType -the_prefix_type_dbus_hash_sa_7bsv_7d (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))); - return t; -} - -GType -the_prefix_type_dbus_hash_saa_7bsv_7d (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))))); - return t; -} - -GType -the_prefix_type_dbus_struct_isu (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_struct ("GValueArray", - G_TYPE_INT, - G_TYPE_STRING, - G_TYPE_UINT, - G_TYPE_INVALID); - return t; -} - -GType -the_prefix_type_dbus_array_isu (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_collection ("GPtrArray", the_prefix_type_dbus_struct_isu ()); - return t; -} - -GType -the_prefix_type_dbus_array_of_a_7bsv_7d (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_collection ("GPtrArray", the_prefix_type_dbus_hash_sv ()); - return t; -} - -GType -the_prefix_type_dbus_array_of_a_7bsa_7bsv_7d_7d (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_collection ("GPtrArray", the_prefix_type_dbus_hash_sa_7bsv_7d ()); - return t; -} - -GType -the_prefix_type_dbus_array_of_a_7bsaa_7bsv_7d_7d (void) -{ - static GType t = 0; - - if (G_UNLIKELY (t == 0)) - t = dbus_g_type_get_collection ("GPtrArray", the_prefix_type_dbus_hash_saa_7bsv_7d ()); - return t; -} - diff --git a/expected-gtypes-f30.h b/expected-gtypes-f30.h deleted file mode 100644 index b4ad2ce4fecdd006d5b3d17cdb2963bfdf0fc2ec..0000000000000000000000000000000000000000 --- a/expected-gtypes-f30.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Auto-generated, do not edit. - * - * This file may be distributed under the same terms - * as the specification from which it was generated. - */ - -#define THE_PREFIX_HASH_TYPE_STRING_VARIANT_MAP (the_prefix_type_dbus_hash_sv ()) - -#define THE_PREFIX_ARRAY_TYPE_STRING_VARIANT_MAP_LIST (the_prefix_type_dbus_array_of_a_7bsv_7d ()) - -#define THE_PREFIX_HASH_TYPE_STRING_STRING_MAP (the_prefix_type_dbus_hash_ss ()) - -#define THE_PREFIX_HASH_TYPE_STRING_VARIANT_MAP_MAP (the_prefix_type_dbus_hash_sa_7bsv_7d ()) - -#define THE_PREFIX_ARRAY_TYPE_STRING_VARIANT_MAP_MAP_LIST (the_prefix_type_dbus_array_of_a_7bsa_7bsv_7d_7d ()) - -#define THE_PREFIX_HASH_TYPE_STRING_VARIANT_MAP_LIST_MAP (the_prefix_type_dbus_hash_saa_7bsv_7d ()) - -#define THE_PREFIX_ARRAY_TYPE_STRING_VARIANT_MAP_LIST_MAP_LIST (the_prefix_type_dbus_array_of_a_7bsaa_7bsv_7d_7d ()) - -GType the_prefix_type_dbus_hash_sv (void); - -GType the_prefix_type_dbus_hash_ss (void); - -GType the_prefix_type_dbus_hash_sa_7bsv_7d (void); - -GType the_prefix_type_dbus_hash_saa_7bsv_7d (void); - -#define THE_PREFIX_STRUCT_TYPE_STRUCT (the_prefix_type_dbus_struct_isu ()) - -#define THE_PREFIX_ARRAY_TYPE_STRUCT_LIST (the_prefix_type_dbus_array_isu ()) - -GType the_prefix_type_dbus_struct_isu (void); - -GType the_prefix_type_dbus_array_isu (void); - -GType the_prefix_type_dbus_array_of_a_7bsv_7d (void); - -GType the_prefix_type_dbus_array_of_a_7bsa_7bsv_7d_7d (void); - -GType the_prefix_type_dbus_array_of_a_7bsaa_7bsv_7d_7d (void); - diff --git a/telepathy-glib-0.24.1-glib246.patch b/telepathy-glib-0.24.1-glib246.patch deleted file mode 100644 index 7cf13e702c3fd4e29a876d91af3276996c3d1f27..0000000000000000000000000000000000000000 --- a/telepathy-glib-0.24.1-glib246.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 838bb888d80f75fb29653656c571f9f32d0255f0 Mon Sep 17 00:00:00 2001 -From: Iain Lane -Date: Fri, 2 Oct 2015 15:19:23 +0100 -Subject: [PATCH] Don't use the same test name for multiple tests - -GLib 2.46.0 doesn't allow this any more, and so the testsuite fails. ---- - tests/dbus/account.c | 10 +++++----- - tests/dbus/cm.c | 2 +- - tests/dbus/contact-list-client.c | 2 +- - tests/dbus/contact-lists.c | 2 +- - 4 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/tests/dbus/account.c b/tests/dbus/account.c -index 1df043a..8fa7514 100644 ---- a/tests/dbus/account.c -+++ b/tests/dbus/account.c -@@ -980,7 +980,7 @@ main (int argc, - - g_test_add ("/account/reconnect", Test, NULL, setup_service, test_reconnect, - teardown_service); -- g_test_add ("/account/reconnect", Test, "vardict", setup_service, -+ g_test_add ("/account/reconnect/vardict", Test, "vardict", setup_service, - test_reconnect, teardown_service); - - g_test_add ("/account/prepare/success", Test, NULL, setup_service, -@@ -989,17 +989,17 @@ main (int argc, - g_test_add ("/account/connection", Test, NULL, setup_service, - test_connection, teardown_service); - -- g_test_add ("/account/storage", Test, "first", setup_service, test_storage, -+ g_test_add ("/account/storage/first", Test, "first", setup_service, test_storage, - teardown_service); -- g_test_add ("/account/storage", Test, "later", setup_service, test_storage, -+ g_test_add ("/account/storage/later", Test, "later", setup_service, test_storage, - teardown_service); - - g_test_add ("/account/avatar", Test, NULL, setup_service, test_avatar, - teardown_service); - -- g_test_add ("/account/addressing", Test, "first", setup_service, -+ g_test_add ("/account/addressing-first", Test, "first", setup_service, - test_addressing, teardown_service); -- g_test_add ("/account/addressing", Test, "later", setup_service, -+ g_test_add ("/account/addressing-later", Test, "later", setup_service, - test_addressing, teardown_service); - - return tp_tests_run_with_bus (); -diff --git a/tests/dbus/cm.c b/tests/dbus/cm.c -index ad42854..c386d60 100644 ---- a/tests/dbus/cm.c -+++ b/tests/dbus/cm.c -@@ -1187,7 +1187,7 @@ main (int argc, - - g_test_add ("/cm/list", Test, GINT_TO_POINTER (0), - setup, test_list, teardown); -- g_test_add ("/cm/list", Test, GINT_TO_POINTER (USE_OLD_LIST), -+ g_test_add ("/cm/list/use-old-list", Test, GINT_TO_POINTER (USE_OLD_LIST), - setup, test_list, teardown); - - return tp_tests_run_with_bus (); -diff --git a/tests/dbus/contact-list-client.c b/tests/dbus/contact-list-client.c -index a3f878a..bb4895d 100644 ---- a/tests/dbus/contact-list-client.c -+++ b/tests/dbus/contact-list-client.c -@@ -577,7 +577,7 @@ main (int argc, - - g_test_add ("/contact-list-client/contact-list/properties", Test, - GUINT_TO_POINTER (FALSE), setup, test_contact_list_properties, teardown); -- g_test_add ("/contact-list-client/contact-list/properties", Test, -+ g_test_add ("/contact-list-client/contact-list/properties/props-only", Test, - GUINT_TO_POINTER (TRUE), setup, test_contact_list_properties, teardown); - - return tp_tests_run_with_bus (); -diff --git a/tests/dbus/contact-lists.c b/tests/dbus/contact-lists.c -index 43ab262..5e88a18 100644 ---- a/tests/dbus/contact-lists.c -+++ b/tests/dbus/contact-lists.c -@@ -2788,7 +2788,7 @@ main (int argc, - - g_test_add ("/contact-lists/cancelled-publish-request", - Test, NULL, setup, test_cancelled_publish_request, teardown); -- g_test_add ("/contact-lists/cancelled-publish-request", -+ g_test_add ("/contact-lists/cancelled-publish-request/remove-after", - Test, "remove-after", setup, test_cancelled_publish_request, teardown); - - g_test_add ("/contact-lists/add-to-stored", --- -2.5.0 \ No newline at end of file diff --git a/telepathy-glib-0.24.1.tar.gz b/telepathy-glib-0.24.2.tar.gz similarity index 35% rename from telepathy-glib-0.24.1.tar.gz rename to telepathy-glib-0.24.2.tar.gz index e7f5c512b414b76134ed349316c23ac253e9ab27..ea048d382e640af23b2cef003da213872b8c609c 100644 Binary files a/telepathy-glib-0.24.1.tar.gz and b/telepathy-glib-0.24.2.tar.gz differ diff --git a/telepathy-glib.spec b/telepathy-glib.spec index d2ff948f2ecbc315179a7d420d1d26be45aadc69..2ce6c1866a707a2071e5fee4348872f888f5fecf 100644 --- a/telepathy-glib.spec +++ b/telepathy-glib.spec @@ -1,96 +1,129 @@ -Name: telepathy-glib -Version: 0.24.1 -Release: 12 -Summary: GObject-based library for the Telepathy D-Bus API +%global dbus_ver 0.95 +%global dbus_glib_ver 0.90 +%global glib_ver 2.36.0 +%global gobj_ver 1.30 +%global vala_ver 0.16.0 + +Name: telepathy-glib +Version: 0.24.2 +Release: 1 +Summary: GLib bindings for Telepathy + +# LGPL-2.1-or-later: overall +# FSFAP: examples/client/ et al. (not included in the binary) +# FSFAP: tests/contact-search-result.c et al. +# SPDX confirmed +License: LGPL-2.1-or-later +URL: http://telepathy.freedesktop.org/wiki/FrontPage +Source0: http://telepathy.freedesktop.org/releases/%{name}/%{name}-%{version}.tar.gz +# https://gitlab.freedesktop.org/telepathy/telepathy-glib/-/issues/145 +# https://gitlab.freedesktop.org/telepathy/telepathy-glib/-/merge_requests/3 +# https://gitlab.freedesktop.org/telepathy/telepathy-glib/-/merge_requests/3.patch +Patch0: backport-telepathy-glib-test-cm-with-newer-glib.patch + +BuildRequires: make +BuildRequires: gcc +# Tests +BuildRequires: gcc-c++ + +BuildRequires: pkgconfig(dbus-1) >= %{dbus_ver} +BuildRequires: pkgconfig(dbus-glib-1) >= %{dbus_glib_ver} +BuildRequires: pkgconfig(glib-2.0) >= %{glib_ver} +BuildRequires: pkgconfig(gobject-2.0) >= %{glib_ver} +BuildRequires: pkgconfig(gio-2.0) >= %{glib_ver} +BuildRequires: pkgconfig(gobject-introspection-1.0) >= %{gobj_ver} + +BuildRequires: gtk-doc >= 1.17 +BuildRequires: vala +BuildRequires: vala-devel +BuildRequires: libxslt +BuildRequires: python3 +# For tests/dbus +BuildRequires: dbus-daemon -License: LGPLv2+ -URL: http://telepathy.freedesktop.org/ -Source0: http://telepathy.freedesktop.org/releases/telepathy-glib/%{name}-%{version}.tar.gz - -Patch0: telepathy-glib-0.24.1-glib246.patch -Source10: expected-gtypes-f30.h -Source11: expected-gtypes-body-f30.h - -BuildRequires: dbus-devel dbus-glib-devel glib2-devel gobject-introspection-devel -BuildRequires: gtk-doc libxslt vala-devel vala git python3 -Requires: glibc dbus-libs dbus-glib glib2 +%description +Telepathy-glib is the glib bindings for the telepathy unified framework +for all forms of real time conversations, including instant messaging, IRC, +voice calls and video calls. -Provides: %{name}-vala -Obsoletes: %{name}-vala +%package vala +Summary: Vala bindings for %{name} +Requires: %{name} = %{version}-%{release} +Requires: vala +BuildArch: noarch -%description -The telepathy-glib library is a GObject-based C binding for the -Telepathy D-Bus API. +%description vala +Vala bindings for %{name}. -%package devel -Summary: Header files for telepathy-glib -Requires: %{name} = %{version}-%{release} -Requires: dbus-devel dbus-glib-devel glib2-devel telepathy-glib -Requires: pkgconf-pkg-config telepathy-filesystem +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-vala = %{version}-%{release} +Requires: telepathy-filesystem -%description devel -Header files for telepathy-glib +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. -%package_help %prep -%autosetup -n %{name}-%{version} -p1 - +%autosetup -p1 + # Explicitly switch to python3 -env LANG=C grep -rl python . | \ - xargs sed -i \ +touch timestamp +env LANG=C grep -rl python . | while read f +do + sed -i $f \ -e 's|/usr/bin/python$|/usr/bin/python3|' \ -e 's|/usr/bin/env[ \t]*python$|/usr/bin/python3|' \ %{nil} - -# And tweak timestamps -touch aclocal.m4 -find . -name Makefile.in | xargs touch -touch configure -touch config.h.in - - -sed -i tests/all-errors-documented.py -e 's|^\(.*\)print\(.*\)|\1print (\2)|' -cp -p %SOURCE10 tests/tools/expected-gtypes.h -cp -p %SOURCE11 tests/tools/expected-gtypes-body.h - + # Explicitly set timestamp of the modified files to the same time + # so that autotool won't be called after configure + touch -r timestamp $f +done +# Also modify the following timestamp +touch -r timestamp config.h.in + %build -export PYTHON=python3 +%configure \ + --enable-static=no \ + --disable-silent-rules \ + --enable-introspection=yes \ + --enable-vala-bindings=yes \ + %{nil} -%configure --enable-introspection=yes --enable-vala-bindings=yes -%make_build +%{make_build} %install -%make_install -%delete_la - -%ldconfig_scriptlets +%{make_install} +find $RPM_BUILD_ROOT -name '*.la' -delete %check make check +%ldconfig_scriptlets %files -%defattr(-,root,root) -%doc README AUTHORS %license COPYING -%{_libdir}/girepository-1.0/* -%{_libdir}/*.so.* -%{_datadir}/vala/vapi/telepathy-glib.* +%doc AUTHORS NEWS README +%{_libdir}/libtelepathy-glib.so.0 +%{_libdir}/libtelepathy-glib.so.0.* +%{_libdir}/girepository-1.0/TelepathyGLib-0.12.typelib + +%files vala +%{_datadir}/vala/vapi/telepathy-glib.deps +%{_datadir}/vala/vapi/telepathy-glib.vapi %files devel -%defattr(-,root,root) -%{_libdir}/pkgconfig/telepathy-glib.pc -%{_libdir}/*.a -%{_libdir}/*.so -%{_includedir}/telepathy-1.0/* -%{_datadir}/gir-1.0/*.gir - -%files help -%defattr(-,root,root) -%doc NEWS -%{_datadir}/gtk-doc/html/* +%doc %{_datadir}/gtk-doc/html/%{name}/ +%{_libdir}/libtelepathy-glib.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/telepathy-1.0/%{name}/ +%{_datadir}/gir-1.0/TelepathyGLib-0.12.gir %changelog +* Fri Nov 03 2023 liweigang - 0.24.2-1 +- update to version 0.24.2 + * Wed Oct 21 2020 jinzhimin - 0.24.1-12 - modify buildrequire to python3