From 709cc839c57ac67259335cd862d0bc1f204a1384 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 4 Apr 2024 22:10:54 -0400 Subject: [PATCH 1/2] redict 7.3.0 (new formula) Signed-off-by: Rui Chen autobump: add redict Signed-off-by: Rui Chen --- .github/autobump.txt | 1 + Formula/r/redict.rb | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Formula/r/redict.rb diff --git a/.github/autobump.txt b/.github/autobump.txt index 6e28feaae3def..0d3c4b4139d0f 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -1590,6 +1590,7 @@ readpe rebar3 recode recoverpy +redict redwax-tool regclient regina-rexx diff --git a/Formula/r/redict.rb b/Formula/r/redict.rb new file mode 100644 index 0000000000000..52268f72874d3 --- /dev/null +++ b/Formula/r/redict.rb @@ -0,0 +1,39 @@ +class Redict < Formula + desc "Distributed key/value database" + homepage "https://redict.io/" + url "https://codeberg.org/redict/redict/archive/7.3.0.tar.gz" + sha256 "733880c043c04d6038c28e77f2e826143142929be9c4a68f82a4f66e7a0caf5c" + license "LGPL-3.0-only" + head "https://codeberg.org/redict/redict.git", branch: "main" + + depends_on "openssl@3" + + def install + system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "BUILD_TLS=yes" + + %w[run db/redict log].each { |p| (var/p).mkpath } + + # Fix up default conf file to match our paths + inreplace "redict.conf" do |s| + s.gsub! "/var/run/redict_6379.pid", var/"run/redict.pid" + s.gsub! "dir ./", "dir #{var}/db/redict/" + s.sub!(/^bind .*$/, "bind 127.0.0.1 ::1") + end + + etc.install "redict.conf" + etc.install "sentinel.conf" => "redict-sentinel.conf" + end + + service do + run [opt_bin/"redict-server", etc/"redict.conf"] + keep_alive true + error_log_path var/"log/redict.log" + log_path var/"log/redict.log" + working_dir var + end + + test do + system bin/"redict-server", "--test-memory", "2" + %w[run db/redict log].each { |p| assert_predicate var/p, :exist?, "#{var/p} doesn't exist!" } + end +end From d159cdf5bdef615cee9bb2090d94cf68c5614402 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 5 Apr 2024 11:43:58 +0000 Subject: [PATCH 2/2] redict: add 7.3.0 bottle. --- Formula/r/redict.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Formula/r/redict.rb b/Formula/r/redict.rb index 52268f72874d3..1c8e7cc40c692 100644 --- a/Formula/r/redict.rb +++ b/Formula/r/redict.rb @@ -6,6 +6,16 @@ class Redict < Formula license "LGPL-3.0-only" head "https://codeberg.org/redict/redict.git", branch: "main" + bottle do + sha256 cellar: :any, arm64_sonoma: "8ca12acea855c46b02c65d36f63b9810aad63ed14ac83473fb498cfe0768ed4f" + sha256 cellar: :any, arm64_ventura: "6ef318d2319f9b5f18cffd399f96dcbc035cf8cf3b75fa489cd9955e6ab1cf4d" + sha256 cellar: :any, arm64_monterey: "8b302580ed161bb8384e30bd0b50eadbe1047acb28e6bf6b5b38341e82395efe" + sha256 cellar: :any, sonoma: "d25a7b2be916065e911a12c603f456ab0a4c1989657c0a3771def4bc3b37d4da" + sha256 cellar: :any, ventura: "dcdb052b3a407a79dac689eb75e2717244262dee5dffe5f960cca18f7098bf19" + sha256 cellar: :any, monterey: "0dc52fb15437fabbf7751b6af6d08821abb7ace122be254dff821da411ee31d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d93edbb84f2a3a547296b8a8afa0c33f9d5687ddf0ae8b2699207df9ddb8f65" + end + depends_on "openssl@3" def install