Hello community, here is the log from the commit of package paprefs for openSUSE:Factory checked in at 2019-07-26 12:40:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/paprefs (Old) and /work/SRC/openSUSE:Factory/.paprefs.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "paprefs" Fri Jul 26 12:40:54 2019 rev:37 rq:718465 version:1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/paprefs/paprefs.changes 2018-10-11 11:53:12.558194655 +0200 +++ /work/SRC/openSUSE:Factory/.paprefs.new.4126/paprefs.changes 2019-07-26 12:40:55.641892472 +0200 @@ -1,0 +2,13 @@ +Tue Jul 23 22:12:41 UTC 2019 - Bjørn Lie <bjorn....@gmail.com> + +- Update to version 1.1: + + Replace dbus-glib and libdbus with gdbus. + + Use module-combine-sink instead of module-combine. +- Drop paprefs-module-combine-sink.patch: Fixed upstream. +- Drop pkgconfig(dbus-glib-1) BuildRequires: No longer needed. +- Drop conditional post(un) handling of desktop_database_post(un) + for obsolete versions of openSUSE, not needed for any currently + supported version. +- Replace gcc-c++ with c++_compiler BuildRequires. + +------------------------------------------------------------------- Old: ---- paprefs-1.0.tar.xz paprefs-module-combine-sink.patch New: ---- paprefs-1.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ paprefs.spec ++++++ --- /var/tmp/diff_new_pack.nUnlZv/_old 2019-07-26 12:40:56.401892141 +0200 +++ /var/tmp/diff_new_pack.nUnlZv/_new 2019-07-26 12:40:56.401892141 +0200 @@ -1,7 +1,7 @@ # # spec file for package paprefs # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,22 +17,18 @@ Name: paprefs -Version: 1.0 +Version: 1.1 Release: 0 Summary: PulseAudio Preferences License: GPL-2.0-or-later Group: Productivity/Multimedia/Sound/Utilities -URL: http://freedesktop.org/software/pulseaudio/paprefs/ -Source0: http://freedesktop.org/software/pulseaudio/paprefs/%{name}-%{version}.tar.xz +URL: https://freedesktop.org/software/pulseaudio/paprefs +Source0: %{url}/%{name}-%{version}.tar.xz -# PATCH-FIX-UPSTREAM paprefs-module-combine-sink.patch bnc#820594 ohole...@suse.com -- use module-combine-sink instead of module-combine -Patch0: paprefs-module-combine-sink.patch - -BuildRequires: gcc-c++ +BuildRequires: c++_compiler BuildRequires: meson BuildRequires: pkgconfig BuildRequires: update-desktop-files -BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(giomm-2.4) >= 2.26 BuildRequires: pkgconfig(gtkmm-3.0) BuildRequires: pkgconfig(libpulse) @@ -62,14 +58,6 @@ %suse_update_desktop_file %{name} HardwareSettings AudioVideo Utility %find_lang %{name} %{?no_lang_C} -%if 0%{?suse_version} < 1500 -%post -%desktop_database_post - -%postun -%desktop_database_postun -%endif - %files %license LICENSE %{_bindir}/* ++++++ paprefs-1.0.tar.xz -> paprefs-1.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/paprefs-1.0/doc/README.html.in new/paprefs-1.1/doc/README.html.in --- old/paprefs-1.0/doc/README.html.in 2018-07-29 18:28:07.000000000 +0200 +++ new/paprefs-1.1/doc/README.html.in 2019-01-25 08:18:10.000000000 +0100 @@ -37,6 +37,11 @@ <h2><a name="news">News</a></h2> +<div class="news-date">Fri Jan 25 2019: </div> <p class="news-text"><a +href="@package_...@paprefs-1.1.tar.xz">Version 1.1</a> released; replace +dbus-glib and libdbus with gdbus, use module-combine-sink instead of +module-combine</p> + <div class="news-date">Sun Jul 29 2018: </div> <p class="news-text"><a href="@package_...@paprefs-1.0.tar.xz">Version 1.0</a> released; replace GConf with GSettings, port from GTK 2 to GTK 3, change build system from Autotools to @@ -107,17 +112,19 @@ <p>The current release is <a href="@PACKAGE_URL@paprefs-@package_vers...@.tar.gz">@PACKAGE_VERSION@</a></p> -<p>Get <tt>paprefs</tt>'s development sources from the <a href="http://git-scm.org/">GIT</a> <a href="git://anongit.freedesktop.org/pulseaudio/paprefs">repository</a> (<a href="http://cgit.freedesktop.org/pulseaudio/paprefs">web interface</a>): </p> +<p>Get <tt>paprefs</tt>'s development sources from the <a href="http://git-scm.com/">Git</a> <a href="https://gitlab.freedesktop.org/pulseaudio/paprefs.git">repository</a> (<a href="https://gitlab.freedesktop.org/pulseaudio/paprefs">web interface</a>): </p> -<pre>git clone git://anongit.freedesktop.org/pulseaudio/paprefs</pre> +<pre>git clone https://gitlab.freedesktop.org/pulseaudio/paprefs.git</pre> <h2><a name="bugs">Bug Reports</a></h2> -<p>Bugs can be reported on the freedesktop.org bug tracker: <a href="https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio">https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio</a>. You need to report your bugs against PulseAudio, because there's no separate product on the bug tracker for paprefs.</p> +<p>Here's the list of open bug reports: <a href="https://gitlab.freedesktop.org/pulseaudio/paprefs/issues">https://gitlab.freedesktop.org/pulseaudio/paprefs/issues</a></p> + +<p>And here you can create a new bug report: <a href="https://gitlab.freedesktop.org/pulseaudio/paprefs/issues/new">https://gitlab.freedesktop.org/pulseaudio/paprefs/issues/new</a></p> <h2><a name="patches">Contributing Code</a></h2> -<p>If you have patches for paprefs, send them to the <a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss">PulseAudio mailing list</a> (requires subscription). The best (but not mandatory) way to send patches is with the <tt>git send-email</tt> tool. Here are some <a href="https://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/">instructions for git send-email</a>.</p> +<p>If you have patches for paprefs, the primary method for submitting them is by creating a merge request in <a href="https://gitlab.freedesktop.org/pulseaudio/paprefs">GitLab</a>. Alternatively, you can send patches to the <a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss">PulseAudio mailing list</a> (requires subscription).</p> </body> </html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/paprefs-1.0/meson.build new/paprefs-1.1/meson.build --- old/paprefs-1.0/meson.build 2018-07-29 18:28:07.000000000 +0200 +++ new/paprefs-1.1/meson.build 2019-01-25 08:18:10.000000000 +0100 @@ -1,6 +1,6 @@ project('paprefs', 'cpp', license: 'GPL2+', - version: '1.0', + version: '1.1', meson_version: '>=0.40.1' ) @@ -14,7 +14,6 @@ gtkmm = dependency('gtkmm-3.0') giomm = dependency('giomm-2.4', version: '>= 2.26') sigc = dependency('sigc++-2.0') -dbus_glib = dependency('dbus-glib-1') libpulse = dependency('libpulse') lynx = find_program('lynx', required: with_lynx) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/paprefs-1.0/src/meson.build new/paprefs-1.1/src/meson.build --- old/paprefs-1.0/src/meson.build 2018-07-29 18:28:07.000000000 +0200 +++ new/paprefs-1.1/src/meson.build 2019-01-25 08:18:10.000000000 +0100 @@ -6,7 +6,6 @@ giomm, gtkmm, sigc, - dbus_glib, libpulse, ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/paprefs-1.0/src/paprefs.cc new/paprefs-1.1/src/paprefs.cc --- old/paprefs-1.0/src/paprefs.cc 2018-07-29 18:28:07.000000000 +0200 +++ new/paprefs-1.1/src/paprefs.cc 2019-01-25 08:18:10.000000000 +0100 @@ -25,8 +25,8 @@ #include <gtkmm.h> #include <libintl.h> -#include <dbus/dbus-glib.h> -#include <dbus/dbus.h> +#include <giomm/dbusconnection.h> +#include <giomm/dbusproxy.h> #include <gdk/gdkx.h> #include <pulse/version.h> @@ -120,6 +120,9 @@ void installFiles(const char *a, const char *b); void installModules(const char *a, const char *b); + void onPackageKitAppeared(const Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring& name, const Glib::ustring& name_owner); + void onPackageKitVanished(const Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring& name); + bool moduleExists(const gchar *name); gchar *modulePath(const gchar *name); @@ -339,36 +342,28 @@ } void MainWindow::installFiles(const char *a, const char *b = NULL) { - DBusGConnection *connection; - DBusGProxy *proxy; - gboolean ret; - GError *error = NULL; - const gchar *packages[] = {a, b, NULL}; - - connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - - proxy = dbus_g_proxy_new_for_name(connection, - "org.freedesktop.PackageKit", - "/org/freedesktop/PackageKit", - "org.freedesktop.PackageKit.Modify"); - - ret = dbus_g_proxy_call( - proxy, "InstallProvideFiles", &error, - G_TYPE_UINT, GDK_WINDOW_XID(get_window()->gobj()), - G_TYPE_STRV, packages, - G_TYPE_STRING, "show-confirm-search,hide-finished", - G_TYPE_INVALID, G_TYPE_INVALID); - - if (!ret) { - g_warning("Installation failed: %s", error->message); - g_error_free(error); - } - - g_object_unref(proxy); - dbus_g_connection_unref(connection); + Glib::RefPtr<Gio::DBus::Proxy> proxy; + const std::vector<Glib::ustring> packages = {a, b}; - checkForModules(); - updateSensitive(); + proxy = Gio::DBus::Proxy::create_for_bus_sync(Gio::DBus::BusType::BUS_TYPE_SESSION, + "org.freedesktop.PackageKit", + "/org/freedesktop/PackageKit", + "org.freedesktop.PackageKit.Modify"); + + Glib::VariantContainerBase params = Glib::VariantContainerBase::create_tuple(std::vector<Glib::VariantBase>({ + Glib::Variant<guint>::create(GDK_WINDOW_XID(get_window()->gobj())), + Glib::Variant<std::vector<Glib::ustring>>::create(packages), + Glib::Variant<Glib::ustring>::create("show-confirm-search,hide-finished") + })); + + try { + proxy->call_sync("InstallProvideFiles", params); + + checkForModules(); + updateSensitive(); + } catch (const Glib::Error& err) { + g_warning("Installation failed: %s", err.what().c_str()); + } } void MainWindow::installModules(const char *a, const char *b = NULL) { @@ -420,7 +415,7 @@ combineSettings->delay(); if (combineCheckButton->get_active()) { - combineSettings->set_string("name0", Glib::ustring("module-combine")); + combineSettings->set_string("name0", Glib::ustring("module-combine-sink")); combineSettings->set_string("args0", Glib::ustring("")); combineSettings->set_boolean("enabled", true); @@ -728,19 +723,20 @@ } void MainWindow::checkForPackageKit() { + Gio::DBus::watch_name(Gio::DBus::BusType::BUS_TYPE_SESSION, + "org.freedesktop.PackageKit", + sigc::mem_fun(*this, &MainWindow::onPackageKitAppeared), + sigc::mem_fun(*this, &MainWindow::onPackageKitVanished)); +} - DBusError err; - dbus_error_init(&err); - DBusConnection *sessionBus = dbus_bus_get(DBUS_BUS_SESSION, &err); - - if(dbus_error_is_set(&err)) { - g_warning("Error connecting to DBus: %s", err.message); - packageKitAvailable = FALSE; - } else { - packageKitAvailable = dbus_bus_name_has_owner(sessionBus, "org.freedesktop.PackageKit", NULL); - dbus_connection_unref(sessionBus); - } - dbus_error_free(&err); +void MainWindow::onPackageKitAppeared(const Glib::RefPtr<Gio::DBus::Connection>& connection,const Glib::ustring& name,const Glib::ustring& name_owner) { + packageKitAvailable = TRUE; + updateSensitive(); +} + +void MainWindow::onPackageKitVanished(const Glib::RefPtr<Gio::DBus::Connection>& connection,const Glib::ustring& name) { + packageKitAvailable = FALSE; + updateSensitive(); }