unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob f215a847e935abdf6940271eb872dfb3f8402177 7468 bytes (raw)
name: gnu/packages/distributed-filesystems.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;;
;;; 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 distributed-filesystems)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #: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 curl)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages gnuzilla)
  #:use-module (gnu packages jemalloc)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages openldap)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages web)
  #:use-module (gnu packages xml))

(define-public ceph
  (package
    (name "ceph")
    (version "10.2.5")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://download.ceph.com/tarballs/ceph-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "1x6m69il34x4rjhybk5cpw4yiad4a193l9vgy57vidwfy5ql5pc2"))
              (modules '((guix build utils)))
              (snippet
               '(begin
                  ;; Delete bundled software.
                  (delete-file-recursively "src/test/downloads") ; python-cram
                  (delete-file-recursively "src/rocksdb")
                  ;; TODO: unbundle gtest, civetweb, DPDK, SPDK, xxHash.
                  #t))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags
       (list (string-append "--exec_prefix=" (assoc-ref %outputs "out"))
             (string-append "--libdir=" (assoc-ref %outputs "lib") "/lib")
             (string-append "--includedir=" (assoc-ref %outputs "lib") "/include")
             "--localstatedir=/var"
             "--sysconfdir=/etc"
             "--enable-static=no" ; TODO: separate output
             "--with-man-pages"
             (string-append "--with-systemd-unit-dir="
                            (assoc-ref %outputs "out") "/etc/systemd/system")
             "--without-libxfs" ; TODO: enable when xfsprogs is added.
             ;; Use jemalloc instead of tcmalloc.
             "--with-jemalloc")
       #:make-flags
       ;; Pass sysconfdir here too so that the sample configuration files
       ;; and directories are installed to the output instead of root level.
       (list (string-append "sysconfdir=" (assoc-ref %outputs "out") "/etc")
             (string-append "LDFLAGS=-Wl,-rpath="
                            (assoc-ref %outputs "lib") "/lib")
             ;; The python libraries depend on the ceph libraries,
             ;; so make sure they are in RUNPATH.
             (string-append "PYTHON_LDFLAGS=-Wl,-rpath="
                            (assoc-ref %outputs "lib") "/lib"))
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-source
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (substitute* "src/Makefile.in"
               ;; By default, the PYTHONPATH is set to "src/pybind".
               ;; Make sure our libraries are found too.
               (("export PYTHONPATH=") (string-append "export PYTHONPATH="
                                                      (getenv "PYTHONPATH")
                                                      ":"))

               ;; Replace 'rocksdb/librocksdb.a' with the rocksdb store path.
               (("rocksdb/librocksdb\\.a") (string-append
                                            (assoc-ref inputs "rocksdb:static")
                                            "/lib/librocksdb.a"))
               ;; The above string is used both as a make target and a compile
               ;; flag. No-op the make target.
               (("^.*cd rocksdb &&.*$") "\ttrue\n"))

             (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")))

             (substitute* "src/Makefile.in"
               ;; Install python packages to default output.
               (("\\$\\$root \\$\\$options") (string-append
                                              "--root=/ --prefix="
                                              (assoc-ref outputs "out"))))
             #t)))
       ;; XXX: Tests need more work. The bundled cram tarball (!) needs
       ;; patching to work on Guix, and the system version does not support
       ;; '--error-dir'. TODO: How to run other tests/targets?
       #:tests? #f
       ;; Tests uses lots of file descriptors and warns about using
       ;; -j without raising limits on large systems.
       #:parallel-tests? #f))
    (outputs
     '("out"
       "lib"))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("rocksdb" ,rocksdb) ; for headers
       ("python2-cram" ,python2-cram)
       ("python2-cython" ,python2-cython)
       ("python2-nose" ,python2-nose)
       ("python2-pip" ,python2-pip)
       ("python2-sphinx" ,python2-sphinx)
       ("python2-tox" ,python2-tox)
       ("python2-virtualenv" ,python2-virtualenv)))
    (inputs
     `(("boost" ,boost)
       ("curl" ,curl)
       ("expat" ,expat)
       ("fcgi" ,fcgi)
       ("fuse" ,fuse)
       ("jemalloc" ,jemalloc)
       ("keyutils" ,keyutils)
       ("leveldb" ,leveldb)
       ("libaio" ,libaio)
       ("libatomic-ops" ,libatomic-ops)
       ("lz4" ,lz4)
       ("openldap" ,openldap)
       ("openssl" ,openssl)
       ("nss" ,nss)
       ("python" ,python-2)
       ("rocksdb:static" ,rocksdb "static")
       ("snappy" ,snappy)
       ("udev" ,eudev)
       ("util-linux" ,util-linux)
       ("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
compliant filesystem (CephFS), and offers compatibility with various
storage protocols (S3, NFS, and others) through the RADOS gateway.")
    ;; Ceph is licensed under LGPL2.1, but includes a number of components
    ;; covered by other licenses. Consult COPYING for full information.
    (license (list license:lgpl2.1
                   license:cc-by-sa3.0    ; documentation
                   license:bsd-2          ; xxHash
                   license:bsd-3
                   license:gpl3
                   license:gpl2
                   license:public-domain
                   license:boost1.0
                   license:expat))))

debug log:

solving f215a847e ...
found f215a847e in https://yhetil.org/guix-devel/20170115203338.19769-6-mbakke@fastmail.com/

applying [1/1] https://yhetil.org/guix-devel/20170115203338.19769-6-mbakke@fastmail.com/
diff --git a/gnu/packages/distributed-filesystems.scm b/gnu/packages/distributed-filesystems.scm
new file mode 100644
index 000000000..f215a847e

Checking patch gnu/packages/distributed-filesystems.scm...
Applied patch gnu/packages/distributed-filesystems.scm cleanly.

index at:
100644 f215a847e935abdf6940271eb872dfb3f8402177	gnu/packages/distributed-filesystems.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).