summaryrefslogtreecommitdiffstats
path: root/debian/patches/fix-cephadm-build.patch
blob: bf63b5a32b03b4d3c8752819511cf928eefe635e (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
44
45
Description: Fix building cephadm with no internet
Author: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Forwarded: no

--- a/src/cephadm/CMakeLists.txt
+++ b/src/cephadm/CMakeLists.txt
@@ -21,7 +21,7 @@
     --set-version-var=CEPH_RELEASE=${CEPH_RELEASE}
     --set-version-var=CEPH_RELEASE_NAME=${CEPH_RELEASE_NAME}
     --set-version-var=CEPH_RELEASE_TYPE=${CEPH_RELEASE_TYPE}
-    --bundled-dependencies=${CEPHADM_BUNDLED_DEPENDENCIES}
+    --bundled-dependencies=none
     ${bin_target_file}
 )
 
@@ -31,3 +31,7 @@
 install(PROGRAMS
   ${bin_target_file}
   DESTINATION ${CMAKE_INSTALL_SBINDIR})
+
+install(DIRECTORY
+  cephadmlib
+  DESTINATION ${Python3_SITELIB})
--- a/src/cephadm/build.py
+++ b/src/cephadm/build.py
@@ -346,7 +346,7 @@
     if has_venv:
         log.info('Attempting to create a virtualenv')
         venv = tempdir / "_venv_"
-        _run([sys.executable, '-m', 'venv', str(venv)])
+        _run([sys.executable, '-m', 'venv', str(venv), "--system-site-packages"])
         executable = str(venv / "bin" / pathlib.Path(executable).name)
         # try to upgrade pip in the virtualenv. if it fails ignore the error
         _run([executable, '-m', 'pip', 'install', '-U', 'pip'])
--- a/src/cephadm/cephadmlib/host_facts.py
+++ b/src/cephadm/cephadmlib/host_facts.py
@@ -719,7 +719,7 @@
                     else:
                         summary = {}  # type: Dict[str, int]
                         for line in profiles.split('\n'):
-                            item, mode = line.split(' ')
+                            *_, mode = line.split(' ')
                             mode = mode.strip('()')
                             if mode in summary:
                                 summary[mode] += 1