From 51e8c479d09e841ea914b16fe4c62618196aab55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= <ark@switnet.org>
Date: Sat, 25 Feb 2023 10:40:00 +0000
Subject: [PATCH] ring: backport experimental fixes to ring unstable.

---
 ...2eb5717b33acdf27457b11d4bc98e8cc35de.patch | 28 ++++++++
 ...96f6363a9d7425180b67b4bb83a6a801a6bd.patch | 53 +++++++++++++++
 ...f33d99d8a2521bcb4ff7d06a5b1dabb2621e.patch | 65 +++++++++++++++++++
 ...6e451022e941627c5e1eb499eb876e3ac50e.patch | 22 +++++++
 helpers/make-ring                             | 10 ++-
 5 files changed, 177 insertions(+), 1 deletion(-)
 create mode 100644 helpers/DATA/ring/debian_backport/ds1-6_01_27da2eb5717b33acdf27457b11d4bc98e8cc35de.patch
 create mode 100644 helpers/DATA/ring/debian_backport/ds1-6_02_219296f6363a9d7425180b67b4bb83a6a801a6bd.patch
 create mode 100644 helpers/DATA/ring/debian_backport/ds1-6_03_4d64f33d99d8a2521bcb4ff7d06a5b1dabb2621e.patch
 create mode 100644 helpers/DATA/ring/debian_backport/ds1-6_04_1ed26e451022e941627c5e1eb499eb876e3ac50e.patch

diff --git a/helpers/DATA/ring/debian_backport/ds1-6_01_27da2eb5717b33acdf27457b11d4bc98e8cc35de.patch b/helpers/DATA/ring/debian_backport/ds1-6_01_27da2eb5717b33acdf27457b11d4bc98e8cc35de.patch
new file mode 100644
index 00000000..91060c02
--- /dev/null
+++ b/helpers/DATA/ring/debian_backport/ds1-6_01_27da2eb5717b33acdf27457b11d4bc98e8cc35de.patch
@@ -0,0 +1,28 @@
+From 27da2eb5717b33acdf27457b11d4bc98e8cc35de Mon Sep 17 00:00:00 2001
+From: Amin Bandali <bandali@gnu.org>
+Date: Tue, 21 Feb 2023 01:08:08 -0500
+Subject: [PATCH] * debian/rules: Remove usr/lib/pkgconfig/jami.pc.
+
+We currently don't ship the Jami daemon as a library, so it doesn't
+make much sense to ship the jami.pc pkg-config file either.
+---
+ debian/changelog | 4 +++-
+ debian/rules     | 2 ++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/debian/rules b/debian/rules
+index 621d0cec..08ae06aa 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -132,6 +132,8 @@ override_dh_auto_install:
+ 	rm -rfv $(CURDIR)/debian/jami-daemon/usr/include
+ 	rm -rfv $(CURDIR)/debian/jami-daemon/usr/lib/*.a
+ 	rm -rfv $(CURDIR)/debian/jami-daemon/usr/lib/*.la
++	rm -rfv $(CURDIR)/debian/jami-daemon/usr/lib/pkgconfig
++	rm -rv  $(CURDIR)/debian/jami-daemon/usr/lib
+ # CMake files
+ 	rm -rfv $(CURDIR)/debian/jami/usr/lib/cmake
+ 
+-- 
+GitLab
+
diff --git a/helpers/DATA/ring/debian_backport/ds1-6_02_219296f6363a9d7425180b67b4bb83a6a801a6bd.patch b/helpers/DATA/ring/debian_backport/ds1-6_02_219296f6363a9d7425180b67b4bb83a6a801a6bd.patch
new file mode 100644
index 00000000..23652b91
--- /dev/null
+++ b/helpers/DATA/ring/debian_backport/ds1-6_02_219296f6363a9d7425180b67b4bb83a6a801a6bd.patch
@@ -0,0 +1,53 @@
+From 219296f6363a9d7425180b67b4bb83a6a801a6bd Mon Sep 17 00:00:00 2001
+From: Petter Reinholdtsen <pere@debian.org>
+Date: Tue, 21 Feb 2023 04:13:52 +0100
+Subject: [PATCH] Added 1000-appstream-categories.patch to fix warning from
+ appstream generator.
+
+---
+ .../patches/1000-appstream-categories.patch   | 23 +++++++++++++++++++
+ debian/patches/series                         |  1 +
+ 2 files changed, 24 insertions(+)
+ create mode 100644 debian/patches/1000-appstream-categories.patch
+
+diff --git a/debian/patches/1000-appstream-categories.patch b/debian/patches/1000-appstream-categories.patch
+new file mode 100644
+index 00000000..404f5c02
+--- /dev/null
++++ b/debian/patches/1000-appstream-categories.patch
+@@ -0,0 +1,23 @@
++Description: Remove appstream metadata categories not recognized by validator
++ The Communication and Productivity categories are not listed in the
++ XDG Menu Specification.
++Author: Petter Reinholdtsen
++Forwarded: no
++
++diff --git a/daemon/net.jami.daemon.metainfo.xml.in b/daemon/net.jami.daemon.metainfo.xml.in
++index f30a8ac6..99c70f7a 100644
++--- a/daemon/net.jami.daemon.metainfo.xml.in
+++++ b/daemon/net.jami.daemon.metainfo.xml.in
++@@ -67,12 +67,10 @@
++  <!-- https://specifications.freedesktop.org/menu-spec/latest/apas02.html -->
++  <categories>
++   <category>Chat</category>
++-  <category>Communication</category>
++   <category>FileTransfer</category>
++   <category>InstantMessaging</category>
++   <category>Network</category>
++   <category>P2P</category>
++-  <category>Productivity</category>
++  </categories>
++ 
++  <content_rating type="oars-1.1">
+diff --git a/debian/patches/series b/debian/patches/series
+index 997c9a39..ea657633 100644
+--- a/debian/patches/series
++++ b/debian/patches/series
+@@ -1,3 +1,4 @@
++1000-appstream-categories.patch
+ 2000-jsoncpp-rename.patch
+ 2010-dont-build-gnutls.patch
+ 2020-dont-build-msgpack.patch
+-- 
+GitLab
+
diff --git a/helpers/DATA/ring/debian_backport/ds1-6_03_4d64f33d99d8a2521bcb4ff7d06a5b1dabb2621e.patch b/helpers/DATA/ring/debian_backport/ds1-6_03_4d64f33d99d8a2521bcb4ff7d06a5b1dabb2621e.patch
new file mode 100644
index 00000000..1e0b40c2
--- /dev/null
+++ b/helpers/DATA/ring/debian_backport/ds1-6_03_4d64f33d99d8a2521bcb4ff7d06a5b1dabb2621e.patch
@@ -0,0 +1,65 @@
+From 4d64f33d99d8a2521bcb4ff7d06a5b1dabb2621e Mon Sep 17 00:00:00 2001
+From: Amin Bandali <bandali@gnu.org>
+Date: Mon, 20 Feb 2023 19:31:40 -0500
+Subject: [PATCH] Add missing libqt6sql6-sqlite dependency, fix some lintian
+ warnings/errors
+
+---
+ debian/changelog                | 11 +++++++++++
+ debian/control                  |  1 +
+ debian/copyright                |  8 --------
+ debian/source/lintian-overrides |  5 +++--
+ 4 files changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/debian/control b/debian/control
+index 0b486037..ac39eaa6 100644
+--- a/debian/control
++++ b/debian/control
+@@ -95,6 +95,7 @@ Architecture: any
+ Depends: ${shlibs:Depends},
+          ${misc:Depends},
+          jami-daemon (=${binary:Version}),
++         libqt6sql6-sqlite,
+          qml6-module-qt-labs-platform,
+          qml6-module-qt-labs-qmlmodels,
+          qml6-module-qt5compat-graphicaleffects,
+diff --git a/debian/copyright b/debian/copyright
+index e5b88470..59cca73f 100644
+--- a/debian/copyright
++++ b/debian/copyright
+@@ -76,13 +76,6 @@ License: Expat
+ 
+ # Jami daemon
+ 
+-Files: daemon/doc/dbus-api/tools/devhelp.xsl
+-       daemon/doc/dbus-api/tools/doc-generator.py
+-       daemon/doc/dbus-api/tools/doc-generator.xsl
+-       daemon/doc/dbus-api/tools/specparser.py
+-Copyright: 2009 Collabora Ltd.
+-License: LGPL-2.1+
+-
+ Files: daemon/compat/msvc/dlfcn.h
+        daemon/compat/msvc/dlfcn.c
+ Copyright: 2007 Ramiro Polla
+@@ -113,7 +106,6 @@ Copyright: 2003-2011 the VideoLAN team
+ License: GPL-2+
+ 
+ Files: daemon/m4/ax_cxx_compile_stdcxx.m4
+-       daemon/m4/dolt.m4
+ Copyright: 2008 Benjamin Kosnik <bkoz@redhat.com>
+            2012 Zack Weinberg <zackw@panix.com>
+            2013 Roy Stogner <roystgnr@ices.utexas.edu>
+diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
+index 0339fc0c..93f5703f 100644
+--- a/debian/source/lintian-overrides
++++ b/debian/source/lintian-overrides
+@@ -1,3 +1,4 @@
+ # The full commented source is there.
+-source-is-missing lrc/src/web-chatview/linkify.js *
+-source-is-missing lrc/src/web-chatview/jed.js *
++source-is-missing [src/libclient/web-chatview/linkify.j]
++source-is-missing [src/libclient/web-chatview/jed.js]
++source-is-missing [3rdparty/SortFilterProxyModel/docs/*.html]
+-- 
+GitLab
+
diff --git a/helpers/DATA/ring/debian_backport/ds1-6_04_1ed26e451022e941627c5e1eb499eb876e3ac50e.patch b/helpers/DATA/ring/debian_backport/ds1-6_04_1ed26e451022e941627c5e1eb499eb876e3ac50e.patch
new file mode 100644
index 00000000..757c6872
--- /dev/null
+++ b/helpers/DATA/ring/debian_backport/ds1-6_04_1ed26e451022e941627c5e1eb499eb876e3ac50e.patch
@@ -0,0 +1,22 @@
+From 1ed26e451022e941627c5e1eb499eb876e3ac50e Mon Sep 17 00:00:00 2001
+From: Petter Reinholdtsen <pere@debian.org>
+Date: Tue, 21 Feb 2023 04:14:07 +0100
+Subject: [PATCH] Fixed typo in d//source/lintian-overrides.
+
+---
+ debian/source/lintian-overrides | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
+index 93f5703f..30d220df 100644
+--- a/debian/source/lintian-overrides
++++ b/debian/source/lintian-overrides
+@@ -1,4 +1,4 @@
+ # The full commented source is there.
+-source-is-missing [src/libclient/web-chatview/linkify.j]
++source-is-missing [src/libclient/web-chatview/linkify.js]
+ source-is-missing [src/libclient/web-chatview/jed.js]
+ source-is-missing [3rdparty/SortFilterProxyModel/docs/*.html]
+-- 
+GitLab
+
diff --git a/helpers/make-ring b/helpers/make-ring
index 56d44397..b38de3ca 100644
--- a/helpers/make-ring
+++ b/helpers/make-ring
@@ -19,7 +19,7 @@
 
 EXTERNAL='deb-src http://ftp.debian.org/debian unstable main'
 REPOKEY=04EE7237B7D453EC
-VERSION=2
+VERSION=3
 
 . ./config
 
@@ -58,6 +58,14 @@ done
 # against libavutil56 (ffmpeg 4.4). Can be removed on Trisquel 12
 patch -R -p1 < $DATA/ffmpeg_time_base_frame.patch
 
+# Backport latest changes required at experimental - Remove once package
+# keep up with changes at testing or unstable release.
+for patch in $(ls -v ${DATA}/debian_backport/*.patch)
+do
+echo "Applying $patch"
+patch -Np1 < $patch
+done
+
 changelog "Backport ring/jammi to aramo from debian testing"
 
 compile
-- 
GitLab