summaryrefslogtreecommitdiffstats
path: root/recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch
blob: a353a2f7a12fb44ad3db12c83c4e0cd365968f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From b9867e6b744b77d97d22333eca3ab3d23d47e2e2 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Thu, 14 Mar 2024 00:19:19 -0700
Subject: [PATCH] cephadm/build.py: avoid using python3 from sysroot when
 creating zipapp archive

ceph has the assumption that the python used during build
is the python used at target, but this is not true for
cross compilation. We'll need to use the target python3 here,
otherwise, the cephadm zipapp cannot be executed.

Upstream-Status: Pending

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 src/cephadm/build.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cephadm/build.py b/src/cephadm/build.py
index 4264b814f1e..a4483d6f79d 100755
--- a/src/cephadm/build.py
+++ b/src/cephadm/build.py
@@ -93,7 +93,7 @@ def _compile(dest, tempdir):
         zipapp.create_archive(
             source=tempdir,
             target=dest,
-            interpreter=sys.executable,
+            interpreter='/usr/bin/python3',
             compressed=True,
         )
         log.info("Zipapp created with compression")
@@ -102,7 +102,7 @@ def _compile(dest, tempdir):
         zipapp.create_archive(
             source=tempdir,
             target=dest,
-            interpreter=sys.executable,
+            interpreter='/usr/bin/python3',
         )
         log.info("Zipapp created without compression")
 
-- 
2.42.0