-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
127 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2432,6 +2432,7 @@ | |
"umoci", | ||
"usrsctp", | ||
"vala", | ||
"valkey", | ||
"verity-read-only-root", | ||
"vnstat", | ||
"zstd" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/valkey.conf b/valkey.conf | ||
index 0f43f5c..f6738ad 100644 | ||
--- a/valkey.conf | ||
+++ b/valkey.conf | ||
@@ -351,7 +351,7 @@ loglevel notice | ||
# Specify the log file name. Also the empty string can be used to force | ||
# the server to log on the standard output. Note that if you use standard | ||
# output for logging but daemonize, logs will be sent to /dev/null | ||
-logfile "" | ||
+logfile "/var/log/valkey/valkey.log" | ||
|
||
# To enable logging to the system logger, just set 'syslog-enabled' to yes, | ||
# and optionally update the other syslog parameters to suit your needs. | ||
@@ -526,7 +526,7 @@ rdb-del-sync-files no | ||
# 'cluster-config-file' configuration directive is a relative path. | ||
# | ||
# Note that you must specify a directory here, not a file name. | ||
-dir ./ | ||
+dir /var/lib/valkey | ||
|
||
################################# REPLICATION ################################# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"Signatures": { | ||
"valkey-8.0.0.tar.gz": "f87fef2ba81ae4bce891b874fba58cfde2d19370a3bcac20f0e17498b33c33c0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
Summary: advanced key-value store | ||
Name: valkey | ||
Version: 8.0.0 | ||
Release: 1%{?dist} | ||
License: BSD | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
Group: Applications/Databases | ||
URL: https://valkey.io/ | ||
Source0: https://github.com/valkey-io/valkey/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz | ||
Patch0: valkey-conf.patch | ||
BuildRequires: gcc | ||
BuildRequires: make | ||
BuildRequires: openssl-devel | ||
BuildRequires: systemd | ||
BuildRequires: tcl | ||
BuildRequires: tcl-devel | ||
BuildRequires: which | ||
Requires: systemd | ||
Requires(pre): %{_sbindir}/groupadd | ||
Requires(pre): %{_sbindir}/useradd | ||
|
||
%description | ||
A flexible distributed key-value datastore that supports both caching and beyond caching workloads. | ||
|
||
%prep | ||
%autosetup -p1 | ||
|
||
%build | ||
make BUILD_TLS=yes %{?_smp_mflags} | ||
|
||
%install | ||
install -vdm 755 %{buildroot} | ||
make PREFIX=%{buildroot}%{_prefix} install | ||
install -D -m 0640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf | ||
mkdir -p %{buildroot}%{_sharedstatedir}/valkey | ||
mkdir -p %{buildroot}%{_var}/log | ||
mkdir -p %{buildroot}%{_var}/opt/%{name}/log | ||
ln -sfv %{_var}/opt/%{name}/log %{buildroot}%{_var}/log/%{name} | ||
mkdir -p %{buildroot}/usr/lib/systemd/system | ||
cat << EOF >> %{buildroot}/usr/lib/systemd/system/valkey.service | ||
[Unit] | ||
Description=Valkey in-memory key-value datastore | ||
After=network.target | ||
[Service] | ||
ExecStart=%{_bindir}/valkey-server %{_sysconfdir}/valkey.conf --daemonize no | ||
ExecStop=%{_bindir}/valkey-cli shutdown | ||
User=valkey | ||
Group=valkey | ||
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
|
||
%check | ||
make check | ||
|
||
%pre | ||
getent group %{name} &> /dev/null || \ | ||
groupadd -r %{name} &> /dev/null | ||
getent passwd %{name} &> /dev/null || \ | ||
useradd -r -g %{name} -d %{_sharedstatedir}/valkey -s /sbin/nologin \ | ||
-c 'Valkey Datastore Server' %{name} &> /dev/null | ||
exit 0 | ||
|
||
%post | ||
/sbin/ldconfig | ||
%systemd_post valkey.service | ||
|
||
%postun | ||
/sbin/ldconfig | ||
%systemd_postun_with_restart valkey.service | ||
|
||
%files | ||
%defattr(-,root,root) | ||
%license COPYING | ||
%dir %attr(0750, valkey, valkey) %{_sharedstatedir}/valkey | ||
%dir %attr(0750, valkey, valkey) %{_var}/opt/%{name}/log | ||
%attr(0750, valkey, valkey) %{_var}/log/%{name} | ||
%{_bindir}/* | ||
%{_libdir}/systemd/* | ||
%config(noreplace) %attr(0640, %{name}, %{name}) %{_sysconfdir}/valkey.conf | ||
|
||
%changelog | ||
* Mon Sep 30 2024 Rohit Rawat <[email protected]> - 8.0.0-1 | ||
- Original version for CBL-Mariner. | ||
- License Verified. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters