Package: release.debian.org
User: release.debian....@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: by...@debian.org
Severity: normal

Please unblock package flameshot

I am looking forward to fixing several bugs that affect current
flameshot/0.9.0+ds1-1 in Debian Testing. These bugs include privacy breach
(automatic software update checking), crashing under some circumstances and
incorrect icon under Xfce environment. All patches are tested with
acknowledgement from upstream.

[ Reason ]
* https://bugs.debian.org/991392
Currently flameshot would check for update by querying github api every 24
hours. This functionality was previously enabled by default. A patch was added
to disable new version checking by default.

* https://bugs.debian.org/991320
Currently flameshot would crash when tray icon is disabled and new version
checking is enabled.

* https://bugs.debian.org/991216
Currently flameshot will show an incorrect icon (bulb icon instead of
flameshot's own icon) under Xfce environment.

[ Impact ]
If the new version is not in Debian 11:

* The software would query new version using internet every 24 hours by
default, which is an unwanted behavior for some users.

* The software would crash under the configuration described above. The crash
would persist unless the user manually edit configuration file to disable such
setting.

* The software would show an incorrect icon for all Xfce users.

[ Tests ]
I manually tested all 3 patches using a clean Debian Testing chroot to confirm
that the bugs are all fixed.

[ Risks ]
The risk should be minimal since patches for crash and xfce are merged in
upstream trunk. The patch for disabling automatic update check has been
verified by lamby and me (see https://bugs.debian.org/991392 ).

[ Checklist ]
  [X] all changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in testing

[ Other info ]
The new version flameshot/0.9.0+ds1-2 hasn't been uploaded onto Unstable yet.
Please let me know if I may proceed.

Please find the full debdiff in the attachment.



unblock flameshot/0.9.0+ds1-2

-- 
Regards,
Boyuan Yang

diff -Nru flameshot-0.9.0+ds1/debian/changelog flameshot-0.9.0+ds1/debian/changelog
--- flameshot-0.9.0+ds1/debian/changelog	2021-02-14 17:58:44.000000000 -0500
+++ flameshot-0.9.0+ds1/debian/changelog	2021-07-22 18:10:19.000000000 -0400
@@ -1,3 +1,18 @@
+flameshot (0.9.0+ds1-2) unstable; urgency=high
+
+  * debian/patches/0003-Disable-automatic-update-checking-by-default.patch:
+    Disable new version checking by default on new installation.
+    Users may re-enable this feature at any time in the config menu.
+    (Closes: #991392)
+  * debian/patches/0004-Fix-nullptr-reference-when-trayicon-is-disabled.patch:
+    Fix a crash when flameshot is set to disable tray icon and also
+    enable new version checking. (Closes: #991320)
+  * debian/patches/9af391b2e94b2ba21cb6af32535ed38240f695c0.patch:
+    Add upstream workaround for Xfce's incorrect icon handling.
+    (Closes: #991216)
+
+ -- Boyuan Yang <by...@debian.org>  Thu, 22 Jul 2021 18:10:19 -0400
+
 flameshot (0.9.0+ds1-1) unstable; urgency=medium
 
   * New upstream stable release.
diff -Nru flameshot-0.9.0+ds1/debian/patches/0003-Disable-automatic-update-checking-by-default.patch flameshot-0.9.0+ds1/debian/patches/0003-Disable-automatic-update-checking-by-default.patch
--- flameshot-0.9.0+ds1/debian/patches/0003-Disable-automatic-update-checking-by-default.patch	1969-12-31 19:00:00.000000000 -0500
+++ flameshot-0.9.0+ds1/debian/patches/0003-Disable-automatic-update-checking-by-default.patch	2021-07-22 18:10:19.000000000 -0400
@@ -0,0 +1,24 @@
+From: Boyuan Yang <by...@debian.org>
+Date: Thu, 22 Jul 2021 18:04:14 -0400
+Subject: Disable automatic update checking by default
+
+Forwarded: https://github.com/flameshot-org/flameshot/issues/1706
+Bug-Debian: https://bugs.debian.org/991392
+
+---
+ src/utils/confighandler.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/utils/confighandler.cpp b/src/utils/confighandler.cpp
+index 6786225..b63237f 100644
+--- a/src/utils/confighandler.cpp
++++ b/src/utils/confighandler.cpp
+@@ -298,7 +298,7 @@ void ConfigHandler::setKeepOpenAppLauncher(const bool keepOpen)
+ 
+ bool ConfigHandler::checkForUpdates()
+ {
+-    bool res = true;
++    bool res = false;
+     if (m_settings.contains(QStringLiteral("checkForUpdates"))) {
+         res = m_settings.value(QStringLiteral("checkForUpdates")).toBool();
+     }
diff -Nru flameshot-0.9.0+ds1/debian/patches/0004-Fix-nullptr-reference-when-trayicon-is-disabled.patch flameshot-0.9.0+ds1/debian/patches/0004-Fix-nullptr-reference-when-trayicon-is-disabled.patch
--- flameshot-0.9.0+ds1/debian/patches/0004-Fix-nullptr-reference-when-trayicon-is-disabled.patch	1969-12-31 19:00:00.000000000 -0500
+++ flameshot-0.9.0+ds1/debian/patches/0004-Fix-nullptr-reference-when-trayicon-is-disabled.patch	2021-07-22 18:10:19.000000000 -0400
@@ -0,0 +1,31 @@
+From: Dennis Filder <d.fil...@web.de>
+Date: Thu, 22 Jul 2021 18:05:41 -0400
+Subject: Fix nullptr reference when trayicon is disabled
+
+Fix crash when the user has disabledTrayIcon=true, but also
+with checkForUpdates=true (either explicitly or implicitly).
+
+Bug-Debian: https://bugs.debian.org/991320
+Forwarded: https://github.com/flameshot-org/flameshot/issues/1721
+Forwarded: https://github.com/flameshot-org/flameshot/issues/1730
+
+Signed-Off-By: Boyuan Yang <by...@debian.org>
+---
+ src/core/controller.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/controller.cpp b/src/core/controller.cpp
+index b92db6a..80f36a8 100644
+--- a/src/core/controller.cpp
++++ b/src/core/controller.cpp
+@@ -192,7 +192,9 @@ void Controller::handleReplyCheckUpdates(QNetworkReply* reply)
+             m_appLatestUrl = json["html_url"].toString();
+             QString newVersion =
+               tr("New version %1 is available").arg(m_appLatestVersion);
+-            m_appUpdates->setText(newVersion);
++            if (m_appUpdates != nullptr) {
++                m_appUpdates->setText(newVersion);
++            }
+             if (m_showCheckAppUpdateStatus) {
+                 sendTrayNotification(newVersion, "Flameshot");
+                 QDesktopServices::openUrl(QUrl(m_appLatestUrl));
diff -Nru flameshot-0.9.0+ds1/debian/patches/9af391b2e94b2ba21cb6af32535ed38240f695c0.patch flameshot-0.9.0+ds1/debian/patches/9af391b2e94b2ba21cb6af32535ed38240f695c0.patch
--- flameshot-0.9.0+ds1/debian/patches/9af391b2e94b2ba21cb6af32535ed38240f695c0.patch	1969-12-31 19:00:00.000000000 -0500
+++ flameshot-0.9.0+ds1/debian/patches/9af391b2e94b2ba21cb6af32535ed38240f695c0.patch	2021-07-22 18:10:19.000000000 -0400
@@ -0,0 +1,31 @@
+From 9af391b2e94b2ba21cb6af32535ed38240f695c0 Mon Sep 17 00:00:00 2001
+From: Jeremy Borgman <borgman.jer...@pm.me>
+Date: Sun, 14 Mar 2021 19:57:32 -0500
+Subject: [PATCH] force flameshot icon on info popup
+
+Applied-Upstream: https://github.com/flameshot-org/flameshot/commit/9af391b2e94b2ba21cb6af32535ed38240f695c0
+
+---
+ src/core/controller.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/controller.cpp b/src/core/controller.cpp
+index b92db6a11..d6de68979 100644
+--- a/src/core/controller.cpp
++++ b/src/core/controller.cpp
+@@ -495,13 +495,14 @@ void Controller::enableTrayIcon()
+ #endif
+ 
+     m_trayIcon->show();
++
+     if (ConfigHandler().showStartupLaunchMessage()) {
+         m_trayIcon->showMessage(
+           "Flameshot",
+           QObject::tr(
+             "Hello, I'm here! Click icon in the tray to take a screenshot or "
+             "click with a right button to see more options."),
+-          QSystemTrayIcon::Information,
++          trayIcon,
+           3000);
+     }
+ }
diff -Nru flameshot-0.9.0+ds1/debian/patches/series flameshot-0.9.0+ds1/debian/patches/series
--- flameshot-0.9.0+ds1/debian/patches/series	2021-02-14 17:58:44.000000000 -0500
+++ flameshot-0.9.0+ds1/debian/patches/series	2021-07-22 18:10:19.000000000 -0400
@@ -1,2 +1,5 @@
 0001-Use-debian-version-str-in-about-window.patch
 0002-KDE-Wayland-compat.patch
+0003-Disable-automatic-update-checking-by-default.patch
+0004-Fix-nullptr-reference-when-trayicon-is-disabled.patch
+9af391b2e94b2ba21cb6af32535ed38240f695c0.patch

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to