mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2024-09-20 11:23:16 +00:00
main/valkey: move unixsocket to writable location
Valkey has no permissions to write its unixsocket to /run. Move the socket to `/run/valkey/`. Co-Authored-By: Jakub Jirutka <jakub@jirutka.cz> Fixes #16135
This commit is contained in:
parent
b4926eea9c
commit
a560ed2d95
3 changed files with 18 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
|||
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
||||
pkgname=valkey
|
||||
pkgver=7.2.5
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Open source high-performance key/value datastore (fork of Redis)"
|
||||
url="https://valkey.io/"
|
||||
arch="all"
|
||||
|
@ -15,6 +15,7 @@ makedepends="linux-headers openssl-dev"
|
|||
checkdepends="tcl procps"
|
||||
install="
|
||||
$pkgname.pre-install
|
||||
$pkgname.post-install
|
||||
$pkgname-compat.pre-install
|
||||
"
|
||||
subpackages="
|
||||
|
@ -97,7 +98,7 @@ compat() {
|
|||
|
||||
sha512sums="
|
||||
0b684a5ffe045ce51bb2f4f76429928784b8b46ee4817a95b658ffd69313a90b3d0fb12e0ddbb0b4cb57a7e0c79072f603eb4524a9bcce96ecc9ae8f1a5f02c3 valkey-7.2.5.tar.gz
|
||||
20278cb287d9bc15839a120af4379d18bbc3bef61f07834931c807be87a2227027ad4f1bbd1fba3fdcc99b37e67262f2c925e99905b4bc1b15697a5be282265b valkey.conf.patch
|
||||
a5b567a9ac300fed9f3eb484922b49d3677915c7282ffecd3b71505c685cf1964791f4915308ac31f03851f707646313e72bb35b229cfe81fea4a9b1d8f4009b valkey.conf.patch
|
||||
d0311d2bfade7efbfa2bdcc6c74e8e8a151c09c627e30f5cea1826155dcb4f7ca4c1d35aba26bccec933575fadcbe5785e16b4801058fec73c7de5537ffeb09a sentinel.conf.patch
|
||||
605c1f39cf5f206e03d19af54412a66732ad3c65d5cb36e5d6cfb9d28779807d2da9c29d01f07e0ba2956446cb6935b66c92844a74b255b6070870b30d7d45d8 valkey.initd
|
||||
639a007f7e98cf7614d2afb6e109042883030e0bdf4eaf1dc3df3ecab8043d6be30647e1e46295f783efc7baf42dc420b2e5dcf388913efdc5bdf2cd1e418f9f valkey.confd
|
||||
|
|
|
@ -3,7 +3,9 @@ have any effect in valkey.conf. It's init/rc system's job to daemonize
|
|||
programs and handle pidfiles, if it needs it!
|
||||
|
||||
Applications often communicate with Redis via unix socket, so it's
|
||||
convenient to have it enabled by default.
|
||||
convenient to have it enabled by default. It must be in a subdirectory that
|
||||
is automatically created by the init script because valkey user has no
|
||||
permission to create files in /run.
|
||||
|
||||
--- a/valkey.conf
|
||||
+++ b/valkey.conf
|
||||
|
@ -13,7 +15,7 @@ convenient to have it enabled by default.
|
|||
#
|
||||
-# unixsocket /run/valkey.sock
|
||||
-# unixsocketperm 700
|
||||
+unixsocket /run/valkey.sock
|
||||
+unixsocket /run/valkey/valkey.sock
|
||||
+unixsocketperm 770
|
||||
|
||||
# Close the connection after a client is idle for N seconds (0 to disable)
|
||||
|
|
11
main/valkey/valkey.post-install
Normal file
11
main/valkey/valkey.post-install
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Create directory for the socket if OpenRC is not present (e.g. in container).
|
||||
# It's conditioned using post-install script specifically to avoid easily
|
||||
# overlookable mistakes in the init script (service working until the
|
||||
# first restart).
|
||||
if ! [ -e /sbin/openrc ]; then
|
||||
install -d -m 755 -o valkey -g valkey /run/valkey
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in a new issue