From a956c5d5bd089230efa7a0ac6f33b0fdb0f87129ae4fe106cdcd73491e6dc3f8 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 30 Apr 2019 08:57:19 +0000 Subject: [PATCH] Accepting request 699563 from home:wolfi323:test - Add Correctly-show-mem-size-over-4GiB-on-32bit.patch to fix wrong display of RAM size on a 32bit system if there is more than 4 GiB (boo#1131826, kde#406351) OBS-URL: https://build.opensuse.org/request/show/699563 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kinfocenter5?expand=0&rev=230 --- ...tly-show-mem-size-over-4GiB-on-32bit.patch | 29 +++++++++++++++++++ kinfocenter5.changes | 7 +++++ kinfocenter5.spec | 4 ++- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Correctly-show-mem-size-over-4GiB-on-32bit.patch diff --git a/Correctly-show-mem-size-over-4GiB-on-32bit.patch b/Correctly-show-mem-size-over-4GiB-on-32bit.patch new file mode 100644 index 0000000..c7352ab --- /dev/null +++ b/Correctly-show-mem-size-over-4GiB-on-32bit.patch @@ -0,0 +1,29 @@ +From 10d60170eaa46c3e4233c4eef966418d0065754d Mon Sep 17 00:00:00 2001 +From: Christoph Feck +Date: Tue, 30 Apr 2019 00:55:12 +0200 +Subject: Correctly show memory sizes > 4 GiB on 32 bit Linux + +BUG: 406351 +FIXED-IN: 5.16.0 + +Differential Revision: https://phabricator.kde.org/D20828 +--- + Modules/about-distro/src/Module.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Modules/about-distro/src/Module.cpp b/Modules/about-distro/src/Module.cpp +index 56358cd..b4bc67e 100644 +--- a/Modules/about-distro/src/Module.cpp ++++ b/Modules/about-distro/src/Module.cpp +@@ -56,7 +56,7 @@ static qlonglong calculateTotalRam() + struct sysinfo info; + if (sysinfo(&info) == 0) + // manpage "sizes are given as multiples of mem_unit bytes" +- ret = info.totalram * info.mem_unit; ++ ret = qlonglong(info.totalram) * info.mem_unit; + #elif defined(Q_OS_FREEBSD) + /* Stuff for sysctl */ + size_t len; +-- +cgit v1.1 + diff --git a/kinfocenter5.changes b/kinfocenter5.changes index 45929dc..8895515 100644 --- a/kinfocenter5.changes +++ b/kinfocenter5.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 30 05:15:51 UTC 2019 - wbauer@tmo.at + +- Add Correctly-show-mem-size-over-4GiB-on-32bit.patch to fix wrong + display of RAM size on a 32bit system if there is more than 4 GiB + (boo#1131826, kde#406351) + ------------------------------------------------------------------- Tue Apr 2 12:40:57 UTC 2019 - fabian@ritter-vogt.de diff --git a/kinfocenter5.spec b/kinfocenter5.spec index cf886bb..99dc649 100644 --- a/kinfocenter5.spec +++ b/kinfocenter5.spec @@ -37,6 +37,8 @@ Source2: plasma.keyring %endif # PATCH-FIX-OPENSUSE plasma-session-name.patch Patch0: plasma-session-name.patch +# PATCH-FIX-UPSTREAM +Patch1: Correctly-show-mem-size-over-4GiB-on-32bit.patch BuildRequires: extra-cmake-modules >= 1.2.0 BuildRequires: kf5-filesystem BuildRequires: libraw1394-devel @@ -86,7 +88,7 @@ KDE Utility that provides information about a computer system. %lang_package %prep %setup -q -n kinfocenter-%{version} -%patch0 -p1 +%autopatch -p1 %build %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}