From 5b0b520e22cc4d8e08078e50e036b093efdde49c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Feb 2018 15:24:00 +0100 Subject: gnu: ceph: Update to 12.2.4. * gnu/packages/patches/ceph-disable-cpu-optimizations.patch: Adjust to upstream changes. * gnu/packages/patches/ceph-disable-unittest-throttle.patch: Delete file. * gnu/packages/patches/ceph-rocksdb-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/storage.scm (ceph): Update to 12.2.4. [source](patches): Adjust. [arguments]: Add "-DWITH_BABELTRACE=OFF" in #:configure-flags. Build with CMAKE-3.11. Adjust file substitutions. Wrap 'ceph' executable. [native-inputs]: Add GPERF. [inputs]: Replace BOOST with BOOST-1.66. Add PYTHON2-PRETTYTABLE. --- gnu/packages/storage.scm | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'gnu/packages/storage.scm') diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index bee349f6f6..54d91c1f3c 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017 Marius Bakke +;;; Copyright © 2017, 2018 Marius Bakke ;;; Copyright © 2017 Rutger Helling ;;; ;;; This file is part of GNU Guix. @@ -29,6 +29,7 @@ #:use-module (gnu packages bdw-gc) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) @@ -36,6 +37,7 @@ #:use-module (gnu packages databases) #:use-module (gnu packages disk) #:use-module (gnu packages gnuzilla) + #:use-module (gnu packages gperf) #:use-module (gnu packages jemalloc) #:use-module (gnu packages linux) #:use-module (gnu packages lua) @@ -50,18 +52,18 @@ (define-public ceph (package (name "ceph") - (version "12.0.2") + (version "12.2.4") (source (origin (method url-fetch) (uri (string-append "https://download.ceph.com/tarballs/ceph-" version ".tar.gz")) (sha256 (base32 - "0l9v072ba28i984y5rwny9i11nmpyx5bl7awxg48plyadm2l3g14")) + "13hv8scaxc1gdvrhzbfnsk4yy3pla6n1i4j4j4zf7schmbf0j8mp")) (patches (search-patches "ceph-skip-unittest_blockdev.patch" "ceph-skip-collect-sys-info-test.patch" - "ceph-disable-unittest-throttle.patch" + "ceph-rocksdb-compat.patch" "ceph-disable-cpu-optimizations.patch")) (modules '((guix build utils))) (snippet @@ -74,7 +76,6 @@ ;"src/xxHash" ;"src/zstd" ;"src/civetweb" - ;"src/Beast" "src/test/downloads" "src/dpdk" "src/spdk" @@ -105,6 +106,7 @@ "-DWITH_SYSTEM_BOOST=ON" "-DWITH_PYTHON3=ON" ;; TODO: Enable these when available in Guix. + "-DWITH_BABELTRACE=OFF" "-DWITH_LTTNG=OFF" "-DWITH_XFS=OFF" "-DWITH_XIO=OFF" @@ -114,6 +116,7 @@ ;; for details. Disable tests until ;; resolved. #:tests? #f + #:cmake ,cmake-3.11 #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-source @@ -152,21 +155,17 @@ (substitute* "src/test/test_subprocess.cc" (("/bin/sh") (which "sh"))) - (substitute* "src/test/ceph_objectstore_tool.py" + (substitute* "qa/standalone/special/ceph_objectstore_tool.py" (("/bin/rm") (which "rm"))) (substitute* "src/ceph-disk/ceph_disk/main.py" (("/bin/mount") "mount") (("/bin/umount") "umount") (("/sbin/blkid") (which "blkid")) + (("'cryptsetup'") (string-append "'" (which "cryptsetup") "'")) (("'sgdisk'") (string-append "'" (which "sgdisk") "'")) (("'parted'") (string-append "'" (which "parted") "'")) (("'udevadm'") (string-append "'" (which "udevadm") "'"))) - (substitute* "src/ceph-disk-udev" - (("/sbin/cryptsetup") (which "cryptsetup")) - (("/usr/sbin/sgdisk") (which "sgdisk")) - (("/usr/sbin/ceph-disk") - (string-append out "/bin/ceph-disk"))) (substitute* "udev/50-rbd.rules" (("/usr/bin/ceph-rbdnamer") (string-append out "/bin/ceph-rbdnamer"))) @@ -263,23 +262,31 @@ (getenv "PYTHONPATH"))) #t))) (add-after 'install 'wrap-python-scripts - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) + (ceph (string-append out "/bin/ceph")) (ceph-disk (string-append out "/bin/ceph-disk")) (ceph-detect-init (string-append out "/bin/ceph-detect-init")) - (PYTHONPATH (string-append - out "/lib/python2.7/site-packages"))) + (prettytable (assoc-ref inputs "python2-prettytable")) + + (sitedir (lambda (package) + (string-append package + "/lib/python2.7/site-packages"))) + (PYTHONPATH (string-append + (sitedir out) ":" + (sitedir prettytable)))) (for-each (lambda (executable) (wrap-program executable `("PYTHONPATH" ":" prefix (,PYTHONPATH)))) - (list ceph-disk ceph-detect-init)) + (list ceph ceph-disk ceph-detect-init)) #t)))))) (outputs '("out" "lib")) (native-inputs - `(("pkg-config" ,pkg-config) + `(("gperf" ,gperf) + ("pkg-config" ,pkg-config) ("python-cython" ,python-cython) ("python-sphinx" ,python-sphinx) ("yasm" ,yasm) @@ -310,7 +317,7 @@ ("python2-testtools" ,python2-testtools) ("python2-tox" ,python2-tox))) (inputs - `(("boost" ,boost) + `(("boost" ,boost-1.66) ("curl" ,curl) ("cryptsetup" ,cryptsetup) ("expat" ,expat) @@ -329,6 +336,7 @@ ("nss" ,nss) ("parted" ,parted) ("python@2" ,python-2) + ("python2-prettytable" ,python2-prettytable) ;used by ceph_daemon.py ("python@3" ,python-3) ("rocksdb" ,rocksdb) ("snappy" ,snappy) -- cgit v1.2.3