Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rpi-imager for openSUSE:Factory 
checked in at 2022-03-17 17:02:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpi-imager (Old)
 and      /work/SRC/openSUSE:Factory/.rpi-imager.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rpi-imager"

Thu Mar 17 17:02:04 2022 rev:2 rq:962457 version:1.7.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rpi-imager/rpi-imager.changes    2021-09-06 
15:57:58.629295937 +0200
+++ /work/SRC/openSUSE:Factory/.rpi-imager.new.25692/rpi-imager.changes 
2022-03-17 17:02:31.809732734 +0100
@@ -1,0 +2,6 @@
+Mon Feb 14 17:02:14 UTC 2022 - Ludwig Nussel <lnus...@suse.de>
+
+- new version 1.7.1
+- disable telemetry and auto updates (rpi-imager-noupdates.diff)
+
+-------------------------------------------------------------------

Old:
----
  rpi-imager-1.6.2.tar.gz

New:
----
  rpi-imager-1.7.1.tar.gz
  rpi-imager-noupdates.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rpi-imager.spec ++++++
--- /var/tmp/diff_new_pack.4m4bpr/_old  2022-03-17 17:02:32.793733487 +0100
+++ /var/tmp/diff_new_pack.4m4bpr/_new  2022-03-17 17:02:32.797733490 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rpi-imager
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,22 +17,25 @@
 
 
 Name:           rpi-imager
-Version:        1.6.2
+Version:        1.7.1
 Release:        0
 Summary:        Raspberry Pi Imaging Utility
 License:        Apache-2.0
 Group:          Hardware/Other
 URL:            https://github.com/raspberrypi/rpi-imager
 Source:         
https://github.com/raspberrypi/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# https://github.com/raspberrypi/rpi-imager/pull/362
+Patch:          rpi-imager-noupdates.diff
+BuildRequires:  cmake
 BuildRequires:  gcc
 BuildRequires:  gcc-c++
 BuildRequires:  git
 BuildRequires:  libqt5-qtquickcontrols2
 BuildRequires:  openssl-devel
 BuildRequires:  pkgconfig
+BuildRequires:  update-desktop-files
 BuildRequires:  util-linux-systemd
 BuildRequires:  cmake(Qt5LinguistTools)
-BuildRequires:  cmake
 BuildRequires:  pkgconfig(Qt5Concurrent)
 BuildRequires:  pkgconfig(Qt5DBus)
 BuildRequires:  pkgconfig(Qt5Qml)
@@ -42,7 +45,6 @@
 BuildRequires:  pkgconfig(Qt5Svg)
 BuildRequires:  pkgconfig(libarchive)
 BuildRequires:  pkgconfig(libcurl)
-BuildRequires:  update-desktop-files
 
 %description
 
@@ -51,10 +53,10 @@
 Download and install Raspberry Pi Imager to a computer with an SD card reader. 
Put the SD card you'll use with your Raspberry Pi into the reader and run 
Raspberry Pi Imager.
 
 %prep
-%setup -q
+%autosetup
 
 %build
-%cmake .
+%cmake . -DENABLE_CHECK_VERSION=0 -DENABLE_TELEMETRY=0
 %cmake_build 
 
 %install

++++++ rpi-imager-1.6.2.tar.gz -> rpi-imager-1.7.1.tar.gz ++++++
/work/SRC/openSUSE:Factory/rpi-imager/rpi-imager-1.6.2.tar.gz 
/work/SRC/openSUSE:Factory/.rpi-imager.new.25692/rpi-imager-1.7.1.tar.gz 
differ: char 12, line 1

++++++ rpi-imager-noupdates.diff ++++++
>From 66a7902d13f162965e7215e74dd3dc84b9718108 Mon Sep 17 00:00:00 2001
From: Ludwig Nussel <ludwig.nus...@suse.de>
Date: Mon, 14 Feb 2022 15:01:32 +0100
Subject: [PATCH] Add compile time options for telemetry and updates

---
 CMakeLists.txt  | 15 +++++++++++++++
 config.h        |  1 -
 imagewriter.cpp |  2 ++
 main.qml        |  2 +-
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c560e91..e885d30 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,9 @@ if (APPLE)
 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "" FORCE)
 endif()
 
+OPTION (ENABLE_CHECK_VERSION "Check for version updates" ON)
+OPTION (ENABLE_TELEMETRY "Enable sending telemetry" ON)
+
 project(rpi-imager LANGUAGES CXX C)
 set(IMAGER_VERSION_MAJOR 1)
 set(IMAGER_VERSION_MINOR 7)
@@ -107,6 +110,18 @@ else()
     message(STATUS "LTO not supported: <${ipoerror}>")
 endif()
 
+if(ENABLE_TELEMETRY)
+    add_definitions(-DTELEMETRY_ENABLED_DEFAULT=true)
+else()
+    add_definitions(-DTELEMETRY_ENABLED_DEFAULT=false)
+endif()
+
+if(ENABLE_CHECK_VERSION)
+    add_definitions(-DCHECK_VERSION_DEFAULT=true)
+else()
+    add_definitions(-DCHECK_VERSION_DEFAULT=false)
+endif()
+
 # Because dependencies are typically not available by default on Windows, 
build bundled code
 if (WIN32)
     # Target Windows 7 (needed for drivelist module)
diff --git a/config.h b/config.h
index 75a4110..7262339 100644
--- a/config.h
+++ b/config.h
@@ -15,7 +15,6 @@
 
 /* Phone home the name of images downloaded for image popularity ranking */
 #define TELEMETRY_URL                     
"https://rpi-imager-stats.raspberrypi.com/downloads";
-#define TELEMETRY_ENABLED_DEFAULT         true
 
 /* Hash algorithm for verifying (uncompressed image) checksum */
 #define OSLIST_HASH_ALGORITHM             QCryptographicHash::Sha256
diff --git a/imagewriter.cpp b/imagewriter.cpp
index a88dfdb..b7f4cb2 100644
--- a/imagewriter.cpp
+++ b/imagewriter.cpp
@@ -1006,6 +1006,8 @@ bool ImageWriter::getBoolSetting(const QString &key)
         return _settings.value(key, TELEMETRY_ENABLED_DEFAULT).toBool();
     else if (key == "eject")
         return _settings.value(key, true).toBool();
+    else if (key == "check_version")
+        return _settings.value(key, CHECK_VERSION_DEFAULT).toBool();
     else
         return _settings.value(key).toBool();
 }
diff --git a/main.qml b/main.qml
index 5046c3f..aef71ed 100644
--- a/main.qml
+++ b/main.qml
@@ -1160,7 +1160,7 @@ ApplicationWindow {
 
             if ("imager" in o) {
                 var imager = o["imager"]
-                if ("latest_version" in imager && "url" in imager) {
+                if (imageWriter.getBoolSetting("check_version") && 
"latest_version" in imager && "url" in imager) {
                     if (!imageWriter.isEmbeddedMode() && 
imageWriter.isVersionNewer(imager["latest_version"])) {
                         updatepopup.url = imager["url"]
                         updatepopup.openPopup()
-- 
2.34.1

Reply via email to