me
/
guix
Archived
1
0
Fork 0

gnu: opendht: Update to 3.1.11-0.318d02c.

* gnu/packages/networking.scm (opendht): Update to 3.1.11-0.318d02c.

Change-Id: I36f7bb3a5979e3286c9a54b29dceb7daf6161b7a
master
Maxim Cournoyer 2024-05-26 22:43:42 -04:00
parent a033b85c5c
commit e36774495f
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 116 additions and 112 deletions

View File

@ -3848,117 +3848,121 @@ and targeted primarily for asynchronous processing of HTTP-requests.")
(replace "llhttp" http-parser))))) (replace "llhttp" http-parser)))))
(define-public opendht (define-public opendht
(package ;; Temporarily use the latest commit, as the latest release lacks a 'detach'
(name "opendht") ;; procedure used by a recent DhtNet, required by Jami.
(version "3.1.11") (let ((commit "318d02c55a7061a771a632ff2224b0d195a80d42")
(source (origin (revision "0"))
(method git-fetch) (package
(uri (git-reference (name "opendht")
(url "https://github.com/savoirfairelinux/opendht") (version (git-version "3.1.11" revision commit))
(commit (string-append "v" version)))) (source (origin
(file-name (git-file-name name version)) (method git-fetch)
(sha256 (uri (git-reference
(base32 (url "https://github.com/savoirfairelinux/opendht")
"05zli0c14wg5dafw12xjhnva0rlsm3dgiksn6n9g8ab990d915ll")))) (commit commit)))
(outputs '("out" "python" "tools" "debug")) (file-name (git-file-name name version))
(build-system gnu-build-system) (sha256
(arguments (base32
(list "0d4m9bxvwa1pz8r0sfrjjyml4yp5v7n4vy8ad7k4hcryyvd5npb0"))))
#:imported-modules `((guix build python-build-system) ;for site-packages (outputs '("out" "python" "tools" "debug"))
,@%gnu-build-system-modules) (build-system gnu-build-system)
#:modules '(((guix build python-build-system) #:prefix python:) (arguments
(guix build gnu-build-system) (list
(guix build utils)) #:imported-modules `((guix build python-build-system) ;for site-packages
#:configure-flags ,@%gnu-build-system-modules)
#~(list "--disable-static" ;to reduce size #:modules '(((guix build python-build-system) #:prefix python:)
"--enable-tests" (guix build gnu-build-system)
"--enable-proxy-server" (guix build utils))
"--enable-push-notifications" #:configure-flags
"--enable-proxy-server-identity" #~(list "--disable-static" ;to reduce size
"--enable-proxy-client") "--enable-tests"
#:phases "--enable-proxy-server"
#~(modify-phases %standard-phases "--enable-push-notifications"
(add-after 'unpack 'disable-problematic-tests "--enable-proxy-server-identity"
(lambda _ "--enable-proxy-client")
;; The dhtrunnertester test suite includes 'testListen', which #:phases
;; is sensitive to the performance/load of the machine it runs #~(modify-phases %standard-phases
;; on, introducing nondeterminism (see: (add-after 'unpack 'disable-problematic-tests
;; https://github.com/savoirfairelinux/opendht/issues/626). (lambda _
(substitute* "tests/Makefile.am" ;; The dhtrunnertester test suite includes 'testListen', which
(("\\bdhtrunnertester\\.(h|cpp)\\b") ;; is sensitive to the performance/load of the machine it runs
"")))) ;; on, introducing nondeterminism (see:
(add-after 'unupack 'relax-test-timeouts ;; https://github.com/savoirfairelinux/opendht/issues/626).
(lambda _ (substitute* "tests/Makefile.am"
;; At least the 'test_send_json' has been seen to fail (("\\bdhtrunnertester\\.(h|cpp)\\b")
;; non-deterministically, but it seems hard to reproducible that ""))))
;; failure. (add-after 'unupack 'relax-test-timeouts
(substitute* "tests/httptester.cpp" (lambda _
(("std::chrono::seconds\\(10)") ;; At least the 'test_send_json' has been seen to fail
"std::chrono::seconds(30)")))) ;; non-deterministically, but it seems hard to reproducible that
(add-after 'unpack 'fix-python-installation-prefix ;; failure.
;; Specify the installation prefix for the compiled Python module (substitute* "tests/httptester.cpp"
;; that would otherwise attempt to installs itself to Python's own (("std::chrono::seconds\\(10)")
;; site-packages directory. "std::chrono::seconds(30)"))))
(lambda _ (add-after 'unpack 'fix-python-installation-prefix
(substitute* "python/Makefile.am" ;; Specify the installation prefix for the compiled Python module
(("--root=\\$\\(DESTDIR)/") ;; that would otherwise attempt to installs itself to Python's own
(string-append "--root=/ --single-version-externally-managed " ;; site-packages directory.
"--prefix=" #$output:python))))) (lambda _
(add-after 'unpack 'specify-runpath-for-python-module (substitute* "python/Makefile.am"
(lambda _ (("--root=\\$\\(DESTDIR)/")
(substitute* "python/setup.py.in" (string-append "--root=/ --single-version-externally-managed "
(("extra_link_args=\\[(.*)\\]" _ args) "--prefix=" #$output:python)))))
(string-append "extra_link_args=[" args (add-after 'unpack 'specify-runpath-for-python-module
", '-Wl,-rpath=" #$output "/lib']"))))) (lambda _
(replace 'check (substitute* "python/setup.py.in"
(lambda* (#:key tests? #:allow-other-keys) (("extra_link_args=\\[(.*)\\]" _ args)
(when tests? (string-append "extra_link_args=[" args
(invoke "tests/opendht_unit_tests")))) ", '-Wl,-rpath=" #$output "/lib']")))))
(add-before 'bootstrap 'delete-autogen.sh (replace 'check
(lambda _ (lambda* (#:key tests? #:allow-other-keys)
;; The autogen.sh script lacks a shebang, cannot be executed (when tests?
;; directly. Let the bootstrap phase invoke autoreconf itself. (invoke "tests/opendht_unit_tests"))))
(delete-file "autogen.sh"))) (add-before 'bootstrap 'delete-autogen.sh
(add-after 'install 'move-and-wrap-tools (lambda _
(lambda* (#:key inputs outputs #:allow-other-keys) ;; The autogen.sh script lacks a shebang, cannot be executed
(let* ((tools (assoc-ref outputs "tools")) ;; directly. Let the bootstrap phase invoke autoreconf itself.
(dhtcluster (string-append tools "/bin/dhtcluster")) (delete-file "autogen.sh")))
(site-packages (python:site-packages inputs outputs))) (add-after 'install 'move-and-wrap-tools
(mkdir tools) (lambda* (#:key inputs outputs #:allow-other-keys)
(rename-file (string-append #$output "/bin") (let* ((tools (assoc-ref outputs "tools"))
(string-append tools "/bin")) (dhtcluster (string-append tools "/bin/dhtcluster"))
;; TODO: Contribute a patch to python/Makefile.am to (site-packages (python:site-packages inputs outputs)))
;; automate this. (mkdir tools)
(copy-file "python/tools/dhtcluster.py" dhtcluster) (rename-file (string-append #$output "/bin")
(chmod dhtcluster #o555) (string-append tools "/bin"))
(wrap-program dhtcluster ;; TODO: Contribute a patch to python/Makefile.am to
`("GUIX_PYTHONPATH" prefix (,site-packages))))))))) ;; automate this.
(inputs (copy-file "python/tools/dhtcluster.py" dhtcluster)
(list bash-minimal (chmod dhtcluster #o555)
fmt (wrap-program dhtcluster
readline)) `("GUIX_PYTHONPATH" prefix (,site-packages)))))))))
(propagated-inputs (inputs
(list msgpack-cxx ;included in several installed headers (list bash-minimal
restinio-0.6 ;included in opendht/http.h fmt
;; The following are listed in the 'Requires.private' field of readline))
;; opendht.pc: (propagated-inputs
argon2 (list msgpack-cxx ;included in several installed headers
gnutls restinio-0.6 ;included in opendht/http.h
jsoncpp ;; The following are listed in the 'Requires.private' field of
nettle ;; opendht.pc:
openssl ;required for the DHT proxy argon2
python)) gnutls
(native-inputs jsoncpp
(list autoconf nettle
automake openssl ;required for the DHT proxy
pkg-config python))
python (native-inputs
python-cython (list autoconf
libtool automake
cppunit)) pkg-config
(home-page "https://github.com/savoirfairelinux/opendht/") python
(synopsis "Lightweight Distributed Hash Table (DHT) library") python-cython
(description "OpenDHT provides an easy to use distributed in-memory data libtool
cppunit))
(home-page "https://github.com/savoirfairelinux/opendht/")
(synopsis "Lightweight Distributed Hash Table (DHT) library")
(description "OpenDHT provides an easy to use distributed in-memory data
store. Every node in the network can read and write values to the store. store. Every node in the network can read and write values to the store.
Values are distributed over the network, with redundancy. It includes the Values are distributed over the network, with redundancy. It includes the
following features: following features:
@ -3981,7 +3985,7 @@ library (get, put, etc.) with text values.
@item dhtchat @item dhtchat
A very simple IM client working over the DHT. A very simple IM client working over the DHT.
@end table") @end table")
(license license:gpl3+))) (license license:gpl3+))))
(define-public dhtnet (define-public dhtnet
;; There is no tag nor release; use the latest available commit. ;; There is no tag nor release; use the latest available commit.