2018-06-07 16:07:30 +02:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
|
|
|
;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
|
2020-11-30 18:28:56 +01:00
|
|
|
;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
2019-09-05 11:30:44 +02:00
|
|
|
;;; Copyright © 2019 Andrew Miloradovsky <andrew@interpretmath.pw>
|
2022-06-20 15:34:01 +02:00
|
|
|
;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
|
2021-06-01 08:03:23 +02:00
|
|
|
;;; Copyright © 2021 Dion Mendel <guix@dm9.info>
|
2018-06-07 16:07:30 +02: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 cluster)
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
2022-06-20 15:34:01 +02:00
|
|
|
#:use-module (guix gexp)
|
2018-06-07 16:07:30 +02:00
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
#:use-module (guix download)
|
2019-09-08 14:19:25 +02:00
|
|
|
#:use-module (guix git-download)
|
2018-06-07 16:07:30 +02:00
|
|
|
#:use-module (guix packages)
|
2019-09-05 11:30:44 +02:00
|
|
|
#:use-module (gnu packages autotools)
|
2020-07-02 20:22:17 +02:00
|
|
|
#:use-module (gnu packages check)
|
2021-08-20 14:45:19 +02:00
|
|
|
#:use-module (gnu packages compression)
|
2022-06-20 16:35:19 +02:00
|
|
|
#:use-module (gnu packages docbook)
|
2020-07-02 20:22:17 +02:00
|
|
|
#:use-module (gnu packages flex)
|
2019-09-05 11:30:44 +02:00
|
|
|
#:use-module (gnu packages gettext)
|
2019-12-06 09:36:52 +01:00
|
|
|
#:use-module (gnu packages libevent)
|
2018-06-07 16:07:30 +02:00
|
|
|
#:use-module (gnu packages linux)
|
|
|
|
#:use-module (gnu packages pkg-config)
|
2022-06-20 16:35:19 +02:00
|
|
|
#:use-module (gnu packages ruby)
|
gnu: Move Sphinx and friends to (gnu packages sphinx).
* gnu/packages/python-xyz.scm (python-sphinxcontrib-websupport,
python2-sphinxcontrib-websupport, python-sphinx, python2-sphinx,
python-sphinx-gallery, python2-sphinx-gallery, python-sphinx-rtd-theme,
python2-sphinx-rtd-theme, python-guzzle-sphinx-theme,
python2-guzzle-sphinx-theme, python-sphinxcontrib-newsfeed,
python-sphinxcontrib-programoutput, python2-sphinxcontrib-programoutput,
python-sphinx-repoze-interface, python2-sphinx-repoze-interface,
python-sphinx-cloud-sptheme, python2-sphinx-cloud-sptheme,
python-sphinx-alabaster-theme, python2-sphinx-alabaster-theme,
python-sphinx-me, python-sphinxcontrib-svg2pdfconverter): Move to ...
(gnu):
* gnu/packages/sphinx.scm: ... here. New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly.
* gnu/packages/admin.scm, gnu/packages/bioinformatics.scm,
gnu/packages/calendar.scm, gnu/packages/cluster.scm,
gnu/packages/databases.scm, gnu/packages/dav.scm, gnu/packages/disk.scm,
gnu/packages/django.scm, gnu/packages/elf.scm, gnu/packages/emacs-xyz.scm,
gnu/packages/emulators.scm, gnu/packages/finance.scm, gnu/packages/image.scm,
gnu/packages/libffi.scm, gnu/packages/mail.scm, gnu/packages/mpd.scm,
gnu/packages/openstack.scm, gnu/packages/pdf.scm, gnu/packages/python-web.scm,
gnu/packages/search.scm, gnu/packages/statistics.scm,
gnu/packages/storage.scm, gnu/packages/sync.scm, gnu/packages/terminals.scm,
gnu/packages/tls.scm, gnu/packages/web.scm: Adjust module imports.
2019-05-12 22:56:54 +02:00
|
|
|
#:use-module (gnu packages sphinx)
|
2021-06-01 08:03:23 +02:00
|
|
|
#:use-module (gnu packages sqlite)
|
2018-06-10 17:42:14 +02:00
|
|
|
#:use-module (gnu packages texinfo)
|
2022-06-20 16:35:19 +02:00
|
|
|
#:use-module (gnu packages tls)
|
|
|
|
#:use-module (gnu packages xml))
|
2018-06-07 16:07:30 +02:00
|
|
|
|
2020-07-02 20:22:17 +02:00
|
|
|
(define-public drbd-utils
|
|
|
|
(package
|
|
|
|
(name "drbd-utils")
|
2022-06-20 15:31:26 +02:00
|
|
|
(version "9.21.2")
|
2020-07-02 20:22:17 +02:00
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
2021-10-09 02:30:54 +02:00
|
|
|
(uri (list (string-append "https://pkg.linbit.com/downloads/drbd"
|
2020-07-02 20:22:17 +02:00
|
|
|
"/utils/drbd-utils-" version ".tar.gz")))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2022-06-20 15:31:26 +02:00
|
|
|
"1zhinblhpfb7wq3wkaim4xzx1m89671djvnrf4vjabfzpclkz60h"))
|
2020-07-02 20:22:17 +02:00
|
|
|
(modules '((guix build utils)))
|
|
|
|
(snippet
|
|
|
|
'(begin
|
|
|
|
(substitute* "scripts/global_common.conf"
|
|
|
|
;; Do not participate in usage count survey by default.
|
2021-10-09 02:30:54 +02:00
|
|
|
(("usage-count yes")
|
|
|
|
"usage-count no"))
|
2020-07-02 20:22:17 +02:00
|
|
|
(substitute* "scripts/Makefile.in"
|
|
|
|
;; Install the Pacemaker resource agents to the libdir,
|
|
|
|
;; regardless of what the OCF specification says...
|
|
|
|
(("\\$\\(DESTDIR\\)/usr/lib")
|
|
|
|
"$(DESTDIR)$(LIBDIR)"))
|
|
|
|
(substitute* "configure"
|
|
|
|
;; Use a sensible default udev rules directory.
|
|
|
|
(("default_udevdir=/lib/udev")
|
2022-06-20 15:34:01 +02:00
|
|
|
"default_udevdir='${prefix}/lib/udev'"))))))
|
2020-07-02 20:22:17 +02:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(arguments
|
2022-06-20 15:34:01 +02:00
|
|
|
(list
|
|
|
|
#:configure-flags
|
|
|
|
#~(list "--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
;; Do not install sysv or systemd init scripts.
|
|
|
|
"--with-initscripttype=none"
|
|
|
|
;; Disable support for DRBD 8.3 as it is only for
|
|
|
|
;; Linux-Libre versions < 3.8. 8.4 is the latest
|
|
|
|
;; kernel driver as of Linux 5.18.
|
|
|
|
"--without-83support")
|
|
|
|
#:test-target "test"
|
|
|
|
#:make-flags #~(list "WANT_DRBD_REPRODUCIBLE_BUILD=yesplease")
|
|
|
|
#:phases
|
|
|
|
#~(modify-phases %standard-phases
|
2022-06-20 16:35:19 +02:00
|
|
|
(add-after 'unpack 'disable-ja-translation
|
|
|
|
(lambda _
|
|
|
|
;; XXX: The japanese documentation cannot be created due to
|
|
|
|
;; several "Invalid po file" and "use of uninitialized variable"
|
|
|
|
;; in po4a.
|
|
|
|
(substitute* "Makefile.in"
|
|
|
|
(("(DOC_DIRS.*)documentation/ja/v[[:digit:]]+" _ match)
|
|
|
|
match)
|
|
|
|
(("[[:blank:]]+\\$\\(MAKE\\) -C documentation/ja/v[[:digit:]]+.*")
|
|
|
|
""))))
|
2022-06-20 15:34:01 +02:00
|
|
|
(add-after 'patch-generated-file-shebangs 'patch-documentation
|
|
|
|
(lambda _
|
|
|
|
;; The preceding phase misses some Makefiles with unusual file
|
|
|
|
;; names, so we handle those here.
|
|
|
|
(for-each patch-makefile-SHELL (find-files "documentation/common"
|
|
|
|
"^Makefile"))))
|
|
|
|
(add-before 'configure 'use-absolute-/lib/drbd
|
|
|
|
(lambda _
|
|
|
|
;; Look for auxiliary executables below exec_prefix instead
|
|
|
|
;; of assuming /lib/drbd (see TODO comment in the file).
|
|
|
|
(substitute* "user/v9/drbdtool_common.c"
|
|
|
|
(("\"/lib/drbd\"")
|
|
|
|
(string-append "\"" #$output "/lib/drbd\"")))))
|
|
|
|
(add-after 'configure 'adjust-installation-directories
|
|
|
|
(lambda _
|
|
|
|
;; Do not attempt to create /etc or /var.
|
|
|
|
(substitute* "scripts/Makefile"
|
|
|
|
(("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
|
|
|
|
"$(DESTDIR)$(prefix)$(sysconfdir)"))
|
|
|
|
(substitute* "user/v84/Makefile"
|
|
|
|
(("\\$\\(DESTDIR\\)\\$\\(localstatedir\\)")
|
|
|
|
"$(DESTDIR)$(prefix)$(localstatedir)")
|
|
|
|
(("\\$\\(DESTDIR\\)/lib/drbd")
|
|
|
|
"$(DESTDIR)$(prefix)/lib/drbd"))
|
|
|
|
(substitute* "user/v9/Makefile"
|
|
|
|
(("\\$\\(DESTDIR\\)\\$\\(localstatedir\\)")
|
|
|
|
"$(DESTDIR)$(prefix)$(localstatedir)")
|
|
|
|
(("\\$\\(DESTDIR\\)\\$\\(DRBD_LIB_DIR\\)")
|
|
|
|
"$(DESTDIR)$(prefix)$(DRBD_LIB_DIR)")))))))
|
2020-07-02 20:22:17 +02:00
|
|
|
(native-inputs
|
2022-06-20 15:34:01 +02:00
|
|
|
(list clitest
|
|
|
|
eudev ;just to satisfy a configure check
|
2022-06-20 16:35:19 +02:00
|
|
|
flex
|
|
|
|
;; For the documentation.
|
|
|
|
docbook-xml
|
|
|
|
docbook-xml-4.4 ;used by documentation/ra2refentry.xsl
|
|
|
|
docbook-xsl
|
|
|
|
libxml2 ;for XML_CATALOG_FILES
|
|
|
|
libxslt ;for xsltproc
|
|
|
|
ruby-asciidoctor))
|
2020-07-02 20:22:17 +02:00
|
|
|
(home-page "https://www.linbit.com/drbd/")
|
|
|
|
(synopsis "Replicate block devices between machines")
|
|
|
|
(description
|
|
|
|
"@acronym{DRBD, Distributed Replicated Block Device} is a software-based,
|
|
|
|
shared-nothing, replicated storage solution mirroring the content of block
|
|
|
|
devices (hard disks, partitions, logical volumes etc.) over any network
|
|
|
|
connection. This package contains the userland utilities.")
|
2022-06-20 15:25:19 +02:00
|
|
|
(properties
|
|
|
|
'((release-monitoring-url
|
|
|
|
. "https://www.linbit.com/en/drbd-community/drbd-download/")))
|
2020-07-02 20:22:17 +02:00
|
|
|
(license license:gpl2+)))
|
|
|
|
|
2018-06-07 16:07:30 +02:00
|
|
|
(define-public keepalived
|
|
|
|
(package
|
|
|
|
(name "keepalived")
|
2020-01-08 06:24:02 +01:00
|
|
|
(version "2.0.19")
|
2018-06-07 16:07:30 +02:00
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"http://www.keepalived.org/software/keepalived-"
|
|
|
|
version ".tar.gz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2020-01-08 06:24:02 +01:00
|
|
|
"19scrrjsxw5g914d5ka352445blaq77dk2vm4vxabijvfra88bqf"))))
|
2018-06-07 16:07:30 +02:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(arguments
|
|
|
|
'(#:phases
|
|
|
|
(modify-phases %standard-phases
|
2018-06-10 17:42:14 +02:00
|
|
|
(add-after 'build 'build-info
|
|
|
|
(lambda _
|
|
|
|
(invoke "make" "-C" "doc" "texinfo")
|
|
|
|
;; Put images in a subdirectory as recommended by 'texinfo'.
|
2019-09-05 13:48:58 +02:00
|
|
|
(install-file "doc/source/images/software_design.png"
|
2018-06-10 17:42:14 +02:00
|
|
|
"doc/build/texinfo/keepalived-figures")
|
|
|
|
(substitute* "doc/build/texinfo/keepalived.texi"
|
|
|
|
(("@image\\{software_design,")
|
|
|
|
"@image{keepalived-figures/software_design,"))
|
|
|
|
(invoke "make" "-C" "doc/build/texinfo")))
|
|
|
|
(add-after 'install 'install-info
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
(infodir (string-append out "/share/info")))
|
|
|
|
(install-file "doc/build/texinfo/keepalived.info" infodir)
|
2019-09-05 13:48:58 +02:00
|
|
|
(install-file "doc/source/images/software_design.png"
|
2018-06-10 17:42:14 +02:00
|
|
|
(string-append infodir "/keepalived-figures"))
|
|
|
|
#t))))))
|
2018-06-07 16:07:30 +02:00
|
|
|
(native-inputs
|
2021-12-13 17:18:24 +01:00
|
|
|
(list pkg-config python-sphinx texinfo))
|
2018-06-07 16:07:30 +02:00
|
|
|
(inputs
|
2021-12-13 17:18:24 +01:00
|
|
|
(list openssl libnfnetlink libnl))
|
2019-09-05 17:39:35 +02:00
|
|
|
(home-page "https://www.keepalived.org/")
|
2018-06-28 16:39:05 +02:00
|
|
|
(synopsis "Load balancing and high-availability frameworks")
|
2018-06-07 16:07:30 +02:00
|
|
|
(description
|
|
|
|
"Keepalived provides frameworks for both load balancing and high
|
|
|
|
availability. The load balancing framework relies on the Linux Virtual
|
2018-06-28 16:39:05 +02:00
|
|
|
Server (@dfn{IPVS}) kernel module. High availability is achieved by the Virtual
|
|
|
|
Redundancy Routing Protocol (@dfn{VRRP}). Each Keepalived framework can be used
|
2018-06-07 16:07:30 +02:00
|
|
|
independently or together to provide resilient infrastructures.")
|
|
|
|
(license license:gpl2+)))
|
2019-09-05 11:30:44 +02:00
|
|
|
|
|
|
|
(define-public libraft
|
|
|
|
(package
|
|
|
|
(name "libraft")
|
2021-08-20 14:45:19 +02:00
|
|
|
(version "0.11.2")
|
2019-09-08 14:19:25 +02:00
|
|
|
(home-page "https://github.com/canonical/raft")
|
2019-09-05 11:30:44 +02:00
|
|
|
(source (origin
|
2019-09-08 14:19:25 +02:00
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference (url home-page)
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
(file-name (git-file-name name version))
|
2019-09-05 11:30:44 +02:00
|
|
|
(sha256
|
|
|
|
(base32
|
2021-08-20 14:45:19 +02:00
|
|
|
"050dwy34jh8dihfwfm0r1by2i3sy9crapipp9idw32idm79y4izb"))))
|
2019-12-06 09:36:52 +01:00
|
|
|
(arguments '(#:configure-flags '("--enable-uv")
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'disable-failing-tests
|
|
|
|
(lambda _
|
|
|
|
(substitute* "Makefile.am"
|
|
|
|
((".*test_uv_append.c.*") ""))
|
|
|
|
#t)))))
|
|
|
|
(inputs
|
2021-12-13 17:18:24 +01:00
|
|
|
(list libuv lz4))
|
2019-09-05 11:30:44 +02:00
|
|
|
(native-inputs
|
|
|
|
`(("autoconf" ,autoconf)
|
|
|
|
("automake" ,automake)
|
|
|
|
("gettext" ,gettext-minimal)
|
|
|
|
("libtool" ,libtool)
|
|
|
|
("pkg-config" ,pkg-config)))
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
(synopsis "C implementation of the Raft consensus protocol")
|
|
|
|
(description "The library has modular design: its core part implements only
|
|
|
|
the core Raft algorithm logic, in a fully platform independent way. On top of
|
|
|
|
that, a pluggable interface defines the I/O implementation for networking
|
|
|
|
(send/receive RPC messages) and disk persistence (store log entries and
|
|
|
|
snapshots).")
|
|
|
|
(license license:asl2.0)))
|
2021-06-01 08:03:23 +02:00
|
|
|
|
|
|
|
(define-public libdqlite
|
|
|
|
(package
|
|
|
|
(name "libdqlite")
|
2021-08-20 14:45:20 +02:00
|
|
|
(version "1.9.0")
|
2021-06-01 08:03:23 +02:00
|
|
|
(home-page "https://github.com/canonical/dqlite")
|
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference (url home-page)
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2021-08-20 14:45:20 +02:00
|
|
|
"0zalsvr0vy7632nhm96a29lrfy18iqsmbxpyz2lvq80mrjlbrzsn"))))
|
2021-06-01 08:03:23 +02:00
|
|
|
(arguments
|
|
|
|
'(#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'disable-failing-tests
|
|
|
|
(lambda _
|
|
|
|
(substitute* "Makefile.am"
|
|
|
|
;; Test client/query sometimes fails.
|
|
|
|
;; The actual tested asserts succeed, but there appears to be a
|
|
|
|
;; race condition when tearing down the test server.
|
|
|
|
((".*test_client.c.*") "")))))))
|
|
|
|
(native-inputs
|
2021-12-13 17:18:24 +01:00
|
|
|
(list autoconf automake libtool pkg-config))
|
2021-06-01 08:03:23 +02:00
|
|
|
(inputs
|
2021-12-13 17:18:24 +01:00
|
|
|
(list libraft libuv))
|
2021-06-01 08:03:23 +02:00
|
|
|
(propagated-inputs
|
2021-12-13 17:18:24 +01:00
|
|
|
(list sqlite)) ; dqlite.h includes sqlite3.h
|
2021-06-01 08:03:23 +02:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(synopsis "Distributed SQLite")
|
|
|
|
(description "dqlite is a C library that implements an embeddable and replicated
|
|
|
|
SQL database engine with high-availability and automatic failover.")
|
|
|
|
(license license:lgpl3)))
|