mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-29 13:48:36 +02:00
backporting master into devel (devel was behind master)
This commit is contained in:
parent
631c38ee0c
commit
7ce1527394
1 changed files with 0 additions and 285 deletions
|
@ -1,285 +0,0 @@
|
|||
(define-module (glicid packages storage)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system cmake)
|
||||
; #:use-module (guix licenses)
|
||||
#:use-module (gnu packages gawk)
|
||||
#:use-module (gnu packages gcc)
|
||||
#:use-module (gnu packages commencement)
|
||||
#:use-module (guix build-system python)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module ((guix utils) #:select (target-64bit?))
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages admin)
|
||||
#:use-module (gnu packages autotools)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages freeipmi)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages mpi)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages parallel)
|
||||
#:use-module ((gnu packages storage) #:prefix gnu: )
|
||||
#:use-module (gnu packages networking)
|
||||
#:use-module (gnu packages gtk)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages python-science)
|
||||
#:use-module (gnu packages python-web)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages readline)
|
||||
#:use-module (gnu packages tcl)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages commencement)
|
||||
#:use-module (gnu packages gcc)
|
||||
#:use-module (gnu packages chemistry)
|
||||
#:use-module (gnu packages sphinx)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (gnu packages mpi)
|
||||
#:use-module (gnu packages sssd)
|
||||
#:use-module (gnu packages fabric-management)
|
||||
#:use-module (gnu packages benchmark)
|
||||
#:use-module (gnu packages messaging)
|
||||
#:use-module (gnu packages web)
|
||||
#:use-module (gnu packages gnome)
|
||||
#:use-module (gnu packages cluster)
|
||||
#:use-module (gnu packages libevent)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (gnu packages fontutils)
|
||||
#:use-module (gnu packages flex)
|
||||
#:use-module (gnu packages bison)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages autotools)
|
||||
#:use-module (gnu packages fontutils)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (gnu packages maths)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (gnu packages cmake)
|
||||
#:use-module (gnu packages pretty-print)
|
||||
#:use-module (gnu packages boost)
|
||||
#:use-module (gnu packages curl)
|
||||
#:use-module (gnu packages cryptsetup)
|
||||
#:use-module (gnu packages xml)
|
||||
#:use-module (gnu packages admin)
|
||||
#:use-module (gnu packages assembly)
|
||||
#:use-module (gnu packages authentication)
|
||||
#:use-module (gnu packages bdw-gc)
|
||||
#:use-module (gnu packages boost)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages crypto)
|
||||
#:use-module (gnu packages cryptsetup)
|
||||
#:use-module (gnu packages curl)
|
||||
#:use-module (gnu packages databases)
|
||||
#:use-module (gnu packages disk)
|
||||
#:use-module (gnu packages gperf)
|
||||
#:use-module (gnu packages jemalloc)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages lua)
|
||||
#:use-module (gnu packages ncurses)
|
||||
#:use-module (gnu packages networking)
|
||||
#:use-module (gnu packages nss)
|
||||
#:use-module (gnu packages openldap)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages sphinx)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages web)
|
||||
;; #:use-module (gnu packages glicid)
|
||||
#:use-module (gnu packages pretty-print)
|
||||
#:use-module (gnu packages virtualization)
|
||||
|
||||
|
||||
)
|
||||
|
||||
|
||||
(define-public ceph
|
||||
(package
|
||||
(inherit gnu:ceph)
|
||||
(name "ceph")
|
||||
(version "15.2.15")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://download.ceph.com/tarballs/ceph-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1gyh01kwbds4s43nlaj3q1mbyx7lnpw0dz1bncsx865y5vzxmk2x"))
|
||||
(patches
|
||||
(search-patches "ceph-fix-snappy-breaking-change.patch"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
(for-each delete-file-recursively
|
||||
'(;; TODO: Unbundle these:
|
||||
;"src/isa-l"
|
||||
;"src/lua"
|
||||
;"src/xxHash"
|
||||
;"src/zstd"
|
||||
;"src/civetweb"
|
||||
;"src/seastar/fmt"
|
||||
; "src/test/downloads"
|
||||
"src/c-ares"
|
||||
"src/fmt" ;; YD
|
||||
"src/googletest"
|
||||
"src/rapidjson"
|
||||
"src/spdk"
|
||||
"src/rocksdb"
|
||||
"src/boost"))
|
||||
#t))))
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
(let* ((out (assoc-ref %outputs "out"))
|
||||
(lib (assoc-ref %outputs "lib"))
|
||||
(libdir (string-append lib "/lib")))
|
||||
(list (string-append "-DCMAKE_INSTALL_PREFIX=" out)
|
||||
(string-append "-DCMAKE_INSTALL_LIBDIR=" libdir)
|
||||
(string-append "-DCMAKE_INSTALL_INCLUDEDIR="
|
||||
lib "/include")
|
||||
;; We need both libdir and libdir/ceph in RUNPATH.
|
||||
(string-append "-DCMAKE_INSTALL_RPATH="
|
||||
libdir ";" libdir "/ceph")
|
||||
(string-append "-DCMAKE_INSTALL_SYSCONFDIR=" out "/etc")
|
||||
(string-append "-DCMAKE_INSTALL_DATADIR=" lib "/share")
|
||||
(string-append "-DCMAKE_INSTALL_MANDIR=" out "/share/man")
|
||||
(string-append "-DCMAKE_INSTALL_DOCDIR=" out "/share/ceph/doc")
|
||||
(string-append "-DCMAKE_INSTALL_LIBEXECDIR=" out "/libexec")
|
||||
(string-append "-DKEYUTILS_INCLUDE_DIR="
|
||||
(assoc-ref %build-inputs "keyutils") "/include")
|
||||
(string-append "-DXFS_INCLUDE_DIR="
|
||||
(assoc-ref %build-inputs "xfsprogs") "/include")
|
||||
"-DCMAKE_INSTALL_LOCALSTATEDIR=/var"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DWITH_SYSTEM_ROCKSDB=ON"
|
||||
"-DWITH_SYSTEM_BOOST=ON"
|
||||
"-DWITH_PYTHON3=ON"
|
||||
;; TODO: Enable these when available in Guix.
|
||||
"-DWITH_MGR_DASHBOARD_FRONTEND=OFF" ;requires node + nodeenv
|
||||
"-DWITH_BABELTRACE=OFF"
|
||||
"-DWITH_LTTNG=OFF"
|
||||
"-DWITH_SPDK=OFF"
|
||||
"-DWITH_RADOSGW_AMQP_ENDPOINT=OFF"
|
||||
|
||||
;; Use jemalloc instead of tcmalloc.
|
||||
"-DALLOCATOR=jemalloc"
|
||||
|
||||
;; Do not bother building the tests; we are not currently running
|
||||
;; them, and they do not build with system googletest as of 14.2.5.
|
||||
"-DWITH_TESTS=OFF"))
|
||||
;; FIXME: Some of the tests leak Btrfs subvolumes on Btrfs. See
|
||||
;; <https://bugs.gnu.org/29674> for details. Disable tests until
|
||||
;; resolved.
|
||||
#:tests? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch-source
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(lib (assoc-ref outputs "lib")))
|
||||
|
||||
(substitute* "cmake/modules/Distutils.cmake"
|
||||
;; Prevent creation of Python eggs.
|
||||
(("setup.py install")
|
||||
"setup.py install --single-version-externally-managed --root=/"))
|
||||
|
||||
(substitute* (find-files "src/pybind" "^setup\\.py$")
|
||||
;; Here we inject an extra line to the `setup.py' of the
|
||||
;; Python C libraries so RUNPATH gets set up correctly.
|
||||
; (("^([[:blank:]]+)extra_compile_args=(.*)$" _ indent args)
|
||||
; (string-append indent "extra_compile_args=" args
|
||||
; indent "extra_link_args=['-Wl,-rpath="
|
||||
; lib "/lib'],\n")))
|
||||
|
||||
|
||||
(("^([[:blank:]]+)extra_link_args=(.*)$" _ indent args)
|
||||
(string-append indent "extra_link_args=(['-Wl,-rpath=" lib "/lib'] + distutils.sysconfig.get_config_var('LDFLAGS').split() + \n")))
|
||||
|
||||
|
||||
;; Statically link libcrc32 because it does not get installed,
|
||||
;; yet several libraries end up referring to it.
|
||||
(substitute* "src/common/CMakeLists.txt"
|
||||
(("add_library\\(crc32")
|
||||
"add_library(crc32 STATIC"))
|
||||
|
||||
(substitute* "udev/50-rbd.rules"
|
||||
(("/usr/bin/ceph-rbdnamer")
|
||||
(string-append out "/bin/ceph-rbdnamer")))
|
||||
#t)))
|
||||
(add-before 'install 'set-install-environment
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(py3sitedir
|
||||
(string-append out "/lib/python"
|
||||
,(version-major+minor
|
||||
(package-version python))
|
||||
"/site-packages")))
|
||||
;; The Python install scripts refuses to function if
|
||||
;; the install directory is not on PYTHONPATH.
|
||||
(setenv "PYTHONPATH"
|
||||
(string-append py3sitedir ":"
|
||||
(getenv "PYTHONPATH")))
|
||||
#t)))
|
||||
(add-after 'install 'wrap-python-scripts
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(scripts '("ceph" "ceph-mgr" "ceph-volume"))
|
||||
(prettytable (assoc-ref inputs "python-prettytable"))
|
||||
(six (assoc-ref inputs "python-six"))
|
||||
(sitedir (lambda (package)
|
||||
(string-append package
|
||||
"/lib/python"
|
||||
,(version-major+minor
|
||||
(package-version python))
|
||||
"/site-packages")))
|
||||
(PYTHONPATH (string-append
|
||||
(sitedir out) ":"
|
||||
(sitedir six) ":"
|
||||
(sitedir prettytable))))
|
||||
(for-each (lambda (executable)
|
||||
(wrap-program (string-append out "/bin/" executable)
|
||||
`("PYTHONPATH" ":" prefix (,PYTHONPATH))))
|
||||
scripts)
|
||||
#t))))))
|
||||
|
||||
(inputs
|
||||
`(("boost" ,boost)
|
||||
("curl" ,curl)
|
||||
("cryptsetup" ,cryptsetup)
|
||||
("expat" ,expat)
|
||||
("fcgi" ,fcgi)
|
||||
("fmt",fmt) ;; maybe need v5 ?
|
||||
("fuse" ,fuse)
|
||||
("jemalloc" ,jemalloc)
|
||||
("keyutils" ,keyutils)
|
||||
("leveldb" ,leveldb)
|
||||
("libaio" ,libaio)
|
||||
("libatomic-ops" ,libatomic-ops)
|
||||
("libcap-ng" ,libcap-ng)
|
||||
("libnl" ,libnl)
|
||||
("librdkafka" ,librdkafka)
|
||||
("lua" ,lua)
|
||||
("lz4" ,lz4)
|
||||
("oath-toolkit" ,oath-toolkit)
|
||||
("openldap" ,openldap)
|
||||
("openssl" ,openssl)
|
||||
("ncurses" ,ncurses)
|
||||
("nss" ,nss)
|
||||
("python-prettytable" ,python-prettytable) ;used by ceph_daemon.py
|
||||
("python-six" ,python-six) ;for ceph-mgr + plugins
|
||||
("python" ,python-wrapper)
|
||||
("rapidjson" ,rapidjson)
|
||||
("rdma-core" ,rdma-core)
|
||||
("rocksdb" ,rocksdb)
|
||||
("snappy" ,snappy)
|
||||
("udev" ,eudev)
|
||||
("util-linux" ,util-linux)
|
||||
("util-linux:lib" ,util-linux "lib")
|
||||
("xfsprogs" ,xfsprogs)
|
||||
("zlib" ,zlib)))
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue