Github messages for voidlinux
 help / color / mirror / Atom feed
From: paper42 <paper42@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] gnome-boxes: update to 43.0, tracker, spice-gtk, libosinfo: use libsoup3
Date: Sat, 22 Oct 2022 22:14:36 +0200	[thread overview]
Message-ID: <20221022201436.XdejHUTEsJ61jbRHLSPQ96jZFthWslOlC-1zkcOnF1Y@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39530@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

There is an updated pull request by paper42 against master on the void-packages repository

https://github.com/paper42/void-packages gnome-boxes-43
https://github.com/void-linux/void-packages/pull/39530

gnome-boxes: update to 43.0, tracker, spice-gtk, libosinfo: use libsoup3
#### Testing the changes
- I tested the changes in this PR: **briefly**

depends on  #39488
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39530.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gnome-boxes-43-39530.patch --]
[-- Type: text/x-diff, Size: 30547 bytes --]

From b9a969cb26fe3ac79e05e1109a025038296d9ffb Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Thu, 29 Sep 2022 17:30:18 +0200
Subject: [PATCH 1/7] tracker: also build libsoup3 version

---
 srcpkgs/tracker/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/tracker/template b/srcpkgs/tracker/template
index ed0f7bc04040..770ade715ca6 100644
--- a/srcpkgs/tracker/template
+++ b/srcpkgs/tracker/template
@@ -1,7 +1,7 @@
 # Template file for 'tracker'
 pkgname=tracker
 version=3.4.0
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Ddocs=false -Dman=true -Dstemmer=disabled
@@ -9,7 +9,7 @@ configure_args="-Ddocs=false -Dman=true -Dstemmer=disabled
 hostmakedepends="gettext pkg-config glib-devel vala asciidoc
  python3-gobject"
 makedepends="dbus-devel libglib-devel icu-devel json-glib-devel
- libsoup-devel libxml2-devel sqlite-devel bash-completion"
+ libsoup-devel libsoup3-devel libxml2-devel sqlite-devel bash-completion"
 checkdepends="dbus tar python3-gobject"
 short_desc="Personal search tool and storage system"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -33,7 +33,7 @@ post_patch() {
 
 tracker-devel_package() {
 	depends="libtracker>=${version}_${revision} libglib-devel json-glib-devel
-	 libsoup-devel"
+	 libsoup-devel libsoup3-devel"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include

From 047624bd992ac74350533e7638bb2323ce41589d Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Thu, 29 Sep 2022 17:30:19 +0200
Subject: [PATCH 2/7] libosinfo: use libsoup3

---
 common/shlibs              | 2 +-
 srcpkgs/libosinfo/template | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 9712cbc1262f..ef07deec5737 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1158,7 +1158,7 @@ libharfbuzz.so.0 libharfbuzz-5.1.0_1
 libharfbuzz-icu.so.0 libharfbuzz-5.1.0_1
 libharfbuzz-subset.so.0 libharfbuzz-5.1.0_1
 libharfbuzz-gobject.so.0 libharfbuzz-5.1.0_1
-libosinfo-1.0.so.0 libosinfo-0.2.0_1
+libosinfo-1.0.so.0 libosinfo-0.10.0_2
 libspice-client-gtk-3.0.so.5 spice-gtk-0.37_6
 libspice-client-glib-2.0.so.8 spice-gtk-0.37_6
 libspice-controller.so.0 spice-gtk-0.37_6
diff --git a/srcpkgs/libosinfo/template b/srcpkgs/libosinfo/template
index 5e8fe246c2b1..3396ea1cd003 100644
--- a/srcpkgs/libosinfo/template
+++ b/srcpkgs/libosinfo/template
@@ -1,7 +1,7 @@
 # Template file for 'libosinfo'
 pkgname=libosinfo
 version=1.10.0
-revision=1
+revision=2
 wrksrc="${pkgname}-v${version}"
 build_style=meson
 build_helper="gir"
@@ -11,13 +11,13 @@ configure_args="-Denable-introspection=$(vopt_if gir enabled disabled)
 hostmakedepends="glib-devel intltool pkg-config wget hwids
  $(vopt_if gtk_doc gtk-doc)
  $(vopt_if vala vala)"
-makedepends="libxslt-devel libglib-devel libsoup-devel"
+makedepends="libxslt-devel libglib-devel libsoup3-devel"
 depends="osinfo-db hwids"
 short_desc="GObject based library API for managing info about operating systems"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://libosinfo.org/"
-changelog="https://gitlab.com/libosinfo/libosinfo/raw/master/NEWS"
+changelog="https://gitlab.com/libosinfo/libosinfo/raw/main/NEWS"
 distfiles="https://gitlab.com/libosinfo/libosinfo/-/archive/v${version}/libosinfo-v${version}.tar.gz"
 checksum=e709c5f7d006527caea9b128cdae0ee3404217f2edb9a673ad9574b5eec257fc
 
@@ -36,7 +36,7 @@ libosinfo-devel_package() {
 		vmove "usr/lib/*.so"
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		if [ "$build_option_docs" ]; then
+		if [ "$build_option_gtk_doc" ]; then
 			vmove usr/share/gtk-doc
 		fi
 		if [ "$build_option_gir" ]; then

From d30604d968aafad3ebe6896af7df4b0b725f4be8 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Thu, 29 Sep 2022 17:30:20 +0200
Subject: [PATCH 3/7] osinfo-db-tools: update to 1.10.0.

---
 srcpkgs/osinfo-db-tools/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/osinfo-db-tools/template b/srcpkgs/osinfo-db-tools/template
index c164a2327430..89edbf989ac1 100644
--- a/srcpkgs/osinfo-db-tools/template
+++ b/srcpkgs/osinfo-db-tools/template
@@ -1,16 +1,16 @@
 # Template file for 'osinfo-db-tools'
 pkgname=osinfo-db-tools
-version=1.8.0
+version=1.10.0
 revision=1
 build_style=meson
 hostmakedepends="pkg-config perl"
 makedepends="libglib-devel libarchive-devel libxslt-devel
- json-glib-devel libsoup-devel"
+ json-glib-devel libsoup3-devel"
 checkdepends="python3-pytest python3-requests"
 short_desc="Tools for managing osinfo database"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://libosinfo.org"
-changelog="https://gitlab.com/libosinfo/osinfo-db-tools/raw/master/NEWS"
+changelog="https://gitlab.com/libosinfo/osinfo-db-tools/raw/main/NEWS"
 distfiles="https://releases.pagure.org/libosinfo/${pkgname}-${version}.tar.xz"
-checksum=e9811a936e74dc262ce297ea7b8addeb111c782de500c9e285d3cdd5fe1b180d
+checksum=802cdd53b416706ea5844f046ddcfb658c1b4906b9f940c79ac7abc50981ca68

From 6f128256528c1dd3335e3d7b52002225e06f5922 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Thu, 29 Sep 2022 17:30:21 +0200
Subject: [PATCH 4/7] phodav: update to 3.0.

---
 common/shlibs           |  2 +-
 srcpkgs/phodav/template | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index ef07deec5737..d68de4f37649 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3109,7 +3109,7 @@ libsysprof-ui-4.so sysprof-3.37.90_1
 libvala-0.56.so.0 libvala-0.56.0_1
 libvaladoc-0.56.so.0 libvaladoc-0.56.0_1
 libvalaccodegen.so libvala-0.44.0_1
-libphodav-2.0.so.0 phodav-2.2_1
+libphodav-3.0.so.0 phodav-3.0_1
 libgfshare.so.2 libgfshare-2.0.0_1
 libtacacs.so.1 tacacs-4.0.4.28_1
 libffms2.so.4 libffms2-2.23.1_1
diff --git a/srcpkgs/phodav/template b/srcpkgs/phodav/template
index 13092896899e..eac226f7b8e6 100644
--- a/srcpkgs/phodav/template
+++ b/srcpkgs/phodav/template
@@ -1,22 +1,21 @@
 # Template file for 'phodav'
 pkgname=phodav
-version=2.5
+version=3.0
 revision=1
 build_style=meson
-configure_args="-Dsystemd=disabled -Davahi=enabled -Dgtk_doc=disabled
- -Dudev=enabled"
+configure_args="-Davahi=enabled -Dgtk_doc=disabled"
 hostmakedepends="pkg-config"
-makedepends="libglib-devel libsoup-devel libxml2-devel avahi-glib-libs-devel
+makedepends="libglib-devel libsoup3-devel libxml2-devel avahi-glib-libs-devel
  eudev-libudev-devel"
 short_desc="GNOME Web Dav implementation"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/phodav"
-distfiles="${GNOME_SITE}/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=71f0a9cd70afd4dd1412a0298331dbb8ac71c0377f52117afc15eb88dc6fb910
+distfiles="${GNOME_SITE}/phodav/${version}/phodav-${version}.tar.xz"
+checksum=392ec2d06d50300dcff1ef269a2a985304e29bce3520002fca29f2edc1d138d1
 
 phodav-devel_package() {
-	depends="libglib-devel libsoup-devel libxml2-devel
+	depends="libglib-devel libsoup3-devel libxml2-devel
 	 ${sourcepkg}-${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {

From 0761ff2d624f94cb445c5966c8cb5b422244b01e Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Thu, 29 Sep 2022 17:30:22 +0200
Subject: [PATCH 5/7] spice-gtk: use libsoup3

---
 common/shlibs              | 6 +++---
 srcpkgs/spice-gtk/template | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index d68de4f37649..f68ffbb1e7fa 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1159,9 +1159,9 @@ libharfbuzz-icu.so.0 libharfbuzz-5.1.0_1
 libharfbuzz-subset.so.0 libharfbuzz-5.1.0_1
 libharfbuzz-gobject.so.0 libharfbuzz-5.1.0_1
 libosinfo-1.0.so.0 libosinfo-0.10.0_2
-libspice-client-gtk-3.0.so.5 spice-gtk-0.37_6
-libspice-client-glib-2.0.so.8 spice-gtk-0.37_6
-libspice-controller.so.0 spice-gtk-0.37_6
+libspice-client-gtk-3.0.so.5 spice-gtk-0.41_2
+libspice-client-glib-2.0.so.8 spice-gtk-0.41_2
+libspice-controller.so.0 spice-gtk-0.41_2
 libvirt-gconfig-1.0.so.0 libvirt-glib-0.1.2_1
 libvirt-gobject-1.0.so.0 libvirt-glib-0.1.2_1
 libgsasl.so.7 libgsasl-1.8.0_1
diff --git a/srcpkgs/spice-gtk/template b/srcpkgs/spice-gtk/template
index da01de9ca11a..344f91ce2de8 100644
--- a/srcpkgs/spice-gtk/template
+++ b/srcpkgs/spice-gtk/template
@@ -1,7 +1,7 @@
 # Template file for 'spice-gtk'
 pkgname=spice-gtk
 version=0.41
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dintrospection=$(vopt_if gir enabled disabled)
@@ -11,7 +11,7 @@ configure_args="-Dintrospection=$(vopt_if gir enabled disabled)
 hostmakedepends="pkg-config $(vopt_if vala vala) glib-devel
  spice-protocol python3-six python3-parsing perl"
 makedepends="acl-devel liblz4-devel pixman-devel opus-devel openssl-devel
- libsasl-devel gtk+3-devel libjpeg-turbo-devel polkit-devel libsoup-devel
+ libsasl-devel gtk+3-devel libjpeg-turbo-devel polkit-devel libsoup3-devel
  usbredir-devel spice-protocol json-glib-devel libglib-devel libva-devel
  phodav-devel gstreamer1-devel gst-plugins-base1-devel vte3-devel"
 depends="hwids gst-plugins-good1"

From f0fe6917083a13a1acbb10d0d38372d752279bca Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Thu, 29 Sep 2022 17:30:23 +0200
Subject: [PATCH 6/7] gnome-boxes: update to 43.0.

---
 srcpkgs/gnome-boxes/template | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/gnome-boxes/template b/srcpkgs/gnome-boxes/template
index 5e8aac1c3e8a..d964e2162c13 100644
--- a/srcpkgs/gnome-boxes/template
+++ b/srcpkgs/gnome-boxes/template
@@ -1,20 +1,21 @@
 # Template file for 'gnome-boxes'
 pkgname=gnome-boxes
-version=42.3
+version=43.0
 revision=1
 build_helper="gir"
 build_style=meson
-hostmakedepends="gettext itstool pkg-config vala glib-devel gtk-vnc-devel"
-makedepends="clutter-gtk-devel freerdp-devel gtk-vnc-devel libarchive-devel
- libglib-devel libgudev-devel libosinfo-devel libsecret-devel libsoup-devel
+hostmakedepends="gettext itstool pkg-config vala glib-devel desktop-file-utils"
+makedepends="clutter-gtk-devel freerdp-devel libarchive-devel
+ libglib-devel libgudev-devel libosinfo-devel libsecret-devel libsoup3-devel
  libusb-devel libvirt-glib-devel libxml2-devel spice-gtk-devel spice-protocol
- vala-devel webkit2gtk-devel vte3-devel gtksourceview4-devel libhandy1-devel
+ vala-devel libwebkit2gtk41-devel vte3-devel gtksourceview4-devel libhandy1-devel
  tracker-devel libgcrypt-devel"
-depends="desktop-file-utils hicolor-icon-theme libosinfo libvirt-glib qemu tracker"
+depends="desktop-file-utils hicolor-icon-theme qemu"
 short_desc="GNOME application to access remote or virtual systems"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.0-or-later"
 homepage="https://wiki.gnome.org/Apps/Boxes"
-changelog="https://gitlab.gnome.org/GNOME/gnome-boxes/-/raw/gnome-42/NEWS"
-distfiles="${GNOME_SITE}/${pkgname}/${version%%.*}/${pkgname}-${version}.tar.xz"
-checksum=56eff7faf8300faa1ce14f809f8ebc2a7bb4d915afc7b12737129791605b60d3
+#changelog="https://gitlab.gnome.org/GNOME/gnome-boxes/-/raw/gnome-43/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/gnome-boxes/-/raw/main/NEWS"
+distfiles="${GNOME_SITE}/gnome-boxes/${version%%.*}/gnome-boxes-${version}.tar.xz"
+checksum=574505096414c820b808ecd0f71e2d19a9332351e12a3dd826f762e432bf6b26

From 45fd1ca2cc41bdeacece167d7193691f500f98a1 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sat, 22 Oct 2022 21:57:06 +0200
Subject: [PATCH 7/7] remmina: use libsoup3

---
 srcpkgs/remmina/patches/libsoup3.patch | 452 +++++++++++++++++++++++++
 srcpkgs/remmina/template               |   6 +-
 2 files changed, 455 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/remmina/patches/libsoup3.patch

diff --git a/srcpkgs/remmina/patches/libsoup3.patch b/srcpkgs/remmina/patches/libsoup3.patch
new file mode 100644
index 000000000000..9f937275c492
--- /dev/null
+++ b/srcpkgs/remmina/patches/libsoup3.patch
@@ -0,0 +1,452 @@
+From edbaeb1b588edc0e969b0eedd731758aad369391 Mon Sep 17 00:00:00 2001
+From: "Antenore Gatta (tmow)" <antenore@simbiosi.org>
+Date: Mon, 3 Oct 2022 17:38:35 +0000
+Subject: [PATCH] Multiple changes to build and run with libsoup 3.0
+
+---
+ ...{FindLIBSOUP24.cmake => FindLIBSOUP.cmake} |  27 +--
+ cmake/FindWEBKIT2GTK.cmake                    |   6 +-
+ plugins/www/CMakeLists.txt                    |  10 +-
+ src/CMakeLists.txt                            |   8 +-
+ src/rmnews.c                                  | 216 +++++++++++++-----
+ 8 files changed, 323 insertions(+), 164 deletions(-)
+ rename cmake/{FindLIBSOUP24.cmake => FindLIBSOUP.cmake} (55%)
+
+diff --git a/cmake/FindLIBSOUP24.cmake b/cmake/FindLIBSOUP.cmake
+similarity index 55%
+rename from cmake/FindLIBSOUP24.cmake
+rename to cmake/FindLIBSOUP.cmake
+index 96ec22239..23cc06ff6 100644
+--- a/cmake/FindLIBSOUP24.cmake
++++ b/cmake/FindLIBSOUP.cmake
+@@ -1,7 +1,5 @@
+ # Remmina - The GTK+ Remote Desktop Client
+ #
+-# Copyright (C) 2011 Marc-Andre Moreau
+-# Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
+ # Copyright (C) 2016-2022 Antenore Gatta, Giovanni Panozzo
+ #
+ # This program is free software; you can redistribute it and/or modify
+@@ -21,26 +19,25 @@
+ 
+ include(FindPackageHandleStandardArgs)
+ 
+-pkg_check_modules(PC_LIBSOUP24 libsoup-2.4)
++pkg_search_module(PC_LIBSOUP REQUIRED libsoup-3.0 libsoup-2.4)
+ 
+-
+-find_path(LIBSOUP24_INCLUDE_DIR NAMES libsoup/soup.h
+-	HINTS ${PC_LIBSOUP24_INCLUDEDIR} ${PC_LIBSOUP24_INCLUDE_DIRS}
++find_path(LIBSOUP_INCLUDE_DIR NAMES libsoup/soup.h
++	HINTS ${PC_LIBSOUP_INCLUDEDIR} ${PC_LIBSOUP_INCLUDE_DIRS}
+ )
+ 
+-find_library(LIBSOUP24_LIBRARY
+-	NAMES soup-2.4
+-	HINTS ${PC_LIBSOUP24_LIBDIR} ${PC_LIBSOUP24_LIBRARY_DIRS}
++find_library(LIBSOUP_LIBRARY
++	NAMES soup soup-3.0 soup-2.4
++	HINTS ${PC_LIBSOUP_LIBDIR} ${PC_LIBSOUP_LIBRARY_DIRS}
+ 	)
+ 
+-if (LIBSOUP24_INCLUDE_DIR AND LIBSOUP24_LIBRARY)
+-	find_package_handle_standard_args(LIBSOUP24 DEFAULT_MSG LIBSOUP24_LIBRARY LIBSOUP24_INCLUDE_DIR)
++if (LIBSOUP_INCLUDE_DIR AND LIBSOUP_LIBRARY)
++	find_package_handle_standard_args(LIBSOUP DEFAULT_MSG LIBSOUP_LIBRARY LIBSOUP_INCLUDE_DIR)
+ endif()
+ 
+-if (LIBSOUP24_FOUND)
+-	set(LIBSOUP24_LIBRARIES ${LIBSOUP24_LIBRARY})
+-	set(LIBSOUP24_INCLUDE_DIRS ${LIBSOUP24_INCLUDE_DIR})
++if (LIBSOUP_FOUND)
++	set(LIBSOUP_LIBRARIES ${LIBSOUP_LIBRARY})
++	set(LIBSOUP_INCLUDE_DIRS ${LIBSOUP_INCLUDE_DIR})
+ endif()
+ 
+-mark_as_advanced(LIBSOUP24_INCLUDE_DIR LIBSOUP24_LIBRARY)
++mark_as_advanced(LIBSOUP_INCLUDE_DIR LIBSOUP_LIBRARY)
+ 
+diff --git a/cmake/FindWEBKIT2GTK.cmake b/cmake/FindWEBKIT2GTK.cmake
+index 391fdfe9d..0af554cff 100644
+--- a/cmake/FindWEBKIT2GTK.cmake
++++ b/cmake/FindWEBKIT2GTK.cmake
+@@ -33,7 +33,8 @@
+ find_package(PkgConfig)
+ 
+ if(PKG_CONFIG_FOUND)
+-    pkg_check_modules(_WEBKIT2GTK webkit2gtk-4.0)
++    #pkg_check_modules(_WEBKIT2GTK webkit2gtk-4.0)
++    pkg_search_module(_WEBKIT2GTK webkit2gtk-4.1 webkit2gtk-4.0)
+ endif(PKG_CONFIG_FOUND)
+ 
+ set(WEBKIT2GTK_DEFINITIONS ${_WEBKIT2GTK_CFLAGS_OTHER})
+@@ -42,7 +43,8 @@ find_path(WEBKIT2GTK_INCLUDE_DIR NAMES webkit2/webkit2.h
+     HINTS ${_WEBKIT2GTK_INCLUDEDIR} ${_WEBKIT2GTK_INCLUDE_DIRS}
+ )
+ 
+-find_library(WEBKIT2GTK_LIB webkit2gtk-4.0
++find_library(WEBKIT2GTK_LIB
++    NAMES webkit2gtk-4.1 webkit2gtk-4.0
+     HINTS
+     ${_WEBKIT2GTK_LIBDIR}
+     ${_WEBKIT2GTK_LIBRARY_DIRS}
+diff --git a/plugins/www/CMakeLists.txt b/plugins/www/CMakeLists.txt
+index cd1ab3a32..39f44a0c7 100644
+--- a/plugins/www/CMakeLists.txt
++++ b/plugins/www/CMakeLists.txt
+@@ -45,12 +45,12 @@ set_target_properties(remmina-plugin-www PROPERTIES NO_SONAME 1)
+ 
+ add_definitions(${WEBKIT2GTK_CFLAGS_OTHER})
+ 
+-find_required_package(LIBSOUP24)
+-if(LIBSOUP24_FOUND)
+-    include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${WEBKIT2GTK_INCLUDE_DIRS} ${LIBSOUP24_INCLUDE_DIRS})
+-    target_link_libraries(remmina-plugin-www ${REMMINA_COMMON_LIBRARIES} ${LIBSOUP24_LIBRARIES} ${WEBKIT2GTK_LIBRARIES})
++find_required_package(LIBSOUP)
++if(LIBSOUP_FOUND)
++    include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${WEBKIT2GTK_INCLUDE_DIRS} ${LIBSOUP_INCLUDE_DIRS})
++    target_link_libraries(remmina-plugin-www ${REMMINA_COMMON_LIBRARIES} ${LIBSOUP_LIBRARIES} ${WEBKIT2GTK_LIBRARIES})
+ else()
+-    message(FATAL_ERROR "libsoup 2.4 library not found")
++    message(FATAL_ERROR "libsoup library not found")
+ endif()
+ 
+ install(TARGETS remmina-plugin-www DESTINATION ${REMMINA_PLUGINDIR})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 8d7ddadbb..eb1fec2e0 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -255,10 +255,10 @@ if(GTK3_FOUND)
+   else()
+     message(FATAL_ERROR "json-glib library not found")
+   endif()
+-  find_required_package(LIBSOUP24)
+-  if(LIBSOUP24_FOUND)
+-    include_directories(${LIBSOUP24_INCLUDE_DIRS})
+-    target_link_libraries(remmina ${LIBSOUP24_LIBRARIES})
++  find_required_package(LIBSOUP)
++  if(LIBSOUP_FOUND)
++    include_directories(${LIBSOUP_INCLUDE_DIRS})
++    target_link_libraries(remmina ${LIBSOUP_LIBRARIES})
+   else()
+     message(FATAL_ERROR "libsoup 2.4 library not found")
+   endif()
+diff --git a/src/rmnews.c b/src/rmnews.c
+index d4ae81d22..f44af8704 100644
+--- a/src/rmnews.c
++++ b/src/rmnews.c
+@@ -74,6 +74,12 @@ static RemminaNewsDialog *rmnews_news_dialog;
+ #define GET_OBJ(object_name) gtk_builder_get_object(rmnews_news_dialog->builder, object_name)
+ 
+ static SoupSession *session;
++
++#if SOUP_MAJOR_VERSION < 3
++#define soup_message_get_status(message) message->status_code
++#define soup_message_get_response_headers(message) message->response_headers
++#endif
++
+ static const gchar *output_file_path = NULL;
+ 
+ static
+@@ -96,6 +102,23 @@ gint eweekdays[7] = {
+ 	604800
+ };
+ 
++
++#if SOUP_CHECK_VERSION (2, 99, 2)
++static void rmnews_on_stream_splice (GObject *source, GAsyncResult *result, gpointer user_data)
++{
++        GError *error = NULL;
++        g_output_stream_splice_finish (G_OUTPUT_STREAM (source),
++                                       result,
++                                       &error);
++        if (error) {
++                g_printerr ("Failed to download: %s\n", error->message);
++                g_error_free (error);
++                return;
++        }
++
++}
++#endif
++
+ void rmnews_news_switch_state_set_cb()
+ {
+ 	TRACE_CALL(__func__);
+@@ -225,71 +248,136 @@ void rmnews_show_news(GtkWindow *parent)
+ 	gtk_window_set_modal(GTK_WINDOW(rmnews_news_dialog->dialog), TRUE);
+ }
+ 
+-static void rmnews_get_url_cb(SoupSession *session, SoupMessage *msg, gpointer data)
++#if SOUP_CHECK_VERSION (2, 99, 2)
++static void rmnews_get_url_cb (GObject *source, GAsyncResult *result, gpointer user_data)
+ {
+ 	TRACE_CALL(__func__);
+ 	const char *name;
+ 	const char *header;
+-	SoupBuffer *sb;
+-	FILE *output_file = NULL;
++	GFile *output_file;
+ 	gchar *filesha = NULL;
+ 	gchar *filesha_after = NULL;
+-	GDateTime *gdt;
+-	gint64 unixts;
+ 
+-	REMMINA_DEBUG("Status code %d", msg->status_code);
++	GError *error = NULL;
++        GInputStream *in = soup_session_send_finish (SOUP_SESSION (source), result, &error);
+ 
+-	name = soup_message_get_uri(msg)->path;
++	if (error) {
++		REMMINA_DEBUG ("Failed to send request: %s", error->message);
++		g_error_free (error);
++		return;
++	}
+ 
+-	gdt = g_date_time_new_now_utc();
+-	unixts = g_date_time_to_unix(gdt);
++	GDateTime *gdt = g_date_time_new_now_utc();
++	gint64 unixts = g_date_time_to_unix(gdt);
+ 	g_date_time_unref(gdt);
+ 
+-	if (SOUP_STATUS_IS_CLIENT_ERROR(msg->status_code)) {
+-		REMMINA_DEBUG("Status 404 - Release file not available");
+-		remmina_pref.periodic_rmnews_last_get = unixts;
+-		REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
+-		REMMINA_DEBUG ("Saving preferences");
+-		remmina_pref_save();
+-		return;
+-	}
++        if (output_file_path) {
++		REMMINA_DEBUG("Calculating the SHA1 of the local file");
++		filesha = remmina_sha1_file(output_file_path);
++		REMMINA_DEBUG("SHA1 is %s", filesha);
++		if (filesha == NULL || filesha[0] == 0) filesha = "0\0";
++		REMMINA_DEBUG("Opening %s output file for writing", output_file_path);
++                GFile *output_file = g_file_new_for_commandline_arg (output_file_path);
++		GOutputStream *out = G_OUTPUT_STREAM (g_file_replace (output_file, NULL, NULL,
++							G_FILE_CREATE_REPLACE_DESTINATION, NULL, &error));
++                if (error) {
++			REMMINA_DEBUG("Failed to create \"%s\": %s", output_file_path, error->message);
++			remmina_pref.periodic_rmnews_last_get = unixts;
++			REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
++			REMMINA_DEBUG ("Saving preferences");
++			remmina_pref_save();
++			g_free(filesha); filesha = NULL;
++                        g_error_free (error);
++                        g_object_unref (in);
++                        g_object_unref (output_file);
++			g_object_unref (out);
++                        return;
++                }
++
++		/* Start downloading to the file */
++		// g_output_stream_splice_async (G_OUTPUT_STREAM (out), in,
++		// 		G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
++		// 		G_PRIORITY_DEFAULT,
++		// 		NULL,
++		// 		rmnews_on_stream_splice,
++		// NULL);
++		g_output_stream_splice (G_OUTPUT_STREAM (out), in,
++			  G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
++			  NULL,
++			  &error);
++
++		if (error) {
++			REMMINA_DEBUG ("Failed to download: %s", error->message);
++			remmina_pref.periodic_rmnews_last_get = unixts;
++			REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
++			REMMINA_DEBUG ("Saving preferences");
++			remmina_pref_save();
++			g_free(filesha); filesha = NULL;
++			g_error_free (error);
++                        g_object_unref (in);
++                        g_object_unref (output_file);
++			g_object_unref (out);
++			return;
++		}
+ 
+-	if (SOUP_STATUS_IS_SERVER_ERROR(msg->status_code)) {
+-		REMMINA_DEBUG("Server not available");
+-		remmina_pref.periodic_rmnews_last_get = unixts;
+-		REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
+-		REMMINA_DEBUG ("Saving preferences");
+-		remmina_pref_save();
+-		return;
+-	}
+ 
+-	if (SOUP_STATUS_IS_TRANSPORT_ERROR(msg->status_code)) {
+-		REMMINA_DEBUG("Transport Error");
++		filesha_after = remmina_sha1_file(output_file_path);
++
++		REMMINA_DEBUG("SHA1 after download is %s", filesha_after);
++		if (g_strcmp0(filesha, filesha_after) != 0) {
++			REMMINA_DEBUG("SHA1 differs, we show the news and reset the counter");
++			remmina_pref.periodic_rmnews_last_get = 0;
++			REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
++			REMMINA_DEBUG ("Saving preferences");
++			GtkWindow *parent = remmina_main_get_window();
++			if (!kioskmode && kioskmode == FALSE)
++			rmnews_show_news(parent);
++		} else {
++			remmina_pref.periodic_rmnews_last_get = unixts;
++		}
++		/* Increase counter with number of successful GETs */
++		remmina_pref.periodic_rmnews_get_count = remmina_pref.periodic_rmnews_get_count + 1;
++		remmina_pref_save();
++		g_free(filesha); filesha = NULL;
++		g_object_unref (out);
++	} else {
++		REMMINA_DEBUG("Cannot open output file for writing, because output_file_path is NULL");
+ 		remmina_pref.periodic_rmnews_last_get = unixts;
+ 		REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
+ 		REMMINA_DEBUG ("Saving preferences");
+ 		remmina_pref_save();
+ 		return;
+-	}
++        }
+ 
+-	if (msg->status_code == SOUP_STATUS_SSL_FAILED) {
+-		GTlsCertificateFlags flags;
++        g_object_unref (in);
+ 
+-		if (soup_message_get_https_status(msg, NULL, &flags))
+-			REMMINA_DEBUG("%s: %d %s (0x%x)\n", name, msg->status_code, msg->reason_phrase, flags);
+-		else
+-			REMMINA_DEBUG("%s: %d %s (no handshake status)\n", name, msg->status_code, msg->reason_phrase);
+-		remmina_pref.periodic_rmnews_last_get = unixts;
+-		REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
+-		REMMINA_DEBUG ("Saving preferences");
+-		remmina_pref_save();
+-		return;
+-	} else if (SOUP_STATUS_IS_TRANSPORT_ERROR(msg->status_code)) {
+-		REMMINA_DEBUG("%s: %d %s\n", name, msg->status_code, msg->reason_phrase);
+-	}
+ 
+-	if (SOUP_STATUS_IS_REDIRECTION(msg->status_code)) {
+-		header = soup_message_headers_get_one(msg->response_headers,
++}
++#else
++static void rmnews_get_url_cb(SoupSession *session, SoupMessage *msg, gpointer data)
++{
++	TRACE_CALL(__func__);
++	const char *name;
++	const char *header;
++	g_autoptr(SoupBuffer) sb;
++	FILE *output_file = NULL;
++	gchar *filesha = NULL;
++	gchar *filesha_after = NULL;
++	GDateTime *gdt;
++	gint64 unixts;
++	gint status;
++
++	status = soup_message_get_status(msg);
++	REMMINA_DEBUG("Status code %d", status);
++
++	name = soup_message_get_uri(msg)->path;
++
++	gdt = g_date_time_new_now_utc();
++	unixts = g_date_time_to_unix(gdt);
++	g_date_time_unref(gdt);
++
++	if (SOUP_STATUS_IS_REDIRECTION(status)) {
++		header = soup_message_headers_get_one(soup_message_get_response_headers(msg),
+ 						      "Location");
+ 		REMMINA_DEBUG("Redirection detected");
+ 		if (header) {
+@@ -309,18 +397,25 @@ static void rmnews_get_url_cb(SoupSession *session, SoupMessage *msg, gpointer d
+ 		REMMINA_DEBUG ("Saving preferences");
+ 		remmina_pref_save();
+ 		return;
+-	} else if (SOUP_STATUS_IS_SUCCESSFUL(msg->status_code)) {
++	}
++
++	if (!SOUP_STATUS_IS_SUCCESSFUL(status)) {
++		REMMINA_DEBUG ("Could not access %s: %s", name , soup_status_get_phrase(status));
++		REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
++		REMMINA_DEBUG ("Saving preferences");
++		remmina_pref_save();
++		return;
++	} else {
+ 		REMMINA_DEBUG("Status 200");
+ 		if (output_file_path) {
+ 			REMMINA_DEBUG("Calculating the SHA1 of the local file");
+ 			filesha = remmina_sha1_file(output_file_path);
+ 			REMMINA_DEBUG("SHA1 is %s", filesha);
+-			if (filesha == NULL || filesha[0] == 0)
+-				filesha = "0\0";
++			if (filesha == NULL || filesha[0] == 0) filesha = "0\0";
+ 			REMMINA_DEBUG("Opening %s output file for writing", output_file_path);
+ 			output_file = fopen(output_file_path, "w");
+ 			if (!output_file) {
+-				g_printerr("Error trying to create file %s.\n", output_file_path);
++				REMMINA_DEBUG("Error trying to create file %s.", output_file_path);
+ 				remmina_pref.periodic_rmnews_last_get = unixts;
+ 				REMMINA_DEBUG ("periodic_rmnews_last_get set to %ld", remmina_pref.periodic_rmnews_last_get);
+ 				REMMINA_DEBUG ("Saving preferences");
+@@ -336,8 +431,6 @@ static void rmnews_get_url_cb(SoupSession *session, SoupMessage *msg, gpointer d
+ 			remmina_pref_save();
+ 			return;
+ 		}
+-
+-
+ 		sb = soup_message_body_flatten(msg->response_body);
+ 		if (output_file) {
+ 			fwrite(sb->data, 1, sb->length, output_file);
+@@ -364,8 +457,10 @@ static void rmnews_get_url_cb(SoupSession *session, SoupMessage *msg, gpointer d
+ 			g_free(filesha); filesha = NULL;
+ 		}
+ 	}
++
+ 	g_object_unref(msg);
+ }
++#endif
+ 
+ /**
+  * Try to get a unique system+user ID to identify this remmina user
+@@ -417,8 +512,16 @@ void rmnews_get_url(const char *url)
+ 
+ 	REMMINA_DEBUG("Fetching %s", url);
+ 
++#if SOUP_CHECK_VERSION (2, 99, 2)
++	// Use soup_session_send_async or soup_session_send_and_read_async
++	soup_session_send_async ( session, msg, G_PRIORITY_DEFAULT,
++			NULL,			// cancellable
++			rmnews_get_url_cb,	// callback
++			NULL);			// user_data
++#else
+ 	g_object_ref(msg);
+ 	soup_session_queue_message(session, msg, rmnews_get_url_cb, NULL);
++#endif
+ }
+ 
+ void rmnews_get_news()
+@@ -466,14 +569,25 @@ void rmnews_get_news()
+ 	}
+ 
+ 	REMMINA_DEBUG("Gathering news");
++	/* Build the session with all of the features we need */
++	session = soup_session_new_with_options ("user-agent", "get ",
++                                                 "accept-language-auto", TRUE,
++                                                 "timeout", 15,
++                                                 NULL);
++
++#if SOUP_CHECK_VERSION (2, 99, 2)
++	soup_session_add_feature_by_type (session, SOUP_TYPE_COOKIE_JAR);
++	logger = soup_logger_new(SOUP_LOGGER_LOG_NONE);
++#else
+ 	session = g_object_new(SOUP_TYPE_SESSION,
+ 			       SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_CONTENT_DECODER,
+ 			       SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_COOKIE_JAR,
+ 			       SOUP_SESSION_USER_AGENT, "get ",
+ 			       SOUP_SESSION_ACCEPT_LANGUAGE_AUTO, TRUE,
+ 			       NULL);
+-	/* TODO: Catch log level and set SOUP_LOGGER_LOG_MINIMAL or more */
+ 	logger = soup_logger_new(SOUP_LOGGER_LOG_NONE, -1);
++#endif
++	/* TODO: Catch log level and set SOUP_LOGGER_LOG_MINIMAL or more */
+ 	soup_session_add_feature(session, SOUP_SESSION_FEATURE(logger));
+ 	g_object_unref(logger);
+ 
+-- 
+GitLab
+
diff --git a/srcpkgs/remmina/template b/srcpkgs/remmina/template
index cae838c694ca..cc99b1a696b5 100644
--- a/srcpkgs/remmina/template
+++ b/srcpkgs/remmina/template
@@ -1,7 +1,7 @@
 # Template file for 'remmina'
 pkgname=remmina
 version=1.4.27
-revision=1
+revision=2
 wrksrc="Remmina-v${version}"
 build_style=cmake
 configure_args="-DWITH_APPINDICATOR=OFF -DCMAKE_USE_PTHREADS_INIT=ON"
@@ -9,10 +9,10 @@ hostmakedepends="glib-devel intltool pkg-config shared-mime-info"
 makedepends="avahi-glib-libs-devel avahi-ui-libs-devel freerdp-devel
  gobject-introspection gstreamermm-devel json-glib-devel
  libgcrypt-devel libgnome-keyring-devel liblz4-devel libsasl-devel
- libsecret-devel libsodium-devel libsoup-devel libssh-devel libva-devel
+ libsecret-devel libsodium-devel libsoup3-devel libssh-devel libva-devel
  libvncserver-devel libxkbfile-devel opus-devel phodav-devel
  spice-gtk-devel spice-protocol telepathy-glib-devel usbredir-devel
- vte3-devel libappindicator-devel webkit2gtk-devel python3-devel"
+ vte3-devel libappindicator-devel libwebkit2gtk41-devel python3-devel"
 depends="desktop-file-utils hicolor-icon-theme"
 short_desc="Remote desktop client written in GTK+"
 maintainer="Frank Steinborn <steinex@nognu.de>"

  parent reply	other threads:[~2022-10-22 20:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 15:42 [PR PATCH] " paper42
2022-10-22 13:38 ` [PR PATCH] [Updated] " paper42
2022-10-22 20:06 ` paper42
2022-10-22 20:14 ` paper42 [this message]
2022-10-22 20:33 ` paper42
2022-10-26  8:52 ` paper42
2022-10-26 12:55 ` [PR PATCH] [Merged]: " paper42

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221022201436.XdejHUTEsJ61jbRHLSPQ96jZFthWslOlC-1zkcOnF1Y@z \
    --to=paper42@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).