2016-12-27 21:40:41 +01:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2018-02-21 15:24:00 +01:00
|
|
|
;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
|
2017-12-28 08:20:17 +01:00
|
|
|
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
|
2016-12-27 21:40:41 +01:00
|
|
|
;;;
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu packages storage)
|
|
|
|
#:use-module (guix download)
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (guix utils)
|
|
|
|
#:use-module (guix build-system cmake)
|
|
|
|
#:use-module (gnu packages)
|
|
|
|
#:use-module (gnu packages admin)
|
|
|
|
#:use-module (gnu packages assembly)
|
2018-09-27 18:41:50 +02:00
|
|
|
#:use-module (gnu packages authentication)
|
2016-12-27 21:40:41 +01:00
|
|
|
#:use-module (gnu packages bdw-gc)
|
|
|
|
#:use-module (gnu packages boost)
|
gnu: Move testing packages from python.scm to check.scm.
* gnu/packages/python.scm (python-behave-web-api, python2-behave-web-api,
python-mock, python2-mock, python-mock-2, python-nose, python2-nose,
python-nose2, python2-nose2, python-unittest2, python2-unittest2,
python-pytest, python2-pytest, python-pytest-3.0, python2-pytest-3.0,
python-pytest-cov, python2-pytest-cov, python-pytest-runner,
python2-pytest-runner, python-pytest-mock, python2-pytest-mock,
python-pytest-xdist, python2-pytest-xdist, python-scripttest,
python2-scripttest, python-testtools, python2-testtools, python-testscenarios,
python2-testscenarios, python-testresources, python2-testresources,
python-subunit, python2-subunit, python-fixtures, python2-fixtures,
python-testrepository, python2-testrepository, python-coverage,
python2-coverage, python-cov-core, python2-cov-core, python-testpath,
python2-testpath, python-testlib, python2-testlib, python-pytest-cache,
python2-pytest-cache, python-pytest-localserver, python-pytest-xprocess,
python-pytest-subtesthack, python2-pytest-subtesthack, python-hypothesis,
python2-hypothesis, python-lit, python2-lit, python-pytest-pep8,
python2-pytest-pep8, python-pytest-flakes, python2-pytest-flakes,
python2-coverage-test-runner, python-pylint, python2-pylint,
python-paramunittest, python2-python-paramunittest, python-pytest-warnings,
python2-pytest-warnings, python-pytest-capturelog, python2-pytest-capturelog,
python-pytest-catchlog, python2-pytest-catchlog, python-nosexcover,
python2-nosexcover, python-discover, python2-discover, behave, python-rednose,
python2-rednose, python-nose-randomly, python2-nose-randomly,
python-nose-timer, python2-nose-timer): Move from here...
* gnu/packages/check.scm: ...to here.
* gnu/packages/admin.scm,
gnu/packages/android.scm,
gnu/packages/backup.scm,
gnu/packages/bioinformatics.scm,
gnu/packages/calendar.scm,
gnu/packages/dav.scm,
gnu/packages/django.scm,
gnu/packages/freedesktop.scm,
gnu/packages/haskell.scm,
gnu/packages/image.scm,
gnu/packages/irc.scm,
gnu/packages/jrnl.scm,
gnu/packages/ldc.scm,
gnu/packages/libffi.scm,
gnu/packages/mail.scm,
gnu/packages/mpd.scm,
gnu/packages/openstack.scm,
gnu/packages/package-management.scm,
gnu/packages/password-utils.scm,
gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm,
gnu/packages/rdf.scm,
gnu/packages/statistics.scm,
gnu/packages/storage.scm,
gnu/packages/time.scm,
gnu/packages/tls.scm,
gnu/packages/tor.scm,
gnu/packages/tryton.scm: Adjust accordingly.
2017-11-17 21:42:23 +01:00
|
|
|
#:use-module (gnu packages check)
|
2016-12-27 21:40:41 +01:00
|
|
|
#: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)
|
2018-09-27 18:41:50 +02:00
|
|
|
#:use-module (gnu packages gcc)
|
2016-12-27 21:40:41 +01:00
|
|
|
#:use-module (gnu packages gnuzilla)
|
2018-02-21 15:24:00 +01:00
|
|
|
#:use-module (gnu packages gperf)
|
2016-12-27 21:40:41 +01:00
|
|
|
#:use-module (gnu packages jemalloc)
|
|
|
|
#:use-module (gnu packages linux)
|
|
|
|
#:use-module (gnu packages lua)
|
|
|
|
#:use-module (gnu packages openldap)
|
|
|
|
#:use-module (gnu packages perl)
|
|
|
|
#:use-module (gnu packages pkg-config)
|
|
|
|
#:use-module (gnu packages python)
|
gnu: Separate Python core packages from the rest.
* gnu/packages/python.scm: Move hundreds of package definitions from here...
* gnu/packages/python-xyz.scm: ...to this new module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/ada.scm,
gnu/packages/admin.scm,
gnu/packages/android.scm,
gnu/packages/audio.scm,
gnu/packages/backup.scm,
gnu/packages/benchmark.scm,
gnu/packages/bioinformatics.scm,
gnu/packages/bittorrent.scm,
gnu/packages/calendar.scm,
gnu/packages/check.scm,
gnu/packages/chemistry.scm,
gnu/packages/cluster.scm,
gnu/packages/compression.scm,
gnu/packages/connman.scm,
gnu/packages/crypto.scm,
gnu/packages/cups.scm,
gnu/packages/databases.scm,
gnu/packages/dav.scm,
gnu/packages/direct-connect.scm,
gnu/packages/disk.scm,
gnu/packages/django.scm,
gnu/packages/dlang.scm,
gnu/packages/docker.scm,
gnu/packages/ebook.scm,
gnu/packages/elf.scm,
gnu/packages/emacs.scm,
gnu/packages/emulators.scm,
gnu/packages/engineering.scm,
gnu/packages/enlightenment.scm,
gnu/packages/finance.scm,
gnu/packages/fltk.scm,
gnu/packages/fontutils.scm,
gnu/packages/freedesktop.scm,
gnu/packages/game-development.scm,
gnu/packages/games.scm,
gnu/packages/geo.scm,
gnu/packages/gl.scm,
gnu/packages/glib.scm,
gnu/packages/gnome.scm,
gnu/packages/gnupg.scm,
gnu/packages/gnuzilla.scm,
gnu/packages/graph.scm,
gnu/packages/graphics.scm,
gnu/packages/graphviz.scm,
gnu/packages/gtk.scm,
gnu/packages/ham-radio.scm,
gnu/packages/image-processing.scm,
gnu/packages/image-viewers.scm,
gnu/packages/image.scm,
gnu/packages/irc.scm,
gnu/packages/jrnl.scm,
gnu/packages/julia.scm,
gnu/packages/kde-frameworks.scm,
gnu/packages/key-mon.scm,
gnu/packages/libffi.scm,
gnu/packages/libreoffice.scm,
gnu/packages/libusb.scm,
gnu/packages/lirc.scm,
gnu/packages/logging.scm,
gnu/packages/machine-learning.scm,
gnu/packages/mail.scm,
gnu/packages/mate.scm,
gnu/packages/maths.scm,
gnu/packages/medical.scm,
gnu/packages/messaging.scm,
gnu/packages/monitoring.scm,
gnu/packages/mp3.scm,
gnu/packages/mpd.scm,
gnu/packages/music.scm,
gnu/packages/networking.scm,
gnu/packages/nutrition.scm,
gnu/packages/openldap.scm,
gnu/packages/openstack.scm,
gnu/packages/package-management.scm,
gnu/packages/password-utils.scm,
gnu/packages/patchutils.scm,
gnu/packages/pdf.scm,
gnu/packages/photo.scm,
gnu/packages/polkit.scm,
gnu/packages/protobuf.scm,
gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm,
gnu/packages/qt.scm,
gnu/packages/rdf.scm,
gnu/packages/ruby.scm,
gnu/packages/search.scm,
gnu/packages/selinux.scm,
gnu/packages/serialization.scm,
gnu/packages/shells.scm,
gnu/packages/simulation.scm,
gnu/packages/ssh.scm,
gnu/packages/statistics.scm,
gnu/packages/storage.scm,
gnu/packages/sync.scm,
gnu/packages/terminals.scm,
gnu/packages/textutils.scm,
gnu/packages/time.scm,
gnu/packages/tls.scm,
gnu/packages/tor.scm,
gnu/packages/tryton.scm,
gnu/packages/version-control.scm,
gnu/packages/video.scm,
gnu/packages/virtualization.scm,
gnu/packages/vpn.scm,
gnu/packages/web-browsers.scm,
gnu/packages/web.scm,
gnu/packages/wicd.scm,
gnu/packages/xdisorg.scm,
gnu/packages/xorg.scm: Update module references.
2019-01-15 14:21:30 +01:00
|
|
|
#:use-module (gnu packages python-xyz)
|
2016-12-27 21:40:41 +01:00
|
|
|
#:use-module (gnu packages tls)
|
|
|
|
#:use-module (gnu packages web)
|
|
|
|
#:use-module (gnu packages xml))
|
|
|
|
|
|
|
|
(define-public ceph
|
|
|
|
(package
|
|
|
|
(name "ceph")
|
2019-03-15 16:16:42 +01:00
|
|
|
(version "13.2.5")
|
2016-12-27 21:40:41 +01:00
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://download.ceph.com/tarballs/ceph-"
|
|
|
|
version ".tar.gz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2019-03-15 16:16:42 +01:00
|
|
|
"0jbs6l763clbqnq2s5jksn44yf71rhcnk85cw64fqvmv0r4ch71n"))
|
2016-12-27 21:40:41 +01:00
|
|
|
(patches
|
|
|
|
(search-patches "ceph-skip-unittest_blockdev.patch"
|
|
|
|
"ceph-skip-collect-sys-info-test.patch"
|
2018-09-27 18:41:50 +02:00
|
|
|
"ceph-detect-rocksdb.patch"
|
|
|
|
"ceph-volume-respect-PATH.patch"
|
2016-12-27 21:40:41 +01:00
|
|
|
"ceph-disable-cpu-optimizations.patch"))
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
(snippet
|
|
|
|
'(begin
|
|
|
|
(for-each delete-file-recursively
|
|
|
|
'(;; TODO: Unbundle these:
|
|
|
|
;"src/isa-l"
|
|
|
|
;"src/lua"
|
|
|
|
;"src/googletest"
|
|
|
|
;"src/xxHash"
|
|
|
|
;"src/zstd"
|
|
|
|
;"src/civetweb"
|
|
|
|
"src/test/downloads"
|
2018-09-27 18:41:50 +02:00
|
|
|
"src/rapidjson"
|
2016-12-27 21:40:41 +01:00
|
|
|
"src/spdk"
|
|
|
|
"src/rocksdb"
|
|
|
|
"src/boost"))
|
|
|
|
#t))))
|
|
|
|
(build-system cmake-build-system)
|
|
|
|
(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)
|
2019-03-15 17:48:35 +01:00
|
|
|
(string-append "-DCMAKE_INSTALL_INCLUDEDIR="
|
|
|
|
lib "/include")
|
2016-12-27 21:40:41 +01:00
|
|
|
;; 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_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")
|
2019-03-15 18:03:00 +01:00
|
|
|
(string-append "-DXFS_INCLUDE_DIR="
|
|
|
|
(assoc-ref %build-inputs "xfsprogs") "/include")
|
2016-12-27 21:40:41 +01:00
|
|
|
"-DCMAKE_INSTALL_LOCALSTATEDIR=/var"
|
|
|
|
"-DENABLE_SHARED=ON"
|
|
|
|
"-DWITH_SYSTEM_ROCKSDB=ON"
|
|
|
|
"-DWITH_SYSTEM_BOOST=ON"
|
|
|
|
"-DWITH_PYTHON3=ON"
|
|
|
|
;; TODO: Enable these when available in Guix.
|
2018-09-27 18:41:50 +02:00
|
|
|
"-DWITH_MGR_DASHBOARD_FRONTEND=OFF" ;requires node + nodeenv
|
2018-02-21 15:24:00 +01:00
|
|
|
"-DWITH_BABELTRACE=OFF"
|
2016-12-27 21:40:41 +01:00
|
|
|
"-DWITH_LTTNG=OFF"
|
2018-09-27 18:41:50 +02:00
|
|
|
"-DWITH_SPDK=OFF"
|
2016-12-27 21:40:41 +01:00
|
|
|
"-DWITH_XIO=OFF"
|
|
|
|
;; Use jemalloc instead of tcmalloc.
|
|
|
|
"-DALLOCATOR=jemalloc"))
|
2017-12-28 08:20:17 +01:00
|
|
|
;; FIXME: Some of the tests leak Btrfs subvolumes on Btrfs. See
|
|
|
|
;; <https://bugs.gnu.org/29674> for details. Disable tests until
|
|
|
|
;; resolved.
|
|
|
|
#:tests? #f
|
2016-12-27 21:40:41 +01:00
|
|
|
#: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")))
|
|
|
|
|
|
|
|
(substitute* "src/ceph-disk/tox.ini"
|
|
|
|
;; Disable flake8 test since it complains about too long lines.
|
|
|
|
(("envlist = flake8,py27") "envlist = py27"))
|
|
|
|
|
|
|
|
(substitute* "src/ceph-detect-init/tox.ini"
|
|
|
|
;; Disable python3 tests until we at least get py2 working.
|
|
|
|
(("envlist = pep8,py27,py3") "envlist = pep8,py27"))
|
|
|
|
|
|
|
|
(substitute* "src/key_value_store/kv_flat_btree_async.cc"
|
|
|
|
(("/usr/include/") ""))
|
|
|
|
|
|
|
|
(substitute* "src/test/test_subprocess.cc"
|
|
|
|
(("/bin/sh") (which "sh")))
|
2018-02-21 15:24:00 +01:00
|
|
|
(substitute* "qa/standalone/special/ceph_objectstore_tool.py"
|
2016-12-27 21:40:41 +01:00
|
|
|
(("/bin/rm") (which "rm")))
|
|
|
|
(substitute* "src/ceph-disk/ceph_disk/main.py"
|
|
|
|
(("/bin/mount") "mount")
|
|
|
|
(("/bin/umount") "umount")
|
|
|
|
(("/sbin/blkid") (which "blkid"))
|
2018-02-21 15:24:00 +01:00
|
|
|
(("'cryptsetup'") (string-append "'" (which "cryptsetup") "'"))
|
2016-12-27 21:40:41 +01:00
|
|
|
(("'sgdisk'") (string-append "'" (which "sgdisk") "'"))
|
|
|
|
(("'parted'") (string-append "'" (which "parted") "'"))
|
|
|
|
(("'udevadm'") (string-append "'" (which "udevadm") "'")))
|
|
|
|
|
|
|
|
(substitute* "udev/50-rbd.rules"
|
|
|
|
(("/usr/bin/ceph-rbdnamer")
|
|
|
|
(string-append out "/bin/ceph-rbdnamer")))
|
|
|
|
(substitute* "udev/60-ceph-by-parttypeuuid.rules"
|
|
|
|
(("/sbin/blkid") (which "blkid")))
|
|
|
|
(substitute* "udev/95-ceph-osd.rules"
|
|
|
|
(("/usr/sbin/ceph-disk")
|
|
|
|
(string-append out "/bin/ceph-disk")))
|
|
|
|
|
|
|
|
(substitute* "src/test/run-cli-tests"
|
|
|
|
;; Use our python-cram instead of the (un)bundled one.
|
|
|
|
(("CRAM_BIN=.*$")
|
|
|
|
(string-append "CRAM_BIN=" (which "cram") "\n")))
|
|
|
|
|
|
|
|
;; Disable tests that are known to fail.
|
|
|
|
;; TODO: The majority of these fail because
|
|
|
|
;; 'qa/workunits/ceph-helpers.sh' expects to find
|
|
|
|
;; /tmp/ceph-disk-virtualenv/bin/ceph-disk, but somehow
|
|
|
|
;; src/ceph-disk/CMakeLists.txt fails to create it.
|
|
|
|
(substitute* "src/test/CMakeLists.txt"
|
|
|
|
;; FIXME: These tests fails because `ceph-disk'
|
|
|
|
;; is not available.
|
|
|
|
(("^add_ceph_test\\(test-ceph-helpers\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(test_pidfile\\.sh.*$") "\n")
|
|
|
|
;; XXX Why does this fail.
|
|
|
|
(("^add_ceph_test\\(cephtool-test-mon\\.sh.*$") "\n")
|
|
|
|
;; This fails due to missing '/etc/fstab'.
|
|
|
|
(("^add_ceph_test\\(cephtool-test-rados\\.sh.*$") "\n")
|
|
|
|
;; `Bad messages to stderr: OSD has the store locked'
|
|
|
|
(("^add_ceph_test\\(ceph_objectstore_tool\\.py.*$") "\n")
|
|
|
|
;; The bundled python-cram fork needs patching to work on
|
|
|
|
;; guix, and the system version does not support --error-dir.
|
|
|
|
;; https://bitbucket.org/brodie/cram/issues/9
|
|
|
|
(("^add_ceph_test\\(run-cli-tests.*$") "\n")
|
|
|
|
;; FIXME: tox/virtualenv/pip does not discover the
|
|
|
|
;; required packages and tries to go online.
|
|
|
|
(("^add_test\\(NAME run-tox-ceph-disk.*$") "\n")
|
|
|
|
(("^add_test\\(NAME run-tox-ceph-detect-init.*$") "\n")
|
|
|
|
;; Also remove from the set_property block.
|
|
|
|
(("run-tox-ceph-disk") "")
|
|
|
|
(("run-tox-ceph-detect-init") ""))
|
2017-03-30 13:44:46 +02:00
|
|
|
;; TODO: This also seems to fail because of /etc/os-release.
|
|
|
|
;; How to make src/common/util.cc behave without it.
|
|
|
|
(substitute* "src/test/crush/CMakeLists.txt"
|
|
|
|
(("^add_ceph_test\\(crush-classes\\.sh.*$") "\n"))
|
2016-12-27 21:40:41 +01:00
|
|
|
;; More 'ceph-disk' issues here.. :-(
|
|
|
|
(substitute* "src/test/erasure-code/CMakeLists.txt"
|
|
|
|
(("^add_ceph_test\\(test-erasure-code-plugins\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(test-erasure-code\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(test-erasure-eio\\.sh.*$") "\n"))
|
|
|
|
(substitute* "src/test/libradosstriper/CMakeLists.txt"
|
|
|
|
(("^add_ceph_test\\(rados-striper\\.sh.*$") "\n"))
|
|
|
|
(substitute* "src/test/mon/CMakeLists.txt"
|
|
|
|
(("^add_ceph_test\\(osd-crush\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(test_pool_quota\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(osd-pool-create\\.sh.*$") "\n"))
|
|
|
|
(substitute* "src/test/osd/CMakeLists.txt"
|
|
|
|
(("^add_ceph_test\\(osd-bench\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(osd-config\\.sh.*$") "\n")
|
2017-04-25 16:10:49 +02:00
|
|
|
(("add_ceph_test\\(osd-dup\\.sh.*$") "\n")
|
2016-12-27 21:40:41 +01:00
|
|
|
(("^add_ceph_test\\(osd-markdown\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(osd-reactivate\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(osd-reuse-id\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(osd-scrub-repair\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(osd-scrub-snaps\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(osd-copy-from\\.sh.*$") "\n")
|
|
|
|
(("^add_ceph_test\\(osd-fast-mark-down\\.sh.*$") "\n"))
|
|
|
|
#t)))
|
2018-09-27 18:41:50 +02:00
|
|
|
(add-before 'configure 'gcc-workaround
|
|
|
|
(lambda _
|
|
|
|
(unsetenv "C_INCLUDE_PATH")
|
|
|
|
(unsetenv "CPLUS_INCLUDE_PATH")
|
|
|
|
#t))
|
2016-12-27 21:40:41 +01:00
|
|
|
(add-before 'check 'set-check-environment
|
|
|
|
(lambda _
|
|
|
|
;; Run tests in parallel.
|
|
|
|
(setenv "CTEST_PARALLEL_LEVEL"
|
|
|
|
(number->string (parallel-job-count)))
|
|
|
|
;; `pip' requires write access in $HOME.
|
|
|
|
(setenv "HOME" "/tmp")
|
|
|
|
#t))
|
|
|
|
(add-before 'install 'set-install-environment
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
(py2sitedir
|
|
|
|
(string-append out "/lib/python2.7/site-packages"))
|
|
|
|
(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 py2sitedir ":" py3sitedir ":"
|
|
|
|
(getenv "PYTHONPATH")))
|
|
|
|
#t)))
|
|
|
|
(add-after 'install 'wrap-python-scripts
|
2018-02-21 15:24:00 +01:00
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
2016-12-27 21:40:41 +01:00
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
2018-09-27 18:41:50 +02:00
|
|
|
(scripts '("ceph" "ceph-mgr" "ceph-volume"
|
|
|
|
"ceph-detect-init"
|
|
|
|
"ceph-disk")) ;deprecated
|
2018-02-21 15:24:00 +01:00
|
|
|
(prettytable (assoc-ref inputs "python2-prettytable"))
|
2018-09-27 18:41:50 +02:00
|
|
|
(six (assoc-ref inputs "python2-six"))
|
2018-02-21 15:24:00 +01:00
|
|
|
(sitedir (lambda (package)
|
|
|
|
(string-append package
|
|
|
|
"/lib/python2.7/site-packages")))
|
|
|
|
(PYTHONPATH (string-append
|
|
|
|
(sitedir out) ":"
|
2018-09-27 18:41:50 +02:00
|
|
|
(sitedir six) ":"
|
2018-02-21 15:24:00 +01:00
|
|
|
(sitedir prettytable))))
|
2016-12-27 21:40:41 +01:00
|
|
|
(for-each (lambda (executable)
|
2018-09-27 18:41:50 +02:00
|
|
|
(wrap-program (string-append out "/bin/" executable)
|
2016-12-27 21:40:41 +01:00
|
|
|
`("PYTHONPATH" ":" prefix (,PYTHONPATH))))
|
2018-09-27 18:41:50 +02:00
|
|
|
scripts)
|
2016-12-27 21:40:41 +01:00
|
|
|
#t))))))
|
|
|
|
(outputs
|
|
|
|
'("out" "lib"))
|
|
|
|
(native-inputs
|
2018-09-27 18:41:50 +02:00
|
|
|
`(("gcc" ,gcc-7) ;7 or later is required
|
|
|
|
("gperf" ,gperf)
|
2018-02-21 15:24:00 +01:00
|
|
|
("pkg-config" ,pkg-config)
|
2016-12-27 21:40:41 +01:00
|
|
|
("python-cython" ,python-cython)
|
|
|
|
("python-sphinx" ,python-sphinx)
|
|
|
|
("yasm" ,yasm)
|
|
|
|
|
|
|
|
;; For tests.
|
|
|
|
("inetutils" ,inetutils)
|
|
|
|
("jq" ,jq)
|
|
|
|
("perl" ,perl)
|
|
|
|
("xmlstarlet" ,xmlstarlet)
|
|
|
|
("python2-cram" ,python2-cram)
|
|
|
|
("python2-virtualenv" ,python2-virtualenv)
|
|
|
|
|
|
|
|
;; These dependencies are taken from test-requirements.txt
|
|
|
|
;; of ceph-disk and ceph-detect-init. The latter can also
|
|
|
|
;; test against python3, but let's try to get python2 tests
|
|
|
|
;; working first since that is the default.
|
|
|
|
("python2-configobj" ,python2-configobj)
|
|
|
|
("python2-coverage" ,python2-coverage)
|
|
|
|
("python2-discover" ,python2-discover)
|
|
|
|
("python2-fixtures" ,python2-fixtures)
|
|
|
|
("python2-flake8" ,python2-flake8)
|
|
|
|
("python2-mock" ,python2-mock)
|
|
|
|
("python2-nose" ,python2-nose)
|
|
|
|
("python2-pip" ,python2-pip)
|
|
|
|
("python2-pytest" ,python2-pytest)
|
|
|
|
("python2-subunit" ,python2-subunit)
|
|
|
|
("python2-testrepository" ,python2-testrepository)
|
|
|
|
("python2-testtools" ,python2-testtools)
|
|
|
|
("python2-tox" ,python2-tox)))
|
|
|
|
(inputs
|
2018-12-12 10:17:51 +01:00
|
|
|
`(("boost" ,boost)
|
2016-12-27 21:40:41 +01:00
|
|
|
("curl" ,curl)
|
|
|
|
("cryptsetup" ,cryptsetup)
|
|
|
|
("expat" ,expat)
|
|
|
|
("fcgi" ,fcgi)
|
|
|
|
("fuse" ,fuse)
|
|
|
|
("gptfdisk" ,gptfdisk)
|
|
|
|
("jemalloc" ,jemalloc)
|
|
|
|
("keyutils" ,keyutils)
|
|
|
|
("leveldb" ,leveldb)
|
|
|
|
("libaio" ,libaio)
|
|
|
|
("libatomic-ops" ,libatomic-ops)
|
|
|
|
("lua" ,lua)
|
|
|
|
("lz4" ,lz4)
|
2018-09-27 18:41:50 +02:00
|
|
|
("oath-toolkit" ,oath-toolkit)
|
2016-12-27 21:40:41 +01:00
|
|
|
("openldap" ,openldap)
|
|
|
|
("openssl" ,openssl)
|
|
|
|
("nss" ,nss)
|
|
|
|
("parted" ,parted)
|
|
|
|
("python@2" ,python-2)
|
2018-02-21 15:24:00 +01:00
|
|
|
("python2-prettytable" ,python2-prettytable) ;used by ceph_daemon.py
|
2018-09-27 18:41:50 +02:00
|
|
|
("python2-six" ,python2-six) ;for ceph-mgr + plugins
|
2016-12-27 21:40:41 +01:00
|
|
|
("python@3" ,python-3)
|
2018-09-27 18:41:50 +02:00
|
|
|
("rapidjson" ,rapidjson)
|
2016-12-27 21:40:41 +01:00
|
|
|
("rocksdb" ,rocksdb)
|
|
|
|
("snappy" ,snappy)
|
|
|
|
("udev" ,eudev)
|
|
|
|
("util-linux" ,util-linux)
|
2019-03-15 18:03:00 +01:00
|
|
|
("xfsprogs" ,xfsprogs)
|
2016-12-27 21:40:41 +01:00
|
|
|
("zlib" ,zlib)))
|
|
|
|
(home-page "https://ceph.com/")
|
|
|
|
(synopsis "Distributed object store and file system")
|
|
|
|
(description
|
|
|
|
"Ceph is a distributed storage system designed for reliability and
|
|
|
|
performance. It provides network-based block devices (RBD), a POSIX
|
2018-01-19 16:25:13 +01:00
|
|
|
compliant file system (CephFS), and offers compatibility with various
|
2016-12-27 21:40:41 +01:00
|
|
|
storage protocols (S3, NFS, and others) through the RADOS gateway.")
|
|
|
|
;; The Ceph libraries are LGPL2.1 and most of the utilities fall under
|
|
|
|
;; GPL2. The installed erasure code plugins are BSD-3 licensed and do
|
|
|
|
;; not use the GPL code. The source archive includes a number of files
|
|
|
|
;; carrying other licenses; consult COPYING for more information. Note
|
|
|
|
;; that COPYING does not cover third-party bundled software.
|
|
|
|
(license (list license:lgpl2.1 license:gpl2 ;some files are 'or later'
|
|
|
|
license:cc-by-sa3.0 ;documentation
|
|
|
|
license:bsd-3 ;isa-l,jerasure,++
|
|
|
|
license:expat)))) ;civetweb,java bindings
|