author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
|---|---|---|---|---|---|---|---|---|---|
603,652
|
23.03.2021 14:51:43
| -10,800
|
1e071fa22e116e005f00953088312a73a648a496
|
Fix shebangs in startup scripts
Problem: Startup scripts currently use '#!/usr/bin/bash' shebangs.
However, some of the distros may have different bath to the bash
interpreter, thus startup script may fail on them.
Soluton: Use '#!/usr/bin/env bash' instead, so that the path to the bash
interpreter is fetched from the current environment.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-accuser-start",
"new_path": "docker/package/scripts/tezos-accuser-start",
"diff": "-#!/usr/bin/bash\n+#!/usr/bin/env bash\n# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n#\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-baker-start",
"new_path": "docker/package/scripts/tezos-baker-start",
"diff": "-#!/usr/bin/bash\n+#!/usr/bin/env bash\n# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n#\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-endorser-start",
"new_path": "docker/package/scripts/tezos-endorser-start",
"diff": "-#!/usr/bin/bash\n+#!/usr/bin/env bash\n# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n#\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-node-start",
"new_path": "docker/package/scripts/tezos-node-start",
"diff": "-#!/usr/bin/bash\n+#!/usr/bin/env bash\n# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n#\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-signer-start",
"new_path": "docker/package/scripts/tezos-signer-start",
"diff": "-#!/usr/bin/bash\n+#!/usr/bin/env bash\n# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n#\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#162] Fix shebangs in startup scripts
Problem: Startup scripts currently use '#!/usr/bin/bash' shebangs.
However, some of the distros may have different bath to the bash
interpreter, thus startup script may fail on them.
Soluton: Use '#!/usr/bin/env bash' instead, so that the path to the bash
interpreter is fetched from the current environment.
|
603,650
|
30.03.2021 23:30:04
| -7,200
|
ad2d39738d11d0282a62f21d51e5ce97edf769af
|
Prepare v9.0-rc1 pre-release formulas
Problem: we added a v9.0-rc1 pre-release but did not update the
brew formulas for it.
Solution: update brew formulas to v9.0-rc1 pre-release version.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosAccuser008Ptedo2zk < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosAdminClient < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosBaker008Ptedo2zk < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosClient < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosCodec < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosEndorser008Ptedo2zk < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-edo2net.rb",
"new_path": "Formula/tezos-node-edo2net.rb",
"diff": "class TezosNodeEdo2net < Formula\nurl \"file:///dev/null\"\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbottle :unneeded\ndepends_on \"tezos-node\"\ndesc \"Meta formula that provides backround tezos-node service that runs on edo2net\"\n- @@edo2net_config =\n- <<~EOS\n-{\n-\"p2p\": {},\n-\"network\":\n- { \"genesis\":\n- { \"timestamp\": \"2021-02-11T14:00:00Z\",\n- \"block\": \"BLockGenesisGenesisGenesisGenesisGenesisdae8bZxCCxh\",\n- \"protocol\": \"PtYuensgYBb3G3x1hLLbCmcav8ue8Kyd2khADcL5LsT5R1hcXex\" },\n- \"genesis_parameters\":\n- { \"values\":\n- { \"genesis_pubkey\":\n- \"edpkugeDwmwuwyyD3Q5enapgEYDxZLtEUFFSrvVwXASQMVEqsvTqWu\" } },\n- \"chain_name\": \"TEZOS_EDO2NET_2021-02-11T14:00:00Z\",\n- \"sandboxed_chain_name\": \"SANDBOXED_TEZOS\",\n- \"default_bootstrap_peers\":\n- [ \"edonet.tezos.co.il\", \"188.40.128.216:29732\", \"edo2net.kaml.fr\",\n- \"edonet2.smartpy.io\", \"51.79.165.131\", \"edonetb.boot.tezostaquito.io\" ] }\n-}\n- EOS\ndef install\nstartup_contents =\n<<~EOS\n@@ -45,18 +25,17 @@ class TezosNodeEdo2net < Formula\nmkdir -p \"$DATA_DIR\"\nif [[ ! -f \"$config_file\" ]]; then\necho \"Configuring the node...\"\n- cat > \"$config_file\" <<-EOM\n- #{@@edo2net_config}\n- EOM\n- \"$node\" config update \\\n+ \"$node\" config init \\\n--data-dir \"$DATA_DIR\" \\\n--rpc-addr \"$NODE_RPC_ADDR\" \\\n+ --network=edo2net \\\n\"$@\"\nelse\necho \"Updating the node configuration...\"\n\"$node\" config update \\\n--data-dir \"$DATA_DIR\" \\\n--rpc-addr \"$NODE_RPC_ADDR\" \\\n+ --network=edo2net \\\n\"$@\"\nfi\n@@ -70,6 +49,7 @@ class TezosNodeEdo2net < Formula\nEOS\nFile.write(\"tezos-node-edo2net-start\", startup_contents)\nbin.install \"tezos-node-edo2net-start\"\n+ print \"Installing tezos-node-edo2net service\"\nend\ndef plist\n<<~EOS\n@@ -103,7 +83,7 @@ class TezosNodeEdo2net < Formula\nEOS\nend\ndef post_install\n- mkdir \"#{var}/lib/tezos/node-edo2net\"\n- File.write(\"#{var}/lib/tezos/node-edo2net/config.json\", @@edo2net_config)\n+ mkdir_p \"#{var}/lib/tezos/node-edo2net\"\n+ system \"tezos-node\", \"config\", \"init\", \"--data-dir\" \"#{var}/lib/tezos/node-edo2net\", \"--network\", \"edo2net\"\nend\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-mainnet.rb",
"new_path": "Formula/tezos-node-mainnet.rb",
"diff": "class TezosNodeMainnet < Formula\nurl \"file:///dev/null\"\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbottle :unneeded\ndepends_on \"tezos-node\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosNode < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosSandbox < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sapling-params.rb",
"new_path": "Formula/tezos-sapling-params.rb",
"diff": "#\n# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+# TODO: once there is a new release of opam-repository this should be updated\nclass TezosSaplingParams < Formula\nurl \"https://gitlab.com/tezos/opam-repository.git\", :tag => \"v8.2\"\nhomepage \"https://github.com/serokell/tezos-packaging\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-http.rb",
"new_path": "Formula/tezos-signer-http.rb",
"diff": "class TezosSignerHttp < Formula\nurl \"file:///dev/null\"\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-https.rb",
"new_path": "Formula/tezos-signer-https.rb",
"diff": "class TezosSignerHttps < Formula\nurl \"file:///dev/null\"\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-tcp.rb",
"new_path": "Formula/tezos-signer-tcp.rb",
"diff": "class TezosSignerTcp < Formula\nurl \"file:///dev/null\"\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-unix.rb",
"new_path": "Formula/tezos-signer-unix.rb",
"diff": "class TezosSignerUnix < Formula\nurl \"file:///dev/null\"\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosSigner < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.2\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n- version \"v8.2-3\"\n+ version \"v9.0-rc1-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Prepare v9.0-rc1 pre-release formulas
Problem: we added a v9.0-rc1 pre-release but did not update the
brew formulas for it.
Solution: update brew formulas to v9.0-rc1 pre-release version.
|
603,650
|
30.03.2021 23:36:34
| -7,200
|
4c624793b96f9b0c42f3cf3fb8ab87b6da4d3d59
|
Remove brew bottles hashes
Problem: the updated brew formulas for the v9.0-rc1 pre-release still
contain the bottles hashes from the previous release.
Solution: Remove v8.2-3 bottles hashes.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"diff": "@@ -28,8 +28,6 @@ class TezosAccuser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser008Ptedo2zk.version}/\"\ncellar :any\n- sha256 \"4efaedef768f5114ae6e142aeba62c883e1703bcaf725a9c53cceee0f55c4427\" => :mojave\n- sha256 \"12378615cf0f6291e89f58e8c6aa04aef56d52d823dcab18bb72d954fb7e4b73\" => :catalina\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -28,8 +28,6 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\ncellar :any\n- sha256 \"dc851c99e9056ca0cad7867057a2fc87dce25936a1017e2cabc31009f69414b9\" => :mojave\n- sha256 \"d90e59edf2345bb905c5c2f1969a69435eb7d61c0805e56f18874dd88826ef50\" => :catalina\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"diff": "@@ -28,8 +28,6 @@ class TezosBaker008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker008Ptedo2zk.version}/\"\ncellar :any\n- sha256 \"774db0d3db3ac06dc6eb7216b0be9cbde36adf37c6706894b44b232d067bbb5e\" => :mojave\n- sha256 \"d02f82402146a961b3a055aa8e59d4e87d44d086bd6d3ad6bebb47b98a3d0e76\" => :catalina\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -28,8 +28,6 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\ncellar :any\n- sha256 \"bce5ba2314112ad023b9a6caceba8f0ee74311ff235358c5a8f7bfa605fdf0cf\" => :mojave\n- sha256 \"e16b7fb7c7b872ac9f81abd42afb4707f69dd878f4bc4fbe83e9fff3faccb671\" => :catalina\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -28,8 +28,6 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\ncellar :any\n- sha256 \"b89b972018f6a59086163b426029734ab43a9319459962bb5b37ab8459ab0a5e\" => :mojave\n- sha256 \"f186cd6d8eb3c1c028223880aec51293665c806ef1269a97e8fd0710daec842a\" => :catalina\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"diff": "@@ -29,8 +29,6 @@ class TezosEndorser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser008Ptedo2zk.version}/\"\ncellar :any\n- sha256 \"0f5fa558641e1e08fda154be2b9d076dfa373fc0120f41b0c14ccb30dd2183f8\" => :mojave\n- sha256 \"513ef0ab298831919c763beca1d37500af094cba442a4f8397704d2dc9d10df5\" => :catalina\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -28,8 +28,6 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\ncellar :any\n- sha256 \"8325cec25211095a9196723a5801fadc3f593eefd67ffae69508a095fc263985\" => :mojave\n- sha256 \"9f9876e33268117a300147dabb7d2aab2602b46db4e0968f89b22c7a5c71db38\" => :catalina\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -28,8 +28,6 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\ncellar :any\n- sha256 \"8325cec25211095a9196723a5801fadc3f593eefd67ffae69508a095fc263985\" => :mojave\n- sha256 \"54048e33fdafa63be4cd5f1a351d1a22b8dc00e96c0bcd90a3c8ef588d69f6d7\" => :catalina\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sapling-params.rb",
"new_path": "Formula/tezos-sapling-params.rb",
"diff": "@@ -14,8 +14,6 @@ class TezosSaplingParams < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSaplingParams.version}/\"\ncellar :any\n- sha256 \"4e89932b0626cffe80214ba45342280c340b34c58ebbf7c3e0185a6d4662732d\" => :mojave\n- sha256 \"5f7a5687d67051eafcfb7cb5ac542143a325a135403daeca6595602bfd400441\" => :catalina\nend\ndef install\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -28,8 +28,6 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\ncellar :any\n- sha256 \"fb36d48f47fb20d9cb4a93663c74e0eefe54e2f01f83e1c17b23ed187c733fc4\" => :mojave\n- sha256 \"6fc1ee3ecd0b214280e0011b5e375ed4292d9ffbdca8dcf47e8b9091d71800ea\" => :catalina\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Remove brew bottles hashes
Problem: the updated brew formulas for the v9.0-rc1 pre-release still
contain the bottles hashes from the previous release.
Solution: Remove v8.2-3 bottles hashes.
|
603,650
|
31.03.2021 00:17:36
| -7,200
|
9e8787abb18c305af26cc97daf15f71b269cbea4
|
Add formulas for florencenet services
Problem: v9.0-rc1 supports a new protocol, but we don't have the
brew formulas for services to use it.
Solution: add brew formulas for services to use florencenet.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+class TezosAccuser009Psfloren < Formula\n+ @all_bins = []\n+\n+ class << self\n+ attr_accessor :all_bins\n+ end\n+ homepage \"https://gitlab.com/tezos/tezos\"\n+\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+\n+ version \"v9.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n+ build_dependencies.each do |dependency|\n+ depends_on dependency => :build\n+ end\n+\n+ dependencies = %w[gmp hidapi libev libffi]\n+ dependencies.each do |dependency|\n+ depends_on dependency\n+ end\n+ desc \"Daemon for accusing\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ cellar :any\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n+ system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n+ system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n+ end\n+\n+ def install_template(dune_path, exec_path, name)\n+ bin.mkpath\n+ self.class.all_bins << name\n+ system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n+ bin.install name\n+ end\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ accuser=\"#{bin}/tezos-accuser-009-PsFLoren\"\n+\n+ accuser_dir=\"$DATA_DIR\"\n+\n+ accuser_config=\"$accuser_dir/config\"\n+ mkdir -p \"$accuser_dir\"\n+\n+ if [ ! -f \"$accuser_config\" ]; then\n+ \"$accuser\" --base-dir \"$accuser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config init --output \"$accuser_config\" >/dev/null 2>&1\n+ else\n+ \"$accuser\" --base-dir \"$accuser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+\n+ exec \"$accuser\" --base-dir \"$accuser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run\n+ EOS\n+ File.write(\"tezos-accuser-009-PsFLoren-start\", startup_contents)\n+ bin.install \"tezos-accuser-009-PsFLoren-start\"\n+ make_deps\n+ install_template \"src/proto_009_PsFLoren/bin_accuser/main_accuser_009_PsFLoren.exe\",\n+ \"_build/default/src/proto_009_PsFLoren/bin_accuser/main_accuser_009_PsFLoren.exe\",\n+ \"tezos-accuser-009-PsFLoren\"\n+ end\n+\n+ plist_options manual: \"tezos-accuser-009-PsFLoren run\"\n+ def plist\n+ <<~EOS\n+ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n+ \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+ <plist version=\"1.0\">\n+ <dict>\n+ <key>Label</key>\n+ <string>#{plist_name}</string>\n+ <key>Program</key>\n+ <string>#{opt_bin}/tezos-accuser-009-PsFLoren-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>NODE_RPC_ENDPOINT</key>\n+ <string>http://localhost:8732</string>\n+ </dict>\n+ <key>RunAtLoad</key><true/>\n+ <key>StandardOutPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ <key>StandardErrorPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ </dict>\n+ </plist>\n+ EOS\n+ end\n+ def post_install\n+ mkdir \"#{var}/lib/tezos/client\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+class TezosBaker009Psfloren < Formula\n+ @all_bins = []\n+\n+ class << self\n+ attr_accessor :all_bins\n+ end\n+ homepage \"https://gitlab.com/tezos/tezos\"\n+\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+\n+ version \"v9.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n+ build_dependencies.each do |dependency|\n+ depends_on dependency => :build\n+ end\n+\n+ dependencies = %w[gmp hidapi libev libffi tezos-sapling-params]\n+ dependencies.each do |dependency|\n+ depends_on dependency\n+ end\n+ desc \"Daemon for baking\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ cellar :any\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n+ system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n+ system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n+ end\n+\n+ def install_template(dune_path, exec_path, name)\n+ bin.mkpath\n+ self.class.all_bins << name\n+ system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n+ bin.install name\n+ end\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ baker=\"#{bin}/tezos-baker-009-PsFLoren\"\n+\n+ baker_dir=\"$DATA_DIR\"\n+\n+ baker_config=\"$baker_dir/config\"\n+ mkdir -p \"$baker_dir\"\n+\n+ if [ ! -f \"$baker_config\" ]; then\n+ \"$baker\" --base-dir \"$baker_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config init --output \"$baker_config\" >/dev/null 2>&1\n+ else\n+ \"$baker\" --base-dir \"$baker_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+\n+ launch_baker() {\n+ exec \"$baker\" \\\n+ --base-dir \"$baker_dir\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run with local node \"$NODE_DATA_DIR\" \"$@\"\n+ }\n+\n+ if [[ -z \"$BAKER_ACCOUNT\" ]]; then\n+ launch_baker\n+ else\n+ launch_baker \"$BAKER_ACCOUNT\"\n+ fi\n+ EOS\n+ File.write(\"tezos-baker-009-PsFLoren-start\", startup_contents)\n+ bin.install \"tezos-baker-009-PsFLoren-start\"\n+ make_deps\n+ install_template \"src/proto_009_PsFLoren/bin_baker/main_baker_009_PsFLoren.exe\",\n+ \"_build/default/src/proto_009_PsFLoren/bin_baker/main_baker_009_PsFLoren.exe\",\n+ \"tezos-baker-009-PsFLoren\"\n+ end\n+ plist_options manual: \"tezos-baker-009-PsFLoren run with local node\"\n+ def plist\n+ <<~EOS\n+ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n+ \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+ <plist version=\"1.0\">\n+ <dict>\n+ <key>Label</key>\n+ <string>#{plist_name}</string>\n+ <key>Program</key>\n+ <string>#{opt_bin}/tezos-baker-009-PsFLoren-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>NODE_DATA_DIR</key>\n+ <string></string>\n+ <key>NODE_RPC_ENDPOINT</key>\n+ <string>http://localhost:8732</string>\n+ <key>BAKER_ACCOUNT</key>\n+ <string></string>\n+ </dict>\n+ <key>RunAtLoad</key><true/>\n+ <key>StandardOutPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ <key>StandardErrorPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ </dict>\n+ </plist>\n+ EOS\n+ end\n+ def post_install\n+ mkdir \"#{var}/lib/tezos/client\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+class TezosEndorser009Psfloren < Formula\n+ @all_bins = []\n+\n+ class << self\n+ attr_accessor :all_bins\n+ end\n+ homepage \"https://gitlab.com/tezos/tezos\"\n+\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+\n+ version \"v9.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n+ build_dependencies.each do |dependency|\n+ depends_on dependency => :build\n+ end\n+\n+ dependencies = %w[gmp hidapi libev libffi]\n+ dependencies.each do |dependency|\n+ depends_on dependency\n+ end\n+\n+ desc \"Daemon for endorsing\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ cellar :any\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n+ system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n+ system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n+ end\n+\n+ def install_template(dune_path, exec_path, name)\n+ bin.mkpath\n+ self.class.all_bins << name\n+ system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n+ bin.install name\n+ end\n+\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ endorser=\"#{bin}/tezos-endorser-009-PsFLoren\"\n+\n+ endorser_dir=\"$DATA_DIR\"\n+\n+ endorser_config=\"$endorser_dir/config\"\n+ mkdir -p \"$endorser_dir\"\n+\n+ if [ ! -f \"$endorser_config\" ]; then\n+ \"$endorser\" --base-dir \"$endorser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config init --output \"$endorser_config\" >/dev/null 2>&1\n+ else\n+ \"$endorser\" --base-dir \"$endorser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+\n+ launch_endorser() {\n+ exec \"$endorser\" --base-dir \"$endorser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run \"$@\"\n+ }\n+\n+ if [[ -z \"$ENDORSER_ACCOUNT\" ]]; then\n+ launch_endorser\n+ else\n+ launch_endorser \"$ENDORSER_ACCOUNT\"\n+ fi\n+ EOS\n+ File.write(\"tezos-endorser-009-PsFLoren-start\", startup_contents)\n+ bin.install \"tezos-endorser-009-PsFLoren-start\"\n+ make_deps\n+ install_template \"src/proto_009_PsFLoren/bin_endorser/main_endorser_009_PsFLoren.exe\",\n+ \"_build/default/src/proto_009_PsFLoren/bin_endorser/main_endorser_009_PsFLoren.exe\",\n+ \"tezos-endorser-009-PsFLoren\"\n+ end\n+\n+ plist_options manual: \"tezos-endorser-009-PsFLoren run\"\n+ def plist\n+ <<~EOS\n+ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n+ \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+ <plist version=\"1.0\">\n+ <dict>\n+ <key>Label</key>\n+ <string>#{plist_name}</string>\n+ <key>Program</key>\n+ <string>#{opt_bin}/tezos-endorser-009-PsFLoren-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>NODE_RPC_ENDPOINT</key>\n+ <string>http://localhost:8732</string>\n+ <key>ENDORSER_ACCOUNT</key>\n+ <string></string>\n+ </dict>\n+ <key>RunAtLoad</key><true/>\n+ <key>StandardOutPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ <key>StandardErrorPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ </dict>\n+ </plist>\n+ EOS\n+ end\n+ def post_install\n+ mkdir \"#{var}/lib/tezos/client\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-node-florencenet.rb",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+class TezosNodeFlorencenet < Formula\n+ url \"file:///dev/null\"\n+ version \"v9.0-rc1-1\"\n+\n+ bottle :unneeded\n+ depends_on \"tezos-node\"\n+\n+ desc \"Meta formula that provides backround tezos-node service that runs on florencenet\"\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ node=\"/usr/local/bin/tezos-node\"\n+ # default location of the config file\n+ config_file=\"$DATA_DIR/config.json\"\n+\n+ mkdir -p \"$DATA_DIR\"\n+ if [[ ! -f \"$config_file\" ]]; then\n+ echo \"Configuring the node...\"\n+ \"$node\" config init \\\n+ --data-dir \"$DATA_DIR\" \\\n+ --rpc-addr \"$NODE_RPC_ADDR\" \\\n+ --network=florencenet \\\n+ \"$@\"\n+ else\n+ echo \"Updating the node configuration...\"\n+ \"$node\" config update \\\n+ --data-dir \"$DATA_DIR\" \\\n+ --rpc-addr \"$NODE_RPC_ADDR\" \\\n+ --network=florencenet \\\n+ \"$@\"\n+ fi\n+\n+ # Launching the node\n+ if [[ -z \"$CERT_PATH\" || -z \"$KEY_PATH\" ]]; then\n+ exec \"$node\" run --data-dir \"$DATA_DIR\" --config-file=\"$config_file\"\n+ else\n+ exec \"$node\" run --data-dir \"$DATA_DIR\" --config-file=\"$config_file\" \\\n+ --rpc-tls=\"$CERT_PATH\",\"$KEY_PATH\"\n+ fi\n+ EOS\n+ File.write(\"tezos-node-florencenet-start\", startup_contents)\n+ bin.install \"tezos-node-florencenet-start\"\n+ print \"Installing tezos-node-florencenet service\"\n+ end\n+ def plist\n+ <<~EOS\n+ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n+ \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+ <plist version=\"1.0\">\n+ <dict>\n+ <key>Label</key>\n+ <string>#{plist_name}</string>\n+ <key>Program</key>\n+ <string>#{opt_bin}/tezos-node-florencenet-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/node-florencenet</string>\n+ <key>NODE_RPC_ADDR</key>\n+ <string>127.0.0.1:8732</string>\n+ <key>CERT_PATH</key>\n+ <string></string>\n+ <key>KEY_PATH</key>\n+ <string></string>\n+ </dict>\n+ <key>RunAtLoad</key><true/>\n+ <key>StandardOutPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ <key>StandardErrorPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ </dict>\n+ </plist>\n+ EOS\n+ end\n+ def post_install\n+ mkdir_p \"#{var}/lib/tezos/node-florencenet\"\n+ system \"tezos-node\", \"config\", \"init\", \"--data-dir\" \"#{var}/lib/tezos/node-florencenet\", \"--network\", \"florencenet\"\n+ end\n+end\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/build-bottles.sh",
"new_path": "scripts/build-bottles.sh",
"diff": "@@ -16,11 +16,14 @@ brew bottle --force-core-tap ./Formula/tezos-sapling-params.rb\n# we don't bottle meta-formulas that contains only services\nbuild_bottle ./Formula/tezos-accuser-008-PtEdo2Zk.rb\n+build_bottle ./Formula/tezos-accuser-009-PsFLoren.rb\nbuild_bottle ./Formula/tezos-admin-client.rb\nbuild_bottle ./Formula/tezos-baker-008-PtEdo2Zk.rb\n+build_bottle ./Formula/tezos-baker-009-PsFLoren.rb\nbuild_bottle ./Formula/tezos-client.rb\nbuild_bottle ./Formula/tezos-codec.rb\nbuild_bottle ./Formula/tezos-endorser-008-PtEdo2Zk.rb\n+build_bottle ./Formula/tezos-endorser-009-PsFLoren.rb\nbuild_bottle ./Formula/tezos-node.rb\nbuild_bottle ./Formula/tezos-sandbox.rb\nbuild_bottle ./Formula/tezos-signer.rb\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Add formulas for florencenet services
Problem: v9.0-rc1 supports a new protocol, but we don't have the
brew formulas for services to use it.
Solution: add brew formulas for services to use florencenet.
|
603,650
|
01.04.2021 13:15:51
| -7,200
|
ac0712813e577eefe961294308264ff359e30533
|
Skip rebuild check in formulae bottling
Problem: Newer brew versions fail when checking for a rebuild version
of non-core taps when building bottles.
Solution: skip the check with '--no-rebuild'.
Additionally, add the '--formula' option to brew 'install' to avoid
the cask warning message.
|
[
{
"change_type": "MODIFY",
"old_path": "scripts/build-bottles.sh",
"new_path": "scripts/build-bottles.sh",
"diff": "#\n# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+# Newer brew versions fail when checking for a rebuild version of non-core taps.\n+# So for now we skip the check with '--no-rebuild'\nbuild_bottle () {\n- brew install --build-bottle \"$1\"\n- brew bottle --force-core-tap \"$1\"\n+ brew install --formula --build-bottle \"$1\"\n+ brew bottle --force-core-tap --no-rebuild \"$1\"\nbrew uninstall \"$1\"\n}\n# tezos-sapling-params is used as a dependency for some of the formulas\n# so we handle it separately\n-brew install --build-bottle ./Formula/tezos-sapling-params.rb\n-brew bottle --force-core-tap ./Formula/tezos-sapling-params.rb\n+brew install --formula --build-bottle ./Formula/tezos-sapling-params.rb\n+brew bottle --force-core-tap --no-rebuild ./Formula/tezos-sapling-params.rb\n# we don't bottle meta-formulas that contains only services\nbuild_bottle ./Formula/tezos-accuser-008-PtEdo2Zk.rb\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Skip rebuild check in formulae bottling
Problem: Newer brew versions fail when checking for a rebuild version
of non-core taps when building bottles.
Solution: skip the check with '--no-rebuild'.
Additionally, add the '--formula' option to brew 'install' to avoid
the cask warning message.
|
603,650
|
02.04.2021 22:38:42
| -7,200
|
53b2e77667d3d2a0cfda7dadba9be62edefce024
|
Update formulae bottle hashes
Problem: Brew formulae have now been updated to the latest pre-release
We should provide an easy way to obtain updated packages without
building them from scratch.
Solution: Provide hashes for the new bottles.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser008Ptedo2zk.version}/\"\n+ sha256 \"0d4c9f3cad4a8f2380ab49cb32c92b9159f4573da86c19cd4541ed9c585401e4\" => :mojave\n+ sha256 \"2b126354cefcef1742906f2e62895ca1ef051febab8d6901256da3e7c745e13b\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ sha256 \"c5032a8a82e9b751219e182d9db6c48370b6fcb63b5af83a081033208024f16a\" => :mojave\n+ sha256 \"7661c435a07898a7dcefedb2c8427903fb79cf810a9fed987d9f257901173356\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 \"dfdbff748687e5dc76fa97b5af334498ef4189c32b33ca652e1cd8be843be057\" => :mojave\n+ sha256 \"c2cf408311226f88a79ad2aecd3fa12ff26051ca916f06fa46c128a5aa22f16e\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker008Ptedo2zk.version}/\"\n+ sha256 \"4adfe12e7463f9172bd7d608ed82fc71f4bfa50c32b33796d213f5ec8bf90da3\" => :mojave\n+ sha256 \"95f75861ae641bd5790724f9e22591fa6f2428ca600a3385ab25a9367bbd249b\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ sha256 \"7dbfd791a9d85aaa06eefa2511b3a73bb0a50c8cb7935a062d53db5bb182dcf5\" => :mojave\n+ sha256 \"6b67a4808de5a33b10e568b4f95aa4b00b643175710695471a32c0487117af10\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 \"6a82a5c9bb14724cf088dbae0aeef7eb41ca6a6ac27fb97dfd82fdc47f6c105e\" => :mojave\n+ sha256 \"376424406212e03e335a40ce3023f93dfc7b0b681eea20cbfff6f17fe498d34b\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 \"4bd4610ed9c92643869212d165ea31eb73909bd0d75aadc79531e6dca0058766\" => :mojave\n+ sha256 \"0501539b35fb809b0ab1e40803fb0b0b7581437bbd1aacf7bffa81d16d9351a8\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser008Ptedo2zk.version}/\"\n+ sha256 \"7ae758d10d32bc6d6927d61d542319e4cf4ea6ff9830cc5df8775f68af734075\" => :mojave\n+ sha256 \"c348900c80ad6c6058d34867bb66145b9381e3ec300b76f68452b1513b206a57\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ sha256 \"3b285494c195727804eaf3d310e93fdaa232f00a34087e7dbf5e1e3ccc244a75\" => :mojave\n+ sha256 \"99d3ecf7668e29bf11e3fcf527ab8efa6e166ac148ea711afefa04c7d2158f37\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 \"e39f02b1cf16b5e1859e563d6949504284198d3f9a42c7b6f3e2e808f2ee8b0f\" => :mojave\n+ sha256 \"97ea6972a5a2abf55a44776e7ea0a5e1727f6df37ee8c22d51f55207cf51a239\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n+ sha256 \"9e9df080bf327ff247cf637ef24de62dee0b19cfdbf8bfbd6a6bf216ed4c1171\" => :mojave\n+ sha256 \"012ae6d0fc289f390538199e3e7cdbcd048363ddae3e8828bcd4388af0cf6749\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sapling-params.rb",
"new_path": "Formula/tezos-sapling-params.rb",
"diff": "@@ -13,6 +13,8 @@ class TezosSaplingParams < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSaplingParams.version}/\"\n+ sha256 \"93d730b5569ea10d66ce85423acc975355ac23fe698fda0445f3799fb20a1e01\" => :mojave\n+ sha256 \"2921c9a5bec843fbd3806660ae4911d43ff2fac7adc2ccaee674e7bfc27d3771\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 \"6899a00c8cd29af55e583594588149127684b8c27aca8c16942b37c4a504c566\" => :mojave\n+ sha256 \"9d28767c28154ab2d05c56be32d69adaf1bef4e03a3bdf3267e93db9fe1ff735\" => :catalina\ncellar :any\nend\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Update formulae bottle hashes
Problem: Brew formulae have now been updated to the latest pre-release
We should provide an easy way to obtain updated packages without
building them from scratch.
Solution: Provide hashes for the new bottles.
|
603,650
|
12.04.2021 13:11:30
| -7,200
|
6555e0f0125805763d782c7cc596727c65557d43
|
revert bottles sha256 of tezos-sapling-params' formula
Problem: sha256 for tezos-sapling-params were updated, but the version
of the formula didn't, causing a brew failure in installing the
existing bottle (from the previous release).
Solution: revert the hashes in the formula for tezos-sapling-param
to match the bottles in the right release.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sapling-params.rb",
"new_path": "Formula/tezos-sapling-params.rb",
"diff": "@@ -13,8 +13,8 @@ class TezosSaplingParams < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSaplingParams.version}/\"\n- sha256 \"93d730b5569ea10d66ce85423acc975355ac23fe698fda0445f3799fb20a1e01\" => :mojave\n- sha256 \"2921c9a5bec843fbd3806660ae4911d43ff2fac7adc2ccaee674e7bfc27d3771\" => :catalina\n+ sha256 \"4e89932b0626cffe80214ba45342280c340b34c58ebbf7c3e0185a6d4662732d\" => :mojave\n+ sha256 \"5f7a5687d67051eafcfb7cb5ac542143a325a135403daeca6595602bfd400441\" => :catalina\ncellar :any\nend\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#166] revert bottles sha256 of tezos-sapling-params' formula
Problem: sha256 for tezos-sapling-params were updated, but the version
of the formula didn't, causing a brew failure in installing the
existing bottle (from the previous release).
Solution: revert the hashes in the formula for tezos-sapling-param
to match the bottles in the right release.
|
603,652
|
13.04.2021 12:45:50
| -10,800
|
5097af99e6efba409b3d1dc6fc4a27d53fe407db
|
Bump tezos to v8.3
Problem: New stable Tezos version arrived, we should make a release for
it.
Solution: Bump Tezos version in the dependencies.
|
[
{
"change_type": "MODIFY",
"old_path": "nix/nix/sources.json",
"new_path": "nix/nix/sources.json",
"diff": "\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"tezos\": {\n- \"ref\": \"refs/tags/v9.0-rc1\",\n+ \"ref\": \"refs/tags/v8.3\",\n\"repo\": \"https://gitlab.com/tezos/tezos\",\n- \"rev\": \"69e08d4b7ac903d2e96fdbf0c4ae4099c28b5f75\",\n+ \"rev\": \"cbbfffdb15f3f9dac3abf667f4511f1f4622492f\",\n\"type\": \"git\"\n}\n}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Bump tezos to v8.3
Problem: New stable Tezos version arrived, we should make a release for
it.
Solution: Bump Tezos version in the dependencies.
|
603,652
|
13.04.2021 12:47:42
| -10,800
|
d4cc2a5921e712b007809d0703969d98effbc4b3
|
Suspend 009 protocol support
Problem: v8.3 doesn't support new 009 protocol.
Solution: Comment out code that provides 009 support.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/build/static_libs.patch",
"new_path": "docker/build/static_libs.patch",
"diff": "@@ -186,48 +186,3 @@ index 81ebe6075..43e57a2d0 100644\n(rule\n(alias runtest_lint)\n-diff --git a/src/proto_009_PsFLoren/bin_accuser/dune b/src/proto_009_PsFLoren/bin_accuser/dune\n-index 11c77973e3..43515f16ed 100644\n---- a/src/proto_009_PsFLoren/bin_accuser/dune\n-+++ b/src/proto_009_PsFLoren/bin_accuser/dune\n-@@ -10,7 +10,9 @@\n- -open Tezos_client_commands\n- -open Tezos_baking_009_PsFLoren_commands\n- -open Tezos_stdlib_unix\n-- -open Tezos_client_base_unix)))\n-+ -open Tezos_client_base_unix\n-+ -ccopt -static\n-+ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n-\n- (rule\n- (alias runtest_lint)\n-diff --git a/src/proto_009_PsFLoren/bin_baker/dune b/src/proto_009_PsFLoren/bin_baker/dune\n-index 0535edf13c..f0c85ad447 100644\n---- a/src/proto_009_PsFLoren/bin_baker/dune\n-+++ b/src/proto_009_PsFLoren/bin_baker/dune\n-@@ -10,7 +10,9 @@\n- -open Tezos_client_commands\n- -open Tezos_baking_009_PsFLoren_commands\n- -open Tezos_stdlib_unix\n-- -open Tezos_client_base_unix)))\n-+ -open Tezos_client_base_unix\n-+ -ccopt -static\n-+ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n-\n- (rule\n- (alias runtest_lint)\n-diff --git a/src/proto_009_PsFLoren/bin_endorser/dune b/src/proto_009_PsFLoren/bin_endorser/dune\n-index c19a310a8f..6c38226293 100644\n---- a/src/proto_009_PsFLoren/bin_endorser/dune\n-+++ b/src/proto_009_PsFLoren/bin_endorser/dune\n-@@ -10,7 +10,9 @@\n- -open Tezos_client_commands\n- -open Tezos_baking_009_PsFLoren_commands\n- -open Tezos_stdlib_unix\n-- -open Tezos_client_base_unix)))\n-+ -open Tezos_client_base_unix\n-+ -ccopt -static\n-+ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n-\n- (rule\n- (alias runtest_lint)\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/hacks.nix",
"new_path": "nix/build/hacks.nix",
"diff": "@@ -177,11 +177,11 @@ rec {\nbuildInputs = o.buildInputs ++ [ librustzcash ];\nXDG_DATA_DIRS = \"${zcash-params}:$XDG_DATA_DIRS\";\n});\n- tezos-protocol-009-PsFLoren-parameters = osuper.tezos-protocol-009-PsFLoren-parameters.overrideAttrs\n- (o: rec {\n- buildInputs = o.buildInputs ++ [ librustzcash ];\n- XDG_DATA_DIRS = \"${zcash-params}:$XDG_DATA_DIRS\";\n- });\n+ # tezos-protocol-009-PsFLoren-parameters = osuper.tezos-protocol-009-PsFLoren-parameters.overrideAttrs\n+ # (o: rec {\n+ # buildInputs = o.buildInputs ++ [ librustzcash ];\n+ # XDG_DATA_DIRS = \"${zcash-params}:$XDG_DATA_DIRS\";\n+ # });\n# FIXME apply this patch upstream\ntezos-stdlib-unix = osuper.tezos-stdlib-unix.overrideAttrs\n@@ -209,21 +209,21 @@ rec {\nbuildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\npostFixup = zcash-post-fixup o;\n});\n- tezos-accuser-009-PsFLoren = osuper.tezos-accuser-009-PsFLoren.overrideAttrs\n- (o: {\n- buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- postFixup = zcash-post-fixup o;\n- });\n- tezos-baker-009-PsFLoren = osuper.tezos-baker-009-PsFLoren.overrideAttrs\n- (o: {\n- buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- postFixup = zcash-post-fixup o;\n- });\n- tezos-endorser-009-PsFLoren = osuper.tezos-endorser-009-PsFLoren.overrideAttrs\n- (o: {\n- buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- postFixup = zcash-post-fixup o;\n- });\n+ # tezos-accuser-009-PsFLoren = osuper.tezos-accuser-009-PsFLoren.overrideAttrs\n+ # (o: {\n+ # buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ # postFixup = zcash-post-fixup o;\n+ # });\n+ # tezos-baker-009-PsFLoren = osuper.tezos-baker-009-PsFLoren.overrideAttrs\n+ # (o: {\n+ # buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ # postFixup = zcash-post-fixup o;\n+ # });\n+ # tezos-endorser-009-PsFLoren = osuper.tezos-endorser-009-PsFLoren.overrideAttrs\n+ # (o: {\n+ # buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ # postFixup = zcash-post-fixup o;\n+ # });\ntezos-codec = osuper.tezos-codec.overrideAttrs\n(o: {\nbuildInputs = o.buildInputs ++ [ rustc-bls12-381 librustzcash self.makeWrapper ];\n"
},
{
"change_type": "MODIFY",
"old_path": "protocols.json",
"new_path": "protocols.json",
"diff": "\"008-PtEdoTez\"\n],\n\"active\": [\n- \"008-PtEdo2Zk\",\n- \"009-PsFLoren\"\n+ \"008-PtEdo2Zk\"\n]\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/test_script.py",
"new_path": "tests/test_script.py",
"diff": "@@ -83,14 +83,11 @@ def test_node_with_daemons_scenario(network, use_tls=False):\nkill_node_with_daemons()\n-with subtest(\"run node with daemons on florencenet\"):\n- test_node_with_daemons_scenario(\"florencenet\")\n-\nwith subtest(\"run node with daemons on mainnet\"):\ntest_node_with_daemons_scenario(\"mainnet\")\nwith subtest(\"run node with daemons using tls\"):\n- test_node_with_daemons_scenario(\"florencenet\", use_tls=True)\n+ test_node_with_daemons_scenario(\"mainnet\", use_tls=True)\nwith subtest(\"test remote signer\"):\nmachine.succeed(f\"{tezos_signer} -d signer-dir gen keys signer\")\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Suspend 009 protocol support
Problem: v8.3 doesn't support new 009 protocol.
Solution: Comment out code that provides 009 support.
|
603,652
|
13.04.2021 12:49:52
| -10,800
|
f971cca999917fe855fd29381dcabfbb89e3fa4c
|
Update brew formulas
Problem: We should provide brew formulas for the new Tezos version.
Solution: Update versions in the brew formulas, remove outdated hashes.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosAccuser008Ptedo2zk < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosAccuser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser008Ptedo2zk.version}/\"\n- sha256 \"0d4c9f3cad4a8f2380ab49cb32c92b9159f4573da86c19cd4541ed9c585401e4\" => :mojave\n- sha256 \"2b126354cefcef1742906f2e62895ca1ef051febab8d6901256da3e7c745e13b\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosAdminClient < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n- sha256 \"dfdbff748687e5dc76fa97b5af334498ef4189c32b33ca652e1cd8be843be057\" => :mojave\n- sha256 \"c2cf408311226f88a79ad2aecd3fa12ff26051ca916f06fa46c128a5aa22f16e\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosBaker008Ptedo2zk < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosBaker008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker008Ptedo2zk.version}/\"\n- sha256 \"4adfe12e7463f9172bd7d608ed82fc71f4bfa50c32b33796d213f5ec8bf90da3\" => :mojave\n- sha256 \"95f75861ae641bd5790724f9e22591fa6f2428ca600a3385ab25a9367bbd249b\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosClient < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n- sha256 \"6a82a5c9bb14724cf088dbae0aeef7eb41ca6a6ac27fb97dfd82fdc47f6c105e\" => :mojave\n- sha256 \"376424406212e03e335a40ce3023f93dfc7b0b681eea20cbfff6f17fe498d34b\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosCodec < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n- sha256 \"4bd4610ed9c92643869212d165ea31eb73909bd0d75aadc79531e6dca0058766\" => :mojave\n- sha256 \"0501539b35fb809b0ab1e40803fb0b0b7581437bbd1aacf7bffa81d16d9351a8\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosEndorser008Ptedo2zk < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -28,8 +28,6 @@ class TezosEndorser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser008Ptedo2zk.version}/\"\n- sha256 \"7ae758d10d32bc6d6927d61d542319e4cf4ea6ff9830cc5df8775f68af734075\" => :mojave\n- sha256 \"c348900c80ad6c6058d34867bb66145b9381e3ec300b76f68452b1513b206a57\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-edo2net.rb",
"new_path": "Formula/tezos-node-edo2net.rb",
"diff": "class TezosNodeEdo2net < Formula\nurl \"file:///dev/null\"\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbottle :unneeded\ndepends_on \"tezos-node\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-mainnet.rb",
"new_path": "Formula/tezos-node-mainnet.rb",
"diff": "class TezosNodeMainnet < Formula\nurl \"file:///dev/null\"\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbottle :unneeded\ndepends_on \"tezos-node\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosNode < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n- sha256 \"e39f02b1cf16b5e1859e563d6949504284198d3f9a42c7b6f3e2e808f2ee8b0f\" => :mojave\n- sha256 \"97ea6972a5a2abf55a44776e7ea0a5e1727f6df37ee8c22d51f55207cf51a239\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosSandbox < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n- sha256 \"9e9df080bf327ff247cf637ef24de62dee0b19cfdbf8bfbd6a6bf216ed4c1171\" => :mojave\n- sha256 \"012ae6d0fc289f390538199e3e7cdbcd048363ddae3e8828bcd4388af0cf6749\" => :catalina\ncellar :any\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-http.rb",
"new_path": "Formula/tezos-signer-http.rb",
"diff": "class TezosSignerHttp < Formula\nurl \"file:///dev/null\"\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-https.rb",
"new_path": "Formula/tezos-signer-https.rb",
"diff": "class TezosSignerHttps < Formula\nurl \"file:///dev/null\"\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-tcp.rb",
"new_path": "Formula/tezos-signer-tcp.rb",
"diff": "class TezosSignerTcp < Formula\nurl \"file:///dev/null\"\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-unix.rb",
"new_path": "Formula/tezos-signer-unix.rb",
"diff": "class TezosSignerUnix < Formula\nurl \"file:///dev/null\"\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosSigner < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.0-rc1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v8.3\", :shallow => false\n- version \"v9.0-rc1-1\"\n+ version \"v8.3-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n- sha256 \"6899a00c8cd29af55e583594588149127684b8c27aca8c16942b37c4a504c566\" => :mojave\n- sha256 \"9d28767c28154ab2d05c56be32d69adaf1bef4e03a3bdf3267e93db9fe1ff735\" => :catalina\ncellar :any\nend\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Update brew formulas
Problem: We should provide brew formulas for the new Tezos version.
Solution: Update versions in the brew formulas, remove outdated hashes.
|
603,652
|
13.04.2021 19:03:20
| -10,800
|
171023e59df5e6d99beae9d97aafbbcaf72eca66
|
Add v8.3-1 bottles hashes
Problem: Bottles for mojave and catalina were built and uploaded to the
v8.3-1 github release. This bottles now should be used in the formulas.
Solution: Update bottles hashes in the formulas.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"diff": "@@ -27,7 +27,8 @@ class TezosAccuser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser008Ptedo2zk.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"ba583a1be59cc9534e1ac8b0ea8ce1b2efe2b6b594e0309b400b66df8d281a45\"\n+ sha256 cellar: :any, catalina: \"9dde0ba35f95603ae646d505dfe4963741c7b7fe2cd5bca5bd3bd07fb05a3153\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,7 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"e4fad99a9c56947bc79262c90ab5898e1b0fa44907f94e9d99c688270c6e64ea\"\n+ sha256 cellar: :any, catalina: \"58fefe9df07b8be276cfcfd7b30ee3594a043701b9dd81700e9a4fcec4ac089f\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"diff": "@@ -27,7 +27,8 @@ class TezosBaker008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker008Ptedo2zk.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"bec3c4b1f6a3bfd1d1773d9b97d5e27c736b4581afe61a204538f4afccd17992\"\n+ sha256 cellar: :any, catalina: \"f6dabfd606c41694b011bbff010bb579775d9ea466ec957429e1a4beb57a3cc0\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,7 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"3671c5de0b1b4a03368f142fb959b5e11f399509fb0f6f96efaa993646ae4a2d\"\n+ sha256 cellar: :any, catalina: \"66309596374d91be40433af2999d27d17b70a1338a5dc9b1b5fe53082f07d8ef\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,7 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"edf793105a6be06820d9ae6edb4dd9f39f950566f36a3e35494c610a2b7de20b\"\n+ sha256 cellar: :any, catalina: \"dcc140efb40c89eb5dd0cb86acd863a61db30f70a735a4e58ddcaf5699ce5b4c\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"diff": "@@ -28,7 +28,8 @@ class TezosEndorser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser008Ptedo2zk.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"8546395f93b2604903dc3bcd810f8d2d142a529e16a75d1390bdab5294d21d60\"\n+ sha256 cellar: :any, catalina: \"e811604abb479b5cede599fb8e1d1cceaf38e68f6676d0140bddddd266ce3f0b\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,7 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"a43b5208113f0905f967074dcea1e211194649e702f534fbe719d86724832b28\"\n+ sha256 cellar: :any, catalina: \"52331f9122e04f58da6658b43ac9ea28b97831060f2f4e16b55874ba6ce0d387\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,7 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"ad55f82f28e78ea71d26e5586ea058e38492e306b140e4c7b479d75db4a4be26\"\n+ sha256 cellar: :any, catalina: \"2825f8cdf9d0ed0a9d50c112e044162205bf14ae5381201c8f6c2c6b26b7f524\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,7 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n- cellar :any\n+ sha256 cellar: :any, mojave: \"dea1f1f2213f1a2b2ecd82296d5a98cc764a6980c48c1e92d0daa8ae4264111b\"\n+ sha256 cellar: :any, catalina: \"6596cc0baeb6893225a5e8e78f3c030ed54c48deb1732cae1d9f9cb21e00185a\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Add v8.3-1 bottles hashes
Problem: Bottles for mojave and catalina were built and uploaded to the
v8.3-1 github release. This bottles now should be used in the formulas.
Solution: Update bottles hashes in the formulas.
|
603,652
|
14.04.2021 14:14:28
| -10,800
|
2a121dfbc8b3fb4ed8e9806501d09dc613b5f36c
|
Enable native packaging in CI
Problem: Tezos v8.3 was added to the opam-repository, which means that
we can now update our native packages.
Solution: Enable package building in CI.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline.yml",
"new_path": ".buildkite/pipeline.yml",
"diff": "@@ -69,50 +69,50 @@ steps:\n- nix-build tests/tezos-binaries.nix --no-out-link --arg path-to-binaries ./docker\nbranches: \"!master\"\n-# - label: test deb source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 30\n-# agents:\n-# queue: \"docker\"\n-# - label: test deb binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n-# - label: test rpm source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os fedora --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 30\n-# agents:\n-# queue: \"docker\"\n-# - label: test rpm binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n+ - label: test deb source packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n+ artifact_paths:\n+ - ./out/*\n+ branches: \"!master\"\n+ timeout_in_minutes: 30\n+ agents:\n+ queue: \"docker\"\n+ - label: test deb binary packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ # Building all binary packages will take significant amount of time, so we build only one\n+ # in order to ensure package generation sanity\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n+ - rm -rf out\n+ # It takes much time to build binary package, so we do it only on master\n+ branches: \"master\"\n+ timeout_in_minutes: 90\n+ agents:\n+ queue: \"docker\"\n+ - label: test rpm source packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ - ./docker/docker-tezos-packages.sh --os fedora --type source\n+ artifact_paths:\n+ - ./out/*\n+ branches: \"!master\"\n+ timeout_in_minutes: 30\n+ agents:\n+ queue: \"docker\"\n+ - label: test rpm binary packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ # Building all binary packages will take significant amount of time, so we build only one\n+ # in order to ensure package generation sanity\n+ - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n+ - rm -rf out\n+ # It takes much time to build binary package, so we do it only on master\n+ branches: \"master\"\n+ timeout_in_minutes: 90\n+ agents:\n+ queue: \"docker\"\n- wait\n- label: create auto pre-release\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Enable native packaging in CI
Problem: Tezos v8.3 was added to the opam-repository, which means that
we can now update our native packages.
Solution: Enable package building in CI.
|
603,652
|
15.04.2021 17:06:13
| -10,800
|
d1e46e55bdae3281ecd1d42df4b211ea8e998cd3
|
Bump Tezos
Problem: New release candidate for v9.0 arrived.
Solution: Bump used Tezos version.
|
[
{
"change_type": "MODIFY",
"old_path": "nix/nix/sources.json",
"new_path": "nix/nix/sources.json",
"diff": "\"homepage\": \"https://opam.ocaml.org\",\n\"owner\": \"ocaml\",\n\"repo\": \"opam-repository\",\n- \"rev\": \"e565d865022b13bf63826b0a39f9276043c3ca6b\",\n- \"sha256\": \"1xfy4q47hq7lirk6pyir2gbwc3fqd1gywy9qdl0sbx962lyjl7sw\",\n+ \"rev\": \"237e8e9eb5af7fdae743add41725e195b637c4b7\",\n+ \"sha256\": \"0yx9n3sj90v6pl5qbg63kb3gwc0fg104r11jlrc5hx7yi9wjng06\",\n\"type\": \"tarball\",\n- \"url\": \"https://github.com/ocaml/opam-repository/archive/e565d865022b13bf63826b0a39f9276043c3ca6b.tar.gz\",\n+ \"url\": \"https://github.com/ocaml/opam-repository/archive/237e8e9eb5af7fdae743add41725e195b637c4b7.tar.gz\",\n\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"tezos\": {\n- \"ref\": \"refs/tags/v8.3\",\n+ \"ref\": \"refs/tags/v9.0-rc2\",\n\"repo\": \"https://gitlab.com/tezos/tezos\",\n- \"rev\": \"cbbfffdb15f3f9dac3abf667f4511f1f4622492f\",\n+ \"rev\": \"238328a8040618d2499910155d4ae08c2f217581\",\n\"type\": \"git\"\n}\n}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Bump Tezos
Problem: New release candidate for v9.0 arrived.
Solution: Bump used Tezos version.
|
603,652
|
15.04.2021 17:10:49
| -10,800
|
93e3004c9f95cb8a322f0c8ce6c2c423f7d2418b
|
Activate 009 protocol back
Problem: v9.0-rc2 provides 009 protocol support.
Solution: Enable its support back.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/build/static_libs.patch",
"new_path": "docker/build/static_libs.patch",
"diff": "@@ -186,3 +186,48 @@ index 81ebe6075..43e57a2d0 100644\n(rule\n(alias runtest_lint)\n+diff --git a/src/proto_009_PsFLoren/bin_accuser/dune b/src/proto_009_PsFLoren/bin_accuser/dune\n+index 11c77973e3..43515f16ed 100644\n+--- a/src/proto_009_PsFLoren/bin_accuser/dune\n++++ b/src/proto_009_PsFLoren/bin_accuser/dune\n+@@ -10,7 +10,9 @@\n+ -open Tezos_client_commands\n+ -open Tezos_baking_009_PsFLoren_commands\n+ -open Tezos_stdlib_unix\n+- -open Tezos_client_base_unix)))\n++ -open Tezos_client_base_unix\n++ -ccopt -static\n++ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n+\n+ (rule\n+ (alias runtest_lint)\n+diff --git a/src/proto_009_PsFLoren/bin_baker/dune b/src/proto_009_PsFLoren/bin_baker/dune\n+index 0535edf13c..f0c85ad447 100644\n+--- a/src/proto_009_PsFLoren/bin_baker/dune\n++++ b/src/proto_009_PsFLoren/bin_baker/dune\n+@@ -10,7 +10,9 @@\n+ -open Tezos_client_commands\n+ -open Tezos_baking_009_PsFLoren_commands\n+ -open Tezos_stdlib_unix\n+- -open Tezos_client_base_unix)))\n++ -open Tezos_client_base_unix\n++ -ccopt -static\n++ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n+\n+ (rule\n+ (alias runtest_lint)\n+diff --git a/src/proto_009_PsFLoren/bin_endorser/dune b/src/proto_009_PsFLoren/bin_endorser/dune\n+index c19a310a8f..6c38226293 100644\n+--- a/src/proto_009_PsFLoren/bin_endorser/dune\n++++ b/src/proto_009_PsFLoren/bin_endorser/dune\n+@@ -10,7 +10,9 @@\n+ -open Tezos_client_commands\n+ -open Tezos_baking_009_PsFLoren_commands\n+ -open Tezos_stdlib_unix\n+- -open Tezos_client_base_unix)))\n++ -open Tezos_client_base_unix\n++ -ccopt -static\n++ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n+\n+ (rule\n+ (alias runtest_lint)\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/hacks.nix",
"new_path": "nix/build/hacks.nix",
"diff": "@@ -185,11 +185,11 @@ rec {\nbuildInputs = o.buildInputs ++ [ librustzcash ];\nXDG_DATA_DIRS = \"${zcash-params}:$XDG_DATA_DIRS\";\n});\n- # tezos-protocol-009-PsFLoren-parameters = osuper.tezos-protocol-009-PsFLoren-parameters.overrideAttrs\n- # (o: rec {\n- # buildInputs = o.buildInputs ++ [ librustzcash ];\n- # XDG_DATA_DIRS = \"${zcash-params}:$XDG_DATA_DIRS\";\n- # });\n+ tezos-protocol-009-PsFLoren-parameters = osuper.tezos-protocol-009-PsFLoren-parameters.overrideAttrs\n+ (o: rec {\n+ buildInputs = o.buildInputs ++ [ librustzcash ];\n+ XDG_DATA_DIRS = \"${zcash-params}:$XDG_DATA_DIRS\";\n+ });\n# FIXME apply this patch upstream\ntezos-stdlib-unix = osuper.tezos-stdlib-unix.overrideAttrs\n@@ -217,21 +217,21 @@ rec {\nbuildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\npostFixup = zcash-post-fixup o;\n});\n- # tezos-accuser-009-PsFLoren = osuper.tezos-accuser-009-PsFLoren.overrideAttrs\n- # (o: {\n- # buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- # postFixup = zcash-post-fixup o;\n- # });\n- # tezos-baker-009-PsFLoren = osuper.tezos-baker-009-PsFLoren.overrideAttrs\n- # (o: {\n- # buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- # postFixup = zcash-post-fixup o;\n- # });\n- # tezos-endorser-009-PsFLoren = osuper.tezos-endorser-009-PsFLoren.overrideAttrs\n- # (o: {\n- # buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- # postFixup = zcash-post-fixup o;\n- # });\n+ tezos-accuser-009-PsFLoren = osuper.tezos-accuser-009-PsFLoren.overrideAttrs\n+ (o: {\n+ buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ postFixup = zcash-post-fixup o;\n+ });\n+ tezos-baker-009-PsFLoren = osuper.tezos-baker-009-PsFLoren.overrideAttrs\n+ (o: {\n+ buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ postFixup = zcash-post-fixup o;\n+ });\n+ tezos-endorser-009-PsFLoren = osuper.tezos-endorser-009-PsFLoren.overrideAttrs\n+ (o: {\n+ buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ postFixup = zcash-post-fixup o;\n+ });\ntezos-codec = osuper.tezos-codec.overrideAttrs\n(o: {\nbuildInputs = o.buildInputs ++ [ rustc-bls12-381 librustzcash self.makeWrapper ];\n"
},
{
"change_type": "MODIFY",
"old_path": "protocols.json",
"new_path": "protocols.json",
"diff": "\"008-PtEdoTez\"\n],\n\"active\": [\n- \"008-PtEdo2Zk\"\n+ \"008-PtEdo2Zk\",\n+ \"009-PsFLoren\"\n]\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/test_script.py",
"new_path": "tests/test_script.py",
"diff": "@@ -83,6 +83,9 @@ def test_node_with_daemons_scenario(network, use_tls=False):\nkill_node_with_daemons()\n+with subtest(\"run node with daemons on florencenet\"):\n+ test_node_with_daemons_scenario(\"florencenet\")\n+\nwith subtest(\"run node with daemons on mainnet\"):\ntest_node_with_daemons_scenario(\"mainnet\")\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Activate 009 protocol back
Problem: v9.0-rc2 provides 009 protocol support.
Solution: Enable its support back.
|
603,650
|
16.04.2021 12:05:22
| -7,200
|
81a2fc0df77c0bb7c0d606353e6f10fd6c7dd6f0
|
Update brew formula bottle hashes to v9.0-rc2
Problem: brew formulas have been updated to v9.0-rc2 and new bottles
are available, but their hashes are not in the formulas yet.
Solution: update brew bottle hashes for updated formulas.
Additionally, fix tezos-sapling-param hashes format.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"5278a432cb9d12e37cbc1b1cbdbbed78d582e1ff4c2901312a3071a1a792c5fa\"\n+ sha256 cellar: :any, catalina: \"37d720a60bbd923c37360793f329c6ebcb02536567e832b509219841014953aa\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"ddf10aecdd8a820b0a87254e978b320587def59ac93a93fda72e92909f38e65c\"\n+ sha256 cellar: :any, catalina: \"4a71fcfaf1709c73f13f3a3657fc757d76167eb7e377f6f6c58527b9559be53d\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, mojave: \"a86341df0c84235238dac551d0b3e768e1dfdf18f46c72ba433cb1d78eee2c18\"\n+ sha256 cellar: :any, catalina: \"d9f0ab6dd8e000548a01f86f1edf72f81cf86c5ddd8fcebb282ccafd7a80c1db\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"4471c796900d27807e97bf5bdbb80349d44d3cbbd4574c235b682366f45e67e4\"\n+ sha256 cellar: :any, catalina: \"d9074dad618714a95095f1dca98efc4295eac42b96d15031a4500263e217ccc3\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"2222bc29bd426715eeec04b68f5eca125cae2e116a9ebb181372482465bb6362\"\n+ sha256 cellar: :any, catalina: \"657ff2340e7573578744adfb24b658bd09fcc0f11bb47090c04ab479d75ba363\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, mojave: \"092ae9f5f2b6109c14d3dd5cb90df0499267354b75a31a366ec5b6d7396ed2ae\"\n+ sha256 cellar: :any, catalina: \"9baba36c00cf74ec64605e367e7a085404dce80d254b4f4efebdb5e9328321fd\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, mojave: \"ae57e033f4cb0b7f7c17e01197ae61d93e26bc2b9ea17c4852a02beb3b9e7443\"\n+ sha256 cellar: :any, catalina: \"d39cb003fd5a80ba9788407cb1dbb5e36e87c540382f7f83e04541df2203bdef\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"70e6b3688086cf5fe7d43f6e4f4ae0786cf96efc1bf9e16085666a4eb9b93f80\"\n+ sha256 cellar: :any, catalina: \"b177e223bedfde6de1912a94c6f6faf18a1b2d89f271898c29aa409299424e4f\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"fb10bcd7e93b44b7c747e1f248dd6c631515f1e8a1594017559f957392bc209e\"\n+ sha256 cellar: :any, catalina: \"6de80666f752103e0c0ecb4da2a8401b185bd49d7ab503766b1b64f8e8ee561a\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, mojave: \"034aea2791e93eae9abec14299678e0a17e60de0eda8c25591db9445bb2f7a34\"\n+ sha256 cellar: :any, catalina: \"0e23202f5ad9905f0518ed0bba3f398009219b9ae610d830a9691881736ec49c\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n+ sha256 cellar: :any, mojave: \"3a67f3155a4e461bc8b61cf912d5aae677b604f7813534776721fd9e50d49434\"\n+ sha256 cellar: :any, catalina: \"0ca1e1aa3e2d9801f1a143002f49693bbceabf692475678d2af8620675c91e91\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sapling-params.rb",
"new_path": "Formula/tezos-sapling-params.rb",
"diff": "@@ -13,9 +13,8 @@ class TezosSaplingParams < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSaplingParams.version}/\"\n- sha256 \"4e89932b0626cffe80214ba45342280c340b34c58ebbf7c3e0185a6d4662732d\" => :mojave\n- sha256 \"5f7a5687d67051eafcfb7cb5ac542143a325a135403daeca6595602bfd400441\" => :catalina\n- cellar :any\n+ sha256 cellar: :any, mojave: \"4e89932b0626cffe80214ba45342280c340b34c58ebbf7c3e0185a6d4662732d\"\n+ sha256 cellar: :any, catalina: \"5f7a5687d67051eafcfb7cb5ac542143a325a135403daeca6595602bfd400441\"\nend\ndef install\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, mojave: \"7d5dbd80381d667b193005e62e7cc3e78409022e2d8f7f46947bfdd202427c5b\"\n+ sha256 cellar: :any, catalina: \"8870bf51e378aa2e91f82bdf541c517993b09f29407e8141c9103be6005a71a0\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Update brew formula bottle hashes to v9.0-rc2
Problem: brew formulas have been updated to v9.0-rc2 and new bottles
are available, but their hashes are not in the formulas yet.
Solution: update brew bottle hashes for updated formulas.
Additionally, fix tezos-sapling-param hashes format.
|
603,650
|
16.04.2021 12:13:29
| -7,200
|
33839ee39758cfc241e7a953eb0c04563a92f9a9
|
Fix typo in node formula description
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-edo2net.rb",
"new_path": "Formula/tezos-node-edo2net.rb",
"diff": "@@ -9,7 +9,7 @@ class TezosNodeEdo2net < Formula\nbottle :unneeded\ndepends_on \"tezos-node\"\n- desc \"Meta formula that provides backround tezos-node service that runs on edo2net\"\n+ desc \"Meta formula that provides background tezos-node service that runs on edo2net\"\ndef install\nstartup_contents =\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-florencenet.rb",
"new_path": "Formula/tezos-node-florencenet.rb",
"diff": "@@ -9,7 +9,7 @@ class TezosNodeFlorencenet < Formula\nbottle :unneeded\ndepends_on \"tezos-node\"\n- desc \"Meta formula that provides backround tezos-node service that runs on florencenet\"\n+ desc \"Meta formula that provides background tezos-node service that runs on florencenet\"\ndef install\nstartup_contents =\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-mainnet.rb",
"new_path": "Formula/tezos-node-mainnet.rb",
"diff": "@@ -9,7 +9,7 @@ class TezosNodeMainnet < Formula\nbottle :unneeded\ndepends_on \"tezos-node\"\n- desc \"Meta formula that provides backround tezos-node service that runs on mainnet\"\n+ desc \"Meta formula that provides background tezos-node service that runs on mainnet\"\ndef install\nstartup_contents =\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Fix typo in node formula description
|
603,652
|
22.04.2021 10:38:22
| -10,800
|
39b616e5b0dfd113b08dddbde0152ed31a16f226
|
Bump Tezos to v9.0
Problem: New Tezos version was released.
Solution: Bump used Tezos version.
|
[
{
"change_type": "MODIFY",
"old_path": "nix/nix/sources.json",
"new_path": "nix/nix/sources.json",
"diff": "\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"tezos\": {\n- \"ref\": \"refs/tags/v9.0-rc2\",\n+ \"ref\": \"refs/tags/v9.0\",\n\"repo\": \"https://gitlab.com/tezos/tezos\",\n- \"rev\": \"238328a8040618d2499910155d4ae08c2f217581\",\n+ \"rev\": \"f4f033c6a5fff4bd644a2a2a38f7a607a5d6a055\",\n\"type\": \"git\"\n}\n}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Bump Tezos to v9.0
Problem: New Tezos version was released.
Solution: Bump used Tezos version.
|
603,652
|
22.04.2021 12:11:08
| -10,800
|
a1dd5edda20492e37d9c3465635e738b46b7e3aa
|
Enable native packaging
New Tezos versions was published to the opam-repository, so we can
provide native packages for it.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline.yml",
"new_path": ".buildkite/pipeline.yml",
"diff": "@@ -69,50 +69,50 @@ steps:\n- nix-build tests/tezos-binaries.nix --no-out-link --arg path-to-binaries ./docker\nbranches: \"!master\"\n-# - label: test deb source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 30\n-# agents:\n-# queue: \"docker\"\n-# - label: test deb binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n-# - label: test rpm source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os fedora --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 30\n-# agents:\n-# queue: \"docker\"\n-# - label: test rpm binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n+ - label: test deb source packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n+ artifact_paths:\n+ - ./out/*\n+ branches: \"!master\"\n+ timeout_in_minutes: 60\n+ agents:\n+ queue: \"docker\"\n+ - label: test deb binary packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ # Building all binary packages will take significant amount of time, so we build only one\n+ # in order to ensure package generation sanity\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n+ - rm -rf out\n+ # It takes much time to build binary package, so we do it only on master\n+ branches: \"master\"\n+ timeout_in_minutes: 90\n+ agents:\n+ queue: \"docker\"\n+ - label: test rpm source packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ - ./docker/docker-tezos-packages.sh --os fedora --type source\n+ artifact_paths:\n+ - ./out/*\n+ branches: \"!master\"\n+ timeout_in_minutes: 60\n+ agents:\n+ queue: \"docker\"\n+ - label: test rpm binary packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ # Building all binary packages will take significant amount of time, so we build only one\n+ # in order to ensure package generation sanity\n+ - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n+ - rm -rf out\n+ # It takes much time to build binary package, so we do it only on master\n+ branches: \"master\"\n+ timeout_in_minutes: 90\n+ agents:\n+ queue: \"docker\"\n- wait\n- label: create auto pre-release\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -96,7 +96,7 @@ class OpamBasedPackage(AbstractPackage):\ndef fetch_sources(self, out_dir):\nopam_package = \"tezos-client\" if self.name == \"tezos-admin-client\" else self.name\nsubprocess.run([\"opam\", \"exec\", \"--\", \"opam-bundle\", f\"{opam_package}={version}\"] + self.optional_opam_deps +\n- [\"--ocaml=4.09.1\", \"--yes\", \"--opam=2.0.5\"], check=True)\n+ [\"--ocaml=4.10.2\", \"--yes\", \"--opam=2.0.8\"], check=True)\nsubprocess.run([\"tar\", \"-zxf\", f\"{opam_package}-bundle.tar.gz\"], check=True)\nos.rename(f\"{opam_package}-bundle\", out_dir)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Enable native packaging
New Tezos versions was published to the opam-repository, so we can
provide native packages for it.
|
603,652
|
22.04.2021 12:13:04
| -10,800
|
697ef947f8ef03c7d8872a0d47260bb2d52e5a79
|
Remove edo2net workarounds
Problem: v9.0 tezos-node supports edo2net out of the box.
Our workarounds for its support are no longer needed.
Solution: Remove workarounds for edo2net and use it as a usual
predefined node network. As an addition, also support florencenet.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -5,7 +5,7 @@ import os, shutil, sys, subprocess, json\nfrom .model import Service, ServiceFile, SystemdUnit, Unit, OpamBasedPackage, TezosSaplingParamsPackage\n-networks = [\"mainnet\"]\n+networks = [\"mainnet\", \"edo2net\", \"florencenet\"]\nsigner_units = [\nSystemdUnit(\n@@ -84,28 +84,6 @@ def mk_node_unit(suffix, env, desc):\n))\nreturn SystemdUnit(suffix=suffix, service_file=service_file, startup_script=\"tezos-node-start\")\n-\n-# v8.2 tezos-node doesn't have predefined config for edo2net, so we're providing\n-# this config to the service manually\n-edo2net_config = '''{\n-\"p2p\": {},\n-\"network\":\n- { \"genesis\":\n- { \"timestamp\": \"2021-02-11T14:00:00Z\",\n- \"block\": \"BLockGenesisGenesisGenesisGenesisGenesisdae8bZxCCxh\",\n- \"protocol\": \"PtYuensgYBb3G3x1hLLbCmcav8ue8Kyd2khADcL5LsT5R1hcXex\" },\n- \"genesis_parameters\":\n- { \"values\":\n- { \"genesis_pubkey\":\n- \"edpkugeDwmwuwyyD3Q5enapgEYDxZLtEUFFSrvVwXASQMVEqsvTqWu\" } },\n- \"chain_name\": \"TEZOS_EDO2NET_2021-02-11T14:00:00Z\",\n- \"sandboxed_chain_name\": \"SANDBOXED_TEZOS\",\n- \"default_bootstrap_peers\":\n- [ \"edonet.tezos.co.il\", \"188.40.128.216:29732\", \"edo2net.kaml.fr\",\n- \"edonet2.smartpy.io\", \"51.79.165.131\", \"edonetb.boot.tezostaquito.io\" ] }\n-}\n-'''\n-\nnode_units = []\nnode_postinst_steps = postinst_steps_common\nnode_postrm_steps = \"\"\n@@ -132,25 +110,6 @@ node_units.append(mk_node_unit(suffix=\"custom\", env=[\"DATA_DIR=/var/lib/tezos/no\ndesc=\"Tezos node with custom config\"))\nnode_postinst_steps += \"mkdir -p /var/lib/tezos/node-custom\\n\"\n-# Add edo2net service\n-node_units.append(mk_node_unit(suffix=\"edo2net\", env=common_node_env + [\"DATA_DIR=/var/lib/tezos/node-edo2net\"],\n- desc=\"Tezos node edo2net\"))\n-\n-node_postinst_steps += f'''mkdir -p /var/lib/tezos/node-edo2net\n-rm -f /var/lib/tezos/node-edo2net/config.json\n-cat > /var/lib/tezos/node-edo2net/config.json <<- EOM\n-{edo2net_config}\n-EOM\n-chown -R tezos:tezos /var/lib/tezos/node-edo2net\n-cat > /usr/bin/tezos-node-edo2net <<- 'EOM'\n-#! /usr/bin/env bash\n-\n-TEZOS_NODE_DIR=\"$(cat $(systemctl show -p FragmentPath tezos-node-edo2net.service | cut -d'=' -f2) | grep 'DATA_DIR' | cut -d '=' -f3 | cut -d '\"' -f1)\" tezos-node \"$@\"\n-EOM\n-chmod +x /usr/bin/tezos-node-edo2net\n-'''\n-node_postrm_steps += f\"rm -f /usr/bin/tezos-node-edo2net\\n\"\n-\npackages.append(OpamBasedPackage(\"tezos-node\",\n\"Entry point for initializing, configuring and running a Tezos node\",\nnode_units,\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Remove edo2net workarounds
Problem: v9.0 tezos-node supports edo2net out of the box.
Our workarounds for its support are no longer needed.
Solution: Remove workarounds for edo2net and use it as a usual
predefined node network. As an addition, also support florencenet.
|
603,652
|
22.04.2021 18:34:37
| -10,800
|
3738e178a1c020efb00d61b3c3744953e5ddb216
|
Bump ocaml to 4.10 everywhere
Problem: Tezos now uses new OCaml version.
Solution: Use 4.10 everywhere in our code.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-fedora",
"new_path": "docker/package/Dockerfile-fedora",
"diff": "@@ -14,8 +14,8 @@ COPY protocols.json /tezos-packaging/protocols.json\nWORKDIR /tezos-packaging/docker\nENV OPAMROOT \"/tezos-packaging/docker/opamroot\"\nRUN opam init --bare --yes --disable-sandboxing\n-RUN opam switch create ocaml-base-compiler.4.09.1\n-RUN opam switch set ocaml-base-compiler.4.09.1\n+RUN opam switch create ocaml-base-compiler.4.10.2\n+RUN opam switch set ocaml-base-compiler.4.10.2\nRUN opam install opam-bundle=0.4 --yes\nCOPY docker/package/*.py /tezos-packaging/docker/package/\nCOPY docker/package/defaults /tezos-packaging/docker/package/defaults\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-ubuntu",
"new_path": "docker/package/Dockerfile-ubuntu",
"diff": "@@ -15,8 +15,8 @@ COPY protocols.json /tezos-packaging/protocols.json\nWORKDIR /tezos-packaging/docker\nENV OPAMROOT \"/tezos-packaging/docker/opamroot\"\nRUN opam init --bare --yes --disable-sandboxing\n-RUN opam switch create ocaml-base-compiler.4.09.1\n-RUN opam switch set ocaml-base-compiler.4.09.1\n+RUN opam switch create ocaml-base-compiler.4.10.2\n+RUN opam switch set ocaml-base-compiler.4.10.2\nRUN opam install opam-bundle=0.4 --yes\nCOPY docker/package/*.py /tezos-packaging/docker/package/\nCOPY docker/package/defaults /tezos-packaging/docker/package/defaults\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/ocaml-overlay.nix",
"new_path": "nix/build/ocaml-overlay.nix",
"diff": ", hacks ? import ./hacks.nix\n, pkgs ? import sources.nixpkgs { }, opam-nix ? import sources.opam-nix pkgs }:\nself: super: {\n- ocamlPackages = self.ocaml-ng.ocamlPackages_4_09.overrideScope'\n+ ocamlPackages = self.ocaml-ng.ocamlPackages_4_10.overrideScope'\n(builtins.foldl' self.lib.composeExtensions (_: _: { }) [\n(opam-nix.traverseOPAMRepo' sources.opam-repository)\n(oself: osuper: { index-super = osuper.index.versions.\"1.2.0\"; })\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-nix-binaries.nix",
"new_path": "tests/tezos-nix-binaries.nix",
"diff": "@@ -15,7 +15,7 @@ in import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\nlibev\n];\nenvironment.sessionVariables.LD_LIBRARY_PATH =\n- [ \"${pkgs.ocamlPackages.hacl-star-raw}/lib/ocaml/4.09.1/site-lib/hacl-star-raw\" ];\n+ [ \"${pkgs.ocamlPackages.hacl-star-raw}/lib/ocaml/4.10.0/site-lib/hacl-star-raw\" ];\n};\ntestScript = ''\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Bump ocaml to 4.10 everywhere
Problem: Tezos now uses new OCaml version.
Solution: Use 4.10 everywhere in our code.
|
603,650
|
23.04.2021 12:36:34
| -7,200
|
8d5e36e74599ffd55b3d8f58cec1ad0fb5f1b4c6
|
Update brew formula bottle hashes to v9.0
Problem: brew formulas have been updated to v9.0 and new bottles
are available, but their hashes are not in the formulas yet.
Solution: update brew bottle hashes for updated formulas.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"9993353f5a712f1d76158f55a659a89dd89f62e362793a0806eab2146d79f415\"\n+ sha256 cellar: :any, catalina: \"a2af0961c4828d9be2a0b5ff4ed726b1d9017f7193bc3903b2e32950aeaa27c4\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"ceb2cd370a1b4298285132f1ae08e73f893e5d4535af33b885ac9333220b394b\"\n+ sha256 cellar: :any, catalina: \"87cca2b88850ed34e3e6d9c5397320b47205c8d0bbb09260fcc1dc18aeeff3c8\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, mojave: \"0f3af887bbc737866f2e9aae5db015972ff0eef49e3f19680cacfec7b89336d2\"\n+ sha256 cellar: :any, catalina: \"f3a908257821cfdc2750a9dec1d60e034353002c508ead420ad3c09fbd0569bc\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"572db756093404f117be4cd330ad7321292e2be13eec6e278ef066439ca6fa55\"\n+ sha256 cellar: :any, catalina: \"cc6c60a9bd1b83ce31965b4136cbc12588f49063b2922cd0176ae2244c77708c\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"860038bc9089176b9474f3931ab84b7d903e065c510701f2f905cc614d0737ee\"\n+ sha256 cellar: :any, catalina: \"147d05628af33f8f8f15dbb2619daf88b3d7a734919565c9a1f03c2937f04833\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, mojave: \"ec08557ecfb3c16663f99e64a748e057f7ddff06c64001e775ab5035c55b51c3\"\n+ sha256 cellar: :any, catalina: \"999d8894d609fe42a0ebdd742ab8950b63b8fc4af899b2c92e9edacd1daf37d3\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, mojave: \"a2aa2714b751523aa7a229e78f1af48bf372a9096c41f82bfca6b407d518a9eb\"\n+ sha256 cellar: :any, catalina: \"bf0932005e708db38f5ddb8e8bdef55c73a75358936658c0eadef5ea67f70cf2\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"5c9b9fa0f337019f2fde7ffe845765428b03513496e3e0b3306806f82a06d3b7\"\n+ sha256 cellar: :any, catalina: \"8a314d81c340a2f5f9c6ff422b08f01626e81bfb002b6a0e81c144ed9a1dbae9\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"f360bb4ee60a2e01d7e2be556f0349f8b10732cddb1ad2ee6a421bae8996123b\"\n+ sha256 cellar: :any, catalina: \"99979219c99516716014e8f1c4cbeecba165eb71839d81153c2a1a0baeefa5e3\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, mojave: \"d3d38ba2227123bcad357a2cb17c6c2cf8623025a9adca43faa3bf61ed722693\"\n+ sha256 cellar: :any, catalina: \"df91778e5ccd2873edf3ec4904035af596f623f8226cb0ab44c9764d5797b005\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n+ sha256 cellar: :any, mojave: \"97fefdeb7fa066a9d51b5831d2bd788fde3ccc1ffb8e2392ddb9d7271915b045\"\n+ sha256 cellar: :any, catalina: \"04d53dde65f592a65700e9a3a20e778ef91c5dfe3269e2d92cc65b2255a69370\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, mojave: \"d5cb15d4b93d342b081bbd779ff3a7e4cd0d511fa34469a4483320ff8fe748c6\"\n+ sha256 cellar: :any, catalina: \"d5d68250a7429128aaf979cee9e60a48e94e380d21fb9d3c969c2e7aea6d5fa8\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Update brew formula bottle hashes to v9.0
Problem: brew formulas have been updated to v9.0 and new bottles
are available, but their hashes are not in the formulas yet.
Solution: update brew bottle hashes for updated formulas.
|
603,650
|
14.04.2021 23:19:13
| -7,200
|
de83d392774cfa7cc0e2c76cdb8226e445776d62
|
Document baking on Raspberry Pi OS
Problem: we have Ubuntu packages for arm64 that could be installed and
used on 64bit Raspberry Pi OS, but no documentation on how to do so.
Solution: update README and baking tutorial with installation info for
Raspberry Pis.
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -30,6 +30,7 @@ different networks, you can read more about this in [this article](https://tezos\n* [Static linux binaries](#static-linux)\n* [Native Ubuntu packages](#ubuntu)\n+ * [Ubuntu packages on Raspberry Pi OS](#raspberry)\n* [Native Fedora packages](#fedora)\n* [Other linux](#linux)\n* [Brew tap for macOS](#macos)\n@@ -63,6 +64,27 @@ sudo apt-get install tezos-baker-007-psdelph1\n```\nOnce you install such packages the commands `tezos-*` will be available.\n+<a name=\"raspberry\"></a>\n+### Ubuntu packages on Raspberry Pi OS\n+\n+If you have a Raspberry Pi running the 64bit version of the official OS, you can\n+use the Lauchpad PPA to install `tezos-*` executables on it as well.\n+\n+You can add the PPA using:\n+```\n+# Intall software properties commons\n+sudo apt-get install software-properties-common\n+# Add PPA with Tezos binaries\n+sudo add-apt-repository 'deb http://ppa.launchpad.net/serokell/tezos/ubuntu bionic main'\n+sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 37B8819B7D0D183812DCA9A8CE5A4D8933AE7CBB\n+sudo apt-get update\n+```\n+\n+And install packages with `apt-get`, e.g. for `tezos-client`:\n+```\n+sudo apt-get install tezos-client\n+```\n+\n<a name=\"fedora\"></a>\n## Fedora Copr repository with `tezos-*` binaries\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "-\n- SPDX-License-Identifier: LicenseRef-MIT-TQ\n-->\n-# Baking with tezos-packaging on Ubuntu\n+# Baking with tezos-packaging on Ubuntu and Raspberry Pi OS\nTezos-packaging provides an easy way to install and set up the infrastructure for\ninteracting with the Tezos blockchain.\n-This article provides a step-by-step guide for setting up a baking instance for Tezos on Ubuntu.\n+This article provides a step-by-step guide for setting up a baking instance for\n+Tezos on Ubuntu or Raspberry Pi OS.\n## Prerequisites\n+### Raspberry Pi system\n+\n+To bake on a Raspberry Pi you will need a device that has at least 4 GB of RAM\n+and an arm64 processor; for example a Raspberry Pi 4B.\n+\n+You will also need to run the 64bit version of the [Raspberry Pi OS](https://www.raspberrypi.org/software/),\n+that you can use by following the [installation instructions](https://www.raspberrypi.org/documentation/installation/installing-images/)\n+with an image downloasd from the [official 64bit repository](https://downloads.raspberrypi.org/raspios_arm64/images/).\n+\n### Installing required packages\nIn order to run a baking instance, you'll need the following Tezos binaries:\n`tezos-client`, `tezos-node`, `tezos-baker-<proto>`, `tezos-endorser-<proto>`.\nThe currently used proto is `008-PtEdo2Zk` (used on `mainnet` and `edo2net`).\n-Also, note that the corresponding Ubuntu packages have protocol\n+Also, note that the corresponding packages have protocol\nsuffix in lowercase, e.g. the list of available baker packages can be found\n[here](https://launchpad.net/~serokell/+archive/ubuntu/tezos/+packages?field.name_filter=tezos-baker&field.status_filter=published).\nTo install them, run the following commands:\n+\n+#### On Ubuntu\n```\n# Add PPA with Tezos binaries\nsudo add-apt-repository ppa:serokell/tezos\n@@ -31,6 +43,18 @@ sudo apt-get update\nsudo apt-get install tezos-client tezos-node tezos-baker-<proto> tezos-endorser-<proto>\n```\n+#### On Raspberry Pi OS\n+```\n+# Intall software properties commons\n+sudo apt-get install software-properties-common\n+# Add PPA with Tezos binaries\n+sudo add-apt-repository 'deb http://ppa.launchpad.net/serokell/tezos/ubuntu bionic main'\n+sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 37B8819B7D0D183812DCA9A8CE5A4D8933AE7CBB\n+sudo apt-get update\n+# Install packages\n+sudo apt-get install tezos-client tezos-node tezos-baker-<proto> tezos-endorser-<proto>\n+```\n+\nPackages for `tezos-node`, `tezos-baker-<proto>` and `tezos-endorser-<proto>` provide\nsystemd units for running the corresponding binaries in the background.\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#76] Document baking on Raspberry Pi OS
Problem: we have Ubuntu packages for arm64 that could be installed and
used on 64bit Raspberry Pi OS, but no documentation on how to do so.
Solution: update README and baking tutorial with installation info for
Raspberry Pis.
|
603,652
|
23.03.2021 17:54:43
| -10,800
|
7b6b4ec79d31d4f9a28b97cbeab2f03de206374d
|
Make WantedBy configurable for services
Problem: We'll need to use various WantedBy for various services, e.g.
tezos-node-<network> services will be wanted by the tezos-baking-<network>
services.
Solution: Add WantedBy to the existing systemd eDSL presented in our
python code.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -22,10 +22,15 @@ class Unit:\nself.requires = requires\nself.description = description\n+class Install:\n+ def __init__(self, wanted_by: List[str]=[]):\n+ self.wanted_by = wanted_by\n+\nclass ServiceFile:\n- def __init__(self, unit: Unit, service:Service):\n+ def __init__(self, unit: Unit, service:Service, install: Install):\nself.unit = unit\nself.service = service\n+ self.install = install\nclass SystemdUnit:\ndef __init__(self, service_file:ServiceFile, startup_script:str, suffix:str=None,\n@@ -403,6 +408,7 @@ def print_service_file(service_file: ServiceFile, out):\nrequires = \"\".join(map(lambda x: f\"Requires={x}\\n\", service_file.unit.requires))\nenvironment = \"\".join(map(lambda x: f\"Environment=\\\"{x}\\\"\\n\", service_file.service.environment))\nenvironment_file = \"\" if service_file.service.environment_file is None else f\"EnvironmentFile={service_file.service.environment_file}\"\n+ wanted_by = \"\".join(map(lambda x: f\"WantedBy=\\\"{x}\\\"\\n\", service_file.install.wanted_by))\nfile_contents = f'''# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n#\n# SPDX-License-Identifier: LicenseRef-MIT-TQ\n@@ -415,7 +421,7 @@ StateDirectory={service_file.service.state_directory}\nUser={service_file.service.user}\nGroup={service_file.service.user}\n[Install]\n-WantedBy=multi-user.target\n+{wanted_by}\n'''\nwith open(out, 'w') as f:\nf.write(file_contents)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "# SPDX-License-Identifier: LicenseRef-MIT-TQ\nimport os, shutil, sys, subprocess, json\n-from .model import Service, ServiceFile, SystemdUnit, Unit, OpamBasedPackage, TezosSaplingParamsPackage\n+from .model import Service, ServiceFile, SystemdUnit, Unit, OpamBasedPackage, TezosSaplingParamsPackage, Install\nnetworks = [\"mainnet\", \"edo2net\", \"florencenet\"]\n@@ -15,7 +15,8 @@ signer_units = [\nenvironment=[\"ADDRESS=127.0.0.1\", \"PORT=8000\", \"TIMEOUT=1\"],\nexec_start=\"/usr/bin/tezos-signer-start launch socket signer \" \\\n+ \" --address ${ADDRESS} --port ${PORT} --timeout ${TIMEOUT}\",\n- state_directory=\"tezos\", user=\"tezos\")),\n+ state_directory=\"tezos\", user=\"tezos\"),\n+ Install(wanted_by=[\"multi-user.target\"])),\nsuffix=\"tcp\",\nstartup_script=\"tezos-signer-start\",\nconfig_file=\"tezos-signer.conf\"),\n@@ -26,7 +27,8 @@ signer_units = [\nenvironment=[\"SOCKET=\"],\nexec_start=\"/usr/bin/tezos-signer-start launch local signer \" \\\n+ \"--socket ${SOCKET}\",\n- state_directory=\"tezos\", user=\"tezos\")),\n+ state_directory=\"tezos\", user=\"tezos\"),\n+ Install(wanted_by=[\"multi-user.target\"])),\nsuffix=\"unix\",\nstartup_script=\"tezos-signer-start\",\nconfig_file=\"tezos-signer.conf\"),\n@@ -37,7 +39,8 @@ signer_units = [\nenvironment=[\"CERT_PATH=\", \"KEY_PATH=\", \"ADDRESS=127.0.0.1\", \"PORT=8080\"],\nexec_start=\"/usr/bin/tezos-signer-start launch http signer \" \\\n+ \"--address ${ADDRESS} --port ${PORT}\",\n- state_directory=\"tezos\", user=\"tezos\")),\n+ state_directory=\"tezos\", user=\"tezos\"),\n+ Install(wanted_by=[\"multi-user.target\"])),\nsuffix=\"http\",\nstartup_script=\"tezos-signer-start\",\nconfig_file=\"tezos-signer.conf\"),\n@@ -48,7 +51,8 @@ signer_units = [\nenvironment=[\"CERT_PATH=\", \"KEY_PATH=\", \"ADDRESS=127.0.0.1\", \"PORT=8080\"],\nexec_start=\"/usr/bin/tezos-signer-start launch https signer \" \\\n+ \"${CERT_PATH} ${KEY_PATH} --address ${ADDRESS} --port ${PORT}\",\n- state_directory=\"tezos\", user=\"tezos\")),\n+ state_directory=\"tezos\", user=\"tezos\"),\n+ Install(wanted_by=[\"multi-user.target\"])),\nsuffix=\"https\",\nstartup_script=\"tezos-signer-start\",\nconfig_file=\"tezos-signer.conf\")\n@@ -81,7 +85,8 @@ def mk_node_unit(suffix, env, desc):\nService(environment=env,\nexec_start=\"/usr/bin/tezos-node-start\",\nstate_directory=\"tezos\", user=\"tezos\"\n- ))\n+ ),\n+ Install(wanted_by=[\"multi-user.target\"]))\nreturn SystemdUnit(suffix=suffix, service_file=service_file, startup_script=\"tezos-node-start\")\nnode_units = []\n@@ -143,19 +148,22 @@ for proto in active_protocols:\nService(environment_file=f\"/etc/default/tezos-baker-{proto}\",\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=\"/usr/bin/tezos-baker-start\",\n- state_directory=\"tezos\", user=\"tezos\"))\n+ state_directory=\"tezos\", user=\"tezos\"),\n+ Install(wanted_by=[\"multi-user.target\"]))\nservice_file_accuser = ServiceFile(Unit(after=[\"network.target\"],\ndescription=\"Tezos accuser\"),\nService(environment_file=f\"/etc/default/tezos-accuser-{proto}\",\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=\"/usr/bin/tezos-accuser-start\",\n- state_directory=\"tezos\", user=\"tezos\"))\n+ state_directory=\"tezos\", user=\"tezos\"),\n+ Install(wanted_by=[\"multi-user.target\"]))\nservice_file_endorser = ServiceFile(Unit(after=[\"network.target\"],\ndescription=\"Tezos endorser\"),\nService(environment_file=f\"/etc/default/tezos-endorser-{proto}\",\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=\"/usr/bin/tezos-endorser-start\",\n- state_directory=\"tezos\", user=\"tezos\"))\n+ state_directory=\"tezos\", user=\"tezos\"),\n+ Install(wanted_by=[\"multi-user.target\"]))\npackages.append(OpamBasedPackage(f\"tezos-baker-{proto}\", \"Daemon for baking\",\n[SystemdUnit(service_file=service_file_baker,\nstartup_script=\"tezos-baker-start\",\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Make WantedBy configurable for services
Problem: We'll need to use various WantedBy for various services, e.g.
tezos-node-<network> services will be wanted by the tezos-baking-<network>
services.
Solution: Add WantedBy to the existing systemd eDSL presented in our
python code.
|
603,652
|
23.03.2021 18:08:09
| -10,800
|
bd335fa1fd6aeb586fc497f2e642fa4c787e1a06
|
Make PartOf configurable for services
Problem: This property is required to propagate stop and restart signals
to the subservices. In our case we'll make node and daemons services
part of 'tezos-baking-<network>' service.
Solution: Make it configurable in our python "eDSL".
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -17,9 +17,11 @@ class Service:\nself.user = user\nclass Unit:\n- def __init__(self, after: List[str], description: str, requires: List[str]=[]):\n+ def __init__(self, after: List[str], description: str, requires: List[str]=[],\n+ part_of: List[str]=[]):\nself.after = after\nself.requires = requires\n+ self.part_of = part_of\nself.description = description\nclass Install:\n@@ -406,6 +408,7 @@ install: tezos-sapling-params\ndef print_service_file(service_file: ServiceFile, out):\nafter = \"\".join(map(lambda x: f\"After={x}\\n\", service_file.unit.after))\nrequires = \"\".join(map(lambda x: f\"Requires={x}\\n\", service_file.unit.requires))\n+ part_of = \"\".join(map(lambda x: f\"PartOf={x}\\n\", service_file.unit.part_of))\nenvironment = \"\".join(map(lambda x: f\"Environment=\\\"{x}\\\"\\n\", service_file.service.environment))\nenvironment_file = \"\" if service_file.service.environment_file is None else f\"EnvironmentFile={service_file.service.environment_file}\"\nwanted_by = \"\".join(map(lambda x: f\"WantedBy=\\\"{x}\\\"\\n\", service_file.install.wanted_by))\n@@ -413,7 +416,7 @@ def print_service_file(service_file: ServiceFile, out):\n#\n# SPDX-License-Identifier: LicenseRef-MIT-TQ\n[Unit]\n-{after}{requires}Description={service_file.unit.description}\n+{after}{requires}{part_of}Description={service_file.unit.description}\n[Service]\n{environment_file}\n{environment}ExecStart={service_file.service.exec_start}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Make PartOf configurable for services
Problem: This property is required to propagate stop and restart signals
to the subservices. In our case we'll make node and daemons services
part of 'tezos-baking-<network>' service.
Solution: Make it configurable in our python "eDSL".
|
603,652
|
24.03.2021 16:50:58
| -10,800
|
419ab0517d231f9f7c3672266b9cc2c7690f11c3
|
Add more properties to services eDSL
They're going to be used in new tezos-baking-<network> services.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -9,12 +9,15 @@ from typing import List\n# There are more possible fields, but only these are used by tezos services\nclass Service:\ndef __init__(self, exec_start: str, state_directory:str, user: str,\n- environment_file: str=None, environment: List[str]=[]):\n+ environment_file: str=None, environment: List[str]=[],\n+ remain_after_exit: bool=False, type_: str=None):\nself.environment_file = environment_file\nself.environment = environment\nself.exec_start = exec_start\nself.state_directory = state_directory\nself.user = user\n+ self.remain_after_exit = remain_after_exit\n+ self.type_ = type_;\nclass Unit:\ndef __init__(self, after: List[str], description: str, requires: List[str]=[],\n@@ -434,6 +437,8 @@ def print_service_file(service_file: ServiceFile, out):\nStateDirectory={service_file.service.state_directory}\nUser={service_file.service.user}\nGroup={service_file.service.user}\n+{\"RemainAfterExit=yes\" if service_file.service.remain_after_exit else \"\"}\n+{f\"Type={service_file.service.type_}\" if service_file.service.type_ is not None else \"\"}\n[Install]\n{wanted_by}\n'''\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Add more properties to services eDSL
They're going to be used in new tezos-baking-<network> services.
|
603,652
|
24.03.2021 17:05:48
| -10,800
|
1b95ae01b8743044e22149887b56ad80dab81380
|
Make startup script optional
Problem: Startup scripts won't be needed for new services.
Solution: Make this argument optional.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -38,7 +38,7 @@ class ServiceFile:\nself.install = install\nclass SystemdUnit:\n- def __init__(self, service_file:ServiceFile, startup_script:str, suffix:str=None,\n+ def __init__(self, service_file:ServiceFile, startup_script:str=None, suffix:str=None,\nconfig_file: str=None, instances :List[str]=[]):\nself.suffix = suffix\nself.service_file = service_file\n@@ -291,7 +291,8 @@ override_dh_systemd_start:\nf.write(rules_contents)\ndef gen_install(self, out):\n- startup_scripts = list(set(map(lambda x: x.startup_script, self.systemd_units)))\n+ startup_scripts = \\\n+ list(set(filter(lambda x: x is not None, map(lambda x: x.startup_script, self.systemd_units))))\ninstall_contents = \"\\n\".join(map(lambda x: f\"debian/{x} usr/bin\",\nstartup_scripts))\nwith open(out, 'w') as f:\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/package_generator.py",
"new_path": "docker/package/package_generator.py",
"diff": "@@ -99,6 +99,7 @@ for package in packages:\nif systemd_unit.config_file is not None:\nshutil.copy(f\"{os.path.dirname(__file__)}/defaults/{systemd_unit.config_file}\",\nf\"debian/{package.name.lower()}-{systemd_unit.suffix}.default\")\n+ if systemd_unit.startup_script is not None:\nshutil.copy(f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.startup_script}\", f\"debian/{systemd_unit.startup_script}\")\npackage.gen_install(\"debian/install\")\npackage.gen_postinst(\"debian/postinst\")\n@@ -131,6 +132,7 @@ for package in packages:\nif systemd_unit.config_file is not None:\nshutil.copy(f\"{os.path.dirname(__file__)}/defaults/{systemd_unit.config_file}\",\nf\"{dir}/{package.name}-{systemd_unit.suffix}.default\")\n+ if systemd_unit.startup_script is not None:\nshutil.copy(f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.startup_script}\", f\"{dir}/{systemd_unit.startup_script}\")\nsubprocess.run([\"tar\", \"-czf\", f\"{dir}.tar.gz\", dir], check=True)\nos.makedirs(f\"{home}/rpmbuild/SPECS\", exist_ok=True)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Make startup script optional
Problem: Startup scripts won't be needed for new services.
Solution: Make this argument optional.
|
603,652
|
24.03.2021 17:06:17
| -10,800
|
e70f6259d304eb890d8617744904b6f119b21a7e
|
Refactor spec and rules files generation
Problem: Opam based packages and new package for baking services will
have mostly common approach for generation of spec and rules files.
Solution: Refactor generation of these files to avoid code duplication
in future.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -91,6 +91,95 @@ ubuntu_epoch = 2\nfedora_epoch = 1\n+def gen_spec_systemd_part(package):\n+ systemd_units = package.systemd_units\n+ startup_scripts = list(set(map(lambda x: x.startup_script, package.systemd_units)))\n+ config_files = list(filter(lambda x: x is not None, map(lambda x: x.config_file,\n+ package.systemd_units)))\n+ install_unit_files = \"\"\n+ systemd_unit_files = \"\"\n+ enable_units = \"\"\n+ systemd_units_post = \"\"\n+ systemd_units_preun = \"\"\n+ systemd_units_postun = \"\"\n+ if len(config_files) > 0:\n+ install_default = f\"mkdir -p %{{buildroot}}/%{{_sysconfdir}}/default\\n\"\n+ else:\n+ install_default = \"\"\n+ default_files = \"\"\n+ for systemd_unit in package.systemd_units:\n+ if systemd_unit.suffix is None:\n+ service_name = \"%{name}\"\n+ else:\n+ service_name = f\"%{{name}}-{systemd_unit.suffix}\"\n+ if len(systemd_unit.instances) > 0:\n+ service_name = f\"{service_name}@\"\n+ install_unit_files += f\"install -m 644 {service_name}.service %{{buildroot}}/%{{_unitdir}}\\n\"\n+ systemd_unit_files += f\"%{{_unitdir}}/{service_name}.service\\n\"\n+ if len(systemd_unit.instances) == 0:\n+ enable_units += f\"systemctl enable {service_name}.service\\n\"\n+ systemd_units_post += f\"%systemd_post {service_name}.service\\n\"\n+ systemd_units_preun += f\"%systemd_preun {service_name}.service\\n\"\n+ systemd_units_postun += f\"%systemd_postun_with_restart {service_name}.service\\n\"\n+ if systemd_unit.config_file is not None:\n+ install_default += f\"install -m 644 {service_name}.default \" + \\\n+ f\"%{{buildroot}}/%{{_sysconfdir}}/default/{service_name}\\n\"\n+ default_files += f\"%{{_sysconfdir}}/default/{service_name}\\n\"\n+ install_startup_scripts = \"\"\n+ systemd_startup_files = \"\"\n+ for startup_script in startup_scripts:\n+ if startup_script is not None:\n+ install_startup_scripts += f\"install -m 0755 {startup_script} %{{buildroot}}/%{{_bindir}}\\n\"\n+ systemd_startup_files += f\"%{{_bindir}}/{startup_script}\\n\"\n+ systemd_deps = \"systemd systemd-rpm-macros\"\n+ systemd_install = f'''\n+mkdir -p %{{buildroot}}/%{{_unitdir}}\n+{install_unit_files}\n+{install_default}\n+{install_startup_scripts}\n+'''\n+ systemd_files = f'''\n+{systemd_startup_files}\n+{systemd_unit_files}\n+{default_files}\n+'''\n+ systemd_macros= f'''\n+%post\n+{systemd_units_post}\n+{enable_units}\n+{package.postinst_steps}\n+\n+%preun\n+{systemd_units_preun}\n+\n+%postun\n+{systemd_units_postun}\n+{package.postrm_steps}\n+'''\n+ return systemd_deps, systemd_install, systemd_files, systemd_macros\n+\n+def gen_systemd_rules_contents(package):\n+ override_dh_install_init = \"override_dh_installinit:\\n\"\n+ for systemd_unit in package.systemd_units:\n+ if len(systemd_unit.instances) == 0:\n+ if systemd_unit.suffix is not None:\n+ override_dh_install_init += f\" dh_installinit --name={package.name.lower()}-{systemd_unit.suffix}\\n\"\n+ else:\n+ override_dh_install_init += f\" dh_installinit --name={package.name.lower()}\\n\"\n+ else:\n+ if systemd_unit.suffix is not None:\n+ override_dh_install_init += f\" dh_installinit --name={package.name.lower()}-{systemd_unit.suffix}@\\n\"\n+ else:\n+ override_dh_install_init += f\" dh_installinit --name={package.name.lower()}@\\n\"\n+ rules_contents = f'''#!/usr/bin/make -f\n+\n+%:\n+ dh $@ {\"--with systemd\" if len(package.systemd_units) > 0 else \"\"}\n+override_dh_systemd_start:\n+ dh_systemd_start --no-start\n+{override_dh_install_init if len(package.systemd_units) > 1 else \"\"}'''\n+ return rules_contents\n+\nclass OpamBasedPackage(AbstractPackage):\ndef __init__(self, name: str, desc: str, systemd_units: List[SystemdUnit]=[],\ntarget_proto: str=None, optional_opam_deps: List[str]=[],\n@@ -137,71 +226,8 @@ Description: {self.desc}\nself.systemd_units)))\nrequires = \" \".join(run_deps)\nif len(self.systemd_units) > 0:\n- startup_scripts = list(set(map(lambda x: x.startup_script, self.systemd_units)))\n- install_unit_files = \"\"\n- systemd_unit_files = \"\"\n- enable_units = \"\"\n- systemd_units_post = \"\"\n- systemd_units_preun = \"\"\n- systemd_units_postun = \"\"\n- if len(config_files) > 0:\n- install_default = f\"mkdir -p %{{buildroot}}/%{{_sysconfdir}}/default\\n\"\n- else:\n- install_default = \"\"\n- default_files = \"\"\n- for systemd_unit in self.systemd_units:\n- if systemd_unit.suffix is None:\n- install_unit_files += f\"install -m 644 %{{name}}.service %{{buildroot}}/%{{_unitdir}}\\n\"\n- systemd_unit_files += f\"%{{_unitdir}}/%{{name}}.service\\n\"\n- enable_units += f\"systemctl enable %{{name}}.service\\n\"\n- systemd_units_post += f\"%systemd_post %{{name}}.service\\n\"\n- systemd_units_preun += f\"%systemd_preun %{{name}}.service\\n\"\n- systemd_units_postun += f\"%systemd_postun_with_restart %{{name}}.service\\n\"\n- if systemd_unit.config_file is not None:\n- install_default += f\"install -m 644 %{{name}}.default \" + \\\n- f\"%{{buildroot}}/%{{_sysconfdir}}/default/%{{name}}\\n\"\n- default_files += f\"%{{_sysconfdir}}/default/%{{name}}\\n\"\n- else:\n- install_unit_files += f\"install -m 644 %{{name}}-{systemd_unit.suffix}.service %{{buildroot}}/%{{_unitdir}}\\n\"\n- systemd_unit_files += f\"%{{_unitdir}}/%{{name}}-{systemd_unit.suffix}.service\\n\"\n- enable_units += f\"systemctl enable %{{name}}-{systemd_unit.suffix}.service\\n\"\n- systemd_units_post += f\"%systemd_post %{{name}}-{systemd_unit.suffix}.service\\n\"\n- systemd_units_preun += f\"%systemd_preun %{{name}}-{systemd_unit.suffix}.service\\n\"\n- systemd_units_postun += f\"%systemd_postun_with_restart %{{name}}-{systemd_unit.suffix}.service\\n\"\n- if systemd_unit.config_file is not None:\n- install_default += f\"install -m 644 %{{name}}-{systemd_unit.suffix}.default \" + \\\n- f\"%{{buildroot}}/%{{_sysconfdir}}/default/%{{name}}-{systemd_unit.suffix}\\n\"\n- default_files += f\"%{{_sysconfdir}}/default/%{{name}}-{systemd_unit.suffix}\\n\"\n- install_startup_scripts = \"\"\n- systemd_startup_files = \"\"\n- for startup_script in startup_scripts:\n- install_startup_scripts += f\"install -m 0755 {startup_script} %{{buildroot}}/%{{_bindir}}\\n\"\n- systemd_startup_files += f\"%{{_bindir}}/{startup_script}\\n\"\n- systemd_deps = \"systemd systemd-rpm-macros\"\n- systemd_install = f'''\n-mkdir -p %{{buildroot}}/%{{_unitdir}}\n-{install_unit_files}\n-{install_default}\n-{install_startup_scripts}\n-'''\n- systemd_files = f'''\n-{systemd_startup_files}\n-{systemd_unit_files}\n-{default_files}\n-'''\n- systemd_macros= f'''\n-%post\n-{systemd_units_post}\n-{enable_units}\n-{self.postinst_steps}\n-\n-%preun\n-{systemd_units_preun}\n-\n-%postun\n-{systemd_units_postun}\n-{self.postrm_steps}\n-'''\n+ systemd_deps, systemd_install, systemd_files, systemd_macros = \\\n+ gen_spec_systemd_part(self)\nelse:\nsystemd_deps = \"\"\nsystemd_install = \"\"\n@@ -268,25 +294,7 @@ install: {self.name}\nf.write(changelog_contents)\ndef gen_rules(self, out):\n- override_dh_install_init = \"override_dh_installinit:\\n\"\n- for systemd_unit in self.systemd_units:\n- if len(systemd_unit.instances) == 0:\n- if systemd_unit.suffix is not None:\n- override_dh_install_init += f\" dh_installinit --name={self.name.lower()}-{systemd_unit.suffix}\\n\"\n- else:\n- override_dh_install_init += f\" dh_installinit --name={self.name.lower()}\\n\"\n- else:\n- if systemd_unit.suffix is not None:\n- override_dh_install_init += f\" dh_installinit --name={self.name.lower()}-{systemd_unit.suffix}@\\n\"\n- else:\n- override_dh_install_init += f\" dh_installinit --name={self.name.lower()}@\\n\"\n- rules_contents = f'''#!/usr/bin/make -f\n-\n-%:\n- dh $@ {\"--with systemd\" if len(self.systemd_units) > 0 else \"\"}\n-override_dh_systemd_start:\n- dh_systemd_start --no-start\n-{override_dh_install_init if len(self.systemd_units) > 1 else \"\"}'''\n+ rules_contents = gen_systemd_rules_contents(self)\nwith open(out, 'w') as f:\nf.write(rules_contents)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Refactor spec and rules files generation
Problem: Opam based packages and new package for baking services will
have mostly common approach for generation of spec and rules files.
Solution: Refactor generation of these files to avoid code duplication
in future.
|
603,652
|
24.03.2021 16:56:22
| -10,800
|
78abf6b19a3de0f5c8bbdcd52ef5506d16d810de
|
Add package with baking services
Problem: It'll be convenient if user could run a single command to
start/stop/restart all services required for baking.
Solution: Provide tezos-baking package which currently consists only of
systemd services 'tezos-baking-<network>' that orchestrate tezos-node,
tezos-baker and tezos-endorser services, thus it's possible to run
'systemctl start/stop/restart tezos-baking-<network>.service'.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "import os, shutil, sys, subprocess, json\nfrom abc import ABCMeta, abstractmethod\n-from typing import List\n+from typing import List, Dict\n# There are more possible fields, but only these are used by tezos services\nclass Service:\n@@ -453,3 +453,113 @@ Group={service_file.service.user}\n'''\nwith open(out, 'w') as f:\nf.write(file_contents)\n+\n+\n+class TezosBakingServicesPackage(AbstractPackage):\n+ def __init__(self, target_networks: List[str], network_protos: Dict[str, List[str]]):\n+ self.name = \"tezos-baking\"\n+ self.desc = \\\n+ \"Package that provides systemd services that orchestrate other services from Tezos packages\"\n+ self.target_protos = set()\n+ for network in target_networks:\n+ for proto in network_protos[network]:\n+ self.target_protos.add(proto)\n+ self.systemd_units = []\n+ for network in target_networks:\n+ self.systemd_units.append(\n+ SystemdUnit(\n+ service_file=ServiceFile(\n+ Unit(after=[\"network.target\"],\n+ description=f\"Tezos baking instance for {network}\"),\n+ Service(exec_start=\"true\", user=\"tezos\", state_directory=\"tezos\",\n+ remain_after_exit=True, type_=\"oneshot\"),\n+ Install(wanted_by=[\"multi-user.target\"])\n+ ),\n+ suffix=network\n+ )\n+ )\n+ self.postinst_steps = \"\"\n+ self.postrm_steps = \"\"\n+ def fetch_sources(self, out_dir):\n+ os.makedirs(out_dir)\n+\n+ def gen_control_file(self, deps, out):\n+ run_deps = \", \".join([\"tezos-client\", \"tezos-node\"] + \\\n+ sum([[f\"tezos-{daemon}-{proto.lower()}\" for daemon in [\"baker\", \"endorser\"]] for proto in self.target_protos],\n+ []))\n+ file_contents = f'''\n+Source: {self.name}\n+Section: utils\n+Priority: optional\n+Maintainer: {meta['maintainer']}\n+Build-Depends: debhelper (>=9), dh-systemd (>= 1.5), autotools-dev\n+Standards-Version: 3.9.6\n+Homepage: https://gitlab.com/tezos/tezos/\n+\n+Package: {self.name.lower()}\n+Architecture: amd64 arm64\n+Depends: ${{shlibs:Depends}}, ${{misc:Depends}}, {run_deps}\n+Description: {self.desc}\n+'''\n+ with open(out, 'w') as f:\n+ f.write(file_contents)\n+\n+ def gen_spec_file(self, build_deps, run_deps, out):\n+ run_deps = \", \".join([\"tezos-client\", \"tezos-node\"] + \\\n+ sum([[f\"tezos-{daemon}-{proto}\" for daemon in [\"baker\", \"endorser\"]] for proto in self.target_protos],\n+ []))\n+ systemd_deps, systemd_install, systemd_files, systemd_macros = \\\n+ gen_spec_systemd_part(self)\n+ file_contents = f'''\n+%define debug_package %{{nil}}\n+Name: {self.name}\n+Version: {version}\n+Release: {release}\n+Epoch: {fedora_epoch}\n+Summary: {self.desc}\n+License: MIT\n+BuildArch: x86_64 aarch64\n+Source0: {self.name}-{version}.tar.gz\n+Source1: https://gitlab.com/tezos/tezos/tree/v{version}/\n+BuildRequires: {systemd_deps}\n+Requires: {run_deps}\n+%description\n+{self.desc}\n+Maintainer: {meta['maintainer']}\n+%prep\n+%setup -q\n+%build\n+%install\n+{systemd_install}\n+%files\n+%license LICENSE\n+{systemd_files}\n+{systemd_macros}\n+'''\n+ with open(out, 'w') as f:\n+ f.write(file_contents)\n+\n+ def gen_makefile(self, out):\n+ file_contents = '''\n+.PHONY: install\n+\n+tezos-baking:\n+\n+install: tezos-baking\n+'''\n+ with open(out, 'w') as f:\n+ f.write(file_contents)\n+\n+ def gen_changelog(self, ubuntu_version, maintainer, date, out):\n+ changelog_contents = f'''{self.name.lower()} ({ubuntu_epoch}:{version}-0ubuntu{release}~{ubuntu_version}) {ubuntu_version}; urgency=medium\n+\n+ * Publish {version}-{release} version of {self.name}\n+\n+ -- {maintainer} {date}'''\n+ with open(out, 'w') as f:\n+ f.write(changelog_contents)\n+\n+ def gen_rules(self, out):\n+ rules_contents = gen_systemd_rules_contents(self)\n+ with open(out, 'w') as f:\n+ f.write(rules_contents)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "# SPDX-License-Identifier: LicenseRef-MIT-TQ\nimport os, shutil, sys, subprocess, json\n-from .model import Service, ServiceFile, SystemdUnit, Unit, OpamBasedPackage, TezosSaplingParamsPackage, Install\n+from .model import Service, ServiceFile, SystemdUnit, Unit, Install, OpamBasedPackage, TezosSaplingParamsPackage, TezosBakingServicesPackage\nnetworks = [\"mainnet\", \"edo2net\", \"florencenet\"]\n+networks_protos = {\n+ \"mainnet\": [\"008-PtEdo2Zk\", \"009-PsFLoren\"],\n+ \"edo2net\": [\"008-PtEdo2Zk\"],\n+ \"florencenet\": [\"009-PsFLoren\"]\n+}\nsigner_units = [\nSystemdUnit(\n@@ -147,9 +152,6 @@ daemon_decs = {\ndaemon_postinst_common = postinst_steps_common + \"\\nmkdir -p /var/lib/tezos/.tezos-client\\nchown -R tezos:tezos /var/lib/tezos/.tezos-client\\n\"\n-# TODO remove once v9.0 is released use 'networks' instead\n-daemons_instances = networks + [\"edo2net\"]\n-\ndef gen_daemon_specific_postinst(daemon_name):\ndaemon_postinst = \"\"\nfor instance in daemons_instances:\n@@ -163,6 +165,8 @@ def gen_daemon_specific_postrm(daemon_name):\nreturn daemon_postrm\nfor proto in active_protocols:\n+ daemons_instances = \\\n+ [network for network, protos in networks_protos.items() if proto in protos]\nservice_file_baker = ServiceFile(Unit(after=[\"network.target\"],\ndescription=\"Tezos baker\"),\nService(environment_file=f\"/etc/default/tezos-baker-{proto}\",\n@@ -253,3 +257,7 @@ for proto in active_protocols:\npostrm_steps=gen_daemon_specific_postrm(f\"tezos-endorser-{proto}\")))\npackages.append(TezosSaplingParamsPackage())\n+packages.append(TezosBakingServicesPackage(\n+ target_networks=networks,\n+ network_protos=networks_protos\n+ ))\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Add package with baking services
Problem: It'll be convenient if user could run a single command to
start/stop/restart all services required for baking.
Solution: Provide tezos-baking package which currently consists only of
systemd services 'tezos-baking-<network>' that orchestrate tezos-node,
tezos-baker and tezos-endorser services, thus it's possible to run
'systemctl start/stop/restart tezos-baking-<network>.service'.
|
603,652
|
12.04.2021 18:03:39
| -10,800
|
15f3dca287c7ab738ecdc126e66630f9f453a172
|
Define baker alias network-wise
Problem: Currently users have to define baker address in multiple places
when setting up the baking service, which is not very convenient.
Solution: Use configs provided by the tezos-baking package in the
daemons instantiated services, thus user will have to provide baker
alias in one network-specific config.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/defaults/tezos-baking.conf",
"diff": "+# vim: ft=sh\n+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+# shellcheck disable=SC2034\n+DATA_DIR=\"/var/lib/tezos/.tezos-client\"\n+NODE_RPC_ENDPOINT=\"http://localhost:8732\"\n+BAKER_ACCOUNT=\"\"\n+ENDORSER_ACCOUNT=\"$BAKER_ACCOUNT\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -484,7 +484,8 @@ class TezosBakingServicesPackage(AbstractPackage):\nremain_after_exit=True, type_=\"oneshot\"),\nInstall(wanted_by=[\"multi-user.target\"])\n),\n- suffix=network\n+ suffix=network,\n+ config_file=\"tezos-baking.conf\"\n)\n)\nself.postinst_steps = \"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -181,7 +181,7 @@ for proto in active_protocols:\nrequires=[\"tezos-node-%i.service\"],\npart_of=[\"tezos-baking-%i.service\"],\ndescription=\"Instantiated tezos baker daemon service\"),\n- Service(environment_file=f\"/etc/default/tezos-baker-{proto}\",\n+ Service(environment_file=\"/etc/default/tezos-baking-%i\",\nenvironment=[f\"PROTOCOL={proto}\", \"NODE_DATA_DIR=/var/lib/tezos/node-%i\"],\nexec_start=\"/usr/bin/tezos-baker-start\",\nstate_directory=\"tezos\", user=\"tezos\"),\n@@ -198,7 +198,7 @@ for proto in active_protocols:\nrequires=[\"tezos-node-%i.service\"],\npart_of=[\"tezos-baking-%i.service\"],\ndescription=\"Instantiated tezos accuser daemon service\"),\n- Service(environment_file=f\"/etc/default/tezos-accuser-{proto}\",\n+ Service(environment_file=\"/etc/default/tezos-baking-%i\",\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=\"/usr/bin/tezos-accuser-start\",\nstate_directory=\"tezos\", user=\"tezos\"),\n@@ -215,7 +215,7 @@ for proto in active_protocols:\nrequires=[\"tezos-node-%i.service\"],\npart_of=[\"tezos-baking-%i.service\"],\ndescription=\"Instantiated tezos endorser daemon service\"),\n- Service(environment_file=f\"/etc/default/tezos-endorser-{proto}\",\n+ Service(environment_file=\"/etc/default/tezos-baking-%i\",\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=\"/usr/bin/tezos-endorser-start\",\nstate_directory=\"tezos\", user=\"tezos\"),\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Define baker alias network-wise
Problem: Currently users have to define baker address in multiple places
when setting up the baking service, which is not very convenient.
Solution: Use configs provided by the tezos-baking package in the
daemons instantiated services, thus user will have to provide baker
alias in one network-specific config.
|
603,652
|
14.04.2021 17:06:54
| -10,800
|
33213164bde81aac3c7d3f880fcd032e1fc2ab6f
|
Increase node startup timeout
Problem: Node generates identity during ExecStartPre. This process can
take some relatively big amount of time and thus it can potentially fail
due to default 90s timeout.
Solution: Increase TimeoutStartSec to 450s. Now it should be enough even
for relatively slow hardware.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -9,13 +9,14 @@ from typing import List, Dict\n# There are more possible fields, but only these are used by tezos services\nclass Service:\ndef __init__(self, exec_start: str, state_directory:str, user: str,\n- exec_start_pre: str=None,\n+ exec_start_pre: str=None, timeout_start_sec: str=None,\nenvironment_file: str=None, environment: List[str]=[],\nremain_after_exit: bool=False, type_: str=None):\nself.environment_file = environment_file\nself.environment = environment\nself.exec_start = exec_start\nself.exec_start_pre = exec_start_pre\n+ self.timeout_start_sec = timeout_start_sec\nself.state_directory = state_directory\nself.user = user\nself.remain_after_exit = remain_after_exit\n@@ -451,6 +452,7 @@ def print_service_file(service_file: ServiceFile, out):\n{environment_file}\n{environment}\n{f\"ExecStartPre={service_file.service.exec_start_pre}\" if service_file.service.exec_start_pre is not None else \"\"}\n+{f\"TimeoutStartSec={service_file.service.timeout_start_sec}\" if service_file.service.timeout_start_sec is not None else \"\"}\nExecStart={service_file.service.exec_start}\nStateDirectory={service_file.service.state_directory}\nUser={service_file.service.user}\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -91,6 +91,7 @@ def mk_node_unit(suffix, env, desc):\nService(environment=env,\nexec_start=\"/usr/bin/tezos-node-start\",\nexec_start_pre=\"/usr/bin/tezos-node-prestart\",\n+ timeout_start_sec=\"450s\",\nstate_directory=\"tezos\", user=\"tezos\"\n),\nInstall(wanted_by=[\"multi-user.target\", f\"tezos-baking-{suffix}.service\"]))\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Increase node startup timeout
Problem: Node generates identity during ExecStartPre. This process can
take some relatively big amount of time and thus it can potentially fail
due to default 90s timeout.
Solution: Increase TimeoutStartSec to 450s. Now it should be enough even
for relatively slow hardware.
|
603,652
|
20.04.2021 11:58:18
| -10,800
|
5e718b29cbea763ee6d746c0ebdff26474d3e70b
|
Gen client config during baking prestart
Problem: Both baker and endorser startup scripts try to generate
tezos-client config file in the data directory. However, this
responsibility should belong to the parent service that orchestrates
node and these daemons.
Solution: Move client config generation/update to the
tezos-baking-{network} prestart script.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -307,9 +307,9 @@ install: {self.name}\ndef gen_install(self, out):\nstartup_scripts = \\\n- list(set(filter(lambda x: x is not None, map(lambda x: x.startup_script, self.systemd_units))))\n+ list({x.startup_script for x in self.systemd_units if x.startup_script is not None})\nprestart_scripts = \\\n- list(set(filter(lambda x: x is not None, map(lambda x: x.prestart_script, self.systemd_units))))\n+ list({x.prestart_script for x in self.systemd_units if x.prestart_script is not None})\ninstall_contents = \"\\n\".join(map(lambda x: f\"debian/{x} usr/bin\",\nstartup_scripts + prestart_scripts))\nwith open(out, 'w') as f:\n@@ -485,11 +485,14 @@ class TezosBakingServicesPackage(AbstractPackage):\nUnit(after=[\"network.target\"],\ndescription=f\"Tezos baking instance for {network}\"),\nService(exec_start=\"true\", user=\"tezos\", state_directory=\"tezos\",\n+ environment_file=f\"/etc/default/tezos-baking-{network}\",\n+ exec_start_pre=\"/usr/bin/tezos-baking-prestart\",\nremain_after_exit=True, type_=\"oneshot\"),\nInstall(wanted_by=[\"multi-user.target\"])\n),\nsuffix=network,\n- config_file=\"tezos-baking.conf\"\n+ config_file=\"tezos-baking.conf\",\n+ prestart_script=\"tezos-baking-prestart\"\n)\n)\nself.postinst_steps = \"\"\n@@ -577,3 +580,13 @@ install: tezos-baking\nrules_contents = gen_systemd_rules_contents(self)\nwith open(out, 'w') as f:\nf.write(rules_contents)\n+\n+ def gen_install(self, out):\n+ startup_scripts = \\\n+ list({x.startup_script for x in self.systemd_units if x.startup_script is not None})\n+ prestart_scripts = \\\n+ list({x.prestart_script for x in self.systemd_units if x.prestart_script is not None})\n+ install_contents = \"\\n\".join(map(lambda x: f\"debian/{x} usr/bin\",\n+ startup_scripts + prestart_scripts))\n+ with open(out, 'w') as f:\n+ f.write(install_contents)\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/scripts/tezos-baking-prestart",
"diff": "+#!/usr/bin/env bash\n+\n+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+set -euo pipefail\n+\n+tezos_client=\"/usr/bin/tezos-client\"\n+\n+config=\"$DATA_DIR/config\"\n+\n+mkdir -p \"$DATA_DIR\"\n+\n+\"$tezos_client\" --base-dir \"$DATA_DIR\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config \"$([[ -f $config ]] && echo \"update\" || echo \"init\")\"\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Gen client config during baking prestart
Problem: Both baker and endorser startup scripts try to generate
tezos-client config file in the data directory. However, this
responsibility should belong to the parent service that orchestrates
node and these daemons.
Solution: Move client config generation/update to the
tezos-baking-{network} prestart script.
|
603,652
|
17.03.2021 16:17:53
| -10,800
|
25a834457961b8e7a1d85feba26b1499cb03ca2d
|
Use new aliases in baking article
Problem: Providing data-dir manually to the `tezos-node` commands is a
bit inconvenient.
Solution: Suggest using tezos-node-<network> aliases instead of
providing data directory option manually.
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -96,31 +96,14 @@ the smallest and the fastest mode that is sufficient for baking (you can read mo\nAll commands within the service are run under the `tezos` user.\n-In order to import the snapshot, run the following command:\n-```\n-sudo -u tezos tezos-node snapshot import --data-dir /var/lib/tezos/node-<network>/ <path to the snapshot file>\n-```\n-\n-#### Troubleshooting node snapshot import\n-\n-Snapshot import requires that the `tezos-node` data directory doesn't contain the `context` and `store` folders.\n-Remove them if you're getting an error about their presence.\n+The `tezos-node` package provides `tezos-node-<network>` aliases that are equivalent to\n+`tezos-node --data-dir <DATA_DIR from the tezos-node-<network>.service>`.\n+These aliases can be used instead of providing `--data-dir` option to the `tezos-node`\n+invocations manually.\n-In case you're getting an error similar to:\n-```\n-tezos-node: Error:\n- Invalid block BLjutMj47caB\n- Failed to validate the economic-protocol content of the block: Error:\n- Invalid signature for block BLjutMj47caB. Expected: tz1Na5QB98cDA.\n-```\n-\n-you should init/update config in the data directory to match the desired network\n-before importing the snapshot. To do that, run one of the following commands\n-(depending on whether the config in the given data directory was initialized previously):\n+In order to import the snapshot, run the following command:\n```\n-sudo -u tezos tezos-node config init --data-dir /var/lib/tezos/node-<network> --network <network>\n-#or\n-sudo -u tezos tezos-node config update --data-dir /var/lib/tezos/node-<network> --network <network>\n+sudo -u tezos tezos-node-<network> snapshot import <path to the snapshot file>\n```\n### Starting the node\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#148] Use new aliases in baking article
Problem: Providing data-dir manually to the `tezos-node` commands is a
bit inconvenient.
Solution: Suggest using tezos-node-<network> aliases instead of
providing data directory option manually.
|
603,652
|
17.03.2021 16:20:39
| -10,800
|
e853b11731fc85199cb4962dd6d63657aacca595
|
Remove tulip snapshots from the suggested list
Problem: seems to be dead:(
Solution: Remove its mention from the baking doc.
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -86,7 +86,6 @@ In order to run a baker locally, you'll need a fully-synced local `tezos-node`.\nThe fastest way to bootstrap the node is to import a snapshot.\nSnapshots can be downloaded from the following websites:\n-* [Tulip Snapshots](https://snapshots.tulip.tools/#/)\n* [Tezos Giganode Snapshots](https://snapshots-tezos.giganode.io/)\n* [XTZ-Shots](https://xtz-shots.io/)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Remove tulip snapshots from the suggested list
Problem: https://snapshots.tulip.tools/ seems to be dead:(
Solution: Remove its mention from the baking doc.
|
603,650
|
29.04.2021 15:08:27
| -7,200
|
a989a6f3b18105453c1c51141432b612f0482436
|
[Chore] Fix grammar in auto-release template
Problem: there are some grammar mistakes in the auto-release template.
Solution: fix the grammar.
|
[
{
"change_type": "MODIFY",
"old_path": "release.nix",
"new_path": "release.nix",
"diff": "@@ -7,10 +7,10 @@ let\nrelease-binaries = import ./nix/build/release-binaries.nix;\nversion = replaceStrings [\"refs/tags/\"] [\"\"] commonMeta.branchName;\nrelease-notes = writeTextDir \"release-notes.md\" ''\n- This release contains assets based on [${version} release](https://gitlab.com/tezos/tezos/tree/${version}).\n+ This release contains assets based on the [${version} release](https://gitlab.com/tezos/tezos/tree/${version}).\n- Binaries that target arm64 architecture has `-arm64` suffix in the name.\n- Other binaries target x86_64.\n+ Binaries that target arm64 architecture have the `-arm64` suffix in their name.\n+ All the other binaries target x86_64.\nRelease artifacts are signed with the following key: 0x7EAF9B150ACE940CF8C008A0BF847A85AC7BF43E.\nYou can check it on http://keys.gnupg.net/.\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[Chore] Fix grammar in auto-release template
Problem: there are some grammar mistakes in the auto-release template.
Solution: fix the grammar.
|
603,652
|
03.05.2021 17:19:59
| -10,800
|
d31cb69be945eac94a58269aa872feeff85646f5
|
Bump Tezos to v9.1
Problem: New Tezos version was released.
Solution: Bump used Tezos version.
|
[
{
"change_type": "MODIFY",
"old_path": "nix/nix/sources.json",
"new_path": "nix/nix/sources.json",
"diff": "\"homepage\": \"https://opam.ocaml.org\",\n\"owner\": \"ocaml\",\n\"repo\": \"opam-repository\",\n- \"rev\": \"237e8e9eb5af7fdae743add41725e195b637c4b7\",\n- \"sha256\": \"0yx9n3sj90v6pl5qbg63kb3gwc0fg104r11jlrc5hx7yi9wjng06\",\n+ \"rev\": \"d90747963ba246b00526d08d26241e5654f418bf\",\n+ \"sha256\": \"0yd9y0wxzhm91j6wja190saqlbz8mvjgv5078b5ipyfg61sap44h\",\n\"type\": \"tarball\",\n- \"url\": \"https://github.com/ocaml/opam-repository/archive/237e8e9eb5af7fdae743add41725e195b637c4b7.tar.gz\",\n+ \"url\": \"https://github.com/ocaml/opam-repository/archive/d90747963ba246b00526d08d26241e5654f418bf.tar.gz\",\n\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"tezos\": {\n- \"ref\": \"refs/tags/v9.0\",\n+ \"ref\": \"refs/tags/v9.1\",\n\"repo\": \"https://gitlab.com/tezos/tezos\",\n- \"rev\": \"f4f033c6a5fff4bd644a2a2a38f7a607a5d6a055\",\n+ \"rev\": \"31e6641db444bdb5d3fb9f232282b429b8c3ea7a\",\n\"type\": \"git\"\n}\n}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Bump Tezos to v9.1
Problem: New Tezos version was released.
Solution: Bump used Tezos version.
|
603,652
|
03.05.2021 17:22:26
| -10,800
|
99b90dee815c78673c1d9241d005e9a1bb3497d6
|
Suspend v9.1 native packaging
Problem: There are no v9.1 opam packages
at the moment, they'll be release later.
Solution: Disable native packaging in CI for now.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline.yml",
"new_path": ".buildkite/pipeline.yml",
"diff": "@@ -69,50 +69,50 @@ steps:\n- nix-build tests/tezos-binaries.nix --no-out-link --arg path-to-binaries ./docker\nbranches: \"!master\"\n- - label: test deb source packages via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n- artifact_paths:\n- - ./out/*\n- branches: \"!master\"\n- timeout_in_minutes: 60\n- agents:\n- queue: \"docker\"\n- - label: test deb binary packages via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- # Building all binary packages will take significant amount of time, so we build only one\n- # in order to ensure package generation sanity\n- - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n- - rm -rf out\n- # It takes much time to build binary package, so we do it only on master\n- branches: \"master\"\n- timeout_in_minutes: 90\n- agents:\n- queue: \"docker\"\n- - label: test rpm source packages via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- - ./docker/docker-tezos-packages.sh --os fedora --type source\n- artifact_paths:\n- - ./out/*\n- branches: \"!master\"\n- timeout_in_minutes: 60\n- agents:\n- queue: \"docker\"\n- - label: test rpm binary packages via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- # Building all binary packages will take significant amount of time, so we build only one\n- # in order to ensure package generation sanity\n- - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n- - rm -rf out\n- # It takes much time to build binary package, so we do it only on master\n- branches: \"master\"\n- timeout_in_minutes: 90\n- agents:\n- queue: \"docker\"\n+# - label: test deb source packages via docker\n+# commands:\n+# - eval \"$SET_VERSION\"\n+# - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n+# artifact_paths:\n+# - ./out/*\n+# branches: \"!master\"\n+# timeout_in_minutes: 60\n+# agents:\n+# queue: \"docker\"\n+# - label: test deb binary packages via docker\n+# commands:\n+# - eval \"$SET_VERSION\"\n+# # Building all binary packages will take significant amount of time, so we build only one\n+# # in order to ensure package generation sanity\n+# - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n+# - rm -rf out\n+# # It takes much time to build binary package, so we do it only on master\n+# branches: \"master\"\n+# timeout_in_minutes: 90\n+# agents:\n+# queue: \"docker\"\n+# - label: test rpm source packages via docker\n+# commands:\n+# - eval \"$SET_VERSION\"\n+# - ./docker/docker-tezos-packages.sh --os fedora --type source\n+# artifact_paths:\n+# - ./out/*\n+# branches: \"!master\"\n+# timeout_in_minutes: 60\n+# agents:\n+# queue: \"docker\"\n+# - label: test rpm binary packages via docker\n+# commands:\n+# - eval \"$SET_VERSION\"\n+# # Building all binary packages will take significant amount of time, so we build only one\n+# # in order to ensure package generation sanity\n+# - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n+# - rm -rf out\n+# # It takes much time to build binary package, so we do it only on master\n+# branches: \"master\"\n+# timeout_in_minutes: 90\n+# agents:\n+# queue: \"docker\"\n- wait\n- label: create auto pre-release\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Suspend v9.1 native packaging
Problem: There are no v9.1 opam packages
at the moment, they'll be release later.
Solution: Disable native packaging in CI for now.
|
603,652
|
28.04.2021 14:45:39
| -10,800
|
2d0f674a504be978d49803f834714196af62481c
|
Update docs
Problem: Now we're providing more user-friendly way to set up and
start baking instace, we should use this way in the baking doc.
Solution: Rework baking.md to use `tezos-baking-<network>` service.
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -161,6 +161,10 @@ formulas should be updated. Also, bottles should be uploaded to the release arti\n`tezos-endorser-<proto>`, and `tezos-signer` packages have systemd files included to the\nUbuntu and Fedora packages.\n+As an addition, `tezos-baking` package provides `tezos-baking-<network>` services that orchestrate\n+systemd units for `tezos-node`, `tezos-baker-<proto>`, and `tezos-endorser-<proto>`.\n+Configuration files for these services are located in `/etc/default/tezos-baking-<network>`.\n+\nOnce you've installed the packages with systemd unit, you can run the service\nwith the binary from the package using the following command:\n```\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -20,18 +20,23 @@ and an arm64 processor; for example a Raspberry Pi 4B.\nYou will also need to run the 64bit version of the [Raspberry Pi OS](https://www.raspberrypi.org/software/),\nthat you can use by following the [installation instructions](https://www.raspberrypi.org/documentation/installation/installing-images/)\n-with an image downloasd from the [official 64bit repository](https://downloads.raspberrypi.org/raspios_arm64/images/).\n+with an image downloaded from the [official 64bit repository](https://downloads.raspberrypi.org/raspios_arm64/images/).\n### Installing required packages\nIn order to run a baking instance, you'll need the following Tezos binaries:\n`tezos-client`, `tezos-node`, `tezos-baker-<proto>`, `tezos-endorser-<proto>`.\n-The currently used proto is `008-PtEdo2Zk` (used on `mainnet` and `edo2net`).\n+The currently supported protocols are `008-PtEdo2Zk` (used on `mainnet` and `edo2net`)\n+and `009-PsFLoren` (used on `florencenet`).\nAlso, note that the corresponding packages have protocol\nsuffix in lowercase, e.g. the list of available baker packages can be found\n[here](https://launchpad.net/~serokell/+archive/ubuntu/tezos/+packages?field.name_filter=tezos-baker&field.status_filter=published).\n+The most convenient way to orchestrate all these binaries is to use the `tezos-baking`\n+package, which provides predefined services for running baking instances on different\n+networks.\n+\nTo install them, run the following commands:\n#### On Ubuntu\n@@ -40,7 +45,7 @@ To install them, run the following commands:\nsudo add-apt-repository ppa:serokell/tezos\nsudo apt-get update\n# Install packages\n-sudo apt-get install tezos-client tezos-node tezos-baker-<proto> tezos-endorser-<proto>\n+sudo apt-get install tezos-baking\n```\n#### On Raspberry Pi OS\n@@ -52,39 +57,28 @@ sudo add-apt-repository 'deb http://ppa.launchpad.net/serokell/tezos/ubuntu bion\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 37B8819B7D0D183812DCA9A8CE5A4D8933AE7CBB\nsudo apt-get update\n# Install packages\n-sudo apt-get install tezos-client tezos-node tezos-baker-<proto> tezos-endorser-<proto>\n+sudo apt-get install tezos-baking\n```\nPackages for `tezos-node`, `tezos-baker-<proto>` and `tezos-endorser-<proto>` provide\n-systemd units for running the corresponding binaries in the background.\n-\n-## Setting up the tezos-node\n+systemd units for running the corresponding binaries in the background, these units\n+are orchestrated by the `tezos-baking-<network>` units.\n-The easiest way to set up a node running on the `mainnet` or one of the\n-testnets (e.g. `edo2net`) is to use one of the predefined\n-`tezos-node-<network>.services` systemd services provided in the `tezos-node`\n-package.\n+## Setting up baking service\n-However, by default, these services will start to bootstrap the node from scratch,\n-which will take a significant amount of time.\n-In order to avoid this, we suggest bootstrapping from a snapshot instead.\n+By default `tezos-baking-<network>.service` will be using:\n+* `/var/lib/.tezos-client` as the `tezos-client` data directory\n+* `/var/lib/tezos/node-<network>` as the `tezos-node` data directory\n+* `http://localhost:8732` as the `tezos-node` RPC address.\n-### Setting up node service\n+## Bootstrapping the node\n-`tezos-node-<network>.service` has `/var/lib/tezos/node-<network>` as a data directory\n-and `http://localhost:8732` as its RPC address by default.\n+A fully-synced local `tezos-node` is required for running a baking instance.\n-In case you want to use a different data directory or RPC address,\n-you should update the service configuration. To edit the service configuration, run:\n-```\n-sudo systemctl edit --full tezos-node-<network>.service\n-```\n-\n-### Bootstrapping the node\n-\n-In order to run a baker locally, you'll need a fully-synced local `tezos-node`.\n+By default, service with `tezos-node` will start to bootstrap from scratch,\n+which will take a significant amount of time.\n+In order to avoid this, we suggest bootstrapping from a snapshot instead.\n-The fastest way to bootstrap the node is to import a snapshot.\nSnapshots can be downloaded from the following websites:\n* [Tezos Giganode Snapshots](https://snapshots-tezos.giganode.io/)\n* [XTZ-Shots](https://xtz-shots.io/)\n@@ -105,125 +99,122 @@ In order to import the snapshot, run the following command:\nsudo -u tezos tezos-node-<network> snapshot import <path to the snapshot file>\n```\n-### Starting the node\n+## Setting up baker and endorser key\n-After the snapshot import, you can finally start the node by running:\n+Note that account activation from JSON file and baker registering require\n+running a fully-bootstrapped `tezos-node`. In order to start node service do the following:\n```\nsudo systemctl start tezos-node-<network>.service\n```\n-Note that even after the snapshot import the node can still be out of sync. It may require\n-some additional time to completely bootstrap. In order to check whether the node is bootstrapped,\n+Even after the snapshot import the node can still be out of sync and may require\n+some additional time to completely bootstrap.\n+\n+In order to check whether the node is bootstrapped and wait in case it isn't,\nyou can use `tezos-client`:\n```\nsudo -u tezos tezos-client bootstrapped\n```\n-To stop the node, run:\n-```\n-sudo systemctl stop tezos-node-<network>.service\n-```\n-\n-If you want the service to start automatically at boot, use `enable`:\n-```\n-sudo systemctl enable tezos-node-edo2net.service\n-```\n-and to disable it from doing so, instead use:\n-```\n-sudo systemctl disable tezos-node-edo2net.service\n-```\n-\n-You can check node logs via `journalctl`:\n-```\n-journalctl -u tezos-node-<network>.service\n-```\n-\n-## Setting up baker and endorser daemons\n-\n-### Setting up daemon data directories\n-\n-Data directories for baker and endorser daemons are defined in the\n-`/etc/default/tezos-baker-<proto>` and `/etc/default/tezos-endorser-<proto>`.\n-By default, both these daemons have `/var/lib/tezos/.tezos-client` set as a `DATA_DIR`.\n-\n-Additionally, you need to specify `NODE_DATA_DIR` in the `/etc/default/tezos-baker-<proto>`\n-to point at the desired node data directory, e.g. `/var/lib/tezos/node-<network>`.\n-\n+By default `tezos-baking-<network>.service` will use the `baker` alias for the\n+key that will be used for baking and endorsing.\n+<a name=\"import\"></a>\n### Importing the baker key\nImport your baker secret key to the data directory. There are multiple ways to import\nthe key:\n-1) You have faucet JSON file from https://faucet.tzalpha.net/.\n+1) The secret key is stored on a ledger.\n-In order to activate account run:\n+Open the Tezos Wallet app on your ledger and run the following\n+to import the key:\n```\n-sudo -u tezos tezos-client activate account <alias> <path-to-downloaded-json>\n+sudo -u tezos tezos-client import secret key baker <ledger-url>\n+```\n+Apart from importing the key, you'll also need to set it up for baking. Open Tezos Baking app\n+on your ledger and run the following:\n+```\n+sudo -u tezos tezos-client setup ledger to bake for baker\n```\n2) You know either the unencrypted or password-encrypted secret key for your address.\nIn order to import such a key, run:\n```\n-sudo -u tezos tezos-client import secret key <alias> <secret-key>\n+sudo -u tezos tezos-client import secret key baker <secret-key>\n```\n-3) The secret key is stored on a ledger.\n-Open the Tezoz Wallet app on your ledger and run the following\n-to import the key:\n-```\n-sudo -u tezos tezos-client import secret key <alias> <ledger-url>\n-```\n-Apart from importing the key, you'll also need to set it up for baking. Open Tezos Baking app\n-on your ledger and run the following:\n+3) You have a faucet JSON file from https://faucet.tzalpha.net/.\n+\n+In order to activate the account run:\n```\n-sudo -u tezos tezos-client setup ledger to bake for <alias>\n+sudo -u tezos tezos-client activate account baker with <path-to-downloaded-json>\n```\n+<a name=\"registration\"></a>\n### Registering the baker\nOnce the key is imported, you'll need to register your baker, in order to do that run the following\ncommand:\n```\n-sudo -u tezos tezos-client register key <alias> as delegate\n+sudo -u tezos tezos-client register key baker as delegate\n```\nCheck a blockchain explorer (e.g. https://tzkt.io/ or https://tzstats.com/) to see the baker status and\nbaking rights of your account.\n-### Updating baker and endorser daemons configuration\n-Apart from that, you'll need to update the `BAKER_ACCOUNT` and `ENDORSER_ACCOUNT` (in\n-`/etc/default/tezos-baker-<proto>` and `/etc/default/tezos-endorser-<proto>` respectively) in\n-accordance to the **alias** of the imported key.\n+## Starting baking instance\n+\n+Once the key is imported and the baker registered, you can start your baking instance:\n+```\n+sudo systemctl start tezos-baking-<network>.service\n+```\n-### Starting daemons\n+This service will trigger the following services to start:\n+* `tezos-node-<network>.service`\n+* `tezos-baker-<proto>@<network>.service`\n+* `tezos-endorser-<proto>@network.service`\n-Once the key is imported and the configs are updated, you can start the baker and endorser daemons:\n+Once services have started, you can check their logs via `journalctl`:\n```\n-sudo systemctl start tezos-baker-<proto>.service\n-sudo systemctl start tezos-endorser-<proto>.service\n+journalctl -f _UID=$(id tezos -u)\n```\n+This command will show logs for all services that are using the `tezos` user.\n-If the node isn't bootstrapped yet, the baker and endorser daemons will wait for it to bootstrap.\n+You'll see the following messages in the logs in case everything has started\n+successfully:\n+```\n+Baker started.\n-Note that if you're baking with the ledger key, you should have the Tezos Baking app open.\n+Endorser started.\n+```\n-Once the services are started, you can check their logs via `journalctl`:\n+To stop the baking instance run:\n```\n-journalctl -u tezos-baker-<proto>.service\n-journalctl -u tezos-endorser-<proto>.service\n+sudo systemctl stop tezos-baking-<network>.service\n```\n-If everything was set up correctly, you shouldn't see any errors in the logs.\n-Logs for successfully started baker service should begin with:\n+## Advanced baking instance setup\n+\n+### Using different data directories and node RPC address\n+\n+In case you want to use a different `tezos-client` data directory or RPC address,\n+you should edit the `/etc/default/tezos-baking-<network>` file, e.g.:\n```\n-Node is bootstrapped.\n-Baker started.\n+sudo vim /etc/default/tezos-baking-<network>\n```\n-Logs for successfully started endorser service should begin with:\n+In case you want to use a different `tezos-node` data directory, you\n+should instead edit the service configuration, using:\n```\n-Node is bootstrapped.\n-Endorser started.\n+sudo systemctl edit --full tezos-node-<network>.service\n```\n+\n+### Using different account alias for baking\n+\n+In case you want to use a different alias for the baking account:\n+1. replace `baker` with he desired alias in the sections about [importing](#import)\n+ and [registering](#registration) the baker key.\n+2. update the `BAKER_ADDRESS_ALIAS` by editing the\n+ `/etc/default/tezos-baking-<network>` file.\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Update docs
Problem: Now we're providing more user-friendly way to set up and
start baking instace, we should use this way in the baking doc.
Solution: Rework baking.md to use `tezos-baking-<network>` service.
|
603,652
|
28.04.2021 15:55:42
| -10,800
|
c728ffed3ea85c2ba85c66a64af4bc74291b14c1
|
Add TL;DR section
Add a section that lists command required for running edo2net baking
services.
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -39,6 +39,7 @@ networks.\nTo install them, run the following commands:\n+<a name=\"ubuntu\"></a>\n#### On Ubuntu\n```\n# Add PPA with Tezos binaries\n@@ -48,6 +49,7 @@ sudo apt-get update\nsudo apt-get install tezos-baking\n```\n+<a name=\"pios\"></a>\n#### On Raspberry Pi OS\n```\n# Intall software properties commons\n@@ -194,7 +196,6 @@ To stop the baking instance run:\nsudo systemctl stop tezos-baking-<network>.service\n```\n-\n## Advanced baking instance setup\n### Using different data directories and node RPC address\n@@ -218,3 +219,26 @@ In case you want to use a different alias for the baking account:\nand [registering](#registration) the baker key.\n2. update the `BAKER_ADDRESS_ALIAS` by editing the\n`/etc/default/tezos-baking-<network>` file.\n+\n+## Running baking instance on edo2net\n+\n+TL;DR, in order to run a baking instance on edo2net you should do the following:\n+\n+1) Install `tezos-baking` package following either [Ubuntu](#ubuntu) or [RaspberryPi OS](#pios)\n+instructions.\n+\n+2) Run following commands:\n+```\n+snapshot_file=/tmp/tezos-edo2net.rolling\n+wget https://edo2net.xtz-shots.io/rolling -O \"$snapshot_file\"\n+sudo -u tezos tezos-node-edo2net snapshot import \"$snapshot_file\"\n+\n+sudo systemctl start tezos-node-edo2net\n+\n+sudo -u tezos tezos-client bootstrapped\n+sudo -u tezos tezos-client import secret key baker <secret-key>\n+sudo -u tezos tezos-client register key baker as delegate\n+\n+sudo systemctl start tezos-baking-edo2net\n+sudo systemctl enable tezos-baking-edo2net\n+```\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Add TL;DR section
Add a section that lists command required for running edo2net baking
services.
|
603,652
|
04.05.2021 10:41:09
| -10,800
|
7ffb16a3a58dd7c03858a522e08f287f533cbc2a
|
Update brew bottles hashes
Problem: Brew formulas have been updated to v9.1 and new bottles
are available, but their hashes are not in the formulas yet.
Solution: Update brew bottle hashes for updated formulas.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"698024b3eda8944248af407e8519e05ae015208bc46964cd3cc823d392f9869f\"\n+ sha256 cellar: :any, catalina: \"503a482b7c4d1c9fb83e610718e01d182705d9f0a8405bd68a5feaef648bb62f\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"b9906f66690c90af6dd716e8981cfed7c1da72904c44f2720bb4d28ec23f2de8\"\n+ sha256 cellar: :any, catalina: \"6c506d633967c3c5ad39deb483871e03f5218fad4508aab821546a5395f9a5b8\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, mojave: \"373c146b8989d8937154da0cca4c3cab51088ac5c3becf7a045e062a9aaaa370\"\n+ sha256 cellar: :any, catalina: \"28a92df0b2b152eb60b488dd3cc912dd96215eaa696eceb7b269041d63c93c1a\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"659c0b0a8fc58fcb8d652923d42efd092617a345f5df0eed7886c4128c996a7d\"\n+ sha256 cellar: :any, catalina: \"6cccd75d7d53af524d8f856eb9707f1a9cc8c262d0cd8e51ff2133912d712c04\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"8f317703aff2a8612c40dc1c224598486d964dbf57003b70c1c535dfc195325c\"\n+ sha256 cellar: :any, catalina: \"8825c66454aa26641e101dde3a505195182afd87b0d72831ed10dd5c7124ad5e\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, mojave: \"efcfb8e3215d35734fc6a58b19d2cf072487db6376d45c4eba3e07a1bed37039\"\n+ sha256 cellar: :any, catalina: \"a70f34680c071b48e6d308cb69324b4a88bfddc131324f405a8f508b5765af4b\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, mojave: \"7fcb15085a501af648391e1c798be78da54c66e5a2296ded80ff607fedca9987\"\n+ sha256 cellar: :any, catalina: \"4fb1cba11bc2adc04661dbc730ec1da4d774d4b5ff46473a77ca13cd0b752074\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser008Ptedo2zk < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser008Ptedo2zk.version}/\"\n+ sha256 cellar: :any, mojave: \"897ae817057dc3f7e66d80b6378ddc7b8becb99877e4064cf48ba7649d0d2ac2\"\n+ sha256 cellar: :any, catalina: \"2b42134dd6ec6a1dcfad27d9584cb3b82a8788c4a1171d88f630d80707cef04e\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"7ff3835a461aa9e59f5ca6f8b95cc5d62381d9186c38d7ddacc8c1c56d355899\"\n+ sha256 cellar: :any, catalina: \"05c1116010981dea5627e2418b03f1744d35ed896ce224b01aa23722b3a6662a\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, mojave: \"87086776cd387cddef59c641a3cfb8083536c66d8e4c1bae663cd42372a038d4\"\n+ sha256 cellar: :any, catalina: \"57cd589c9fce9583146926941c503c439d0303186f65f84ef9b8d09e16b24244\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n+ sha256 cellar: :any, mojave: \"1fbfa0a0157a18ba70ee04929d09ca99011afa47e0c518078fdc94cdc232f3bb\"\n+ sha256 cellar: :any, catalina: \"ddd3c83f729bce04cc151a7b8a1335cbf34189bb653ec535d70dc8d716ddb60b\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, mojave: \"00d7071d2fdc7054d33820c80321f06dc5700bebc4943582da9299d201f30c1a\"\n+ sha256 cellar: :any, catalina: \"f96b524272ff42621323e6fe02e29cb1b53bf8bdfe4e62998936951b2c0df17d\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Update brew bottles hashes
Problem: Brew formulas have been updated to v9.1 and new bottles
are available, but their hashes are not in the formulas yet.
Solution: Update brew bottle hashes for updated formulas.
|
603,652
|
04.05.2021 14:18:21
| -10,800
|
e820174c051fb1954d1ca287f73fb755967fd8b5
|
Build native packages in CI
Problem: v9.1 was released to the opam-repository, this means we can now
build native packages.
Solution: Enable native packages building in CI.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline.yml",
"new_path": ".buildkite/pipeline.yml",
"diff": "@@ -69,50 +69,50 @@ steps:\n- nix-build tests/tezos-binaries.nix --no-out-link --arg path-to-binaries ./docker\nbranches: \"!master\"\n-# - label: test deb source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 60\n-# agents:\n-# queue: \"docker\"\n-# - label: test deb binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n-# - label: test rpm source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os fedora --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 60\n-# agents:\n-# queue: \"docker\"\n-# - label: test rpm binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n+ - label: test deb source packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n+ artifact_paths:\n+ - ./out/*\n+ branches: \"!master\"\n+ timeout_in_minutes: 60\n+ agents:\n+ queue: \"docker\"\n+ - label: test deb binary packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ # Building all binary packages will take significant amount of time, so we build only one\n+ # in order to ensure package generation sanity\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n+ - rm -rf out\n+ # It takes much time to build binary package, so we do it only on master\n+ branches: \"master\"\n+ timeout_in_minutes: 90\n+ agents:\n+ queue: \"docker\"\n+ - label: test rpm source packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ - ./docker/docker-tezos-packages.sh --os fedora --type source\n+ artifact_paths:\n+ - ./out/*\n+ branches: \"!master\"\n+ timeout_in_minutes: 60\n+ agents:\n+ queue: \"docker\"\n+ - label: test rpm binary packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ # Building all binary packages will take significant amount of time, so we build only one\n+ # in order to ensure package generation sanity\n+ - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n+ - rm -rf out\n+ # It takes much time to build binary package, so we do it only on master\n+ branches: \"master\"\n+ timeout_in_minutes: 90\n+ agents:\n+ queue: \"docker\"\n- wait\n- label: create auto pre-release\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Build native packages in CI
Problem: v9.1 was released to the opam-repository, this means we can now
build native packages.
Solution: Enable native packages building in CI.
|
603,649
|
06.05.2021 11:32:36
| 14,400
|
5c3e001e24481f8f336ec0d45bdbc2f73895f2a3
|
update docs: improve tldr (quick start)
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -37,16 +37,13 @@ The most convenient way to orchestrate all these binaries is to use the `tezos-b\npackage, which provides predefined services for running baking instances on different\nnetworks.\n-To install them, run the following commands:\n+First, add package repository:\n<a name=\"ubuntu\"></a>\n#### On Ubuntu\n```\n# Add PPA with Tezos binaries\nsudo add-apt-repository ppa:serokell/tezos\n-sudo apt-get update\n-# Install packages\n-sudo apt-get install tezos-baking\n```\n<a name=\"pios\"></a>\n@@ -57,8 +54,12 @@ sudo apt-get install software-properties-common\n# Add PPA with Tezos binaries\nsudo add-apt-repository 'deb http://ppa.launchpad.net/serokell/tezos/ubuntu bionic main'\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 37B8819B7D0D183812DCA9A8CE5A4D8933AE7CBB\n+```\n+\n+Update and install packages:\n+\n+```\nsudo apt-get update\n-# Install packages\nsudo apt-get install tezos-baking\n```\n@@ -220,25 +221,96 @@ In case you want to use a different alias for the baking account:\n2. update the `BAKER_ADDRESS_ALIAS` by editing the\n`/etc/default/tezos-baking-<network>` file.\n-## Running baking instance on edo2net\n+## Quick Start\n-TL;DR, in order to run a baking instance on edo2net you should do the following:\n+<details>\n+ <summary>\n+ <em>Optional</em> Create new Ubuntu virtual machine...\n+ </summary>\n-1) Install `tezos-baking` package following either [Ubuntu](#ubuntu) or [RaspberryPi OS](#pios)\n-instructions.\n+A quick way to spin up a fresh Ubuntu virtual machine is\n+to use [Multipass](https://multipass.run/) (reduce disk if this is\n+to be used with a test network or a mainnet node in rolling history mode):\n-2) Run following commands:\n```\n-snapshot_file=/tmp/tezos-edo2net.rolling\n-wget https://edo2net.xtz-shots.io/rolling -O \"$snapshot_file\"\n-sudo -u tezos tezos-node-edo2net snapshot import \"$snapshot_file\"\n+multipass launch --cpus 2 --disk 100G --mem 4G --name tezos\n+```\n-sudo systemctl start tezos-node-edo2net\n+and then log in:\n-sudo -u tezos tezos-client bootstrapped\n-sudo -u tezos tezos-client import secret key baker <secret-key>\n+```\n+multipass shell tezos\n+```\n+\n+> Note that on Windows and MacOS this VM will not have access to USB and\n+> thus is not suitable for using with Ledger Nano S.\n+\n+</details>\n+\n+1) Install `tezos-baking` package following either [Ubuntu](#ubuntu)\n+or [RaspberryPi OS](#pios) instructions.\n+\n+2) Choose one of supported Tezos networks - `mainnet`, `florencenet` or\n+`edo2net` by setting environment variable:\n+\n+```\n+tznet=florencenet\n+```\n+\n+3) Initialize Tezos node from a snapshot and start node service:\n+\n+```\n+snapshot_file=/tmp/tezos-$tznet.rolling\n+snapshot_url=https://$tznet.xtz-shots.io/rolling\n+wget $snapshot_url -O $snapshot_file\n+sudo -u tezos tezos-node-$tznet snapshot import $snapshot_file\n+sudo systemctl start tezos-node-$tznet\n+```\n+\n+If all you want is to run Tezos node, enable the service and stop\n+here.\n+\n+```\n+sudo systemctl enable tezos-node-$tznet\n+```\n+\n+<details>\n+ <summary>\n+ <em>Optional</em> Allow RPC access from virtual machine's host...\n+ </summary>\n+\n+Update service configuration:\n+\n+```\n+sudo systemctl edit tezos-node-$tznet\n+```\n+\n+An editor will open with service override configuration,\n+Add the following:\n+\n+```\n+[Service]\n+Environment=\"NODE_RPC_ADDR=0.0.0.0:8732\"\n+```\n+\n+Save and close the editor, restart the service:\n+\n+```\n+sudo systemctl restart tezos-node-$tznet\n+```\n+\n+</details>\n+\n+4) Set up baking:\n+\n+```bash\n+secret_key=\"...\" #encrypted or plain secret key, ledger uri or remote signer URL\n+sudo -u tezos tezos-client import secret key baker $secret_key\n+sudo systemctl start tezos-baking-$tznet\n+sudo systemctl enable tezos-baking-$tznet\n+\n+#register your baker after node syncs with the network\n+sudo -u tezos tezos-client bootstrapped && \\\nsudo -u tezos tezos-client register key baker as delegate\n-sudo systemctl start tezos-baking-edo2net\n-sudo systemctl enable tezos-baking-edo2net\n```\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
update docs: improve tldr (quick start)
|
603,652
|
03.05.2021 15:30:58
| -10,800
|
9dff061f74c832866b6759f0a157811864603176
|
Provide ledger udev rules with Tezos.
Problem: Users have to manually install udev rules in case they want to
use Tezos binaries along with the ledger device.
Solution: Install udev rules during postinstallation stage of the
packages with Tezos binaries that may use ledger.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "LICENSES/LicenseRef-Apache-Ledger.txt",
"diff": "+ Apache License\n+ Version 2.0, January 2004\n+ http://www.apache.org/licenses/\n+\n+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n+\n+ 1. Definitions.\n+\n+ \"License\" shall mean the terms and conditions for use, reproduction,\n+ and distribution as defined by Sections 1 through 9 of this document.\n+\n+ \"Licensor\" shall mean the copyright owner or entity authorized by\n+ the copyright owner that is granting the License.\n+\n+ \"Legal Entity\" shall mean the union of the acting entity and all\n+ other entities that control, are controlled by, or are under common\n+ control with that entity. For the purposes of this definition,\n+ \"control\" means (i) the power, direct or indirect, to cause the\n+ direction or management of such entity, whether by contract or\n+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\n+ outstanding shares, or (iii) beneficial ownership of such entity.\n+\n+ \"You\" (or \"Your\") shall mean an individual or Legal Entity\n+ exercising permissions granted by this License.\n+\n+ \"Source\" form shall mean the preferred form for making modifications,\n+ including but not limited to software source code, documentation\n+ source, and configuration files.\n+\n+ \"Object\" form shall mean any form resulting from mechanical\n+ transformation or translation of a Source form, including but\n+ not limited to compiled object code, generated documentation,\n+ and conversions to other media types.\n+\n+ \"Work\" shall mean the work of authorship, whether in Source or\n+ Object form, made available under the License, as indicated by a\n+ copyright notice that is included in or attached to the work\n+ (an example is provided in the Appendix below).\n+\n+ \"Derivative Works\" shall mean any work, whether in Source or Object\n+ form, that is based on (or derived from) the Work and for which the\n+ editorial revisions, annotations, elaborations, or other modifications\n+ represent, as a whole, an original work of authorship. For the purposes\n+ of this License, Derivative Works shall not include works that remain\n+ separable from, or merely link (or bind by name) to the interfaces of,\n+ the Work and Derivative Works thereof.\n+\n+ \"Contribution\" shall mean any work of authorship, including\n+ the original version of the Work and any modifications or additions\n+ to that Work or Derivative Works thereof, that is intentionally\n+ submitted to Licensor for inclusion in the Work by the copyright owner\n+ or by an individual or Legal Entity authorized to submit on behalf of\n+ the copyright owner. For the purposes of this definition, \"submitted\"\n+ means any form of electronic, verbal, or written communication sent\n+ to the Licensor or its representatives, including but not limited to\n+ communication on electronic mailing lists, source code control systems,\n+ and issue tracking systems that are managed by, or on behalf of, the\n+ Licensor for the purpose of discussing and improving the Work, but\n+ excluding communication that is conspicuously marked or otherwise\n+ designated in writing by the copyright owner as \"Not a Contribution.\"\n+\n+ \"Contributor\" shall mean Licensor and any individual or Legal Entity\n+ on behalf of whom a Contribution has been received by Licensor and\n+ subsequently incorporated within the Work.\n+\n+ 2. Grant of Copyright License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ copyright license to reproduce, prepare Derivative Works of,\n+ publicly display, publicly perform, sublicense, and distribute the\n+ Work and such Derivative Works in Source or Object form.\n+\n+ 3. Grant of Patent License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ (except as stated in this section) patent license to make, have made,\n+ use, offer to sell, sell, import, and otherwise transfer the Work,\n+ where such license applies only to those patent claims licensable\n+ by such Contributor that are necessarily infringed by their\n+ Contribution(s) alone or by combination of their Contribution(s)\n+ with the Work to which such Contribution(s) was submitted. If You\n+ institute patent litigation against any entity (including a\n+ cross-claim or counterclaim in a lawsuit) alleging that the Work\n+ or a Contribution incorporated within the Work constitutes direct\n+ or contributory patent infringement, then any patent licenses\n+ granted to You under this License for that Work shall terminate\n+ as of the date such litigation is filed.\n+\n+ 4. Redistribution. You may reproduce and distribute copies of the\n+ Work or Derivative Works thereof in any medium, with or without\n+ modifications, and in Source or Object form, provided that You\n+ meet the following conditions:\n+\n+ (a) You must give any other recipients of the Work or\n+ Derivative Works a copy of this License; and\n+\n+ (b) You must cause any modified files to carry prominent notices\n+ stating that You changed the files; and\n+\n+ (c) You must retain, in the Source form of any Derivative Works\n+ that You distribute, all copyright, patent, trademark, and\n+ attribution notices from the Source form of the Work,\n+ excluding those notices that do not pertain to any part of\n+ the Derivative Works; and\n+\n+ (d) If the Work includes a \"NOTICE\" text file as part of its\n+ distribution, then any Derivative Works that You distribute must\n+ include a readable copy of the attribution notices contained\n+ within such NOTICE file, excluding those notices that do not\n+ pertain to any part of the Derivative Works, in at least one\n+ of the following places: within a NOTICE text file distributed\n+ as part of the Derivative Works; within the Source form or\n+ documentation, if provided along with the Derivative Works; or,\n+ within a display generated by the Derivative Works, if and\n+ wherever such third-party notices normally appear. The contents\n+ of the NOTICE file are for informational purposes only and\n+ do not modify the License. You may add Your own attribution\n+ notices within Derivative Works that You distribute, alongside\n+ or as an addendum to the NOTICE text from the Work, provided\n+ that such additional attribution notices cannot be construed\n+ as modifying the License.\n+\n+ You may add Your own copyright statement to Your modifications and\n+ may provide additional or different license terms and conditions\n+ for use, reproduction, or distribution of Your modifications, or\n+ for any such Derivative Works as a whole, provided Your use,\n+ reproduction, and distribution of the Work otherwise complies with\n+ the conditions stated in this License.\n+\n+ 5. Submission of Contributions. Unless You explicitly state otherwise,\n+ any Contribution intentionally submitted for inclusion in the Work\n+ by You to the Licensor shall be under the terms and conditions of\n+ this License, without any additional terms or conditions.\n+ Notwithstanding the above, nothing herein shall supersede or modify\n+ the terms of any separate license agreement you may have executed\n+ with Licensor regarding such Contributions.\n+\n+ 6. Trademarks. This License does not grant permission to use the trade\n+ names, trademarks, service marks, or product names of the Licensor,\n+ except as required for reasonable and customary use in describing the\n+ origin of the Work and reproducing the content of the NOTICE file.\n+\n+ 7. Disclaimer of Warranty. Unless required by applicable law or\n+ agreed to in writing, Licensor provides the Work (and each\n+ Contributor provides its Contributions) on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ implied, including, without limitation, any warranties or conditions\n+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n+ PARTICULAR PURPOSE. You are solely responsible for determining the\n+ appropriateness of using or redistributing the Work and assume any\n+ risks associated with Your exercise of permissions under this License.\n+\n+ 8. Limitation of Liability. In no event and under no legal theory,\n+ whether in tort (including negligence), contract, or otherwise,\n+ unless required by applicable law (such as deliberate and grossly\n+ negligent acts) or agreed to in writing, shall any Contributor be\n+ liable to You for damages, including any direct, indirect, special,\n+ incidental, or consequential damages of any character arising as a\n+ result of this License or out of the use or inability to use the\n+ Work (including but not limited to damages for loss of goodwill,\n+ work stoppage, computer failure or malfunction, or any and all\n+ other commercial damages or losses), even if such Contributor\n+ has been advised of the possibility of such damages.\n+\n+ 9. Accepting Warranty or Additional Liability. While redistributing\n+ the Work or Derivative Works thereof, You may choose to offer,\n+ and charge a fee for, acceptance of support, warranty, indemnity,\n+ or other liability obligations and/or rights consistent with this\n+ License. However, in accepting such obligations, You may act only\n+ on Your own behalf and on Your sole responsibility, not on behalf\n+ of any other Contributor, and only if You agree to indemnify,\n+ defend, and hold each Contributor harmless for any liability\n+ incurred by, or claims asserted against, such Contributor by reason\n+ of your accepting any such warranty or additional liability.\n+\n+ END OF TERMS AND CONDITIONS\n+\n+ APPENDIX: How to apply the Apache License to your work.\n+\n+ To apply the Apache License to your work, attach the following\n+ boilerplate notice, with the fields enclosed by brackets \"[]\"\n+ replaced with your own identifying information. (Don't include\n+ the brackets!) The text should be enclosed in the appropriate\n+ comment syntax for the file format. We also recommend that a\n+ file or class name and description of purpose be included on the\n+ same \"printed page\" as the copyright notice for easier\n+ identification within third-party archives.\n+\n+ Copyright [yyyy] [name of copyright owner]\n+\n+ Licensed under the Apache License, Version 2.0 (the \"License\");\n+ you may not use this file except in compliance with the License.\n+ You may obtain a copy of the License at\n+\n+ http://www.apache.org/licenses/LICENSE-2.0\n+\n+ Unless required by applicable law or agreed to in writing, software\n+ distributed under the License is distributed on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ See the License for the specific language governing permissions and\n+ limitations under the License.\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -63,18 +63,22 @@ signer_units = [\nconfig_file=\"tezos-signer.conf\")\n]\n+ledger_udev_postinst = open(f\"{os.path.dirname( __file__)}/scripts/udev-rules\", 'r').read()\n+\npackages = [\nOpamBasedPackage(\"tezos-client\",\n\"CLI client for interacting with tezos blockchain\",\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n- requires_sapling_params=True),\n+ requires_sapling_params=True,\n+ postinst_steps=ledger_udev_postinst),\nOpamBasedPackage(\"tezos-admin-client\",\n\"Administration tool for the node\",\noptional_opam_deps=[\"tls\"]),\nOpamBasedPackage(\"tezos-signer\",\n\"A client to remotely sign operations or blocks\",\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n- systemd_units=signer_units),\n+ systemd_units=signer_units,\n+ postinst_steps=ledger_udev_postinst),\nOpamBasedPackage(\"tezos-codec\",\n\"A client to decode and encode JSON\")\n]\n@@ -237,7 +241,8 @@ for proto in active_protocols:\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\nrequires_sapling_params=True,\npostinst_steps= \\\n- daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-baker-{proto}\"),\n+ daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-baker-{proto}\") \\\n+ + ledger_udev_postinst,\npostrm_steps=gen_daemon_specific_postrm(f\"tezos-baker-{proto}\")))\npackages.append(OpamBasedPackage(f\"tezos-accuser-{proto}\", \"Daemon for accusing\",\n[SystemdUnit(service_file=service_file_accuser,\n@@ -251,7 +256,8 @@ for proto in active_protocols:\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\npostinst_steps= \\\n- daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-accuser-{proto}\"),\n+ daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-accuser-{proto}\") \\\n+ + ledger_udev_postinst,\npostrm_steps=gen_daemon_specific_postrm(f\"tezos-accuser-{proto}\")))\npackages.append(OpamBasedPackage(f\"tezos-endorser-{proto}\", \"Daemon for endorsing\",\n[SystemdUnit(service_file=service_file_endorser,\n@@ -265,7 +271,8 @@ for proto in active_protocols:\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\npostinst_steps= \\\n- daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-endorser-{proto}\"),\n+ daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-endorser-{proto}\") \\\n+ + ledger_udev_postinst,\npostrm_steps=gen_daemon_specific_postrm(f\"tezos-endorser-{proto}\")))\npackages.append(TezosSaplingParamsPackage())\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/scripts/udev-rules",
"diff": "+# SPDX-FileCopyrightText: 2018-2021 Ledger <https://www.ledger.com>\n+#\n+# SPDX-License-Identifier: LicenseRef-Apache-Ledger\n+\n+# This snippet is based on https://github.com/LedgerHQ/udev-rules/blob/master/add_udev_rules.sh with the changes\n+# that are fixing https://github.com/LedgerHQ/udev-rules/issues/5, so that provided rules work on the Raspberry Pi OS\n+# Ubuntu 18.04\n+cat <<EOF > /etc/udev/rules.d/20-hw1.rules\n+# HW.1 / Nano\n+SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"2581\", ATTRS{idProduct}==\"1b7c|2b7c|3b7c|4b7c\", TAG+=\"uaccess\", TAG+=\"udev-acl\", MODE=\"0660\", GROUP=\"plugdev\"\n+# Blue\n+SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"2c97\", ATTRS{idProduct}==\"0000|0000|0001|0002|0003|0004|0005|0006|0007|0008|0009|000a|000b|000c|000d|000e|000f|0010|0011|0012|0013|0014|0015|0016|0017|0018|0019|001a|001b|001c|001d|001e|001f\", TAG+=\"uaccess\", TAG+=\"udev-acl\", MODE=\"0660\", GROUP=\"plugdev\"\n+# Nano S\n+SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"2c97\", ATTRS{idProduct}==\"0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f\", TAG+=\"uaccess\", TAG+=\"udev-acl\", MODE=\"0660\", GROUP=\"plugdev\"\n+# Aramis\n+SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"2c97\", ATTRS{idProduct}==\"0002|2000|2001|2002|2003|2004|2005|2006|2007|2008|2009|200a|200b|200c|200d|200e|200f|2010|2011|2012|2013|2014|2015|2016|2017|2018|2019|201a|201b|201c|201d|201e|201f\", TAG+=\"uaccess\", TAG+=\"udev-acl\", MODE=\"0660\", GROUP=\"plugdev\"\n+# HW2\n+SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"2c97\", ATTRS{idProduct}==\"0003|3000|3001|3002|3003|3004|3005|3006|3007|3008|3009|300a|300b|300c|300d|300e|300f|3010|3011|3012|3013|3014|3015|3016|3017|3018|3019|301a|301b|301c|301d|301e|301f\", TAG+=\"uaccess\", TAG+=\"udev-acl\", MODE=\"0660\", GROUP=\"plugdev\"\n+# Nano X\n+SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"2c97\", ATTRS{idProduct}==\"0004|4000|4001|4002|4003|4004|4005|4006|4007|4008|4009|400a|400b|400c|400d|400e|400f|4010|4011|4012|4013|4014|4015|4016|4017|4018|4019|401a|401b|401c|401d|401e|401f\", TAG+=\"uaccess\", TAG+=\"udev-acl\". MODE=\"0660\", GROUP=\"plugdev\"\n+EOF\n+\n+udevadm trigger\n+udevadm control --reload-rules\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#180] Provide ledger udev rules with Tezos.
Problem: Users have to manually install udev rules in case they want to
use Tezos binaries along with the ledger device.
Solution: Install udev rules during postinstallation stage of the
packages with Tezos binaries that may use ledger.
|
603,652
|
03.05.2021 15:55:51
| -10,800
|
011bd0dc4e2880e211c7faad1ea64df0ef7d3dbc
|
Fix postinst generation for Fedora
Problem: Post-installation are generated only for packages that have
some systemd units.
Solution: Generate post-installation steps for all packages disregarding
the existing of systemd units.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -235,14 +235,8 @@ Description: {self.desc}\nconfig_files = list(filter(lambda x: x is not None, map(lambda x: x.config_file,\nself.systemd_units)))\nrequires = \" \".join(run_deps)\n- if len(self.systemd_units) > 0:\nsystemd_deps, systemd_install, systemd_files, systemd_macros = \\\ngen_spec_systemd_part(self)\n- else:\n- systemd_deps = \"\"\n- systemd_install = \"\"\n- systemd_files = \"\"\n- systemd_macros = \"\"\nfile_contents = f'''\n%define debug_package %{{nil}}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#180] Fix postinst generation for Fedora
Problem: Post-installation are generated only for packages that have
some systemd units.
Solution: Generate post-installation steps for all packages disregarding
the existing of systemd units.
|
603,652
|
22.04.2021 10:01:02
| -10,800
|
2eb0057f6ab5dfc0ca55b4ba995dce601bd423b6
|
Support password-protected keys
Problem: Existing systemd services doesn't work with password-protected
keys.
Solution: Support them using systemd-ask-password.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -9,19 +9,24 @@ from typing import List, Dict\n# There are more possible fields, but only these are used by tezos services\nclass Service:\ndef __init__(self, exec_start: str, state_directory:str, user: str,\n- exec_start_pre: str=None, timeout_start_sec: str=None,\n- environment_file: str=None, environment: List[str]=[],\n- remain_after_exit: bool=False, type_: str=None, restart: str=None):\n+ exec_start_pre: str=None, exec_start_post: str=None,\n+ exec_stop_post: str=None,\n+ timeout_start_sec: str=None, environment_file: str=None, environment: List[str]=[],\n+ remain_after_exit: bool=False, type_: str=None, restart: str=None,\n+ keyring_mode: str=None):\nself.environment_file = environment_file\nself.environment = environment\nself.exec_start = exec_start\nself.exec_start_pre = exec_start_pre\n+ self.exec_start_post = exec_start_post\n+ self.exec_stop_post = exec_stop_post\nself.timeout_start_sec = timeout_start_sec\nself.state_directory = state_directory\nself.user = user\nself.remain_after_exit = remain_after_exit\nself.type_ = type_\nself.restart = restart\n+ self.keyring_mode = keyring_mode\nclass Unit:\ndef __init__(self, after: List[str], description: str, requires: List[str]=[],\n@@ -441,6 +446,15 @@ def print_service_file(service_file: ServiceFile, out):\nenvironment = \"\".join(map(lambda x: f\"Environment=\\\"{x}\\\"\\n\", service_file.service.environment))\nenvironment_file = \"\" if service_file.service.environment_file is None else f\"EnvironmentFile={service_file.service.environment_file}\"\nwanted_by = \"\".join(map(lambda x: f\"WantedBy=\\\"{x}\\\"\\n\", service_file.install.wanted_by))\n+ exec_start_pres = \\\n+ \"\\n\".join(f\"ExecStartPre={x}\" for x in service_file.service.exec_start_pre) \\\n+ if service_file.service.exec_start_pre is not None else \"\"\n+ exec_start_posts = \\\n+ \"\\n\".join(f\"ExecStartPost={x}\" for x in service_file.service.exec_start_post) \\\n+ if service_file.service.exec_start_post is not None else \"\"\n+ exec_stop_posts = \\\n+ \"\\n\".join(f\"ExecStopPost={x}\" for x in service_file.service.exec_stop_post) \\\n+ if service_file.service.exec_stop_post is not None else \"\"\nfile_contents = f'''# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n#\n# SPDX-License-Identifier: LicenseRef-MIT-TQ\n@@ -449,15 +463,18 @@ def print_service_file(service_file: ServiceFile, out):\n[Service]\n{environment_file}\n{environment}\n-{f\"ExecStartPre={service_file.service.exec_start_pre}\" if service_file.service.exec_start_pre is not None else \"\"}\n+{exec_start_pres}\n{f\"TimeoutStartSec={service_file.service.timeout_start_sec}\" if service_file.service.timeout_start_sec is not None else \"\"}\nExecStart={service_file.service.exec_start}\n+{exec_start_posts}\n+{exec_stop_posts}\nStateDirectory={service_file.service.state_directory}\nUser={service_file.service.user}\nGroup={service_file.service.user}\n{\"RemainAfterExit=yes\" if service_file.service.remain_after_exit else \"\"}\n{f\"Type={service_file.service.type_}\" if service_file.service.type_ is not None else \"\"}\n{f\"Restart={service_file.service.restart}\" if service_file.service.restart is not None else \"\"}\n+{f\"KeyringMode={service_file.service.keyring_mode}\" if service_file.service.keyring_mode is not None else \"\"}\n[Install]\n{wanted_by}\n'''\n@@ -481,14 +498,17 @@ class TezosBakingServicesPackage(AbstractPackage):\nservice_file=ServiceFile(\nUnit(after=[\"network.target\"],\ndescription=f\"Tezos baking instance for {network}\"),\n- Service(exec_start=\"true\", user=\"tezos\", state_directory=\"tezos\",\n+ Service(exec_start=\"/usr/bin/tezos-baking-start\", user=\"tezos\", state_directory=\"tezos\",\nenvironment_file=f\"/etc/default/tezos-baking-{network}\",\n- exec_start_pre=\"/usr/bin/tezos-baking-prestart\",\n- remain_after_exit=True, type_=\"oneshot\"),\n+ exec_start_pre=[\"+/usr/bin/setfacl -m u:tezos:rwx /run/systemd/ask-password\",\n+ \"/usr/bin/tezos-baking-prestart\"],\n+ exec_stop_post=[\"+/usr/bin/setfacl -x u:tezos /run/systemd/ask-password\"],\n+ remain_after_exit=True, type_=\"oneshot\", keyring_mode=\"shared\"),\nInstall(wanted_by=[\"multi-user.target\"])\n),\nsuffix=network,\nconfig_file=\"tezos-baking.conf\",\n+ startup_script=\"tezos-baking-start\",\nprestart_script=\"tezos-baking-prestart\"\n)\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -94,7 +94,7 @@ def mk_node_unit(suffix, env, desc):\npart_of=[f\"tezos-baking-{suffix}.service\"]),\nService(environment=env,\nexec_start=\"/usr/bin/tezos-node-start\",\n- exec_start_pre=\"/usr/bin/tezos-node-prestart\",\n+ exec_start_pre=[\"/usr/bin/tezos-node-prestart\"],\ntimeout_start_sec=\"450s\",\nstate_directory=\"tezos\", user=\"tezos\"\n),\n@@ -181,8 +181,11 @@ for proto in active_protocols:\ndescription=\"Tezos baker\"),\nService(environment_file=f\"/etc/default/tezos-baker-{proto}\",\nenvironment=[f\"PROTOCOL={proto}\", \"NODE_DATA_DIR=\"],\n+ exec_start_pre=[\"+/usr/bin/setfacl -m u:tezos:rwx /run/systemd/ask-password\"],\nexec_start=baker_startup_script,\n- state_directory=\"tezos\", user=\"tezos\"),\n+ exec_stop_post=[\"+/usr/bin/setfacl -x u:tezos /run/systemd/ask-password\"],\n+ state_directory=\"tezos\", user=\"tezos\", type_=\"forking\",\n+ keyring_mode=\"shared\"),\nInstall(wanted_by=[\"multi-user.target\"]))\nservice_file_baker_instantiated = \\\nServiceFile(Unit(after=[\"network.target\", \"tezos-node-%i.service\", \"tezos-baking-%i.service\"],\n@@ -192,7 +195,8 @@ for proto in active_protocols:\nService(environment_file=\"/etc/default/tezos-baking-%i\",\nenvironment=[f\"PROTOCOL={proto}\", \"NODE_DATA_DIR=/var/lib/tezos/node-%i\"],\nexec_start=baker_startup_script,\n- state_directory=\"tezos\", user=\"tezos\", restart=\"on-failure\"),\n+ state_directory=\"tezos\", user=\"tezos\", restart=\"on-failure\",\n+ type_=\"forking\", keyring_mode=\"shared\"),\nInstall(wanted_by=[\"multi-user.target\", \"tezos-baking-%i.service\"]))\nservice_file_accuser = ServiceFile(Unit(after=[\"network.target\"],\ndescription=\"Tezos accuser\"),\n@@ -215,8 +219,11 @@ for proto in active_protocols:\ndescription=\"Tezos endorser\"),\nService(environment_file=f\"/etc/default/tezos-endorser-{proto}\",\nenvironment=[f\"PROTOCOL={proto}\"],\n+ exec_start_pre=[\"+/usr/bin/setfacl -m u:tezos:rwx /run/systemd/ask-password\"],\nexec_start=endorser_startup_script,\n- state_directory=\"tezos\", user=\"tezos\"),\n+ exec_stop_post=[\"+/usr/bin/setfacl -x u:tezos /run/systemd/ask-password\"],\n+ state_directory=\"tezos\", user=\"tezos\", type_=\"forking\",\n+ keyring_mode=\"shared\"),\nInstall(wanted_by=[\"multi-user.target\"]))\nservice_file_endorser_instantiated = \\\nServiceFile(Unit(after=[\"network.target\", \"tezos-node-%i.service\", \"tezos-baking-%i.service\"],\n@@ -226,7 +233,8 @@ for proto in active_protocols:\nService(environment_file=\"/etc/default/tezos-baking-%i\",\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=endorser_startup_script,\n- state_directory=\"tezos\", user=\"tezos\", restart=\"on-failure\"),\n+ state_directory=\"tezos\", user=\"tezos\", restart=\"on-failure\",\n+ type_=\"forking\", keyring_mode=\"shared\"),\nInstall(wanted_by=[\"multi-user.target\", \"tezos-baking-%i.service\"]))\npackages.append(OpamBasedPackage(f\"tezos-baker-{proto}\", \"Daemon for baking\",\n[SystemdUnit(service_file=service_file_baker,\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-baker-start",
"new_path": "docker/package/scripts/tezos-baker-start",
"diff": "@@ -8,6 +8,7 @@ set -euo pipefail\n# $PROTOCOL should be defined in the system unit environment\nbaker=\"/usr/bin/tezos-baker-$PROTOCOL\"\n+tezos_client=\"/usr/bin/tezos-client\"\nbaker_dir=\"$DATA_DIR\"\n@@ -25,9 +26,18 @@ else\nfi\nlaunch_baker() {\n- exec \"$baker\" \\\n- --base-dir \"$baker_dir\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- run with local node \"$NODE_DATA_DIR\" \"$@\"\n+ if [[ -n ${1-} ]]; then\n+ key_type=\"$(\"$tezos_client\" show address \"$BAKER_ADDRESS_ALIAS\" -S | grep \"Secret Key:\" | cut -d':' -f2-2 | xargs)\"\n+ fi\n+ if [[ ${key_type:-} == \"encrypted\" ]]; then\n+ password=\"$(systemd-ask-password --keyname=\"tezos-$BAKER_ADDRESS_ALIAS\" --accept-cached \\\n+ \"Enter password for $BAKER_ADDRESS_ALIAS key:\")\"\n+ \"$baker\" --base-dir \"$baker_dir\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run with local node \"$NODE_DATA_DIR\" \"$@\" <<< \"$password\" &\n+ else\n+ \"$baker\" --base-dir \"$baker_dir\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run with local node \"$NODE_DATA_DIR\" \"$@\" &\n+ fi\n}\nif [[ -z \"$BAKER_ADDRESS_ALIAS\" ]]; then\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/scripts/tezos-baking-start",
"diff": "+#!/usr/bin/env bash\n+\n+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+set -euo pipefail\n+\n+tezos_client=\"/usr/bin/tezos-client\"\n+\n+key_type=\"$(\"$tezos_client\" show address \"$BAKER_ADDRESS_ALIAS\" -S | grep \"Secret Key:\" | cut -d':' -f2-2 | xargs)\"\n+\n+if [[ $key_type == \"encrypted\" ]]; then\n+ systemd-ask-password --keyname=\"tezos-$BAKER_ADDRESS_ALIAS\" --no-output \\\n+ \"Enter password for $BAKER_ADDRESS_ALIAS key:\"\n+fi\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-endorser-start",
"new_path": "docker/package/scripts/tezos-endorser-start",
"diff": "@@ -8,6 +8,7 @@ set -euo pipefail\n# $PROTOCOL should be defined in the system unit environment\nendorser=\"/usr/bin/tezos-endorser-$PROTOCOL\"\n+tezos_client=\"/usr/bin/tezos-client\"\nendorser_dir=\"$DATA_DIR\"\n@@ -25,9 +26,19 @@ else\nfi\nlaunch_endorser() {\n- exec \"$endorser\" --base-dir \"$endorser_dir\" \\\n+ if [[ -n ${1-} ]]; then\n+ key_type=\"$(\"$tezos_client\" show address \"$BAKER_ADDRESS_ALIAS\" -S | grep \"Secret Key:\" | cut -d':' -f2-2 | xargs)\"\n+ fi\n+ if [[ ${key_type:-} == \"encrypted\" ]]; then\n+ password=\"$(systemd-ask-password --keyname=\"tezos-$BAKER_ADDRESS_ALIAS\" --accept-cached \\\n+ \"Enter password for $BAKER_ADDRESS_ALIAS key:\")\"\n+ \"$endorser\" --base-dir \"$endorser_dir\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run \"$@\" <<< \"$password\" &\n+ else\n+ \"$endorser\" --base-dir \"$endorser_dir\" \\\n--endpoint \"$NODE_RPC_ENDPOINT\" \\\n- run \"$@\"\n+ run \"$@\" &\n+ fi\n}\nif [[ -z \"$BAKER_ADDRESS_ALIAS\" ]]; then\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#176] Support password-protected keys
Problem: Existing systemd services doesn't work with password-protected
keys.
Solution: Support them using systemd-ask-password.
|
603,652
|
04.05.2021 11:00:04
| -10,800
|
b0a7e4def265fb4ec865bba30b896c5d20c16366
|
Add 'acl' to runtime dependencies
Problem: 'setfacl' and 'getfacl' aren't presented by default, they're
provided by the 'acl' packages.
Solution: Use this package as a runtime dependency for 'tezos-baking',
'tezos-baker-<proto>' and 'tezos-endorser-<proto>' packages.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -198,15 +198,16 @@ override_dh_systemd_start:\nclass OpamBasedPackage(AbstractPackage):\ndef __init__(self, name: str, desc: str, systemd_units: List[SystemdUnit]=[],\ntarget_proto: str=None, optional_opam_deps: List[str]=[],\n- requires_sapling_params: bool=False, postinst_steps: str=\"\", postrm_steps: str=\"\"):\n+ postinst_steps: str=\"\", postrm_steps: str=\"\",\n+ additional_native_deps: List[str]=[]):\nself.name = name\nself.desc = desc\nself.systemd_units = systemd_units\nself.target_proto = target_proto\nself.optional_opam_deps = optional_opam_deps\n- self.requires_sapling_params = requires_sapling_params\nself.postinst_steps = postinst_steps\nself.postrm_steps = postrm_steps\n+ self.additional_native_deps = additional_native_deps\ndef fetch_sources(self, out_dir):\nopam_package = \"tezos-client\" if self.name == \"tezos-admin-client\" else self.name\n@@ -218,6 +219,7 @@ class OpamBasedPackage(AbstractPackage):\ndef gen_control_file(self, deps, out):\nstr_build_deps = \", \".join(deps)\n+ str_additional_native_deps = \", \".join(self.additional_native_deps)\nfile_contents = f'''\nSource: {self.name.lower()}\nSection: utils\n@@ -229,7 +231,7 @@ Homepage: https://gitlab.com/tezos/tezos/\nPackage: {self.name.lower()}\nArchitecture: amd64 arm64\n-Depends: ${{shlibs:Depends}}, ${{misc:Depends}}, {\"tezos-sapling-params\" if self.requires_sapling_params else \"\"}\n+Depends: ${{shlibs:Depends}}, ${{misc:Depends}}, {str_additional_native_deps}\nDescription: {self.desc}\n'''\nwith open(out, 'w') as f:\n@@ -240,6 +242,7 @@ Description: {self.desc}\nconfig_files = list(filter(lambda x: x is not None, map(lambda x: x.config_file,\nself.systemd_units)))\nrequires = \" \".join(run_deps)\n+ str_additional_native_deps = \", \".join(self.additional_native_deps)\nsystemd_deps, systemd_install, systemd_files, systemd_macros = \\\ngen_spec_systemd_part(self)\n@@ -255,7 +258,7 @@ BuildArch: x86_64 aarch64\nSource0: {self.name}-{version}.tar.gz\nSource1: https://gitlab.com/tezos/tezos/tree/v{version}/\nBuildRequires: {build_requires} {systemd_deps}\n-Requires: {requires}, {\"tezos-sapling-params\" if self.requires_sapling_params else \"\"}\n+Requires: {requires}, {str_additional_native_deps}\n%description\n{self.desc}\nMaintainer: {meta['maintainer']}\n@@ -518,7 +521,7 @@ class TezosBakingServicesPackage(AbstractPackage):\nos.makedirs(out_dir)\ndef gen_control_file(self, deps, out):\n- run_deps = \", \".join([\"tezos-client\", \"tezos-node\"] + \\\n+ run_deps = \", \".join([\"acl\", \"tezos-client\", \"tezos-node\"] + \\\nsum([[f\"tezos-{daemon}-{proto.lower()}\" for daemon in [\"baker\", \"endorser\"]] for proto in self.target_protos],\n[]))\nfile_contents = f'''\n@@ -539,7 +542,7 @@ Description: {self.desc}\nf.write(file_contents)\ndef gen_spec_file(self, build_deps, run_deps, out):\n- run_deps = \", \".join([\"tezos-client\", \"tezos-node\"] + \\\n+ run_deps = \", \".join([\"acl\", \"tezos-client\", \"tezos-node\"] + \\\nsum([[f\"tezos-{daemon}-{proto}\" for daemon in [\"baker\", \"endorser\"]] for proto in self.target_protos],\n[]))\nsystemd_deps, systemd_install, systemd_files, systemd_macros = \\\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -69,7 +69,7 @@ packages = [\nOpamBasedPackage(\"tezos-client\",\n\"CLI client for interacting with tezos blockchain\",\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n- requires_sapling_params=True,\n+ additional_native_deps=[\"tezos-sapling-params\"],\npostinst_steps=ledger_udev_postinst),\nOpamBasedPackage(\"tezos-admin-client\",\n\"Administration tool for the node\",\n@@ -143,9 +143,9 @@ packages.append(OpamBasedPackage(\"tezos-node\",\n\"tezos-embedded-protocol-005-PsBABY5H\",\n\"tezos-embedded-protocol-005-PsBabyM1\",\n\"tezos-embedded-protocol-006-PsCARTHA\"],\n- requires_sapling_params=True,\npostinst_steps=node_postinst_steps,\n- postrm_steps=node_postrm_steps))\n+ postrm_steps=node_postrm_steps,\n+ additional_native_deps=[\"tezos-sapling-params\"]))\nactive_protocols = json.load(open(f\"{os.path.dirname( __file__)}/../../protocols.json\", \"r\"))[\"active\"]\n@@ -247,11 +247,11 @@ for proto in active_protocols:\ninstances=daemons_instances)],\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n- requires_sapling_params=True,\npostinst_steps= \\\ndaemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-baker-{proto}\") \\\n+ ledger_udev_postinst,\n- postrm_steps=gen_daemon_specific_postrm(f\"tezos-baker-{proto}\")))\n+ postrm_steps=gen_daemon_specific_postrm(f\"tezos-baker-{proto}\"),\n+ additional_native_deps=[\"tezos-sapling-params\", \"acl\"]))\npackages.append(OpamBasedPackage(f\"tezos-accuser-{proto}\", \"Daemon for accusing\",\n[SystemdUnit(service_file=service_file_accuser,\nstartup_script=accuser_startup_script.split('/')[-1],\n@@ -281,7 +281,8 @@ for proto in active_protocols:\npostinst_steps= \\\ndaemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-endorser-{proto}\") \\\n+ ledger_udev_postinst,\n- postrm_steps=gen_daemon_specific_postrm(f\"tezos-endorser-{proto}\")))\n+ postrm_steps=gen_daemon_specific_postrm(f\"tezos-endorser-{proto}\"),\n+ additional_native_deps=[\"acl\"]))\npackages.append(TezosSaplingParamsPackage())\npackages.append(TezosBakingServicesPackage(\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#176] Add 'acl' to runtime dependencies
Problem: 'setfacl' and 'getfacl' aren't presented by default, they're
provided by the 'acl' packages.
Solution: Use this package as a runtime dependency for 'tezos-baking',
'tezos-baker-<proto>' and 'tezos-endorser-<proto>' packages.
|
603,652
|
04.05.2021 14:13:14
| -10,800
|
d548c59f984ac2d9f4da440c2f5e4aad97dfea89
|
Add tezos-client to baker and endorser deps
Problem: 'tezos-client' is used in the startup script for systemd
services in the baker and endorser packages. However, these packages
don't directly depend on 'tezos-client', thus scripts may unexpectedly
fail.
Solution: Add 'tezos-client' to runtime dependencies of the baker and
endorser packages.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -251,7 +251,7 @@ for proto in active_protocols:\ndaemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-baker-{proto}\") \\\n+ ledger_udev_postinst,\npostrm_steps=gen_daemon_specific_postrm(f\"tezos-baker-{proto}\"),\n- additional_native_deps=[\"tezos-sapling-params\", \"acl\"]))\n+ additional_native_deps=[\"tezos-sapling-params\", \"tezos-client\", \"acl\"]))\npackages.append(OpamBasedPackage(f\"tezos-accuser-{proto}\", \"Daemon for accusing\",\n[SystemdUnit(service_file=service_file_accuser,\nstartup_script=accuser_startup_script.split('/')[-1],\n@@ -282,7 +282,7 @@ for proto in active_protocols:\ndaemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-endorser-{proto}\") \\\n+ ledger_udev_postinst,\npostrm_steps=gen_daemon_specific_postrm(f\"tezos-endorser-{proto}\"),\n- additional_native_deps=[\"acl\"]))\n+ additional_native_deps=[\"tezos-client\", \"acl\"]))\npackages.append(TezosSaplingParamsPackage())\npackages.append(TezosBakingServicesPackage(\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#175] Add tezos-client to baker and endorser deps
Problem: 'tezos-client' is used in the startup script for systemd
services in the baker and endorser packages. However, these packages
don't directly depend on 'tezos-client', thus scripts may unexpectedly
fail.
Solution: Add 'tezos-client' to runtime dependencies of the baker and
endorser packages.
|
603,649
|
07.05.2021 12:07:55
| 14,400
|
81f6bbd20150de71e603acc11bd65dbe5d68b920
|
Update docs/baking.md
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -267,8 +267,7 @@ sudo -u tezos tezos-node-$tznet snapshot import $snapshot_file\nsudo systemctl start tezos-node-$tznet\n```\n-If all you want is to run Tezos node, enable the service and stop\n-here.\n+If all you want is to run the Tezos node, enable the service and stop here:\n```\nsudo systemctl enable tezos-node-$tznet\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Update docs/baking.md
Co-authored-by: Pinto Pasquale <pasqu4le@users.noreply.github.com>
|
603,649
|
07.05.2021 12:35:30
| 14,400
|
11423ca0caa190a79f138a575cc72299ed086911
|
tweak headers in installation section
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -37,26 +37,26 @@ The most convenient way to orchestrate all these binaries is to use the `tezos-b\npackage, which provides predefined services for running baking instances on different\nnetworks.\n-First, add package repository:\n+#### Add the package repository\n+\n+On Ubuntu:\n-<a name=\"ubuntu\"></a>\n-#### On Ubuntu\n```\n# Add PPA with Tezos binaries\nsudo add-apt-repository ppa:serokell/tezos\n```\n-<a name=\"pios\"></a>\n-#### On Raspberry Pi OS\n+On Raspberry Pi OS:\n+\n```\n-# Intall software properties commons\n+# Install software properties commons\nsudo apt-get install software-properties-common\n# Add PPA with Tezos binaries\nsudo add-apt-repository 'deb http://ppa.launchpad.net/serokell/tezos/ubuntu bionic main'\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 37B8819B7D0D183812DCA9A8CE5A4D8933AE7CBB\n```\n-Update and install packages:\n+#### Install packages\n```\nsudo apt-get update\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
tweak headers in installation section
|
603,652
|
10.05.2021 12:51:33
| -10,800
|
3e79ff4316cc017e2ef2e86bd01e861410e3f948
|
Don't use WantedBy
Problem: WantedBy rule requires services to be enable in order to take
effect. Enabling also makes services start on system start-up, which is
quite unpleasant.
Solution: Don't use WantedBy and don't enable services in the
post-installation stage. Use Requires rule in the baking services to list
dependencies instead.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -113,7 +113,6 @@ def gen_spec_systemd_part(package):\npackage.systemd_units)))\ninstall_unit_files = \"\"\nsystemd_unit_files = \"\"\n- enable_units = \"\"\nsystemd_units_post = \"\"\nsystemd_units_preun = \"\"\nsystemd_units_postun = \"\"\n@@ -131,8 +130,6 @@ def gen_spec_systemd_part(package):\nservice_name = f\"{service_name}@\"\ninstall_unit_files += f\"install -m 644 {service_name}.service %{{buildroot}}/%{{_unitdir}}\\n\"\nsystemd_unit_files += f\"%{{_unitdir}}/{service_name}.service\\n\"\n- if len(systemd_unit.instances) == 0:\n- enable_units += f\"systemctl enable {service_name}.service\\n\"\nsystemd_units_post += f\"%systemd_post {service_name}.service\\n\"\nsystemd_units_preun += f\"%systemd_preun {service_name}.service\\n\"\nsystemd_units_postun += f\"%systemd_postun_with_restart {service_name}.service\\n\"\n@@ -161,7 +158,6 @@ mkdir -p %{{buildroot}}/%{{_unitdir}}\nsystemd_macros= f'''\n%post\n{systemd_units_post}\n-{enable_units}\n{package.postinst_steps}\n%preun\n@@ -496,10 +492,14 @@ class TezosBakingServicesPackage(AbstractPackage):\nself.target_protos.add(proto)\nself.systemd_units = []\nfor network in target_networks:\n+ requires = [f\"tezos-node-{network}.service\"]\n+ for proto in network_protos[network]:\n+ requires.append(f\"tezos-baker-{proto.lower()}@{network}.service\")\n+ requires.append(f\"tezos-endorser-{proto.lower()}@{network}.service\")\nself.systemd_units.append(\nSystemdUnit(\nservice_file=ServiceFile(\n- Unit(after=[\"network.target\"],\n+ Unit(after=[\"network.target\"], requires=requires,\ndescription=f\"Tezos baking instance for {network}\"),\nService(exec_start=\"/usr/bin/tezos-baking-start\", user=\"tezos\", state_directory=\"tezos\",\nenvironment_file=f\"/etc/default/tezos-baking-{network}\",\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -98,7 +98,7 @@ def mk_node_unit(suffix, env, desc):\ntimeout_start_sec=\"450s\",\nstate_directory=\"tezos\", user=\"tezos\"\n),\n- Install(wanted_by=[\"multi-user.target\", f\"tezos-baking-{suffix}.service\"]))\n+ Install(wanted_by=[\"multi-user.target\"]))\nreturn SystemdUnit(suffix=suffix, service_file=service_file, startup_script=\"tezos-node-start\",\nprestart_script=\"tezos-node-prestart\")\n@@ -119,11 +119,9 @@ cat > /usr/bin/tezos-node-{network} <<- 'EOM'\nTEZOS_NODE_DIR=\"$(cat $(systemctl show -p FragmentPath tezos-node-{network}.service | cut -d'=' -f2) | grep 'DATA_DIR' | cut -d '=' -f3 | cut -d '\"' -f1)\" tezos-node \"$@\"\nEOM\nchmod +x /usr/bin/tezos-node-{network}\n-systemctl enable tezos-node-{network}.service > /dev/null || true\n'''\nnode_postrm_steps += f'''\nrm -f /usr/bin/tezos-node-{network}\n-systemctl disable tezos-node-{network}.service > /dev/null || true\n'''\n# Add custom config service\n@@ -159,18 +157,6 @@ daemon_decs = {\ndaemon_postinst_common = postinst_steps_common + \"\\nmkdir -p /var/lib/tezos/.tezos-client\\nchown -R tezos:tezos /var/lib/tezos/.tezos-client\\n\"\n-def gen_daemon_specific_postinst(daemon_name):\n- daemon_postinst = \"\"\n- for instance in daemons_instances:\n- daemon_postinst += f\"systemctl enable {daemon_name}@{instance}.service > /dev/null || true\\n\"\n- return daemon_postinst\n-\n-def gen_daemon_specific_postrm(daemon_name):\n- daemon_postrm = \"\"\n- for instance in daemons_instances:\n- daemon_postrm += f\"systemctl disable {daemon_name}@{instance}.service > /dev/null || true\\n\"\n- return daemon_postrm\n-\nfor proto in active_protocols:\ndaemons_instances = \\\n[network for network, protos in networks_protos.items() if proto in protos]\n@@ -197,7 +183,7 @@ for proto in active_protocols:\nexec_start=baker_startup_script,\nstate_directory=\"tezos\", user=\"tezos\", restart=\"on-failure\",\ntype_=\"forking\", keyring_mode=\"shared\"),\n- Install(wanted_by=[\"multi-user.target\", \"tezos-baking-%i.service\"]))\n+ Install(wanted_by=[\"multi-user.target\"]))\nservice_file_accuser = ServiceFile(Unit(after=[\"network.target\"],\ndescription=\"Tezos accuser\"),\nService(environment_file=f\"/etc/default/tezos-accuser-{proto}\",\n@@ -214,7 +200,7 @@ for proto in active_protocols:\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=accuser_startup_script,\nstate_directory=\"tezos\", user=\"tezos\", restart=\"on-failure\"),\n- Install(wanted_by=[\"multi-user.target\", \"tezos-baking-%i.service\"]))\n+ Install(wanted_by=[\"multi-user.target\"]))\nservice_file_endorser = ServiceFile(Unit(after=[\"network.target\"],\ndescription=\"Tezos endorser\"),\nService(environment_file=f\"/etc/default/tezos-endorser-{proto}\",\n@@ -235,7 +221,7 @@ for proto in active_protocols:\nexec_start=endorser_startup_script,\nstate_directory=\"tezos\", user=\"tezos\", restart=\"on-failure\",\ntype_=\"forking\", keyring_mode=\"shared\"),\n- Install(wanted_by=[\"multi-user.target\", \"tezos-baking-%i.service\"]))\n+ Install(wanted_by=[\"multi-user.target\"]))\npackages.append(OpamBasedPackage(f\"tezos-baker-{proto}\", \"Daemon for baking\",\n[SystemdUnit(service_file=service_file_baker,\nstartup_script=baker_startup_script.split('/')[-1],\n@@ -247,10 +233,7 @@ for proto in active_protocols:\ninstances=daemons_instances)],\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n- postinst_steps= \\\n- daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-baker-{proto}\") \\\n- + ledger_udev_postinst,\n- postrm_steps=gen_daemon_specific_postrm(f\"tezos-baker-{proto}\"),\n+ postinst_steps= daemon_postinst_common + ledger_udev_postinst,\nadditional_native_deps=[\"tezos-sapling-params\", \"tezos-client\", \"acl\"]))\npackages.append(OpamBasedPackage(f\"tezos-accuser-{proto}\", \"Daemon for accusing\",\n[SystemdUnit(service_file=service_file_accuser,\n@@ -263,10 +246,7 @@ for proto in active_protocols:\ninstances=daemons_instances)],\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n- postinst_steps= \\\n- daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-accuser-{proto}\") \\\n- + ledger_udev_postinst,\n- postrm_steps=gen_daemon_specific_postrm(f\"tezos-accuser-{proto}\")))\n+ postinst_steps= daemon_postinst_common + ledger_udev_postinst))\npackages.append(OpamBasedPackage(f\"tezos-endorser-{proto}\", \"Daemon for endorsing\",\n[SystemdUnit(service_file=service_file_endorser,\nstartup_script=endorser_startup_script.split('/')[-1],\n@@ -278,10 +258,7 @@ for proto in active_protocols:\ninstances=daemons_instances)],\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n- postinst_steps= \\\n- daemon_postinst_common + gen_daemon_specific_postinst(f\"tezos-endorser-{proto}\") \\\n- + ledger_udev_postinst,\n- postrm_steps=gen_daemon_specific_postrm(f\"tezos-endorser-{proto}\"),\n+ postinst_steps= daemon_postinst_common + ledger_udev_postinst,\nadditional_native_deps=[\"tezos-client\", \"acl\"]))\npackages.append(TezosSaplingParamsPackage())\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#193] Don't use WantedBy
Problem: WantedBy rule requires services to be enable in order to take
effect. Enabling also makes services start on system start-up, which is
quite unpleasant.
Solution: Don't use WantedBy and don't enable services in the
post-installation stage. Use Requires rule in the baking services to list
dependencies instead.
|
603,649
|
10.05.2021 09:58:45
| 14,400
|
34b52e89248b7d626e0359092c0dc85bedf0a933
|
fix link from quick start to installation instructions section
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -22,7 +22,7 @@ You will also need to run the 64bit version of the [Raspberry Pi OS](https://www\nthat you can use by following the [installation instructions](https://www.raspberrypi.org/documentation/installation/installing-images/)\nwith an image downloaded from the [official 64bit repository](https://downloads.raspberrypi.org/raspios_arm64/images/).\n-### Installing required packages\n+### Installation\nIn order to run a baking instance, you'll need the following Tezos binaries:\n`tezos-client`, `tezos-node`, `tezos-baker-<proto>`, `tezos-endorser-<proto>`.\n@@ -247,8 +247,7 @@ multipass shell tezos\n</details>\n-1) Install `tezos-baking` package following either [Ubuntu](#ubuntu)\n-or [RaspberryPi OS](#pios) instructions.\n+1) Install `tezos-baking` package following [these instructions](#installation).\n2) Choose one of supported Tezos networks - `mainnet`, `florencenet` or\n`edo2net` by setting environment variable:\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
fix link from quick start to installation instructions section
|
603,649
|
10.05.2021 10:01:46
| 14,400
|
dd5bbfc6b49d6720036b5f9e4bed6a825d78bdd3
|
tweak wording, fix punctuation
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -283,7 +283,7 @@ Update service configuration:\nsudo systemctl edit tezos-node-$tznet\n```\n-An editor will open with service override configuration,\n+An editor will open with service override configuration file.\nAdd the following:\n```\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
tweak wording, fix punctuation
|
603,649
|
10.05.2021 14:33:55
| 14,400
|
ff4a28e690543e04711c292bce5f56423a08d78e
|
Shorten section heading
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -37,7 +37,7 @@ The most convenient way to orchestrate all these binaries is to use the `tezos-b\npackage, which provides predefined services for running baking instances on different\nnetworks.\n-#### Add the package repository\n+#### Add repository\nOn Ubuntu:\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Shorten section heading
|
603,649
|
10.05.2021 14:34:21
| 14,400
|
221caa92435d137c752967c45c4152864349d99d
|
update text to reflect that mainnet is now using florence protocol
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -27,8 +27,8 @@ with an image downloaded from the [official 64bit repository](https://downloads.\nIn order to run a baking instance, you'll need the following Tezos binaries:\n`tezos-client`, `tezos-node`, `tezos-baker-<proto>`, `tezos-endorser-<proto>`.\n-The currently supported protocols are `008-PtEdo2Zk` (used on `mainnet` and `edo2net`)\n-and `009-PsFLoren` (used on `florencenet`).\n+The currently supported protocols are `008-PtEdo2Zk` (used on `edo2net`)\n+and `009-PsFLoren` (used on `florencenet` and `mainnet`).\nAlso, note that the corresponding packages have protocol\nsuffix in lowercase, e.g. the list of available baker packages can be found\n[here](https://launchpad.net/~serokell/+archive/ubuntu/tezos/+packages?field.name_filter=tezos-baker&field.status_filter=published).\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
update text to reflect that mainnet is now using florence protocol
|
603,649
|
10.05.2021 14:35:44
| 14,400
|
d9d0f2dacda5bc6d5bb2fd9a3d80c421c8b5987c
|
skip intro prose when jumping from quick start to installation isntructions
|
[
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -247,7 +247,7 @@ multipass shell tezos\n</details>\n-1) Install `tezos-baking` package following [these instructions](#installation).\n+1) Install `tezos-baking` package following [these instructions](#add-repository).\n2) Choose one of supported Tezos networks - `mainnet`, `florencenet` or\n`edo2net` by setting environment variable:\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
skip intro prose when jumping from quick start to installation isntructions
|
603,652
|
13.05.2021 11:16:53
| -10,800
|
1a4e567c1b325f4de2afacf8462f702a04fed5ae
|
Add udev to native runtime dependencies
Problem: udev may be absent in some minimal images of Ubuntu or Fedora,
thus post-installation script that installs udev rules may fails.
Solution: Explicitely add udev dependency to the tezos-client,
tezos-signer, tezos-{baker, endorser, accuser} packages.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -69,7 +69,7 @@ packages = [\nOpamBasedPackage(\"tezos-client\",\n\"CLI client for interacting with tezos blockchain\",\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n- additional_native_deps=[\"tezos-sapling-params\"],\n+ additional_native_deps=[\"tezos-sapling-params\", \"udev\"],\npostinst_steps=ledger_udev_postinst),\nOpamBasedPackage(\"tezos-admin-client\",\n\"Administration tool for the node\",\n@@ -77,6 +77,7 @@ packages = [\nOpamBasedPackage(\"tezos-signer\",\n\"A client to remotely sign operations or blocks\",\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n+ additional_native_deps=[\"udev\"],\nsystemd_units=signer_units,\npostinst_steps=ledger_udev_postinst),\nOpamBasedPackage(\"tezos-codec\",\n@@ -234,7 +235,7 @@ for proto in active_protocols:\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\npostinst_steps= daemon_postinst_common + ledger_udev_postinst,\n- additional_native_deps=[\"tezos-sapling-params\", \"tezos-client\", \"acl\"]))\n+ additional_native_deps=[\"tezos-sapling-params\", \"tezos-client\", \"acl\", \"udev\"]))\npackages.append(OpamBasedPackage(f\"tezos-accuser-{proto}\", \"Daemon for accusing\",\n[SystemdUnit(service_file=service_file_accuser,\nstartup_script=accuser_startup_script.split('/')[-1],\n@@ -246,6 +247,7 @@ for proto in active_protocols:\ninstances=daemons_instances)],\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\n+ additional_native_deps=[\"udev\"],\npostinst_steps= daemon_postinst_common + ledger_udev_postinst))\npackages.append(OpamBasedPackage(f\"tezos-endorser-{proto}\", \"Daemon for endorsing\",\n[SystemdUnit(service_file=service_file_endorser,\n@@ -259,7 +261,7 @@ for proto in active_protocols:\nproto,\noptional_opam_deps=[\"tls\", \"ledgerwallet-tezos\"],\npostinst_steps= daemon_postinst_common + ledger_udev_postinst,\n- additional_native_deps=[\"tezos-client\", \"acl\"]))\n+ additional_native_deps=[\"tezos-client\", \"acl\", \"udev\"]))\npackages.append(TezosSaplingParamsPackage())\npackages.append(TezosBakingServicesPackage(\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#198] Add udev to native runtime dependencies
Problem: udev may be absent in some minimal images of Ubuntu or Fedora,
thus post-installation script that installs udev rules may fails.
Solution: Explicitely add udev dependency to the tezos-client,
tezos-signer, tezos-{baker, endorser, accuser} packages.
|
603,652
|
13.05.2021 11:21:18
| -10,800
|
7c17e48390d01f0a60d5b6b6747523240330508d
|
Don't add udev rules inside containers
Problem: udev doesn't fully work inside containers (either docker or
podman), so post-installation script that adds udev rules for ledger
devivce fails inside them.
Solution: Check whether the packages is being installed inside the
container and don't add udev rules in case we're inside it.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/udev-rules",
"new_path": "docker/package/scripts/udev-rules",
"diff": "# This snippet is based on https://github.com/LedgerHQ/udev-rules/blob/master/add_udev_rules.sh with the changes\n# that are fixing https://github.com/LedgerHQ/udev-rules/issues/5, so that provided rules work on the Raspberry Pi OS\n# Ubuntu 18.04\n+\n+# Don't add udev rules in case the package is installed inside either docker or podman container.\n+# Otherwise, post-installation script will fail due to inability to non-zero exit code of the\n+# 'udevadm control --reload-rules' call\n+if [ ! -f /.dockerenv ] && [ ! -f /.containerenv ]; then\ncat <<EOF > /etc/udev/rules.d/20-hw1.rules\n# HW.1 / Nano\nSUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"2581\", ATTRS{idProduct}==\"1b7c|2b7c|3b7c|4b7c\", TAG+=\"uaccess\", TAG+=\"udev-acl\", MODE=\"0660\", GROUP=\"plugdev\"\n@@ -22,3 +27,4 @@ EOF\nudevadm trigger\nudevadm control --reload-rules\n+fi\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#198] Don't add udev rules inside containers
Problem: udev doesn't fully work inside containers (either docker or
podman), so post-installation script that adds udev rules for ledger
devivce fails inside them.
Solution: Check whether the packages is being installed inside the
container and don't add udev rules in case we're inside it.
|
603,652
|
13.05.2021 15:48:17
| -10,800
|
767d668a98f8bcd6318b73ba02af159548dbdc0f
|
Remove 008 protocol from mainnet baking
Problem: 009 protocol was activated mainnet, now there is no sense in
running 008 daemons on mainnet.
Solution: Remove 008 daemons from the contents of mainnet baking
service.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -7,7 +7,7 @@ from .model import Service, ServiceFile, SystemdUnit, Unit, Install, OpamBasedPa\nnetworks = [\"mainnet\", \"edo2net\", \"florencenet\"]\nnetworks_protos = {\n- \"mainnet\": [\"008-PtEdo2Zk\", \"009-PsFLoren\"],\n+ \"mainnet\": [\"009-PsFLoren\"],\n\"edo2net\": [\"008-PtEdo2Zk\"],\n\"florencenet\": [\"009-PsFLoren\"]\n}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#156] Remove 008 protocol from mainnet baking
Problem: 009 protocol was activated mainnet, now there is no sense in
running 008 daemons on mainnet.
Solution: Remove 008 daemons from the contents of mainnet baking
service.
|
603,658
|
18.05.2021 07:07:21
| -7,200
|
d83357f376c9dbc88eac6a222c4a7fdc71cebb95
|
Deactivate protocol 008
Problem: edo2net is now obsolete, so we don't need to support it.
Solution: removed 008 support from tezos-packaging.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline.yml",
"new_path": ".buildkite/pipeline.yml",
"diff": "@@ -84,7 +84,7 @@ steps:\n- eval \"$SET_VERSION\"\n# Building all binary packages will take significant amount of time, so we build only one\n# in order to ensure package generation sanity\n- - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-009-PsFLoren\n- rm -rf out\n# It takes much time to build binary package, so we do it only on master\nbranches: \"master\"\n@@ -106,7 +106,7 @@ steps:\n- eval \"$SET_VERSION\"\n# Building all binary packages will take significant amount of time, so we build only one\n# in order to ensure package generation sanity\n- - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n+ - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-009-PsFLoren\n- rm -rf out\n# It takes much time to build binary package, so we do it only on master\nbranches: \"master\"\n"
},
{
"change_type": "DELETE",
"old_path": "Formula/tezos-accuser-008-PtEdo2Zk.rb",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n-#\n-# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-\n-class TezosAccuser008Ptedo2zk < Formula\n- @all_bins = []\n-\n- class << self\n- attr_accessor :all_bins\n- end\n- homepage \"https://gitlab.com/tezos/tezos\"\n-\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n-\n- version \"v9.1-1\"\n-\n- build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n- build_dependencies.each do |dependency|\n- depends_on dependency => :build\n- end\n-\n- dependencies = %w[gmp hidapi libev libffi]\n- dependencies.each do |dependency|\n- depends_on dependency\n- end\n- desc \"Daemon for accusing\"\n-\n- bottle do\n- root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser008Ptedo2zk.version}/\"\n- sha256 cellar: :any, mojave: \"698024b3eda8944248af407e8519e05ae015208bc46964cd3cc823d392f9869f\"\n- sha256 cellar: :any, catalina: \"503a482b7c4d1c9fb83e610718e01d182705d9f0a8405bd68a5feaef648bb62f\"\n- end\n-\n- def make_deps\n- ENV.deparallelize\n- ENV[\"CARGO_HOME\"]=\"./.cargo\"\n- system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n- system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n- system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n- end\n-\n- def install_template(dune_path, exec_path, name)\n- bin.mkpath\n- self.class.all_bins << name\n- system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n- bin.install name\n- end\n-\n- def install\n- startup_contents =\n- <<~EOS\n- #!/usr/bin/env bash\n-\n- set -euo pipefail\n-\n- accuser=\"#{bin}/tezos-accuser-008-PtEdo2Zk\"\n-\n- accuser_dir=\"$DATA_DIR\"\n-\n- accuser_config=\"$accuser_dir/config\"\n- mkdir -p \"$accuser_dir\"\n-\n- if [ ! -f \"$accuser_config\" ]; then\n- \"$accuser\" --base-dir \"$accuser_dir\" \\\n- --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- config init --output \"$accuser_config\" >/dev/null 2>&1\n- else\n- \"$accuser\" --base-dir \"$accuser_dir\" \\\n- --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- config update >/dev/null 2>&1\n- fi\n-\n- exec \"$accuser\" --base-dir \"$accuser_dir\" \\\n- --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- run\n- EOS\n- File.write(\"tezos-accuser-008-PtEdo2Zk-start\", startup_contents)\n- bin.install \"tezos-accuser-008-PtEdo2Zk-start\"\n- make_deps\n- install_template \"src/proto_008_PtEdo2Zk/bin_accuser/main_accuser_008_PtEdo2Zk.exe\",\n- \"_build/default/src/proto_008_PtEdo2Zk/bin_accuser/main_accuser_008_PtEdo2Zk.exe\",\n- \"tezos-accuser-008-PtEdo2Zk\"\n- end\n-\n- plist_options manual: \"tezos-accuser-008-PtEdo2Zk run\"\n- def plist\n- <<~EOS\n- <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n- <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n- \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n- <plist version=\"1.0\">\n- <dict>\n- <key>Label</key>\n- <string>#{plist_name}</string>\n- <key>Program</key>\n- <string>#{opt_bin}/tezos-accuser-008-PtEdo2Zk-start</string>\n- <key>EnvironmentVariables</key>\n- <dict>\n- <key>DATA_DIR</key>\n- <string>#{var}/lib/tezos/client</string>\n- <key>NODE_RPC_ENDPOINT</key>\n- <string>http://localhost:8732</string>\n- </dict>\n- <key>RunAtLoad</key><true/>\n- <key>StandardOutPath</key>\n- <string>#{var}/log/#{name}.log</string>\n- <key>StandardErrorPath</key>\n- <string>#{var}/log/#{name}.log</string>\n- </dict>\n- </plist>\n- EOS\n- end\n- def post_install\n- mkdir \"#{var}/lib/tezos/client\"\n- end\n-end\n"
},
{
"change_type": "DELETE",
"old_path": "Formula/tezos-baker-008-PtEdo2Zk.rb",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n-#\n-# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-\n-class TezosBaker008Ptedo2zk < Formula\n- @all_bins = []\n-\n- class << self\n- attr_accessor :all_bins\n- end\n- homepage \"https://gitlab.com/tezos/tezos\"\n-\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n-\n- version \"v9.1-1\"\n-\n- build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n- build_dependencies.each do |dependency|\n- depends_on dependency => :build\n- end\n-\n- dependencies = %w[gmp hidapi libev libffi tezos-sapling-params]\n- dependencies.each do |dependency|\n- depends_on dependency\n- end\n- desc \"Daemon for baking\"\n-\n- bottle do\n- root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker008Ptedo2zk.version}/\"\n- sha256 cellar: :any, mojave: \"659c0b0a8fc58fcb8d652923d42efd092617a345f5df0eed7886c4128c996a7d\"\n- sha256 cellar: :any, catalina: \"6cccd75d7d53af524d8f856eb9707f1a9cc8c262d0cd8e51ff2133912d712c04\"\n- end\n-\n- def make_deps\n- ENV.deparallelize\n- ENV[\"CARGO_HOME\"]=\"./.cargo\"\n- system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n- system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n- system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n- end\n-\n- def install_template(dune_path, exec_path, name)\n- bin.mkpath\n- self.class.all_bins << name\n- system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n- bin.install name\n- end\n-\n- def install\n- startup_contents =\n- <<~EOS\n- #!/usr/bin/env bash\n-\n- set -euo pipefail\n-\n- baker=\"#{bin}/tezos-baker-008-PtEdo2Zk\"\n-\n- baker_dir=\"$DATA_DIR\"\n-\n- baker_config=\"$baker_dir/config\"\n- mkdir -p \"$baker_dir\"\n-\n- if [ ! -f \"$baker_config\" ]; then\n- \"$baker\" --base-dir \"$baker_dir\" \\\n- --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- config init --output \"$baker_config\" >/dev/null 2>&1\n- else\n- \"$baker\" --base-dir \"$baker_dir\" \\\n- --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- config update >/dev/null 2>&1\n- fi\n-\n- launch_baker() {\n- exec \"$baker\" \\\n- --base-dir \"$baker_dir\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- run with local node \"$NODE_DATA_DIR\" \"$@\"\n- }\n-\n- if [[ -z \"$BAKER_ACCOUNT\" ]]; then\n- launch_baker\n- else\n- launch_baker \"$BAKER_ACCOUNT\"\n- fi\n- EOS\n- File.write(\"tezos-baker-008-PtEdo2Zk-start\", startup_contents)\n- bin.install \"tezos-baker-008-PtEdo2Zk-start\"\n- make_deps\n- install_template \"src/proto_008_PtEdo2Zk/bin_baker/main_baker_008_PtEdo2Zk.exe\",\n- \"_build/default/src/proto_008_PtEdo2Zk/bin_baker/main_baker_008_PtEdo2Zk.exe\",\n- \"tezos-baker-008-PtEdo2Zk\"\n- end\n- plist_options manual: \"tezos-baker-008-PtEdo2Zk run with local node\"\n- def plist\n- <<~EOS\n- <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n- <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n- \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n- <plist version=\"1.0\">\n- <dict>\n- <key>Label</key>\n- <string>#{plist_name}</string>\n- <key>Program</key>\n- <string>#{opt_bin}/tezos-baker-008-PtEdo2Zk-start</string>\n- <key>EnvironmentVariables</key>\n- <dict>\n- <key>DATA_DIR</key>\n- <string>#{var}/lib/tezos/client</string>\n- <key>NODE_DATA_DIR</key>\n- <string></string>\n- <key>NODE_RPC_ENDPOINT</key>\n- <string>http://localhost:8732</string>\n- <key>BAKER_ACCOUNT</key>\n- <string></string>\n- </dict>\n- <key>RunAtLoad</key><true/>\n- <key>StandardOutPath</key>\n- <string>#{var}/log/#{name}.log</string>\n- <key>StandardErrorPath</key>\n- <string>#{var}/log/#{name}.log</string>\n- </dict>\n- </plist>\n- EOS\n- end\n- def post_install\n- mkdir \"#{var}/lib/tezos/client\"\n- end\n-end\n"
},
{
"change_type": "DELETE",
"old_path": "Formula/tezos-endorser-008-PtEdo2Zk.rb",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n-#\n-# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-\n-class TezosEndorser008Ptedo2zk < Formula\n- @all_bins = []\n-\n- class << self\n- attr_accessor :all_bins\n- end\n- homepage \"https://gitlab.com/tezos/tezos\"\n-\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n-\n- version \"v9.1-1\"\n-\n- build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n- build_dependencies.each do |dependency|\n- depends_on dependency => :build\n- end\n-\n- dependencies = %w[gmp hidapi libev libffi]\n- dependencies.each do |dependency|\n- depends_on dependency\n- end\n-\n- desc \"Daemon for endorsing\"\n-\n- bottle do\n- root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser008Ptedo2zk.version}/\"\n- sha256 cellar: :any, mojave: \"897ae817057dc3f7e66d80b6378ddc7b8becb99877e4064cf48ba7649d0d2ac2\"\n- sha256 cellar: :any, catalina: \"2b42134dd6ec6a1dcfad27d9584cb3b82a8788c4a1171d88f630d80707cef04e\"\n- end\n-\n- def make_deps\n- ENV.deparallelize\n- ENV[\"CARGO_HOME\"]=\"./.cargo\"\n- system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n- system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n- system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n- end\n-\n- def install_template(dune_path, exec_path, name)\n- bin.mkpath\n- self.class.all_bins << name\n- system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n- bin.install name\n- end\n-\n-\n- def install\n- startup_contents =\n- <<~EOS\n- #!/usr/bin/env bash\n-\n- set -euo pipefail\n-\n- endorser=\"#{bin}/tezos-endorser-008-PtEdo2Zk\"\n-\n- endorser_dir=\"$DATA_DIR\"\n-\n- endorser_config=\"$endorser_dir/config\"\n- mkdir -p \"$endorser_dir\"\n-\n- if [ ! -f \"$endorser_config\" ]; then\n- \"$endorser\" --base-dir \"$endorser_dir\" \\\n- --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- config init --output \"$endorser_config\" >/dev/null 2>&1\n- else\n- \"$endorser\" --base-dir \"$endorser_dir\" \\\n- --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- config update >/dev/null 2>&1\n- fi\n-\n- launch_endorser() {\n- exec \"$endorser\" --base-dir \"$endorser_dir\" \\\n- --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- run \"$@\"\n- }\n-\n- if [[ -z \"$ENDORSER_ACCOUNT\" ]]; then\n- launch_endorser\n- else\n- launch_endorser \"$ENDORSER_ACCOUNT\"\n- fi\n- EOS\n- File.write(\"tezos-endorser-008-PtEdo2Zk-start\", startup_contents)\n- bin.install \"tezos-endorser-008-PtEdo2Zk-start\"\n- make_deps\n- install_template \"src/proto_008_PtEdo2Zk/bin_endorser/main_endorser_008_PtEdo2Zk.exe\",\n- \"_build/default/src/proto_008_PtEdo2Zk/bin_endorser/main_endorser_008_PtEdo2Zk.exe\",\n- \"tezos-endorser-008-PtEdo2Zk\"\n- end\n-\n- plist_options manual: \"tezos-endorser-008-PtEdo2Zk run\"\n- def plist\n- <<~EOS\n- <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n- <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n- \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n- <plist version=\"1.0\">\n- <dict>\n- <key>Label</key>\n- <string>#{plist_name}</string>\n- <key>Program</key>\n- <string>#{opt_bin}/tezos-endorser-008-PtEdo2Zk-start</string>\n- <key>EnvironmentVariables</key>\n- <dict>\n- <key>DATA_DIR</key>\n- <string>#{var}/lib/tezos/client</string>\n- <key>NODE_RPC_ENDPOINT</key>\n- <string>http://localhost:8732</string>\n- <key>ENDORSER_ACCOUNT</key>\n- <string></string>\n- </dict>\n- <key>RunAtLoad</key><true/>\n- <key>StandardOutPath</key>\n- <string>#{var}/log/#{name}.log</string>\n- <key>StandardErrorPath</key>\n- <string>#{var}/log/#{name}.log</string>\n- </dict>\n- </plist>\n- EOS\n- end\n- def post_install\n- mkdir \"#{var}/lib/tezos/client\"\n- end\n-end\n"
},
{
"change_type": "DELETE",
"old_path": "Formula/tezos-node-edo2net.rb",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n-#\n-# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-\n-class TezosNodeEdo2net < Formula\n- url \"file:///dev/null\"\n- version \"v9.1-1\"\n-\n- bottle :unneeded\n- depends_on \"tezos-node\"\n-\n- desc \"Meta formula that provides background tezos-node service that runs on edo2net\"\n-\n- def install\n- startup_contents =\n- <<~EOS\n- #!/usr/bin/env bash\n-\n- set -euo pipefail\n-\n- node=\"/usr/local/bin/tezos-node\"\n- # default location of the config file\n- config_file=\"$DATA_DIR/config.json\"\n-\n- mkdir -p \"$DATA_DIR\"\n- if [[ ! -f \"$config_file\" ]]; then\n- echo \"Configuring the node...\"\n- \"$node\" config init \\\n- --data-dir \"$DATA_DIR\" \\\n- --rpc-addr \"$NODE_RPC_ADDR\" \\\n- --network=edo2net \\\n- \"$@\"\n- else\n- echo \"Updating the node configuration...\"\n- \"$node\" config update \\\n- --data-dir \"$DATA_DIR\" \\\n- --rpc-addr \"$NODE_RPC_ADDR\" \\\n- --network=edo2net \\\n- \"$@\"\n- fi\n-\n- # Launching the node\n- if [[ -z \"$CERT_PATH\" || -z \"$KEY_PATH\" ]]; then\n- exec \"$node\" run --data-dir \"$DATA_DIR\" --config-file=\"$config_file\"\n- else\n- exec \"$node\" run --data-dir \"$DATA_DIR\" --config-file=\"$config_file\" \\\n- --rpc-tls=\"$CERT_PATH\",\"$KEY_PATH\"\n- fi\n- EOS\n- File.write(\"tezos-node-edo2net-start\", startup_contents)\n- bin.install \"tezos-node-edo2net-start\"\n- print \"Installing tezos-node-edo2net service\"\n- end\n- def plist\n- <<~EOS\n- <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n- <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n- \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n- <plist version=\"1.0\">\n- <dict>\n- <key>Label</key>\n- <string>#{plist_name}</string>\n- <key>Program</key>\n- <string>#{opt_bin}/tezos-node-edo2net-start</string>\n- <key>EnvironmentVariables</key>\n- <dict>\n- <key>DATA_DIR</key>\n- <string>#{var}/lib/tezos/node-edo2net</string>\n- <key>NODE_RPC_ADDR</key>\n- <string>127.0.0.1:8732</string>\n- <key>CERT_PATH</key>\n- <string></string>\n- <key>KEY_PATH</key>\n- <string></string>\n- </dict>\n- <key>RunAtLoad</key><true/>\n- <key>StandardOutPath</key>\n- <string>#{var}/log/#{name}.log</string>\n- <key>StandardErrorPath</key>\n- <string>#{var}/log/#{name}.log</string>\n- </dict>\n- </plist>\n- EOS\n- end\n- def post_install\n- mkdir_p \"#{var}/lib/tezos/node-edo2net\"\n- system \"tezos-node\", \"config\", \"init\", \"--data-dir\" \"#{var}/lib/tezos/node-edo2net\", \"--network\", \"edo2net\"\n- end\n-end\n"
},
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -196,7 +196,6 @@ background services.\nFormulas with `tezos-node` background services:\n* `tezos-node-mainnet`\n-* `tezos-node-edo2net`\nFormulas with `tezos-signer` background services:\n* `tezos-signer-http`\n@@ -244,8 +243,8 @@ It's possible to run multiple same services, e.g. two `tezos-node`s that run dif\nnetworks.\n`tezos-node` packages provide multiple services out of the box:\n-`tezos-node-edo2net` and `tezos-node-mainnet` that run\n-`edo2net` and `mainnet` networks respectively.\n+`tezos-node-florencenet` and `tezos-node-mainnet` that run\n+`florencenet` and `mainnet` networks respectively.\nIn order to start it run:\n```\n@@ -258,7 +257,7 @@ TEZOS_NODE_DIR=\"<DATA_DIR from tezos-node-<network>.service>\" tezos-node\n```\nIn addition to node services where the config is predefined to a specific network\n-(e.g. `tezos-node-mainnet` or `tezos-node-edo2net`), it's possible to run `tezos-node-custom`\n+(e.g. `tezos-node-mainnet` or `tezos-node-florencenet`), it's possible to run `tezos-node-custom`\nservice and provide a path to the custom node config file via the\n`CUSTOM_NODE_CONFIG` variable in the `tezos-node-custom.service` file.\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -5,10 +5,9 @@ import os, shutil, sys, subprocess, json\nfrom .model import Service, ServiceFile, SystemdUnit, Unit, Install, OpamBasedPackage, TezosSaplingParamsPackage, TezosBakingServicesPackage\n-networks = [\"mainnet\", \"edo2net\", \"florencenet\"]\n+networks = [\"mainnet\", \"florencenet\"]\nnetworks_protos = {\n\"mainnet\": [\"009-PsFLoren\"],\n- \"edo2net\": [\"008-PtEdo2Zk\"],\n\"florencenet\": [\"009-PsFLoren\"]\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -29,8 +29,7 @@ with an image downloaded from the [official 64bit repository](https://downloads.\nIn order to run a baking instance, you'll need the following Tezos binaries:\n`tezos-client`, `tezos-node`, `tezos-baker-<proto>`, `tezos-endorser-<proto>`.\n-The currently supported protocols are `008-PtEdo2Zk` (used on `edo2net`)\n-and `009-PsFLoren` (used on `florencenet` and `mainnet`).\n+The currently supported protocol is `009-PsFLoren` (used on `florencenet` and `mainnet`).\nAlso, note that the corresponding packages have protocol\nsuffix in lowercase, e.g. the list of available baker packages can be found\n[here](https://launchpad.net/~serokell/+archive/ubuntu/tezos/+packages?field.name_filter=tezos-baker&field.status_filter=published).\n@@ -251,8 +250,8 @@ multipass shell tezos\n1) Install `tezos-baking` package following [these instructions](#add-repository).\n-2) Choose one of supported Tezos networks - `mainnet`, `florencenet` or\n-`edo2net` by setting environment variable:\n+2) Choose one of supported Tezos networks - `mainnet` or `florencenet` -\n+by setting environment variable:\n```\ntznet=florencenet\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/hacks.nix",
"new_path": "nix/build/hacks.nix",
"diff": "@@ -197,21 +197,6 @@ rec {\npostFixup = zcash-post-fixup o;\n});\n- tezos-accuser-008-PtEdo2Zk = osuper.tezos-accuser-008-PtEdo2Zk.overrideAttrs\n- (o: {\n- buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- postFixup = zcash-post-fixup o;\n- });\n- tezos-baker-008-PtEdo2Zk = osuper.tezos-baker-008-PtEdo2Zk.overrideAttrs\n- (o: {\n- buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- postFixup = zcash-post-fixup o;\n- });\n- tezos-endorser-008-PtEdo2Zk = osuper.tezos-endorser-008-PtEdo2Zk.overrideAttrs\n- (o: {\n- buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n- postFixup = zcash-post-fixup o;\n- });\ntezos-accuser-009-PsFLoren = osuper.tezos-accuser-009-PsFLoren.overrideAttrs\n(o: {\nbuildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n"
},
{
"change_type": "MODIFY",
"old_path": "protocols.json",
"new_path": "protocols.json",
"diff": "\"005-PsBabyM1\",\n\"006-PsCARTHA\",\n\"007-PsDELPH1\",\n- \"008-PtEdoTez\"\n+ \"008-PtEdoTez\",\n+ \"008-PtEdo2Zk\"\n],\n\"active\": [\n- \"008-PtEdo2Zk\",\n\"009-PsFLoren\"\n]\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/build-bottles.sh",
"new_path": "scripts/build-bottles.sh",
"diff": "@@ -17,14 +17,11 @@ brew install --formula --build-bottle ./Formula/tezos-sapling-params.rb\nbrew bottle --force-core-tap --no-rebuild ./Formula/tezos-sapling-params.rb\n# we don't bottle meta-formulas that contains only services\n-build_bottle ./Formula/tezos-accuser-008-PtEdo2Zk.rb\nbuild_bottle ./Formula/tezos-accuser-009-PsFLoren.rb\nbuild_bottle ./Formula/tezos-admin-client.rb\n-build_bottle ./Formula/tezos-baker-008-PtEdo2Zk.rb\nbuild_bottle ./Formula/tezos-baker-009-PsFLoren.rb\nbuild_bottle ./Formula/tezos-client.rb\nbuild_bottle ./Formula/tezos-codec.rb\n-build_bottle ./Formula/tezos-endorser-008-PtEdo2Zk.rb\nbuild_bottle ./Formula/tezos-endorser-009-PsFLoren.rb\nbuild_bottle ./Formula/tezos-node.rb\nbuild_bottle ./Formula/tezos-sandbox.rb\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-binaries.nix",
"new_path": "tests/tezos-binaries.nix",
"diff": "@@ -17,11 +17,11 @@ in import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\ntestScript = ''\npath_to_binaries = \"${path-to-binaries}\"\n- tezos_accuser = f\"{path_to_binaries}/tezos-accuser-008-PtEdo2Zk\"\n+ tezos_accuser = f\"{path_to_binaries}/tezos-accuser-009-PsFLoren\"\ntezos_admin_client = f\"{path_to_binaries}/tezos-admin-client\"\n- tezos_baker = f\"{path_to_binaries}/tezos-baker-008-PtEdo2Zk\"\n+ tezos_baker = f\"{path_to_binaries}/tezos-baker-009-PsFLoren\"\ntezos_client = f\"{path_to_binaries}/tezos-client\"\n- tezos_endorser = f\"{path_to_binaries}/tezos-endorser-008-PtEdo2Zk\"\n+ tezos_endorser = f\"{path_to_binaries}/tezos-endorser-009-PsFLoren\"\ntezos_node = f\"{path_to_binaries}/tezos-node\"\ntezos_signer = f\"{path_to_binaries}/tezos-signer\"\ntezos_codec = f\"{path_to_binaries}/tezos-codec\"\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-nix-binaries.nix",
"new_path": "tests/tezos-nix-binaries.nix",
"diff": "@@ -5,7 +5,7 @@ let\nnixpkgs = (import ../nix/nix/sources.nix).nixpkgs;\npkgs = import ../nix/build/pkgs.nix {};\ninherit (pkgs.ocamlPackages) tezos-client tezos-admin-client tezos-node tezos-signer tezos-codec\n- tezos-accuser-008-PtEdo2Zk tezos-baker-008-PtEdo2Zk tezos-endorser-008-PtEdo2Zk;\n+ tezos-accuser-009-PsFLoren tezos-baker-009-PsFLoren tezos-endorser-009-PsFLoren;\nin import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n{\nnodes.machine = { ... }: {\n@@ -19,13 +19,13 @@ in import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n};\ntestScript = ''\n- tezos_accuser = \"${tezos-accuser-008-PtEdo2Zk}/bin/tezos-accuser-008-PtEdo2Zk\"\n+ tezos_accuser = \"${tezos-accuser-009-PsFLoren}/bin/tezos-accuser-009-PsFLoren\"\ntezos_admin_client = \"${tezos-admin-client}/bin/tezos-admin-client\"\n- tezos_baker = \"${tezos-baker-008-PtEdo2Zk}/bin/tezos-baker-008-PtEdo2Zk\"\n+ tezos_baker = \"${tezos-baker-009-PsFLoren}/bin/tezos-baker-009-PsFLoren\"\ntezos_client = (\n\"${tezos-client}/bin/tezos-client\"\n)\n- tezos_endorser = \"${tezos-endorser-008-PtEdo2Zk}/bin/tezos-endorser-008-PtEdo2Zk\"\n+ tezos_endorser = \"${tezos-endorser-009-PsFLoren}/bin/tezos-endorser-009-PsFLoren\"\ntezos_node = \"${tezos-node}/bin/tezos-node\"\ntezos_signer = (\n\"${tezos-signer}/bin/tezos-signer\"\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Deactivate protocol 008
Problem: edo2net is now obsolete, so we don't need to support it.
Solution: removed 008 support from tezos-packaging.
|
603,658
|
15.03.2021 17:58:30
| -3,600
|
79f3220376599d489d63f75b46798d9b3869222f
|
Add nixos modules for tezos binaries
Problem: we're providing systemd services for tezos-node and
tezos daemons in the native packages, but there are no nixos
modules for them.
Solution: add nixos modules for tezos-node, tezos-signer,
tezos-baker-<proto>, tezos-accuser-<proto>, and
tezos-endorser-<proto>.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "nix/modules/common.nix",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+{ lib, pkgs, ... }:\n+\n+with lib;\n+rec {\n+ sharedOptions = {\n+\n+ logVerbosity = mkOption {\n+ type = types.enum [ \"fatal\" \"error\" \"warning\" \"notice\" \"info\" \"debug\" ];\n+ default = \"warning\";\n+ description = ''\n+ Level of logs verbosity. Possible values are:\n+ fatal, error, warn, notice, info or debug.\n+ '';\n+ };\n+\n+ };\n+\n+ daemonOptions = sharedOptions // {\n+\n+ baseProtocol = mkOption {\n+ type = types.enum [ \"009-PsFLoren\"];\n+ description = ''\n+ Base protocol version,\n+ only '009-PsFLoren' is supported.\n+ '';\n+ example = \"009-PsFLoren\";\n+ };\n+\n+ rpcPort = mkOption {\n+ type = types.int;\n+ default = 8732;\n+ example = 8732;\n+ description = ''\n+ Tezos node RPC port.\n+ '';\n+ };\n+\n+ };\n+\n+ genDaemonConfig = instancesCfg: service-name: service-pkgs: service-script:\n+ mkIf (instancesCfg != {}) {\n+ users = mkMerge (flip mapAttrsToList instancesCfg (node-name: node-cfg: genUsers node-name ));\n+ systemd = mkMerge (flip mapAttrsToList instancesCfg (node-name: node-cfg:\n+ let tezos-service = service-pkgs.\"${node-cfg.baseProtocol}\";\n+ in {\n+ services.\"tezos-${node-name}-tezos-${service-name}\" = genSystemdService node-name node-cfg service-name // rec {\n+ bindsTo = [ \"network.target\" \"tezos-${node-name}-tezos-node.service\" ];\n+ after = bindsTo;\n+ path = with pkgs; [ curl ];\n+ preStart =\n+ ''\n+ while ! _=\"$(curl --silent http://localhost:${toString node-cfg.rpcPort}/chains/main/blocks/head/)\"; do\n+ echo \"Trying to connect to tezos-node\"\n+ sleep 1s\n+ done\n+\n+ service_data_dir=\"$STATE_DIRECTORY/client/data\"\n+ mkdir -p \"$service_data_dir\"\n+\n+ # Generate or update service config file\n+ if [[ ! -f \"$service_data_dir/config\" ]]; then\n+ ${tezos-service} -d \"$service_data_dir\" -E \"http://localhost:${toString node-cfg.rpcPort}\" \\\n+ config init --output \"$service_data_dir/config\" >/dev/null 2>&1\n+ else\n+ ${tezos-service} -d \"$service_data_dir\" -E \"http://localhost:${toString node-cfg.rpcPort}\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+ '';\n+ script = service-script node-cfg;\n+ };\n+ }));\n+ };\n+\n+ genUsers = node-name: {\n+ groups.\"tezos-${node-name}\" = { };\n+ users.\"tezos-${node-name}\" = { group = \"tezos-${node-name}\"; };\n+ };\n+\n+ genSystemdService = node-name: node-cfg: service-name: {\n+ wantedBy = [ \"multi-user.target\" ];\n+ description = \"Tezos ${service-name}\";\n+ environment = {\n+ TEZOS_LOG = \"* -> ${node-cfg.logVerbosity}\";\n+ };\n+ serviceConfig = {\n+ User = \"tezos-${node-name}\";\n+ Group = \"tezos-${node-name}\";\n+ StateDirectory = \"tezos-${node-name}\";\n+ Restart = \"always\";\n+ RestartSec = \"10\";\n+ };\n+ };\n+\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "nix/modules/tezos-accuser.nix",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+{config, lib, pkgs, ...}:\n+\n+with lib;\n+\n+let\n+ tezos-accuser-pkgs = {\n+ \"009-PsFLoren\" =\n+ \"${pkgs.ocamlPackages.tezos-baker-009-PsFLoren}/bin/tezos-baker-009-PsFLoren\";\n+ };\n+ cfg = config.services.tezos-accuser;\n+ common = import ./common.nix { inherit lib; inherit pkgs; };\n+ instanceOptions = types.submodule ( {...} : {\n+ options = common.daemonOptions // {\n+\n+ enable = mkEnableOption \"Tezos accuser service\";\n+\n+ };\n+ });\n+\n+in {\n+ options.services.tezos-accuser = {\n+ instances = mkOption {\n+ type = types.attrsOf instanceOptions;\n+ description = \"Configuration options\";\n+ default = {};\n+ };\n+ };\n+ config =\n+ let accuser-script = node-cfg: ''\n+ ${tezos-accuser-pkgs.${node-cfg.baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n+ -E \"http://localhost:${toString node-cfg.rpcPort}\" \\\n+ run with local node \"$STATE_DIRECTORY/node/data\" \"$@\"\n+ '';\n+ in common.genDaemonConfig cfg.instances \"accuser\" tezos-accuser-pkgs accuser-script;\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "nix/modules/tezos-baker.nix",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+{config, lib, pkgs, ...}:\n+\n+with lib;\n+\n+let\n+ tezos-baker-pkgs = {\n+ \"009-PsFLoren\" =\n+ \"${pkgs.ocamlPackages.tezos-baker-009-PsFLoren}/bin/tezos-baker-009-PsFLoren\";\n+ };\n+ cfg = config.services.tezos-baker;\n+ common = import ./common.nix { inherit lib; inherit pkgs; };\n+ instanceOptions = types.submodule ( {...} : {\n+ options = common.daemonOptions // {\n+\n+ enable = mkEnableOption \"Tezos baker service\";\n+\n+ endorserAccountAlias = mkOption {\n+ type = types.str;\n+ default = \"\";\n+ description = ''\n+ Alias for the tezos-endorser account.\n+ '';\n+ };\n+\n+ };\n+ });\n+\n+in {\n+ options.services.tezos-baker = {\n+ instances = mkOption {\n+ type = types.attrsOf instanceOptions;\n+ description = \"Configuration options\";\n+ default = {};\n+ };\n+ };\n+ config =\n+ let baker-script = node-cfg: ''\n+ ${tezos-baker-pkgs.${node-cfg.baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n+ -E \"http://localhost:${toString node-cfg.rpcPort}\" \\\n+ run with local node \"$STATE_DIRECTORY/node/data\" ${node-cfg.endorserAccountAlias}\n+ '';\n+ in common.genDaemonConfig cfg.instances \"baker\" tezos-baker-pkgs baker-script;\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "nix/modules/tezos-endorser.nix",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+{config, lib, pkgs, ...}:\n+\n+with lib;\n+\n+let\n+ tezos-endorser-pkgs = {\n+ \"009-PsFLoren\" =\n+ \"${pkgs.ocamlPackages.tezos-baker-009-PsFLoren}/bin/tezos-baker-009-PsFLoren\";\n+ };\n+ common = import ./common.nix { inherit lib; inherit pkgs; };\n+ cfg = config.services.tezos-endorser;\n+ instanceOptions = types.submodule ( {...} : {\n+ options = common.daemonOptions // {\n+\n+ enable = mkEnableOption \"Tezos endorser service\";\n+\n+ bakerAccountAlias = mkOption {\n+ type = types.str;\n+ default = \"\";\n+ description = ''\n+ Alias for the tezos-baker account.\n+ '';\n+ };\n+\n+ };\n+ });\n+\n+in {\n+ options.services.tezos-endorser = {\n+ instances = mkOption {\n+ type = types.attrsOf instanceOptions;\n+ description = \"Configuration options\";\n+ default = {};\n+ };\n+ };\n+ config =\n+ let endorser-script = node-cfg: ''\n+ ${tezos-endorser-pkgs.${node-cfg.baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n+ -E \"http://localhost:${toString node-cfg.rpcPort}\" \\\n+ run with local node \"$STATE_DIRECTORY/node/data\" ${node-cfg.bakerAccountAlias}\n+ '';\n+ in common.genDaemonConfig cfg.instances \"endorser\" tezos-endorser-pkgs endorser-script;\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "nix/modules/tezos-node.nix",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+{config, lib, pkgs, ...}:\n+\n+with lib;\n+\n+let\n+ tezos-node-pkg = pkgs.ocamlPackages.tezos-node;\n+ cfg = config.services.tezos-node;\n+ sources = import ../nix/sources.nix;\n+ genConfigCommand = historyMode: rpcPort: netPort: network: ''\n+ --data-dir \"$node_data_dir\" \\\n+ --history-mode \"${historyMode}\" \\\n+ --rpc-addr \":${toString rpcPort}\" \\\n+ --net-addr \":${toString netPort}\" \\\n+ --network \"${network}\"\n+ '';\n+ common = import ./common.nix { inherit lib; inherit pkgs; };\n+ instanceOptions = types.submodule ( {...} : {\n+ options = common.sharedOptions // {\n+ enable = mkEnableOption \"Tezos node service\";\n+\n+ package = mkOption {\n+ default = tezos-node-pkg;\n+ type = types.package;\n+ };\n+\n+ rpcPort = mkOption {\n+ type = types.int;\n+ default = 8732;\n+ example = 8732;\n+ description = ''\n+ Tezos node RPC port.\n+ '';\n+ };\n+\n+ netPort = mkOption {\n+ type = types.int;\n+ default = 9732;\n+ example = 9732;\n+ description = ''\n+ Tezos node net port.\n+ '';\n+ };\n+\n+ network = mkOption {\n+ type = types.str;\n+ default = \"florencenet\";\n+ description = ''\n+ Network which node will be running on.\n+ '';\n+ };\n+\n+ historyMode = mkOption {\n+ type = types.enum [ \"full\" \"experimental-rolling\" \"archive\" ];\n+ default = \"full\";\n+ description = ''\n+ Node history mode. Possible values are:\n+ full, experimental-rolling or archive.\n+ '';\n+ };\n+\n+ nodeConfig = mkOption {\n+ default = null;\n+ type = types.nullOr (import sources.serokell-nix).lib.types.jsonConfig;\n+ description = ''\n+ Custom node config.\n+ This option overrides the all other options that affect\n+ tezos-node config.\n+ '';\n+ };\n+ };\n+ });\n+in {\n+\n+ options.services.tezos-node = {\n+ instances = mkOption {\n+ type = types.attrsOf instanceOptions;\n+ description = \"Configuration options\";\n+ default = {};\n+ };\n+ };\n+ config = mkIf (cfg.instances != {}) {\n+ users = mkMerge (flip mapAttrsToList cfg.instances (node-name: node-cfg: common.genUsers node-name ));\n+ systemd = mkMerge (flip mapAttrsToList cfg.instances (node-name: node-cfg: {\n+ services.\"tezos-${node-name}-tezos-node\" = common.genSystemdService node-name node-cfg \"node\" // {\n+ after = [ \"network.target\" ];\n+ preStart =\n+ ''\n+ node_data_dir=\"$STATE_DIRECTORY/node/data\"\n+ mkdir -p \"$node_data_dir\"\n+ '' + (\n+ if node-cfg.nodeConfig == null\n+ then\n+ ''\n+ # Generate or update node config file\n+ if [[ ! -f \"$node_data_dir/config.json\" ]]; then\n+ ${node-cfg.package}/bin/tezos-node config init \\\n+ ${genConfigCommand node-cfg.historyMode node-cfg.rpcPort node-cfg.netPort node-cfg.network}\n+ else\n+ ${node-cfg.package}/bin/tezos-node config update \\\n+ ${genConfigCommand node-cfg.historyMode node-cfg.rpcPort node-cfg.netPort node-cfg.network}\n+ fi\n+ ''\n+ else\n+ ''\n+ cp ${node-cfg.nodeConfig} \"$node_data_dir/config.json\"\n+ ''\n+ );\n+ script = ''\n+ ${node-cfg.package}/bin/tezos-node run --data-dir \"$STATE_DIRECTORY/node/data\" \\\n+ --connections 50 --bootstrap-threshold=1\n+ '';\n+ };\n+ }));\n+ };\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "nix/modules/tezos-signer.nix",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+{config, lib, pkgs, ...}:\n+\n+with lib;\n+\n+let\n+ tezos-signer-launch = \"${pkgs.ocamlPackages.tezos-signer}/bin/tezos-signer launch\";\n+ common = import ./common.nix { inherit lib; inherit pkgs; };\n+ cfg = config.services.tezos-signer;\n+ instanceOptions = types.submodule ( {...} : {\n+ options = common.sharedOptions // {\n+\n+ enable = mkEnableOption \"Tezos signer service\";\n+\n+ networkProtocol = mkOption {\n+ type = types.enum [ \"http\" \"https\" \"tcp\" \"unix\" ];\n+ description = ''\n+ Network protocol version. Supports http, https, tcp and unix.\n+ '';\n+ example = \"http\";\n+ };\n+\n+ netAddress = mkOption {\n+ type = types.str;\n+ default = \"127.0.0.1\";\n+ example = \"127.0.0.1\";\n+ description = ''\n+ Tezos signer net address.\n+ '';\n+ };\n+\n+ netPort = mkOption {\n+ type = types.int;\n+ default = 8080;\n+ example = 8080;\n+ description = ''\n+ Tezos signer net port.\n+ '';\n+ };\n+\n+ certPath = mkOption {\n+ type = types.str;\n+ default = null;\n+ description = ''\n+ Path of the SSL certificate to use for https Tezos signer.\n+ '';\n+ };\n+\n+ keyPath = mkOption {\n+ type = types.str;\n+ default = null;\n+ description = ''\n+ Key path to use for https Tezos signer.\n+ '';\n+ };\n+\n+ unixSocket = mkOption {\n+ type = types.str;\n+ default = null;\n+ description = ''\n+ Socket to use for Tezos signer running over UNIX socket.\n+ '';\n+ };\n+\n+ timeout = mkOption {\n+ type = types.int;\n+ default = 1;\n+ example = 1;\n+ description = ''\n+ Timeout for Tezos signer.\n+ '';\n+ };\n+\n+ };\n+ });\n+in {\n+ options.services.tezos-signer = {\n+ instances = mkOption {\n+ type = types.attrsOf instanceOptions;\n+ description = \"Configuration options\";\n+ default = {};\n+ };\n+ };\n+ config = mkIf (cfg.instances != {}) {\n+ users = mkMerge (flip mapAttrsToList cfg.instances (node-name: node-cfg: common.genUsers node-name ));\n+ systemd = mkMerge (flip mapAttrsToList cfg.instances (node-name: node-cfg:\n+ let tezos-signers = {\n+ \"http\" =\n+ \"${tezos-signer-launch} http signer --address ${node-cfg.netAddress} --port ${toString node-cfg.netPort}\";\n+ \"https\" =\n+ \"${tezos-signer-launch} https signer ${node-cfg.certPath} ${node-cfg.keyPath} --address ${node-cfg.netAddress} --port ${toString node-cfg.netPort}\";\n+ \"tcp\" =\n+ \"${tezos-signer-launch} socket signer --address ${node-cfg.netAddress} --port ${toString node-cfg.netPort} --timeout ${toString node-cfg.timeout}\";\n+ \"unix\" =\n+ \"${tezos-signer-launch} local signer --socket ${node-cfg.unixSocket}\";\n+ };\n+ in {\n+ services.\"tezos-${node-name}-tezos-signer\" = common.genSystemdService node-name node-cfg \"signer\" // {\n+ after = [ \"network.target\" ];\n+ script = ''\n+ ${tezos-signers.${node-cfg.networkProtocol}}\n+ '';\n+ };\n+ }));\n+ };\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/nix/sources.json",
"new_path": "nix/nix/sources.json",
"diff": "\"url\": \"https://github.com/ocaml/opam-repository/archive/d90747963ba246b00526d08d26241e5654f418bf.tar.gz\",\n\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n+ \"serokell-nix\": {\n+ \"branch\": \"master\",\n+ \"description\": \"Serokell Nix infrastructure library\",\n+ \"homepage\": \"\",\n+ \"owner\": \"serokell\",\n+ \"repo\": \"serokell.nix\",\n+ \"rev\": \"c8d39be5ea3b5cac5da952f28d37095ef385b89f\",\n+ \"sha256\": \"0db2hgh2fgpr8hn7rpg1fixjsvl20clj6ld893825rn56a2aq76v\",\n+ \"type\": \"tarball\",\n+ \"url\": \"https://github.com/serokell/serokell.nix/archive/c8d39be5ea3b5cac5da952f28d37095ef385b89f.tar.gz\",\n+ \"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n+ },\n\"tezos\": {\n\"ref\": \"refs/tags/v9.1\",\n\"repo\": \"https://gitlab.com/tezos/tezos\",\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#107] Add nixos modules for tezos binaries
Problem: we're providing systemd services for tezos-node and
tezos daemons in the native packages, but there are no nixos
modules for them.
Solution: add nixos modules for tezos-node, tezos-signer,
tezos-baker-<proto>, tezos-accuser-<proto>, and
tezos-endorser-<proto>.
|
603,658
|
22.03.2021 20:28:46
| -3,600
|
960c54371997246ddd99110562a7e463efd94b23
|
Add nixos test for Tezos modules
Problem: there's no way to test if NixOS modules for Tezos binaries
build without NixOS tests.
Solution: added some basic tests.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/tezos-modules.nix",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+let\n+ nixpkgs = (import ../nix/nix/sources.nix).nixpkgs;\n+ pkgs = import ../nix/build/pkgs.nix {};\n+in import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n+{\n+ machine = { ... }: {\n+ virtualisation.memorySize = 1024;\n+ virtualisation.diskSize = 1024;\n+\n+ nixpkgs.pkgs = pkgs;\n+ imports = [ ../nix/modules/tezos-node.nix\n+ ../nix/modules/tezos-signer.nix\n+ ../nix/modules/tezos-accuser.nix\n+ ../nix/modules/tezos-baker.nix\n+ ../nix/modules/tezos-endorser.nix\n+ ];\n+\n+ services.tezos-node.instances.florencenet.enable = true;\n+\n+ services.tezos-signer.instances.florencenet = {\n+ enable = true;\n+ networkProtocol = \"http\";\n+ };\n+\n+ services.tezos-accuser.instances.florencenet = {\n+ enable = true;\n+ baseProtocol = \"009-PsFLoren\";\n+ };\n+\n+ services.tezos-baker.instances.florencenet = {\n+ enable = true;\n+ baseProtocol = \"009-PsFLoren\";\n+ };\n+\n+ services.tezos-endorser.instances.florencenet = {\n+ enable = true;\n+ baseProtocol = \"009-PsFLoren\";\n+ };\n+\n+ };\n+\n+ testScript = ''\n+ start_all()\n+\n+ services = [\n+ \"tezos-node\",\n+ \"tezos-signer\",\n+ \"tezos-baker\",\n+ \"tezos-accuser\",\n+ \"tezos-endorser\",\n+ ]\n+\n+ for s in services:\n+ machine.wait_for_unit(f\"tezos-florencenet-{s}.service\")\n+\n+ with subtest(\"check tezos-node rpc response\"):\n+ machine.wait_for_open_port(8732)\n+ machine.wait_until_succeeds(\n+ \"curl --silent http://localhost:8732/chains/main/blocks/head/header | grep level\"\n+ )\n+\n+ with subtest(\"service status sanity check\"):\n+ for s in services:\n+ machine.succeed(f\"systemctl status tezos-florencenet-{s}.service\")\n+ '';\n+})\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#107] Add nixos test for Tezos modules
Problem: there's no way to test if NixOS modules for Tezos binaries
build without NixOS tests.
Solution: added some basic tests.
|
603,658
|
18.05.2021 20:10:49
| -7,200
|
8fc3693d072f7677570009dc262b4e6c42fa21f4
|
Add a CI step
Problem: now that we have NixOS tests for tezos modules, we should
run them in our pipeline.
Solution: added a buildkite step to run tests/tezos-modules.nix
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline.yml",
"new_path": ".buildkite/pipeline.yml",
"diff": "@@ -59,6 +59,10 @@ steps:\nagents:\nqueue: \"x86_64-darwin\"\n+ - label: test nixos modules\n+ commands:\n+ - nix-build tests/tezos-modules.nix --no-out-link\n+\n# binaries built by docker are tested on the another machine,\n# so we should wait for docker build to finish\n- wait\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#107] Add a CI step
Problem: now that we have NixOS tests for tezos modules, we should
run them in our pipeline.
Solution: added a buildkite step to run tests/tezos-modules.nix
|
603,652
|
11.05.2021 15:30:35
| -10,800
|
611f9ca3d3ff48160c848f0e14692e97020b4dbd
|
DROP ME BEFORE MERGING
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline.yml",
"new_path": ".buildkite/pipeline.yml",
"diff": "@@ -73,50 +73,50 @@ steps:\n- nix-build tests/tezos-binaries.nix --no-out-link --arg path-to-binaries ./docker\nbranches: \"!master\"\n- - label: test deb source packages via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n- artifact_paths:\n- - ./out/*\n- branches: \"!master\"\n- timeout_in_minutes: 60\n- agents:\n- queue: \"docker\"\n- - label: test deb binary packages via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- # Building all binary packages will take significant amount of time, so we build only one\n- # in order to ensure package generation sanity\n- - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-009-PsFLoren\n- - rm -rf out\n- # It takes much time to build binary package, so we do it only on master\n- branches: \"master\"\n- timeout_in_minutes: 90\n- agents:\n- queue: \"docker\"\n- - label: test rpm source packages via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- - ./docker/docker-tezos-packages.sh --os fedora --type source\n- artifact_paths:\n- - ./out/*\n- branches: \"!master\"\n- timeout_in_minutes: 60\n- agents:\n- queue: \"docker\"\n- - label: test rpm binary packages via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- # Building all binary packages will take significant amount of time, so we build only one\n- # in order to ensure package generation sanity\n- - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-009-PsFLoren\n- - rm -rf out\n- # It takes much time to build binary package, so we do it only on master\n- branches: \"master\"\n- timeout_in_minutes: 90\n- agents:\n- queue: \"docker\"\n+# - label: test deb source packages via docker\n+# commands:\n+# - eval \"$SET_VERSION\"\n+# - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n+# artifact_paths:\n+# - ./out/*\n+# branches: \"!master\"\n+# timeout_in_minutes: 60\n+# agents:\n+# queue: \"docker\"\n+# - label: test deb binary packages via docker\n+# commands:\n+# - eval \"$SET_VERSION\"\n+# # Building all binary packages will take significant amount of time, so we build only one\n+# # in order to ensure package generation sanity\n+# - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n+# - rm -rf out\n+# # It takes much time to build binary package, so we do it only on master\n+# branches: \"master\"\n+# timeout_in_minutes: 90\n+# agents:\n+# queue: \"docker\"\n+# - label: test rpm source packages via docker\n+# commands:\n+# - eval \"$SET_VERSION\"\n+# - ./docker/docker-tezos-packages.sh --os fedora --type source\n+# artifact_paths:\n+# - ./out/*\n+# branches: \"!master\"\n+# timeout_in_minutes: 60\n+# agents:\n+# queue: \"docker\"\n+# - label: test rpm binary packages via docker\n+# commands:\n+# - eval \"$SET_VERSION\"\n+# # Building all binary packages will take significant amount of time, so we build only one\n+# # in order to ensure package generation sanity\n+# - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n+# - rm -rf out\n+# # It takes much time to build binary package, so we do it only on master\n+# branches: \"master\"\n+# timeout_in_minutes: 90\n+# agents:\n+# queue: \"docker\"\n- wait\n- label: create auto pre-release\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
DROP ME BEFORE MERGING
|
603,652
|
18.05.2021 12:26:51
| -10,800
|
5b746d3f8ecf0f00a8ac85a3ae7d7347ce7f91a3
|
Add pipeline-filtering tests
Problem: Now pipeline-filtering algorithm is rather complex and we
should have a way to test it.
Solution: Add a tests that check whether filtering works as expected for
an example dependency tree from the filter-pipeline.py description.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -13,6 +13,11 @@ steps:\n- label: crossref-verify\ncommand: \"nix run -f https://github.com/serokell/crossref-verifier/archive/68a1f9d25b6e7835fea8299b18a3e6c61dbb2a5c.tar.gz -c crossref-verify\"\nsoft_fail: true\n+ - label: pipeline-filtering\n+ command: nix-shell .buildkite/shell.nix --run 'nix run -f . pkgs.bats -c ./tests/buildkite/filter-pipeline.bats'\n+ only_changes:\n+ - .buildkite/filter-pipeline.py\n+ - tests/buildkite/.*\n- label: build via nix\ncommands:\n"
},
{
"change_type": "MODIFY",
"old_path": ".reuse/dep5",
"new_path": ".reuse/dep5",
"diff": "Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/\n-Files: .github/* nix/nix/* protocols.json meta.json\n+Files: .github/* nix/nix/* protocols.json meta.json tests/buildkite/golden/*\nCopyright: TQ Tezos <https://tqtezos.com>\nLicense: LicenseRef-MIT-TQ\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/buildkite/filter-pipeline.bats",
"diff": "+#!/usr/bin/env bats\n+\n+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+function setup() {\n+ src=\"tests/buildkite/pipeline-raw.yml\"\n+ filter_script=\".buildkite/filter-pipeline.py\"\n+}\n+\n+@test \"trigger steps A and X\" {\n+ \"$filter_script\" --pipeline \"$src\" --git-diff \"A\" --output tests/buildkite/pipeline.yml\n+ diff tests/buildkite/pipeline.yml tests/buildkite/golden/pipeline-A.yml\n+}\n+\n+@test \"trigger steps C and X\" {\n+ \"$filter_script\" --pipeline \"$src\" --git-diff \"C\" --output tests/buildkite/pipeline.yml\n+ diff tests/buildkite/pipeline.yml tests/buildkite/golden/pipeline-C.yml\n+}\n+\n+@test \"trigger steps G and X\" {\n+ \"$filter_script\" --pipeline \"$src\" --git-diff \"G\" --output tests/buildkite/pipeline.yml\n+ diff tests/buildkite/pipeline.yml tests/buildkite/golden/pipeline-G.yml\n+}\n+\n+@test \"trigger only step X\" {\n+ \"$filter_script\" --pipeline \"$src\" --git-diff \"\" --output tests/buildkite/pipeline.yml\n+ diff tests/buildkite/pipeline.yml tests/buildkite/golden/pipeline-X.yml\n+}\n+\n+function teardown() {\n+ rm tests/buildkite/pipeline.yml\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/buildkite/golden/pipeline-A.yml",
"diff": "+steps:\n+- label: A\n+- depends_on:\n+ - A\n+ label: B\n+- depends_on:\n+ - A\n+ label: C\n+- depends_on:\n+ - B\n+ label: D\n+- depends_on:\n+ - C\n+ label: E\n+- depends_on:\n+ - D\n+ label: F\n+- depends_on:\n+ - E\n+ - D\n+ label: G\n+- depends_on:\n+ - E\n+ label: H\n+- depends_on:\n+ - A\n+ label: X\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/buildkite/golden/pipeline-C.yml",
"diff": "+steps:\n+- label: A\n+- depends_on:\n+ - A\n+ label: B\n+- depends_on:\n+ - A\n+ label: C\n+- depends_on:\n+ - B\n+ label: D\n+- depends_on:\n+ - C\n+ label: E\n+- depends_on:\n+ - D\n+ label: F\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - E\n+ - D\n+ label: G\n+- depends_on:\n+ - E\n+ label: H\n+- depends_on:\n+ - A\n+ label: X\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/buildkite/golden/pipeline-G.yml",
"diff": "+steps:\n+- label: A\n+- depends_on:\n+ - A\n+ label: B\n+- depends_on:\n+ - A\n+ label: C\n+- depends_on:\n+ - B\n+ label: D\n+- depends_on:\n+ - C\n+ label: E\n+- depends_on:\n+ - D\n+ label: F\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - E\n+ - D\n+ label: G\n+- depends_on:\n+ - E\n+ label: H\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - A\n+ label: X\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/buildkite/golden/pipeline-X.yml",
"diff": "+steps:\n+- label: A\n+- depends_on:\n+ - A\n+ label: B\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - A\n+ label: C\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - B\n+ label: D\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - C\n+ label: E\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - D\n+ label: F\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - E\n+ - D\n+ label: G\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - E\n+ label: H\n+ skip: skipped due to lack of changes\n+- depends_on:\n+ - A\n+ label: X\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/buildkite/pipeline-raw.yml",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+steps:\n+ - label: A\n+ only_changes:\n+ - A\n+ - label: B\n+ depends_on:\n+ - A\n+ only_changes:\n+ - B\n+ - label: C\n+ depends_on:\n+ - A\n+ only_changes:\n+ - C\n+ - label: D\n+ depends_on:\n+ - B\n+ only_changes:\n+ - B\n+ - label: E\n+ depends_on:\n+ - C\n+ only_changes:\n+ - E\n+ - label: F\n+ depends_on:\n+ - D\n+ only_changes:\n+ - F\n+ - label: G\n+ depends_on:\n+ - E\n+ - D\n+ only_changes:\n+ - G\n+ - label: H\n+ depends_on:\n+ - E\n+ only_changes:\n+ - H\n+ - label: X\n+ depends_on:\n+ - A\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#195] Add pipeline-filtering tests
Problem: Now pipeline-filtering algorithm is rather complex and we
should have a way to test it.
Solution: Add a tests that check whether filtering works as expected for
an example dependency tree from the filter-pipeline.py description.
|
603,652
|
20.05.2021 10:11:24
| -10,800
|
eb6e73696e9fb8397f9385339e3049ede6d9f70c
|
Remove old pipeline.yml
Problem: We're going to use a new way to generate pipeline.yml, so its
old version is no longer needed.
Solution: Remove old pipeline.yml.
|
[
{
"change_type": "DELETE",
"old_path": ".buildkite/pipeline.yml",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2019-2020 TQ Tezos <https://tqtezos.com/>\n-#\n-# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-\n-env:\n- SET_VERSION: \"export TEZOS_VERSION=\\\"$(cat nix/nix/sources.json | jq -r '.tezos.ref' | cut -d'/' -f3)\\\"\"\n-\n-steps:\n- - label: reuse lint\n- command: nix run -f . pkgs.reuse -c reuse lint\n- - label: check trailing whitespace\n- command: .buildkite/check-trailing-whitespace.sh\n- - label: crossref-verify\n- command: \"nix run -f https://github.com/serokell/crossref-verifier/archive/68a1f9d25b6e7835fea8299b18a3e6c61dbb2a5c.tar.gz -c crossref-verify\"\n- soft_fail: true\n-\n- - label: build via nix\n- commands:\n- - nix-build ./nix -A binaries -o binaries\n- branches: \"!master\"\n- - label: test nix-built binaries\n- commands:\n- - nix-build tests/tezos-nix-binaries.nix --no-out-link\n- branches: \"!master\"\n-\n- - label: build via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- - cd docker\n- - ./docker-static-build.sh\n- - nix run -f.. pkgs.upx -c upx tezos-*\n- artifact_paths:\n- - ./docker/tezos-*\n- agents:\n- queue: \"docker\"\n- # arm builer is an ubuntu machine without nix\n- - label: build arm via docker\n- commands:\n- - eval \"$SET_VERSION\"\n- - cd docker\n- - ./docker-static-build.sh\n- - upx tezos-*\n- - >\n- for f in ./tezos-*; do\n- mv \"\\$f\" \"\\$f-arm64\"\n- done\n- artifact_paths:\n- - ./docker/tezos-*\n- agents:\n- queue: \"arm64-build\"\n-\n- - label: check brew formulas\n- commands:\n- # Check all formulas except 'tezos.rb' because it's a base class for all other formulas\n- - find ./Formula -type f -name \"*.rb\" -exec ruby -c {} +\n- # All formulas share the same source URL inherited by the Tezos class, so it's fine\n- # to fetch sources for only one formula\n- - brew fetch -s ./Formula/tezos-client.rb\n- agents:\n- queue: \"x86_64-darwin\"\n-\n- - label: test nixos modules\n- commands:\n- - nix-build tests/tezos-modules.nix --no-out-link\n-\n- # binaries built by docker are tested on the another machine,\n- # so we should wait for docker build to finish\n- - wait\n- - label: test docker-built binaries\n- commands:\n- - buildkite-agent artifact download \"docker/*\" . --step \"build via docker\"\n- - chmod +x ./docker/*\n- - nix-build tests/tezos-binaries.nix --no-out-link --arg path-to-binaries ./docker\n- branches: \"!master\"\n-\n-# - label: test deb source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 60\n-# agents:\n-# queue: \"docker\"\n-# - label: test deb binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n-# - label: test rpm source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os fedora --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 60\n-# agents:\n-# queue: \"docker\"\n-# - label: test rpm binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n-\n- - wait\n- - label: create auto pre-release\n- commands:\n- - mkdir binaries\n- - mkdir arm-binaries\n- - buildkite-agent artifact download \"docker/*\" binaries --step \"build via docker\"\n- - buildkite-agent artifact download \"docker/*\" arm-binaries --step \"build arm via docker\"\n- - ls binaries\n- - ./scripts/autorelease.sh\n- branches: master\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#195] Remove old pipeline.yml
Problem: We're going to use a new way to generate pipeline.yml, so its
old version is no longer needed.
Solution: Remove old pipeline.yml.
|
603,652
|
29.04.2021 14:09:21
| -10,800
|
dbaaf20443f6e74c44afeaf473d89481b688123f
|
Add python formatter to CI
Problem: We now have quite a lot of python code which isn't in the best
shape.
Solution: Use 'black' in CI to be sure that our code is formatted
consistently and this formatting doesn't look ugly.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -13,6 +13,8 @@ steps:\n- label: crossref-verify\ncommand: \"nix run -f https://github.com/serokell/crossref-verifier/archive/68a1f9d25b6e7835fea8299b18a3e6c61dbb2a5c.tar.gz -c crossref-verify\"\nsoft_fail: true\n+ - label: lint python code\n+ command: nix run -f . pkgs.python39Packages.black -c black --check --diff --color .\n- label: pipeline-filtering\ncommand: nix-shell .buildkite/shell.nix --run 'nix run -f . pkgs.bats -c ./tests/buildkite/filter-pipeline.bats'\nonly_changes:\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#175] Add python formatter to CI
Problem: We now have quite a lot of python code which isn't in the best
shape.
Solution: Use 'black' in CI to be sure that our code is formatted
consistently and this formatting doesn't look ugly.
|
603,652
|
29.04.2021 14:28:57
| -10,800
|
478f632a6d2d14b113865aa8f40d4f626d8904c7
|
Move systemd-related code to a new module
Problem: model.py module is quite huge, also it contains a mix up of
classes required for both native packages and systemd services.
Solution: Move systemd-related classes and functions to a dedicated
module.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -6,85 +6,14 @@ import os, shutil, sys, subprocess, json\nfrom abc import ABCMeta, abstractmethod\nfrom typing import List, Dict\n-# There are more possible fields, but only these are used by tezos services\n-class Service:\n- def __init__(\n- self,\n- exec_start: str,\n- state_directory: str,\n- user: str,\n- exec_start_pre: str = None,\n- exec_start_post: str = None,\n- exec_stop_post: str = None,\n- timeout_start_sec: str = None,\n- environment_file: str = None,\n- environment: List[str] = [],\n- remain_after_exit: bool = False,\n- type_: str = None,\n- restart: str = None,\n- keyring_mode: str = None,\n- ):\n- self.environment_file = environment_file\n- self.environment = environment\n- self.exec_start = exec_start\n- self.exec_start_pre = exec_start_pre\n- self.exec_start_post = exec_start_post\n- self.exec_stop_post = exec_stop_post\n- self.timeout_start_sec = timeout_start_sec\n- self.state_directory = state_directory\n- self.user = user\n- self.remain_after_exit = remain_after_exit\n- self.type_ = type_\n- self.restart = restart\n- self.keyring_mode = keyring_mode\n-\n-\n-class Unit:\n- def __init__(\n- self,\n- after: List[str],\n- description: str,\n- requires: List[str] = [],\n- part_of: List[str] = [],\n- ):\n- self.after = after\n- self.requires = requires\n- self.part_of = part_of\n- self.description = description\n-\n-\n-class Install:\n- def __init__(self, wanted_by: List[str] = []):\n- self.wanted_by = wanted_by\n-\n-\n-class ServiceFile:\n- def __init__(self, unit: Unit, service: Service, install: Install):\n- self.unit = unit\n- self.service = service\n- self.install = install\n-\n-\n-class SystemdUnit:\n- def __init__(\n- self,\n- service_file: ServiceFile,\n- startup_script: str = None,\n- startup_script_source: str = None,\n- prestart_script: str = None,\n- prestart_script_source: str = None,\n- suffix: str = None,\n- config_file: str = None,\n- instances: List[str] = [],\n- ):\n- self.suffix = suffix\n- self.service_file = service_file\n- self.startup_script = startup_script\n- self.startup_script_source = startup_script_source\n- self.prestart_script = prestart_script\n- self.prestart_script_source = prestart_script_source\n- self.config_file = config_file\n- self.instances = instances\n+from .systemd import (\n+ Install,\n+ Service,\n+ ServiceFile,\n+ SystemdUnit,\n+ Unit,\n+ print_service_file,\n+)\nclass AbstractPackage:\n@@ -527,63 +456,6 @@ install: tezos-sapling-params\nf.write(rules_contents)\n-def print_service_file(service_file: ServiceFile, out):\n- after = \"\".join(map(lambda x: f\"After={x}\\n\", service_file.unit.after))\n- requires = \"\".join(map(lambda x: f\"Requires={x}\\n\", service_file.unit.requires))\n- part_of = \"\".join(map(lambda x: f\"PartOf={x}\\n\", service_file.unit.part_of))\n- environment = \"\".join(\n- map(lambda x: f'Environment=\"{x}\"\\n', service_file.service.environment)\n- )\n- environment_file = (\n- \"\"\n- if service_file.service.environment_file is None\n- else f\"EnvironmentFile={service_file.service.environment_file}\"\n- )\n- wanted_by = \"\".join(\n- map(lambda x: f'WantedBy=\"{x}\"\\n', service_file.install.wanted_by)\n- )\n- exec_start_pres = (\n- \"\\n\".join(f\"ExecStartPre={x}\" for x in service_file.service.exec_start_pre)\n- if service_file.service.exec_start_pre is not None\n- else \"\"\n- )\n- exec_start_posts = (\n- \"\\n\".join(f\"ExecStartPost={x}\" for x in service_file.service.exec_start_post)\n- if service_file.service.exec_start_post is not None\n- else \"\"\n- )\n- exec_stop_posts = (\n- \"\\n\".join(f\"ExecStopPost={x}\" for x in service_file.service.exec_stop_post)\n- if service_file.service.exec_stop_post is not None\n- else \"\"\n- )\n- file_contents = f\"\"\"# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n-#\n-# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-[Unit]\n-{after}{requires}{part_of}Description={service_file.unit.description}\n-[Service]\n-{environment_file}\n-{environment}\n-{exec_start_pres}\n-{f\"TimeoutStartSec={service_file.service.timeout_start_sec}\" if service_file.service.timeout_start_sec is not None else \"\"}\n-ExecStart={service_file.service.exec_start}\n-{exec_start_posts}\n-{exec_stop_posts}\n-StateDirectory={service_file.service.state_directory}\n-User={service_file.service.user}\n-Group={service_file.service.user}\n-{\"RemainAfterExit=yes\" if service_file.service.remain_after_exit else \"\"}\n-{f\"Type={service_file.service.type_}\" if service_file.service.type_ is not None else \"\"}\n-{f\"Restart={service_file.service.restart}\" if service_file.service.restart is not None else \"\"}\n-{f\"KeyringMode={service_file.service.keyring_mode}\" if service_file.service.keyring_mode is not None else \"\"}\n-[Install]\n-{wanted_by}\n-\"\"\"\n- with open(out, \"w\") as f:\n- f.write(file_contents)\n-\n-\nclass TezosBakingServicesPackage(AbstractPackage):\ndef __init__(\nself, target_networks: List[str], network_protos: Dict[str, List[str]]\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/systemd.py",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+from typing import List\n+\n+# There are more possible fields, but only these are used by tezos services\n+class Service:\n+ def __init__(\n+ self,\n+ exec_start: str,\n+ state_directory: str,\n+ user: str,\n+ exec_start_pre: str = None,\n+ exec_start_post: str = None,\n+ exec_stop_post: str = None,\n+ timeout_start_sec: str = None,\n+ environment_file: str = None,\n+ environment: List[str] = [],\n+ remain_after_exit: bool = False,\n+ type_: str = None,\n+ restart: str = None,\n+ keyring_mode: str = None,\n+ ):\n+ self.environment_file = environment_file\n+ self.environment = environment\n+ self.exec_start = exec_start\n+ self.exec_start_pre = exec_start_pre\n+ self.exec_start_post = exec_start_post\n+ self.exec_stop_post = exec_stop_post\n+ self.timeout_start_sec = timeout_start_sec\n+ self.state_directory = state_directory\n+ self.user = user\n+ self.remain_after_exit = remain_after_exit\n+ self.type_ = type_\n+ self.restart = restart\n+ self.keyring_mode = keyring_mode\n+\n+\n+class Unit:\n+ def __init__(\n+ self,\n+ after: List[str],\n+ description: str,\n+ requires: List[str] = [],\n+ part_of: List[str] = [],\n+ ):\n+ self.after = after\n+ self.requires = requires\n+ self.part_of = part_of\n+ self.description = description\n+\n+\n+class Install:\n+ def __init__(self, wanted_by: List[str] = []):\n+ self.wanted_by = wanted_by\n+\n+\n+class ServiceFile:\n+ def __init__(self, unit: Unit, service: Service, install: Install):\n+ self.unit = unit\n+ self.service = service\n+ self.install = install\n+\n+\n+class SystemdUnit:\n+ def __init__(\n+ self,\n+ service_file: ServiceFile,\n+ startup_script: str = None,\n+ startup_script_source: str = None,\n+ prestart_script: str = None,\n+ prestart_script_source: str = None,\n+ suffix: str = None,\n+ config_file: str = None,\n+ instances: List[str] = [],\n+ ):\n+ self.suffix = suffix\n+ self.service_file = service_file\n+ self.startup_script = startup_script\n+ self.startup_script_source = startup_script_source\n+ self.prestart_script = prestart_script\n+ self.prestart_script_source = prestart_script_source\n+ self.config_file = config_file\n+ self.instances = instances\n+\n+\n+def print_service_file(service_file: ServiceFile, out):\n+ after = \"\".join(map(lambda x: f\"After={x}\\n\", service_file.unit.after))\n+ requires = \"\".join(map(lambda x: f\"Requires={x}\\n\", service_file.unit.requires))\n+ part_of = \"\".join(map(lambda x: f\"PartOf={x}\\n\", service_file.unit.part_of))\n+ environment = \"\".join(\n+ map(lambda x: f'Environment=\"{x}\"\\n', service_file.service.environment)\n+ )\n+ environment_file = (\n+ \"\"\n+ if service_file.service.environment_file is None\n+ else f\"EnvironmentFile={service_file.service.environment_file}\"\n+ )\n+ wanted_by = \"\".join(\n+ map(lambda x: f'WantedBy=\"{x}\"\\n', service_file.install.wanted_by)\n+ )\n+ exec_start_pres = (\n+ \"\\n\".join(f\"ExecStartPre={x}\" for x in service_file.service.exec_start_pre)\n+ if service_file.service.exec_start_pre is not None\n+ else \"\"\n+ )\n+ exec_start_posts = (\n+ \"\\n\".join(f\"ExecStartPost={x}\" for x in service_file.service.exec_start_post)\n+ if service_file.service.exec_start_post is not None\n+ else \"\"\n+ )\n+ exec_stop_posts = (\n+ \"\\n\".join(f\"ExecStopPost={x}\" for x in service_file.service.exec_stop_post)\n+ if service_file.service.exec_stop_post is not None\n+ else \"\"\n+ )\n+ file_contents = f\"\"\"# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+[Unit]\n+{after}{requires}{part_of}Description={service_file.unit.description}\n+[Service]\n+{environment_file}\n+{environment}\n+{exec_start_pres}\n+{f\"TimeoutStartSec={service_file.service.timeout_start_sec}\" if service_file.service.timeout_start_sec is not None else \"\"}\n+ExecStart={service_file.service.exec_start}\n+{exec_start_posts}\n+{exec_stop_posts}\n+StateDirectory={service_file.service.state_directory}\n+User={service_file.service.user}\n+Group={service_file.service.user}\n+{\"RemainAfterExit=yes\" if service_file.service.remain_after_exit else \"\"}\n+{f\"Type={service_file.service.type_}\" if service_file.service.type_ is not None else \"\"}\n+{f\"Restart={service_file.service.restart}\" if service_file.service.restart is not None else \"\"}\n+{f\"KeyringMode={service_file.service.keyring_mode}\" if service_file.service.keyring_mode is not None else \"\"}\n+[Install]\n+{wanted_by}\n+\"\"\"\n+ with open(out, \"w\") as f:\n+ f.write(file_contents)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#175] Move systemd-related code to a new module
Problem: model.py module is quite huge, also it contains a mix up of
classes required for both native packages and systemd services.
Solution: Move systemd-related classes and functions to a dedicated
module.
|
603,652
|
04.05.2021 13:37:23
| -10,800
|
217ae607b33171f15d42bf3b936e35cdd0303516
|
Extract ubuntu package building
Problem: package_generator module is quite big and it's hard to navigate
through it.
Solution: Move ubuntu package building to a dedicated module.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-ubuntu",
"new_path": "docker/package/Dockerfile-ubuntu",
"diff": "@@ -21,4 +21,5 @@ RUN opam install opam-bundle=0.4 --yes\nCOPY docker/package/*.py /tezos-packaging/docker/package/\nCOPY docker/package/defaults /tezos-packaging/docker/package/defaults\nCOPY docker/package/scripts /tezos-packaging/docker/package/scripts\n+COPY LICENSE /tezos-packaging/LICENSE\nENTRYPOINT [\"python3\", \"-m\", \"package.package_generator\"]\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "# SPDX-License-Identifier: LicenseRef-MIT-TQ\nimport os, subprocess\n+import shutil\nfrom abc import abstractmethod\nfrom typing import List, Dict\n@@ -60,15 +61,19 @@ class AbstractPackage:\ndef gen_postrm(self, out):\npass\n+ @abstractmethod\n+ def gen_license(self, out):\n+ pass\n+\ndef gen_spec_systemd_part(package):\nsystemd_units = package.systemd_units\nstartup_scripts = list(\n- set(map(lambda x: x.startup_script, package.systemd_units))\n- ) + list(set(map(lambda x: x.prestart_script, package.systemd_units)))\n+ set(map(lambda x: x.startup_script, systemd_units))\n+ ) + list(set(map(lambda x: x.prestart_script, systemd_units)))\nconfig_files = list(\nfilter(\n- lambda x: x is not None, map(lambda x: x.config_file, package.systemd_units)\n+ lambda x: x is not None, map(lambda x: x.config_file, systemd_units)\n)\n)\ninstall_unit_files = \"\"\n@@ -138,21 +143,19 @@ mkdir -p %{{buildroot}}/%{{_unitdir}}\ndef gen_systemd_rules_contents(package):\noverride_dh_install_init = \"override_dh_installinit:\\n\"\n+ package_name = package.name.lower()\nfor systemd_unit in package.systemd_units:\nif len(systemd_unit.instances) == 0:\nif systemd_unit.suffix is not None:\n- override_dh_install_init += f\" dh_installinit --name={package.name.lower()}-{systemd_unit.suffix}\\n\"\n+ unit_name = f\"{package_name}-{systemd_unit.suffix}\"\nelse:\n- override_dh_install_init += (\n- f\" dh_installinit --name={package.name.lower()}\\n\"\n- )\n+ unit_name = f\"{package_name}\"\nelse:\nif systemd_unit.suffix is not None:\n- override_dh_install_init += f\" dh_installinit --name={package.name.lower()}-{systemd_unit.suffix}@\\n\"\n+ unit_name = f\"{package_name}-{systemd_unit.suffix}@\"\nelse:\n- override_dh_install_init += (\n- f\" dh_installinit --name={package.name.lower()}@\\n\"\n- )\n+ unit_name = f\"{package_name}@\"\n+ override_dh_install_init += f\" dh_installinit --name={unit_name}\\n\"\nrules_contents = f\"\"\"#!/usr/bin/make -f\n%:\n@@ -332,6 +335,18 @@ set -e\nwith open(out, \"w\") as f:\nf.write(postrm_contents)\n+ def gen_license(self, out):\n+ subprocess.run(\n+ [\n+ \"wget\",\n+ \"-q\",\n+ \"-O\",\n+ out,\n+ f\"https://gitlab.com/tezos/tezos/-/raw/v{self.meta.version}/LICENSE\",\n+ ],\n+ check=True,\n+ )\n+\nclass TezosSaplingParamsPackage(AbstractPackage):\ndef __init__(self, meta: PackagesMeta):\n@@ -434,6 +449,9 @@ install: tezos-sapling-params\nwith open(out, \"w\") as f:\nf.write(rules_contents)\n+ def gen_license(self, out):\n+ shutil.copy(f\"{os.path.dirname(__file__)}/../../LICENSE\", out)\n+\nclass TezosBakingServicesPackage(AbstractPackage):\ndef __init__(\n@@ -606,3 +624,6 @@ install: tezos-baking\n)\nwith open(out, \"w\") as f:\nf.write(install_contents)\n+\n+ def gen_license(self, out):\n+ shutil.copy(f\"{os.path.dirname(__file__)}/../../LICENSE\", out)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/package_generator.py",
"new_path": "docker/package/package_generator.py",
"diff": "@@ -8,6 +8,7 @@ from distutils.dir_util import copy_tree\nfrom .model import OpamBasedPackage\nfrom .systemd import print_service_file\nfrom .packages import packages\n+from .ubuntu import build_ubuntu_package\nis_ubuntu = None\nis_source = None\n@@ -44,9 +45,6 @@ else:\npackage_to_build = args.package\nsource_archive = args.sources\n-date = subprocess.check_output([\"date\", \"-R\"]).decode().strip()\n-meta = json.load(open(f\"{os.path.dirname(__file__)}/../../meta.json\", \"r\"))\n-\nif is_ubuntu:\nrun_deps = [\"libev-dev\", \"libgmp-dev\", \"libhidapi-dev\", \"libffi-dev\"]\nelse:\n@@ -64,9 +62,6 @@ build_deps = [\n]\ncommon_deps = run_deps + build_deps\n-version = os.environ[\"TEZOS_VERSION\"][1:]\n-release = f\"{meta['release']}\"\n-\nubuntu_versions = [\"bionic\", \"focal\", \"groovy\"] # 18.04 # 20.04 # 20.10\npwd = os.getcwd()\n@@ -75,105 +70,11 @@ home = os.environ[\"HOME\"]\nfor package in packages:\nif package_to_build is None or package.name == package_to_build:\nif is_ubuntu:\n- dir = f\"{package.name.lower()}-{version}\"\n- else:\n- dir = f\"{package.name}-{version}\"\n- if source_archive is None:\n- package.fetch_sources(dir)\n- package.gen_makefile(f\"{dir}/Makefile\")\n- if not is_ubuntu:\n- subprocess.run(\n- [\n- \"wget\",\n- \"-q\",\n- \"-O\",\n- f\"{dir}/LICENSE\",\n- f\"https://gitlab.com/tezos/tezos/-/raw/v{version}/LICENSE\",\n- ],\n- check=True,\n- )\n- if is_ubuntu:\n- if source_archive is None:\n- subprocess.run([\"tar\", \"-czf\", f\"{dir}.tar.gz\", dir], check=True)\n- else:\n- shutil.copy(\n- f\"{os.path.dirname(__file__)}/../{source_archive}\", f\"{dir}.tar.gz\"\n- )\n- subprocess.run([\"tar\", \"-xzf\", f\"{dir}.tar.gz\"], check=True)\n- for ubuntu_version in ubuntu_versions:\n- os.chdir(dir)\n- subprocess.run([\"rm\", \"-r\", \"debian\"])\n- subprocess.run([\"dh_make\", \"-syf\" f\"../{dir}.tar.gz\"], check=True)\n- for systemd_unit in package.systemd_units:\n- if systemd_unit.service_file.service.environment_file is not None:\n- systemd_unit.service_file.service.environment_file = (\n- systemd_unit.service_file.service.environment_file.lower()\n- )\n- if systemd_unit.suffix is None:\n- if systemd_unit.config_file is not None:\n- shutil.copy(\n- f\"{os.path.dirname(__file__)}/defaults/{systemd_unit.config_file}\",\n- f\"debian/{package.name.lower()}.default\",\n+ build_ubuntu_package(\n+ package, ubuntu_versions, common_deps, is_source, source_archive\n)\n- out_name = (\n- f\"debian/{package.name.lower()}@.service\"\n- if len(systemd_unit.instances) > 0\n- else f\"debian/{package.name.lower()}.service\"\n- )\n- print_service_file(systemd_unit.service_file, out_name)\n- else:\n- out_name = (\n- f\"debian/{package.name.lower()}-{systemd_unit.suffix}@.service\"\n- if len(systemd_unit.instances) > 0\n- else f\"debian/{package.name.lower()}-{systemd_unit.suffix}.service\"\n- )\n- print_service_file(systemd_unit.service_file, out_name)\n- if systemd_unit.config_file is not None:\n- shutil.copy(\n- f\"{os.path.dirname(__file__)}/defaults/{systemd_unit.config_file}\",\n- f\"debian/{package.name.lower()}-{systemd_unit.suffix}.default\",\n- )\n- if systemd_unit.startup_script is not None:\n- dest = f\"debian/{systemd_unit.startup_script}\"\n- if systemd_unit.startup_script_source is not None:\n- source = f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.startup_script_source}\"\n- else:\n- source = f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.startup_script}\"\n- shutil.copy(source, dest)\n- if systemd_unit.prestart_script is not None:\n- dest = f\"debian/{systemd_unit.prestart_script}\"\n- if systemd_unit.prestart_script_source is not None:\n- source = f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.prestart_script_source}\"\n- else:\n- source = f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.prestart_script}\"\n- shutil.copy(source, dest)\n- package.gen_install(\"debian/install\")\n- package.gen_postinst(\"debian/postinst\")\n- package.gen_postrm(\"debian/postrm\")\n- package.gen_control_file(common_deps, \"debian/control\")\n- subprocess.run(\n- [\n- \"wget\",\n- \"-q\",\n- \"-O\",\n- \"debian/copyright\",\n- f\"https://gitlab.com/tezos/tezos/-/raw/v{version}/LICENSE\",\n- ],\n- check=True,\n- )\n- subprocess.run(\n- \"rm debian/*.ex debian/*.EX debian/README*\", shell=True, check=True\n- )\n- package.gen_changelog(\n- ubuntu_version, meta[\"maintainer\"], date, \"debian/changelog\"\n- )\n- package.gen_rules(\"debian/rules\")\n- subprocess.run(\n- [\"dpkg-buildpackage\", \"-S\" if is_source else \"-b\", \"-us\", \"-uc\"],\n- check=True,\n- )\n- os.chdir(\"..\")\nelse:\n+ dir = f\"{package.name}-{version}\"\nif source_archive is not None:\nraise Exception(\n\"Sources archive provision isn't supported for Fedora packages\"\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/ubuntu.py",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+import os, shutil, subprocess\n+\n+from typing import List\n+\n+from .model import AbstractPackage\n+from .systemd import Service, print_service_file\n+\n+\n+def build_ubuntu_package(\n+ pkg: AbstractPackage,\n+ ubuntu_versions: List[str],\n+ build_deps: List[str],\n+ is_source: bool,\n+ source_archive_path: str = None,\n+):\n+ # ubuntu prohibits uppercase in packages names\n+ pkg_name = pkg.name.lower()\n+ dir = f\"{pkg_name}-{pkg.meta.version}\"\n+ cwd = os.path.dirname(__file__)\n+ date = subprocess.check_output([\"date\", \"-R\"]).decode().strip()\n+\n+ if source_archive_path is None:\n+ pkg.fetch_sources(dir)\n+ pkg.gen_makefile(f\"{dir}/Makefile\")\n+ subprocess.run([\"tar\", \"-czf\", f\"{dir}.tar.gz\", dir], check=True)\n+ else:\n+ shutil.copy(f\"{cwd}/../{source_archive_path}\", f\"{dir}.tar.gz\")\n+ subprocess.run([\"tar\", \"-xzf\", f\"{dir}.tar.gz\"], check=True)\n+ for ubuntu_version in ubuntu_versions:\n+ os.chdir(dir)\n+ subprocess.run([\"rm\", \"-r\", \"debian\"])\n+ subprocess.run([\"dh_make\", \"-syf\" f\"../{dir}.tar.gz\"], check=True)\n+ for systemd_unit in pkg.systemd_units:\n+ if systemd_unit.service_file.service.environment_file is not None:\n+ systemd_unit.service_file.service.environment_file = (\n+ systemd_unit.service_file.service.environment_file.lower()\n+ )\n+ if systemd_unit.suffix is None:\n+ unit_name = pkg_name\n+ else:\n+ unit_name = f\"{pkg_name}-{systemd_unit.suffix}\"\n+ out_path = (\n+ f\"debian/{unit_name}@.service\"\n+ if len(systemd_unit.instances) > 0\n+ else f\"debian/{unit_name}.service\"\n+ )\n+ print_service_file(systemd_unit.service_file, out_path)\n+ if systemd_unit.config_file is not None:\n+ shutil.copy(\n+ f\"{cwd}/defaults/{systemd_unit.config_file}\",\n+ f\"debian/{unit_name}.default\",\n+ )\n+ if systemd_unit.startup_script is not None:\n+ dest_path = f\"debian/{systemd_unit.startup_script}\"\n+ source_script_name = (\n+ systemd_unit.startup_script\n+ if systemd_unit.startup_script_source is None\n+ else systemd_unit.startup_script_source\n+ )\n+ source_path = f\"{cwd}/scripts/{source_script_name}\"\n+ shutil.copy(source_path, dest_path)\n+ if systemd_unit.prestart_script is not None:\n+ dest_path = f\"debian/{systemd_unit.prestart_script}\"\n+ source_path = (\n+ f\"{cwd}/scripts/{systemd_unit.prestart_script}\"\n+ if systemd_unit.prestart_script_source is None\n+ else f\"{cwd}/scripts/{systemd_unit.prestart_script_source}\"\n+ )\n+ shutil.copy(source_path, dest_path)\n+ pkg.gen_install(\"debian/install\")\n+ pkg.gen_rules(\"debian/rules\")\n+ pkg.gen_postinst(\"debian/postinst\")\n+ pkg.gen_postrm(\"debian/postrm\")\n+ pkg.gen_control_file(build_deps, \"debian/control\")\n+ pkg.gen_license(\"debian/copyright\")\n+ subprocess.run(\n+ \"rm debian/*.ex debian/*.EX debian/README*\", shell=True, check=True\n+ )\n+ pkg.gen_changelog(ubuntu_version, pkg.meta.maintainer, date, \"debian/changelog\")\n+ subprocess.run(\n+ [\"dpkg-buildpackage\", \"-S\" if is_source else \"-b\", \"-us\", \"-uc\"],\n+ check=True,\n+ )\n+ os.chdir(\"..\")\n+\n+ subprocess.run(f\"rm -rf {dir}\", shell=True, check=True)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#175] Extract ubuntu package building
Problem: package_generator module is quite big and it's hard to navigate
through it.
Solution: Move ubuntu package building to a dedicated module.
|
603,652
|
04.05.2021 13:17:28
| -10,800
|
456c6b25c383a94d9a435de2c3d690a346562518
|
Extract fedora package building
Problem: Ubuntu package building was moved to a dedicated module, it
makes sense to do the same for Fedora.
Solution: Move Fedora package building to a dedicated module.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-fedora",
"new_path": "docker/package/Dockerfile-fedora",
"diff": "@@ -20,4 +20,5 @@ RUN opam install opam-bundle=0.4 --yes\nCOPY docker/package/*.py /tezos-packaging/docker/package/\nCOPY docker/package/defaults /tezos-packaging/docker/package/defaults\nCOPY docker/package/scripts /tezos-packaging/docker/package/scripts\n+COPY LICENSE /tezos-packaging/LICENSE\nENTRYPOINT [\"python3\", \"-m\", \"package.package_generator\"]\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/fedora.py",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+import os, shutil, subprocess\n+\n+from typing import List\n+\n+from .model import AbstractPackage\n+from .systemd import print_service_file\n+\n+\n+def build_fedora_package(\n+ pkg: AbstractPackage,\n+ build_deps: List[str],\n+ run_deps: List[str],\n+ is_source: bool,\n+):\n+ dir = f\"{pkg.name}-{pkg.meta.version}\"\n+ cwd = os.path.dirname(__file__)\n+ home = os.environ[\"HOME\"]\n+\n+ pkg.fetch_sources(dir)\n+ pkg.gen_makefile(f\"{dir}/Makefile\")\n+ pkg.gen_license(f\"{dir}/LICENSE\")\n+ for systemd_unit in pkg.systemd_units:\n+ if systemd_unit.service_file.service.environment_file is not None:\n+ systemd_unit.service_file.service.environment_file = (\n+ systemd_unit.service_file.service.environment_file.lower()\n+ )\n+ if systemd_unit.suffix is None:\n+ unit_name = f\"{pkg.name}\"\n+ else:\n+ unit_name = f\"{pkg.name}-{systemd_unit.suffix}\"\n+ out_path = (\n+ f\"{dir}/{unit_name}@.service\"\n+ if len(systemd_unit.instances) > 0\n+ else f\"{dir}/{unit_name}.service\"\n+ )\n+ print_service_file(systemd_unit.service_file, out_path)\n+ if systemd_unit.config_file is not None:\n+ shutil.copy(\n+ f\"{cwd}/defaults/{systemd_unit.config_file}\",\n+ f\"{dir}/{unit_name}.default\",\n+ )\n+ if systemd_unit.startup_script is not None:\n+ dest_path = f\"{dir}/{systemd_unit.startup_script}\"\n+ source_script_name = (\n+ systemd_unit.startup_script\n+ if systemd_unit.startup_script_source is None\n+ else systemd_unit.startup_script_source\n+ )\n+ source_path = f\"{cwd}/scripts/{source_script_name}\"\n+ shutil.copy(source_path, dest_path)\n+ if systemd_unit.prestart_script is not None:\n+ dest_path = f\"{dir}/{systemd_unit.prestart_script}\"\n+ source_path = (\n+ f\"{cwd}/scripts/{systemd_unit.prestart_script}\"\n+ if systemd_unit.prestart_script_source is None\n+ else f\"{cwd}/scripts/{systemd_unit.prestart_script_source}\"\n+ )\n+ shutil.copy(source_path, dest_path)\n+ subprocess.run([\"tar\", \"-czf\", f\"{dir}.tar.gz\", dir], check=True)\n+ os.makedirs(f\"{home}/rpmbuild/SPECS\", exist_ok=True)\n+ os.makedirs(f\"{home}/rpmbuild/SOURCES\", exist_ok=True)\n+ pkg.gen_spec_file(\n+ build_deps + run_deps, run_deps, f\"{home}/rpmbuild/SPECS/{pkg.name}.spec\"\n+ )\n+ os.rename(f\"{dir}.tar.gz\", f\"{home}/rpmbuild/SOURCES/{dir}.tar.gz\")\n+ subprocess.run(\n+ [\n+ \"rpmbuild\",\n+ \"-bs\" if is_source else \"-bb\",\n+ f\"{home}/rpmbuild/SPECS/{pkg.name}.spec\",\n+ ],\n+ check=True,\n+ )\n+\n+ subprocess.run(f\"rm -rf {dir}\", shell=True, check=True)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -68,13 +68,11 @@ class AbstractPackage:\ndef gen_spec_systemd_part(package):\nsystemd_units = package.systemd_units\n- startup_scripts = list(\n- set(map(lambda x: x.startup_script, systemd_units))\n- ) + list(set(map(lambda x: x.prestart_script, systemd_units)))\n- config_files = list(\n- filter(\n- lambda x: x is not None, map(lambda x: x.config_file, systemd_units)\n+ startup_scripts = list(set(map(lambda x: x.startup_script, systemd_units))) + list(\n+ set(map(lambda x: x.prestart_script, systemd_units))\n)\n+ config_files = list(\n+ filter(lambda x: x is not None, map(lambda x: x.config_file, systemd_units))\n)\ninstall_unit_files = \"\"\nsystemd_unit_files = \"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/package_generator.py",
"new_path": "docker/package/package_generator.py",
"diff": "#\n# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-import os, shutil, sys, subprocess, json, argparse\n-from distutils.dir_util import copy_tree\n+import os, shutil, argparse\n-from .model import OpamBasedPackage\n-from .systemd import print_service_file\n+from .fedora import build_fedora_package\nfrom .packages import packages\nfrom .ubuntu import build_ubuntu_package\n@@ -74,66 +72,7 @@ for package in packages:\npackage, ubuntu_versions, common_deps, is_source, source_archive\n)\nelse:\n- dir = f\"{package.name}-{version}\"\n- if source_archive is not None:\n- raise Exception(\n- \"Sources archive provision isn't supported for Fedora packages\"\n- )\n- for systemd_unit in package.systemd_units:\n- if systemd_unit.suffix is None:\n- out_name = (\n- f\"{dir}/{package.name}@.service\"\n- if len(systemd_unit.instances) > 0\n- else f\"{dir}/{package.name}.service\"\n- )\n- print_service_file(systemd_unit.service_file, out_name)\n- if systemd_unit.config_file is not None:\n- shutil.copy(\n- f\"{os.path.dirname(__file__)}/defaults/{systemd_unit.config_file}\",\n- f\"{dir}/{package.name}.default\",\n- )\n- else:\n- out_name = (\n- f\"{dir}/{package.name}-{systemd_unit.suffix}@.service\"\n- if len(systemd_unit.instances) > 0\n- else f\"{dir}/{package.name}-{systemd_unit.suffix}.service\"\n- )\n- print_service_file(systemd_unit.service_file, out_name)\n- if systemd_unit.config_file is not None:\n- shutil.copy(\n- f\"{os.path.dirname(__file__)}/defaults/{systemd_unit.config_file}\",\n- f\"{dir}/{package.name}-{systemd_unit.suffix}.default\",\n- )\n- if systemd_unit.startup_script is not None:\n- dest = f\"{dir}/{systemd_unit.startup_script}\"\n- if systemd_unit.startup_script_source is not None:\n- source = f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.startup_script_source}\"\n- else:\n- source = f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.startup_script}\"\n- shutil.copy(source, dest)\n- if systemd_unit.prestart_script is not None:\n- dest = f\"{dir}/{systemd_unit.prestart_script}\"\n- if systemd_unit.prestart_script_source is not None:\n- source = f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.prestart_script_source}\"\n- else:\n- source = f\"{os.path.dirname(__file__)}/scripts/{systemd_unit.prestart_script}\"\n- shutil.copy(source, dest)\n- subprocess.run([\"tar\", \"-czf\", f\"{dir}.tar.gz\", dir], check=True)\n- os.makedirs(f\"{home}/rpmbuild/SPECS\", exist_ok=True)\n- os.makedirs(f\"{home}/rpmbuild/SOURCES\", exist_ok=True)\n- package.gen_spec_file(\n- common_deps, run_deps, f\"{home}/rpmbuild/SPECS/{package.name}.spec\"\n- )\n- os.rename(f\"{dir}.tar.gz\", f\"{home}/rpmbuild/SOURCES/{dir}.tar.gz\")\n- subprocess.run(\n- [\n- \"rpmbuild\",\n- \"-bs\" if is_source else \"-bb\",\n- f\"{home}/rpmbuild/SPECS/{package.name}.spec\",\n- ],\n- check=True,\n- )\n- subprocess.run(f\"rm -rf {dir}\", shell=True, check=True)\n+ build_fedora_package(package, build_deps, run_deps, is_source)\nos.mkdir(\"out\")\nif not is_source:\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#175] Extract fedora package building
Problem: Ubuntu package building was moved to a dedicated module, it
makes sense to do the same for Fedora.
Solution: Move Fedora package building to a dedicated module.
|
603,652
|
13.05.2021 14:43:49
| -10,800
|
48842d8bfcfc000acc1cd5c3b0d843510315d1a5
|
Various deduplications and refactoring
Some changes that generally improve code quality.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -35,7 +35,6 @@ class AbstractPackage:\ndef gen_makefile(self, out):\npass\n- @abstractmethod\ndef gen_changelog(self, ubuntu_version, maintainer, date, out):\nchangelog_contents = f\"\"\"{self.name.lower()} ({self.meta.ubuntu_epoch}:{self.meta.version}-0ubuntu{self.meta.release}~{ubuntu_version}) {ubuntu_version}; urgency=medium\n@@ -49,9 +48,27 @@ class AbstractPackage:\ndef gen_rules(self, out):\npass\n- @abstractmethod\ndef gen_install(self, out):\n- pass\n+ startup_scripts = list(\n+ {\n+ x.startup_script\n+ for x in self.systemd_units\n+ if x.startup_script is not None\n+ }\n+ )\n+ prestart_scripts = list(\n+ {\n+ x.prestart_script\n+ for x in self.systemd_units\n+ if x.prestart_script is not None\n+ }\n+ )\n+ if len(startup_scripts + prestart_scripts) > 0:\n+ install_contents = \"\\n\".join(\n+ [f\"debian/{x} usr/bin\" for x in startup_scripts + prestart_scripts]\n+ )\n+ with open(out, \"w\") as f:\n+ f.write(install_contents)\n@abstractmethod\ndef gen_postinst(self, out):\n@@ -68,12 +85,10 @@ class AbstractPackage:\ndef gen_spec_systemd_part(package):\nsystemd_units = package.systemd_units\n- startup_scripts = list(set(map(lambda x: x.startup_script, systemd_units))) + list(\n- set(map(lambda x: x.prestart_script, systemd_units))\n- )\n- config_files = list(\n- filter(lambda x: x is not None, map(lambda x: x.config_file, systemd_units))\n+ startup_scripts = list({x.startup_script for x in systemd_units}) + list(\n+ {x.prestart_script for x in systemd_units}\n)\n+ config_files = [x.config_file for x in systemd_units if x.config_file is not None]\ninstall_unit_files = \"\"\nsystemd_unit_files = \"\"\nsystemd_units_post = \"\"\n@@ -286,27 +301,6 @@ install: {self.name}\nwith open(out, \"w\") as f:\nf.write(rules_contents)\n- def gen_install(self, out):\n- startup_scripts = list(\n- {\n- x.startup_script\n- for x in self.systemd_units\n- if x.startup_script is not None\n- }\n- )\n- prestart_scripts = list(\n- {\n- x.prestart_script\n- for x in self.systemd_units\n- if x.prestart_script is not None\n- }\n- )\n- install_contents = \"\\n\".join(\n- map(lambda x: f\"debian/{x} usr/bin\", startup_scripts + prestart_scripts)\n- )\n- with open(out, \"w\") as f:\n- f.write(install_contents)\n-\ndef gen_postinst(self, out):\npostinst_contents = f\"\"\"#!/bin/sh\n@@ -602,26 +596,5 @@ install: tezos-baking\nwith open(out, \"w\") as f:\nf.write(rules_contents)\n- def gen_install(self, out):\n- startup_scripts = list(\n- {\n- x.startup_script\n- for x in self.systemd_units\n- if x.startup_script is not None\n- }\n- )\n- prestart_scripts = list(\n- {\n- x.prestart_script\n- for x in self.systemd_units\n- if x.prestart_script is not None\n- }\n- )\n- install_contents = \"\\n\".join(\n- map(lambda x: f\"debian/{x} usr/bin\", startup_scripts + prestart_scripts)\n- )\n- with open(out, \"w\") as f:\n- f.write(install_contents)\n-\ndef gen_license(self, out):\nshutil.copy(f\"{os.path.dirname(__file__)}/../../LICENSE\", out)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/systemd.py",
"new_path": "docker/package/systemd.py",
"diff": "@@ -85,20 +85,18 @@ class SystemdUnit:\ndef print_service_file(service_file: ServiceFile, out):\n- after = \"\".join(map(lambda x: f\"After={x}\\n\", service_file.unit.after))\n- requires = \"\".join(map(lambda x: f\"Requires={x}\\n\", service_file.unit.requires))\n- part_of = \"\".join(map(lambda x: f\"PartOf={x}\\n\", service_file.unit.part_of))\n+ after = \"\".join(f\"After={x}\\n\" for x in service_file.unit.after)\n+ requires = \"\".join(f\"Requires={x}\\n\" for x in service_file.unit.requires)\n+ part_of = \"\".join(f\"PartOf={x}\\n\" for x in service_file.unit.part_of)\nenvironment = \"\".join(\n- map(lambda x: f'Environment=\"{x}\"\\n', service_file.service.environment)\n+ f'Environment=\"{x}\"\\n' for x in service_file.service.environment\n)\nenvironment_file = (\n\"\"\nif service_file.service.environment_file is None\nelse f\"EnvironmentFile={service_file.service.environment_file}\"\n)\n- wanted_by = \"\".join(\n- map(lambda x: f'WantedBy=\"{x}\"\\n', service_file.install.wanted_by)\n- )\n+ wanted_by = \"\".join(f\"WantedBy={x}\\n\" for x in service_file.install.wanted_by)\nexec_start_pres = (\n\"\\n\".join(f\"ExecStartPre={x}\" for x in service_file.service.exec_start_pre)\nif service_file.service.exec_start_pre is not None\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#175] Various deduplications and refactoring
Some changes that generally improve code quality.
|
603,652
|
20.05.2021 11:22:28
| -10,800
|
f0e08364155d535f4df3683fc96be762b43dde56
|
Use Ubuntu 20.04 image for package building
Problem: We want to use some Python features that aren't presented in
3.5 which is the latest version in the Ubuntu 18.04.
Solution: Use image based on 20.04 instead.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-ubuntu",
"new_path": "docker/package/Dockerfile-ubuntu",
"diff": "#\n# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-FROM ubuntu:18.04\n+FROM ubuntu:20.04\n+ENV DEBIAN_FRONTEND=\"noninteractive\"\nRUN apt-get update && apt-get install -y libev-dev libgmp-dev libhidapi-dev libffi-dev m4 perl pkg-config \\\n- debhelper dh-make dh-systemd devscripts autotools-dev python3 python3-distutils wget\n-RUN apt-get install -y software-properties-common && add-apt-repository ppa:avsm/ppa -y && apt-get update && apt-get install -y opam\n+ debhelper dh-make dh-systemd devscripts autotools-dev python3 python3-distutils wget rsync\n+RUN wget https://github.com/ocaml/opam/releases/download/2.0.8/opam-2.0.8-x86_64-linux -O /usr/bin/opam && chmod +x /usr/bin/opam\n+RUN apt-get install -y software-properties-common\nRUN add-apt-repository ppa:ubuntu-mozilla-security/rust-next -y && apt-get update && apt-get -y install cargo\nENV USER dockerbuilder\nRUN useradd dockerbuilder && mkdir /tezos-packaging\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -70,6 +70,8 @@ def build_ubuntu_package(\nelse f\"{cwd}/scripts/{systemd_unit.prestart_script_source}\"\n)\nshutil.copy(source_path, dest_path)\n+ with open(\"debian/compat\", \"w\") as f:\n+ f.write(\"9\")\npkg.gen_install(\"debian/install\")\npkg.gen_rules(\"debian/rules\")\npkg.gen_postinst(\"debian/postinst\")\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#175] Use Ubuntu 20.04 image for package building
Problem: We want to use some Python features that aren't presented in
3.5 which is the latest version in the Ubuntu 18.04.
Solution: Use image based on 20.04 instead.
|
603,652
|
20.05.2021 12:02:06
| -10,800
|
7cffc6ed167e3447928d62f9bd7faa3683fd75d3
|
Use dataclass for systemd-related classes
Problem: Constructors for classes in systemd.py module produce
substantial amount of boilerplate.
Solution: Use in order to generate these boilerplate
constructors.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/fedora.py",
"new_path": "docker/package/fedora.py",
"diff": "@@ -33,7 +33,7 @@ def build_fedora_package(\nunit_name = f\"{pkg.name}-{systemd_unit.suffix}\"\nout_path = (\nf\"{dir}/{unit_name}@.service\"\n- if len(systemd_unit.instances) > 0\n+ if systemd_unit.instances is not None\nelse f\"{dir}/{unit_name}.service\"\n)\nprint_service_file(systemd_unit.service_file, out_path)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -104,7 +104,7 @@ def gen_spec_systemd_part(package):\nservice_name = \"%{name}\"\nelse:\nservice_name = f\"%{{name}}-{systemd_unit.suffix}\"\n- if len(systemd_unit.instances) > 0:\n+ if systemd_unit.instances is not None:\nservice_name = f\"{service_name}@\"\ninstall_unit_files += (\nf\"install -m 644 {service_name}.service %{{buildroot}}/%{{_unitdir}}\\n\"\n@@ -158,7 +158,7 @@ def gen_systemd_rules_contents(package):\noverride_dh_install_init = \"override_dh_installinit:\\n\"\npackage_name = package.name.lower()\nfor systemd_unit in package.systemd_units:\n- if len(systemd_unit.instances) == 0:\n+ if systemd_unit.instances is None:\nif systemd_unit.suffix is not None:\nunit_name = f\"{package_name}-{systemd_unit.suffix}\"\nelse:\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/systemd.py",
"new_path": "docker/package/systemd.py",
"diff": "# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n#\n# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+from dataclasses import dataclass\nfrom typing import List\n# There are more possible fields, but only these are used by tezos services\n+@dataclass\nclass Service:\n- def __init__(\n- self,\n- exec_start: str,\n- state_directory: str,\n- user: str,\n- exec_start_pre: str = None,\n- exec_start_post: str = None,\n- exec_stop_post: str = None,\n- timeout_start_sec: str = None,\n- environment_file: str = None,\n- environment: List[str] = [],\n- remain_after_exit: bool = False,\n- type_: str = None,\n- restart: str = None,\n- keyring_mode: str = None,\n- ):\n- self.environment_file = environment_file\n- self.environment = environment\n- self.exec_start = exec_start\n- self.exec_start_pre = exec_start_pre\n- self.exec_start_post = exec_start_post\n- self.exec_stop_post = exec_stop_post\n- self.timeout_start_sec = timeout_start_sec\n- self.state_directory = state_directory\n- self.user = user\n- self.remain_after_exit = remain_after_exit\n- self.type_ = type_\n- self.restart = restart\n- self.keyring_mode = keyring_mode\n+ exec_start: str\n+ state_directory: str\n+ user: str\n+ exec_start_pre: List[str] = None\n+ exec_start_post: List[str] = None\n+ exec_stop_post: List[str] = None\n+ timeout_start_sec: str = None\n+ environment_file: str = None\n+ environment: List[str] = None\n+ remain_after_exit: bool = False\n+ type_: str = None\n+ restart: str = None\n+ keyring_mode: str = None\n+@dataclass\nclass Unit:\n- def __init__(\n- self,\n- after: List[str],\n- description: str,\n- requires: List[str] = [],\n- part_of: List[str] = [],\n- ):\n- self.after = after\n- self.requires = requires\n- self.part_of = part_of\n- self.description = description\n+ after: List[str]\n+ description: str\n+ requires: List[str] = None\n+ part_of: List[str] = None\n+@dataclass\nclass Install:\n- def __init__(self, wanted_by: List[str] = []):\n- self.wanted_by = wanted_by\n+ wanted_by: List[str] = None\n+@dataclass\nclass ServiceFile:\n- def __init__(self, unit: Unit, service: Service, install: Install):\n- self.unit = unit\n- self.service = service\n- self.install = install\n+ unit: Unit\n+ service: Service\n+ install: Install\n+@dataclass\nclass SystemdUnit:\n- def __init__(\n- self,\n- service_file: ServiceFile,\n- startup_script: str = None,\n- startup_script_source: str = None,\n- prestart_script: str = None,\n- prestart_script_source: str = None,\n- suffix: str = None,\n- config_file: str = None,\n- instances: List[str] = [],\n- ):\n- self.suffix = suffix\n- self.service_file = service_file\n- self.startup_script = startup_script\n- self.startup_script_source = startup_script_source\n- self.prestart_script = prestart_script\n- self.prestart_script_source = prestart_script_source\n- self.config_file = config_file\n- self.instances = instances\n+ service_file: ServiceFile\n+ startup_script: str = None\n+ startup_script_source: str = None\n+ prestart_script: str = None\n+ prestart_script_source: str = None\n+ suffix: str = None\n+ config_file: str = None\n+ instances: List[str] = None\ndef print_service_file(service_file: ServiceFile, out):\n+ after = requires = part_of = environment = environment_file = wanted_by = \"\"\n+ exec_start_pres = exec_start_posts = exec_stop_posts = \"\"\n+ if service_file.unit.after is not None:\nafter = \"\".join(f\"After={x}\\n\" for x in service_file.unit.after)\n+ if service_file.unit.requires is not None:\nrequires = \"\".join(f\"Requires={x}\\n\" for x in service_file.unit.requires)\n+ if service_file.unit.part_of is not None:\npart_of = \"\".join(f\"PartOf={x}\\n\" for x in service_file.unit.part_of)\n+ if service_file.service.environment is not None:\nenvironment = \"\".join(\nf'Environment=\"{x}\"\\n' for x in service_file.service.environment\n)\n- environment_file = (\n- \"\"\n- if service_file.service.environment_file is None\n- else f\"EnvironmentFile={service_file.service.environment_file}\"\n- )\n+ if service_file.service.environment_file is not None:\n+ environment_file = f\"EnvironmentFile={service_file.service.environment_file}\"\n+ if service_file.install.wanted_by is not None:\nwanted_by = \"\".join(f\"WantedBy={x}\\n\" for x in service_file.install.wanted_by)\n- exec_start_pres = (\n- \"\\n\".join(f\"ExecStartPre={x}\" for x in service_file.service.exec_start_pre)\n- if service_file.service.exec_start_pre is not None\n- else \"\"\n+ if service_file.service.exec_start_pre is not None:\n+ exec_start_pres = \"\\n\".join(\n+ f\"ExecStartPre={x}\" for x in service_file.service.exec_start_pre\n)\n- exec_start_posts = (\n- \"\\n\".join(f\"ExecStartPost={x}\" for x in service_file.service.exec_start_post)\n- if service_file.service.exec_start_post is not None\n- else \"\"\n+ if service_file.service.exec_start_post is not None:\n+ exec_start_posts = \"\\n\".join(\n+ f\"ExecStartPost={x}\" for x in service_file.service.exec_start_post\n)\n- exec_stop_posts = (\n- \"\\n\".join(f\"ExecStopPost={x}\" for x in service_file.service.exec_stop_post)\n- if service_file.service.exec_stop_post is not None\n- else \"\"\n+ if service_file.service.exec_stop_post is not None:\n+ exec_stop_posts = \"\\n\".join(\n+ f\"ExecStopPost={x}\" for x in service_file.service.exec_stop_post\n)\nfile_contents = f\"\"\"# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n#\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -44,7 +44,7 @@ def build_ubuntu_package(\nunit_name = f\"{pkg_name}-{systemd_unit.suffix}\"\nout_path = (\nf\"debian/{unit_name}@.service\"\n- if len(systemd_unit.instances) > 0\n+ if systemd_unit.instances is not None\nelse f\"debian/{unit_name}.service\"\n)\nprint_service_file(systemd_unit.service_file, out_path)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#175] Use dataclass for systemd-related classes
Problem: Constructors for classes in systemd.py module produce
substantial amount of boilerplate.
Solution: Use @dataclass in order to generate these boilerplate
constructors.
|
603,652
|
20.05.2021 13:51:58
| -10,800
|
6cb39c51c9ff284dd3735b12af7b15c3d1469bcb
|
Hotfix binary packages steps
Problem: 008 protocol was disabled in However, CI still tries to
build native packages for 008 daemon binaries. The update from was
lost in #197:(
Solution: Build 009 daemons binary packages.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -115,7 +115,7 @@ steps:\n- eval \"$SET_VERSION\"\n# Building all binary packages will take significant amount of time, so we build only one\n# in order to ensure package generation sanity\n- - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-008-PtEdo2Zk\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-009-PsFLoren\n- rm -rf out\n# It takes much time to build binary package, so we do it only on master\nbranches: \"master\"\n@@ -139,7 +139,7 @@ steps:\n- eval \"$SET_VERSION\"\n# Building all binary packages will take significant amount of time, so we build only one\n# in order to ensure package generation sanity\n- - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-008-PtEdo2Zk\n+ - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-009-PsFLoren\n- rm -rf out\n# It takes much time to build binary package, so we do it only on master\nbranches: \"master\"\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#195] Hotfix binary packages steps
Problem: 008 protocol was disabled in #200. However, CI still tries to
build native packages for 008 daemon binaries. The update from #200 was
lost in #197:(
Solution: Build 009 daemons binary packages.
|
603,652
|
26.05.2021 13:25:51
| -10,800
|
ec157de45b9b0cbb7ae55bee57749b9c1819bdc1
|
Provide key attributes for dependency steps
Problem: Turned out buildkite uses 'key' attribute in order to determine
steps dependencies instead of using 'label'.
Solution: Explicitely add keys to steps that used as a dependency.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/filter-pipeline.py",
"new_path": ".buildkite/filter-pipeline.py",
"diff": "@@ -70,7 +70,19 @@ def dfs(name, depends_on_dict, visited):\ndfs(adjacent, depends_on_dict, visited)\n-def build_tree(steps):\n+# Buildkite uses 'key' attribute to determine dependencies of steps.\n+# Existing code uses 'label's when analyzing dependency tree, so that\n+# it's possible to analyze reverse dependencies as well.\n+# This function builds a dict that maps 'key's to 'label's\n+def build_key_to_label(steps):\n+ key_to_label = {}\n+ for step in steps:\n+ if \"key\" in step and \"label\" in step:\n+ key_to_label[step[\"key\"]] = step[\"label\"]\n+ return key_to_label\n+\n+\n+def build_tree(steps, key_to_label):\ndepends_on_dict = {}\ndepends_on_dict_rev = {}\nfor step in steps:\n@@ -78,16 +90,20 @@ def build_tree(steps):\ndepends_on = step.get(\"depends_on\", None)\nif depends_on is not None:\nif type(depends_on) == str:\n- depends_on_dict.setdefault(depends_on, []).append(label)\n- depends_on_dict_rev.setdefault(label, []).append(depends_on)\n+ # use 'label' from step assosiated with the given 'key'\n+ dependency_label = key_to_label[depends_on]\n+ depends_on_dict.setdefault(dependency_label, []).append(label)\n+ depends_on_dict_rev.setdefault(label, []).append(dependency_label)\nelse:\nfor dependency in depends_on:\nif type(dependency) == str:\ndependency_name = dependency\nelse:\ndependency_name = dependency[\"step\"]\n- depends_on_dict.setdefault(dependency_name, []).append(label)\n- depends_on_dict_rev.setdefault(label, []).append(dependency_name)\n+ # use 'label' from step assosiated with the given 'key'\n+ dependency_label = key_to_label[dependency_name]\n+ depends_on_dict.setdefault(dependency_label, []).append(label)\n+ depends_on_dict_rev.setdefault(label, []).append(dependency_label)\nreturn depends_on_dict, depends_on_dict_rev\n@@ -104,7 +120,8 @@ visited = set()\nvisited_rev = set()\nsteps = pipeline[\"steps\"]\n-depends_on_dict, depends_on_dict_rev = build_tree(steps)\n+key_to_label = build_key_to_label(steps)\n+depends_on_dict, depends_on_dict_rev = build_tree(steps, key_to_label)\nfor step in steps:\nif check_step(step, splitted_diff):\nlabel = step[\"label\"]\n"
},
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -32,6 +32,8 @@ steps:\n# nix builds are usually cached, so we don't care about only_changes setting for it\n- label: build-via-docker\n+ # this step is used as a dependency, so we're defining 'key' explicitely\n+ key: build-via-docker\ncommands:\n- eval \"$SET_VERSION\"\n- cd docker\n@@ -49,6 +51,8 @@ steps:\n- nix/nix/sources.json\n# arm builer is an ubuntu machine without nix\n- label: build-arm-via-docker\n+ # this step is used as a dependency, so we're defining 'key' explicitely\n+ key: build-arm-via-docker\ncommands:\n- eval \"$SET_VERSION\"\n- cd docker\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/buildkite/golden/pipeline-A.yml",
"new_path": "tests/buildkite/golden/pipeline-A.yml",
"diff": "steps:\n-- label: A\n+- key: A\n+ label: A\n- depends_on:\n- A\n+ key: B\nlabel: B\n- depends_on:\n- A\n+ key: C\nlabel: C\n- depends_on:\n- B\n+ key: D\nlabel: D\n- depends_on:\n- C\n+ key: E\nlabel: E\n- depends_on:\n- D\n+ key: F\nlabel: F\n- depends_on:\n- E\n- D\n+ key: G\nlabel: G\n- depends_on:\n- E\n+ key: H\nlabel: H\n- depends_on:\n- A\n+ key: X\nlabel: X\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/buildkite/golden/pipeline-C.yml",
"new_path": "tests/buildkite/golden/pipeline-C.yml",
"diff": "steps:\n-- label: A\n+- key: A\n+ label: A\n- depends_on:\n- A\n+ key: B\nlabel: B\n- depends_on:\n- A\n+ key: C\nlabel: C\n- depends_on:\n- B\n+ key: D\nlabel: D\n- depends_on:\n- C\n+ key: E\nlabel: E\n- depends_on:\n- D\n+ key: F\nlabel: F\nskip: skipped due to lack of changes\n- depends_on:\n- E\n- D\n+ key: G\nlabel: G\n- depends_on:\n- E\n+ key: H\nlabel: H\n- depends_on:\n- A\n+ key: X\nlabel: X\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/buildkite/golden/pipeline-G.yml",
"new_path": "tests/buildkite/golden/pipeline-G.yml",
"diff": "steps:\n-- label: A\n+- key: A\n+ label: A\n- depends_on:\n- A\n+ key: B\nlabel: B\n- depends_on:\n- A\n+ key: C\nlabel: C\n- depends_on:\n- B\n+ key: D\nlabel: D\n- depends_on:\n- C\n+ key: E\nlabel: E\n- depends_on:\n- D\n+ key: F\nlabel: F\nskip: skipped due to lack of changes\n- depends_on:\n- E\n- D\n+ key: G\nlabel: G\n- depends_on:\n- E\n+ key: H\nlabel: H\nskip: skipped due to lack of changes\n- depends_on:\n- A\n+ key: X\nlabel: X\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/buildkite/golden/pipeline-X.yml",
"new_path": "tests/buildkite/golden/pipeline-X.yml",
"diff": "steps:\n-- label: A\n+- key: A\n+ label: A\n- depends_on:\n- A\n+ key: B\nlabel: B\nskip: skipped due to lack of changes\n- depends_on:\n- A\n+ key: C\nlabel: C\nskip: skipped due to lack of changes\n- depends_on:\n- B\n+ key: D\nlabel: D\nskip: skipped due to lack of changes\n- depends_on:\n- C\n+ key: E\nlabel: E\nskip: skipped due to lack of changes\n- depends_on:\n- D\n+ key: F\nlabel: F\nskip: skipped due to lack of changes\n- depends_on:\n- E\n- D\n+ key: G\nlabel: G\nskip: skipped due to lack of changes\n- depends_on:\n- E\n+ key: H\nlabel: H\nskip: skipped due to lack of changes\n- depends_on:\n- A\n+ key: X\nlabel: X\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/buildkite/pipeline-raw.yml",
"new_path": "tests/buildkite/pipeline-raw.yml",
"diff": "steps:\n- label: A\n+ key: A\nonly_changes:\n- A\n- label: B\n+ key: B\ndepends_on:\n- A\nonly_changes:\n- B\n- label: C\n+ key: C\ndepends_on:\n- A\nonly_changes:\n- C\n- label: D\n+ key: D\ndepends_on:\n- B\nonly_changes:\n- B\n- label: E\n+ key: E\ndepends_on:\n- C\nonly_changes:\n- E\n- label: F\n+ key: F\ndepends_on:\n- D\nonly_changes:\n- F\n- label: G\n+ key: G\ndepends_on:\n- E\n- D\nonly_changes:\n- G\n- label: H\n+ key: H\ndepends_on:\n- E\nonly_changes:\n- H\n- label: X\n+ key: X\ndepends_on:\n- A\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#195] Provide key attributes for dependency steps
Problem: Turned out buildkite uses 'key' attribute in order to determine
steps dependencies instead of using 'label'.
Solution: Explicitely add keys to steps that used as a dependency.
|
603,652
|
02.06.2021 16:46:13
| -10,800
|
7b03ad36883bb37d9b95bdcac0a87cab1c76c813
|
Support Ubuntu 21.04
Problem: Currently we support 18.04, 20.04 and 20.10. However, 21.04 was
released in the April and community lacks Tezos packages for it.
Solution: Add 21.04 (aka hirsute) to the list of supported ubuntu
versions.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/package_generator.py",
"new_path": "docker/package/package_generator.py",
"diff": "@@ -60,7 +60,12 @@ build_deps = [\n]\ncommon_deps = run_deps + build_deps\n-ubuntu_versions = [\"bionic\", \"focal\", \"groovy\"] # 18.04 # 20.04 # 20.10\n+ubuntu_versions = [\n+ \"bionic\", # 18.04\n+ \"focal\", # 20.04\n+ \"groovy\", # 20.10\n+ \"hirsute\", # 21.04\n+]\npwd = os.getcwd()\nhome = os.environ[\"HOME\"]\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#212] Support Ubuntu 21.04
Problem: Currently we support 18.04, 20.04 and 20.10. However, 21.04 was
released in the April and community lacks Tezos packages for it.
Solution: Add 21.04 (aka hirsute) to the list of supported ubuntu
versions.
|
603,652
|
02.06.2021 16:47:16
| -10,800
|
d42984f4de418501ab31ac233bdd1f13e9ca1375
|
Optionally depend on dh-systemd
Problem: Since 13.3 debhelper includes dh-systemd and as a consequence a
separete dh-systemd packages was removed, thus it's not presented in the
21.04 distro.
Solution: Depend on dh-systemd only in case we're not building ubuntu
package for 21.04.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -215,7 +215,7 @@ class OpamBasedPackage(AbstractPackage):\nsubprocess.run([\"tar\", \"-zxf\", f\"{opam_package}-bundle.tar.gz\"], check=True)\nos.rename(f\"{opam_package}-bundle\", out_dir)\n- def gen_control_file(self, deps, out):\n+ def gen_control_file(self, deps, ubuntu_version, out):\nstr_build_deps = \", \".join(deps)\nstr_additional_native_deps = \", \".join(self.additional_native_deps)\nfile_contents = f\"\"\"\n@@ -223,7 +223,7 @@ Source: {self.name.lower()}\nSection: utils\nPriority: optional\nMaintainer: {self.meta.maintainer}\n-Build-Depends: debhelper (>=9), dh-systemd (>= 1.5), autotools-dev, {str_build_deps}\n+Build-Depends: debhelper (>=9), {\"dh-systemd (>= 1.5), \" if ubuntu_version != \"hirsute\" else \"\"} autotools-dev, {str_build_deps}\nStandards-Version: 3.9.6\nHomepage: https://gitlab.com/tezos/tezos/\n@@ -367,13 +367,13 @@ class TezosSaplingParamsPackage(AbstractPackage):\n]\n)\n- def gen_control_file(self, deps, out):\n+ def gen_control_file(self, deps, ubuntu_version, out):\nfile_contents = f\"\"\"\nSource: {self.name}\nSection: utils\nPriority: optional\nMaintainer: {self.meta.maintainer}\n-Build-Depends: debhelper (>=9), dh-systemd (>= 1.5), autotools-dev, wget\n+Build-Depends: debhelper (>=9), {\"dh-systemd (>= 1.5), \" if ubuntu_version != \"hirsute\" else \"\"} autotools-dev, wget\nStandards-Version: 3.9.6\nHomepage: https://gitlab.com/tezos/tezos/\n@@ -503,7 +503,7 @@ class TezosBakingServicesPackage(AbstractPackage):\ndef fetch_sources(self, out_dir):\nos.makedirs(out_dir)\n- def gen_control_file(self, deps, out):\n+ def gen_control_file(self, deps, ubuntu_version, out):\nrun_deps = \", \".join(\n[\"acl\", \"tezos-client\", \"tezos-node\"]\n+ sum(\n@@ -522,7 +522,7 @@ Source: {self.name}\nSection: utils\nPriority: optional\nMaintainer: {self.meta.maintainer}\n-Build-Depends: debhelper (>=9), dh-systemd (>= 1.5), autotools-dev\n+Build-Depends: debhelper (>=9), {\"dh-systemd (>= 1.5), \" if ubuntu_version != \"hirsute\" else \"\"} autotools-dev\nStandards-Version: 3.9.6\nHomepage: https://gitlab.com/tezos/tezos/\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -76,7 +76,7 @@ def build_ubuntu_package(\npkg.gen_rules(\"debian/rules\")\npkg.gen_postinst(\"debian/postinst\")\npkg.gen_postrm(\"debian/postrm\")\n- pkg.gen_control_file(build_deps, \"debian/control\")\n+ pkg.gen_control_file(build_deps, ubuntu_version, \"debian/control\")\npkg.gen_license(\"debian/copyright\")\nsubprocess.run(\n\"rm debian/*.ex debian/*.EX debian/README*\", shell=True, check=True\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#212] Optionally depend on dh-systemd
Problem: Since 13.3 debhelper includes dh-systemd and as a consequence a
separete dh-systemd packages was removed, thus it's not presented in the
21.04 distro.
Solution: Depend on dh-systemd only in case we're not building ubuntu
package for 21.04.
|
603,652
|
31.05.2021 18:37:31
| -10,800
|
57f14f8e89e262818bfb06ddda1a0b23d323136b
|
Bump Tezos sources and opam dependencies
Problem: The new Tezos version was released.
Solution: Bump used tezos sources and their opam dependencies.
|
[
{
"change_type": "MODIFY",
"old_path": "nix/nix/sources.json",
"new_path": "nix/nix/sources.json",
"diff": "\"homepage\": \"https://opam.ocaml.org\",\n\"owner\": \"ocaml\",\n\"repo\": \"opam-repository\",\n- \"rev\": \"d90747963ba246b00526d08d26241e5654f418bf\",\n- \"sha256\": \"0yd9y0wxzhm91j6wja190saqlbz8mvjgv5078b5ipyfg61sap44h\",\n+ \"rev\": \"514e2415e1dcbf911a76f9655bac39dd28c2572e\",\n+ \"sha256\": \"0zfyix0pphzsfasnh6ym8mplfjis7h7gnxsw483ls4mbi9d7p9ld\",\n\"type\": \"tarball\",\n- \"url\": \"https://github.com/ocaml/opam-repository/archive/d90747963ba246b00526d08d26241e5654f418bf.tar.gz\",\n+ \"url\": \"https://github.com/ocaml/opam-repository/archive/514e2415e1dcbf911a76f9655bac39dd28c2572e.tar.gz\",\n\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"serokell-nix\": {\n\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"tezos\": {\n- \"ref\": \"refs/tags/v9.1\",\n+ \"ref\": \"refs/tags/v9.2\",\n\"repo\": \"https://gitlab.com/tezos/tezos\",\n- \"rev\": \"31e6641db444bdb5d3fb9f232282b429b8c3ea7a\",\n+ \"rev\": \"bc2cc86f9769798df9f80da0df145597cff7401b\",\n\"type\": \"git\"\n}\n}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Bump Tezos sources and opam dependencies
Problem: The new Tezos version was released.
Solution: Bump used tezos sources and their opam dependencies.
|
603,652
|
01.06.2021 09:55:49
| -10,800
|
0c109bf9a71c4ffdaba532872245a2bc099fef3e
|
Update brew formulas version and remove old hashes
Problem: The new Tezos version arrived.
Solution: Bump versions in brew formulas and remove v9.1-1 bottles
hashes since they're outdated now.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosAccuser009Psfloren < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n- sha256 cellar: :any, mojave: \"b9906f66690c90af6dd716e8981cfed7c1da72904c44f2720bb4d28ec23f2de8\"\n- sha256 cellar: :any, catalina: \"6c506d633967c3c5ad39deb483871e03f5218fad4508aab821546a5395f9a5b8\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosAdminClient < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n- sha256 cellar: :any, mojave: \"373c146b8989d8937154da0cca4c3cab51088ac5c3becf7a045e062a9aaaa370\"\n- sha256 cellar: :any, catalina: \"28a92df0b2b152eb60b488dd3cc912dd96215eaa696eceb7b269041d63c93c1a\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosBaker009Psfloren < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n- sha256 cellar: :any, mojave: \"8f317703aff2a8612c40dc1c224598486d964dbf57003b70c1c535dfc195325c\"\n- sha256 cellar: :any, catalina: \"8825c66454aa26641e101dde3a505195182afd87b0d72831ed10dd5c7124ad5e\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosClient < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n- sha256 cellar: :any, mojave: \"efcfb8e3215d35734fc6a58b19d2cf072487db6376d45c4eba3e07a1bed37039\"\n- sha256 cellar: :any, catalina: \"a70f34680c071b48e6d308cb69324b4a88bfddc131324f405a8f508b5765af4b\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosCodec < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n- sha256 cellar: :any, mojave: \"7fcb15085a501af648391e1c798be78da54c66e5a2296ded80ff607fedca9987\"\n- sha256 cellar: :any, catalina: \"4fb1cba11bc2adc04661dbc730ec1da4d774d4b5ff46473a77ca13cd0b752074\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosEndorser009Psfloren < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -28,8 +28,6 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n- sha256 cellar: :any, mojave: \"7ff3835a461aa9e59f5ca6f8b95cc5d62381d9186c38d7ddacc8c1c56d355899\"\n- sha256 cellar: :any, catalina: \"05c1116010981dea5627e2418b03f1744d35ed896ce224b01aa23722b3a6662a\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-florencenet.rb",
"new_path": "Formula/tezos-node-florencenet.rb",
"diff": "class TezosNodeFlorencenet < Formula\nurl \"file:///dev/null\"\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbottle :unneeded\ndepends_on \"tezos-node\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-mainnet.rb",
"new_path": "Formula/tezos-node-mainnet.rb",
"diff": "class TezosNodeMainnet < Formula\nurl \"file:///dev/null\"\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbottle :unneeded\ndepends_on \"tezos-node\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosNode < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n- sha256 cellar: :any, mojave: \"87086776cd387cddef59c641a3cfb8083536c66d8e4c1bae663cd42372a038d4\"\n- sha256 cellar: :any, catalina: \"57cd589c9fce9583146926941c503c439d0303186f65f84ef9b8d09e16b24244\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosSandbox < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n- sha256 cellar: :any, mojave: \"1fbfa0a0157a18ba70ee04929d09ca99011afa47e0c518078fdc94cdc232f3bb\"\n- sha256 cellar: :any, catalina: \"ddd3c83f729bce04cc151a7b8a1335cbf34189bb653ec535d70dc8d716ddb60b\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-http.rb",
"new_path": "Formula/tezos-signer-http.rb",
"diff": "class TezosSignerHttp < Formula\nurl \"file:///dev/null\"\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-https.rb",
"new_path": "Formula/tezos-signer-https.rb",
"diff": "class TezosSignerHttps < Formula\nurl \"file:///dev/null\"\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-tcp.rb",
"new_path": "Formula/tezos-signer-tcp.rb",
"diff": "class TezosSignerTcp < Formula\nurl \"file:///dev/null\"\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer-unix.rb",
"new_path": "Formula/tezos-signer-unix.rb",
"diff": "class TezosSignerUnix < Formula\nurl \"file:///dev/null\"\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbottle :unneeded\ndepends_on \"tezos-signer\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -10,9 +10,9 @@ class TezosSigner < Formula\nend\nhomepage \"https://gitlab.com/tezos/tezos\"\n- url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.1\", :shallow => false\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n- version \"v9.1-1\"\n+ version \"v9.2-1\"\nbuild_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\nbuild_dependencies.each do |dependency|\n@@ -27,8 +27,6 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n- sha256 cellar: :any, mojave: \"00d7071d2fdc7054d33820c80321f06dc5700bebc4943582da9299d201f30c1a\"\n- sha256 cellar: :any, catalina: \"f96b524272ff42621323e6fe02e29cb1b53bf8bdfe4e62998936951b2c0df17d\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Update brew formulas version and remove old hashes
Problem: The new Tezos version arrived.
Solution: Bump versions in brew formulas and remove v9.1-1 bottles
hashes since they're outdated now.
|
603,652
|
01.06.2021 10:05:49
| -10,800
|
f27a70b6e45eed5021e182b42e1834b7a1ab39a9
|
Support new protocol and testnet
Problem: In v9.2 new protocol with the new testnet were added.
We should support them.
Solution: Provide 010 support along with the new granadanet.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+class TezosAccuser010Ptgranad < Formula\n+ @all_bins = []\n+\n+ class << self\n+ attr_accessor :all_bins\n+ end\n+ homepage \"https://gitlab.com/tezos/tezos\"\n+\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n+\n+ version \"v9.2-1\"\n+\n+ build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n+ build_dependencies.each do |dependency|\n+ depends_on dependency => :build\n+ end\n+\n+ dependencies = %w[gmp hidapi libev libffi]\n+ dependencies.each do |dependency|\n+ depends_on dependency\n+ end\n+ desc \"Daemon for accusing\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser010Ptgranad.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n+ system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n+ system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n+ end\n+\n+ def install_template(dune_path, exec_path, name)\n+ bin.mkpath\n+ self.class.all_bins << name\n+ system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n+ bin.install name\n+ end\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ accuser=\"#{bin}/tezos-accuser-010-PtGRANAD\"\n+\n+ accuser_dir=\"$DATA_DIR\"\n+\n+ accuser_config=\"$accuser_dir/config\"\n+ mkdir -p \"$accuser_dir\"\n+\n+ if [ ! -f \"$accuser_config\" ]; then\n+ \"$accuser\" --base-dir \"$accuser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config init --output \"$accuser_config\" >/dev/null 2>&1\n+ else\n+ \"$accuser\" --base-dir \"$accuser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+\n+ exec \"$accuser\" --base-dir \"$accuser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run\n+ EOS\n+ File.write(\"tezos-accuser-010-PtGRANAD-start\", startup_contents)\n+ bin.install \"tezos-accuser-010-PtGRANAD-start\"\n+ make_deps\n+ install_template \"src/proto_010_PtGRANAD/bin_accuser/main_accuser_010_PtGRANAD.exe\",\n+ \"_build/default/src/proto_010_PtGRANAD/bin_accuser/main_accuser_010_PtGRANAD.exe\",\n+ \"tezos-accuser-010-PtGRANAD\"\n+ end\n+\n+ plist_options manual: \"tezos-accuser-010-PtGRANAD run\"\n+ def plist\n+ <<~EOS\n+ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n+ \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+ <plist version=\"1.0\">\n+ <dict>\n+ <key>Label</key>\n+ <string>#{plist_name}</string>\n+ <key>Program</key>\n+ <string>#{opt_bin}/tezos-accuser-010-PtGRANAD-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>NODE_RPC_ENDPOINT</key>\n+ <string>http://localhost:8732</string>\n+ </dict>\n+ <key>RunAtLoad</key><true/>\n+ <key>StandardOutPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ <key>StandardErrorPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ </dict>\n+ </plist>\n+ EOS\n+ end\n+ def post_install\n+ mkdir \"#{var}/lib/tezos/client\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+class TezosBaker010Ptgranad < Formula\n+ @all_bins = []\n+\n+ class << self\n+ attr_accessor :all_bins\n+ end\n+ homepage \"https://gitlab.com/tezos/tezos\"\n+\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n+\n+ version \"v9.2-1\"\n+\n+ build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n+ build_dependencies.each do |dependency|\n+ depends_on dependency => :build\n+ end\n+\n+ dependencies = %w[gmp hidapi libev libffi tezos-sapling-params]\n+ dependencies.each do |dependency|\n+ depends_on dependency\n+ end\n+ desc \"Daemon for baking\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker010Ptgranad.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n+ system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n+ system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n+ end\n+\n+ def install_template(dune_path, exec_path, name)\n+ bin.mkpath\n+ self.class.all_bins << name\n+ system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n+ bin.install name\n+ end\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ baker=\"#{bin}/tezos-baker-010-PtGRANAD\"\n+\n+ baker_dir=\"$DATA_DIR\"\n+\n+ baker_config=\"$baker_dir/config\"\n+ mkdir -p \"$baker_dir\"\n+\n+ if [ ! -f \"$baker_config\" ]; then\n+ \"$baker\" --base-dir \"$baker_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config init --output \"$baker_config\" >/dev/null 2>&1\n+ else\n+ \"$baker\" --base-dir \"$baker_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+\n+ launch_baker() {\n+ exec \"$baker\" \\\n+ --base-dir \"$baker_dir\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run with local node \"$NODE_DATA_DIR\" \"$@\"\n+ }\n+\n+ if [[ -z \"$BAKER_ACCOUNT\" ]]; then\n+ launch_baker\n+ else\n+ launch_baker \"$BAKER_ACCOUNT\"\n+ fi\n+ EOS\n+ File.write(\"tezos-baker-010-PtGRANAD-start\", startup_contents)\n+ bin.install \"tezos-baker-010-PtGRANAD-start\"\n+ make_deps\n+ install_template \"src/proto_010_PtGRANAD/bin_baker/main_baker_010_PtGRANAD.exe\",\n+ \"_build/default/src/proto_010_PtGRANAD/bin_baker/main_baker_010_PtGRANAD.exe\",\n+ \"tezos-baker-010-PtGRANAD\"\n+ end\n+ plist_options manual: \"tezos-baker-010-PtGRANAD run with local node\"\n+ def plist\n+ <<~EOS\n+ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n+ \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+ <plist version=\"1.0\">\n+ <dict>\n+ <key>Label</key>\n+ <string>#{plist_name}</string>\n+ <key>Program</key>\n+ <string>#{opt_bin}/tezos-baker-010-PtGRANAD-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>NODE_DATA_DIR</key>\n+ <string></string>\n+ <key>NODE_RPC_ENDPOINT</key>\n+ <string>http://localhost:8732</string>\n+ <key>BAKER_ACCOUNT</key>\n+ <string></string>\n+ </dict>\n+ <key>RunAtLoad</key><true/>\n+ <key>StandardOutPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ <key>StandardErrorPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ </dict>\n+ </plist>\n+ EOS\n+ end\n+ def post_install\n+ mkdir \"#{var}/lib/tezos/client\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+class TezosEndorser010Ptgranad < Formula\n+ @all_bins = []\n+\n+ class << self\n+ attr_accessor :all_bins\n+ end\n+ homepage \"https://gitlab.com/tezos/tezos\"\n+\n+ url \"https://gitlab.com/tezos/tezos.git\", :tag => \"v9.2\", :shallow => false\n+\n+ version \"v9.2-1\"\n+\n+ build_dependencies = %w[pkg-config autoconf rsync wget opam rustup-init]\n+ build_dependencies.each do |dependency|\n+ depends_on dependency => :build\n+ end\n+\n+ dependencies = %w[gmp hidapi libev libffi]\n+ dependencies.each do |dependency|\n+ depends_on dependency\n+ end\n+\n+ desc \"Daemon for endorsing\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser010Ptgranad.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.44.0\", \"-y\"\n+ system \"opam\", \"init\", \"--bare\", \"--debug\", \"--auto-setup\", \"--disable-sandboxing\"\n+ system [\"source .cargo/env\", \"make build-deps\"].join(\" && \")\n+ end\n+\n+ def install_template(dune_path, exec_path, name)\n+ bin.mkpath\n+ self.class.all_bins << name\n+ system [\"eval $(opam env)\", \"dune build #{dune_path}\", \"cp #{exec_path} #{name}\"].join(\" && \")\n+ bin.install name\n+ end\n+\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ endorser=\"#{bin}/tezos-endorser-010-PtGRANAD\"\n+\n+ endorser_dir=\"$DATA_DIR\"\n+\n+ endorser_config=\"$endorser_dir/config\"\n+ mkdir -p \"$endorser_dir\"\n+\n+ if [ ! -f \"$endorser_config\" ]; then\n+ \"$endorser\" --base-dir \"$endorser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config init --output \"$endorser_config\" >/dev/null 2>&1\n+ else\n+ \"$endorser\" --base-dir \"$endorser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+\n+ launch_endorser() {\n+ exec \"$endorser\" --base-dir \"$endorser_dir\" \\\n+ --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run \"$@\"\n+ }\n+\n+ if [[ -z \"$ENDORSER_ACCOUNT\" ]]; then\n+ launch_endorser\n+ else\n+ launch_endorser \"$ENDORSER_ACCOUNT\"\n+ fi\n+ EOS\n+ File.write(\"tezos-endorser-010-PtGRANAD-start\", startup_contents)\n+ bin.install \"tezos-endorser-010-PtGRANAD-start\"\n+ make_deps\n+ install_template \"src/proto_010_PtGRANAD/bin_endorser/main_endorser_010_PtGRANAD.exe\",\n+ \"_build/default/src/proto_010_PtGRANAD/bin_endorser/main_endorser_010_PtGRANAD.exe\",\n+ \"tezos-endorser-010-PtGRANAD\"\n+ end\n+\n+ plist_options manual: \"tezos-endorser-010-PtGRANAD run\"\n+ def plist\n+ <<~EOS\n+ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n+ \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+ <plist version=\"1.0\">\n+ <dict>\n+ <key>Label</key>\n+ <string>#{plist_name}</string>\n+ <key>Program</key>\n+ <string>#{opt_bin}/tezos-endorser-010-PtGRANAD-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>NODE_RPC_ENDPOINT</key>\n+ <string>http://localhost:8732</string>\n+ <key>ENDORSER_ACCOUNT</key>\n+ <string></string>\n+ </dict>\n+ <key>RunAtLoad</key><true/>\n+ <key>StandardOutPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ <key>StandardErrorPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ </dict>\n+ </plist>\n+ EOS\n+ end\n+ def post_install\n+ mkdir \"#{var}/lib/tezos/client\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-node-granadanet.rb",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+class TezosNodeGranadanet < Formula\n+ url \"file:///dev/null\"\n+ version \"v9.2-1\"\n+\n+ bottle :unneeded\n+ depends_on \"tezos-node\"\n+\n+ desc \"Meta formula that provides background tezos-node service that runs on granadanet\"\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ node=\"/usr/local/bin/tezos-node\"\n+ # default location of the config file\n+ config_file=\"$DATA_DIR/config.json\"\n+\n+ mkdir -p \"$DATA_DIR\"\n+ if [[ ! -f \"$config_file\" ]]; then\n+ echo \"Configuring the node...\"\n+ \"$node\" config init \\\n+ --data-dir \"$DATA_DIR\" \\\n+ --rpc-addr \"$NODE_RPC_ADDR\" \\\n+ --network=granadanet \\\n+ \"$@\"\n+ else\n+ echo \"Updating the node configuration...\"\n+ \"$node\" config update \\\n+ --data-dir \"$DATA_DIR\" \\\n+ --rpc-addr \"$NODE_RPC_ADDR\" \\\n+ --network=granadanet \\\n+ \"$@\"\n+ fi\n+\n+ # Launching the node\n+ if [[ -z \"$CERT_PATH\" || -z \"$KEY_PATH\" ]]; then\n+ exec \"$node\" run --data-dir \"$DATA_DIR\" --config-file=\"$config_file\"\n+ else\n+ exec \"$node\" run --data-dir \"$DATA_DIR\" --config-file=\"$config_file\" \\\n+ --rpc-tls=\"$CERT_PATH\",\"$KEY_PATH\"\n+ fi\n+ EOS\n+ File.write(\"tezos-node-granadanet-start\", startup_contents)\n+ bin.install \"tezos-node-granadanet-start\"\n+ print \"Installing tezos-node-granadanet service\"\n+ end\n+ def plist\n+ <<~EOS\n+ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n+ \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+ <plist version=\"1.0\">\n+ <dict>\n+ <key>Label</key>\n+ <string>#{plist_name}</string>\n+ <key>Program</key>\n+ <string>#{opt_bin}/tezos-node-granadanet-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/node-granadanet</string>\n+ <key>NODE_RPC_ADDR</key>\n+ <string>127.0.0.1:8732</string>\n+ <key>CERT_PATH</key>\n+ <string></string>\n+ <key>KEY_PATH</key>\n+ <string></string>\n+ </dict>\n+ <key>RunAtLoad</key><true/>\n+ <key>StandardOutPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ <key>StandardErrorPath</key>\n+ <string>#{var}/log/#{name}.log</string>\n+ </dict>\n+ </plist>\n+ EOS\n+ end\n+ def post_install\n+ mkdir_p \"#{var}/lib/tezos/node-granadanet\"\n+ system \"tezos-node\", \"config\", \"init\", \"--data-dir\" \"#{var}/lib/tezos/node-granadanet\", \"--network\", \"granadanet\"\n+ end\n+end\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/static_libs.patch",
"new_path": "docker/build/static_libs.patch",
"diff": "@@ -231,3 +231,48 @@ index c19a310a8f..6c38226293 100644\n(rule\n(alias runtest_lint)\n+diff --git a/src/proto_010_PtGRANAD/bin_accuser/dune b/src/proto_010_PtGRANAD/bin_accuser/dune\n+index 8cf78a6cb..1e169e66a 100644\n+--- a/src/proto_010_PtGRANAD/bin_accuser/dune\n++++ b/src/proto_010_PtGRANAD/bin_accuser/dune\n+@@ -10,7 +10,9 @@\n+ -open Tezos_client_commands\n+ -open Tezos_baking_010_PtGRANAD_commands\n+ -open Tezos_stdlib_unix\n+- -open Tezos_client_base_unix)))\n++ -open Tezos_client_base_unix\n++ -ccopt -static\n++ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n+\n+ (rule\n+ (alias runtest_lint)\n+diff --git a/src/proto_010_PtGRANAD/bin_baker/dune b/src/proto_010_PtGRANAD/bin_baker/dune\n+index a8f2ec209..0a94aaecc 100644\n+--- a/src/proto_010_PtGRANAD/bin_baker/dune\n++++ b/src/proto_010_PtGRANAD/bin_baker/dune\n+@@ -10,7 +10,9 @@\n+ -open Tezos_client_commands\n+ -open Tezos_baking_010_PtGRANAD_commands\n+ -open Tezos_stdlib_unix\n+- -open Tezos_client_base_unix)))\n++ -open Tezos_client_base_unix\n++ -ccopt -static\n++ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n+\n+ (rule\n+ (alias runtest_lint)\n+diff --git a/src/proto_010_PtGRANAD/bin_endorser/dune b/src/proto_010_PtGRANAD/bin_endorser/dune\n+index da13938ba..99b3cb746 100644\n+--- a/src/proto_010_PtGRANAD/bin_endorser/dune\n++++ b/src/proto_010_PtGRANAD/bin_endorser/dune\n+@@ -10,7 +10,9 @@\n+ -open Tezos_client_commands\n+ -open Tezos_baking_010_PtGRANAD_commands\n+ -open Tezos_stdlib_unix\n+- -open Tezos_client_base_unix)))\n++ -open Tezos_client_base_unix\n++ -ccopt -static\n++ -cclib \"-lusb-1.0 -lhidapi-libusb -ludev\")))\n+\n+ (rule\n+ (alias runtest_lint)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -13,8 +13,12 @@ from .model import (\nfrom .systemd import Service, ServiceFile, SystemdUnit, Unit, Install\n-networks = [\"mainnet\", \"florencenet\"]\n-networks_protos = {\"mainnet\": [\"009-PsFLoren\"], \"florencenet\": [\"009-PsFLoren\"]}\n+networks = [\"mainnet\", \"florencenet\", \"granadanet\"]\n+networks_protos = {\n+ \"mainnet\": [\"009-PsFLoren\"],\n+ \"florencenet\": [\"009-PsFLoren\"],\n+ \"granadanet\": [\"010-PtGRANAD\"],\n+}\nsigner_units = [\nSystemdUnit(\n"
},
{
"change_type": "MODIFY",
"old_path": "meta.json",
"new_path": "meta.json",
"diff": "{\n- \"release\": \"4\",\n+ \"release\": \"1\",\n\"maintainer\": \"Serokell <hi@serokell.io>\"\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/hacks.nix",
"new_path": "nix/build/hacks.nix",
"diff": "@@ -185,6 +185,11 @@ rec {\nbuildInputs = o.buildInputs ++ [ librustzcash ];\nXDG_DATA_DIRS = \"${zcash-params}:$XDG_DATA_DIRS\";\n});\n+ tezos-protocol-010-PtGRANAD-parameters = osuper.tezos-protocol-010-PtGRANAD-parameters.overrideAttrs\n+ (o: rec {\n+ buildInputs = o.buildInputs ++ [ librustzcash ];\n+ XDG_DATA_DIRS = \"${zcash-params}:$XDG_DATA_DIRS\";\n+ });\n# FIXME apply this patch upstream\ntezos-stdlib-unix = osuper.tezos-stdlib-unix.overrideAttrs\n@@ -212,6 +217,21 @@ rec {\nbuildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\npostFixup = zcash-post-fixup o;\n});\n+ tezos-accuser-010-PtGRANAD = osuper.tezos-accuser-010-PtGRANAD.overrideAttrs\n+ (o: {\n+ buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ postFixup = zcash-post-fixup o;\n+ });\n+ tezos-baker-010-PtGRANAD = osuper.tezos-baker-010-PtGRANAD.overrideAttrs\n+ (o: {\n+ buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ postFixup = zcash-post-fixup o;\n+ });\n+ tezos-endorser-010-PtGRANAD = osuper.tezos-endorser-010-PtGRANAD.overrideAttrs\n+ (o: {\n+ buildInputs = o.buildInputs ++ [ librustzcash self.makeWrapper ];\n+ postFixup = zcash-post-fixup o;\n+ });\ntezos-codec = osuper.tezos-codec.overrideAttrs\n(o: {\nbuildInputs = o.buildInputs ++ [ rustc-bls12-381 librustzcash self.makeWrapper ];\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/common.nix",
"new_path": "nix/modules/common.nix",
"diff": "@@ -22,10 +22,10 @@ rec {\ndaemonOptions = sharedOptions // {\nbaseProtocol = mkOption {\n- type = types.enum [ \"009-PsFLoren\"];\n+ type = types.enum [ \"009-PsFLoren\" \"010-PtGRANAD\"];\ndescription = ''\nBase protocol version,\n- only '009-PsFLoren' is supported.\n+ '009-PsFLoren' and '010-PtGRANAD' are supported.\n'';\nexample = \"009-PsFLoren\";\n};\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-accuser.nix",
"new_path": "nix/modules/tezos-accuser.nix",
"diff": "@@ -9,7 +9,9 @@ with lib;\nlet\ntezos-accuser-pkgs = {\n\"009-PsFLoren\" =\n- \"${pkgs.ocamlPackages.tezos-baker-009-PsFLoren}/bin/tezos-baker-009-PsFLoren\";\n+ \"${pkgs.ocamlPackages.tezos-accuser-009-PsFLoren}/bin/tezos-accuser-009-PsFLoren\";\n+ \"010-PtGRANAD\" =\n+ \"${pkgs.ocamlPackages.tezos-accuser-010-PtGRANAD}/bin/tezos-accuser-010-PtGRANAD\";\n};\ncfg = config.services.tezos-accuser;\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\n@@ -33,7 +35,7 @@ in {\nlet accuser-script = node-cfg: ''\n${tezos-accuser-pkgs.${node-cfg.baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n-E \"http://localhost:${toString node-cfg.rpcPort}\" \\\n- run with local node \"$STATE_DIRECTORY/node/data\" \"$@\"\n+ run \"$@\"\n'';\nin common.genDaemonConfig cfg.instances \"accuser\" tezos-accuser-pkgs accuser-script;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-baker.nix",
"new_path": "nix/modules/tezos-baker.nix",
"diff": "@@ -10,6 +10,8 @@ let\ntezos-baker-pkgs = {\n\"009-PsFLoren\" =\n\"${pkgs.ocamlPackages.tezos-baker-009-PsFLoren}/bin/tezos-baker-009-PsFLoren\";\n+ \"010-PtGRANAD\" =\n+ \"${pkgs.ocamlPackages.tezos-baker-010-PtGRANAD}/bin/tezos-baker-010-PtGRANAD\";\n};\ncfg = config.services.tezos-baker;\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\n@@ -18,11 +20,11 @@ let\nenable = mkEnableOption \"Tezos baker service\";\n- endorserAccountAlias = mkOption {\n+ bakerAccountAlias = mkOption {\ntype = types.str;\ndefault = \"\";\ndescription = ''\n- Alias for the tezos-endorser account.\n+ Alias for the tezos-baker account.\n'';\n};\n@@ -41,7 +43,7 @@ in {\nlet baker-script = node-cfg: ''\n${tezos-baker-pkgs.${node-cfg.baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n-E \"http://localhost:${toString node-cfg.rpcPort}\" \\\n- run with local node \"$STATE_DIRECTORY/node/data\" ${node-cfg.endorserAccountAlias}\n+ run with local node \"$STATE_DIRECTORY/node/data\" ${node-cfg.bakerAccountAlias}\n'';\nin common.genDaemonConfig cfg.instances \"baker\" tezos-baker-pkgs baker-script;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-endorser.nix",
"new_path": "nix/modules/tezos-endorser.nix",
"diff": "@@ -9,7 +9,9 @@ with lib;\nlet\ntezos-endorser-pkgs = {\n\"009-PsFLoren\" =\n- \"${pkgs.ocamlPackages.tezos-baker-009-PsFLoren}/bin/tezos-baker-009-PsFLoren\";\n+ \"${pkgs.ocamlPackages.tezos-endorser-009-PsFLoren}/bin/tezos-endorser-009-PsFLoren\";\n+ \"010-PtGRANAD\" =\n+ \"${pkgs.ocamlPackages.tezos-endorser-010-PtGRANAD}/bin/tezos-endorser-010-PtGRANAD\";\n};\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\ncfg = config.services.tezos-endorser;\n@@ -18,11 +20,11 @@ let\nenable = mkEnableOption \"Tezos endorser service\";\n- bakerAccountAlias = mkOption {\n+ endorserAccountAlias = mkOption {\ntype = types.str;\ndefault = \"\";\ndescription = ''\n- Alias for the tezos-baker account.\n+ Alias for the tezos-endorser account.\n'';\n};\n@@ -41,7 +43,7 @@ in {\nlet endorser-script = node-cfg: ''\n${tezos-endorser-pkgs.${node-cfg.baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n-E \"http://localhost:${toString node-cfg.rpcPort}\" \\\n- run with local node \"$STATE_DIRECTORY/node/data\" ${node-cfg.bakerAccountAlias}\n+ run ${node-cfg.endorserAccountAlias}\n'';\nin common.genDaemonConfig cfg.instances \"endorser\" tezos-endorser-pkgs endorser-script;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "protocols.json",
"new_path": "protocols.json",
"diff": "\"008-PtEdo2Zk\"\n],\n\"active\": [\n- \"009-PsFLoren\"\n+ \"009-PsFLoren\",\n+ \"010-PtGRANAD\"\n]\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/build-bottles.sh",
"new_path": "scripts/build-bottles.sh",
"diff": "@@ -18,11 +18,14 @@ brew bottle --force-core-tap --no-rebuild ./Formula/tezos-sapling-params.rb\n# we don't bottle meta-formulas that contains only services\nbuild_bottle ./Formula/tezos-accuser-009-PsFLoren.rb\n+build_bottle ./Formula/tezos-accuser-010-PtGRANAD.rb\nbuild_bottle ./Formula/tezos-admin-client.rb\nbuild_bottle ./Formula/tezos-baker-009-PsFLoren.rb\n+build_bottle ./Formula/tezos-baker-010-PtGRANAD.rb\nbuild_bottle ./Formula/tezos-client.rb\nbuild_bottle ./Formula/tezos-codec.rb\nbuild_bottle ./Formula/tezos-endorser-009-PsFLoren.rb\n+build_bottle ./Formula/tezos-endorser-010-PtGRANAD.rb\nbuild_bottle ./Formula/tezos-node.rb\nbuild_bottle ./Formula/tezos-sandbox.rb\nbuild_bottle ./Formula/tezos-signer.rb\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/test_script.py",
"new_path": "tests/test_script.py",
"diff": "@@ -86,6 +86,9 @@ def test_node_with_daemons_scenario(network, use_tls=False):\nwith subtest(\"run node with daemons on florencenet\"):\ntest_node_with_daemons_scenario(\"florencenet\")\n+with subtest(\"run node with daemons on granadanet\"):\n+ test_node_with_daemons_scenario(\"granadanet\")\n+\nwith subtest(\"run node with daemons on mainnet\"):\ntest_node_with_daemons_scenario(\"mainnet\")\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Support new protocol and testnet
Problem: In v9.2 new protocol with the new testnet were added.
We should support them.
Solution: Provide 010 support along with the new granadanet.
|
603,652
|
07.06.2021 11:04:53
| -10,800
|
093afa7e4c4160732a7b7c153a4bd8f506a56df5
|
Build v9.2 native packages
Problem: opam-repository was updated with 9.2 Tezos packages, which
means that we now can build native packages for Tezos.
Solution: Enable native packages building in CI again.
|
[
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -98,59 +98,59 @@ steps:\n# files from nix/ are massively used in tests ifrastructure\n- nix/.*\n-# - label: test deb source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 60\n-# agents:\n-# queue: \"docker\"\n-# only_changes: &native_packaging_changes_regexes\n-# - docker/package/.*\n-# - docker/docker-tezos-packages.sh\n-# - meta.json\n-# - protocols.json\n-# - nix/nix/sources.json\n-# - label: test deb binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-009-PsFLoren\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n-# only_changes: *native_packaging_changes_regexes\n-# - label: test rpm source packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# - ./docker/docker-tezos-packages.sh --os fedora --type source\n-# artifact_paths:\n-# - ./out/*\n-# branches: \"!master\"\n-# timeout_in_minutes: 60\n-# agents:\n-# queue: \"docker\"\n-# only_changes: *native_packaging_changes_regexes\n-# - label: test rpm binary packages via docker\n-# commands:\n-# - eval \"$SET_VERSION\"\n-# # Building all binary packages will take significant amount of time, so we build only one\n-# # in order to ensure package generation sanity\n-# - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-009-PsFLoren\n-# - rm -rf out\n-# # It takes much time to build binary package, so we do it only on master\n-# branches: \"master\"\n-# timeout_in_minutes: 90\n-# agents:\n-# queue: \"docker\"\n-# only_changes: *native_packaging_changes_regexes\n+ - label: test deb source packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n+ artifact_paths:\n+ - ./out/*\n+ branches: \"!master\"\n+ timeout_in_minutes: 60\n+ agents:\n+ queue: \"docker\"\n+ only_changes: &native_packaging_changes_regexes\n+ - docker/package/.*\n+ - docker/docker-tezos-packages.sh\n+ - meta.json\n+ - protocols.json\n+ - nix/nix/sources.json\n+ - label: test deb binary packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ # Building all binary packages will take significant amount of time, so we build only one\n+ # in order to ensure package generation sanity\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-009-PsFLoren\n+ - rm -rf out\n+ # It takes much time to build binary package, so we do it only on master\n+ branches: \"master\"\n+ timeout_in_minutes: 90\n+ agents:\n+ queue: \"docker\"\n+ only_changes: *native_packaging_changes_regexes\n+ - label: test rpm source packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ - ./docker/docker-tezos-packages.sh --os fedora --type source\n+ artifact_paths:\n+ - ./out/*\n+ branches: \"!master\"\n+ timeout_in_minutes: 60\n+ agents:\n+ queue: \"docker\"\n+ only_changes: *native_packaging_changes_regexes\n+ - label: test rpm binary packages via docker\n+ commands:\n+ - eval \"$SET_VERSION\"\n+ # Building all binary packages will take significant amount of time, so we build only one\n+ # in order to ensure package generation sanity\n+ - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-009-PsFLoren\n+ - rm -rf out\n+ # It takes much time to build binary package, so we do it only on master\n+ branches: \"master\"\n+ timeout_in_minutes: 90\n+ agents:\n+ queue: \"docker\"\n+ only_changes: *native_packaging_changes_regexes\n- label: create auto pre-release\ncommands:\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Build v9.2 native packages
Problem: opam-repository was updated with 9.2 Tezos packages, which
means that we now can build native packages for Tezos.
Solution: Enable native packages building in CI again.
|
603,652
|
03.06.2021 16:15:26
| -10,800
|
b49b06e2c4eae14b93a4e8a344b15815a3432b7b
|
Add v9.2 bottles hashes
Problem: v9.2-1 was released, brew formulas lack hashes for bottles with
precompiled binaries.
Solution: Add bottles hashes for mojave and catalina macOS versions.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"0d04e9e1878db26a6e0926650b0e9f611e67afdbd009c612caa1f5f834d27cbe\"\n+ sha256 cellar: :any, catalina: \"28450616af65a9d97ecc3725f729d9af24e29c71a5ac2c91e3ea9b6c4e0b91b8\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"new_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"ae671f1f843bbd2f6b2a384526f76e8a496bd076217cd85bc2b2726716531118\"\n+ sha256 cellar: :any, catalina: \"fc41f5475855cc3032afc6ee7ba3ef969d2db41394d0bf4ef8a1cc5dc04ff1cd\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, mojave: \"d75aeab27fac3762c6b0728bf3d9fc417694db820a9f2292517fde10e8e1bf17\"\n+ sha256 cellar: :any, catalina: \"aad125c5894cdd75413fe45d66b6812a28f0764d4ce4a427dcbd583ddd7eb183\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"9fc313190e500ce7440d1b69037a4684dc3dd8ddfdbd04395ef02334fafd77bb\"\n+ sha256 cellar: :any, catalina: \"6d24fa54ddcc2e95edc0bc35810e98aacc3fd015cc29d6dd40e3a376f3a0af00\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"new_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"6f15111cd07b7e07c13b39460ea938732846f174bb085e8d693f15587bb59bd0\"\n+ sha256 cellar: :any, catalina: \"77bfad0d2def00744911e9b127c98ca4280e7bf0c2e3eb758efe946ed9439bab\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, mojave: \"60c89c31056225d5e9c055ac7c21a08f3294fa787bcd66164546c80aa32f0ae8\"\n+ sha256 cellar: :any, catalina: \"57750599c8ab37365ebd05ca0dd151dd8ecb2033321a1782f4e2620a9f7fbe74\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, mojave: \"312d9d7f9d8e9a2b6476e807973839674cddf888e664c48bddc730e1256417ca\"\n+ sha256 cellar: :any, catalina: \"07e7150f7019b80de668c17f52846c9bb0ae33dbcfb493511b80e6f404ea58fe\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"179779a4da49d046f94d2d214c499d2906b7a267b74f85b01d5edaf53308bba5\"\n+ sha256 cellar: :any, catalina: \"3ea366692a1f64966e538661e65ef9d93b7dde04409a3c8da68947203fc8e889\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"new_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"ad331bc281968ec5d60f1790134d39f9b41277b38ee79f9f18c4e2a7bf5a54f6\"\n+ sha256 cellar: :any, catalina: \"c44bcf36243e30f1b660db268d45696cfd7bff76fa53e8a3ca689c439a35cac0\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, mojave: \"8af82462c209a329d509c4407e04b414c87eff652f926d74113de8ad03aa66b0\"\n+ sha256 cellar: :any, catalina: \"99e380d29164ff0f78bcb5e27928f732d427a5715a4400c7adf07cf726478695\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n+ sha256 cellar: :any, mojave: \"e0eb3aac39dd5c16def3c71db1318f19677d4d61128ee41c49c56c565018aaa5\"\n+ sha256 cellar: :any, catalina: \"55a7a5f6df2068fa2e9bcae5496ebc740924d3196bc1f3fb31e1223887f61e71\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, mojave: \"2f55c53a6baa0fca4638c021957258522bc5a39d03fdf8db1a27157dff481bea\"\n+ sha256 cellar: :any, catalina: \"17a10543e78da1bde5d43134dcf60ef49d7133831ff28926a9fb84ee40b8079a\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Add v9.2 bottles hashes
Problem: v9.2-1 was released, brew formulas lack hashes for bottles with
precompiled binaries.
Solution: Add bottles hashes for mojave and catalina macOS versions.
|
603,658
|
25.05.2021 07:04:43
| -7,200
|
c48c9327aab61da57d306c025bd6ce0be310eaf2
|
Add first version of baking wizard
Problem: we want to have an interactive way to set up baking
infrastructure, or just tezos-node.
Solution: created a CLI wizard to collect configuration through
queries and execute the approppriate steps.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -502,6 +502,7 @@ class TezosBakingServicesPackage(AbstractPackage):\ndef fetch_sources(self, out_dir):\nos.makedirs(out_dir)\n+ shutil.copy(f\"{os.path.dirname(__file__)}/tezos_baking_wizard.py\", out_dir)\ndef gen_control_file(self, deps, ubuntu_version, out):\nrun_deps = \", \".join(\n@@ -584,9 +585,17 @@ Maintainer: {self.meta.maintainer}\nfile_contents = \"\"\"\n.PHONY: install\n+BINDIR=/usr/bin\n+\ntezos-baking:\n-install: tezos-baking\n+tezos-baking-wizard:\n+ mv $(CURDIR)/tezos_baking_wizard.py $(CURDIR)/tezos-baking-wizard\n+ chmod +x $(CURDIR)/tezos-baking-wizard\n+\n+install: tezos-baking tezos-baking-wizard\n+ mkdir -p $(DESTDIR)$(BINDIR)\n+ cp $(CURDIR)/tezos-baking-wizard $(DESTDIR)$(BINDIR)/tezos-baking-wizard\n\"\"\"\nwith open(out, \"w\") as f:\nf.write(file_contents)\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/tezos_baking_wizard.py",
"diff": "+#!/usr/bin/env python3\n+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+\"\"\"\n+A wizard utility to help set up tezos-baker.\n+\n+Asks questions, validates answers, and executes the appropriate steps using the final configuration.\n+\"\"\"\n+\n+import os, sys, subprocess, shlex\n+import readline\n+import re, textwrap\n+import urllib.request\n+from typing import List\n+\n+# Input validators\n+\n+\n+def enum_range_validator(options):\n+ def _validator(input):\n+ intrange = list(map(str, range(1, len(options) + 1)))\n+ if input not in intrange and input not in options:\n+ raise ValueError(\n+ \"Please choose one of the provided values or use their respective numbers: \"\n+ + \", \".join(options)\n+ )\n+ try:\n+ opt = int(input) - 1\n+ except:\n+ return input\n+ else:\n+ opts = options\n+ if isinstance(options, dict):\n+ opts = list(options.keys())\n+ return opts[opt]\n+\n+ return _validator\n+\n+\n+def filepath_validator(input):\n+ if input and not os.path.isfile(input):\n+ raise ValueError(\"Please input a valid file path.\")\n+ return input\n+\n+\n+def required_field_validator(input):\n+ if not input.strip():\n+ raise ValueError(\"Please provide this required option.\")\n+ return input\n+\n+\n+# Runs the input through the passed validator, allowing for possible alteration,\n+# but doesn't raise an exception if it doesn't validate to allow for custom options, too.\n+def or_custom_validator(validator):\n+ def _validator(input):\n+ result = input\n+ try:\n+ result = validator(input)\n+ except:\n+ pass\n+ return result\n+\n+ return _validator\n+\n+\n+class Validator:\n+ def __init__(self, validator):\n+ self.validator = validator\n+\n+ def validate(self, input):\n+ if self.validator is not None:\n+ if isinstance(self.validator, list):\n+ for v in self.validator:\n+ input = v(input)\n+ return input\n+ else:\n+ return self.validator(input)\n+\n+\n+# Regexes\n+\n+ledger_regex = b\"ledger:\\/\\/[\\w\\-]+\\/[\\w\\-]+\\/[\\w']+\\/[\\w']+\"\n+secret_key_regex = b\"(encrypted|unencrypted):\\w+\"\n+address_regex = b\"tz1\\w{33}\"\n+\n+# Wizard CLI utility\n+\n+\n+def proc_call(cmd):\n+ return subprocess.check_call(shlex.split(cmd))\n+\n+\n+def fetch_snapshot(url):\n+ print(\"Downloading the snapshot from \", url)\n+ filename = \"/tmp/tezos_node.snapshot\"\n+ urllib.request.urlretrieve(url, filename, progressbar_hook)\n+ print()\n+ return filename\n+\n+\n+def progressbar_hook(chunk_number, chunk_size, total_size):\n+ done = chunk_number * chunk_size\n+ percent = min(int(done * 100 / total_size), 100)\n+ print(\"Progress: \", percent, \"%, \", int(done / (1024 * 1024)), \"MB\", end=\"\\r\")\n+\n+\n+def color(input, colorcode):\n+ return colorcode + input + \"\\x1b[0m\"\n+\n+\n+def yes_or_no(prompt, default=None):\n+ valid = False\n+ while not valid:\n+ answer = input(prompt).strip().lower()\n+ if not answer and default is not None:\n+ answer = default\n+ if answer in [\"y\", \"yes\"]:\n+ return True\n+ elif answer in [\"n\", \"no\"]:\n+ return False\n+ else:\n+ print(color(\"Please provide a 'yes' or 'no' answer.\", \"\\x1b[1;31m\"))\n+\n+\n+def list_connected_ledgers():\n+ output = subprocess.run(\n+ shlex.split(\"sudo -u tezos tezos-client list connected ledgers\"),\n+ capture_output=True,\n+ )\n+ return [name.decode() for name in re.findall(ledger_regex, output.stdout)]\n+\n+\n+class Step:\n+ def __init__(\n+ self,\n+ id: str,\n+ prompt: str,\n+ help: str,\n+ default: str = \"1\",\n+ options=None,\n+ validator=None,\n+ reqs=lambda _vs: True,\n+ ):\n+ self.id = id\n+ self.prompt = prompt\n+ self.help = help\n+ self.default = default\n+ self.options = options\n+ self.validator = validator\n+ self.reqs = reqs\n+\n+ def pprint_options(self):\n+ i = 1\n+ def_i = None\n+ try:\n+ def_i = int(self.default)\n+ except:\n+ pass\n+\n+ if self.options and isinstance(self.options, list):\n+ str_format = \"{:1}. {}\"\n+ for o in self.options:\n+ if def_i is not None and i == def_i:\n+ print(str_format.format(i, \"(default) \" + o))\n+ else:\n+ print(str_format.format(i, o))\n+ i += 1\n+ elif self.options and isinstance(self.options, dict):\n+ str_format = \"{:1}. {:<26} {}\"\n+ for o in self.options:\n+ description = textwrap.indent(\n+ textwrap.fill(self.options[o], 60), \" \" * 31\n+ ).lstrip()\n+ if def_i is not None and i == def_i:\n+ print(str_format.format(i, o + \" (default)\", description))\n+ else:\n+ print(str_format.format(i, o, description))\n+ i += 1\n+\n+\n+def run_wizard():\n+ print(\"Tezos Baking Wizard\")\n+ print()\n+ print(\n+ \"Welcome, this wizard will help you to set up the infrastructure to interact with the Tezos blockchain.\"\n+ )\n+ print(\n+ \"In order to run a baking instance, you'll need the following Tezos binaries:\\n\",\n+ \"tezos-client, tezos-node, tezos-baker-<proto>, tezos-endorser-<proto>.\\n\",\n+ \"If you have installed tezos-baking, these binaries are already installed.\",\n+ )\n+ print(\n+ \"To access help and possible options for each question, type in 'help' or '?'.\"\n+ )\n+ print(\"Type in 'exit' to quit.\")\n+ print()\n+\n+ networks = {\n+ \"mainnet\": \"Main Tezos network\",\n+ \"florencenet\": \"Test network using version 009 of Tezos protocol (Florence)\",\n+ \"granadanet\": \"Test network using version 010 of Tezos protocol (Granada)\",\n+ }\n+\n+ modes = {\n+ \"baker\": \"Set up and start all services for baking: \"\n+ \"tezos-node, tezos-baker, and tezos-endorser.\",\n+ \"node\": \"Only bootstrap and run the Tezos node.\",\n+ }\n+\n+ snapshot_import_modes = {\n+ \"download rolling\": \"Import rolling snapshot from xtz-shots.io (recommended)\",\n+ \"download full\": \"Import full snapshot from xtz-shots.io\",\n+ \"file\": \"Import snapshot from a file\",\n+ \"url\": \"Import snapshot from a url\",\n+ \"skip\": \"Skip snapshot import and synchronize with the network from scratch\",\n+ }\n+\n+ key_import_modes = {\n+ \"ledger\": \"From a ledger\",\n+ \"secret-key\": \"Either the unencrypted or password-encrypted secret key for your address\",\n+ \"json\": \"Faucet JSON file from https://faucet.tzalpha.net/\",\n+ }\n+\n+ systemd_enable = {\n+ \"yes\": \"Enable and start the service, running it both now and on every boot\",\n+ \"no\": \"Start the service this time only\",\n+ }\n+\n+ values = {}\n+\n+ steps = [\n+ Step(\n+ id=\"network\",\n+ prompt=\"Which Tezos network would you like to use?\\nCurrently supported:\",\n+ help=\"The selected network will be used to set up all required services.\\n\"\n+ \"The currently supported protocols are 009-PsFLoren (used on florencenet and mainnet) \\n\"\n+ \"and 010-PtGRANAD (granadanet).\\nKeep in mind that you must select the test network \"\n+ \"(either florencenet or granadanet) if you plan on baking with a faucet JSON file.\",\n+ options=networks,\n+ validator=Validator(enum_range_validator(networks)),\n+ ),\n+ Step(\n+ id=\"mode\",\n+ prompt=\"Do you want to set up baking or to run the standalone node?\",\n+ help=\"By default, tezos-baking provides predefined services for running baking instances \"\n+ \"on different networks.\\nSometimes, however, you might want to only run the Tezos node.\\n\"\n+ \"When this option is chosen, this wizard will help you bootstrap tezos-node only.\",\n+ options=modes,\n+ validator=Validator(enum_range_validator(modes)),\n+ ),\n+ Step(\n+ id=\"systemd_mode\",\n+ prompt=\"Would you like your setup to automatically start on boot?\",\n+ help=\"Starting the service will make it available just for this session, great\\n\"\n+ \"if you want to experiment. Enabling it will make it start on every boot.\",\n+ options=systemd_enable,\n+ validator=Validator(enum_range_validator(systemd_enable)),\n+ ),\n+ Step(\n+ id=\"snapshot\",\n+ prompt=\"The Tezos node can take a significant time to bootstrap from scratch.\\n\"\n+ \"Bootstrapping from a snapshot is suggested instead.\\n\"\n+ \"How would you like to proceed?\",\n+ help=\"A fully-synced local tezos-node is required for running a baking instance.\\n\"\n+ \"By default, service with tezos-node will start to bootstrap from scratch,\\n\"\n+ \"which will take a significant amount of time.\\nIn order to avoid this, we suggest \"\n+ \"bootstrapping from a snapshot instead.\\n\\n\"\n+ \"Snapshots can be downloaded from the following websites:\\n\"\n+ \"Tezos Giganode Snapshots - https://snapshots-tezos.giganode.io/ \\n\"\n+ \"XTZ-Shots - https://xtz-shots.io/ \\n\\n\"\n+ \"We recommend to use rolling snapshots. This is the smallest and the fastest mode\\n\"\n+ \"that is sufficient for baking (you can read more about other tezos-node history modes here:\\n\"\n+ \"https://tezos.gitlab.io/user/history_modes.html#history-modes ).\\n\"\n+ \"All commands within the service are run under the 'tezos' user.\",\n+ options=snapshot_import_modes,\n+ validator=Validator(enum_range_validator(snapshot_import_modes)),\n+ ),\n+ Step(\n+ id=\"snapshot_file\",\n+ prompt=\"Provide the path to the tezos-node snapshot file.\",\n+ help=\"You have indicated wanting to import the snapshot from a file.\\n\"\n+ \"You can download the snapshot yourself e.g. from XTZ-Shots or Tezos Giganode Snapshots.\",\n+ validator=Validator(filepath_validator),\n+ reqs=lambda vs: vs[\"snapshot\"] == \"file\",\n+ ),\n+ Step(\n+ id=\"snapshot_url\",\n+ prompt=\"Provide the url of the tezos-node snapshot file.\",\n+ help=\"You have indicated wanting to import the snapshot from a custom url.\\n\"\n+ \"You can use e.g. links to XTZ-Shots or Tezos Giganode Snapshots resources.\",\n+ reqs=lambda vs: vs[\"snapshot\"] == \"url\",\n+ ),\n+ Step(\n+ id=\"key_import_mode\",\n+ prompt=\"How do you want to import the baker key?\",\n+ help=\"To register the baker, its secret key needs to be imported to the data \"\n+ \"directory first.\\nBy default tezos-baking-<network>.service will use the 'baker' \"\n+ \"alias\\nfor the key that will be used for baking and endorsing.\\n\"\n+ \"If you want to test baking with a faucet file, make sure you have chosen a test network like \"\n+ + list(networks.keys())[1],\n+ options=key_import_modes,\n+ validator=Validator(enum_range_validator(key_import_modes)),\n+ reqs=lambda vs: vs[\"mode\"] == \"baker\",\n+ ),\n+ Step(\n+ id=\"ledger_url\",\n+ prompt=\"Provide the ledger URL for importing the baker secret key stored on a ledger.\",\n+ help=\"Your ledger URL should look something like <ledger://<mnemonic>/ed25519/0'/1'>\",\n+ default=None,\n+ options=list_connected_ledgers(),\n+ validator=Validator(\n+ [\n+ required_field_validator,\n+ or_custom_validator(enum_range_validator(list_connected_ledgers())),\n+ ]\n+ ),\n+ reqs=lambda vs: vs[\"mode\"] == \"baker\" and vs[\"key_import_mode\"] == \"ledger\",\n+ ),\n+ Step(\n+ id=\"secret_key\",\n+ prompt=\"Provide either the unencrypted or password-encrypted secret key for your address.\",\n+ help=\"The format is 'unencrypted:edsk...' for the unencrypted key, or 'encrypted:edesk...'\"\n+ \"for the encrypted key.\",\n+ validator=Validator(required_field_validator),\n+ reqs=lambda vs: vs[\"mode\"] == \"baker\"\n+ and vs[\"key_import_mode\"] == \"secret-key\",\n+ ),\n+ Step(\n+ id=\"json_filepath\",\n+ prompt=\"Provide the path to your downloaded faucet JSON file.\",\n+ help=\"Download the faucet JSON file from https://faucet.tzalpha.net/.\\n\"\n+ \"The file will contain the 'mnemonic' and 'secret' fields.\",\n+ validator=Validator([required_field_validator, filepath_validator]),\n+ reqs=lambda vs: vs[\"mode\"] == \"baker\" and vs[\"key_import_mode\"] == \"json\",\n+ ),\n+ ]\n+\n+ for step in steps:\n+ if not step.reqs(values):\n+ continue\n+\n+ validated = False\n+ while not validated:\n+ print(step.prompt)\n+ step.pprint_options()\n+ answer = input(\"> \").strip()\n+\n+ if answer.lower() in [\"quit\", \"exit\"]:\n+ print(\"Exiting Tezos Baking Wizard\")\n+ return None\n+ elif answer.lower() in [\"help\", \"?\"]:\n+ print(step.help)\n+ print()\n+ else:\n+ if not answer and step.default is not None:\n+ answer = step.default\n+\n+ try:\n+ answer = step.validator.validate(answer)\n+ except ValueError as e:\n+ print(color(\"Validation error: \" + str(e), \"\\x1b[1;31m\"))\n+ else:\n+ validated = True\n+ values[step.id] = answer\n+\n+ return values\n+\n+\n+class Setup:\n+ def __init__(self, config):\n+ self.config = config\n+\n+ # Check if an account with the 'baker' alias already exists, and ask the user\n+ # if it can be overwritten.\n+ def check_baker_account(self, cmd):\n+ output = subprocess.run(shlex.split(cmd), capture_output=True)\n+ if output.returncode and re.search(\n+ b\"The secret_key alias baker already exists.\", output.stderr\n+ ):\n+ value_regex = b\"(?:\" + ledger_regex + b\")|(?:\" + secret_key_regex + b\")\"\n+ value = re.search(value_regex, output.stderr).group(0)\n+ address = subprocess.run(\n+ shlex.split(\"sudo -u tezos tezos-client show address baker\"),\n+ capture_output=True,\n+ )\n+ if address.returncode == 0:\n+ address = re.search(address_regex, address.stdout).group(0)\n+ print(\"An account with the 'baker' alias already exists.\")\n+ print(\"Its current value is \", value.decode(\"utf-8\"))\n+ print(\"With a corresponding address: \", address.decode(\"utf-8\"))\n+\n+ if yes_or_no(\"Should it be replaced with the new import? <y/N> \", \"no\"):\n+ proc_call(cmd + \" --force\")\n+\n+ # Check if there is already some blockchain data in the tezos-node data directory,\n+ # and ask the user if it can be overwritten.\n+ def check_blockchain_data(self):\n+ node_dir = \"/var/lib/tezos/node-\" + self.config[\"network\"]\n+ node_dir_contents = os.listdir(node_dir)\n+ clean = [\"config.json\", \"version.json\"]\n+ diff = set(node_dir_contents) - set(clean)\n+ if diff:\n+ print(\"The Tezos node data directory already has some blockchain data:\")\n+ print(\"\\n\".join(diff))\n+ print()\n+ if yes_or_no(\"Delete this data and bootstrap the node again? <y/N> \", \"no\"):\n+ for path in diff:\n+ if proc_call(\"sudo rm -r \" + os.path.join(node_dir, path)):\n+ print(\n+ \"Could not clean the Tezos node data directory. \"\n+ \"Please do so manually.\"\n+ )\n+ raise OSError(\n+ \"'sudo rm -r \" + os.path.join(node_dir, path) + \"' failed.\"\n+ )\n+\n+ print(\"Node directory cleaned.\")\n+ return True\n+ return False\n+ return True\n+\n+ # Importing the snapshot for Node bootstrapping\n+ def import_snapshot(self):\n+ do_import = self.check_blockchain_data()\n+\n+ if do_import:\n+\n+ snapshot_file = \"\"\n+ if self.config[\"snapshot\"] == \"skip\":\n+ return\n+ elif self.config[\"snapshot\"] == \"file\":\n+ snapshot_file = self.config[\"snapshot_file\"]\n+ elif self.config[\"snapshot\"] == \"url\":\n+ url = self.config[\"snapshot_url\"]\n+ snapshot_file = fetch_snapshot(url)\n+ elif self.config[\"snapshot\"] == \"download rolling\":\n+ url = \"https://\" + self.config[\"network\"] + \".xtz-shots.io/rolling\"\n+ snapshot_file = fetch_snapshot(url)\n+ elif self.config[\"snapshot\"] == \"download full\":\n+ url = \"https://\" + self.config[\"network\"] + \".xtz-shots.io/full\"\n+ snapshot_file = fetch_snapshot(url)\n+\n+ proc_call(\n+ \"sudo -u tezos tezos-node-\"\n+ + self.config[\"network\"]\n+ + \" snapshot import \"\n+ + snapshot_file\n+ )\n+\n+ print(\"Snapshot imported.\")\n+\n+ if (\n+ self.config[\"snapshot\"] == \"download rolling\"\n+ or self.config[\"snapshot\"] == \"download full\"\n+ ):\n+ try:\n+ os.remove(\"/tmp/tezos_node.snapshot\")\n+ except:\n+ pass\n+ else:\n+ print(\"Deleted the downloaded snapshot.\")\n+\n+ # Bootstrapping tezos-node\n+ def bootstrap_node(self):\n+\n+ self.import_snapshot()\n+\n+ self.systemctl_start_action(\"node\")\n+ proc_call(\"sleep 5\")\n+\n+ proc_call(\"sudo -u tezos tezos-client bootstrapped\")\n+\n+ print()\n+ print(\"The Tezos node bootstrapped successfully.\")\n+\n+ # Importing the baker key\n+ def import_baker_key(self):\n+ if self.config[\"key_import_mode\"] == \"secret-key\":\n+ self.check_baker_account(\n+ \"sudo -u tezos tezos-client import secret key baker \"\n+ + self.config[\"secret_key\"]\n+ )\n+ elif self.config[\"key_import_mode\"] == \"json\":\n+ self.check_baker_account(\n+ \"sudo -u tezos tezos-client activate account baker with \"\n+ + self.config[\"json_filepath\"]\n+ )\n+\n+ else:\n+ print()\n+ input(\"Please open the Tezos Baking app on your ledger, then hit Enter.\")\n+ self.check_baker_account(\n+ \"sudo -u tezos tezos-client import secret key baker \"\n+ + self.config[\"ledger_url\"]\n+ )\n+ proc_call(\"sudo -u tezos tezos-client setup ledger to bake for baker\")\n+\n+ def register_baker(self):\n+ print()\n+ if self.config[\"key_import_mode\"] == \"ledger\":\n+ input(\n+ \"Please open the Tezos Baking or Tezos Wallet app on your ledger, then hit Enter.\"\n+ )\n+\n+ proc_call(\"sudo -u tezos tezos-client register key baker as delegate\")\n+ print(\n+ \"You can check a blockchain explorer (e.g. https://tzkt.io/ or https://tzstats.com/) \"\n+ \"to see the baker status and baking rights of your account.\"\n+ )\n+\n+ def start_baking(self):\n+ self.systemctl_start_action(\"baking\")\n+\n+ def systemctl_start_action(self, service):\n+ if self.config[\"systemd_mode\"] == \"yes\":\n+ proc_call(\n+ \"sudo systemctl enable tezos-\"\n+ + service\n+ + \"-\"\n+ + self.config[\"network\"]\n+ + \".service\"\n+ )\n+ proc_call(\n+ \"sudo systemctl start tezos-\"\n+ + service\n+ + \"-\"\n+ + self.config[\"network\"]\n+ + \".service\"\n+ )\n+\n+\n+def run_setup(cfg):\n+\n+ if cfg is not None:\n+ setup = Setup(cfg)\n+\n+ print(\"Trying to bootstrap tezos-node\")\n+ setup.bootstrap_node()\n+\n+ if cfg[\"mode\"] == \"node\":\n+ return\n+\n+ print(\"Importing the baker key\")\n+ setup.import_baker_key()\n+\n+ print(\"Registering the baker\")\n+ setup.register_baker()\n+\n+ print(\"Start baking instance\")\n+ setup.start_baking()\n+\n+ print(\n+ \"Congratulations! All required Tezos infrastructure services should now be started.\"\n+ \" You can show logs for all the services using the 'tezos' user by running: \"\n+ \"journalctl -f _UID=$(id tezos -u)\"\n+ )\n+\n+ if cfg[\"mode\"] == \"baker\":\n+ print()\n+ print(\"To stop the baking instance, run:\")\n+ print(\"sudo systemctl stop tezos-baking-\" + cfg[\"network\"] + \".service\")\n+\n+ print()\n+ print(\n+ \"If you previously enabled the baking service and want to disable it, run:\"\n+ )\n+ print(\"sudo systemctl disable tezos-baking-\" + cfg[\"network\"] + \".service\")\n+\n+\n+if __name__ == \"__main__\":\n+ readline.parse_and_bind(\"tab: complete\")\n+ readline.set_completer_delims(\" \")\n+\n+ try:\n+ cfg = run_wizard()\n+ except KeyboardInterrupt:\n+ print()\n+ print(\"Exiting Tezos Baking Wizard\")\n+ sys.exit(1)\n+ except EOFError:\n+ print()\n+ print(\"Exiting Tezos Baking Wizard\")\n+ sys.exit(1)\n+ except Exception as e:\n+ print(\"Error in Tezos Baking Wizard, exiting.\")\n+ logfile = \"tezos_baking_wizard.log\"\n+ with open(logfile, \"a\") as f:\n+ f.write(str(e) + \"\\n\")\n+ print(\"The error has been logged to\", os.path.abspath(logfile))\n+ sys.exit(1)\n+\n+ try:\n+ run_setup(cfg)\n+ except KeyboardInterrupt:\n+ proc_call(\"sudo systemctl stop tezos-baking-\" + cfg[\"network\"] + \".service\")\n+ print(\"Error in Tezos Baking setup, exiting.\")\n+ sys.exit(1)\n+ except EOFError:\n+ proc_call(\"sudo systemctl stop tezos-baking-\" + cfg[\"network\"] + \".service\")\n+ print(\"Error in Tezos Baking setup, exiting.\")\n+ sys.exit(1)\n+ except Exception as e:\n+ proc_call(\"sudo systemctl stop tezos-baking-\" + cfg[\"network\"] + \".service\")\n+ print(\"Error in Tezos Baking setup, exiting.\")\n+ logfile = \"tezos_baking_wizard.log\"\n+ with open(logfile, \"a\") as f:\n+ f.write(str(e) + \"\\n\")\n+ print(\"The error has been logged to\", os.path.abspath(logfile))\n+ sys.exit(1)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#201] Add first version of baking wizard
Problem: we want to have an interactive way to set up baking
infrastructure, or just tezos-node.
Solution: created a CLI wizard to collect configuration through
queries and execute the approppriate steps.
|
603,658
|
28.06.2021 16:51:34
| -10,800
|
988d8220117d29cadefd0ed1bbfa80dfcddc714d
|
Add the new v9.3 bottle hashes to brew formulas
Problem: v9.3-1 was released, but hashes of the new bottles have
not been added to the brew formulas yet.
Solution: added the bottle hashes for Mojave and Catalina macOS
versions.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"a21f5058c6eea3a506f6ceb43fef7fdc629605b217310ec133a73fe1b1a6c0b9\"\n+ sha256 cellar: :any, catalina: \"4ca8299efb7c0e252eeb4f6ec7c0add4939f551f42154e8e52699f4f574241b0\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"new_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"81459f2f87f132b7d13e8473993f4223adf869280887df51542e4be3de1d987d\"\n+ sha256 cellar: :any, catalina: \"47e03869afaba0bbff30d87c36fda6d0b37cbe30c00d05469995c72afaf2b037\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, mojave: \"1fc2d1d2234b8d6e90bb035aaf0a0d562bb9dc21add471ce439e1bb5f5df9ea0\"\n+ sha256 cellar: :any, catalina: \"e24bc106953b7223268e8abd347c758b425a08e884696e027e476b428bb930bf\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"14c43e2c9b7513a97fabd018cfb35d498a0ac35f198e74c706eb92db3c4861b7\"\n+ sha256 cellar: :any, catalina: \"cff999977a96d0fd12d1a39738a2643f5988b72177a9b035505689842357de3d\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"new_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"a998c6123f5829670f1ab300465acf08002562e2eee1fdc2b2393bc0261b3018\"\n+ sha256 cellar: :any, catalina: \"eb38204cab82ace41f2bc72a0a6782b301c6703c3bd6316edc98b105d0d366db\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, mojave: \"6fded8acb60d148d6c64d51309f883f8a7b14fa7a389d51e938ea7f41db67a3d\"\n+ sha256 cellar: :any, catalina: \"73f842efbfcce6fd2dda429431dfe2eca576ab0137abb69150e8823f841cc6e8\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, mojave: \"f2aa14883f719ddbb465ef1452377b255b3359146a14d2855ce9ae05c9c97c6b\"\n+ sha256 cellar: :any, catalina: \"777a047db949405c03a9d9d299c5d17c5e5cf619175875298962e523ce087c45\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"fbaaaf570060d4894b56b6eebb92d91834d886342a059871bc146424b4d6baad\"\n+ sha256 cellar: :any, catalina: \"cdc43d0a55ede36cee9ebeb9d3c6363eab648359b128603dea6ea375b8052ec9\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"new_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"c90ca7cc6d62103d2b6d6488ad2f4a336b6f58a297dc94766be83ee687a1494a\"\n+ sha256 cellar: :any, catalina: \"d08540ceda863465fbe39bdf3eb57bc3bf9ed414b0148de2adf30b856c3c0b40\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, mojave: \"371ee8d6cd7f1863013680815d077729fb59a7709e420e6fa5f9e69ad3eef157\"\n+ sha256 cellar: :any, catalina: \"e62a5201340eb5a6a5eec370f97867699bf59be13f4bc2bf482b68e21c248fa1\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n+ sha256 cellar: :any, mojave: \"48773847c79118a0ed0794d201dce381b8c6fc933bd480821502df1698239f95\"\n+ sha256 cellar: :any, catalina: \"c71e97f2272ad1979aa1e5a03c2caa590a8b71a11a90507d8184a0a310008b03\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, mojave: \"2f98c01cd6d7d09e9cf507ab2b195efcfd3dbce42e14ca6d1ccbb831765c8ee1\"\n+ sha256 cellar: :any, catalina: \"6ed5761d6cd9e546187f8d7a2c718a13425d39898918f2b79a3abf85e2f31760\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Add the new v9.3 bottle hashes to brew formulas
Problem: v9.3-1 was released, but hashes of the new bottles have
not been added to the brew formulas yet.
Solution: added the bottle hashes for Mojave and Catalina macOS
versions.
|
603,658
|
28.06.2021 16:56:48
| -10,800
|
1d912001112d263a2dff8d429e409809077a0704
|
Stop building tezos-sapling-params brew bottle
Problem: tezos-sapling-params doesn't change over time, and we
don't need its brew bottle, but we still build it.
Solution: removed building the tezos-sapling-params bottle from the
bottle building script.
|
[
{
"change_type": "MODIFY",
"old_path": "scripts/build-bottles.sh",
"new_path": "scripts/build-bottles.sh",
"diff": "@@ -12,9 +12,9 @@ build_bottle () {\n}\n# tezos-sapling-params is used as a dependency for some of the formulas\n-# so we handle it separately\n-brew install --formula --build-bottle ./Formula/tezos-sapling-params.rb\n-brew bottle --force-core-tap --no-rebuild ./Formula/tezos-sapling-params.rb\n+# so we handle it separately.\n+# We don't build the bottle for it because it is never updated over time.\n+brew install --formula ./Formula/tezos-sapling-params.rb\n# we don't bottle meta-formulas that contains only services\nbuild_bottle ./Formula/tezos-accuser-009-PsFLoren.rb\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Stop building tezos-sapling-params brew bottle
Problem: tezos-sapling-params doesn't change over time, and we
don't need its brew bottle, but we still build it.
Solution: removed building the tezos-sapling-params bottle from the
bottle building script.
|
603,652
|
23.06.2021 12:58:27
| -10,800
|
7d8dcf34f00679895fce898e3d9d5966cce8995d
|
Update address regex
Problem: Currently this regex matches only tz1 addresses. However there
are more supported curves and corresponding addresses.
Solution: Support tz1, tz2, tz3 addresses in the regex.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_baking_wizard.py",
"new_path": "docker/package/tezos_baking_wizard.py",
"diff": "@@ -54,7 +54,7 @@ systemd_enable = {\nledger_regex = b\"ledger:\\/\\/[\\w\\-]+\\/[\\w\\-]+\\/[\\w']+\\/[\\w']+\"\nsecret_key_regex = b\"(encrypted|unencrypted):(?:\\w{54}|\\w{88})\"\n-address_regex = b\"tz1\\w{33}\"\n+address_regex = b\"tz[123]\\w{33}\"\n# Input validators\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#218] Update address regex
Problem: Currently this regex matches only tz1 addresses. However there
are more supported curves and corresponding addresses.
Solution: Support tz1, tz2, tz3 addresses in the regex.
|
603,652
|
23.06.2021 12:59:31
| -10,800
|
dbb38803fa2d14408258bcf7228b7ae1625006f6
|
Show more info about addresses from ledger
Problem: Currently we show only ledger URLs for addresses that are store
on the ledgers, which is not very convenient when one has to choose the
desired key.
Solution: Also show address that corresponds to the given URL and the
balance of this address.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_baking_wizard.py",
"new_path": "docker/package/tezos_baking_wizard.py",
"diff": "@@ -258,6 +258,31 @@ def get_data_dir(network):\nreturn \"/var/lib/tezos/node-\" + network\n+def ledger_urls_info(ledger_urls):\n+ info = []\n+ max_url_len = max(map(len, ledger_urls))\n+ for ledger_url in ledger_urls:\n+ output = subprocess.run(\n+ shlex.split(\"sudo -u tezos tezos-client show ledger {}\".format(ledger_url)),\n+ capture_output=True,\n+ ).stdout\n+ addr = re.search(address_regex, output).group(0).decode()\n+ balance = (\n+ subprocess.run(\n+ shlex.split(\"tezos-client get balance for {}\".format(addr)),\n+ capture_output=True,\n+ )\n+ .stdout.decode()\n+ .strip()\n+ )\n+ info.append(\n+ (\"{:\" + str(max_url_len + 1) + \"} address: {}, balance: {}\").format(\n+ ledger_url + \",\", addr, balance\n+ )\n+ )\n+ return info\n+\n+\nclass Step:\ndef __init__(\nself,\n@@ -401,18 +426,24 @@ json_filepath_query = Step(\nvalidator=Validator([required_field_validator, filepath_validator]),\n)\n-ledger_url_query = Step(\n+# We define this step as a function since the corresponding step requires\n+# tezos-node to be running and bootstrapped in order to gather the data\n+# about the ledger-stored addresses, so it's called right before invoking\n+# after the node was boostrapped\n+def get_ledger_url_query(connected_ledgers):\n+ return Step(\nid=\"ledger_url\",\nprompt=\"Provide the ledger URL for importing the baker secret key stored on a ledger.\\n\"\n\"You can choose one of the suggested options or provide your own ledger URL.\",\nhelp=\"Your ledger URL should look something like <ledger://<mnemonic>/ed25519/0'/1'>\",\ndefault=None,\n- options=list_connected_ledgers(),\n+ options=ledger_urls_info(connected_ledgers),\nvalidator=Validator(\n[\nrequired_field_validator,\nor_validator(\n- enum_range_validator(list_connected_ledgers()), ledger_url_validator\n+ enum_range_validator(connected_ledgers),\n+ ledger_url_validator,\n),\n]\n),\n@@ -638,7 +669,8 @@ class Setup:\n)\nelse:\n- self.query_step(ledger_url_query)\n+ connected_ledgers = list_connected_ledgers()\n+ self.query_step(get_ledger_url_query(connected_ledgers))\nprint()\ninput(\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#218] Show more info about addresses from ledger
Problem: Currently we show only ledger URLs for addresses that are store
on the ledgers, which is not very convenient when one has to choose the
desired key.
Solution: Also show address that corresponds to the given URL and the
balance of this address.
|
603,652
|
30.06.2021 11:57:07
| -10,800
|
9408a0cf0d2a93ee87057c1a73ae45c64fd7ba6f
|
Publish Fedora packages via copr-cli
Problem: Currently publishing instructions for Fedora tells to upload
.src.rpm packages via Copr website. However, it's not very convenient.
Moreover, there is 'copr-cli' utility that can submit builds from the
terminal.
Solution: Update instructions to use 'copr-cli' for publishing Fedora
packages to Copr.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -171,7 +171,7 @@ In order to install `.rpm` package run the following command:\nsudo yum localinstall <path to rpm file>\n```\n-### `.src.rpm` packages\n+### `.src.rpm` packages and publishing them on Copr\nIn order to build source packages run the following commands:\n```\n@@ -187,4 +187,10 @@ rpm --add-sign out/*.src.rpm\n```\nNote, that in order to sign them, you'll need gpg key to be set up in `~/.rpmmacros`.\n-Resulting `.src.rpm` packages can be either built locally or submitted to the Copr.\n+Signed package can be submitted to the Copr repository via `copr-cli`.\n+Read more about setting up `copr-cli` [here](https://developer.fedoraproject.org/deployment/copr/copr-cli.html).\n+\n+In order to submit source package for building run the following command:\n+```\n+copr-cli build Serokell/Tezos --nowait <path to '.src.rpm' file>\n+```\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#231] Publish Fedora packages via copr-cli
Problem: Currently publishing instructions for Fedora tells to upload
.src.rpm packages via Copr website. However, it's not very convenient.
Moreover, there is 'copr-cli' utility that can submit builds from the
terminal.
Solution: Update instructions to use 'copr-cli' for publishing Fedora
packages to Copr.
|
603,658
|
30.06.2021 12:20:19
| -10,800
|
97d67fbb840eaf174118eda5dbad60371e68e365
|
Bump Tezos sources and opam revisions
Problem: Tezos announced a new release candidate. Revisions used
have to be bumped.
Solution: updated versions for Tezos sources and the opam repo.
|
[
{
"change_type": "MODIFY",
"old_path": "nix/nix/sources.json",
"new_path": "nix/nix/sources.json",
"diff": "\"homepage\": \"https://opam.ocaml.org\",\n\"owner\": \"ocaml\",\n\"repo\": \"opam-repository\",\n- \"rev\": \"71b47ea8e4435bed07e6beaee738cd49d5628acb\",\n- \"sha256\": \"0bvyw68mpgxaspqb8f2wg3pxmncx7j2dd0r69svpgshzbnp8q2rx\",\n+ \"rev\": \"364a3dc92d821c5de168ef561a9f2a79860cfafc\",\n+ \"sha256\": \"0qycjh2f75afnvclmi1vk69zlh6vz1sqcfrkrgf75q8yhvmj0cyx\",\n\"type\": \"tarball\",\n- \"url\": \"https://github.com/ocaml/opam-repository/archive/71b47ea8e4435bed07e6beaee738cd49d5628acb.tar.gz\",\n+ \"url\": \"https://github.com/ocaml/opam-repository/archive/364a3dc92d821c5de168ef561a9f2a79860cfafc.tar.gz\",\n\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"serokell-nix\": {\n\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"tezos\": {\n- \"ref\": \"refs/tags/v9.3\",\n+ \"ref\": \"refs/tags/v10.0-rc1\",\n\"repo\": \"https://gitlab.com/tezos/tezos\",\n- \"rev\": \"fcfb53bfd33f8fb22fc8eb30f1cbcde40389efb4\",\n+ \"rev\": \"f8f93a017bc538b89472c83d01613e394ff9475e\",\n\"type\": \"git\"\n}\n}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Bump Tezos sources and opam revisions
Problem: Tezos announced a new release candidate. Revisions used
have to be bumped.
Solution: updated versions for Tezos sources and the opam repo.
|
603,658
|
30.06.2021 19:23:07
| -10,800
|
bb7bf05fdd08fbea81d669d679176a6ce21bffa6
|
Add zlib to the list of docker dependencies
Problem: the docker CI step fails to build because ld cannot find -lz.
This is usually related to missing zlib.
Solution: added zlib-dev to the dependencies in both Dockerfiles. idek
|
[
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile",
"new_path": "docker/build/Dockerfile",
"diff": "@@ -5,7 +5,7 @@ FROM alpine:3.12\nRUN apk update\nRUN apk --no-cache --virtual add rsync git m4 build-base patch unzip \\\nbubblewrap wget pkgconfig gmp-dev libev-dev hidapi-dev eudev-dev perl opam libusb-dev bash \\\n- autoconf automake libtool linux-headers cargo libffi-dev\n+ autoconf automake libtool linux-headers cargo libffi-dev zlib-static\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\nCOPY ./build/static_libs.patch /static.patch\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile.aarch64",
"new_path": "docker/build/Dockerfile.aarch64",
"diff": "@@ -11,7 +11,7 @@ COPY --from=binary-fetch qemu-aarch64-static /usr/bin/qemu-aarch64-static\nRUN apk update\nRUN apk --no-cache --virtual add rsync git m4 build-base patch unzip \\\nbubblewrap wget pkgconfig gmp-dev libev-dev hidapi-dev eudev-dev perl opam libusb-dev bash \\\n- autoconf automake libtool linux-headers cargo libffi-dev\n+ autoconf automake libtool linux-headers cargo libffi-dev zlib-static\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\nCOPY ./build/static_libs.patch /static.patch\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Add zlib to the list of docker dependencies
Problem: the docker CI step fails to build because ld cannot find -lz.
This is usually related to missing zlib.
Solution: added zlib-dev to the dependencies in both Dockerfiles. idek
|
603,658
|
05.07.2021 18:07:20
| -10,800
|
2a8f9cdff16c4efd7b37a62963a44b152d87315a
|
Add v10.0-rc1-1 brew bottle hashes
Problem: v10.0-rc1-1 was released, we need to add hashes of the new
bottles to the brew formulas.
Solution: added the bottle hashes for Mojave and Catalina.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"10f03a9e2ec96bc4c57ddd7e6ad0ad1932566a4ce40c3aded80547171aa865e6\"\n+ sha256 cellar: :any, catalina: \"00188a4c251f17b998f5c32120e2ea940089d647e1fc4854bd76e1b543a6ca5b\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"new_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"ec82013b1e1da0648f6a83c070c37b8f1e72d57f1eada87abfca52764a86b18c\"\n+ sha256 cellar: :any, catalina: \"f244a31bed531116739b2cc08c0d9d0eaeedd2ec33dddbd44cb9c2128b00e8f4\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, mojave: \"951206775fe8105376fd056c5cade69e236926de6e1fb9b4653d2ef4bb1a4738\"\n+ sha256 cellar: :any, catalina: \"f5532228fc62c1890e391901a49fd6e5d48c5eb53d3aff305b0b2c9387adc473\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"14c447ddf7acc3b73a460116d9ce9b3e07160c2571d870cf0a0ddaed93cdb898\"\n+ sha256 cellar: :any, catalina: \"1729d5ed70095f6eb7db3f5325aac916e10156108d7943832ccc151246f7e74a\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"new_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"554d3af36a7caa239e45df427c566c7dc12fe976f592cd9d0c4ed52e2b12c98f\"\n+ sha256 cellar: :any, catalina: \"dde04a8b114f6aa009e6d25b4fdd136f1e75b08f6e7b154d3280319fd169f65e\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, mojave: \"efd58c8fd8c83078848429adcfada0cb657d4284e3e96a447144b4a61738855e\"\n+ sha256 cellar: :any, catalina: \"f572ddf16c9868ff06c583d4a99a2a9cecead1fe2762046656591fccb8240ce7\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, mojave: \"6a5e5e55f4019d2437ebf5b30817987732d9fcef1886035a32e58088e3b86ff0\"\n+ sha256 cellar: :any, catalina: \"eceb4aeb3e690896887da6752962f3de630128d02f8b230dbf94c39b25571eee\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"22b533ffff167705f8920b6c005980b6f4f97290b154cd5381ff8f0410bf43fd\"\n+ sha256 cellar: :any, catalina: \"c980696aa50be86cd27d8581c3e1920879f38ae957021ced1b8dcd433e6bbe63\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"new_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"2a6835e2d9261aed691cdd8077418b4302c438c0f7decf796797ad6a2351f36f\"\n+ sha256 cellar: :any, catalina: \"75316a1dd1360a3f0f7f0fef91597e005c8caa6d3eb30d73a0e4c2b34d887548\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, mojave: \"5bf0e72cd496803a8a1ff5661f4d335767cf7cee769eed03c9cd024bc5ac8c12\"\n+ sha256 cellar: :any, catalina: \"1247bb01ecee423e28f51ca98a8c6068bafb34bbe22535fc3a5f8c9d3499c783\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n+ sha256 cellar: :any, mojave: \"881ec24e96306fca5798ffbe812b8a60ae904988d46d4c73fd1f43aa8448c102\"\n+ sha256 cellar: :any, catalina: \"8099089e1c68f06f9866da60a32421ed53757dbf32a29ffd4692f19cf488cd03\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, mojave: \"ac0e5c7af9a8bef3223a7bea7e92f8dffa574c5463cdc3f2c988c97dace272ca\"\n+ sha256 cellar: :any, catalina: \"840879a07e50c46d6638e20beefc80fb24f29940c85cb5bc38778bb27c8d950e\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Add v10.0-rc1-1 brew bottle hashes
Problem: v10.0-rc1-1 was released, we need to add hashes of the new
bottles to the brew formulas.
Solution: added the bottle hashes for Mojave and Catalina.
|
603,652
|
05.07.2021 15:56:59
| -10,800
|
b65d156ec5f67b1e5e4efb6243030b9a8093acec
|
Bump Tezos sources
Problem: Tezos announced a new release candidate. Revisions used
have to be bumped.
Solution: updated versions for Tezos sources.
|
[
{
"change_type": "MODIFY",
"old_path": "nix/nix/sources.json",
"new_path": "nix/nix/sources.json",
"diff": "\"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n},\n\"tezos\": {\n- \"ref\": \"refs/tags/v10.0-rc1\",\n+ \"ref\": \"refs/tags/v9.4\",\n\"repo\": \"https://gitlab.com/tezos/tezos\",\n- \"rev\": \"f8f93a017bc538b89472c83d01613e394ff9475e\",\n+ \"rev\": \"706457dc9588860fe8d3f1eb0ad7e463a5eba025\",\n\"type\": \"git\"\n}\n}\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Bump Tezos sources
Problem: Tezos announced a new release candidate. Revisions used
have to be bumped.
Solution: updated versions for Tezos sources.
|
603,652
|
06.07.2021 15:54:06
| -10,800
|
11f968ebfec77c7bd69ca35443bd4a1266e6230a
|
Fix Copr project name
Problem: `Serokell/Tezos` project doesn't exist on Copr.
Solution: Use `@Serokell/Tezos` instead.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -192,5 +192,5 @@ Read more about setting up `copr-cli` [here](https://developer.fedoraproject.org\nIn order to submit source package for building run the following command:\n```\n-copr-cli build Serokell/Tezos --nowait <path to '.src.rpm' file>\n+copr-cli build @Serokell/Tezos --nowait <path to '.src.rpm' file>\n```\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#231] Fix Copr project name
Problem: `Serokell/Tezos` project doesn't exist on Copr.
Solution: Use `@Serokell/Tezos` instead.
|
603,652
|
07.07.2021 11:14:40
| -10,800
|
3bc1a9b8fad85e0d6760ed41777fe08209bf47ff
|
Add a note about dput config
Problem: If one is running dput not on Ubuntu, it has to provide config
to it manually.
Solution: Add a note about it to the packaging README along with the
suggestes default config.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -115,10 +115,22 @@ Once these files are updated, they should be signed using `debsign`.\ndebsign ../out/*.changes\n```\n+If you're not running `dput` on Ubuntu, you'll need to provide a config for it.\n+Sample config can be found [here](./.dput.cf). Put the contents of this config\n+into `~/.dput.cf`. In case you already have a config, add the following piece\n+to it for the further convenience:\n+```\n+[tezos-serokell]\n+fqdn = ppa.launchpad.net\n+method = ftp\n+incoming = ~serokell/ubuntu/tezos\n+login = anonymous\n+```\n+\nSigned files now can be submitted to Launchpad PPA. In order to do that run the following\ncommand for each `.changes` file:\n```\n-dput ppa:serokell/tezos ../out/<package>.changes\n+dput tezos-serokell ../out/<package>.changes\n```\n#### Updating release in scope of the same upstream version\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/package/.dput.cf",
"diff": "+# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/>\n+#\n+# SPDX-License-Identifier: LicenseRef-MIT-TQ\n+\n+[DEFAULT]\n+login = *\n+method = ftp\n+hash = md5\n+allow_unsigned_uploads = 0\n+allow_dcut = 0\n+run_lintian = 0\n+run_dinstall = 0\n+check_version = 0\n+scp_compress = 0\n+post_upload_command =\n+pre_upload_command =\n+passive_ftp = 1\n+default_host_main =\n+allowed_distributions = (?!UNRELEASED)\n+\n+[tezos-serokell]\n+fqdn = ppa.launchpad.net\n+method = ftp\n+incoming = ~serokell/ubuntu/tezos\n+login = anonymous\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#231] Add a note about dput config
Problem: If one is running dput not on Ubuntu, it has to provide config
to it manually.
Solution: Add a note about it to the packaging README along with the
suggestes default config.
|
603,652
|
07.07.2021 10:42:07
| -10,800
|
2e53294d1adb1ad7b881a18003fc08d85e4f5b0a
|
Add bottles hashes for v9.4 formulas
Problem: We've built and added v9.4 bottles to the corresponding
release.
Solution: Update hashes, so that it's possible to fetch bottles for
Mojave and Catalina.
|
[
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"new_path": "Formula/tezos-accuser-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"254268b627fc7631dae8d0e34d3d5dcfefb140b0bb25a8a84c2f4be4faadd700\"\n+ sha256 cellar: :any, catalina: \"6e98393d2bebeeffb8301e51ea23ab9610062644134e6e7bcee6cdbc0968b290\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"new_path": "Formula/tezos-accuser-010-PtGRANAD.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAccuser010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuser010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"9b4ddddbb979b4c11f3e53decc6687a06171d06405d6be5281d9b20af1de34a2\"\n+ sha256 cellar: :any, catalina: \"b7d4893ce285d58a8f66e128d660e7f3d8106b990b571af5f364bc607141d2ed\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, mojave: \"1fe91e1f7f98a42ff0e09978bdfcf48d30031b7c837a8878a391b1f147470622\"\n+ sha256 cellar: :any, catalina: \"c95e31d8d77bfe04020fee4a30c32f46bab6d1412ae2220c92a5084f834cd6ef\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-009-PsFLoren.rb",
"new_path": "Formula/tezos-baker-009-PsFLoren.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"b3827685f4756ce537fb35df86a3f1e44634eef967d3f6d3e191d11935eba314\"\n+ sha256 cellar: :any, catalina: \"7c77b945a0bfc2e0701093a751df3733a2b792f8ce6ca8837a85d2668ed53b23\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"new_path": "Formula/tezos-baker-010-PtGRANAD.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosBaker010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBaker010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"0faa8e7ac68db9fd14806e39e654a7f1967c51058149647f65ab2cc087f71b8e\"\n+ sha256 cellar: :any, catalina: \"22b2feb303c0dee574bad47cd038d6d222648f65c1f364f55294864cf725f05c\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, mojave: \"3fea2a971103bb9706179b1b7d14177e344efde0967e212fb285e24a3b777a1f\"\n+ sha256 cellar: :any, catalina: \"4519015a1101739fe0af661e5b387bc368b98ad20709e8cb0ae09a0fd7a54357\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, mojave: \"402498d8679bdc88c05c35164cf73febe8b0eeeb26fa36308467f7966353ab44\"\n+ sha256 cellar: :any, catalina: \"6f83dcdf9b11ff61119dc89536d9d25db5d8968c9309a8b70358d80f1cc72508\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"new_path": "Formula/tezos-endorser-009-PsFLoren.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser009Psfloren < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser009Psfloren.version}/\"\n+ sha256 cellar: :any, mojave: \"7f2baf83c1ec2b42e59b40e050be7a3b566eb40b82395b95fc5b2887f45af03e\"\n+ sha256 cellar: :any, catalina: \"f66162ec30777189ad95156aae9731399d7145b13e1e5a115b5544422624f527\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"new_path": "Formula/tezos-endorser-010-PtGRANAD.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosEndorser010Ptgranad < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosEndorser010Ptgranad.version}/\"\n+ sha256 cellar: :any, mojave: \"23e207dd247040abe4b8148934f86c376bfc15fe14743c332f85f80d338886be\"\n+ sha256 cellar: :any, catalina: \"3a9c0ee7f407051ee646ba220cae1c774d49f99946af029aad84f4517e19dceb\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, mojave: \"ccba11ac26a99be73abd711f5306dba1c46f61758e815221ab086a82afc06a4a\"\n+ sha256 cellar: :any, catalina: \"5cfcda0946cd83af0bfbc00393b3107194cfb6cd43a25ef6da70422c5d4c9d2b\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-sandbox.rb",
"new_path": "Formula/tezos-sandbox.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSandbox < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSandbox.version}/\"\n+ sha256 cellar: :any, mojave: \"5e96fd1b329b3b0908d664721305c4d6b21d232cbe0faff296558ec9feb05b3b\"\n+ sha256 cellar: :any, catalina: \"25417433e87410a2ff72b71b639929758587e87f1ec787b1f268a12cccb4953c\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, mojave: \"b850fbe206e0ac42f9bca33142f92ae2ef80dfb104ce05da549f7113b9c05a9f\"\n+ sha256 cellar: :any, catalina: \"3c0c5ce0b700e2398f2632f475c227e69e71d45de38f7f89654d0e700b2f4946\"\nend\ndef make_deps\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Add bottles hashes for v9.4 formulas
Problem: We've built and added v9.4 bottles to the corresponding
release.
Solution: Update hashes, so that it's possible to fetch bottles for
Mojave and Catalina.
|
603,658
|
07.07.2021 13:14:29
| -10,800
|
25d279af7e3ef5765180d45ebada09b73e6798b5
|
Improve progress reporting in baking wizard
Problem: currently in the baking wizard, there's a confusing pause
in the output after importing the snapshot.
Solution: added an extra output explaining what needs to be done and
what has already transpired. Removed the message repeating every second.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_baking_wizard.py",
"new_path": "docker/package/tezos_baking_wizard.py",
"diff": "@@ -622,17 +622,26 @@ class Setup:\nself.import_snapshot()\n+ print(\n+ \"Starting the node service. This is expected to take some \"\n+ \"time, as the node needs a node identity to be generated.\"\n+ )\n+\nself.systemctl_start_action(\"node\")\n+ print(\"Waiting for the node service to start...\")\n+\nwhile True:\nrpc_address = self.config[\"node_rpc_addr\"]\ntry:\nurllib.request.urlopen(rpc_address + \"/version\")\nbreak\nexcept urllib.error.URLError:\n- print(\"...Waiting for the node service to start...\")\nproc_call(\"sleep 1\")\n+ print(\"Generated node identity and started the service.\")\n+ print(\"Waiting for the node to bootstrap...\")\n+\nproc_call(\n\"sudo -u tezos tezos-client --endpoint \" + rpc_address + \" bootstrapped\"\n)\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#243] Improve progress reporting in baking wizard
Problem: currently in the baking wizard, there's a confusing pause
in the output after importing the snapshot.
Solution: added an extra output explaining what needs to be done and
what has already transpired. Removed the message repeating every second.
|
603,652
|
07.07.2021 14:54:00
| -10,800
|
25061d6598485fa773a0b558980ab08581d0d994
|
Fix dput config reference
Problem: xrefcheck complains about invalid local reference.
Solution: Fix the reference.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -116,7 +116,7 @@ debsign ../out/*.changes\n```\nIf you're not running `dput` on Ubuntu, you'll need to provide a config for it.\n-Sample config can be found [here](./.dput.cf). Put the contents of this config\n+Sample config can be found [here](./package/.dput.cf). Put the contents of this config\ninto `~/.dput.cf`. In case you already have a config, add the following piece\nto it for the further convenience:\n```\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
Fix dput config reference
Problem: xrefcheck complains about invalid local reference.
Solution: Fix the reference.
|
603,652
|
07.07.2021 18:07:11
| -10,800
|
00b00961f77ec1215feb262dd350117821b6975a
|
Set high watermark explicitly
Problem: 'tezos-client setup ledger to baker' doesn't update high
watermark by default and thus bakes and endorsments can be missed in
case we switch from network with higher number of blocks to the network
with lower number of blocks.
Solution: Provide current level as high watermark expicitly.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_baking_wizard.py",
"new_path": "docker/package/tezos_baking_wizard.py",
"diff": "@@ -13,6 +13,7 @@ import os, sys, subprocess, shlex\nimport readline\nimport re, textwrap\nimport urllib.request\n+import json\nfrom typing import List\n@@ -497,6 +498,12 @@ class Setup:\n+ self.config[\"node_rpc_addr\"]\n)\n+ def get_current_head_level(self):\n+ response = urllib.request.urlopen(\n+ self.config[\"node_rpc_addr\"] + \"/chains/main/blocks/head/header\"\n+ )\n+ return str(json.load(response)[\"level\"])\n+\n# Check if there is already some blockchain data in the tezos-node data directory,\n# and ask the user if it can be overwritten.\ndef check_blockchain_data(self):\n@@ -736,6 +743,8 @@ class Setup:\n+ tezos_client_options\n+ \" setup ledger to bake for \"\n+ baker_alias\n+ + \" --main-hwm \"\n+ + self.get_current_head_level()\n)\nexcept EOFError:\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#244] Set high watermark explicitly
Problem: 'tezos-client setup ledger to baker' doesn't update high
watermark by default and thus bakes and endorsments can be missed in
case we switch from network with higher number of blocks to the network
with lower number of blocks.
Solution: Provide current level as high watermark expicitly.
|
603,658
|
08.07.2021 17:34:03
| -10,800
|
bc4dafdbb243688a33a5d491fefe53d05e1f83d9
|
Rename the CLI wizard
Problem: the CLI wizard we provide can be used to set up a baking
instance or just the Tezos node, but we call it tezos-baking-wizard.
This name is a bit confusing.
Solution: renamed the wizard to tezos-setup-wizard.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -502,7 +502,7 @@ class TezosBakingServicesPackage(AbstractPackage):\ndef fetch_sources(self, out_dir):\nos.makedirs(out_dir)\n- shutil.copy(f\"{os.path.dirname(__file__)}/tezos_baking_wizard.py\", out_dir)\n+ shutil.copy(f\"{os.path.dirname(__file__)}/tezos_setup_wizard.py\", out_dir)\ndef gen_control_file(self, deps, ubuntu_version, out):\nrun_deps = \", \".join(\n@@ -589,13 +589,13 @@ BINDIR=/usr/bin\ntezos-baking:\n-tezos-baking-wizard:\n- mv $(CURDIR)/tezos_baking_wizard.py $(CURDIR)/tezos-baking-wizard\n- chmod +x $(CURDIR)/tezos-baking-wizard\n+tezos-setup-wizard:\n+ mv $(CURDIR)/tezos_setup_wizard.py $(CURDIR)/tezos-setup-wizard\n+ chmod +x $(CURDIR)/tezos-setup-wizard\n-install: tezos-baking tezos-baking-wizard\n+install: tezos-baking tezos-setup-wizard\nmkdir -p $(DESTDIR)$(BINDIR)\n- cp $(CURDIR)/tezos-baking-wizard $(DESTDIR)$(BINDIR)/tezos-baking-wizard\n+ cp $(CURDIR)/tezos-setup-wizard $(DESTDIR)$(BINDIR)/tezos-setup-wizard\n\"\"\"\nwith open(out, \"w\") as f:\nf.write(file_contents)\n"
},
{
"change_type": "RENAME",
"old_path": "docker/package/tezos_baking_wizard.py",
"new_path": "docker/package/tezos_setup_wizard.py",
"diff": "@@ -804,7 +804,7 @@ class Setup:\ndef run_setup(self):\n- print(\"Tezos Baking Wizard\")\n+ print(\"Tezos Setup Wizard\")\nprint()\nprint(\n\"Welcome, this wizard will help you to set up the infrastructure\",\n@@ -903,7 +903,7 @@ if __name__ == \"__main__\":\n+ setup.config[\"network\"]\n+ \".service\"\n)\n- print(\"Exiting the Tezos Baking Wizard.\")\n+ print(\"Exiting the Tezos Setup Wizard.\")\nsys.exit(1)\nexcept EOFError:\nif \"network\" in setup.config:\n@@ -912,7 +912,7 @@ if __name__ == \"__main__\":\n+ setup.config[\"network\"]\n+ \".service\"\n)\n- print(\"Exiting the Tezos Baking Wizard.\")\n+ print(\"Exiting the Tezos Setup Wizard.\")\nsys.exit(1)\nexcept Exception as e:\nif \"network\" in setup.config:\n@@ -921,8 +921,8 @@ if __name__ == \"__main__\":\n+ setup.config[\"network\"]\n+ \".service\"\n)\n- print(\"Error in Tezos Baking setup, exiting.\")\n- logfile = \"tezos_baking_wizard.log\"\n+ print(\"Error in Tezos Setup Wizard, exiting.\")\n+ logfile = \"tezos_setup_wizard.log\"\nwith open(logfile, \"a\") as f:\nf.write(str(e) + \"\\n\")\nprint(\"The error has been logged to\", os.path.abspath(logfile))\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#201] Rename the CLI wizard
Problem: the CLI wizard we provide can be used to set up a baking
instance or just the Tezos node, but we call it tezos-baking-wizard.
This name is a bit confusing.
Solution: renamed the wizard to tezos-setup-wizard.
|
603,658
|
08.07.2021 18:58:19
| -10,800
|
d44317a29b4f19dd7c55ebca3cacf1752685ea4d
|
Update version number
Problem: we decided to rename the CLI wizard, thus changing our packages.
We need to bump the tezos-baking version, but covertly :007:
Solution: appended a letter to the version in the native tezos-baking
package.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "import os, subprocess\nimport shutil\n+from copy import deepcopy\nfrom abc import abstractmethod\nfrom typing import List, Dict\n-\nfrom .meta import PackagesMeta\nfrom .systemd import (\nInstall,\n@@ -446,6 +446,13 @@ install: tezos-sapling-params\nclass TezosBakingServicesPackage(AbstractPackage):\n+\n+ # Sometimes we need to update the tezos-baking package inbetween\n+ # native releases, so we append an extra letter to the version of\n+ # the package.\n+ # This should be reset to \"\" whenever the native version is bumped.\n+ letter_version = \"a\"\n+\ndef __init__(\nself,\ntarget_networks: List[str],\n@@ -454,7 +461,8 @@ class TezosBakingServicesPackage(AbstractPackage):\n):\nself.name = \"tezos-baking\"\nself.desc = \"Package that provides systemd services that orchestrate other services from Tezos packages\"\n- self.meta = meta\n+ self.meta = deepcopy(meta)\n+ self.meta.version = self.meta.version + self.letter_version\nself.target_protos = set()\nfor network in target_networks:\nfor proto in network_protos[network]:\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#201] Update version number
Problem: we decided to rename the CLI wizard, thus changing our packages.
We need to bump the tezos-baking version, but covertly :007:
Solution: appended a letter to the version in the native tezos-baking
package.
|
603,658
|
09.07.2021 11:49:01
| -10,800
|
d4e95078b7161b834f2150e4cc79fcbf9bce681c
|
Update the release PR template
Problem: we introduce a new 'appending an extra letter' versioning technique
for tezos-baking, so it'd be nice to not forget to remove it when a new
native release comes out.
Solution: added a check about that to the release pull request template,
also fixed links.
|
[
{
"change_type": "MODIFY",
"old_path": ".github/PULL_REQUEST_TEMPLATE/release_pull_request_template.md",
"new_path": ".github/PULL_REQUEST_TEMPLATE/release_pull_request_template.md",
"diff": "This PR introduces a new <!-- insert new version here --> release in tezos-packaging.\n-<!-- Depending on the type of the release some of the points below can be ommited.\n+<!-- Depending on the type of the release some of the points below can be omitted.\nE.g. in case we introduce a new changes to our native packages, it's not necessary to bump\nused Tezos sources, create a new release in this repository and update brew formulas.\n@@ -24,15 +24,16 @@ Follows #\n### Changes related to the creation of a release (conditional)\n-- [ ] I updated Tezos sources and opam-repository (if needed) revisions in [sources.json](../../tree/master/nix/nix/sources.json).\n-- [ ] I removed old bottles hashes from the brew formulas in [Formula directory](../../tree/master/Formula).\n-- [ ] I updated `url :tag` and `version`s in brew formulas..\n-- [ ] I updated release number in [meta.json](../../tree/master/meta.json).\n+- [ ] I updated Tezos sources and opam-repository (if needed) revisions in [sources.json](/serokell/tezos-packaging/tree/master/nix/nix/sources.json).\n+- [ ] I removed old bottles hashes from the brew formulas in [Formula directory](/serokell/tezos-packaging/tree/master/Formula).\n+- [ ] I updated `url :tag` and `version`s in brew formulas.\n+- [ ] I updated release number in [meta.json](/serokell/tezos-packaging/tree/master/meta.json).\n+- [ ] If the native release version was updated, I reset the `letter_version` in [model.py](/serokell/tezos-packaging/tree/master/docker/package/model.py).\n- [ ] I removed native-packaging-related steps from CI in case opam-repository wasn't updated yet.\n#### In case the new Tezos release provides a new protocol and corresponding testnet\n-- [ ] I supported new protocol in [protocols.json](../../tree/master/protocols.json).\n+- [ ] I supported new protocol in [protocols.json](/serokell/tezos-packaging/tree/master/protocols.json).\n- [ ] I supported new protocol and testnet in native packaging.\n- [ ] I supported new protocol and testnet in brew formulas.\n- [ ] I added tests for the new protocol and testnet.\n@@ -51,8 +52,9 @@ and checking unfinished points in the merged release PR using this template.\n#### Update brew bottles and repository mirrors\n-- [ ] I compiled brew bottles for all required macOS versions using [`build-bottles.sh`](../../tree/scripts/build-bottles.sh)\n- script and uploaded them to the created release. Note that for this you'll need a macOS machine running each required version.\n+- [ ] I compiled brew bottles for all required macOS versions using [`build-bottles.sh`](/serokell/tezos-packaging/tree/scripts/build-bottles.sh)\n+ script and uploaded them to the created release.\n+ Note that for this you'll need a macOS machine running each required version.\n- [ ] I added new bottles sha256 hashes to the brew formulas.\n- [ ] I pushed changes to either [tezos-packaging-rc](https://github.com/serokell/tezos-packaging-rc) or\n[tezos-packaging-stable](https://github.com/serokell/tezos-packaging-stable) mirror repositories.\n@@ -61,10 +63,10 @@ and checking unfinished points in the merged release PR using this template.\nOnce [opam-repository](https://opam.ocaml.org/packages/) is updated with the new version of Tezos packages.\n-- [ ] I published new Ubuntu packages, see [these instructions](../../tree/master/docker#source-packages-and-publishing-them-on-launchpad-ppa).\n-- [ ] I published new Fedora packages, see [these instructions](../../tree/master/docker#srcrpm-packages).\n+- [ ] I published new Ubuntu packages, see [these instructions](/serokell/tezos-packaging/tree/master/docker#source-packages-and-publishing-them-on-launchpad-ppa).\n+- [ ] I published new Fedora packages, see [these instructions](/serokell/tezos-packaging/tree/master/docker#srcrpm-packages).\n#### Update documentation\n-- [ ] I updated [README.md](../../tree/master/README.md).\n-- [ ] I updated [baking doc](../../tree/master/docs/baking.md).\n+- [ ] I updated [README.md](/serokell/tezos-packaging/tree/master/README.md).\n+- [ ] I updated [baking doc](/serokell/tezos-packaging/tree/master/docs/baking.md).\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#201] Update the release PR template
Problem: we introduce a new 'appending an extra letter' versioning technique
for tezos-baking, so it'd be nice to not forget to remove it when a new
native release comes out.
Solution: added a check about that to the release pull request template,
also fixed links.
|
603,658
|
19.07.2021 17:11:08
| -10,800
|
0cdfd2298b1411493b0aa3eeb60ad1ea7a001ff2
|
Suppress Tezos testnet warning
Problem: currently, if the Tezos setup wizard is used on a testnet,
the "This is NOT the Tezos Mainnet." warning is shown multiple
times, which disrupts the flow of the setup.
Solution: suppressed the warning by temporarily passing the
approppriate environment variable with every tezos-client call.
|
[
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_setup_wizard.py",
"new_path": "docker/package/tezos_setup_wizard.py",
"diff": "@@ -162,15 +162,22 @@ class Validator:\n# Wizard CLI utility\n+suppress_warning_env = dict(os.environ, TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=\"YES\")\n+\n+\ndef proc_call(cmd):\n- return subprocess.check_call(shlex.split(cmd))\n+ return subprocess.check_call(shlex.split(cmd), env=suppress_warning_env)\ndef get_proc_output(cmd):\nif sys.version_info.major == 3 and sys.version_info.minor < 7:\n- return subprocess.run(shlex.split(cmd), stdout=subprocess.PIPE)\n+ return subprocess.run(\n+ shlex.split(cmd), stdout=subprocess.PIPE, env=suppress_warning_env\n+ )\nelse:\n- return subprocess.run(shlex.split(cmd), capture_output=True)\n+ return subprocess.run(\n+ shlex.split(cmd), capture_output=True, env=suppress_warning_env\n+ )\ndef fetch_snapshot(url):\n@@ -208,7 +215,7 @@ def yes_or_no(prompt, default=None):\ndef list_connected_ledgers():\n- output = get_proc_output(\"sudo -u tezos tezos-client list connected ledgers\")\n+ output = get_proc_output(\"sudo -u tezos -E tezos-client list connected ledgers\")\nreturn [name.decode() for name in re.findall(ledger_regex, output.stdout)]\n@@ -238,12 +245,15 @@ def ledger_urls_info(ledger_urls, node_endpoint):\nmax_url_len = max(map(len, ledger_urls))\nfor ledger_url in ledger_urls:\noutput = get_proc_output(\n- \"sudo -u tezos tezos-client show ledger {}\".format(ledger_url)\n+ \"sudo -u tezos -E tezos-client show ledger {}\".format(ledger_url)\n).stdout\naddr = re.search(address_regex, output).group(0).decode()\nbalance = (\nget_proc_output(\n- \"tezos-client --endpoint \" + node_endpoint + \" get balance for \" + addr\n+ \"sudo -u tezos -E tezos-client --endpoint \"\n+ + node_endpoint\n+ + \" get balance for \"\n+ + addr\n)\n.stdout.decode()\n.strip()\n@@ -643,7 +653,7 @@ class Setup:\nprint(\"Waiting for the node to bootstrap...\")\nproc_call(\n- \"sudo -u tezos tezos-client --endpoint \" + rpc_address + \" bootstrapped\"\n+ \"sudo -u tezos -E tezos-client --endpoint \" + rpc_address + \" bootstrapped\"\n)\nprint()\n@@ -655,7 +665,7 @@ class Setup:\ntezos_client_options = self.get_tezos_client_options()\nbaker_alias = self.config[\"baker_alias\"]\naddress = get_proc_output(\n- \"sudo -u tezos tezos-client \"\n+ \"sudo -u tezos -E tezos-client \"\n+ tezos_client_options\n+ \" show address \"\n+ baker_alias\n@@ -697,7 +707,7 @@ class Setup:\nif self.config[\"key_import_mode\"] == \"secret-key\":\nself.query_step(secret_key_query)\nproc_call(\n- \"sudo -u tezos tezos-client \"\n+ \"sudo -u tezos -E tezos-client \"\n+ tezos_client_options\n+ \" import secret key \"\n+ baker_alias\n@@ -708,7 +718,7 @@ class Setup:\nelif self.config[\"key_import_mode\"] == \"json\":\nself.query_step(json_filepath_query)\nproc_call(\n- \"sudo -u tezos tezos-client \"\n+ \"sudo -u tezos -E tezos-client \"\n+ tezos_client_options\n+ \" activate account \"\n+ baker_alias\n@@ -730,7 +740,7 @@ class Setup:\n\"Please open the Tezos Baking app on your ledger, then hit Enter.\"\n)\nproc_call(\n- \"sudo -u tezos tezos-client \"\n+ \"sudo -u tezos -E tezos-client \"\n+ tezos_client_options\n+ \" import secret key \"\n+ baker_alias\n@@ -739,7 +749,7 @@ class Setup:\n+ \" --force\"\n)\nproc_call(\n- \"sudo -u tezos tezos-client \"\n+ \"sudo -u tezos -E tezos-client \"\n+ tezos_client_options\n+ \" setup ledger to bake for \"\n+ baker_alias\n@@ -762,7 +772,7 @@ class Setup:\ntezos_client_options = self.get_tezos_client_options()\nbaker_alias = self.config[\"baker_alias\"]\nproc_call(\n- \"sudo -u tezos tezos-client \"\n+ \"sudo -u tezos -E tezos-client \"\n+ tezos_client_options\n+ \" register key \"\n+ baker_alias\n"
}
] |
Python
|
MIT License
|
serokell/tezos-packaging
|
[#255] Suppress Tezos testnet warning
Problem: currently, if the Tezos setup wizard is used on a testnet,
the "This is NOT the Tezos Mainnet." warning is shown multiple
times, which disrupts the flow of the setup.
Solution: suppressed the warning by temporarily passing the
approppriate environment variable with every tezos-client call.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.