Skip to content

Commit

Permalink
Merge pull request #376 from serokell/auto/v12.0-rc2-release
Browse files Browse the repository at this point in the history
[Chore] v12.0-rc2 release
  • Loading branch information
ixahedron authored Jan 25, 2022
2 parents ae70b28 + 0a3ae3f commit b2279a0
Show file tree
Hide file tree
Showing 35 changed files with 430 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .buildkite/generate-tags-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ymlappend () {
}

# we don't bottle meta-formulas that contain only services
formulae=("tezos-accuser-011-PtHangz2" "tezos-admin-client" "tezos-baker-011-PtHangz2" "tezos-client" "tezos-codec" "tezos-endorser-011-PtHangz2" "tezos-node" "tezos-sandbox" "tezos-signer")
formulae=("tezos-accuser-011-PtHangz2" "tezos-accuser-012-Psithaca" "tezos-admin-client" "tezos-baker-011-PtHangz2" "tezos-baker-012-Psithaca" "tezos-client" "tezos-codec" "tezos-endorser-011-PtHangz2" "tezos-node" "tezos-sandbox" "tezos-signer")

# tezos-sapling-params is used as a dependency for some of the formulas
# so we handle it separately.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-bottles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
os: [ { id: macos-10.15, name: "catalina" }, { id: macos-11, name: "big_sur" } ]
# we don't bottle meta-formulas that contain only services
formula: [tezos-accuser-011-PtHangz2, tezos-admin-client, tezos-baker-011-PtHangz2, tezos-client, tezos-codec, tezos-endorser-011-PtHangz2, tezos-node, tezos-sandbox, tezos-signer]
formula: [tezos-accuser-011-PtHangz2, tezos-accuser-012-Psithaca, tezos-admin-client, tezos-baker-011-PtHangz2, tezos-baker-012-Psithaca, tezos-client, tezos-codec, tezos-endorser-011-PtHangz2, tezos-node, tezos-sandbox, tezos-signer]

steps:
- name: Checkout
Expand Down
7 changes: 2 additions & 5 deletions Formula/tezos-accuser-011-PtHangz2.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 => "v11.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v12.0-rc2", :shallow => false

version "v11.1-1"
version "v12.0-rc2-1"

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

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser011Pthangz2.version}/"
sha256 cellar: :any, big_sur: "cfcd27fd7a3e6b962f000e131715d9910c99ebca05c2d558518855618e34293f"
sha256 cellar: :any, catalina: "a68ddfa181dd4705ab2114da806f6f5f4e397feb4554698fbfc0c5851ea936a9"
sha256 cellar: :any, arm64_big_sur: "d37511f6d8d590ff72e47d9abdad3f2879475344ad7536b9cef4ee03c1bba3c6"
end

def make_deps
Expand Down
119 changes: 119 additions & 0 deletions Formula/tezos-accuser-012-Psithaca.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>
#
# SPDX-License-Identifier: LicenseRef-MIT-TQ

class TezosAccuser012Psithaca < Formula
@all_bins = []

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

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

version "v12.0-rc2-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/#{TezosAccuser012Psithaca.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
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.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-012-Psithaca"
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-012-Psithaca-start", startup_contents)
bin.install "tezos-accuser-012-Psithaca-start"
make_deps
install_template "src/proto_012_Psithaca/bin_accuser/main_accuser_012_Psithaca.exe",
"_build/default/src/proto_012_Psithaca/bin_accuser/main_accuser_012_Psithaca.exe",
"tezos-accuser-012-Psithaca"
end

plist_options manual: "tezos-accuser-012-Psithaca 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-012-Psithaca-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
7 changes: 2 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 => "v11.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v12.0-rc2", :shallow => false

version "v11.1-1"
version "v12.0-rc2-1"

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

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/"
sha256 cellar: :any, big_sur: "44744a15203eed307203c11f0f6ace5bc727d2fde3651ab293764fd15880e05d"
sha256 cellar: :any, catalina: "b74d6e1fc8a86fbec43eaefc8ca62388266ad7f3e6122b3ca4a750c2c0f38fee"
sha256 cellar: :any, arm64_big_sur: "c77c2e4954f82e5f56effb93e0208e6b4b153195c9eae20f6331b100820ed21e"
end

def make_deps
Expand Down
7 changes: 2 additions & 5 deletions Formula/tezos-baker-011-PtHangz2.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 => "v11.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v12.0-rc2", :shallow => false

version "v11.1-1"
version "v12.0-rc2-1"

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

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker011Pthangz2.version}/"
sha256 cellar: :any, big_sur: "1863dd0b1cd3e747c75e4bd56e5c68b790135cdc041fd1132d79d18b54b17778"
sha256 cellar: :any, catalina: "0808a9a0dc52e244d5bce778bad905f4c916c222053742fd1efdc3bfa3ddcbf8"
sha256 cellar: :any, arm64_big_sur: "ab471b94caffc29d54d8359d83b662d485593860d269bd44fa0881d0e3709051"
end

def make_deps
Expand Down
130 changes: 130 additions & 0 deletions Formula/tezos-baker-012-Psithaca.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>
#
# SPDX-License-Identifier: LicenseRef-MIT-TQ

class TezosBaker012Psithaca < Formula
@all_bins = []

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

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

version "v12.0-rc2-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/#{TezosBaker012Psithaca.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
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.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-012-Psithaca"
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-012-Psithaca-start", startup_contents)
bin.install "tezos-baker-012-Psithaca-start"
make_deps
install_template "src/proto_012_Psithaca/bin_baker/main_baker_012_Psithaca.exe",
"_build/default/src/proto_012_Psithaca/bin_baker/main_baker_012_Psithaca.exe",
"tezos-baker-012-Psithaca"
end
plist_options manual: "tezos-baker-012-Psithaca 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-012-Psithaca-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
7 changes: 2 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 => "v11.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v12.0-rc2", :shallow => false

version "v11.1-1"
version "v12.0-rc2-1"

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

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/"
sha256 cellar: :any, big_sur: "26018946c5d7cebcf54f669e098a0539976e623a80b212eaca095345e0d7804f"
sha256 cellar: :any, catalina: "99df0cf0603c2ca0ebdc8b8cf671733efe012f00f3babe012a58fbcb5bc7d45a"
sha256 cellar: :any, arm64_big_sur: "e1075f6624fb8d054964ac5f71fbbf3eac340f36a1b713b29f93cac28f434c1c"
end

def make_deps
Expand Down
7 changes: 2 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 => "v11.1", :shallow => false
url "https://gitlab.com/tezos/tezos.git", :tag => "v12.0-rc2", :shallow => false

version "v11.1-1"
version "v12.0-rc2-1"

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

bottle do
root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/"
sha256 cellar: :any, big_sur: "c9bc5a2d6c79d145a02b55e1a1f357e6dad486385ece81641a44c24770646def"
sha256 cellar: :any, catalina: "5ec242a4ae5218872fca4774850f336d81a7ac25fc2f7bcaf2f81da7c7bfcd9d"
sha256 cellar: :any, arm64_big_sur: "31afc621a2c3caee2f20e6b57645956385de8bd9c5fc2513689be680d489bcb7"
end

def make_deps
Expand Down
Loading

0 comments on commit b2279a0

Please sign in to comment.