From cd5f1654b0d9d0d77f60b94017e3745d18d2b92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 12 Jan 2023 14:48:35 +0100 Subject: [PATCH] added fix for python-3.12 resolves: rhbz#2154801 --- tuned-2.19.0-python312-fix.patch | 13 +++++++++++++ tuned.spec | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tuned-2.19.0-python312-fix.patch diff --git a/tuned-2.19.0-python312-fix.patch b/tuned-2.19.0-python312-fix.patch new file mode 100644 index 0000000..74ea2ba --- /dev/null +++ b/tuned-2.19.0-python312-fix.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 8f83a44..d60aeb2 100644 +--- a/Makefile ++++ b/Makefile +@@ -40,7 +40,7 @@ ifeq ($(PYTHON),python2) + PYLINT = pylint-2 + endif + SHEBANG_REWRITE_REGEX= '1s|^\#!/usr/bin/\|\#!$(PYTHON)|' +-PYTHON_SITELIB = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib());') ++PYTHON_SITELIB = $(shell $(PYTHON) -c 'from sysconfig import get_path; print(get_path("purelib"));') + ifeq ($(PYTHON_SITELIB),) + $(error Failed to determine python library directory) + endif diff --git a/tuned.spec b/tuned.spec index 1481a80..f476bfa 100644 --- a/tuned.spec +++ b/tuned.spec @@ -50,7 +50,7 @@ Summary: A dynamic adaptive system tuning daemon Name: tuned Version: 2.19.0 -Release: 1%{?prerel1}%{?git_suffix:.%{git_suffix}}%{?dist} +Release: 2%{?prerel1}%{?git_suffix:.%{git_suffix}}%{?dist} License: GPLv2+ %if 0%{?git_commit:1} Source0: https://github.com/redhat-performance/%{name}/archive/%{git_commit}/%{name}-%{version}-%{git_suffix}.tar.gz @@ -115,6 +115,9 @@ Recommends: subscription-manager Requires: python3-syspurpose %endif %endif +# https://bugzilla.redhat.com/show_bug.cgi?id=2154801 +# https://github.com/redhat-performance/tuned/pull/490 +Patch0: tuned-2.19.0-python312-fix.patch %description The tuned package contains a daemon that tunes system settings dynamically. @@ -561,6 +564,10 @@ fi %{_mandir}/man7/tuned-profiles-openshift.7* %changelog +* Thu Jan 12 2023 Jaroslav Škarvada - 2.19.0-2 +- added fix for python-3.12 + resolves: rhbz#2154801 + * Fri Aug 19 2022 Jaroslav Škarvada - 2.19.0-1 - new release - rebased tuned to latest upstream