Skip to content

Commit

Permalink
Merge pull request #626 from serokell/auto/v16.0-release
Browse files Browse the repository at this point in the history
[Chore] v16.0 release
  • Loading branch information
pasqu4le authored Mar 14, 2023
2 parents 8a1d3ba + 9efe591 commit 2589f74
Show file tree
Hide file tree
Showing 41 changed files with 600 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-bottles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
os: [ { id: macos-12, name: "monterey" } ]
# we don't bottle meta-formulas that contain only services
formula: [tezos-accuser-PtLimaPt, tezos-admin-client, tezos-baker-PtLimaPt, tezos-client, tezos-codec, tezos-node, tezos-signer, tezos-tx-rollup-client-PtLimaPt, tezos-tx-rollup-node-PtLimaPt]
formula: [tezos-accuser-PtLimaPt, tezos-accuser-PtMumbai, tezos-admin-client, tezos-baker-PtLimaPt, tezos-baker-PtMumbai, tezos-client, tezos-codec, tezos-node, tezos-signer, tezos-smart-rollup-client-PtMumbai, tezos-smart-rollup-node-PtMumbai, tezos-tx-rollup-client-PtLimaPt, tezos-tx-rollup-node-PtLimaPt]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ binaries/
out/

# docker packages' python cache
docker/__pycache__/
docker/package/__pycache__/
9 changes: 3 additions & 6 deletions Formula/tezos-accuser-PtLimaPt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v15.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v16.0", :shallow => false

version "v15.1-1"
version "v16.0-1"

build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]
build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]
build_dependencies.each do |dependency|
depends_on dependency => :build
end
Expand All @@ -26,9 +26,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuserPtlimapt.version}/"
sha256 cellar: :any, monterey: "54da15db203cf7531b73a0547a3bcbbe0f0aaa6a0b9eeba8da0b0b2d8be6a9b1"
sha256 cellar: :any, big_sur: "e836775511626192c528182037765c25f89833e37b348511ee0971caabdbf8b3"
sha256 cellar: :any, arm64_big_sur: "4522c88273a481e486d98674a2022f245e99e8358b8f61c0276234cd0d44186c"
end

def make_deps
Expand Down
118 changes: 118 additions & 0 deletions Formula/tezos-accuser-PtMumbai.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# SPDX-FileCopyrightText: 2022 Oxhead Alpha
# SPDX-License-Identifier: LicenseRef-MIT-OA

class TezosAccuserPtmumbai < Formula
@all_bins = []

class << self
attr_accessor :all_bins
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v16.0", :shallow => false

version "v16.0-1"

build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]
build_dependencies.each do |dependency|
depends_on dependency => :build
end

dependencies = %w[gmp hidapi libev libffi]
dependencies.each do |dependency|
depends_on dependency
end
desc "Daemon for accusing"

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuserPtmumbai.version}/"
end

def make_deps
ENV.deparallelize
ENV["CARGO_HOME"]="./.cargo"
# Disable usage of instructions from the ADX extension to avoid incompatibility
# with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/
ENV["BLST_PORTABLE"]="yes"
# Here is the workaround to use opam 2.0 because Tezos is currently not compatible with opam 2.1.0 and newer
arch = RUBY_PLATFORM.include?("arm64") ? "arm64" : "x86_64"
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos", "--create-dirs", "-o", "#{ENV["HOME"]}/.opam-bin/opam"
system "chmod", "+x", "#{ENV["HOME"]}/.opam-bin/opam"
ENV["PATH"]="#{ENV["HOME"]}/.opam-bin:#{ENV["PATH"]}"
system "rustup-init", "--default-toolchain", "1.60.0", "-y"
system "opam", "init", "--bare", "--debug", "--auto-setup", "--disable-sandboxing"
system ["source .cargo/env", "make build-deps"].join(" && ")
end

def install_template(dune_path, exec_path, name)
bin.mkpath
self.class.all_bins << name
system ["eval $(opam env)", "dune build #{dune_path}", "cp #{exec_path} #{name}"].join(" && ")
bin.install name
ln_sf "#{bin}/#{name}", "#{bin}/#{name.gsub("octez", "tezos")}"
end

def install
startup_contents =
<<~EOS
#!/usr/bin/env bash
set -euo pipefail
accuser="#{bin}/octez-accuser-PtMumbai"
accuser_config="$TEZOS_CLIENT_DIR/config"
mkdir -p "$TEZOS_CLIENT_DIR"
if [ ! -f "$accuser_config" ]; then
"$accuser" --endpoint "$NODE_RPC_SCHEME://$NODE_RPC_ADDR" \
config init --output "$accuser_config" >/dev/null 2>&1
else
"$accuser" --endpoint "$NODE_RPC_SCHEME://$NODE_RPC_ADDR" \
config update >/dev/null 2>&1
fi
exec "$accuser" --endpoint "$NODE_RPC_SCHEME://$NODE_RPC_ADDR" run
EOS
File.write("tezos-accuser-PtMumbai-start", startup_contents)
bin.install "tezos-accuser-PtMumbai-start"
make_deps
install_template "src/proto_016_PtMumbai/bin_accuser/main_accuser_016_PtMumbai.exe",
"_build/default/src/proto_016_PtMumbai/bin_accuser/main_accuser_016_PtMumbai.exe",
"octez-accuser-PtMumbai"
end

plist_options manual: "tezos-accuser-PtMumbai run"
def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/tezos-accuser-PtMumbai-start</string>
<key>EnvironmentVariables</key>
<dict>
<key>TEZOS_CLIENT_DIR</key>
<string>#{var}/lib/tezos/client</string>
<key>NODE_RPC_SCHEME</key>
<string>http</string>
<key>NODE_RPC_ADDR</key>
<string>localhost:8732</string>
</dict>
<key>RunAtLoad</key><true/>
<key>StandardOutPath</key>
<string>#{var}/log/#{name}.log</string>
<key>StandardErrorPath</key>
<string>#{var}/log/#{name}.log</string>
</dict>
</plist>
EOS
end
def post_install
mkdir "#{var}/lib/tezos/client"
end
end
9 changes: 3 additions & 6 deletions Formula/tezos-admin-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v15.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v16.0", :shallow => false

version "v15.1-1"
version "v16.0-1"

build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]
build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]
build_dependencies.each do |dependency|
depends_on dependency => :build
end
Expand All @@ -26,9 +26,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/"
sha256 cellar: :any, monterey: "467a8140f27ba749762ff2f40e87aa923dc575d33ec5c0e8d41c951306e6045b"
sha256 cellar: :any, big_sur: "43c5137599bcbf5751d57d9c2e199d0f13ef6a370a8d88c2430f4ec76bb99578"
sha256 cellar: :any, arm64_big_sur: "c6abd27ccda936fe381bb748378db240353f010ea4404e17c82dd023eeac6a6a"
end

def make_deps
Expand Down
9 changes: 3 additions & 6 deletions Formula/tezos-baker-PtLimaPt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v15.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v16.0", :shallow => false

version "v15.1-1"
version "v16.0-1"

build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]
build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]
build_dependencies.each do |dependency|
depends_on dependency => :build
end
Expand All @@ -26,9 +26,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosBakerPtlimapt.version}/"
sha256 cellar: :any, monterey: "e3b27a0cc54399616d3bea79fb215df2f95a40e90a5cf804f747ccfe07cb5145"
sha256 cellar: :any, big_sur: "19477e3350999cdddf00406705576da0441f6f4de8f6a778150fcc1aef3a787d"
sha256 cellar: :any, arm64_big_sur: "488f2535633ac2fa5188be2aa88870673224d3aee3670f9a2da5731f6daf4d66"
end

def make_deps
Expand Down
131 changes: 131 additions & 0 deletions Formula/tezos-baker-PtMumbai.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# SPDX-FileCopyrightText: 2022 Oxhead Alpha
# SPDX-License-Identifier: LicenseRef-MIT-OA

class TezosBakerPtmumbai < Formula
@all_bins = []

class << self
attr_accessor :all_bins
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v16.0", :shallow => false

version "v16.0-1"

build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]
build_dependencies.each do |dependency|
depends_on dependency => :build
end

dependencies = %w[gmp hidapi libev libffi tezos-sapling-params]
dependencies.each do |dependency|
depends_on dependency
end
desc "Daemon for baking"

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosBakerPtmumbai.version}/"
end

def make_deps
ENV.deparallelize
ENV["CARGO_HOME"]="./.cargo"
# Disable usage of instructions from the ADX extension to avoid incompatibility
# with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/
ENV["BLST_PORTABLE"]="yes"
# Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer
arch = RUBY_PLATFORM.include?("arm64") ? "arm64" : "x86_64"
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos", "--create-dirs", "-o", "#{ENV["HOME"]}/.opam-bin/opam"
system "chmod", "+x", "#{ENV["HOME"]}/.opam-bin/opam"
ENV["PATH"]="#{ENV["HOME"]}/.opam-bin:#{ENV["PATH"]}"
system "rustup-init", "--default-toolchain", "1.60.0", "-y"
system "opam", "init", "--bare", "--debug", "--auto-setup", "--disable-sandboxing"
system ["source .cargo/env", "make build-deps"].join(" && ")
end

def install_template(dune_path, exec_path, name)
bin.mkpath
self.class.all_bins << name
system ["eval $(opam env)", "dune build #{dune_path}", "cp #{exec_path} #{name}"].join(" && ")
bin.install name
ln_sf "#{bin}/#{name}", "#{bin}/#{name.gsub("octez", "tezos")}"
end

def install
startup_contents =
<<~EOS
#!/usr/bin/env bash
set -euo pipefail
baker="#{bin}/octez-baker-PtMumbai"
baker_config="$TEZOS_CLIENT_DIR/config"
mkdir -p "$TEZOS_CLIENT_DIR"
if [ ! -f "$baker_config" ]; then
"$baker" --endpoint "$NODE_RPC_SCHEME://$NODE_RPC_ADDR" \
config init --output "$baker_config" >/dev/null 2>&1
else
"$baker" --endpoint "$NODE_RPC_SCHEME://$NODE_RPC_ADDR" \
config update >/dev/null 2>&1
fi
launch_baker() {
exec "$baker" \
--endpoint "$NODE_RPC_SCHEME://$NODE_RPC_ADDR" \
run with local node "$TEZOS_NODE_DIR" "$@"
}
if [[ -z "$BAKER_ACCOUNT" ]]; then
launch_baker
else
launch_baker "$BAKER_ACCOUNT"
fi
EOS
File.write("tezos-baker-PtMumbai-start", startup_contents)
bin.install "tezos-baker-PtMumbai-start"
make_deps
install_template "src/proto_016_PtMumbai/bin_baker/main_baker_016_PtMumbai.exe",
"_build/default/src/proto_016_PtMumbai/bin_baker/main_baker_016_PtMumbai.exe",
"octez-baker-PtMumbai"
end
plist_options manual: "tezos-baker-PtMumbai run with local node"
def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/tezos-baker-PtMumbai-start</string>
<key>EnvironmentVariables</key>
<dict>
<key>TEZOS_CLIENT_DIR</key>
<string>#{var}/lib/tezos/client</string>
<key>TEZOS_NODE_DIR</key>
<string></string>
<key>NODE_RPC_SCHEME</key>
<string>http</string>
<key>NODE_RPC_ADDR</key>
<string>localhost:8732</string>
<key>BAKER_ACCOUNT</key>
<string></string>
</dict>
<key>RunAtLoad</key><true/>
<key>StandardOutPath</key>
<string>#{var}/log/#{name}.log</string>
<key>StandardErrorPath</key>
<string>#{var}/log/#{name}.log</string>
</dict>
</plist>
EOS
end
def post_install
mkdir "#{var}/lib/tezos/client"
end
end
9 changes: 3 additions & 6 deletions Formula/tezos-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v15.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v16.0", :shallow => false

version "v15.1-1"
version "v16.0-1"

build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]
build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]
build_dependencies.each do |dependency|
depends_on dependency => :build
end
Expand All @@ -26,9 +26,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/"
sha256 cellar: :any, monterey: "0f5a161080a454271dd3d2de155728759bebe2ca4c20406b3c46231d17288ab2"
sha256 cellar: :any, big_sur: "951867e94c22552040114b5311a90d4edbf7a298edf6fc02528cb0665ac423a4"
sha256 cellar: :any, arm64_big_sur: "e1dc585caab053d0d66e9a8376be787c14875abe28db2d9d5fb66b6f23cdda2b"
end

def make_deps
Expand Down
9 changes: 3 additions & 6 deletions Formula/tezos-codec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v15.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v16.0", :shallow => false

version "v15.1-1"
version "v16.0-1"

build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]
build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]
build_dependencies.each do |dependency|
depends_on dependency => :build
end
Expand All @@ -26,9 +26,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/"
sha256 cellar: :any, monterey: "a011821c3fce64f762e0dafe5ae8c89059a46fb97af5674e8ef2c0cc8de7674b"
sha256 cellar: :any, big_sur: "ca905ca6e565891f4f91bb0079beb76b206fdfa2d21331aa8a8964cb4d9d91bc"
sha256 cellar: :any, arm64_big_sur: "5a180dc705bbde88170d0e4594c8f03ee88fe1b90686b94f1f9ba2d0d78b5ec5"
end

def make_deps
Expand Down
2 changes: 1 addition & 1 deletion Formula/tezos-node-ghostnet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class TezosNodeGhostnet < Formula
url "file:///dev/null"
version "v15.1-1"
version "v16.0-1"

depends_on "tezos-node"

Expand Down
Loading

0 comments on commit 2589f74

Please sign in to comment.