diff --git a/adjust-data-files.patch b/adjust-data-files.patch index 807c3c7..736985f 100644 --- a/adjust-data-files.patch +++ b/adjust-data-files.patch @@ -1,7 +1,7 @@ -Index: glances-3.1.1/setup.py +Index: glances-3.3.1/setup.py =================================================================== ---- glances-3.1.1.orig/setup.py -+++ glances-3.1.1/setup.py +--- glances-3.3.1.orig/setup.py ++++ glances-3.3.1/setup.py @@ -32,8 +32,6 @@ with open('README.rst', encoding='utf-8' def get_data_files(): diff --git a/fix-tests.patch b/fix-tests.patch index b52e74a..2c68597 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,6 +1,7 @@ -diff -ur glances-3.2.7.orig/unitest-restful.py glances-3.2.7/unitest-restful.py ---- glances-3.2.7.orig/unitest-restful.py 2022-07-28 18:10:35.000000000 +0200 -+++ glances-3.2.7/unitest-restful.py 2022-07-28 20:22:43.516291302 +0200 +Index: glances-3.3.1/unitest-restful.py +=================================================================== +--- glances-3.3.1.orig/unitest-restful.py ++++ glances-3.3.1/unitest-restful.py @@ -12,6 +12,7 @@ import shlex @@ -9,18 +10,19 @@ diff -ur glances-3.2.7.orig/unitest-restful.py glances-3.2.7/unitest-restful.py import time import numbers import unittest -@@ -54,7 +55,7 @@ - global pid - - print('INFO: [TEST_000] Start the Glances Web Server') -- cmdline = "python -m glances -B localhost -w -p %s" % SERVER_PORT -+ cmdline = "%s -m glances -B localhost -w -p %s" % (sys.executable, SERVER_PORT) +@@ -58,7 +59,7 @@ class TestGlances(unittest.TestCase): + if os.path.isfile("./venv/bin/python"): + cmdline = "./venv/bin/python" + else: +- cmdline = "python" ++ cmdline = sys.executable + cmdline += " -m glances -B localhost -w -p %s" % SERVER_PORT print("Run the Glances Web Server on port %s" % SERVER_PORT) args = shlex.split(cmdline) - pid = subprocess.Popen(args) -diff -ur glances-3.2.7.orig/unitest-xmlrpc.py glances-3.2.7/unitest-xmlrpc.py ---- glances-3.2.7.orig/unitest-xmlrpc.py 2022-07-28 18:10:35.000000000 +0200 -+++ glances-3.2.7/unitest-xmlrpc.py 2022-07-28 20:22:49.160260716 +0200 +Index: glances-3.3.1/unitest-xmlrpc.py +=================================================================== +--- glances-3.3.1.orig/unitest-xmlrpc.py ++++ glances-3.3.1/unitest-xmlrpc.py @@ -13,6 +13,7 @@ import json import shlex @@ -28,13 +30,13 @@ diff -ur glances-3.2.7.orig/unitest-xmlrpc.py glances-3.2.7/unitest-xmlrpc.py +import sys import time import unittest - -@@ -43,7 +44,7 @@ - global pid - - print('INFO: [TEST_000] Start the Glances Web Server') -- cmdline = "python -m glances -B localhost -s -p %s" % SERVER_PORT -+ cmdline = "%s -m glances -s -p %s" % (sys.executable, SERVER_PORT) + import os +@@ -47,7 +48,7 @@ class TestGlances(unittest.TestCase): + if os.path.isfile("./venv/bin/python"): + cmdline = "./venv/bin/python" + else: +- cmdline = "python" ++ cmdline = sys.executable + cmdline += " -m glances -B localhost -s -p %s" % SERVER_PORT print("Run the Glances Server on port %s" % SERVER_PORT) args = shlex.split(cmdline) - pid = subprocess.Popen(args) diff --git a/python-Glances.changes b/python-Glances.changes index 29ee630..de1d2dd 100644 --- a/python-Glances.changes +++ b/python-Glances.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 25 15:51:39 UTC 2023 - Andrea Manzini + +- Update to 3.3.1 + * Minor change on the help screen + * Refactor some loop in the processes function + * Replace json by ujson #2201 + * Improvements on documentation, unit test and CI + * bump dependencies and web lib to address security + ------------------------------------------------------------------- Mon Nov 7 20:12:07 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-Glances.spec b/python-Glances.spec index 1877058..2d1f408 100644 --- a/python-Glances.spec +++ b/python-Glances.spec @@ -1,7 +1,7 @@ # # spec file for package python-Glances # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define skip_python2 1 Name: python-Glances -Version: 3.3.0.4 +Version: 3.3.1 Release: 0 Summary: A cross-platform curses-based monitoring tool License: LGPL-3.0-only @@ -37,6 +37,7 @@ BuildRequires: %{python_module future} BuildRequires: %{python_module psutil >= 5.3.0} BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module ujson} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-bottle @@ -44,6 +45,7 @@ Requires: python-defusedxml Requires: python-future Requires: python-psutil >= 5.3.0 Requires: python-requests +Requires: python-ujson Requires(post): update-alternatives Requires(postun):update-alternatives Recommends: python-curses @@ -124,6 +126,9 @@ export LANG=en_US.UTF-8 %python_alternative %{_mandir}/man1/glances.1%{?ext_man} %{python_sitelib}/glances %{python_sitelib}/Glances-%{version}*-info +%exclude %{python_sitelib}/glances/outputs/static/.eslintrc.js +%exclude %{python_sitelib}/glances/outputs/static/.gitignore +%exclude %{python_sitelib}/glances/outputs/static/.prettierrc.js %files -n glances-common %dir %{_prefix}/lib/firewalld diff --git a/remove-shebang.patch b/remove-shebang.patch index adb199f..4951057 100644 --- a/remove-shebang.patch +++ b/remove-shebang.patch @@ -1,7 +1,7 @@ -diff --git a/glances/__main__.py b/glances/__main__.py -index 197d5ce..3889719 100644 ---- a/glances/__main__.py -+++ b/glances/__main__.py +Index: glances-3.3.1/glances/__main__.py +=================================================================== +--- glances-3.3.1.orig/glances/__main__.py ++++ glances-3.3.1/glances/__main__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- diff --git a/skip-online-tests.patch b/skip-online-tests.patch index ed06df0..8e0e4d6 100644 --- a/skip-online-tests.patch +++ b/skip-online-tests.patch @@ -1,8 +1,8 @@ -Index: glances-3.1.1/unitest.py +Index: glances-3.3.1/unitest.py =================================================================== ---- glances-3.1.1.orig/unitest.py -+++ glances-3.1.1/unitest.py -@@ -191,6 +191,7 @@ class TestGlances(unittest.TestCase): +--- glances-3.3.1.orig/unitest.py ++++ glances-3.3.1/unitest.py +@@ -188,6 +188,7 @@ class TestGlances(unittest.TestCase): self.assertTrue(type(stats_grab) is list, msg='Folders stats is not a list') print('INFO: Folders stats: %s' % stats_grab) diff --git a/unitest-wait-for-server.patch b/unitest-wait-for-server.patch index 42d165b..79037a2 100644 --- a/unitest-wait-for-server.patch +++ b/unitest-wait-for-server.patch @@ -1,8 +1,8 @@ -Index: glances-3.1.5/unitest-xmlrpc.py +Index: glances-3.3.1/unitest-xmlrpc.py =================================================================== ---- glances-3.1.5.orig/unitest-xmlrpc.py -+++ glances-3.1.5/unitest-xmlrpc.py -@@ -59,7 +59,7 @@ class TestGlances(unittest.TestCase): +--- glances-3.3.1.orig/unitest-xmlrpc.py ++++ glances-3.3.1/unitest-xmlrpc.py +@@ -54,7 +54,7 @@ class TestGlances(unittest.TestCase): args = shlex.split(cmdline) pid = subprocess.Popen(args) print("Please wait...") diff --git a/v3.3.0.4.tar.gz b/v3.3.0.4.tar.gz deleted file mode 100644 index 1412c23..0000000 --- a/v3.3.0.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:464905c9b4806b80782eb8e43552ccbfa346d6f905f8a2d28de48613ccba0e53 -size 6144597 diff --git a/v3.3.1.tar.gz b/v3.3.1.tar.gz new file mode 100644 index 0000000..6544313 --- /dev/null +++ b/v3.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab12ff835b688aecf3295e813085cabef3f92e72ff540e7475773df18e599d5d +size 6198972