GNU bug report logs - #77899
[PATCH] gnu: Add valkey.

Previous Next

Package: guix-patches;

Reported by: Zhu Zihao <all_but_last <at> 163.com>

Date: Fri, 18 Apr 2025 14:03:06 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 77899 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#77899; Package guix-patches. (Fri, 18 Apr 2025 14:03:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zhu Zihao <all_but_last <at> 163.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 18 Apr 2025 14:03:08 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add valkey.
Date: Fri, 18 Apr 2025 22:00:40 +0800
[Message part 1 (text/plain, inline)]
Valkey is a fork of Redis, backed by Linux Foundation. https://valkey.io/

Recently, Archlinux replace Redis with Valkey. I suggests Guix use
valkey for `redis-service-type' to improve the freedom of Guix users.

From the practical perspective, It may need time to test the new
package, so we can just add valkey to the channel first.



-- 
Retrieve my PGP public key:
执行下列命令以获取我的 PGP 公有密钥:

  gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC

Zihao
[signature.asc (application/pgp-signature, inline)]

Information forwarded to sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#77899; Package guix-patches. (Fri, 18 Apr 2025 14:14:08 GMT) Full text and rfc822 format available.

Message #8 received at 77899 <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: 77899 <at> debbugs.gnu.org
Cc: Zhu Zihao <all_but_last <at> 163.com>
Subject: [PATCH] gnu: Add valkey.
Date: Fri, 18 Apr 2025 22:12:17 +0800
* gnu/packages/database.scm(valkey): New variable.

Change-Id: Ia1899ee41ecdd372d659c02940cc7ca9fbc011d8
---
 gnu/packages/databases.scm | 74 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 73 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 32973d3896..16593af4f7 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -54,7 +54,7 @@
 ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo <at> member.fsf.org>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
-;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com>
+;;; Copyright © 2022, 2025 Zhu Zihao <all_but_last <at> 163.com>
 ;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
 ;;; Copyright © 2022 muradm <mail <at> muradm.net>
 ;;; Copyright © 2022 Thomas Albers Raviola <thomas <at> thomaslabs.org>
@@ -2881,6 +2881,78 @@ (define-public redis
     (properties `((lint-hidden-cve . ("CVE-2022-3647" "CVE-2022-33105"))))
     (license license:bsd-3)))
 
+(define-public valkey
+  (package
+    (name "valkey")
+    (version "8.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/valkey-io/valkey")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bd4jhh2hp75996mz62p6l31c0zkr3i9cw3v6va6j94srn9y8v1m"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Delete bundled jemalloc, as the package will use the libc one
+        #~(begin (delete-file-recursively "deps/jemalloc")))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:modules '((ice-9 ftw)
+                  (guix build utils)
+                  (guix build gnu-build-system))
+      #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
+                           "MALLOC=libc"
+                           (string-append "PREFIX=" #$output))
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (add-after 'unpack 'patch-paths
+            (lambda _
+              (substitute* "runtest"
+                (("^TCLSH=.*")
+                 (string-append "TCLSH=" (which "tclsh"))))
+              (substitute* "tests/support/server.tcl"
+                (("/usr/bin/env")
+                 (which "env")))))
+          (add-after 'unpack 'adjust-tests
+            (lambda _
+              ;; Disable failing tests.
+              ;; Valkey search test directories for tests.
+              (with-directory-excursion "tests"
+                ;; The AOF tests cause the test suite to hang waiting for a
+                ;; "background AOF rewrite to finish", perhaps because dead
+                ;; processes persist as zombies in the build environment.
+                (delete-file "unit/aofrw.tcl")
+                (delete-file "integration/aof-multi-part.tcl")
+
+                ;; The OOM score tests try to raise the current OOM score, but
+                ;; our build environment already sets it for all children to
+                ;; the highest possible one (1000).  We can't lower it because
+                ;; we don't have CAP_SYS_RESOURCE.
+                (delete-file "unit/oom-score-adj.tcl")
+
+                (delete-file "integration/failover.tcl")
+
+                (with-directory-excursion "integration"
+                  (for-each
+                   delete-file
+                   (scandir "." (lambda (filename)
+                                  (string-prefix? "replication" filename))))
+                  (delete-file "dual-channel-replication.tcl")
+                  (delete-file "cross-version-replication.tcl"))))))))
+    (native-inputs (list pkg-config procps tcl which))
+    (home-page "https://valkey.io/")
+    (synopsis "Free high-performance key/value datastore")
+    (description
+     "Valkey is an free high-performance key/value datastore that supports a
+variety of workloads such as caching, message queues, and can act as a primary
+database.")
+    (license license:bsd-3)))
+
 (define-public hiredis
   (package
     (name "hiredis")

base-commit: 54cc9c96ec0877b2afa24871c3acd8af27b0d500
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#77899; Package guix-patches. (Fri, 18 Apr 2025 14:16:08 GMT) Full text and rfc822 format available.

Message #11 received at 77899 <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: 77899 <at> debbugs.gnu.org
Subject: Re: bug#77899: Acknowledgement ([PATCH] gnu: Add valkey.)
Date: Fri, 18 Apr 2025 22:14:58 +0800
[Message part 1 (text/plain, inline)]
Z_572(Zheng Junjie) suggests not to inherit from redis, to ease the
deletion of redis package. 
-- 
Retrieve my PGP public key:
执行下列命令以获取我的 PGP 公有密钥:

  gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC

Zihao
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#77899; Package guix-patches. (Sat, 19 Apr 2025 00:59:03 GMT) Full text and rfc822 format available.

Message #14 received at 77899 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Zhu Zihao <all_but_last <at> 163.com>
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 77899 <at> debbugs.gnu.org
Subject: Re: [bug#77899] [PATCH] gnu: Add valkey.
Date: Sat, 19 Apr 2025 08:57:18 +0800
Hi,

On Fri, 18 Apr 2025 22:00:40 +0800,
Zhu Zihao wrote:
>
> [1  <text/plain; utf-8 (quoted-printable)>]
>
> Valkey is a fork of Redis, backed by Linux Foundation. https://valkey.io/
>
> Recently, Archlinux replace Redis with Valkey. I suggests Guix use
> valkey for `redis-service-type' to improve the freedom of Guix users.
>
> From the practical perspective, It may need time to test the new
> package, so we can just add valkey to the channel first.

Can you add version 7.2.8 instead so that we can deprecate redis directly?

Thanks




This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.