8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0190-Build-removing-the-hardcoded-usage-of-python3.patch 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From c7aae487213e464b2ee7a785d752bd8264ceb371 Mon Sep 17 00:00:00 2001
From: Hari Gowtham <[email protected]>
Date: Thu, 13 Jun 2019 20:12:14 +0530
Subject: [PATCH 190/192] Build: removing the hardcoded usage of python3
Label : DOWNSTREAM ONLY
Problem: RHEL8 needed python3 so python3 was hardcoded to be used
in gluster build. python2 was still being used by RHEL7 machines and
when the shebang was redirected to use python3 glusterfind failed.
It was not working from 6.0-5 downstream build.
Fix: revert back to the old mechanism where we check the python version
and redirect the python script according to the usage.
Change-Id: I8dc6c9185b2740e20e4c4d734cc1a9e335e9c449
fixes: bz#1719640
Signed-off-by: Hari Gowtham <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/173392
Reviewed-by: Kaleb Keithley <[email protected]>
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Aravinda Vishwanathapura Krishna Murthy <[email protected]>
Reviewed-by: Atin Mukherjee <[email protected]>
---
glusterfs.spec.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 9c7d7a7..0127e8e 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -722,10 +722,12 @@ GlusterFS Events
%prep
%setup -q -n %{name}-%{version}%{?prereltag}
+%if ( ! %{_usepython3} )
echo "fixing python shebangs..."
-for i in `find . -type f -exec bash -c "if file {} | grep 'Python script, ASCII text executable' >/dev/null; then echo {}; fi" ';'`; do
- sed -i -e 's|^#!/usr/bin/python.*|#!%{__python3}|' -e 's|^#!/usr/bin/env python.*|#!%{__python3}|' $i
+for f in api events extras geo-replication libglusterfs tools xlators; do
+find $f -type f -exec sed -i 's|/usr/bin/python3|/usr/bin/python2|' {} \;
done
+%endif
%build
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/glusterfs.git
[email protected]:src-anolis-os/glusterfs.git
src-anolis-os
glusterfs
glusterfs
a8

搜索帮助