-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #626 from serokell/auto/v16.0-release
[Chore] v16.0 release
- Loading branch information
Showing
41 changed files
with
600 additions
and
80 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -8,4 +8,5 @@ binaries/ | |
out/ | ||
|
||
# docker packages' python cache | ||
docker/__pycache__/ | ||
docker/package/__pycache__/ |
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
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,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 |
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
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
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,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 |
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
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
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
Oops, something went wrong.