Use python intepreter path from the rpm macro
This commit is contained in:
parent
bb8072409d
commit
565b5a038b
18
tuned-2.10.0-makefile-full-python-path.patch
Normal file
18
tuned-2.10.0-makefile-full-python-path.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -30,12 +30,12 @@ VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX)
|
||||
SYSCONFDIR = /etc
|
||||
DATADIR = /usr/share
|
||||
DOCDIR = $(DATADIR)/doc/$(NAME)
|
||||
-PYTHON = python3
|
||||
+PYTHON = /usr/bin/python3
|
||||
PYLINT = pylint-3
|
||||
ifeq ($(PYTHON),python2)
|
||||
PYLINT = pylint-2
|
||||
endif
|
||||
-SHEBANG_REWRITE_REGEX= '1s/^(\#!\/usr\/bin\/)\<python\>/\1$(PYTHON)/'
|
||||
+SHEBANG_REWRITE_REGEX= '1s|^\#!/usr/bin/\<python\>|\#!$(PYTHON)|'
|
||||
PYTHON_SITELIB = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib());')
|
||||
ifeq ($(PYTHON_SITELIB),)
|
||||
$(error Failed to determine python library directory)
|
||||
|
14
tuned.spec
14
tuned.spec
@ -32,9 +32,9 @@
|
||||
Summary: A dynamic adaptive system tuning daemon
|
||||
Name: tuned
|
||||
Version: 2.10.0
|
||||
Release: 2%{?prerel1}%{?dist}
|
||||
Release: 3%{?prerel1}%{?dist}
|
||||
License: GPLv2+
|
||||
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel1}.tar.gz
|
||||
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel2}.tar.gz
|
||||
URL: http://www.tuned-project.org/
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd, desktop-file-utils
|
||||
@ -59,6 +59,8 @@ Recommends: kernel-tools
|
||||
Patch0: tuned-2.10.0-python-3.7-fix.patch
|
||||
# Upstream patch:
|
||||
Patch1: 0001-tuned-adm-Fix-a-traceback-when-run-without-action-sp.patch
|
||||
# Upstream patch:
|
||||
Patch2: tuned-2.10.0-makefile-full-python-path.patch
|
||||
|
||||
%description
|
||||
The tuned package contains a daemon that tunes system settings dynamically.
|
||||
@ -205,15 +207,16 @@ It can be also used to fine tune your system for specific scenarios.
|
||||
%setup -q -n %{name}-%{version}%{?prerel2}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot} DOCDIR=%{docdir} \
|
||||
%if %{with python3}
|
||||
PYTHON=python3
|
||||
PYTHON=%{__python3}
|
||||
%else
|
||||
PYTHON=python2
|
||||
PYTHON=%{__python2}
|
||||
%endif
|
||||
%if 0%{?rhel}
|
||||
sed -i 's/\(dynamic_tuning[ \t]*=[ \t]*\).*/\10/' %{buildroot}%{_sysconfdir}/tuned/tuned-main.conf
|
||||
@ -437,6 +440,9 @@ fi
|
||||
%{_mandir}/man7/tuned-profiles-compat.7*
|
||||
|
||||
%changelog
|
||||
* Tue Jul 10 2018 Ondřej Lysoněk <olysonek@redhat.com> - 2.10.0-3
|
||||
- Used python intepreter path from the rpm macro
|
||||
|
||||
* Tue Jul 10 2018 Ondřej Lysoněk <olysonek@redhat.com> - 2.10.0-2
|
||||
- tuned-adm: Fix a traceback when run without action specified
|
||||
- Fixed compatibility with python-3.7
|
||||
|
Loading…
Reference in New Issue
Block a user