!3 同步sp2 到 22.03 next 分支
From: @yanansong Reviewed-by: @heppen, @bugflyfly Signed-off-by: @heppen, @bugflyfly
This commit is contained in:
commit
fa377f0bb7
61
0001-feat-Adapt-to-Openeuler-python.patch
Normal file
61
0001-feat-Adapt-to-Openeuler-python.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
From f22df6d4d6e194ad0c5d1e899dd6353126f36f58 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peng_langyuan <peng_langyuan@hoperun.com>
|
||||||
|
Date: Wed, 17 May 2023 13:31:44 +0800
|
||||||
|
Subject: [PATCH 1/3] =?UTF-8?q?feat(Adapt=20to=20Openeuler):=E6=9B=BF?=
|
||||||
|
=?UTF-8?q?=E6=8D=A2python=E8=B7=AF=E5=BE=84?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
build.py | 11 ++++++++++-
|
||||||
|
hb/__main__.py | 11 ++++++++++-
|
||||||
|
2 files changed, 20 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/build.py b/build.py
|
||||||
|
index c8827ec..a94ad4b 100755
|
||||||
|
--- a/build.py
|
||||||
|
+++ b/build.py
|
||||||
|
@@ -25,7 +25,16 @@ import subprocess
|
||||||
|
def get_python():
|
||||||
|
hb_main = importlib.import_module("hb.__main__")
|
||||||
|
topdir = hb_main.find_top()
|
||||||
|
- python_base_dir = os.path.join(topdir, 'prebuilts/python')
|
||||||
|
+ index = 0
|
||||||
|
+ while index < len(sys.argv):
|
||||||
|
+ if sys.argv[index] == "-p":
|
||||||
|
+ product_name = sys.argv[index + 1]
|
||||||
|
+ index += 1
|
||||||
|
+ if product_name == "openeuler":
|
||||||
|
+ python_base_dir = "/usr/bin"
|
||||||
|
+ else:
|
||||||
|
+ python_base_dir = os.path.join(topdir, 'prebuilts/python')
|
||||||
|
+ python_base_dir = "/usr/bin"
|
||||||
|
if os.path.exists(python_base_dir):
|
||||||
|
python_dir = hb_main.search(python_base_dir, 'python3')
|
||||||
|
return os.path.join(python_dir, 'python3')
|
||||||
|
diff --git a/hb/__main__.py b/hb/__main__.py
|
||||||
|
index 4db4a55..cf9b7e2 100644
|
||||||
|
--- a/hb/__main__.py
|
||||||
|
+++ b/hb/__main__.py
|
||||||
|
@@ -53,7 +53,16 @@ def main():
|
||||||
|
topdir = find_top()
|
||||||
|
except Exception as ex:
|
||||||
|
return print("hb_error: Please call hb utilities inside source root directory")
|
||||||
|
- python_base_dir = os.path.join(topdir, 'prebuilts/python')
|
||||||
|
+ index = 0
|
||||||
|
+ while index < len(sys.argv):
|
||||||
|
+ if sys.argv[index] == "-p":
|
||||||
|
+ product_name = sys.argv[index + 1]
|
||||||
|
+ index += 1
|
||||||
|
+ if product_name == "openeuler":
|
||||||
|
+ python_base_dir = "/usr/bin"
|
||||||
|
+ else:
|
||||||
|
+ python_base_dir = os.path.join(topdir, 'prebuilts/python')
|
||||||
|
+ python_base_dir = "/usr/bin"
|
||||||
|
if os.path.exists(python_base_dir):
|
||||||
|
python_dir = search(python_base_dir, 'python3')
|
||||||
|
python_executable = os.path.join(python_dir, 'python3')
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
39
0002-feat-Adapt-to-Openeuler-productdefine.patch
Normal file
39
0002-feat-Adapt-to-Openeuler-productdefine.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 6214493503047d93280f7ea392689c4c2113c7dc Mon Sep 17 00:00:00 2001
|
||||||
|
From: peng_langyuan <peng_langyuan@hoperun.com>
|
||||||
|
Date: Wed, 17 May 2023 13:33:57 +0800
|
||||||
|
Subject: [PATCH 2/3] =?UTF-8?q?feat(Adapt=20to=20Openeuler):=E7=A7=BB?=
|
||||||
|
=?UTF-8?q?=E9=99=A4=E5=AF=B9productdefine=E7=9B=AE=E5=BD=95=E7=9A=84?=
|
||||||
|
=?UTF-8?q?=E4=BE=9D=E8=B5=96=E6=80=A7?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
hb_internal/common/config.py | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/hb_internal/common/config.py b/hb_internal/common/config.py
|
||||||
|
index abde6ec..aae3d50 100644
|
||||||
|
--- a/hb_internal/common/config.py
|
||||||
|
+++ b/hb_internal/common/config.py
|
||||||
|
@@ -288,6 +288,8 @@ class Config(metaclass=Singleton):
|
||||||
|
def built_in_product_path(self):
|
||||||
|
_built_in_product_path = os.path.join(self.root_path,
|
||||||
|
'productdefine/common/products')
|
||||||
|
+ if self._product == "openeuler":
|
||||||
|
+ return
|
||||||
|
if not os.path.isdir(_built_in_product_path):
|
||||||
|
raise OHOSException(
|
||||||
|
f'Invalid built-in product path: {_built_in_product_path}')
|
||||||
|
@@ -297,6 +299,8 @@ class Config(metaclass=Singleton):
|
||||||
|
def built_in_device_path(self):
|
||||||
|
_built_in_device_path = os.path.join(self.root_path,
|
||||||
|
'productdefine/common/device')
|
||||||
|
+ if self._product == "openeuler":
|
||||||
|
+ return
|
||||||
|
if not os.path.isdir(_built_in_device_path):
|
||||||
|
raise OHOSException(
|
||||||
|
f'Invalid built-in product path: {_built_in_device_path}')
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
53
0003-feat-Adapt-to-Openeule-remove-useless-code.patch
Normal file
53
0003-feat-Adapt-to-Openeule-remove-useless-code.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 3b7265530ad4e6da1773b1e3651a09d621b1ccc9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peng_langyuan <peng_langyuan@hoperun.com>
|
||||||
|
Date: Fri, 19 May 2023 17:26:14 +0800
|
||||||
|
Subject: [PATCH 3/3] feat : Adapt to openeuler
|
||||||
|
|
||||||
|
---
|
||||||
|
build.py | 9 ---------
|
||||||
|
hb/__main__.py | 9 ---------
|
||||||
|
2 files changed, 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/build.py b/build.py
|
||||||
|
index a94ad4b..2d7ad8a 100755
|
||||||
|
--- a/build.py
|
||||||
|
+++ b/build.py
|
||||||
|
@@ -25,15 +25,6 @@ import subprocess
|
||||||
|
def get_python():
|
||||||
|
hb_main = importlib.import_module("hb.__main__")
|
||||||
|
topdir = hb_main.find_top()
|
||||||
|
- index = 0
|
||||||
|
- while index < len(sys.argv):
|
||||||
|
- if sys.argv[index] == "-p":
|
||||||
|
- product_name = sys.argv[index + 1]
|
||||||
|
- index += 1
|
||||||
|
- if product_name == "openeuler":
|
||||||
|
- python_base_dir = "/usr/bin"
|
||||||
|
- else:
|
||||||
|
- python_base_dir = os.path.join(topdir, 'prebuilts/python')
|
||||||
|
python_base_dir = "/usr/bin"
|
||||||
|
if os.path.exists(python_base_dir):
|
||||||
|
python_dir = hb_main.search(python_base_dir, 'python3')
|
||||||
|
diff --git a/hb/__main__.py b/hb/__main__.py
|
||||||
|
index cf9b7e2..2f3d595 100644
|
||||||
|
--- a/hb/__main__.py
|
||||||
|
+++ b/hb/__main__.py
|
||||||
|
@@ -53,15 +53,6 @@ def main():
|
||||||
|
topdir = find_top()
|
||||||
|
except Exception as ex:
|
||||||
|
return print("hb_error: Please call hb utilities inside source root directory")
|
||||||
|
- index = 0
|
||||||
|
- while index < len(sys.argv):
|
||||||
|
- if sys.argv[index] == "-p":
|
||||||
|
- product_name = sys.argv[index + 1]
|
||||||
|
- index += 1
|
||||||
|
- if product_name == "openeuler":
|
||||||
|
- python_base_dir = "/usr/bin"
|
||||||
|
- else:
|
||||||
|
- python_base_dir = os.path.join(topdir, 'prebuilts/python')
|
||||||
|
python_base_dir = "/usr/bin"
|
||||||
|
if os.path.exists(python_base_dir):
|
||||||
|
python_dir = search(python_base_dir, 'python3')
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
BIN
build_lite-OpenHarmony-v3.2-Release.tar.gz
Normal file
BIN
build_lite-OpenHarmony-v3.2-Release.tar.gz
Normal file
Binary file not shown.
34
distributed-build_lite.spec
Normal file
34
distributed-build_lite.spec
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
%define debug_package %{nil}
|
||||||
|
%global openHarmony_source_release OpenHarmony-v3.2-Release
|
||||||
|
Name: distributed-build_lite
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Sub component for openEuler embedded softbus build tools
|
||||||
|
License: Apache-2.0
|
||||||
|
URL: https://gitee.com/openharmony/build_lite
|
||||||
|
SOURCE0: bhttps://gitee.com/openharmony/build_lite/repository/archive/%{openHarmony_source_release}.tar.gz #/build_lite-%{openHarmony_source_release}.tar.gz
|
||||||
|
Patch0001: 0001-feat-Adapt-to-Openeuler-python.patch
|
||||||
|
Patch0002: 0002-feat-Adapt-to-Openeuler-productdefine.patch
|
||||||
|
Patch0003: 0003-feat-Adapt-to-Openeule-remove-useless-code.patch
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
Sub component for openEuler embedded softbus build tools
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n build_lite-%{openHarmony_source_release}
|
||||||
|
|
||||||
|
#%build
|
||||||
|
#nothing to do
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d %{buildroot}/opt/distributed-middleware-build/lite
|
||||||
|
cp -rp %{_builddir}/build_lite-%{openHarmony_source_release}/* %{buildroot}/opt/distributed-middleware-build/lite
|
||||||
|
|
||||||
|
%files
|
||||||
|
/opt/distributed-middleware-build/lite
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue May 30 2023 tianhang <tian_hang@hoperun.com> - 1.0.0-1
|
||||||
|
- Init and Adapt to Openeuler
|
||||||
Loading…
x
Reference in New Issue
Block a user