From 7e9d539412df10c8de6d9f392f26affcc23c7a9e54f0fd5817df7283afc6fbc9 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 23 Apr 2020 05:49:13 +0000 Subject: [PATCH] - Add patches: * htop-2.2.0-fix-linux-process-ordering.patch * htop-2.2.0-fix-option-string.patch (fixes boo#1165352) OBS-URL: https://build.opensuse.org/package/show/Base:System/htop?expand=0&rev=50 --- htop-2.2.0-fix-linux-process-ordering.patch | 13 +++++++++++++ htop-2.2.0-fix-option-string.patch | 13 +++++++++++++ htop.changes | 7 +++++++ htop.spec | 8 ++++++-- 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 htop-2.2.0-fix-linux-process-ordering.patch create mode 100644 htop-2.2.0-fix-option-string.patch diff --git a/htop-2.2.0-fix-linux-process-ordering.patch b/htop-2.2.0-fix-linux-process-ordering.patch new file mode 100644 index 0000000..0ecf7f5 --- /dev/null +++ b/htop-2.2.0-fix-linux-process-ordering.patch @@ -0,0 +1,13 @@ +Index: htop-2.2.0/linux/LinuxProcess.c +=================================================================== +--- htop-2.2.0.orig/linux/LinuxProcess.c ++++ htop-2.2.0/linux/LinuxProcess.c +@@ -143,7 +143,7 @@ typedef struct LinuxProcess_ { + } LinuxProcess; + + #ifndef Process_isKernelThread +-#define Process_isKernelThread(_process) ((LinuxProcess*)(_process)->isKernelThread) ++#define Process_isKernelThread(_process) (((LinuxProcess*)(_process))->isKernelThread) + #endif + + #ifndef Process_isUserlandThread diff --git a/htop-2.2.0-fix-option-string.patch b/htop-2.2.0-fix-option-string.patch new file mode 100644 index 0000000..789ec36 --- /dev/null +++ b/htop-2.2.0-fix-option-string.patch @@ -0,0 +1,13 @@ +Index: htop-2.2.0/htop.c +=================================================================== +--- htop-2.2.0.orig/htop.c ++++ htop-2.2.0/htop.c +@@ -93,7 +93,7 @@ static CommandLineSettings parseArgument + + int opt, opti=0; + /* Parse arguments */ +- while ((opt = getopt_long(argc, argv, "hvCst::d:u:p:i", long_opts, &opti))) { ++ while ((opt = getopt_long(argc, argv, "hvCs:td:u:p:i", long_opts, &opti))) { + if (opt == EOF) break; + switch (opt) { + case 'h': diff --git a/htop.changes b/htop.changes index 4ab6eb4..ab7dbcf 100644 --- a/htop.changes +++ b/htop.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 23 05:46:54 UTC 2020 - Martin Pluskal + +- Add patches: + * htop-2.2.0-fix-linux-process-ordering.patch + * htop-2.2.0-fix-option-string.patch (fixes boo#1165352) + ------------------------------------------------------------------- Thu Apr 12 12:09:09 UTC 2018 - mpluskal@suse.com diff --git a/htop.spec b/htop.spec index 9c088f1..ad6e9a7 100644 --- a/htop.spec +++ b/htop.spec @@ -1,7 +1,7 @@ # # spec file for package htop # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -29,6 +29,10 @@ Source2: %{name}.keyring Patch0: htop-desktop-file-fix-thoenig-01.patch # PATCH-FIX-OPENSUSE htop-script-python3.patch Patch1: htop-script-python3.patch +# PATCH-FIX-UPSTREAM This broke with commit db05ba61065f64b59d0014518be0786b5439e54c -- allow args for specific options +Patch2: htop-2.2.0-fix-option-string.patch +# PATCH-FIX-UPSTREAM Make sure the auto-regenerated headers (after scripts/MakeHeader.py) actually compile +Patch3: htop-2.2.0-fix-linux-process-ordering.patch BuildRequires: pkgconfig >= 0.9.0 BuildRequires: python3-base BuildRequires: update-desktop-files