You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

253 lines
11 KiB

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.
3 years ago
2 years ago
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.
2 years ago
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
  3. ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
  4. ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu packages storage)
  21. #:use-module (guix download)
  22. #:use-module ((guix licenses) #:prefix license:)
  23. #:use-module (guix packages)
  24. #:use-module (guix utils)
  25. #:use-module (guix build-system cmake)
  26. #:use-module (gnu packages)
  27. #:use-module (gnu packages admin)
  28. #:use-module (gnu packages assembly)
  29. #:use-module (gnu packages authentication)
  30. #:use-module (gnu packages bdw-gc)
  31. #:use-module (gnu packages boost)
  32. #:use-module (gnu packages compression)
  33. #:use-module (gnu packages crypto)
  34. #:use-module (gnu packages cryptsetup)
  35. #:use-module (gnu packages curl)
  36. #:use-module (gnu packages databases)
  37. #:use-module (gnu packages disk)
  38. #:use-module (gnu packages gperf)
  39. #:use-module (gnu packages jemalloc)
  40. #:use-module (gnu packages linux)
  41. #:use-module (gnu packages lua)
  42. #:use-module (gnu packages ncurses)
  43. #:use-module (gnu packages networking)
  44. #:use-module (gnu packages nss)
  45. #:use-module (gnu packages openldap)
  46. #:use-module (gnu packages pkg-config)
  47. #:use-module (gnu packages python)
  48. #:use-module (gnu packages python-xyz)
  49. #:use-module (gnu packages sphinx)
  50. #:use-module (gnu packages tls)
  51. #:use-module (gnu packages web)
  52. #:use-module (gnu packages xml))
  53. (define-public ceph
  54. (package
  55. (name "ceph")
  56. (version "14.2.10")
  57. (source (origin
  58. (method url-fetch)
  59. (uri (string-append "https://download.ceph.com/tarballs/ceph-"
  60. version ".tar.gz"))
  61. (sha256
  62. (base32
  63. "0bbs3ag8zav283qpxrrndhvh2z01ykm6126fmwrbc1c5f9jfjq39"))
  64. (patches
  65. (search-patches "ceph-disable-cpu-optimizations.patch"))
  66. (modules '((guix build utils)))
  67. (snippet
  68. '(begin
  69. (for-each delete-file-recursively
  70. '(;; TODO: Unbundle these:
  71. ;"src/isa-l"
  72. ;"src/lua"
  73. ;"src/xxHash"
  74. ;"src/zstd"
  75. ;"src/civetweb"
  76. ;"src/seastar/fmt"
  77. "src/test/downloads"
  78. "src/c-ares"
  79. "src/googletest"
  80. "src/rapidjson"
  81. "src/spdk"
  82. "src/rocksdb"
  83. "src/boost"))
  84. #t))))
  85. (build-system cmake-build-system)
  86. (arguments
  87. `(#:configure-flags
  88. (let* ((out (assoc-ref %outputs "out"))
  89. (lib (assoc-ref %outputs "lib"))
  90. (libdir (string-append lib "/lib")))
  91. (list (string-append "-DCMAKE_INSTALL_PREFIX=" out)
  92. (string-append "-DCMAKE_INSTALL_LIBDIR=" libdir)
  93. (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
  94. lib "/include")
  95. ;; We need both libdir and libdir/ceph in RUNPATH.
  96. (string-append "-DCMAKE_INSTALL_RPATH="
  97. libdir ";" libdir "/ceph")
  98. (string-append "-DCMAKE_INSTALL_SYSCONFDIR=" out "/etc")
  99. (string-append "-DCMAKE_INSTALL_DATADIR=" lib "/share")
  100. (string-append "-DCMAKE_INSTALL_MANDIR=" out "/share/man")
  101. (string-append "-DCMAKE_INSTALL_DOCDIR=" out "/share/ceph/doc")
  102. (string-append "-DCMAKE_INSTALL_LIBEXECDIR=" out "/libexec")
  103. (string-append "-DKEYUTILS_INCLUDE_DIR="
  104. (assoc-ref %build-inputs "keyutils") "/include")
  105. (string-append "-DXFS_INCLUDE_DIR="
  106. (assoc-ref %build-inputs "xfsprogs") "/include")
  107. "-DCMAKE_INSTALL_LOCALSTATEDIR=/var"
  108. "-DBUILD_SHARED_LIBS=ON"
  109. "-DWITH_SYSTEM_ROCKSDB=ON"
  110. "-DWITH_SYSTEM_BOOST=ON"
  111. "-DWITH_PYTHON3=ON"
  112. ;; TODO: Enable these when available in Guix.
  113. "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" ;requires node + nodeenv
  114. "-DWITH_BABELTRACE=OFF"
  115. "-DWITH_LTTNG=OFF"
  116. "-DWITH_SPDK=OFF"
  117. "-DWITH_RADOSGW_AMQP_ENDPOINT=OFF"
  118. ;; Use jemalloc instead of tcmalloc.
  119. "-DALLOCATOR=jemalloc"
  120. ;; Do not bother building the tests; we are not currently running
  121. ;; them, and they do not build with system googletest as of 14.2.5.
  122. "-DWITH_TESTS=OFF"))
  123. ;; FIXME: Some of the tests leak Btrfs subvolumes on Btrfs. See
  124. ;; <https://bugs.gnu.org/29674> for details. Disable tests until
  125. ;; resolved.
  126. #:tests? #f
  127. #:phases
  128. (modify-phases %standard-phases
  129. (add-after 'unpack 'patch-source
  130. (lambda* (#:key outputs #:allow-other-keys)
  131. (let ((out (assoc-ref outputs "out"))
  132. (lib (assoc-ref outputs "lib")))
  133. (substitute* "cmake/modules/Distutils.cmake"
  134. ;; Prevent creation of Python eggs.
  135. (("setup.py install")
  136. "setup.py install --single-version-externally-managed --root=/"))
  137. (substitute* (find-files "src/pybind" "^setup\\.py$")
  138. ;; Here we inject an extra line to the `setup.py' of the
  139. ;; Python C libraries so RUNPATH gets set up correctly.
  140. (("^([[:blank:]]+)extra_compile_args=(.*)$" _ indent args)
  141. (string-append indent "extra_compile_args=" args
  142. indent "extra_link_args=['-Wl,-rpath="
  143. lib "/lib'],\n")))
  144. ;; Statically link libcrc32 because it does not get installed,
  145. ;; yet several libraries end up referring to it.
  146. (substitute* "src/common/CMakeLists.txt"
  147. (("add_library\\(crc32")
  148. "add_library(crc32 STATIC"))
  149. (substitute* "udev/50-rbd.rules"
  150. (("/usr/bin/ceph-rbdnamer")
  151. (string-append out "/bin/ceph-rbdnamer")))
  152. #t)))
  153. (add-before 'install 'set-install-environment
  154. (lambda* (#:key outputs #:allow-other-keys)
  155. (let* ((out (assoc-ref outputs "out"))
  156. (py3sitedir
  157. (string-append out "/lib/python"
  158. ,(version-major+minor
  159. (package-version python))
  160. "/site-packages")))
  161. ;; The Python install scripts refuses to function if
  162. ;; the install directory is not on PYTHONPATH.
  163. (setenv "PYTHONPATH"
  164. (string-append py3sitedir ":"
  165. (getenv "PYTHONPATH")))
  166. #t)))
  167. (add-after 'install 'wrap-python-scripts
  168. (lambda* (#:key inputs outputs #:allow-other-keys)
  169. (let* ((out (assoc-ref outputs "out"))
  170. (scripts '("ceph" "ceph-mgr" "ceph-volume"))
  171. (prettytable (assoc-ref inputs "python-prettytable"))
  172. (six (assoc-ref inputs "python-six"))
  173. (sitedir (lambda (package)
  174. (string-append package
  175. "/lib/python"
  176. ,(version-major+minor
  177. (package-version python))
  178. "/site-packages")))
  179. (PYTHONPATH (string-append
  180. (sitedir out) ":"
  181. (sitedir six) ":"
  182. (sitedir prettytable))))
  183. (for-each (lambda (executable)
  184. (wrap-program (string-append out "/bin/" executable)
  185. `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
  186. scripts)
  187. #t))))))
  188. (outputs
  189. '("out" "lib"))
  190. (native-inputs
  191. `(("gperf" ,gperf)
  192. ("pkg-config" ,pkg-config)
  193. ("python-cython" ,python-cython)
  194. ("python-sphinx" ,python-sphinx)
  195. ("yasm" ,yasm)))
  196. (inputs
  197. `(("boost" ,boost)
  198. ("curl" ,curl)
  199. ("cryptsetup" ,cryptsetup)
  200. ("expat" ,expat)
  201. ("fcgi" ,fcgi)
  202. ("fuse" ,fuse)
  203. ("jemalloc" ,jemalloc)
  204. ("keyutils" ,keyutils)
  205. ("leveldb" ,leveldb)
  206. ("libaio" ,libaio)
  207. ("libatomic-ops" ,libatomic-ops)
  208. ("libcap-ng" ,libcap-ng)
  209. ("libnl" ,libnl)
  210. ("librdkafka" ,librdkafka)
  211. ("lua" ,lua)
  212. ("lz4" ,lz4)
  213. ("oath-toolkit" ,oath-toolkit)
  214. ("openldap" ,openldap)
  215. ("openssl" ,openssl)
  216. ("ncurses" ,ncurses)
  217. ("nss" ,nss)
  218. ("python-prettytable" ,python-prettytable) ;used by ceph_daemon.py
  219. ("python-six" ,python-six) ;for ceph-mgr + plugins
  220. ("python" ,python-wrapper)
  221. ("rapidjson" ,rapidjson)
  222. ("rdma-core" ,rdma-core)
  223. ("rocksdb" ,rocksdb)
  224. ("snappy" ,snappy)
  225. ("udev" ,eudev)
  226. ("util-linux" ,util-linux)
  227. ("util-linux:lib" ,util-linux "lib")
  228. ("xfsprogs" ,xfsprogs)
  229. ("zlib" ,zlib)))
  230. (home-page "https://ceph.com/")
  231. (synopsis "Distributed object store and file system")
  232. (description
  233. "Ceph is a distributed storage system designed for reliability and
  234. performance. It provides network-based block devices (RBD), a POSIX
  235. compliant file system (CephFS), and offers compatibility with various
  236. storage protocols (S3, NFS, and others) through the RADOS gateway.")
  237. ;; The Ceph libraries are LGPL2.1 and most of the utilities fall under
  238. ;; GPL2. The installed erasure code plugins are BSD-3 licensed and do
  239. ;; not use the GPL code. The source archive includes a number of files
  240. ;; carrying other licenses; consult COPYING for more information. Note
  241. ;; that COPYING does not cover third-party bundled software.
  242. (license (list license:lgpl2.1 license:gpl2 ;some files are 'or later'
  243. license:cc-by-sa3.0 ;documentation
  244. license:bsd-3 ;isa-l,jerasure,++
  245. license:expat)))) ;civetweb,java bindings