[packages/ceph] - don't try to fetch and install python deps for cephadm

baggins baggins at pld-linux.org
Sun Dec 22 15:30:40 CET 2024


commit 29b44aba3885cc9581318e03b16c02042521cc0d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Dec 22 15:47:27 2024 +0100

    - don't try to fetch and install python deps for cephadm

 ceph.spec            |  4 ++++
 no-python-deps.patch | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)
---
diff --git a/ceph.spec b/ceph.spec
index 450d01a..25cdaa0 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -80,6 +80,7 @@ Patch13:	boost-1.86.patch
 Patch14:	boost-1.87.patch
 Patch15:	x32.patch
 Patch16:	ix86.patch
+Patch17:	no-python-deps.patch
 URL:		https://ceph.io/
 %{?with_qatzip:BuildRequires:	QATzip-devel}
 %{?with_babeltrace:BuildRequires:	babeltrace-devel}
@@ -182,6 +183,8 @@ Requires(preun):	rc-scripts
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	lz4 >= 1:1.7.3
 Requires:	python3-%{name} = %{version}-%{release}
+Requires:	python3-jinja2 >= 3.1.2
+Requires:	python3-markupsafe >= 2.1.3
 %{?with_system_rocksdb:Requires:	rocksdb >= 5.14}
 Requires:	systemd-units >= 38
 Requires:	zstd >= 1.4.4
@@ -357,6 +360,7 @@ uruchamiania demonów.
 %patch -P 14 -p1
 %patch -P 15 -p1
 %patch -P 16 -p1
+%patch -P 17 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' \
 	src/{ceph-post-file.in,rbd-replay-many,rbdmap} \
diff --git a/no-python-deps.patch b/no-python-deps.patch
new file mode 100644
index 0000000..f0d5c52
--- /dev/null
+++ b/no-python-deps.patch
@@ -0,0 +1,37 @@
+--- ceph-19.2.0/src/cephadm.orig/build.py	2024-12-22 14:34:36.723333480 +0100
++++ ceph-19.2.0/src/cephadm/build.py	2024-12-22 15:09:43.746666771 +0100
+@@ -51,12 +51,12 @@
+ PY36_REQUIREMENTS = [
+     {
+         'package_spec': 'MarkupSafe >= 2.0.1, <2.2',
+-        'from_source': True,
++        'from_source': False,
+         'unique': True,
+     },
+     {
+         'package_spec': 'Jinja2 >= 3.0.2, <3.2',
+-        'from_source': True,
++        'from_source': False,
+         'unique': True,
+     },
+     {
+@@ -69,8 +69,8 @@
+     },
+ ]
+ PY_REQUIREMENTS = [
+-    {'package_spec': 'MarkupSafe >= 2.1.3, <2.2', 'from_source': True},
+-    {'package_spec': 'Jinja2 >= 3.1.2, <3.2', 'from_source': True},
++    {'package_spec': 'MarkupSafe >= 2.1.3, <2.2', 'from_source': False},
++    {'package_spec': 'Jinja2 >= 3.1.2, <3.2', 'from_source': False},
+     # We can not install PyYAML using sources. Unlike MarkupSafe it requires
+     # Cython to build and Cython must be compiled and there's not clear way past
+     # the requirement in pyyaml's pyproject.toml. Instead, rely on fetching
+@@ -161,7 +161,7 @@
+     def __init__(self, cli_args):
+         self.cli_args = cli_args
+         self._maj_min = sys.version_info[0:2]
+-        self.install_dependencies = True
++        self.install_dependencies = False
+         self.deps_mode = DependencyMode[cli_args.bundled_dependencies]
+         if self.deps_mode == DependencyMode.none:
+             self.install_dependencies = False
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ceph.git/commitdiff/29b44aba3885cc9581318e03b16c02042521cc0d



More information about the pld-cvs-commit mailing list