From 76e216d4e727de7083525b3e18cf3c6df3725b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=88=90=E5=88=9A?= Date: Tue, 26 Dec 2023 11:12:02 +0800 Subject: [PATCH] feat: update dbus-c++-0.9.0 --- debian/changelog | 36 ++++++ debian/control | 28 ++--- debian/copyright | 11 +- debian/patches/01_host_name_max.patch | 8 +- .../09_fix_build_order_and_linking.patch | 36 ++++++ ...event_deadlock_on_timeout_expiration.patch | 16 +++ .../11_fix_MessageIter__copy_data.patch | 49 ++++++++ debian/patches/12_autoconf_update.patch | 108 ++++++++++++++++++ debian/patches/series | 4 + debian/upstream/metadata | 3 + debian/watch | 4 +- 11 files changed, 284 insertions(+), 19 deletions(-) create mode 100644 debian/patches/09_fix_build_order_and_linking.patch create mode 100644 debian/patches/10_prevent_deadlock_on_timeout_expiration.patch create mode 100644 debian/patches/11_fix_MessageIter__copy_data.patch create mode 100644 debian/patches/12_autoconf_update.patch create mode 100644 debian/upstream/metadata diff --git a/debian/changelog b/debian/changelog index 8b1803a..57c3707 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,39 @@ +dbus-c++ (0.9.0-12) unstable; urgency=medium + + * QA upload. + * Remove test dependency libgtkmm-2.4-dev. (Closes: #1041790) + + -- Bastian Germann Wed, 02 Aug 2023 11:22:10 +0200 + +dbus-c++ (0.9.0-11) unstable; urgency=medium + + * QA upload. + * Add 09_fix_build_order_and_linking.patch to change the order in which the + libraries are built and to fix the underlinking issue. (Closes: #889114) + * Add 10_prevent_deadlock_on_timeout_expiration.patch to prevent a possible + deadlock. (Closes: #956114) + * Add 11_fix_MessageIter__copy_data.patch to fix copying nested types in + dicts and structs. (LP: #1098723) + * Add 12_autoconf_update.patch to avoid hard-to-read deprecation warnings + that clutter the build logs. + * Update 01_host_name_max.patch because stdio.h is needed by perror(). + * debian/control: + + Add libdbus-1-dev to libdbus-c++-dev's dependencies. (Closes: #1018771) + + Fix spelling and capitalization of the package descriptions. + + Update Homepage to use https URL. + + Mark libdbus-c++-bin as Multi-Arch: allowed. It fixes a regression since + version 0.9.0-9. + + Add Rules-Requires-Root: no. + + Bump Standards-Version to 4.6.2, no changes needed. + * debian/copyright: + + Add Upstream-Contact, information copied from configure.ac. + + Update packaging copyright according to debian/changelog and + debian/patches. + * debian/watch: Use uscan version 4. + * Add debian/upstream/metadata. + + -- Thomas Uhle Wed, 22 Feb 2023 22:55:50 +0100 + dbus-c++ (0.9.0-10) unstable; urgency=medium * QA upload. diff --git a/debian/control b/debian/control index 33192f7..ae03827 100644 --- a/debian/control +++ b/debian/control @@ -10,9 +10,9 @@ Build-Depends: libefl-all-dev, libexpat1-dev, libglib2.0-dev, - libgtkmm-2.4-dev (>= 1:2.24.4-2~) , -Standards-Version: 4.6.0 -Homepage: http://sourceforge.net/projects/dbus-cplusplus/ +Rules-Requires-Root: no +Standards-Version: 4.6.2 +Homepage: https://sourceforge.net/projects/dbus-cplusplus/ Vcs-Git: https://salsa.debian.org/debian/dbus-cplusplus.git Vcs-Browser: https://salsa.debian.org/debian/dbus-cplusplus @@ -28,14 +28,15 @@ Breaks: libdbus-c++-1-0, Replaces: libdbus-c++-1-0, -Description: C++ API for D-Bus (runtime package) - Dbus-c++ attempts to provide a C++ API for D-Bus. The library has a glib/gtk - and an Ecore mainloop integration. It also offers an optional own main loop. +Description: C++ API for D-Bus (runtime libraries) + DBus-c++ attempts to provide a C++ API for D-Bus. The library has a GLib/GTK + and an Ecore main loop integration. It also offers an optional own main loop. . This package includes shared object files. Package: libdbus-c++-bin Architecture: any +Multi-Arch: allowed Section: utils Depends: libdbus-c++-1-0v5 (= ${binary:Version}), @@ -48,8 +49,8 @@ Breaks: Replaces: libdbus-c++-dev (<< 0.9.0-5), Description: C++ API for D-Bus (utilities) - Dbus-c++ attempts to provide a C++ API for D-Bus. The library has a glib/gtk - and an Ecore mainloop integration. It also offers an optional own main loop. + DBus-c++ attempts to provide a C++ API for D-Bus. The library has a GLib/GTK + and an Ecore main loop integration. It also offers an optional own main loop. . This package includes binary utilities. @@ -59,11 +60,12 @@ Architecture: any Multi-Arch: same Depends: libdbus-c++-1-0v5 (= ${binary:Version}), - libdbus-c++-bin (= ${binary:Version}), + libdbus-c++-bin:any (= ${binary:Version}), + libdbus-1-dev (>= 0.60), ${misc:Depends}, Description: C++ API for D-Bus (development package) - Dbus-c++ attempts to provide a C++ API for D-Bus. The library has a glib/gtk - and an Ecore mainloop integration. It also offers an optional own main loop. + DBus-c++ attempts to provide a C++ API for D-Bus. The library has a GLib/GTK + and an Ecore main loop integration. It also offers an optional own main loop. . This package includes static object and header files. @@ -76,7 +78,7 @@ Depends: Suggests: libdbus-c++-dev, Description: C++ API for D-Bus (documentation) - Dbus-c++ attempts to provide a C++ API for D-Bus. The library has a glib/gtk - and an Ecore mainloop integration. It also offers an optional own main loop. + DBus-c++ attempts to provide a C++ API for D-Bus. The library has a GLib/GTK + and an Ecore main loop integration. It also offers an optional own main loop. . This package includes the documentation files. diff --git a/debian/copyright b/debian/copyright index 322d696..e748f00 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: dbus-c++ +Upstream-Contact: Andreas Volz Source: https://sourceforge.net/projects/dbus-cplusplus/ Files: * @@ -13,7 +14,15 @@ License: GPL-3+ Files: debian/* Copyright: 2009 Robert Millan - 2011 Vincent Cheng + 2011-2015 Vincent Cheng + 2011 Vince Laviano + 2015, 2018 Peter Williams + 2018 John Paul Adrian Glaubitz + 2020 Oleg Kyreiev + 2020 Peter Michael Green + 2022 Boyuan Yang + 2022 HÃ¥vard F. Aasen + 2022-2023 Thomas Uhle License: GPL-3+ License: GPL-3+ diff --git a/debian/patches/01_host_name_max.patch b/debian/patches/01_host_name_max.patch index d96cc82..70dee09 100644 --- a/debian/patches/01_host_name_max.patch +++ b/debian/patches/01_host_name_max.patch @@ -2,7 +2,7 @@ Description: Avoid relying on max host name length Fixes FTBFS on Debian GNU/kFreeBSD. Author: Robert Millan Bug-Debian: http://bugs.debian.org/542887 -Last-Update: 2011-12-09 +Last-Update: 2023-02-08 --- a/examples/echo/echo-server.cpp +++ b/examples/echo/echo-server.cpp @@ -39,7 +39,7 @@ Last-Update: 2011-12-09 echo-server-glue.h: echo-introspect.xml --- /dev/null +++ b/examples/echo/xgethostname.c -@@ -0,0 +1,82 @@ +@@ -0,0 +1,83 @@ +/* xgethostname.c -- return current hostname with unlimited length + + Copyright (C) 1992, 1996, 2000, 2001, 2003, 2004, 2005, 2006 Free @@ -66,6 +66,7 @@ Last-Update: 2011-12-09 +#include "xgethostname.h" + +#include ++#include +#include +#include + @@ -169,7 +170,7 @@ Last-Update: 2011-12-09 $(ecore_LIBS) --- /dev/null +++ b/examples/echo_ecore/xgethostname.c -@@ -0,0 +1,82 @@ +@@ -0,0 +1,83 @@ +/* xgethostname.c -- return current hostname with unlimited length + + Copyright (C) 1992, 1996, 2000, 2001, 2003, 2004, 2005, 2006 Free @@ -196,6 +197,7 @@ Last-Update: 2011-12-09 +#include "xgethostname.h" + +#include ++#include +#include +#include + diff --git a/debian/patches/09_fix_build_order_and_linking.patch b/debian/patches/09_fix_build_order_and_linking.patch new file mode 100644 index 0000000..f403020 --- /dev/null +++ b/debian/patches/09_fix_build_order_and_linking.patch @@ -0,0 +1,36 @@ +Description: Fix build order and linking of libraries +Author: Thomas Uhle +Bug-Debian: https://bugs.debian.org/889114 +Forwarded: https://sourceforge.net/p/dbus-cpluscplus/bugs/14/ +Last-Update: 2022-08-30 + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -37,6 +37,7 @@ + $(ecore_CFLAGS) + + SUBDIRS = \ ++ . \ + integration + + HEADER_DIR = $(top_srcdir)/include/dbus-c++ +--- dbus-c++-0.9.0.orig/src/integration/ecore/Makefile.am ++++ dbus-c++-0.9.0/src/integration/ecore/Makefile.am +@@ -11,6 +11,7 @@ + -Wno-unused-parameter + + libdbus_c___ecore_1_la_LIBADD = \ ++ $(top_builddir)/src/libdbus-c++-1.la \ + $(dbus_LIBS) \ + $(ecore_LIBS) + +--- dbus-c++-0.9.0.orig/src/integration/glib/Makefile.am ++++ dbus-c++-0.9.0/src/integration/glib/Makefile.am +@@ -11,6 +11,7 @@ + -Wno-unused-parameter + + libdbus_c___glib_1_la_LIBADD = \ ++ $(top_builddir)/src/libdbus-c++-1.la \ + $(dbus_LIBS) \ + $(glib_LIBS) + diff --git a/debian/patches/10_prevent_deadlock_on_timeout_expiration.patch b/debian/patches/10_prevent_deadlock_on_timeout_expiration.patch new file mode 100644 index 0000000..f65c4f6 --- /dev/null +++ b/debian/patches/10_prevent_deadlock_on_timeout_expiration.patch @@ -0,0 +1,16 @@ +Description: Prevent deadlock on timeout expiration +Author: Oleg Kyreiev +Bug-Debian: https://bugs.debian.org/956114 +Forwarded: https://sourceforge.net/p/dbus-cpluscplus/bugs/24/ +Last-Update: 2020-04-06 + +--- a/src/eventloop.cpp ++++ b/src/eventloop.cpp +@@ -110,6 +110,7 @@ void DefaultMutex::unlock() + } + + DefaultMainLoop::DefaultMainLoop() : ++ _mutex_t(true), + _mutex_w(true) + { + } diff --git a/debian/patches/11_fix_MessageIter__copy_data.patch b/debian/patches/11_fix_MessageIter__copy_data.patch new file mode 100644 index 0000000..76ec9ee --- /dev/null +++ b/debian/patches/11_fix_MessageIter__copy_data.patch @@ -0,0 +1,49 @@ +Description: MessageIter: handle nested dicts in copy_data + MessageIter::copy_data is calling dbus_message_iter_open_container (in + libdbus) with an invalid |contained_signature| argument when |type| is + complex. This triggers an assertion failure when the args are checked. + . + The comments for dbus_message_iter_open_container say: "For variants, + the contained_signature should be the type of the single value inside + the variant. For structs and dict entries, contained_signature should be + NULL; it will be set to whatever types you write into the struct. For + arrays, contained_signature should be the type of the array elements." + . + However, the existing code only follows this guideline for arrays. It + does the opposite of what is specified (passing NULL when a type + signature string is required and vice versa) for variants, structs, and + dict entries. + . + This issue was identified and this fix proposed in the upstream issue + tracker (see + http://sourceforge.net/tracker/?func=detail&aid=3151818&group_id=236997&atid=1101682), + but the fix has not yet been applied upstream and the issue remains open. + . + This issue was causing cashewd to abort when making a GetProperties + D-Bus call to flimflam's Device interface because of the nesting in the + newly added Cellular.SIMLockStatus property (see issue 11293). + . + BUG=chromium-os:13850 + TEST=manual testing on device + . + Change-Id: Ia29dc64dd9f7627413fc1c1f1fbf8d516336447c + . + Review URL: http://codereview.chromium.org/6820045 +Origin: vendor, https://chromium.googlesource.com/chromiumos/third_party/dbus-cplusplus/+/32fe2ce6a60f6f9e5771c639598050798a4feae8 +Author: Vince Laviano +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dbus-c++/+bug/1098723 +Forwarded: https://sourceforge.net/p/dbus-cpluscplus/bugs/5/ +Last-Update: 2011-04-11 + +--- a/src/message.cpp ++++ b/src/message.cpp +@@ -350,7 +350,8 @@ + ( + (DBusMessageIter *) & (to._iter), + from.type(), +- from.type() == DBUS_TYPE_VARIANT ? NULL : sig, ++ from.type() == DBUS_TYPE_DICT_ENTRY || ++ from.type() == DBUS_TYPE_STRUCT ? NULL : sig, + (DBusMessageIter *) & (to_container._iter) + ); + diff --git a/debian/patches/12_autoconf_update.patch b/debian/patches/12_autoconf_update.patch new file mode 100644 index 0000000..0cec097 --- /dev/null +++ b/debian/patches/12_autoconf_update.patch @@ -0,0 +1,108 @@ +Description: Update configure.ac and m4/acx_pthread.m4 +Author: Thomas Uhle +Forwarded: not-needed +Last-Update: 2023-02-08 + +--- a/configure.ac ++++ b/configure.ac +@@ -1,10 +1,10 @@ + # Autojunk script for libdbus-c++ + +-AC_PREREQ(2.59) +-AC_INIT([libdbus-c++], 0.9.0, [andreas.volz@tux-style.com]) ++AC_PREREQ([2.69]) ++AC_INIT([libdbus-c++], [0.9.0], [andreas.volz@tux-style.com]) + +-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) +-AM_CONFIG_HEADER([config.h]) ++AM_INIT_AUTOMAKE ++AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_MACRO_DIR([m4]) + + AC_CANONICAL_HOST +@@ -59,7 +59,7 @@ AC_SUBST(RT_LIBS) + + # Check for programs + +-AC_LANG_CPLUSPLUS ++AC_LANG([C++]) + + AC_PROG_CC + AC_PROG_CXX +@@ -67,7 +67,7 @@ AC_PROG_CXX + CXX_FOR_BUILD=${CXX_FOR_BUILD-${CXX}} + AC_SUBST(CXX_FOR_BUILD) + +-AM_PROG_LIBTOOL ++LT_INIT + + PKG_PROG_PKG_CONFIG + +@@ -212,7 +212,7 @@ AC_SUBST(BUILD_LIBDBUS_CXX_DIR) + + # Save processed files + +-AC_OUTPUT( ++AC_CONFIG_FILES([ + Makefile + src/Makefile + src/integration/Makefile +@@ -240,7 +240,8 @@ AC_OUTPUT( + dbus-c++-glib-1.pc + dbus-c++-glib-1-uninstalled.pc + libdbus-c++.spec +-) ++]) ++AC_OUTPUT + + echo + echo "Build configuration:" +--- a/m4/acx_pthread.m4 ++++ b/m4/acx_pthread.m4 +@@ -82,7 +82,7 @@ + AC_DEFUN([ACX_PTHREAD], [ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_LANG_SAVE +-AC_LANG_C ++AC_LANG([C]) + acx_pthread_ok=no + + # We used to check for pthread.h first, but this fails if pthread.h +@@ -98,7 +98,7 @@ if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) +- AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) ++ AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [acx_pthread_ok=yes]) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" +@@ -195,11 +195,12 @@ for flag in $acx_pthread_flags; do + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. +- AC_TRY_LINK([#include ], ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); +- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], +- [acx_pthread_ok=yes]) ++ pthread_create(0,0,0,0); pthread_cleanup_pop(0)])], ++ [acx_pthread_ok=yes], ++ []) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +@@ -225,8 +226,10 @@ if test "x$acx_pthread_ok" = xyes; then + AC_MSG_CHECKING([for joinable pthread attribute]) + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do +- AC_TRY_LINK([#include ], [int attr=$attr; return attr;], +- [attr_name=$attr; break]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], ++ [int attr=$attr; return attr])], ++ [attr_name=$attr; break], ++ []) + done + AC_MSG_RESULT($attr_name) + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then diff --git a/debian/patches/series b/debian/patches/series index 2ed0be6..12a469e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,7 @@ 06_fix_gcc-7_ftbfs.patch 07_fix_mutex_ftbfs.patch 08_fix_gcc-12.patch +09_fix_build_order_and_linking.patch +10_prevent_deadlock_on_timeout_expiration.patch +11_fix_MessageIter__copy_data.patch +12_autoconf_update.patch diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..51fc620 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,3 @@ +Archive: SourceForge +Bug-Database: https://sourceforge.net/p/dbus-cplusplus/bugs/ +Documentation: https://dbus-cplusplus.sourceforge.net/ diff --git a/debian/watch b/debian/watch index e145a2f..c5add6c 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ -version=3 -http://sf.net/dbus-cplusplus/libdbus-c\+\+-(.*)\.tar\.gz +version=4 +http://sf.net/dbus-cplusplus/ libdbus-c\+\+-(.*)\.tar\.gz