public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tuna] f43: Rebased to upstream tuna-0.21
@ 2026-07-29 20:06 John Kacur
  0 siblings, 0 replies; only message in thread
From: John Kacur @ 2026-07-29 20:06 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/tuna
            Branch : f43
            Commit : 95c0305d970ce15e7a6cbeeea91dd9034e242d14
            Author : John Kacur <jkacur@redhat.com>
            Date   : 2026-07-29T15:31:40-04:00
            Stats  : +103/-552 in 9 file(s)
            URL    : https://src.fedoraproject.org/rpms/tuna/c/95c0305d970ce15e7a6cbeeea91dd9034e242d14?branch=f43

            Log:
            Rebased to upstream tuna-0.21

Added patch to improve error handling for cpuset save
Removed translations (po/ files)

Signed-off-by: John Kacur <jkacur@redhat.com>

---
diff --git a/.gitignore b/.gitignore
index 4423c0e..fef487b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@
 /tuna-0.18.tar.xz
 /tuna-0.19.tar.xz
 /tuna-0.20.tar.xz
+/tuna-0.21.tar.xz

diff --git a/sources b/sources
index ada2de2..03ac286 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (tuna-0.20.tar.xz) = f08155a18e41ef37280a9934b8cae8b2675023c6ce6ddf8863824aaf7b433553223a7e697a0bf94d94810928fd65ff04513738aa1986515dc4c3612aa4f65a8e
+SHA512 (tuna-0.21.tar.xz) = e3a09cbeee6f71cc9738169ea500a341a3c7586f18cca1570c5ad14a3b4272342255afcf76d074d435ccb58ac88fac5eb41bae036742559bc88b875a92318514

diff --git a/tuna-Add-error-handling-to-cpuset-profile-save-funct.patch b/tuna-Add-error-handling-to-cpuset-profile-save-funct.patch
new file mode 100644
index 0000000..8cde997
--- /dev/null
+++ b/tuna-Add-error-handling-to-cpuset-profile-save-funct.patch
@@ -0,0 +1,91 @@
+From 21926801be9c00416dad56d020cf60ba5b67443b Mon Sep 17 00:00:00 2001
+From: John Kacur <jkacur@redhat.com>
+Date: Wed, 29 Jul 2026 10:18:48 -0400
+Subject: [PATCH] tuna: Add error handling to cpuset profile save function
+
+The save_cpusets() function would crash with an unhandled exception
+if the parent directory of the target file didn't exist. This is
+problematic when users try to save to /etc/tuna/config.yaml and
+the /etc/tuna directory hasn't been created yet.
+
+This commit adds proper error handling:
+- Automatically creates parent directories if they don't exist
+  using os.makedirs() with exist_ok=True
+- Catches PermissionError and OSError exceptions
+- Returns 0 and prints clear error messages instead of crashing
+
+Also moves the os import to the top of the file for cleaner code
+and removes a duplicate import from within apply_cpusets().
+
+This matches the error handling already present in apply_cpusets()
+and provides a better user experience.
+
+Assisted-by: Claude:claude-sonnet-4-5
+Signed-off-by: John Kacur <jkacur@redhat.com>
+---
+ tuna/profile.py | 35 ++++++++++++++++++++++++-----------
+ 1 file changed, 24 insertions(+), 11 deletions(-)
+
+diff --git a/tuna/profile.py b/tuna/profile.py
+index 8372d081546f..fc1a64188c7e 100644
+--- a/tuna/profile.py
++++ b/tuna/profile.py
+@@ -9,6 +9,7 @@ including cpuset definitions.
+ """
+ 
+ import datetime
++import os
+ import sys
+ from ruamel.yaml import YAML
+ 
+@@ -64,16 +65,29 @@ def save_cpusets(filename, get_cpusets_info_func):
+     yaml.default_flow_style = False
+     yaml.width = 4096  # Avoid line wrapping
+ 
+-    with open(filename, 'w') as f:
+-        # Write header comments
+-        f.write("# Tuna RT System Profile - Cpuset Configuration\n")
+-        f.write(f"# Generated: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
+-        f.write("#\n")
+-        f.write("# This file can be applied with: tuna cpuset apply <filename>\n")
+-        f.write("#\n\n")
+-
+-        # Write YAML structure
+-        yaml.dump(profile, f)
++    try:
++        # Create parent directories if they don't exist
++        parent_dir = os.path.dirname(filename)
++        if parent_dir:  # Only if filename has a directory component
++            os.makedirs(parent_dir, exist_ok=True)
++
++        with open(filename, 'w') as f:
++            # Write header comments
++            f.write("# Tuna RT System Profile - Cpuset Configuration\n")
++            f.write(f"# Generated: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
++            f.write("#\n")
++            f.write("# This file can be applied with: tuna cpuset apply <filename>\n")
++            f.write("#\n\n")
++
++            # Write YAML structure
++            yaml.dump(profile, f)
++
++    except PermissionError:
++        print(f"Error: Permission denied writing to '{filename}'", file=sys.stderr)
++        return 0
++    except OSError as e:
++        print(f"Error writing profile to '{filename}': {e}", file=sys.stderr)
++        return 0
+ 
+     return len(cpuset_entries)
+ 
+@@ -144,7 +158,6 @@ def apply_cpusets(filename, cpuset_module, verbose=False):
+ 
+         try:
+             # Check if cpuset already exists
+-            import os
+             cpuset_path = os.path.join('/sys/fs/cgroup', name)
+             if os.path.exists(cpuset_path):
+                 print(f"Warning: Cpuset '{name}' already exists, skipping", file=sys.stderr)
+-- 
+2.55.0
+

diff --git a/tuna-Add-testing-infrastructure-using-unittest-frame.patch b/tuna-Add-testing-infrastructure-using-unittest-frame.patch
deleted file mode 100644
index 2158334..0000000
--- a/tuna-Add-testing-infrastructure-using-unittest-frame.patch
+++ /dev/null
@@ -1,348 +0,0 @@
-From 2984702b77ea5f073bf7d08ee287658295a1ab96 Mon Sep 17 00:00:00 2001
-From: John Kacur <jkacur@redhat.com>
-Date: Wed, 6 May 2026 12:13:49 -0400
-Subject: [PATCH 6/6] tuna: Add testing infrastructure using unittest framework
-
-Create a clean testing infrastructure for tuna using Python's unittest
-framework. This provides a foundation for unit tests and future test
-expansion.
-
-Structure:
-- tests/ directory with unittest-based tests
-- tests/run_tests.sh runner script
-- Makefile targets for easy test execution
-- Comprehensive README.md with examples and documentation
-
-Testing Infrastructure:
-- Runner script (run_tests.sh) that uses unittest discovery
-  * Automatically finds all test_*.py files
-  * Provides clean output
-  * Changes to repo root before running
-
-- Makefile targets:
-  * make tests / make unit-tests - Run all unit tests
-  * make test-eperm - Run specific EPERM test
-
-- Multiple execution methods supported:
-  * Via make (recommended for users)
-  * Via runner script (./tests/run_tests.sh)
-  * Via unittest directly (python3 -m unittest discover)
-
-Initial Test:
-- test_eperm_handling.py with 6 test methods
-- Validates EPERM error handling in isolate_cpus()
-- Tests verify the fix from commit 625edd878154
-- All tests run without root privileges or special configuration
-
-The infrastructure is designed for easy expansion - simply add new
-test_*.py files and they're automatically discovered and run.
-
-Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
-Signed-off-by: John Kacur <jkacur@redhat.com>
----
- Makefile                     |   9 +++
- tests/README.md              | 147 +++++++++++++++++++++++++++++++++++
- tests/run_tests.sh           |  25 ++++++
- tests/test_eperm_handling.py |  87 +++++++++++++++++++++
- 4 files changed, 268 insertions(+)
- create mode 100644 tests/README.md
- create mode 100755 tests/run_tests.sh
- create mode 100644 tests/test_eperm_handling.py
-
-diff --git a/Makefile b/Makefile
-index a55821a8f908..f331f4715d1c 100644
---- a/Makefile
-+++ b/Makefile
-@@ -20,3 +20,12 @@ cleanlogs:
- 
- .PHONY: clean
- clean: pyclean
-+
-+.PHONY: tests unit-tests
-+tests: unit-tests
-+
-+unit-tests:
-+	@./tests/run_tests.sh
-+
-+test-eperm:
-+	@python3 -m unittest tests.test_eperm_handling -v
-diff --git a/tests/README.md b/tests/README.md
-new file mode 100644
-index 000000000000..aceb38d6f8f5
---- /dev/null
-+++ b/tests/README.md
-@@ -0,0 +1,147 @@
-+# Tuna Test Suite
-+
-+This directory contains the test suite for tuna, using Python's `unittest` framework.
-+
-+## Running Tests
-+
-+### All Tests
-+
-+Run all unit tests using any of these methods:
-+
-+```bash
-+# Using make (recommended)
-+make tests
-+# or
-+make unit-tests
-+
-+# Using the test runner directly
-+./tests/run_tests.sh
-+
-+# Using Python unittest directly
-+python3 -m unittest discover -s tests -p "test_*.py" -v
-+```
-+
-+### Specific Test File
-+
-+Run a specific test file:
-+
-+```bash
-+# Using make
-+make test-eperm
-+
-+# Using Python unittest
-+python3 -m unittest tests.test_eperm_handling -v
-+```
-+
-+### Specific Test Method
-+
-+Run a single test method:
-+
-+```bash
-+python3 -m unittest tests.test_eperm_handling.TestEPERMHandling.test_eperm_constant_exists -v
-+```
-+
-+## Test Organization
-+
-+Tests are organized using Python's `unittest` framework. Each test file contains:
-+- A test class that inherits from `unittest.TestCase`
-+- Individual test methods (prefixed with `test_`)
-+- Setup/teardown methods if needed
-+
-+### Current Tests
-+
-+- **test_eperm_handling.py** - Tests for EPERM error handling in `isolate_cpus()`
-+  - Verifies that Permission Denied errors are handled gracefully
-+  - Ensures tuna continues processing when it can't set affinity on protected processes
-+
-+## Writing New Tests
-+
-+### Test File Structure
-+
-+Create a new test file following this pattern:
-+
-+```python
-+#!/usr/bin/env python3
-+"""
-+Description of what this test module tests.
-+"""
-+
-+import unittest
-+import os
-+import sys
-+
-+
-+class TestSomething(unittest.TestCase):
-+    """Test cases for something in tuna"""
-+
-+    @classmethod
-+    def setUpClass(cls):
-+        """Set up test fixtures (runs once before all tests)"""
-+        # Common setup for all tests in this class
-+        pass
-+
-+    def setUp(self):
-+        """Set up for each test (runs before each test method)"""
-+        # Per-test setup
-+        pass
-+
-+    def test_something(self):
-+        """Test that something works correctly"""
-+        # Your test code here
-+        self.assertEqual(expected, actual)
-+        self.assertTrue(condition)
-+        self.assertIn(item, collection)
-+
-+    def tearDown(self):
-+        """Clean up after each test (runs after each test method)"""
-+        # Per-test cleanup
-+        pass
-+
-+
-+if __name__ == '__main__':
-+    unittest.main()
-+```
-+
-+### Naming Conventions
-+
-+- Test files: `test_*.py` (e.g., `test_affinity.py`)
-+- Test classes: `Test*` (e.g., `TestAffinityFunctions`)
-+- Test methods: `test_*` (e.g., `test_set_affinity_validates_input`)
-+
-+### Common Assertions
-+
-+```python
-+self.assertEqual(a, b)           # a == b
-+self.assertNotEqual(a, b)        # a != b
-+self.assertTrue(x)               # bool(x) is True
-+self.assertFalse(x)              # bool(x) is False
-+self.assertIn(a, b)              # a in b
-+self.assertNotIn(a, b)           # a not in b
-+self.assertIsNone(x)             # x is None
-+self.assertIsNotNone(x)          # x is not None
-+self.assertRaises(Exception, fn) # fn() raises Exception
-+```
-+
-+## Requirements
-+
-+- Python 3.6 or later
-+- No additional packages required (uses Python standard library)
-+
-+## Test Types
-+
-+Currently all tests are **unit tests** that verify code behavior without requiring:
-+- Root privileges
-+- Special system configuration
-+- External dependencies
-+
-+Future test categories might include:
-+- **Integration tests** - Test interaction between tuna components
-+- **System tests** - Tests requiring actual CPU affinity operations (need root)
-+- **Regression tests** - Tests for specific bug fixes
-+
-+## Continuous Integration
-+
-+The test suite is designed to run in CI/CD environments:
-+- All tests run without root privileges
-+- No special system configuration required
-+- Exit code 0 on success, non-zero on failure
-diff --git a/tests/run_tests.sh b/tests/run_tests.sh
-new file mode 100755
-index 000000000000..da048a69d5d1
---- /dev/null
-+++ b/tests/run_tests.sh
-@@ -0,0 +1,25 @@
-+#!/bin/bash
-+#   Copyright (C) 2026 John Kacur
-+# SPDX-License-Identifier: GPL-2.0-only
-+#
-+# run_tests.sh - Run tuna unit tests
-+#
-+# This script runs all unit tests in the tests/ directory using Python's
-+# unittest framework.
-+
-+set -e
-+
-+# Change to repository root
-+cd "$(dirname "$0")/.."
-+
-+echo "Running tuna unit tests..."
-+echo ""
-+
-+# Run unittest discovery
-+# -s tests: start directory
-+# -p "test_*.py": pattern for test files
-+# -v: verbose output
-+python3 -m unittest discover -s tests -p "test_*.py" -v
-+
-+echo ""
-+echo "All tests passed!"
-diff --git a/tests/test_eperm_handling.py b/tests/test_eperm_handling.py
-new file mode 100644
-index 000000000000..c94a3ad6a0b4
---- /dev/null
-+++ b/tests/test_eperm_handling.py
-@@ -0,0 +1,87 @@
-+#!/usr/bin/env python3
-+#   Copyright (C) 2026 John Kacur
-+# SPDX-License-Identifier: GPL-2.0-only
-+"""
-+Unit tests for EPERM error handling in isolate_cpus function.
-+
-+Tests verify that tuna properly handles Permission Denied errors when
-+attempting to set CPU affinity on processes like PID 1 (systemd/init).
-+"""
-+
-+import unittest
-+import os
-+import sys
-+
-+
-+class TestEPERMHandling(unittest.TestCase):
-+    """Test cases for EPERM error handling in isolate_cpus"""
-+
-+    @classmethod
-+    def setUpClass(cls):
-+        """Set up test fixtures - read tuna.py once for all tests"""
-+        tuna_path = os.path.join(os.path.dirname(__file__), '..', 'tuna', 'tuna.py')
-+        with open(tuna_path, 'r') as f:
-+            cls.tuna_content = f.read()
-+
-+        # Find isolate_cpus function bounds
-+        cls.isolate_cpus_start = cls.tuna_content.find('def isolate_cpus(')
-+        cls.assertNotEqual(cls.isolate_cpus_start, -1, "Could not find isolate_cpus function")
-+
-+        # Find next function to get the bounds
-+        next_def = cls.tuna_content.find('\ndef ', cls.isolate_cpus_start + 1)
-+        if next_def == -1:
-+            next_def = len(cls.tuna_content)
-+
-+        cls.isolate_cpus_code = cls.tuna_content[cls.isolate_cpus_start:next_def]
-+
-+    def test_eperm_constant_exists(self):
-+        """Test that errno.EPERM is referenced in the code"""
-+        self.assertIn('errno.EPERM', self.tuna_content,
-+                      "errno.EPERM constant not found in tuna.py")
-+
-+    def test_warning_message_exists(self):
-+        """Test that warning message exists for unable to isolate"""
-+        self.assertIn('Warning: Unable to isolate pid', self.tuna_content,
-+                      "Warning message not found in tuna.py")
-+
-+    def test_eperm_in_isolate_cpus_function(self):
-+        """Test that EPERM handling is in the isolate_cpus function"""
-+        self.assertIn('errno.EPERM', self.isolate_cpus_code,
-+                      "EPERM handling not found in isolate_cpus function")
-+
-+    def test_both_ebusy_and_eperm_handled(self):
-+        """Test that both EBUSY and EPERM errors are handled"""
-+        self.assertIn('errno.EBUSY', self.isolate_cpus_code,
-+                      "EBUSY handling not found in isolate_cpus function")
-+        self.assertIn('errno.EPERM', self.isolate_cpus_code,
-+                      "EPERM handling not found in isolate_cpus function")
-+
-+    def test_eperm_handler_calls_continue(self):
-+        """Test that EPERM handler calls continue to keep processing"""
-+        eperm_block_start = self.isolate_cpus_code.find('if err.args[0] == errno.EPERM')
-+        self.assertNotEqual(eperm_block_start, -1,
-+                           "EPERM handling block not found")
-+
-+        # Check that continue is called within the next ~200 chars
-+        eperm_block = self.isolate_cpus_code[eperm_block_start:eperm_block_start + 200]
-+        self.assertIn('continue', eperm_block,
-+                     "EPERM handler should call 'continue' to avoid crash")
-+
-+    def test_eperm_handler_structure(self):
-+        """Test that EPERM handler has correct structure with comm extraction"""
-+        eperm_block_start = self.isolate_cpus_code.find('if err.args[0] == errno.EPERM')
-+        self.assertNotEqual(eperm_block_start, -1, "EPERM handling block not found")
-+
-+        eperm_block = self.isolate_cpus_code[eperm_block_start:eperm_block_start + 250]
-+
-+        # Should extract comm for the warning message
-+        self.assertIn('comm = ps[pid].stat["comm"]', eperm_block,
-+                     "EPERM handler should extract process name")
-+
-+        # Should print warning with pid and comm
-+        self.assertIn('print(f\'Warning: Unable to isolate pid {pid} [{comm}]\')', eperm_block,
-+                     "EPERM handler should print warning with pid and comm")
-+
-+
-+if __name__ == '__main__':
-+    unittest.main()
--- 
-2.54.0
-

diff --git a/tuna-Disable-the-tuna-apply-functionality.patch b/tuna-Disable-the-tuna-apply-functionality.patch
deleted file mode 100644
index 8ef6565..0000000
--- a/tuna-Disable-the-tuna-apply-functionality.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 959a16cefa6df216e42864534bc1eab9fd4d02c9 Mon Sep 17 00:00:00 2001
-From: John Kacur <jkacur@redhat.com>
-Date: Mon, 12 Jan 2026 15:23:05 -0500
-Subject: [PATCH 3/6] tuna: Disable the tuna apply functionality
-
-Currently tuned is the recommended way to apply a profile.
-Since tuna apply is currently broken, disabling it.
-
-Signed-off-by: John Kacur <jkacur@redhat.com>
----
- tuna-cmd.py | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/tuna-cmd.py b/tuna-cmd.py
-index 886824a4013c..6208bd116cea 100755
---- a/tuna-cmd.py
-+++ b/tuna-cmd.py
-@@ -150,8 +150,8 @@ def gen_parser():
-                                 help="Fork a new process and run the COMMAND")
-     save = subparser.add_parser('save', description="Save kthreads sched tunables to FILENAME",
-                                 help="Save kthreads sched tunables to FILENAME")
--    apply = subparser.add_parser('apply', description="Apply changes described in profile",
--                                help="Apply changes described in profile")
-+    # apply = subparser.add_parser('apply', description="Apply changes described in profile",
-+    #                             help="Apply changes described in profile")
-     show_threads = subparser.add_parser('show_threads', description='Show thread list', help='Show thread list')
-     show_irqs = subparser.add_parser('show_irqs', description='Show IRQ list', help='Show IRQ list')
-     show_configs = subparser.add_parser('show_configs', description='List preloaded profiles', help='List preloaded profiles')
-@@ -205,7 +205,7 @@ def gen_parser():
-     save_group.add_argument('-N', '--nohz_full', **MODS['nohz_full'])
-     save.add_argument('-t', '--threads', **MODS['threads'])
- 
--    apply.add_argument('profilename', **POS['profilename'])
-+    # apply.add_argument('profilename', **POS['profilename'])
- 
-     show_threads_group1 = show_threads.add_mutually_exclusive_group(required=False)
-     show_threads_group1.add_argument('-c', '--cpus', **MODS['cpus'])
-@@ -712,10 +712,10 @@ def main():
-     if 'nohz_full' in vars(args) and args.nohz_full:
-         args.cpu_list = nohz_full_to_cpu()
- 
--    if args.command in ['apply', 'a']:
--        apply_config(args.profilename)
-+    # if args.command in ['apply', 'a']:
-+    #     apply_config(args.profilename)
- 
--    elif args.command in ['include', 'I']:
-+    if args.command in ['include', 'I']:
-         tuna.include_cpus(args.cpu_list, utils.get_nr_cpus())
- 
-     elif args.command in ['isolate', 'i']:
--- 
-2.54.0
-

diff --git a/tuna-Print-warning-if-setting-affinity-results-in-EP.patch b/tuna-Print-warning-if-setting-affinity-results-in-EP.patch
deleted file mode 100644
index 1171c4c..0000000
--- a/tuna-Print-warning-if-setting-affinity-results-in-EP.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 625edd878154bdf1d320c8a873e82899dcd5c97e Mon Sep 17 00:00:00 2001
-From: John Kacur <jkacur@redhat.com>
-Date: Wed, 6 May 2026 11:49:13 -0400
-Subject: [PATCH 5/6] tuna: Print warning if setting affinity results in EPERM
- and continue
-
-When trying to isolate a CPU, if setting the affinity on a process fails
-with EPERM (Operation not permitted), this can occur due to security
-restrictions, namespace isolation, or lack of capabilities.
-
-This is commonly seen with PID 1 (systemd/init) even when running as root,
-particularly when using 'su -c' which may not grant full capabilities, or
-when SELinux/AppArmor policies restrict the operation.
-
-tuna should print a warning that this pid could not be moved, and continue
-processing other processes, similar to how EBUSY errors are handled.
-
-Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
-Signed-off-by: John Kacur <jkacur@redhat.com>
----
- tuna/tuna.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/tuna/tuna.py b/tuna/tuna.py
-index ef60c033362d..8e57cddd0c13 100755
---- a/tuna/tuna.py
-+++ b/tuna/tuna.py
-@@ -370,6 +370,10 @@ def isolate_cpus(cpus, nr_cpus):
-                     comm = ps[pid].stat["comm"]
-                     print(f'Warning: Unable to isolate pid {pid} [{comm}]')
-                     continue
-+                if err.args[0] == errno.EPERM:
-+                    comm = ps[pid].stat["comm"]
-+                    print(f'Warning: Unable to isolate pid {pid} [{comm}]')
-+                    continue
-                 raise err
- 
-         if "threads" not in ps[pid]:
--- 
-2.54.0
-

diff --git a/tuna-Remove-tuna-apply-from-the-man-page.patch b/tuna-Remove-tuna-apply-from-the-man-page.patch
deleted file mode 100644
index 4c01a7a..0000000
--- a/tuna-Remove-tuna-apply-from-the-man-page.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 09ba81b4a78d98ce8a8e289842571f19416cdaea Mon Sep 17 00:00:00 2001
-From: John Kacur <jkacur@redhat.com>
-Date: Mon, 12 Jan 2026 15:24:07 -0500
-Subject: [PATCH 4/6] tuna: Remove tuna apply from the man page
-
-tuna apply has been disabled so remove it from the man page
-
-Signed-off-by: John Kacur <jkacur@redhat.com>
----
- docs/tuna.8 | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/docs/tuna.8 b/docs/tuna.8
-index 6e30537e9509..8c15c2ef535c 100644
---- a/docs/tuna.8
-+++ b/docs/tuna.8
-@@ -169,17 +169,17 @@ optional arguments:
-   -t THREAD-LIST, --threads THREAD-LIST
-                         THREAD-LIST affected by commands
- .TP
--\fBtuna apply\fR
--usage: tuna-cmd.py apply [-h] profilename
--
--Apply changes described in profile
--
--positional arguments:
--  profilename  Apply changes described in this file
--
--optional arguments:
--  -h, --help   show this help message and exit
--
-+.\"\fBtuna apply\fR
-+.\"usage: tuna-cmd.py apply [-h] profilename
-+.\"
-+.\"Apply changes described in profile
-+.\"
-+.\"positional arguments:
-+.\"  profilename  Apply changes described in this file
-+.\"
-+.\"optional arguments:
-+.\"  -h, --help   show this help message and exit
-+.\"
- .TP
- \fBtuna show_threads\fR
- usage: tuna-cmd.py show_threads [-h] [-c CPU-LIST | -N | -S CPU-SOCKET-LIST]
--- 
-2.54.0
-

diff --git a/tuna-Update-pyproject.toml-license-format-for-modern.patch b/tuna-Update-pyproject.toml-license-format-for-modern.patch
deleted file mode 100644
index e6da507..0000000
--- a/tuna-Update-pyproject.toml-license-format-for-modern.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 31e0972098dc1b854d8c25f2d887d071fefcbd21 Mon Sep 17 00:00:00 2001
-From: John Kacur <jkacur@redhat.com>
-Date: Fri, 15 May 2026 10:52:18 -0400
-Subject: [PATCH] tuna: Update pyproject.toml license format for modern
- setuptools
-
-Convert deprecated TOML table license format to simple SPDX string.
-Remove deprecated license classifier from classifiers list.
-
-This addresses setuptools deprecation warnings introduced in setuptools 77+.
-
-Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
-Signed-off-by: John Kacur <jkacur@redhat.com>
----
- pyproject.toml | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/pyproject.toml b/pyproject.toml
-index f0caac6df053..ca149c352df0 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
- name = "tuna"
- version = "0.20"
- description = "Application tuning GUI"
--license = {text = "GPL-2.0-only"}
-+license = "GPL-2.0-only"
- authors = [
-     {name = "Arnaldo Carvalho de Melo", email = "acme@redhat.com"},
-     {name = "John Kacur", email = "jkacur@redhat.com"}
-@@ -21,7 +21,6 @@ dependencies = [
- classifiers = [
-     "Development Status :: 4 - Beta",
-     "Intended Audience :: System Administrators",
--    "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
-     "Operating System :: POSIX :: Linux",
-     "Programming Language :: Python :: 3",
-     "Programming Language :: Python :: 3.10",
--- 
-2.54.0
-

diff --git a/tuna.spec b/tuna.spec
index 530ee4d..a7a7e91 100644
--- a/tuna.spec
+++ b/tuna.spec
@@ -1,24 +1,20 @@
 %bcond oscilloscope %{undefined rhel}
 
 Name: tuna
-Version: 0.20
-Release: 6%{?dist}
+Version: 0.21
+Release: 1%{?dist}
 License: GPL-2.0-only AND LGPL-2.1-only
 Summary: Application tuning GUI & command line utility
 Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
 URL: https://rt.wiki.kernel.org/index.php/Tuna
 BuildArch: noarch
-BuildRequires: python3-devel, gettext
+BuildRequires: python3-devel
 Requires: python3-linux-procfs >= 0.6
 # This really should be a Suggests...
 # Requires: python-inet_diag
 
 # Patches
-Patch: tuna-Update-pyproject.toml-license-format-for-modern.patch
-Patch: tuna-Disable-the-tuna-apply-functionality.patch
-Patch: tuna-Remove-tuna-apply-from-the-man-page.patch
-Patch: tuna-Print-warning-if-setting-affinity-results-in-EP.patch
-Patch: tuna-Add-testing-infrastructure-using-unittest-frame.patch
+Patch:	tuna-Add-error-handling-to-cpuset-profile-save-funct.patch
 
 %description
 Provides interface for changing scheduler and IRQ tunables, at whole CPU and at
@@ -83,17 +79,7 @@ install -p -m644 org.tuna.policy %{buildroot}/%{_datadir}/polkit-1/actions/
 rm %{buildroot}%{_bindir}/oscilloscope
 %endif
 
-# l10n-ed message catalogues
-for lng in `cat po/LINGUAS`; do
-        po=po/"$lng.po"
-        mkdir -p %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES
-        msgfmt $po -o %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES/%{name}.mo
-done
-
-%find_lang %name
-
-%files -f %{name}.lang -f %{pyproject_files}
-%doc ChangeLog
+%files -f %{pyproject_files}
 %{_bindir}/tuna
 %{_datadir}/tuna/
 %{_mandir}/man8/tuna.8.gz
@@ -109,6 +95,11 @@ done
 %endif
 
 %changelog
+* Wed Jul 29 2026 John Kacur <jkacur@redhat.com> - 0.21-1
+- Rebased to upstream tuna-0.21
+- Added patch to improve error handling for cpuset save
+- Removed translations (po/ files)
+
 * Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.20-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-29 20:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-29 20:06 [rpms/tuna] f43: Rebased to upstream tuna-0.21 John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox