summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarol Lewandowski <k.lewandowsk@samsung.com>2024-02-07 16:37:21 +0100
committerKarol Lewandowski <k.lewandowsk@samsung.com>2024-09-03 10:56:36 +0200
commitbacfcf05cd094b4ec880cd1763a8daf132e3d351 (patch)
treed43a9ef3815bd6dfb14a8e101cf0a2a18864a74b
parent069c264bb65aca16fa57f361b45ffe0fd889df95 (diff)
downloadglib-sandbox/klewandowski/glib_2.80.5.tar.gz
glib-sandbox/klewandowski/glib_2.80.5.tar.bz2
glib-sandbox/klewandowski/glib_2.80.5.zip
tizen: kdbus: Integrate into Tizen buildsandbox/klewandowski/glib_2.80.5
-rwxr-xr-xgio/gdbusconnection.c15
-rw-r--r--packaging/glib2.spec62
2 files changed, 68 insertions, 9 deletions
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 19760594c..a24ceb6d1 100755
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -3298,7 +3298,8 @@ name_watcher_call_get_name_owner_unlocked (GDBusConnection *connection,
if (g_dbus_connection_send_message_unlocked (connection, message,
G_DBUS_SEND_MESSAGE_FLAGS_NONE,
&watched_name->get_name_owner_serial,
- &local_error))
+ &local_error,
+ -1))
{
g_assert (watched_name->get_name_owner_serial != 0);
g_hash_table_insert (connection->map_method_serial_to_name_watcher,
@@ -4655,9 +4656,9 @@ add_signal_data (GDBusConnection *connection,
{
gboolean special_rule = FALSE;
/* rule for special message */
- if (!signal_data->sender_unique_name[0] || g_strcmp0 (signal_data->sender_unique_name, "org.freedesktop.DBus") == 0)
+ if (!sender_unique_name || g_strcmp0 (sender_unique_name, "org.freedesktop.DBus") == 0)
{
- if (signal_data->sender_unique_name[0]) /* So, this is org.freedesktop.DBus */
+ if (sender_unique_name) /* So, this is org.freedesktop.DBus */
special_rule = TRUE;
if (!signal_data->object_path || g_strcmp0 (signal_data->object_path, "/org/freedesktop/DBus") == 0)
{
@@ -4680,12 +4681,12 @@ add_signal_data (GDBusConnection *connection,
*
* for every other cases, add standard rule,
*/
- if (g_strcmp0 (signal_data->member, "NameAcquired") == 0)
- _g_kdbus_subscribe_name_acquired (connection->kdbus_worker, signal_data->rule, arg0, NULL);
+ if (g_strcmp0 (signal_data->member, "NameAcquired") == 0)
+ _g_kdbus_subscribe_name_acquired (connection->kdbus_worker, signal_data->rule, signal_data->arg0, NULL);
else if (g_strcmp0 (signal_data->member, "NameLost") == 0)
- _g_kdbus_subscribe_name_lost (connection->kdbus_worker, signal_data->rule, arg0, NULL);
+ _g_kdbus_subscribe_name_lost (connection->kdbus_worker, signal_data->rule, signal_data->arg0, NULL);
else if (!signal_data->member || g_strcmp0 (signal_data->member, "NameOwnerChanged") == 0)
- _g_kdbus_subscribe_name_owner_changed (connection->kdbus_worker, signal_data->rule, arg0, NULL);
+ _g_kdbus_subscribe_name_owner_changed (connection->kdbus_worker, signal_data->rule, signal_data->arg0, NULL);
}
}
}
diff --git a/packaging/glib2.spec b/packaging/glib2.spec
index 5ac27715e..b01f0ff3c 100644
--- a/packaging/glib2.spec
+++ b/packaging/glib2.spec
@@ -1,11 +1,12 @@
# Do not create provides from extension .so files because the main package
# should anchor any reverse-dependencies
-%global __provides_exclude_from ^(.*\\.extension-symbolic)$
+%global __provides_exclude_from ^(.*\\.extension-kdbus|.*\\.extension-symbolic)$
%define baseline 2.85.5
%define with_systemtap 0
%define keepstatic 1
%define build_dir _build
+%define build_dir_kdbus _build_kdbus
%define build_dir_symbolic _build_symbolic
%define relative_dbus_tests_base_dir %{_libdir}/dbus-tests
@@ -52,6 +53,8 @@ BuildRequires: pkgconfig(libffi)
BuildRequires: pcre2-devel
BuildRequires: pkgconfig(mount) >= 2.28
BuildRequires: pkgconfig(zlib)
+# Enable support for libdbuspolicy (only for kdbus transport)
+BuildRequires: pkgconfig(libdbuspolicy1)
%description
GLib is a general-purpose utility library, which provides many useful
@@ -158,9 +161,25 @@ Provides: gio = %{version}
%description -n libgio
GIO provides a modern, easy-to-use VFS API.
+%package -n libgio-extension-kdbus
+Summary: Extension for libgio to support KDBUS in Tizen
+Requires: libgio = %{version}-%{release}
+
+%description -n libgio-extension-kdbus
+This modifies libgio to support KDBUS in Tizen.
+
+%package -n libglib-extension-kdbus
+Summary: Extension for libgio to support KDBUS in Tizen
+Requires: libgio-extension-kdbus = %{version}-%{release}
+Conflicts: libglib-extension-symbolic
+
+%description -n libglib-extension-kdbus
+This modifies libgio to support KDBUS in Tizen.
+
%package -n libglib-extension-symbolic
Summary: Extension for libglib to allow the override of internal defined global function.
Requires: libglib = %{version}-%{release}
+Conflicts: libglib-extension-kdbus
%description -n libglib-extension-symbolic
This modifies libglib to allow the override of internal defined global function.
@@ -233,6 +252,17 @@ fi
-Db_pie=true
%meson_build
+%define _vpath_builddir %{build_dir_kdbus}
+%meson \
+ --default-library=both \
+ -Dkdbus=true \
+ -Dlibdbuspolicy=true \
+ -Dintrospection=disabled \
+ -Dman-pages=false \
+ -Dselinux=disabled \
+ -Db_pie=true
+%meson_build
+
# compile test-runner for 'dbus-integration-test' framework
%__cc %{_builddir}/%{name}-%{version}/test-runner.c -DTESTS_DIR='"'%{relative_dbus_tests_base_dir}/test-suites/glib-tests'"' -fPIC -pie -o %{_builddir}/%{name}-%{version}/glib-tests
@@ -242,7 +272,12 @@ fi
%meson_install
for FILE in %{buildroot}%{_libdir}/libglib*; do mv "$FILE" "$FILE.extension-symbolic"; done
-# normal install
+# kdbus extension install and gather required files
+%define _vpath_builddir %{build_dir_kdbus}
+%meson_install
+for FILE in %{buildroot}%{_libdir}/libgio*[0-9a] %{buildroot}%{_libdir}/libglib*[0-9a]; do mv "$FILE" "$FILE.extension-kdbus"; done
+
+# normal install overwriting kdbus extension install
%define _vpath_builddir %{build_dir}
%meson_install
%find_lang glib20 %{?no_lang_C}
@@ -325,6 +360,7 @@ chmod 755 %{buildroot}%{_bindir}/*
%manifest %{name}.manifest
%defattr(-, root, root)
%license COPYING
+%exclude %{_libdir}/libglib*.so.*.extension-kdbus
%exclude %{_libdir}/libglib*.so.*.extension-symbolic
%{_libdir}/libglib*.so.*
@@ -356,6 +392,7 @@ chmod 755 %{buildroot}%{_bindir}/*
%manifest %{name}.manifest
%defattr(-, root, root)
%license COPYING
+%exclude %{_libdir}/libgio*.so.*.extension-kdbus
%{_libdir}/libgio*.so.*
%dir %{_libdir}/gio
%dir %{_libdir}/gio/modules
@@ -366,6 +403,26 @@ chmod 755 %{buildroot}%{_bindir}/*
%lang_package -f glib20
+%post -n libgio-extension-kdbus
+pushd %{_libdir}
+for FILE in libgio*.so.*.extension-kdbus; do mv "$FILE" "${FILE%.extension-kdbus}"; done
+popd
+
+%files -n libgio-extension-kdbus
+%manifest %{name}.manifest
+%license COPYING
+%{_libdir}/libgio*.so.*.extension-kdbus
+
+%post -n libglib-extension-kdbus
+pushd %{_libdir}
+for FILE in libglib*.so.*.extension-kdbus; do mv "$FILE" "${FILE%.extension-kdbus}"; done
+popd
+
+%files -n libglib-extension-kdbus
+%manifest %{name}.manifest
+%license COPYING
+%{_libdir}/libglib*.so.*.extension-kdbus
+
%post -n libglib-extension-symbolic
pushd %{_libdir}
for FILE in libglib*.so.*.extension-symbolic; do mv "$FILE" "${FILE%.extension-symbolic}"; done
@@ -425,6 +482,7 @@ popd
%defattr(-,root,root)
%license COPYING
%{_libdir}/lib*.a
+%{_libdir}/lib*.a.extension-kdbus
%{_libdir}/lib*.a.extension-symbolic
%files tests