From 83baebe34e91f7b2c93cee6c5b5b4c81dbe85772 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Tue, 11 Oct 2022 09:29:55 +0100 Subject: [PATCH] Add patch: libsoup_2_and_3_support.patch --- libsoup_2_and_3_support.patch | 940 ++++++++++++++++++++++++++++++++++ remmina.spec | 6 +- 2 files changed, 945 insertions(+), 1 deletion(-) create mode 100644 libsoup_2_and_3_support.patch diff --git a/libsoup_2_and_3_support.patch b/libsoup_2_and_3_support.patch new file mode 100644 index 0000000..7319935 --- /dev/null +++ b/libsoup_2_and_3_support.patch @@ -0,0 +1,940 @@ +From edbaeb1b588edc0e969b0eedd731758aad369391 Mon Sep 17 00:00:00 2001 +From: "Antenore Gatta (tmow)" +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 +- + flatpak/org.remmina.Remmina-local.json | 93 ++++---- + flatpak/org.remmina.Remmina.json | 67 +++--- + flatpak/requirements/webkit.json | 60 +++++ + 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%) + create mode 100644 flatpak/requirements/webkit.json + +diff --git a/cmake/FindLIBSOUP24.cmake b/cmake/FindLIBSOUP.cmake +similarity index 55% +rename from cmake/FindLIBSOUP24.cmake +rename to cmake/FindLIBSOUP.cmake +index 96ec22239947294d08ee8c6f17f416e53a47b8a3..23cc06ff632a62adf64c80a0b2256476aa504857 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 391fdfe9dc7b4bfc8d38bdd0845dae5ba789777d..0af554cff4ed269dc3badc8a335d7b7d5809e5ae 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/flatpak/org.remmina.Remmina-local.json b/flatpak/org.remmina.Remmina-local.json +index 6bf4a0aad8156f620f1c3ac5926c91c4ed1e1bde..b2da8f60f5cd92dec26deb0918ddbe5fff3a4d3e 100644 +--- a/flatpak/org.remmina.Remmina-local.json ++++ b/flatpak/org.remmina.Remmina-local.json +@@ -1,7 +1,7 @@ + { + "app-id": "org.remmina.Remmina", + "runtime": "org.gnome.Platform", +- "runtime-version": "42", ++ "runtime-version": "43", + "sdk": "org.gnome.Sdk", + "command": "remmina", + "cleanup": [ +@@ -49,9 +49,9 @@ + "add-extensions": { + "org.freedesktop.Platform.ffmpeg-full": { + "directory": "lib/ffmpeg", +- "version": "21.08", ++ "version": "22.08", + "add-ld-path": ".", +- "no-autodownload": false, ++ "no-autodownload": true, + "autodelete": false + }, + "org.freedesktop.Platform.openh264": { +@@ -61,8 +61,8 @@ + } + }, + "cleanup-commands": [ +- "mkdir -p /app/lib/ffmpeg", +- "mkdir -p /app/lib/openh264" ++ "mkdir -p ${FLATPAK_DEST}/lib/ffmpeg", ++ "mkdir -p ${FLATPAK_DEST}/lib/openh264" + ], + "modules": [ + "shared-modules/intltool/intltool-0.51.json", +@@ -113,12 +113,13 @@ + "sources": [ + { + "type": "archive", +- "url": "https://xorg.freedesktop.org/archive/individual/app/xauth-1.1.1.tar.bz2", +- "sha256": "164ea0a29137b284a47b886ef2affcb0a74733bf3aad04f9b106b1a6c82ebd92", ++ "url": "https://xorg.freedesktop.org/archive/individual/app/xauth-1.1.2.tar.xz", ++ "sha256": "78ba6afd19536ced1dddb3276cba6e9555a211b468a06f95f6a97c62ff8ee200", + "x-checker-data": { + "type": "anitya", + "project-id": 5253, +- "url-template": "https://xorg.freedesktop.org/archive/individual/app/xauth-$version.tar.bz2" ++ "stable-only": true, ++ "url-template": "https://xorg.freedesktop.org/archive/individual/app/xauth-$version.tar.xz" + } + } + ] +@@ -135,8 +136,8 @@ + "sources": [ + { + "type": "archive", +- "url": "https://github.com/OpenPrinting/cups/archive/refs/tags/v2.4.1.tar.gz", +- "sha256": "df195c931349949293c832e1337527e7831e1225f567b60caf5d9c206c2bffdc", ++ "url": "https://github.com/OpenPrinting/cups/archive/refs/tags/v2.4.2.tar.gz", ++ "sha256": "7095b2977bb728ded5566a5c802866062840d6541fd027836865949a407c3682", + "x-checker-data": { + "type": "anitya", + "project-id": 380, +@@ -152,8 +153,8 @@ + "sources": [ + { + "type": "archive", +- "url": "https://download.gnome.org/sources/gtk-vnc/1.3/gtk-vnc-1.3.0.tar.xz", +- "sha256": "5faaa5823b8cbe8c0b0ba1e456c4e70c4b1ae6685c9fe81a4282d98cf00a211d", ++ "url": "https://download.gnome.org/sources/gtk-vnc/1.3/gtk-vnc-1.3.1.tar.xz", ++ "sha256": "512763ac4e0559d0158b6682ca5dd1a3bd633f082f5e4349d7158e6b5f80f1ce", + "x-checker-data": { + "type": "gnome", + "name": "gtk-vnc", +@@ -169,8 +170,8 @@ + { + "type": "git", + "url": "https://gitlab.gnome.org/GNOME/vte.git", +- "tag": "0.68.0", +- "commit": "0f438924f9f8a858b1b82434c876e31c2de180d4", ++ "tag": "0.70.0", ++ "commit": "ae4a5d7df9e32ab40ceca5e06240561e819db148", + "x-checker-data": { + "type": "git", + "tag-pattern": "^([\\d.]+)$" +@@ -252,8 +253,8 @@ + { + "type": "git", + "url": "https://github.com/LudovicRousseau/PCSC.git", +- "tag": "pcsc-1.9.0", +- "commit": "e796a0f12fbefa459bff0d25e27089615fa91f21", ++ "tag": "1.9.9", ++ "commit": "15c16c7796607b1c8a2ce253d3f536918ab26b4a", + "x-checker-data": { + "type": "git", + "tag-pattern": "^pcsc-([\\d.]+)$" +@@ -272,13 +273,14 @@ + "config-opts": [ + "-Dvapi=enabled", + "-Dwebdav=enabled", +- "-Dgtk_doc=disabled" ++ "-Dgtk_doc=disabled", ++ "-Dpolkit=disabled" + ], + "sources": [ + { + "type": "archive", +- "url": "https://www.spice-space.org/download/gtk/spice-gtk-0.40.tar.xz", +- "sha256": "23f5ff7fa80b75647ce73cda5eaf8b322f3432dbbb7f6f3a839634618adbced3", ++ "url": "https://www.spice-space.org/download/gtk/spice-gtk-0.41.tar.xz", ++ "sha256": "d8f8b5cbea9184702eeb8cc276a67d72acdb6e36e7c73349fb8445e5bca0969f", + "x-checker-data": { + "type": "anitya", + "project-id": 11576, +@@ -296,8 +298,8 @@ + "sources": [ + { + "type": "file", +- "url": "https://files.pythonhosted.org/packages/d9/41/d9cfb4410589805cd787f8a82cddd13142d9bf7449d12adf2d05a4a7d633/pyparsing-3.0.8-py3-none-any.whl", +- "sha256": "ef7b523f6356f763771559412c0d7134753f037822dad1b16945b7b846f7ad06", ++ "url": "https://files.pythonhosted.org/packages/6c/10/a7d0fa5baea8fe7b50f448ab742f26f52b80bfca85ac2be9d35cdd9a3246/pyparsing-3.0.9-py3-none-any.whl", ++ "sha256": "5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc", + "x-checker-data": { + "type": "pypi", + "name": "pyparsing", +@@ -339,8 +341,8 @@ + "sources": [ + { + "type": "archive", +- "url": "https://github.com/lz4/lz4/archive/v1.9.3/lz4-1.9.3.tar.gz", +- "sha256": "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1", ++ "url": "https://github.com/lz4/lz4/archive/v1.9.4/lz4-1.9.4.tar.gz", ++ "sha256": "0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b", + "x-checker-data": { + "type": "anitya", + "project-id": 1865, +@@ -359,15 +361,11 @@ + "/bin", + "/sbin" + ], +- "config-opts": [ +- "-Dgtk_doc=disabled", +- "-Dsystemd=disabled" +- ], + "sources": [ + { + "type": "archive", +- "url": "https://download.gnome.org/sources/phodav/2.5/phodav-2.5.tar.xz", +- "sha256": "71f0a9cd70afd4dd1412a0298331dbb8ac71c0377f52117afc15eb88dc6fb910", ++ "url": "https://download.gnome.org/sources/phodav/3.0/phodav-3.0.tar.xz", ++ "sha256": "392ec2d06d50300dcff1ef269a2a985304e29bce3520002fca29f2edc1d138d1", + "x-checker-data": { + "type": "gnome", + "name": "phodav", +@@ -412,14 +410,9 @@ + "name": "libsodium", + "sources": [ + { +- "type": "archive", +- "url": "https://github.com/jedisct1/libsodium/archive/1.0.18-RELEASE.tar.gz", +- "sha256": "b7292dd1da67a049c8e78415cd498ec138d194cfdb302e716b08d26b80fecc10", +- "x-checker-data": { +- "type": "anitya", +- "project-id": 1728, +- "url-template": "https://github.com/jedisct1/libsodium/archive/$version.tar.gz" +- } ++ "type": "git", ++ "url": "https://github.com/jedisct1/libsodium.git", ++ "commit": "7389bf7f2968be75520e932704f18f038c29e581" + } + ], + "post-install": [ +@@ -462,14 +455,9 @@ + ], + "sources": [ + { +- "type": "archive", +- "url": "https://github.com/LibVNC/libvncserver/archive/LibVNCServer-0.9.13.tar.gz", +- "sha256": "0ae5bb9175dc0a602fe85c1cf591ac47ee5247b87f2bf164c16b05f87cbfa81a", +- "x-checker-data": { +- "type": "anitya", +- "project-id": 1756, +- "url-template": "https://github.com/LibVNC/libvncserver/archive/LibVNCServer-$version.tar.gz" +- } ++ "type": "git", ++ "url": "https://github.com/LibVNC/libvncserver.git", ++ "branch": "master" + } + ] + }, +@@ -478,30 +466,32 @@ + "buildsystem": "cmake-ninja", + "cleanup": [], + "config-opts": [ ++ "-DCMAKE_VERBOSE_MAKEFILE=ON", + "-DCMAKE_BUILD_TYPE:STRING=Release", + "-DCMAKE_INSTALL_LIBDIR:PATH=lib", + "-DWITH_WAYLAND:BOOL=ON", +- "-DCHANNEL_TSMF:BOOL=ON", ++ "-DCHANNEL_TSMF:BOOL=OFF", + "-DCHANNEL_URBDRC:BOOL=ON", + "-DBUILD_TESTING:BOOL=OFF", +- "-DWITH_ICU:BOOL=ON", + "-DWITH_MANPAGES:BOOL=OFF", + "-DWITH_GSSAPI:BOOL=OFF", + "-DWITH_PCSC:BOOL=ON", ++ "-DWITH_PKCS11:BOOL=ON", ++ "-DWITH_SWSCALE:BOOL=ON", + "-DWITH_SERVER:BOOL=OFF", + "-DWITH_CUPS:BOOL=ON", + "-DWITH_FFMPEG:BOOL=ON", ++ "-DWITH_DSP_FFMPEG:BOOL=ON", + "-DWITH_OSS:BOOL=OFF", + "-DWITH_PULSE:BOOL=ON", +- "-DWITH_CHANNELS:BOOL=ON", + "-DWITH_LIBSYSTEMD:BOOL=OFF" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/FreeRDP/FreeRDP.git", +- "tag": "2.7.0", +- "commit": "40ee5d3bcc70343af6c0300d71968858c1f1948f", ++ "tag": "2.8.0", ++ "commit": "e3fc97feb512053189e276b2ca79762990bb8c4c", + "x-checker-data": { + "type": "git", + "tag-pattern": "^([\\d.]+)$" +@@ -526,7 +516,8 @@ + "-DWITH_GVNC:BOOL=ON", + "-DWITH_CUPS:BOOL=ON", + "-DWITH_PYTHONLIBS:BOOL=ON", +- "-DWITH_MANPAGES:BOOL=OFF" ++ "-DWITH_MANPAGES:BOOL=OFF", ++ "-DWITH_WWW=ON" + ], + "sources": [ + { +diff --git a/flatpak/org.remmina.Remmina.json b/flatpak/org.remmina.Remmina.json +index c044ee5ece243f3b7e5dba830f93f6e559183f56..756d3fae42af9a4493880f939a6c04a63e783b43 100644 +--- a/flatpak/org.remmina.Remmina.json ++++ b/flatpak/org.remmina.Remmina.json +@@ -1,7 +1,7 @@ + { + "app-id": "org.remmina.Remmina", + "runtime": "org.gnome.Platform", +- "runtime-version": "42", ++ "runtime-version": "43", + "sdk": "org.gnome.Sdk", + "command": "remmina", + "cleanup": [ +@@ -49,9 +49,9 @@ + "add-extensions": { + "org.freedesktop.Platform.ffmpeg-full": { + "directory": "lib/ffmpeg", +- "version": "21.08", ++ "version": "22.08", + "add-ld-path": ".", +- "no-autodownload": false, ++ "no-autodownload": true, + "autodelete": false + }, + "org.freedesktop.Platform.openh264": { +@@ -61,8 +61,8 @@ + } + }, + "cleanup-commands": [ +- "mkdir -p /app/lib/ffmpeg", +- "mkdir -p /app/lib/openh264" ++ "mkdir -p ${FLATPAK_DEST}/lib/ffmpeg", ++ "mkdir -p ${FLATPAK_DEST}/lib/openh264" + ], + "modules": [ + "shared-modules/intltool/intltool-0.51.json", +@@ -153,8 +153,8 @@ + "sources": [ + { + "type": "archive", +- "url": "https://download.gnome.org/sources/gtk-vnc/1.3/gtk-vnc-1.3.0.tar.xz", +- "sha256": "5faaa5823b8cbe8c0b0ba1e456c4e70c4b1ae6685c9fe81a4282d98cf00a211d", ++ "url": "https://download.gnome.org/sources/gtk-vnc/1.3/gtk-vnc-1.3.1.tar.xz", ++ "sha256": "512763ac4e0559d0158b6682ca5dd1a3bd633f082f5e4349d7158e6b5f80f1ce", + "x-checker-data": { + "type": "gnome", + "name": "gtk-vnc", +@@ -170,8 +170,8 @@ + { + "type": "git", + "url": "https://gitlab.gnome.org/GNOME/vte.git", +- "tag": "0.68.0", +- "commit": "0f438924f9f8a858b1b82434c876e31c2de180d4", ++ "tag": "0.70.0", ++ "commit": "ae4a5d7df9e32ab40ceca5e06240561e819db148", + "x-checker-data": { + "type": "git", + "tag-pattern": "^([\\d.]+)$" +@@ -253,8 +253,8 @@ + { + "type": "git", + "url": "https://github.com/LudovicRousseau/PCSC.git", +- "tag": "pcsc-1.9.0", +- "commit": "e796a0f12fbefa459bff0d25e27089615fa91f21", ++ "tag": "1.9.9", ++ "commit": "15c16c7796607b1c8a2ce253d3f536918ab26b4a", + "x-checker-data": { + "type": "git", + "tag-pattern": "^pcsc-([\\d.]+)$" +@@ -273,13 +273,14 @@ + "config-opts": [ + "-Dvapi=enabled", + "-Dwebdav=enabled", +- "-Dgtk_doc=disabled" ++ "-Dgtk_doc=disabled", ++ "-Dpolkit=disabled" + ], + "sources": [ + { + "type": "archive", +- "url": "https://www.spice-space.org/download/gtk/spice-gtk-0.40.tar.xz", +- "sha256": "23f5ff7fa80b75647ce73cda5eaf8b322f3432dbbb7f6f3a839634618adbced3", ++ "url": "https://www.spice-space.org/download/gtk/spice-gtk-0.41.tar.xz", ++ "sha256": "d8f8b5cbea9184702eeb8cc276a67d72acdb6e36e7c73349fb8445e5bca0969f", + "x-checker-data": { + "type": "anitya", + "project-id": 11576, +@@ -340,8 +341,8 @@ + "sources": [ + { + "type": "archive", +- "url": "https://github.com/lz4/lz4/archive/v1.9.3/lz4-1.9.3.tar.gz", +- "sha256": "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1", ++ "url": "https://github.com/lz4/lz4/archive/v1.9.4/lz4-1.9.4.tar.gz", ++ "sha256": "0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b", + "x-checker-data": { + "type": "anitya", + "project-id": 1865, +@@ -360,15 +361,11 @@ + "/bin", + "/sbin" + ], +- "config-opts": [ +- "-Dgtk_doc=disabled", +- "-Dsystemd=disabled" +- ], + "sources": [ + { + "type": "archive", +- "url": "https://download.gnome.org/sources/phodav/2.5/phodav-2.5.tar.xz", +- "sha256": "71f0a9cd70afd4dd1412a0298331dbb8ac71c0377f52117afc15eb88dc6fb910", ++ "url": "https://download.gnome.org/sources/phodav/3.0/phodav-3.0.tar.xz", ++ "sha256": "392ec2d06d50300dcff1ef269a2a985304e29bce3520002fca29f2edc1d138d1", + "x-checker-data": { + "type": "gnome", + "name": "phodav", +@@ -458,14 +455,9 @@ + ], + "sources": [ + { +- "type": "archive", +- "url": "https://github.com/LibVNC/libvncserver/archive/LibVNCServer-0.9.13.tar.gz", +- "sha256": "0ae5bb9175dc0a602fe85c1cf591ac47ee5247b87f2bf164c16b05f87cbfa81a", +- "x-checker-data": { +- "type": "anitya", +- "project-id": 1756, +- "url-template": "https://github.com/LibVNC/libvncserver/archive/LibVNCServer-$version.tar.gz" +- } ++ "type": "git", ++ "url": "https://github.com/LibVNC/libvncserver.git", ++ "branch": "master" + } + ] + }, +@@ -474,30 +466,32 @@ + "buildsystem": "cmake-ninja", + "cleanup": [], + "config-opts": [ ++ "-DCMAKE_VERBOSE_MAKEFILE=ON", + "-DCMAKE_BUILD_TYPE:STRING=Release", + "-DCMAKE_INSTALL_LIBDIR:PATH=lib", + "-DWITH_WAYLAND:BOOL=ON", +- "-DCHANNEL_TSMF:BOOL=ON", ++ "-DCHANNEL_TSMF:BOOL=OFF", + "-DCHANNEL_URBDRC:BOOL=ON", + "-DBUILD_TESTING:BOOL=OFF", +- "-DWITH_ICU:BOOL=ON", + "-DWITH_MANPAGES:BOOL=OFF", + "-DWITH_GSSAPI:BOOL=OFF", + "-DWITH_PCSC:BOOL=ON", ++ "-DWITH_PKCS11:BOOL=ON", ++ "-DWITH_SWSCALE:BOOL=ON", + "-DWITH_SERVER:BOOL=OFF", + "-DWITH_CUPS:BOOL=ON", + "-DWITH_FFMPEG:BOOL=ON", ++ "-DWITH_DSP_FFMPEG:BOOL=ON", + "-DWITH_OSS:BOOL=OFF", + "-DWITH_PULSE:BOOL=ON", +- "-DWITH_CHANNELS:BOOL=ON", + "-DWITH_LIBSYSTEMD:BOOL=OFF" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/FreeRDP/FreeRDP.git", +- "tag": "2.7.0", +- "commit": "40ee5d3bcc70343af6c0300d71968858c1f1948f", ++ "tag": "2.8.0", ++ "commit": "e3fc97feb512053189e276b2ca79762990bb8c4c", + "x-checker-data": { + "type": "git", + "tag-pattern": "^([\\d.]+)$" +@@ -522,7 +516,8 @@ + "-DWITH_GVNC:BOOL=ON", + "-DWITH_CUPS:BOOL=ON", + "-DWITH_PYTHON_LIBS:BOOL=ON", +- "-DWITH_MANPAGES:BOOL=OFF" ++ "-DWITH_MANPAGES:BOOL=OFF", ++ "-DWITH_WWW=ON" + ], + "sources": [ + { +diff --git a/flatpak/requirements/webkit.json b/flatpak/requirements/webkit.json +new file mode 100644 +index 0000000000000000000000000000000000000000..429b2dcb4f764c7294b4a6e563e1bb1509abb1b9 +--- /dev/null ++++ b/flatpak/requirements/webkit.json +@@ -0,0 +1,60 @@ ++/* ++Shared module for building and installing webkit2gtk ++ ++This file was written by hand. ++ ++File based on gfeeds: ++commit f3e8575d62b1701e885b0bda54222634130c6864 ++ ++Changes applied to this version of the file: ++* added this header ++* reformatted ++*/ ++{ ++ "name": "webkit2gtk-5", ++ "buildsystem": "cmake-ninja", ++ "config-opts": [ ++ "-DPORT=GTK", ++ "-DCMAKE_BUILD_TYPE=Release", ++ "-DCMAKE_INSTALL_PREFIX=/app", ++ "-DCMAKE_INSTALL_LIBDIR=lib", ++ "-DCMAKE_INSTALL_LIBEXECDIR=lib", ++ "-DCMAKE_SKIP_RPATH=ON", ++ "-DUSE_GTK4=ON", ++ "-DENABLE_GAMEPAD=OFF", ++ "-DENABLE_GTKDOC=OFF" ++ ], ++ "modules": [ ++ { ++ "name": "bubblewrap", ++ "buildsystem": "meson", ++ "config-opts": [], ++ "sources": [ ++ { ++ "type": "archive", ++ "url": "https://github.com/containers/bubblewrap/archive/refs/tags/v0.6.1.tar.gz", ++ "sha256": "2b21ee6d2bead1aaf7c35742e5e53b061ec6eb1644889a4379fda662b03e8121" ++ } ++ ] ++ }, ++ { ++ "name": "xdg-dbus-proxy", ++ "buildsystem": "autotools", ++ "config-opts": [], ++ "sources": [ ++ { ++ "type": "archive", ++ "url": "https://github.com/flatpak/xdg-dbus-proxy/archive/refs/tags/0.1.3.tar.gz", ++ "sha256": "a1d57f0d478bee4cc2be67e84ac6fcfe729460345d8a4fadd6555ae83b14a789" ++ } ++ ] ++ } ++ ], ++ "sources": [ ++ { ++ "type": "archive", ++ "url": "https://webkitgtk.org/releases/webkitgtk-2.36.1.tar.xz", ++ "sha256": "0149ea5fb1d20f2a9981677d45c952a047330001ea24a8dc29035239f12c0c8f" ++ } ++ ] ++} +diff --git a/plugins/www/CMakeLists.txt b/plugins/www/CMakeLists.txt +index cd1ab3a3287fe1bfaa3889912b34ec076714fca2..39f44a0c7f9c7e4ed24480b2a7d346952b27ad7b 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 8d7ddadbb06f98ccbcc7ebbaf8de7168943ce310..eb1fec2e0ab55301eb105eeba0316157ecb962c9 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 d4ae81d220ae1bc4f3036b7202e2567148238f38..f44af8704232070c8f2ee8c62c9e584f15f531e3 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); + diff --git a/remmina.spec b/remmina.spec index c9d4919..0303315 100644 --- a/remmina.spec +++ b/remmina.spec @@ -5,7 +5,7 @@ Name: remmina Version: 1.4.27 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: https://remmina.org @@ -20,6 +20,7 @@ Source1: pluginBuild-CMakeLists.txt # Patches. Patch0: various_rdp_fixes_from_upstream.patch +Patch1: libsoup_2_and_3_support.patch BuildRequires: cmake BuildRequires: cups-devel @@ -337,6 +338,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Mon Oct 10 2022 Phil Wyett - 1.4.27-6 +- Add patch: libsoup_2_and_3_support.patch + * Sat Jul 23 2022 Fedora Release Engineering - 1.4.27-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild