me
/
guix
Archived
1
0
Fork 0
This repository has been archived on 2024-08-07. You can view files and clone it, but cannot push or open issues/pull-requests.
guix/gnu/packages/storage.scm

251 lines
11 KiB
Scheme
Raw Normal View History

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2020, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Greg Hogan <code@greghogan.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 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)
#: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 icu4c)
#: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 pretty-print)
#: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 13:21:30 +00:00
#:use-module (gnu packages python-xyz)
2019-05-12 20:56:54 +00:00
#:use-module (gnu packages sphinx)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (gnu packages xml))
(define-public ceph
(package
(name "ceph")
(version "16.2.9")
(source (origin
(method url-fetch)
(uri (string-append "https://download.ceph.com/tarballs/ceph-"
version ".tar.gz"))
(sha256
(base32
"1yf62k9wlx9pmggwa5c05wfqzy28sdm4b465y4iqrgc9dkrgin08"))
(patches
(search-patches
"ceph-disable-cpu-optimizations.patch"
"ceph-boost-compat.patch"
"ceph-rocksdb-compat.patch"))
(modules '((guix build utils)))
(snippet
'(for-each delete-file-recursively
'(;; TODO: Unbundle these:
;;"src/isa-l"
;;"src/lua"
;;"src/xxHash"
;;"src/zstd"
;;"src/civetweb"
"src/c-ares"
"src/fmt"
"src/googletest"
"src/rapidjson"
"src/spdk"
"src/rocksdb"
"src/boost")))))
(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)
(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"
;; 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"
;; Don't install systemd unit files.
"-DWITH_SYSTEMD=OFF"
;; 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=/")
;; Inject the -rpath linker argument when linking
;; Python C libraries so RUNPATH gets set up correctly.
(("LDFLAGS=(.*)\n" _ flags)
(string-append "LDFLAGS=\\\"" flags
" -Wl,-rpath=" lib "/lib\\\"\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"))))))
(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" py3sitedir))))
(add-after 'install 'wrap-python-scripts
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(scripts '("bin/ceph" "bin/cephfs-top" "sbin/ceph-volume"))
(dependencies (map (lambda (input)
(assoc-ref inputs input))
'("python-prettytable" "python-pyyaml")))
(sitedir (lambda (package)
(string-append package
"/lib/python"
,(version-major+minor
(package-version python))
"/site-packages")))
(PYTHONPATH (string-join (map sitedir (cons out dependencies))
":")))
(for-each (lambda (executable)
(wrap-program (string-append out "/" executable)
gnu: Adjust package collection to Wrap using GUIX_PYTHONPATH. This change was automated using: $ git ls-files | grep .scm | \ xargs sed 's/(getenv "PYTHONPATH")/(getenv "GUIX_PYTHONPATH")/' -i $ git ls-files | grep .scm | \ xargs sed 's/`("PYTHONPATH"/`("GUIX_PYTHONPATH"/' -i * gnu/packages/admin.scm (nmap): (dstat): Wrap using GUIX_PYTHONPATH. * gnu/packages/audio.scm (jack-2): (carla): Likewise. * gnu/packages/benchmark.scm (fio): Likewise. * gnu/packages/bioinformatics.scm (couger): Likewise. (gess, find-circ, filtlong, nanopolish): Likewise. * gnu/packages/cdrom.scm (cdemu-client): Likewise. * gnu/packages/chemistry.scm (avogadro): Likewise. * gnu/packages/connman.scm (econnman): Likewise. * gnu/packages/cups.scm (hplip): Likewise. * gnu/packages/debug.scm (scanmem): Likewise. * gnu/packages/display-managers.scm (lightdm): Likewise. * gnu/packages/ebook.scm (cozy): Likewise. * gnu/packages/education.scm (anki): Likewise. * gnu/packages/engineering.scm (kicad, volk, freecad): Likewise. * gnu/packages/game-development.scm (renpy): Likewise. * gnu/packages/games.scm (roguebox-adventures) (seahorse-adventures, kajongg): Likewise. * gnu/packages/gimp.scm (gimp, glimpse): Likewise. * gnu/packages/glib.scm (itstool): Likewise. * gnu/packages/gnome.scm (gnome-music, gtg, rhythmbox): Likewise. (eolie, d-feet, gedit, caribou, gnome-shell, authenticator) (gnome-todo, orca, passwordsafe, terminator, setzer) (libratbag, komikku): Likewise. * gnu/packages/gps.scm (gpsd): Likewise. * gnu/packages/gtk.scm (gtk-doc): Likewise. * gnu/packages/ibus.scm (ibus, ibus-libpinyin, ibus-anthy) (ibus-libhangul): Likewise. * gnu/packages/inkscape.scm (inkscape-1.0): Likewise. * gnu/packages/linux.scm (bcc): Likewise. * gnu/packages/mail.scm (notifymuch): Likewise. * gnu/packages/maths.scm (units): Likewise. * gnu/packages/music.scm (solfege): Likewise. * gnu/packages/networking.scm (blueman): Likewise. * gnu/packages/patchutils.scm (patchwork): Likewise. * gnu/packages/photo.scm (rapid-photo-downloader, entangle): Likewise. * gnu/packages/plotutils.scm (asymptote): Likewise. * gnu/packages/presentation.scm (presentty): Likewise. * gnu/packages/screen.scm (byobu): Likewise. * gnu/packages/storage.scm (ceph): Likewise. * gnu/packages/syndication.scm (liferea): Likewise. * gnu/packages/task-management.scm (blanket): Likewise. * gnu/packages/text-editors.scm (manuskript): Likewise. * gnu/packages/version-control.scm (gitless, cgit, git-when-merged) (git-imerge): Likewise. * gnu/packages/video.scm (pitivi): Likewise. * gnu/packages/virtualization.scm (criu): Likewise. * gnu/packages/xfce.scm (catfish): Likewise.
2021-01-27 22:33:13 +00:00
`("GUIX_PYTHONPATH" ":" prefix (,PYTHONPATH))))
scripts)))))))
(outputs
'("out" "lib"))
(native-inputs
(list gperf pkg-config python-cython python-sphinx yasm))
(inputs
`(("boost" ,boost)
("curl" ,curl)
("cryptsetup" ,cryptsetup)
("expat" ,expat)
("fcgi" ,fcgi)
("fmt" ,fmt-8)
("fuse" ,fuse)
("icu4c" ,icu4c)
("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-pyyaml" ,python-pyyaml) ;from python-common/setup.py
("python" ,python)
("rapidjson" ,rapidjson)
("rdma-core" ,rdma-core)
("rocksdb" ,rocksdb)
("snappy" ,snappy)
("sqlite" ,sqlite)
("udev" ,eudev)
("util-linux" ,util-linux)
gnu: util-linux: Move libraries to separate output. Fixes <https://bugs.gnu.org/37732>. Reported by Diego Nicola Barbato <dnbarbato@posteo.de>. * gnu/packages/linux.scm (util-linux)[outputs]: Add "lib". [arguments]: Update #:configure-flags and the "move-static-libraries" phase accordingly. Add phases "patch-build-scripts" and "adjust-pkg-config-files". (e2fsprogs, psm, mtd-utils, f2fs-tools, f2fs-tools-1.7, eudev, xfsprogs)[inputs]: Change to the "lib" output of UTIL-LINUX. (btrfs-progs)[inputs]: Remove duplicate UTIL-LINUX inputs and change to use the "lib" output. * gnu/packages/admin.scm (pam-mount)[inputs]: Add UTIL-LINUX:LIB. (testdisk)[inputs]: Change to the "lib" output of UTIL-LINUX. * gnu/packages/android.scm (abootimg)[inputs]: Likewise. * gnu/packages/audio.scm (jack-1)[propagated-inputs]: Likewise. * gnu/packages/bootloaders.scm (syslinux, vboot-utils)[inputs]: Likewise. * gnu/packages/chez.scm (chez-scheme)[inputs]: Likewise. * gnu/packages/cryptsetup.scm (cryptsetup, cryptsetup-static)[inputs]: Likewise. * gnu/packages/databases.scm (postgresql, 4store)[inputs]: Likewise. * gnu/packages/disk.scm (ndctl, gptfdisk, fdisk, gparted, rmlint, volume-key)[inputs]: Likewise. (parted)[inputs]: Likewise. [native-inputs]: Add UTIL-LINUX. * gnu/packages/efi.scm (sbsigntools)[inputs]: Add UTIL-LINUX:LIB. * gnu/packages/engineering.scm (lib3mf)[inputs]: Change to the "lib" output of UTIL-LINUX. * gnu/packages/enlightenment.scm (efl)[propagated-inputs]: Likewise. * gnu/packages/file-systems.scm (glusterfs, jfsutils, zfs)[inputs]: Likewise. * gnu/packages/firmware.scm (ovmf)[inputs]: Likewise. * gnu/packages/fontutils.scm (fontconfig)[propagated-inputs]: Likewise. * gnu/packages/freedesktop.scm (localed)[inputs]: Likewise. * gnu/packages/glib.scm (glib, appstream-glib)[propagated-inputs]: Likewise. * gnu/packages/gnome.scm (tracker, gnome-terminal)[inputs]: Likewise. * gnu/packages/jupyter.scm (xeus)[inputs]: Likewise. * gnu/packages/kde.scm (kpmcore)[inputs]: Likewise. * gnu/packages/kodi.scm (crossguid)[inputs]: Likewise. * gnu/packages/lighting.scm (ola)[inputs]: Likewise. * gnu/packages/music.scm (libgig)[inputs]: Likewise. * gnu/packages/nfs.scm (nfs-utils)[inputs]: Likewise. * gnu/packages/opencog.scm (opencog)[inputs]: Likewise. * gnu/packages/package-management.scm (msitools)[inputs]: Change to the "lib" output of UTIL-LINUX. * gnu/packages/password-utils.scm (pwsafe)[inputs]: Likewise. * gnu/packages/telephony.scm (pjproject)[propagated-inputs]: Likewise. * gnu/packages/rdf.scm (rasqal)[inputs]: Likewise. * gnu/packages/search.scm (xapian)[inputs]: Likewise. * gnu/packages/sssd.scm (sssd)[native-inputs]: Likewise. * gnu/packages/storage.scm (ceph)[inputs]: Add UTIL-LINUX:LIB. * gnu/packages/task-management.scm (taskwarrior)[inputs]: Change to the "lib" output of UTIL-LINUX. * gnu/packages/virtualization.scm (libvirt, xen)[inputs]: Likewise. * gnu/packages/xorg.scm (libsm)[inputs]: Likewise.
2020-01-14 23:24:28 +00:00
("util-linux:lib" ,util-linux "lib")
("xfsprogs" ,xfsprogs)
("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 file system (CephFS), and offers compatibility with various
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