!30 [sync] PR-26: Modify tuna config.py use gtk3

From: @openeuler-sync-bot 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
This commit is contained in:
openeuler-ci-bot 2024-02-01 12:02:42 +00:00 committed by Gitee
commit fcffe8e388
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,16 @@
diff -Naur a/tuna/config.py b/tuna/config.py
--- a/tuna/config.py 2024-02-01 18:10:44.585908504 +0800
+++ b/tuna/config.py 2024-02-01 19:17:26.076908504 +0800
@@ -1,8 +1,11 @@
import io, os, re, fnmatch
-import sys, gtk
+import sys
import codecs, configparser
from time import localtime, strftime
from subprocess import Popen, PIPE, STDOUT, call
+import gi
+gi.require_version("Gtk", "3.0")
+from gi.repository import Gtk
TUNED_CONF="""[sysctl]\n"""
class Config:

View File

@ -1,11 +1,12 @@
Name: tuna
Version: 0.14.1
Release: 2
Release: 3
Summary: Application tuning GUI & command line utility
License: GPLv2
URL: https://rt.wiki.kernel.org/index.php/Tuna
Source: https://www.kernel.org/pub/software/utils/%{name}/older/%{name}-%{version}.tar.xz
Patch0: oscilloscope-move-from-pygtk2-to-gtk3-gobject.patch
Patch1: tuna-move-from-pygtk-to-gtk3-gobject.patch
BuildArch: noarch
BuildRequires: python3-devel gettext
Requires: python3-ethtool python3-linux-procfs >= 0.6 python3-schedutils >= 0.6
@ -88,6 +89,9 @@ done
%doc ChangeLog
%changelog
* Thu Feb 01 2024 yaoxin <yao_xin001@hoperun.com> - 0.14.1-3
- Modify tuna config.py use gtk3
* Mon Nov 21 2022 xu_ping <xuping33@h-partners.com> - 0.14.1-2
- Modify invalid source