From be3e67a7b521167bee216707bba9a9c9a0e2f9a5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 14 Jan 2024 11:56:47 +0000 Subject: net-misc/warpinator : version bump --- net-misc/warpinator/Manifest | 2 +- .../files/warpinator-dbus-fallback.patch | 69 ++++++++++++++++++++++ net-misc/warpinator/warpinator-1.7.0-r2.ebuild | 56 ------------------ net-misc/warpinator/warpinator-1.8.3.ebuild | 57 ++++++++++++++++++ 4 files changed, 127 insertions(+), 57 deletions(-) create mode 100644 net-misc/warpinator/files/warpinator-dbus-fallback.patch delete mode 100644 net-misc/warpinator/warpinator-1.7.0-r2.ebuild create mode 100644 net-misc/warpinator/warpinator-1.8.3.ebuild (limited to 'net-misc/warpinator') diff --git a/net-misc/warpinator/Manifest b/net-misc/warpinator/Manifest index e23fe847..969e2214 100644 --- a/net-misc/warpinator/Manifest +++ b/net-misc/warpinator/Manifest @@ -1 +1 @@ -DIST warpinator-1.7.0.tar.gz 48138258 BLAKE2B 61009cbb71849831a8110b48de9e971ae59ae5cc573da658d6c8cd1deba11a23f0d5abaf05985e2699273e0c03dfe0cc19e69c4984935355370eeb4de0655484 SHA512 1fd43a6dc857253fb5c1f82b6f4fdf6a03ad38c18f679a628f7a97ed782779982abeb673c9163876f901e6e556d6309ce49502f07e72b7a1dcb6ef88e284b7fd +DIST warpinator-1.8.3.tar.gz 48156643 BLAKE2B 69020a866adb8b8da361cb7d2b6bf9a8b86913c1a1799078038d6340f18ed7eb490e0d920ddcf9c1f837cfe52c21156ec2fdadc3f24ce79ec416824672cb9943 SHA512 914194f02849c3a9169bc208cc4c50f287f93575a4bd25d8321a884036898a22d19063d6d5877e93241b2cf7ccb7c94ace685b27e915aa4b391a038e0e03e856 diff --git a/net-misc/warpinator/files/warpinator-dbus-fallback.patch b/net-misc/warpinator/files/warpinator-dbus-fallback.patch new file mode 100644 index 00000000..f4f4f094 --- /dev/null +++ b/net-misc/warpinator/files/warpinator-dbus-fallback.patch @@ -0,0 +1,69 @@ +diff -Nur a/src/util.py b/src/util.py +--- a/src/util.py 2024-01-04 17:03:52.000000000 +0000 ++++ b/src/util.py 2024-01-14 03:01:42.318649562 +0000 +@@ -304,7 +304,7 @@ + # file manager might answer, if more than one is installed: + # https://github.com/linuxmint/nemo/commit/c9cbba6a2f08be69bf02ffcaf9b0faf4a03ace8b + +- bus = Gio.Application.get_default().get_dbus_connection() ++ bus = Gio.Application.get_default().get_dbus_connection() # this is likely to fail + + if filename is not None: + method = "ShowItems" +@@ -316,30 +316,32 @@ + file = Gio.File.new_for_path(abs_path) + startup_id = str(os.getpid()) + +- try: +- bus.call_sync("org.freedesktop.FileManager1", +- "/org/freedesktop/FileManager1", +- "org.freedesktop.FileManager1", +- method, +- GLib.Variant("(ass)", +- ([file.get_uri()], startup_id)), +- None, +- Gio.DBusCallFlags.NONE, +- 1000, +- None) +- logging.debug("Opening save folder using dbus") +- return +- except GLib.Error as e: +- logging.debug("Could not use dbus interface to launch file manager: %s" % e.message) +- +- # If dbus doesn't work, use xdg mimetype handlers. +- app = Gio.AppInfo.get_default_for_type("inode/directory", True) +- +- try: +- logging.debug("Opening save folder using Gio (mimetype)") +- Gio.AppInfo.launch_default_for_uri(prefs.get_save_uri(), None) +- except GLib.Error as e: +- logging.critical("Could not open received files location: %s" % e.message) ++ if bus is not None: ++ try: ++ bus.call_sync("org.freedesktop.FileManager1", ++ "/org/freedesktop/FileManager1", ++ "org.freedesktop.FileManager1", ++ method, ++ GLib.Variant("(ass)", ++ ([file.get_uri()], startup_id)), ++ None, ++ Gio.DBusCallFlags.NONE, ++ 1000, ++ None) ++ logging.debug("Opening save folder using dbus") ++ return ++ except GLib.Error as e: ++ logging.debug("Could not use dbus interface to launch file manager: %s" % e.message) ++ ++ else: ++ # If dbus doesn't work, use xdg mimetype handlers. ++ app = Gio.AppInfo.get_default_for_type("inode/directory", True) ++ ++ try: ++ logging.debug("Opening save folder using Gio (mimetype)") ++ Gio.AppInfo.launch_default_for_uri(prefs.get_save_uri(), None) ++ except GLib.Error as e: ++ logging.critical("Could not open received files location: %s" % e.message) + + def verify_save_folder(): + # Forbidden locations for incoming files, relative to home. diff --git a/net-misc/warpinator/warpinator-1.7.0-r2.ebuild b/net-misc/warpinator/warpinator-1.7.0-r2.ebuild deleted file mode 100644 index d84ecffa..00000000 --- a/net-misc/warpinator/warpinator-1.7.0-r2.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Share files across the LAN" -HOMEPAGE="https://github.com/linuxmint/warpinator" -SRC_URI="https://github.com/linuxmint/${PN}/archive/refs/tags/master.lmde6.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64" - -inherit meson gnome2-utils xdg - -DEPEND=" - dev-libs/gobject-introspection - dev-python/cryptography - dev-python/ifaddr - dev-python/netaddr - dev-python/netifaces - dev-python/pynacl - dev-python/setproctitle - >=dev-python/python3-xapp-1.6.0 -" -RDEPEND="${DEPEND}" -BDEPEND=" - >=dev-util/meson-0.45.0 -" - -S="${WORKDIR}/${PN}-master.lmde6" - -PATCHES=( - "${FILESDIR}/${PN}-bundled-grpcio-cython3.patch" - "${FILESDIR}/${PN}-system-paths.patch" -) - -src_configure() { - local emesonargs=( - -Dinclude-firewall-mod=true - -Dbundle-zeroconf=true - -Dbundle-landlock=true - -Dbundle-grpc=true - ) - meson_src_configure -} - -pkg_postinst() { - xdg_pkg_postinst - gnome2_schemas_update -} - -pkg_postrm() { - xdg_pkg_postinst - gnome2_schemas_update -} diff --git a/net-misc/warpinator/warpinator-1.8.3.ebuild b/net-misc/warpinator/warpinator-1.8.3.ebuild new file mode 100644 index 00000000..23eeb6d6 --- /dev/null +++ b/net-misc/warpinator/warpinator-1.8.3.ebuild @@ -0,0 +1,57 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Share files across the LAN" +HOMEPAGE="https://github.com/linuxmint/warpinator" +SRC_URI="https://github.com/linuxmint/${PN}/archive/refs/tags/master.lmde6.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +inherit meson gnome2-utils xdg + +DEPEND=" + dev-libs/gobject-introspection + dev-python/cryptography + dev-python/ifaddr + dev-python/netaddr + dev-python/netifaces + dev-python/pynacl + dev-python/setproctitle + >=dev-python/python3-xapp-1.6.0 +" +RDEPEND="${DEPEND}" +BDEPEND=" + >=dev-build/meson-0.45.0 +" + +S="${WORKDIR}/${PN}-master.lmde6" + +PATCHES=( + "${FILESDIR}/${PN}-bundled-grpcio-cython3.patch" + "${FILESDIR}/${PN}-system-paths.patch" + "${FILESDIR}/${PN}-dbus-fallback.patch" +) + +src_configure() { + local emesonargs=( + -Dinclude-firewall-mod=true + -Dbundle-zeroconf=true + -Dbundle-landlock=true + -Dbundle-grpc=true + ) + meson_src_configure +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update +} + +pkg_postrm() { + xdg_pkg_postinst + gnome2_schemas_update +} -- cgit v1.2.3