added fix for python-3.12

resolves: rhbz#2154801
This commit is contained in:
Jaroslav Škarvada 2023-01-12 14:48:35 +01:00
parent 2638e19064
commit cd5f1654b0
2 changed files with 21 additions and 1 deletions

View File

@ -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/\<python3\>|\#!$(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

View File

@ -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 <jskarvad@redhat.com> - 2.19.0-2
- added fix for python-3.12
resolves: rhbz#2154801
* Fri Aug 19 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 2.19.0-1
- new release
- rebased tuned to latest upstream