Skip to content

Commit

Permalink
neon-storage 4713
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin committed Jan 30, 2024
1 parent 7b031b8 commit 71d5e87
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions Formula/neon-storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class NeonStorage < Formula
desc "Storage components for Neon"
homepage "https://github.com/neondatabase/neon"
url "https://github.com/neondatabase/neon.git",
tag: "release-4642",
revision: "a1a74eef2c60c283bc038b65b99db2ed0c68f5bb"
tag: "release-4713",
revision: "1ec3e39d4e777d53d78eea8eba7d21f37942b000"
license "Apache-2.0"
head "https://github.com/neondatabase/neon.git", branch: "main"

Expand Down Expand Up @@ -35,9 +35,6 @@ def neon_postgres
end

def install
ENV["BUILD_TAG"] = build.stable? ? "release-#{version}" : "dev-#{Utils.git_short_head}"
ENV["GIT_VERSION"] = Utils.git_head

# A workaround for `FATAL: postmaster became multithreaded during startup` on macOS >= 14.2
# See https://www.postgresql.org/message-id/flat/CYMBV0OT7216.JNRUO6R6GH86%40neon.tech
if OS.mac?
Expand All @@ -48,20 +45,27 @@ def install
EOS
end

with_env(POSTGRES_INSTALL_DIR: neon_postgres.opt_libexec) do
system "cargo", "install", *std_cargo_args(root: libexec, path: "compute_tools")
system "cargo", "install", *std_cargo_args(root: libexec, path: "control_plane")
system "cargo", "install", *std_cargo_args(root: libexec, path: "control_plane/attachment_service")
system "cargo", "install", *std_cargo_args(root: libexec, path: "libs/postgres_ffi/wal_craft")
system "cargo", "install", *std_cargo_args(root: libexec, path: "pageserver")
system "cargo", "install", *std_cargo_args(root: libexec, path: "pageserver/ctl")
system "cargo", "install", *std_cargo_args(root: libexec, path: "pageserver/pagebench")
system "cargo", "install", *std_cargo_args(root: libexec, path: "proxy")
system "cargo", "install", *std_cargo_args(root: libexec, path: "s3_scrubber")
system "cargo", "install", *std_cargo_args(root: libexec, path: "safekeeper")
system "cargo", "install", *std_cargo_args(root: libexec, path: "storage_broker")
system "cargo", "install", *std_cargo_args(root: libexec, path: "trace")
end
ENV["BUILD_TAG"] = build.stable? ? "release-#{version}" : "dev-#{Utils.git_short_head}"
ENV["GIT_VERSION"] = Utils.git_head
ENV["POSTGRES_INSTALL_DIR"] = neon_postgres.opt_libexec
ENV["POSTGRES_DISTRIB_DIR"] = neon_postgres.opt_libexec

ENV["PQ_LIB_DIR"] = neon_postgres.opt_libexec/"v16/lib"
mkdir_p libexec/"control_plane/attachment_service"
cp_r "control_plane/attachment_service/migrations", libexec/"control_plane/attachment_service/"

system "cargo", "install", *std_cargo_args(root: libexec, path: "compute_tools")
system "cargo", "install", *std_cargo_args(root: libexec, path: "control_plane")
system "cargo", "install", *std_cargo_args(root: libexec, path: "control_plane/attachment_service")
system "cargo", "install", *std_cargo_args(root: libexec, path: "libs/postgres_ffi/wal_craft")
system "cargo", "install", *std_cargo_args(root: libexec, path: "pageserver")
system "cargo", "install", *std_cargo_args(root: libexec, path: "pageserver/ctl")
system "cargo", "install", *std_cargo_args(root: libexec, path: "pageserver/pagebench")
system "cargo", "install", *std_cargo_args(root: libexec, path: "proxy")
system "cargo", "install", *std_cargo_args(root: libexec, path: "s3_scrubber")
system "cargo", "install", *std_cargo_args(root: libexec, path: "safekeeper")
system "cargo", "install", *std_cargo_args(root: libexec, path: "storage_broker")
system "cargo", "install", *std_cargo_args(root: libexec, path: "trace")
end

test do
Expand Down

0 comments on commit 71d5e87

Please sign in to comment.