From ab308784264c0e30ed0e5c049e53dbde999a8934b3d3733b72f91486cd9ac6ab Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 4 Jul 2023 08:11:10 +0000 Subject: [PATCH 1/2] Accepting request 1096027 from home:badshah400:branches:network * Add nextcloud-fix-HiDPI-window-size.patch -- Fix huge sized windows for nextcloud client settings and crash-reporter on HiDPI systems. * Set SOURCE_DATE_EPOCH from the last modified time of source files to avoid non-reproducible builds due to __DATE__/__TIME__; this replaces nextcloud-client-remove-datetime.patch which is therefore dropped. Requires cmake >= 3.8.0. Using SOURCE_DATE_EPOCH seems to be a better solution than the patch as this still preserves the date and time shown on the Settings window and could prove useful for debugging upstream. On the contrary, the patch simply removed __DATE__/__TIME__ from the sources and was not going to be accepted by upstream anyway. OBS-URL: https://build.opensuse.org/request/show/1096027 OBS-URL: https://build.opensuse.org/package/show/network/nextcloud-desktop?expand=0&rev=108 --- nextcloud-desktop-remove-datetime.patch | 28 ------------------------- nextcloud-desktop.changes | 16 ++++++++++++++ nextcloud-desktop.spec | 9 ++++---- nextcloud-fix-HiDPI-window-size.patch | 27 ++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 32 deletions(-) delete mode 100644 nextcloud-desktop-remove-datetime.patch create mode 100644 nextcloud-fix-HiDPI-window-size.patch diff --git a/nextcloud-desktop-remove-datetime.patch b/nextcloud-desktop-remove-datetime.patch deleted file mode 100644 index 76d73d0..0000000 --- a/nextcloud-desktop-remove-datetime.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -burNE desktop-3.0.0.orig/doc/conf.py desktop-3.0.0/doc/conf.py ---- desktop-3.0.0.orig/doc/conf.py 2020-08-21 22:36:32.434056247 +0200 -+++ desktop-3.0.0/doc/conf.py 2020-08-21 22:36:57.345005233 +0200 -@@ -124,7 +124,7 @@ - - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. --html_last_updated_fmt = '%b %d, %Y' -+#html_last_updated_fmt = '%b %d, %Y' - - # If true, SmartyPants will be used to convert quotes and dashes to - # typographically correct entities. -diff -burNE desktop-3.0.0.orig/src/libsync/theme.cpp desktop-3.0.0/src/libsync/theme.cpp ---- desktop-3.0.0.orig/src/libsync/theme.cpp 2020-08-21 22:36:34.789956849 +0200 -+++ desktop-3.0.0/src/libsync/theme.cpp 2020-08-21 22:36:57.349005064 +0200 -@@ -338,11 +338,9 @@ - const QString gitSha1(QLatin1String(GIT_SHA1)); - devString = QCoreApplication::translate("nextcloudTheme::about()", - "

Built from Git revision %2" -- " on %3, %4 using Qt %5, %6

") -+ " using Qt %3, %4

") - .arg(githubPrefix + gitSha1) - .arg(gitSha1.left(6)) -- .arg(__DATE__) -- .arg(__TIME__) - .arg(qVersion()) - .arg(QSslSocket::sslLibraryVersionString()); - #endif diff --git a/nextcloud-desktop.changes b/nextcloud-desktop.changes index 5b49ec7..087db65 100644 --- a/nextcloud-desktop.changes +++ b/nextcloud-desktop.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Thu Jun 29 18:50:15 UTC 2023 - Atri Bhattacharya + +- Add nextcloud-fix-HiDPI-window-size.patch -- Fix huge sized + windows for nextcloud client settings and crash-reporter on + HiDPI systems. +- Set SOURCE_DATE_EPOCH from the last modified time of source + files to avoid non-reproducible builds due to __DATE__/__TIME__; + this replaces nextcloud-client-remove-datetime.patch which is + therefore dropped. Requires cmake >= 3.8.0. Using + SOURCE_DATE_EPOCH seems to be a better solution than the patch + as this still preserves the date and time shown on the Settings + window and could prove useful for debugging upstream. On the + contrary, the patch simply removed __DATE__/__TIME__ from the + sources and was not going to be accepted by upstream anyway. + ------------------------------------------------------------------- Fri Jun 23 07:41:23 UTC 2023 - Atri Bhattacharya diff --git a/nextcloud-desktop.spec b/nextcloud-desktop.spec index 70d0272..5faa53e 100644 --- a/nextcloud-desktop.spec +++ b/nextcloud-desktop.spec @@ -27,10 +27,10 @@ Group: Productivity/Networking/File-Sharing URL: https://nextcloud.com/ Source: https://github.com/nextcloud/desktop/archive/v%{version}/%{name}-%{version}.tar.gz Source1: sysctl-sync-inotify.conf -# PATCH-FIX-OPENSUSE nextcloud-desktop-remove-datetime.patch sor.alexei@meowr.ru -- Remove __TIME__ and __DATE__. -Patch1: nextcloud-desktop-remove-datetime.patch +# PATCH-FIX-UPSTREAM nextcloud-fix-HiDPI-window-size.patch badshah400@gmail.com -- Fix huge size of the nextcloud client settings and crash-reporter windows on HiDPI systems +Patch0: nextcloud-fix-HiDPI-window-size.patch BuildRequires: AppStream -BuildRequires: cmake >= 3.2 +BuildRequires: cmake >= 3.8.0 BuildRequires: extra-cmake-modules BuildRequires: fdupes BuildRequires: gcc-c++ @@ -201,7 +201,8 @@ This package provides Nextcloud's command-line sync utility. cp -a %{SOURCE1} sysctl-sync-inotify.conf %build - +# Set SOURCE_DATE_EPOCH to set __DATE__/__TIME__ based on tarball creation date and make build reproducible +export SOURCE_DATE_EPOCH=`date -r VERSION.cmake +"%s"` %cmake \ %if 0%{?is_opensuse} -DWITH_DOC=ON \ diff --git a/nextcloud-fix-HiDPI-window-size.patch b/nextcloud-fix-HiDPI-window-size.patch new file mode 100644 index 0000000..d887a8d --- /dev/null +++ b/nextcloud-fix-HiDPI-window-size.patch @@ -0,0 +1,27 @@ +Index: desktop-3.9.0/src/gui/main.cpp +=================================================================== +--- desktop-3.9.0.orig/src/gui/main.cpp ++++ desktop-3.9.0/src/gui/main.cpp +@@ -65,6 +65,8 @@ int main(int argc, char **argv) + + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); ++ QApplication::setHighDpiScaleFactorRoundingPolicy( ++ Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); + #ifdef Q_OS_MAC + Mac::CocoaInitializer cocoaInit; // RIIA + #endif +Index: desktop-3.9.0/src/crashreporter/main.cpp +=================================================================== +--- desktop-3.9.0.orig/src/crashreporter/main.cpp ++++ desktop-3.9.0/src/crashreporter/main.cpp +@@ -25,6 +25,8 @@ + int main(int argc, char *argv[]) + { + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); ++ QApplication::setHighDpiScaleFactorRoundingPolicy( ++ Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); + #ifdef Q_OS_WIN + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); + #endif // !Q_OS_WIN + From 205adf84b1cfcf378295bed1df68678b9d53a168d930fd6a9f455a2fe0054b86 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 5 Jul 2023 09:02:47 +0000 Subject: [PATCH 2/2] Accepting request 1096716 from home:badshah400:branches:network Fix changelog: name of patch being dropped was incorrect in previous iteration OBS-URL: https://build.opensuse.org/request/show/1096716 OBS-URL: https://build.opensuse.org/package/show/network/nextcloud-desktop?expand=0&rev=109 --- nextcloud-desktop.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud-desktop.changes b/nextcloud-desktop.changes index 087db65..dc7b8fe 100644 --- a/nextcloud-desktop.changes +++ b/nextcloud-desktop.changes @@ -6,7 +6,7 @@ Thu Jun 29 18:50:15 UTC 2023 - Atri Bhattacharya HiDPI systems. - Set SOURCE_DATE_EPOCH from the last modified time of source files to avoid non-reproducible builds due to __DATE__/__TIME__; - this replaces nextcloud-client-remove-datetime.patch which is + this replaces nextcloud-desktop-remove-datetime.patch which is therefore dropped. Requires cmake >= 3.8.0. Using SOURCE_DATE_EPOCH seems to be a better solution than the patch as this still preserves the date and time shown on the Settings