From 40f13dd7979619828dce6ffd251642a769824349 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Tue, 13 Aug 2024 10:29:50 -0700 Subject: [PATCH] Fix binary path in systemd unit for kvrocks (#1899) (#1903) (cherry picked from commit b3c0da3e7785fdc2bb74aaa37c10e94dbe93a1ca) Co-authored-by: Philipp Trulson --- ...ystemd-service-to-use-package-binary.patch | 25 +++++++++++++++++++ anda/devs/kvrocks/kvrocks.spec | 5 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 anda/devs/kvrocks/0001-Change-path-in-systemd-service-to-use-package-binary.patch diff --git a/anda/devs/kvrocks/0001-Change-path-in-systemd-service-to-use-package-binary.patch b/anda/devs/kvrocks/0001-Change-path-in-systemd-service-to-use-package-binary.patch new file mode 100644 index 0000000000..0e23402626 --- /dev/null +++ b/anda/devs/kvrocks/0001-Change-path-in-systemd-service-to-use-package-binary.patch @@ -0,0 +1,25 @@ +From 518d106d6d54bc65d37116e3c5bc940b5c93fb0e Mon Sep 17 00:00:00 2001 +From: Philipp Trulson +Date: Tue, 13 Aug 2024 10:22:14 +0200 +Subject: [PATCH] Change path in systemd service to use package binary + +--- + utils/systemd/kvrocks.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/systemd/kvrocks.service b/utils/systemd/kvrocks.service +index c0180b7c..17482b7a 100644 +--- a/utils/systemd/kvrocks.service ++++ b/utils/systemd/kvrocks.service +@@ -6,7 +6,7 @@ After=network-online.target + + [Service] + Type=notify +-ExecStart=/usr/local/bin/kvrocks -c /etc/kvrocks/kvrocks.conf ++ExecStart=/usr/bin/kvrocks -c /etc/kvrocks/kvrocks.conf + Restart=on-failure + ExecStop=/bin/kill -s TERM $MAINPID + RestartSec=10s +-- +2.45.2 + diff --git a/anda/devs/kvrocks/kvrocks.spec b/anda/devs/kvrocks/kvrocks.spec index 28013e819d..171bd55648 100644 --- a/anda/devs/kvrocks/kvrocks.spec +++ b/anda/devs/kvrocks/kvrocks.spec @@ -1,10 +1,11 @@ Name: kvrocks Version: 2.9.0 -Release: 1%?dist +Release: 2%?dist Summary: Distributed key value NoSQL database that uses RocksDB License: Apache-2.0 URL: https://kvrocks.apache.org/ Source0: https://github.com/apache/kvrocks/archive/refs/tags/v%version.tar.gz +Patch0: 0001-Change-path-in-systemd-service-to-use-package-binary.patch Requires: openssl BuildRequires: autoconf BuildRequires: cmake @@ -19,7 +20,7 @@ Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as st engine and is compatible with Redis protocol. %prep -%autosetup +%autosetup -p1 %build unset LDFLAGS