Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos
Commits
32c3881e
Commit
32c3881e
authored
Apr 20, 2022
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component/ceph: Introduce
parent
3d9c6aba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
216 additions
and
0 deletions
+216
-0
component/ceph/buildout.cfg
component/ceph/buildout.cfg
+115
-0
component/ceph/ceph-minimal.patch
component/ceph/ceph-minimal.patch
+101
-0
No files found.
component/ceph/buildout.cfg
0 → 100644
View file @
32c3881e
[buildout]
extends =
../boost-lib/buildout.cfg
../cmake/buildout.cfg
../cryptsetup/buildout.cfg
../curl/buildout.cfg
../keyutils/buildout.cfg
../libnl/buildout.cfg
../ncurses/buildout.cfg
../ninja/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../snappy/buildout.cfg
../systemd/buildout.cfg
../util-linux/buildout.cfg
../zlib/buildout.cfg
../pkgconfig/buildout.cfg
[pyyaml-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/${:filename}
filename = PyYAML-5.1.2.tar.gz
md5sum = 20f87ab421b0271dbf371dc5c1cddb5c
[pyaml-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/b6/f0/dbb524509ce28f5cfd4e1d9e3ef955f51186cfd1b8297f6e158778c4a8ef/${:filename}
filename = pyaml-21.10.1.tar.gz
md5sum = a915f577f6fc62344fa4775b22db9052
[librbd-python]
recipe = slapos.recipe.build
shared = true
pyyaml = ${pyyaml-download:target}
pyaml = ${pyaml-download:target}
install =
import os
call([options['python'], '-m', 'venv', '--clear', location])
pip = os.path.join(location, 'bin', 'pip')
call([pip, 'install', '--no-index', options['pyyaml'], options['pyaml']])
call([pip, 'uninstall', '-y', 'pip', 'setuptools'])
# selftest
python = os.path.join(location, 'bin', 'python3')
call([python, '-c', 'import yaml'])
python = ${python3:executable}
[librbd-python:python3]
python = ${buildout:executable}
[librbd]
# CEPH only for librbd
recipe = slapos.recipe.cmmi
shared = true
url = https://download.ceph.com/tarballs/ceph_17.1.0.orig.tar.gz
md5sum = 1f2ed3f17f76ea71d555428f26644610
# Note: SlapOSifying whole ceph, including it's managers, is an enormous effort
# so only "librbd" is provided with header files and this requires
# careful selection and ordering of ninja's targets and also manual
# copying of common library
configure-command = cmake
make-binary = ninja -C build librbd librados
make-targets = src/librbd/install src/librados/install src/common/install src/include/install ; cp build/lib/libceph-common.so build/lib/libceph-common.so.2 %(location)s/lib ; cd %(location)s/lib
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${:_profile_base_location_}/ceph-minimal.patch#a84c4d30586c8b8f87a581fed5fbf5d8
CMAKE_LIBRARY_PATH="${util-linux:location}/lib;${ncurses:location}/lib;${keyutils:location}/x86_64-linux-gnu;${cryptsetup:location}/lib;${snappy:location}/lib;${systemd:location}/lib64;${zlib:location}/lib;${libnl:location}/lib;${boost-lib:location}/lib;${curl:location}/lib;${openssl:location}/lib"
CMAKE_INCLUDE_PATH="${systemd:location}/include;${util-linux:location}/include;${boost-lib:location}/include;${ncurses:location}/include;${keyutils:location}/include;${cryptsetup:location}/include;${snappy:location}/include;${zlib:location}/include;${libnl:location}/include;${curl:location}/include;${openssl:location}/include"
environment =
PATH=${cmake:location}/bin:${ninja:location}/bin:${patch:location}/bin:${pkgconfig:location}/bin:${librbd-python:location}/bin:%(PATH)s
configure-options =
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INCLUDE_PATH=${:CMAKE_INCLUDE_PATH}
-DCMAKE_INSTALL_PREFIX=%(location)s
-DCMAKE_LIBRARY_PATH=${:CMAKE_LIBRARY_PATH}
-DCMAKE_INSTALL_RPATH=%(location)s/lib
-DDEBUG_GATHER=OFF
-DWITH_SYSTEM_ROCKSDB=OFF
-DWITH_BABELTRACE=OFF
-DWITH_BLUESTORE=OFF
-DWITH_CEPHFS=OFF
-DWITH_FUSE=OFF
-DWITH_FUSE=OFF
-DWITH_KRBD=OFF
-DWITH_LIBCEPHFS=OFF
-DWITH_LIBCEPHSQLITE=OFF
-DWITH_LTTNG=OFF
-DWITH_LZ4=OFF
-DWITH_MANPAGE=OFF
-DWITH_MGR=OFF
-DWITH_MGR_DASHBOARD_FRONTEND=OFF
-DWITH_OPENLDAP=OFF
-DWITH_RADOSGW=OFF
-DWITH_RADOSGW_AMQP_ENDPOINT=OFF
-DWITH_RADOSGW_BEAST_OPENSSL=OFF
-DWITH_RADOSGW_DBSTORE=OFF
-DWITH_RADOSGW_KAFKA_ENDPOINT=OFF
-DWITH_RADOSGW_LUA_PACKAGES=OFF
-DWITH_RADOSGW_SELECT_PARQUET=OFF
-DWITH_RBD=ON
-DWITH_RDMA=OFF
-DWITH_SYSTEMD=OFF
-DWITH_SYSTEM_BOOST=ON
-DWITH_TESTS=OFF
-DWITH_XFS=OFF
-GNinja
-S . -B build
component/ceph/ceph-minimal.patch
0 → 100644
View file @
32c3881e
From 3884a23340defa68ce84590e4a3175d7ea59bbbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Mon, 11 Apr 2022 13:49:17 +0200
Subject: [PATCH 1/3] cmake: Drop FindCython.cmake
Cython is not required while building minimal ceph - librbd only support,
and dropping it simplifies build process and removes a lot of additional
dependencies.
---
cmake/modules/FindCython.cmake | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/cmake/modules/FindCython.cmake b/cmake/modules/FindCython.cmake
index 8eb9e42f402..e69de29bb2d 100644
--- a/cmake/modules/FindCython.cmake
+++ b/cmake/modules/FindCython.cmake
@@ -1,16 +0,0 @@
-#
-# Cython
-#
-
-# Try to run Cython, to make sure it works:
-execute_process(
- COMMAND ${Python3_EXECUTABLE} -m cython --version
- RESULT_VARIABLE cython_result
- ERROR_VARIABLE cython_output)
-if(cython_result EQUAL 0)
- string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+).*" "\\1" CYTHON_VERSION "${cython_output}")
-else()
- message(SEND_ERROR "Could not find cython${PYTHON_VERSION}: ${cython_output}")
-endif()
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Cython${PYTHON_VERSION} DEFAULT_MSG CYTHON_VERSION)
--
2.30.2
From 17131b5c0619a8bf2e56e6a8d63649d3d1b2a432 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Mon, 11 Apr 2022 13:50:33 +0200
Subject: [PATCH 2/3] librbd: drop needless udev
It's automatically added by cmake and such configuration results with linker
not being able to find libudev in case if it lives outside of typical
directory structure.
---
src/librbd/CMakeLists.txt | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/librbd/CMakeLists.txt b/src/librbd/CMakeLists.txt
index ad23f0975fd..5bd011bf242 100644
--- a/src/librbd/CMakeLists.txt
+++ b/src/librbd/CMakeLists.txt
@@ -337,10 +337,6 @@
target_link_libraries(librbd PRIVATE
pthread
${CMAKE_DL_LIBS}
${EXTRALIBS} ${GSSAPI_LIBRARIES})
-if(HAVE_UDEV)
- target_link_libraries(librbd PRIVATE
- udev)
-endif()
if(ENABLE_SHARED)
set_target_properties(librbd PROPERTIES
OUTPUT_NAME rbd
--
2.30.2
From 7d16861edea2609e0f6b29b146ed928c63a6ee08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Mon, 11 Apr 2022 13:50:03 +0200
Subject: [PATCH 3/3] common: Fix missing cmake declarations
Original ceph build process can't find some dependencies in case if it's run
on machines which do not have installed in standard /usr locations.
---
src/common/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 3bf28659e1c..005d08c1caa 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -184,6 +184,8 @@
add_library(common-common-objs OBJECT
# retrieved OpenSSL location. This is especially important when cross
# compiling (e.g. targeting Windows).
target_include_directories(common-common-objs PRIVATE ${OPENSSL_INCLUDE_DIR})
+target_include_directories(common-common-objs PRIVATE ${UDEV_INCLUDE_DIR})
+target_include_directories(common-common-objs PRIVATE ${BLKID_INCLUDE_DIR})
# for options.cc
target_compile_definitions(common-common-objs PRIVATE
"CMAKE_INSTALL_LIBDIR=\"${CMAKE_INSTALL_LIBDIR}\""
@@ -241,4 +243,5 @@
if(HAVE_KEYUTILS)
set(parse_secret_srcs
secret.c)
add_library(parse_secret_objs OBJECT ${parse_secret_srcs})
+ target_include_directories(parse_secret_objs PRIVATE ${KEYUTILS_INCLUDE_DIR})
endif()
--
2.30.2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment