Skip to content

Commit

Permalink
Merge pull request #306 from serokell/rvem/v11.0-rc1-release
Browse files Browse the repository at this point in the history
v11.0-rc1 release
  • Loading branch information
rvem authored Sep 30, 2021
2 parents 7af05b5 + cb31cc6 commit fa0107f
Show file tree
Hide file tree
Showing 38 changed files with 624 additions and 399 deletions.
8 changes: 3 additions & 5 deletions Formula/tezos-accuser-010-PtGRANAD.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v10.2", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v11.0-rc1", :shallow => false

version "v10.2-1"
version "v11.0-rc1-1"

build_dependencies = %w[pkg-config autoconf rsync wget rustup-init]
build_dependencies.each do |dependency|
Expand All @@ -27,8 +27,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser010Ptgranad.version}/"
sha256 cellar: :any, mojave: "4ba3a76ae7db229c432039a84a2ca55fbdf93e37d49419201b81d96964eaf18a"
sha256 cellar: :any, catalina: "35659c58f1df616e046b836fa239a9d4b8ff47db954577606930c295d59146da"
end

def make_deps
Expand All @@ -38,7 +36,7 @@ def make_deps
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-x86_64-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.44.0", "-y"
system "rustup-init", "--default-toolchain", "1.52.1", "-y"
system "opam", "init", "--bare", "--debug", "--auto-setup", "--disable-sandboxing"
system ["source .cargo/env", "make build-deps"].join(" && ")
end
Expand Down
118 changes: 118 additions & 0 deletions Formula/tezos-accuser-011-PtHangzH.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>
#
# SPDX-License-Identifier: LicenseRef-MIT-TQ

class TezosAccuser011Pthangzh < Formula
@all_bins = []

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

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

version "v11.0-rc1-1"

build_dependencies = %w[pkg-config autoconf rsync wget rustup-init]
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/#{TezosAccuser011Pthangzh.version}/"
end

def make_deps
ENV.deparallelize
ENV["CARGO_HOME"]="./.cargo"
# Here is the workaround to use opam 2.0 because Tezos is currently not compatible with opam 2.1.0 and newer
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-x86_64-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.52.1", "-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
end

def install
startup_contents =
<<~EOS
#!/usr/bin/env bash
set -euo pipefail
accuser="#{bin}/tezos-accuser-011-PtHangzH"
accuser_dir="$DATA_DIR"
accuser_config="$accuser_dir/config"
mkdir -p "$accuser_dir"
if [ ! -f "$accuser_config" ]; then
"$accuser" --base-dir "$accuser_dir" \
--endpoint "$NODE_RPC_ENDPOINT" \
config init --output "$accuser_config" >/dev/null 2>&1
else
"$accuser" --base-dir "$accuser_dir" \
--endpoint "$NODE_RPC_ENDPOINT" \
config update >/dev/null 2>&1
fi
exec "$accuser" --base-dir "$accuser_dir" \
--endpoint "$NODE_RPC_ENDPOINT" \
run
EOS
File.write("tezos-accuser-011-PtHangzH-start", startup_contents)
bin.install "tezos-accuser-011-PtHangzH-start"
make_deps
install_template "src/proto_011_PtHangzH/bin_accuser/main_accuser_011_PtHangzH.exe",
"_build/default/src/proto_011_PtHangzH/bin_accuser/main_accuser_011_PtHangzH.exe",
"tezos-accuser-011-PtHangzH"
end

plist_options manual: "tezos-accuser-011-PtHangzH 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-011-PtHangzH-start</string>
<key>EnvironmentVariables</key>
<dict>
<key>DATA_DIR</key>
<string>#{var}/lib/tezos/client</string>
<key>NODE_RPC_ENDPOINT</key>
<string>http://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
8 changes: 3 additions & 5 deletions Formula/tezos-admin-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v10.2", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v11.0-rc1", :shallow => false

version "v10.2-1"
version "v11.0-rc1-1"

build_dependencies = %w[pkg-config autoconf rsync wget rustup-init]
build_dependencies.each do |dependency|
Expand All @@ -27,8 +27,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/"
sha256 cellar: :any, mojave: "13d05a8d96a584d1b97e80289e39ead20a57188fa9814eab4d075f22a0642ba4"
sha256 cellar: :any, catalina: "c431c23f6b92d8690be76b5135ae1d8569017e3a4c4b01f0aa020d51ddbc6e8b"
end

def make_deps
Expand All @@ -38,7 +36,7 @@ def make_deps
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-x86_64-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.44.0", "-y"
system "rustup-init", "--default-toolchain", "1.52.1", "-y"
system "opam", "init", "--bare", "--debug", "--auto-setup", "--disable-sandboxing"
system ["source .cargo/env", "make build-deps"].join(" && ")
end
Expand Down
8 changes: 3 additions & 5 deletions Formula/tezos-baker-010-PtGRANAD.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v10.2", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v11.0-rc1", :shallow => false

version "v10.2-1"
version "v11.0-rc1-1"

build_dependencies = %w[pkg-config autoconf rsync wget rustup-init]
build_dependencies.each do |dependency|
Expand All @@ -27,8 +27,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker010Ptgranad.version}/"
sha256 cellar: :any, mojave: "83402ddc80e97fbc6bfc23721776f3db8419f754da62b57aff544180320fb850"
sha256 cellar: :any, catalina: "f5846339abc701c3a65524c62eb70a41b0c354ffde5e6601cde3693024e50460"
end

def make_deps
Expand All @@ -38,7 +36,7 @@ def make_deps
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-x86_64-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.44.0", "-y"
system "rustup-init", "--default-toolchain", "1.52.1", "-y"
system "opam", "init", "--bare", "--debug", "--auto-setup", "--disable-sandboxing"
system ["source .cargo/env", "make build-deps"].join(" && ")
end
Expand Down
129 changes: 129 additions & 0 deletions Formula/tezos-baker-011-PtHangzH.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>
#
# SPDX-License-Identifier: LicenseRef-MIT-TQ

class TezosBaker011Pthangzh < Formula
@all_bins = []

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

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

version "v11.0-rc1-1"

build_dependencies = %w[pkg-config autoconf rsync wget rustup-init]
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/#{TezosBaker011Pthangzh.version}/"
end

def make_deps
ENV.deparallelize
ENV["CARGO_HOME"]="./.cargo"
# Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-x86_64-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.52.1", "-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
end

def install
startup_contents =
<<~EOS
#!/usr/bin/env bash
set -euo pipefail
baker="#{bin}/tezos-baker-011-PtHangzH"
baker_dir="$DATA_DIR"
baker_config="$baker_dir/config"
mkdir -p "$baker_dir"
if [ ! -f "$baker_config" ]; then
"$baker" --base-dir "$baker_dir" \
--endpoint "$NODE_RPC_ENDPOINT" \
config init --output "$baker_config" >/dev/null 2>&1
else
"$baker" --base-dir "$baker_dir" \
--endpoint "$NODE_RPC_ENDPOINT" \
config update >/dev/null 2>&1
fi
launch_baker() {
exec "$baker" \
--base-dir "$baker_dir" --endpoint "$NODE_RPC_ENDPOINT" \
run with local node "$NODE_DATA_DIR" "$@"
}
if [[ -z "$BAKER_ACCOUNT" ]]; then
launch_baker
else
launch_baker "$BAKER_ACCOUNT"
fi
EOS
File.write("tezos-baker-011-PtHangzH-start", startup_contents)
bin.install "tezos-baker-011-PtHangzH-start"
make_deps
install_template "src/proto_011_PtHangzH/bin_baker/main_baker_011_PtHangzH.exe",
"_build/default/src/proto_011_PtHangzH/bin_baker/main_baker_011_PtHangzH.exe",
"tezos-baker-011-PtHangzH"
end
plist_options manual: "tezos-baker-011-PtHangzH 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-011-PtHangzH-start</string>
<key>EnvironmentVariables</key>
<dict>
<key>DATA_DIR</key>
<string>#{var}/lib/tezos/client</string>
<key>NODE_DATA_DIR</key>
<string></string>
<key>NODE_RPC_ENDPOINT</key>
<string>http://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
8 changes: 3 additions & 5 deletions Formula/tezos-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v10.2", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v11.0-rc1", :shallow => false

version "v10.2-1"
version "v11.0-rc1-1"

build_dependencies = %w[pkg-config autoconf rsync wget rustup-init]
build_dependencies.each do |dependency|
Expand All @@ -27,8 +27,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/"
sha256 cellar: :any, mojave: "654ffbc594b11f563e97119af2aeb304d5a1351625ea2aa3648d1e253ee2d58a"
sha256 cellar: :any, catalina: "340b4a52e21a15b7f52c7785179c4226d6a8bc6957f12ba6f5ffb2455e150706"
end

def make_deps
Expand All @@ -38,7 +36,7 @@ def make_deps
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-x86_64-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.44.0", "-y"
system "rustup-init", "--default-toolchain", "1.52.1", "-y"
system "opam", "init", "--bare", "--debug", "--auto-setup", "--disable-sandboxing"
system ["source .cargo/env", "make build-deps"].join(" && ")
end
Expand Down
8 changes: 3 additions & 5 deletions Formula/tezos-codec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class << self
end
homepage "https://gitlab.com/tezos/tezos"

url "https://gitlab.com/tezos/tezos.git", :tag => "v10.2", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v11.0-rc1", :shallow => false

version "v10.2-1"
version "v11.0-rc1-1"

build_dependencies = %w[pkg-config autoconf rsync wget rustup-init]
build_dependencies.each do |dependency|
Expand All @@ -27,8 +27,6 @@ class << self

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/"
sha256 cellar: :any, mojave: "864e31f9720ceda7d1075e5282eb89aadb57e79903a1c950909be5538d0588a9"
sha256 cellar: :any, catalina: "6234e4ecc9453179b4393840459302214acb10661631f96558c0bb68ff31c9ac"
end

def make_deps
Expand All @@ -38,7 +36,7 @@ def make_deps
system "curl", "-L", "https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-x86_64-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.44.0", "-y"
system "rustup-init", "--default-toolchain", "1.52.1", "-y"
system "opam", "init", "--bare", "--debug", "--auto-setup", "--disable-sandboxing"
system ["source .cargo/env", "make build-deps"].join(" && ")
end
Expand Down
Loading

0 comments on commit fa0107f

Please sign in to comment.