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,660 | 11.10.2022 20:12:50 | -10,800 | f45b830bc9b69f3a8c3e5bbb0a34cf869a7f0e6f | [Chore] Update nix building
Problem: Since `v15.0-rc1`, binaries were
renamed. Thus, building process should be updated.
Solution: Update packages names. | [
{
"change_type": "MODIFY",
"old_path": "flake.lock",
"new_path": "flake.lock",
"diff": "\"opam-repository\": {\n\"flake\": false,\n\"locked\": {\n- \"lastModified\": 1664884700,\n- \"narHash\": \"sha256-tnbz1RmTs0W7nNeWA+749/Ca044VZFWuLkdH/C324kM=\",\n+ \"lastModified\": 1665559776,\n+ \"narHash\": \"sha256-lzuHR10IBx0+H/M75+HitFtxMKNyNo9qAUJfsEvfKbw=\",\n\"owner\": \"tezos\",\n\"repo\": \"opam-repository\",\n- \"rev\": \"df8d0aa9d9a08a49cf97f27e58662c10fb3f70f2\",\n+ \"rev\": \"d97ef23a0dadf1a8133e76d3e4cc175dfc9ee8ec\",\n\"type\": \"gitlab\"\n},\n\"original\": {\n\"tezos\": {\n\"flake\": false,\n\"locked\": {\n- \"lastModified\": 1665487427,\n- \"narHash\": \"sha256-KB3GcrBdDaDyjjGW7jpf0i4E6m9Hxx5GKVeawhG/Hb0=\",\n+ \"lastModified\": 1665766353,\n+ \"narHash\": \"sha256-f+TdOlc1oUAVa6wK+F0MQ1qF8oQlSuP3D+fsT+AlUv0=\",\n\"owner\": \"tezos\",\n\"repo\": \"tezos\",\n- \"rev\": \"e45ea3f049f12337b3bb90ce34d76fa6aeb0ec73\",\n+ \"rev\": \"247bb448a88632f14636044ce5f6aa43acfe62c8\",\n\"type\": \"gitlab\"\n},\n\"original\": {\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/hacks.nix",
"new_path": "nix/build/hacks.nix",
"diff": "# This file needs to become empty.\nself: super: rec {\n- tezos-protocol-compiler = super.tezos-protocol-compiler.overrideAttrs (_: {\n+ octez-protocol-compiler = super.octez-protocol-compiler.overrideAttrs (_: {\npostFixup = ''\n- ln -s $OCAMLFIND_DESTDIR/tezos-protocol-compiler/* $OCAMLFIND_DESTDIR\n+ ln -s $OCAMLFIND_DESTDIR/octez-protocol-compiler/* $OCAMLFIND_DESTDIR\n'';\n});\n- tezos-admin-client = super.tezos-client.overrideAttrs (_ : {\n- name = \"tezos-admin-client\";\n- postInstall = \"rm $out/bin/tezos-client $out/bin/*.sh\";\n+ # For some reason octez-protocol-compiler wants some docs to be present in tezos-protocol-environment\n+ tezos-protocol-environment = super.tezos-protocol-environment.overrideAttrs (o: {\n+ postFixup = ''\n+ DUMMY_DOCS_DIR=\"$OCAMLFIND_DESTDIR/../doc/${o.pname}\"\n+ mkdir -p \"$DUMMY_DOCS_DIR\"\n+ for doc in \"README.md\" \"CHANGES.rst\" \"LICENSE\"; do\n+ touch \"$DUMMY_DOCS_DIR/$doc\"\n+ done\n+ '';\n+ });\n+ octez-admin-client = super.octez-client.overrideAttrs (_ : {\n+ name = \"octez-admin-client\";\n+ postInstall = \"rm $out/bin/octez-client $out/bin/*.sh\";\n});\n- tezos-client = super.tezos-client.overrideAttrs (_ : {\n- postInstall = \"rm $out/bin/tezos-admin-client $out/bin/*.sh\";\n+ octez-client = super.octez-client.overrideAttrs (_ : {\n+ postInstall = \"rm $out/bin/octez-admin-client $out/bin/*.sh\";\n});\n- tezos-node = super.tezos-node.overrideAttrs (_ : {\n+ octez-node = super.octez-node.overrideAttrs (_ : {\npostInstall = \"rm $out/bin/*.sh\";\n});\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/ocaml-overlay.nix",
"new_path": "nix/build/ocaml-overlay.nix",
"diff": "@@ -10,19 +10,19 @@ in\nwith opam-nix.lib.${self.system}; let\nzcash-overlay = import ./zcash-overlay.nix;\nhacks = import ./hacks.nix;\n- tezosSourcesResolved =\n- self.runCommand \"resolve-tezos-sources\" {} \"cp --no-preserve=all -Lr ${sources.tezos} $out\";\n- tezosScope = buildOpamProject' {\n+ octezSourcesResolved =\n+ self.runCommand \"resolve-octez-sources\" {} \"cp --no-preserve=all -Lr ${sources.tezos} $out\";\n+ octezScope = buildOpamProject' {\nrepos = [sources.opam-repository];\nrecursive = true;\nresolveArgs = { };\n- } tezosSourcesResolved { };\n+ } octezSourcesResolved { };\nin {\n- tezosPackages = (tezosScope.overrideScope' (pkgs.lib.composeManyExtensions [\n+ octezPackages = (octezScope.overrideScope' (pkgs.lib.composeManyExtensions [\n(_: # Nullify all the ignored protocols so that we don't build them\nbuiltins.mapAttrs (name: pkg:\nif builtins.any\n- (proto: !isNull (builtins.match \"tezos.*${proto}.*\" name))\n+ (proto: !isNull (builtins.match \".*${proto}.*\" name))\nprotocols.ignored then\nnull\nelse\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/release-binaries.nix",
"new_path": "nix/build/release-binaries.nix",
"diff": "@@ -7,49 +7,49 @@ let\nbuiltins.concatStringsSep \", \" (protocols.allowed ++ protocols.active);\nin [\n{\n- name = \"tezos-client\";\n- description = \"CLI client for interacting with tezos blockchain\";\n+ name = \"octez-client\";\n+ description = \"CLI client for interacting with octez blockchain\";\nsupports = protocolsFormatted;\n}\n{\n- name = \"tezos-admin-client\";\n+ name = \"octez-admin-client\";\ndescription = \"Administration tool for the node\";\nsupports = protocolsFormatted;\n}\n{\n- name = \"tezos-node\";\n+ name = \"octez-node\";\ndescription =\n- \"Entry point for initializing, configuring and running a Tezos node\";\n+ \"Entry point for initializing, configuring and running a Octez node\";\nsupports = protocolsFormatted;\n}\n{\n- name = \"tezos-signer\";\n+ name = \"octez-signer\";\ndescription = \"A client to remotely sign operations or blocks\";\nsupports = protocolsFormatted;\n}\n{\n- name = \"tezos-codec\";\n+ name = \"octez-codec\";\ndescription = \"A client to decode and encode JSON\";\nsupports = protocolsFormatted;\n}\n] ++ builtins.concatMap (protocol: [\n{\n- name = \"tezos-baker-${protocol}\";\n+ name = \"octez-baker-${protocol}\";\ndescription = \"Daemon for baking\";\nsupports = protocol;\n}\n{\n- name = \"tezos-accuser-${protocol}\";\n+ name = \"octez-accuser-${protocol}\";\ndescription = \"Daemon for accusing\";\nsupports = protocol;\n}\n{\n- name = \"tezos-tx-rollup-node-${protocol}\";\n+ name = \"octez-tx-rollup-node-${protocol}\";\ndescription = \"Transaction rollup node\";\nsupports = protocol;\n}\n{\n- name = \"tezos-tx-rollup-client-${protocol}\";\n+ name = \"octez-tx-rollup-client-${protocol}\";\ndescription = \"Client for interacting with transaction rollup node\";\nsupports = protocol;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/zcash-overlay.nix",
"new_path": "nix/build/zcash-overlay.nix",
"diff": "@@ -15,7 +15,7 @@ let\n};\nrelevant-packages =\n- \"tezos-((node|client|codec|admin-client|signer)|((accuser|baker).*))\";\n+ \"octez-((node|client|codec|admin-client|signer)|((accuser|baker).*))\";\nin builtins.mapAttrs (name: pkg:\nif !isNull (builtins.match relevant-packages name) then\npkg.overrideAttrs inject-zcash\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/default.nix",
"new_path": "nix/default.nix",
"diff": "{ sources, pkgs, protocols, patches ? [ ], ... }:\nlet\nsource = sources.tezos;\n- release-binaries = builtins.filter (elem: elem.name != \"tezos-sandbox\")\n- (import ./build/release-binaries.nix protocols);\n+ release-binaries = import ./build/release-binaries.nix protocols;\nbinaries = builtins.listToAttrs (map (meta: {\ninherit (meta) name;\n- value = pkgs.tezosPackages.${meta.name} // { inherit meta; };\n+ value = pkgs.octezPackages.${meta.name} // { inherit meta; };\n}) release-binaries);\n# Bundle the contents of a package set together, leaving the original attrs intact\n@@ -25,5 +24,5 @@ let\nin (d: with builtins;\nlistToAttrs (map (drv:\n{ name = drv; value = d.${drv}; }\n- ) (filter (name: substring 0 5 name == \"tezos\") (attrNames d)))\n+ ) (filter (name: substring 0 5 name == \"octez\") (attrNames d)))\n) bundled.binaries // { inherit (bundled) binaries; }\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/common.nix",
"new_path": "nix/modules/common.nix",
"diff": "@@ -21,11 +21,11 @@ rec {\ndaemonOptions = sharedOptions // {\nbaseProtocols = mkOption {\n- type = types.listOf (types.enum [ \"013-PtJakart\" \"014-PtKathma\" ]);\n+ type = types.listOf (types.enum [ \"PtKathma\" \"PtLimaPt\" ]);\ndescription = ''\nList of protocols for which daemons will be run.\n'';\n- example = [\"013-PtJakart\"];\n+ example = [\"PtKathma\"];\n};\nrpcPort = mkOption {\n@@ -33,7 +33,7 @@ rec {\ndefault = 8732;\nexample = 8732;\ndescription = ''\n- Tezos node RPC port.\n+ Octez node RPC port.\n'';\n};\n@@ -50,17 +50,17 @@ rec {\nmkIf (instancesCfg != {}) {\nusers = mkMerge (flip mapAttrsToList instancesCfg (node-name: node-cfg: genUsers node-name ));\nsystemd = mkMerge (flip mapAttrsToList instancesCfg (node-name: node-cfg:\n- let tezos-client = \"${pkgs.tezosPackages.tezos-client}/bin/tezos-client\";\n+ let octez-client = \"${pkgs.octezPackages.octez-client}/bin/octez-client\";\npasswordFilenameArg = if node-cfg.passwordFilename != null then \"-f ${node-cfg.passwordFilename}\" else \"\";\nin {\n- services.\"tezos-${node-name}-tezos-${service-name}\" = lib.recursiveUpdate (genSystemdService node-name node-cfg service-name) rec {\n- bindsTo = [ \"network.target\" \"tezos-${node-name}-tezos-node.service\" ];\n+ services.\"tezos-${node-name}-octez-${service-name}\" = lib.recursiveUpdate (genSystemdService node-name node-cfg service-name) rec {\n+ bindsTo = [ \"network.target\" \"tezos-${node-name}-octez-node.service\" ];\nafter = bindsTo;\npath = with pkgs; [ curl ];\npreStart =\n''\nwhile ! _=\"$(curl --silent http://localhost:${toString node-cfg.rpcPort}/chains/main/blocks/head/)\"; do\n- echo \"Trying to connect to tezos-node\"\n+ echo \"Trying to connect to octez-node\"\nsleep 1s\ndone\n@@ -69,10 +69,10 @@ rec {\n# Generate or update service config file\nif [[ ! -f \"$service_data_dir/config\" ]]; then\n- ${tezos-client} -d \"$service_data_dir\" -E \"http://localhost:${toString node-cfg.rpcPort}\" ${passwordFilenameArg} \\\n+ ${octez-client} -d \"$service_data_dir\" -E \"http://localhost:${toString node-cfg.rpcPort}\" ${passwordFilenameArg} \\\nconfig init --output \"$service_data_dir/config\" >/dev/null 2>&1\nelse\n- ${tezos-client} -d \"$service_data_dir\" -E \"http://localhost:${toString node-cfg.rpcPort}\" ${passwordFilenameArg} \\\n+ ${octez-client} -d \"$service_data_dir\" -E \"http://localhost:${toString node-cfg.rpcPort}\" ${passwordFilenameArg} \\\nconfig update >/dev/null 2>&1\nfi\n'' + service-prestart-script node-cfg;\n@@ -91,9 +91,9 @@ rec {\ngenSystemdService = node-name: node-cfg: service-name: {\nwantedBy = [ \"multi-user.target\" ];\n- description = \"Tezos ${service-name}\";\n+ description = \"Octez ${service-name}\";\nenvironment = {\n- TEZOS_LOG = \"* -> ${node-cfg.logVerbosity}\";\n+ OCTEZ_LOG = \"* -> ${node-cfg.logVerbosity}\";\n};\nserviceConfig = {\nUser = \"tezos-${node-name}\";\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-accuser.nix",
"new_path": "nix/modules/tezos-accuser.nix",
"diff": "with lib;\nlet\n- tezos-accuser-pkgs = {\n- \"013-PtJakart\" =\n- \"${pkgs.tezosPackages.tezos-accuser-013-PtJakart}/bin/tezos-accuser-013-PtJakart\";\n- \"014-PtKathma\" =\n- \"${pkgs.tezosPackages.tezos-accuser-014-PtKathma}/bin/tezos-accuser-014-PtKathma\";\n+ octez-accuser-pkgs = {\n+ \"PtKathma\" =\n+ \"${pkgs.octezPackages.octez-accuser-PtKathma}/bin/octez-accuser-PtKathma\";\n};\n- cfg = config.services.tezos-accuser;\n+ cfg = config.services.octez-accuser;\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\ninstanceOptions = types.submodule ( {...} : {\noptions = common.daemonOptions // {\n- enable = mkEnableOption \"Tezos accuser service\";\n+ enable = mkEnableOption \"Octez accuser service\";\n};\n});\nin {\n- options.services.tezos-accuser = {\n+ options.services.octez-accuser = {\ninstances = mkOption {\ntype = types.attrsOf instanceOptions;\ndescription = \"Configuration options\";\n@@ -33,14 +31,14 @@ in {\nconfig =\nlet accuser-start-script = node-cfg: concatMapStringsSep \"\\n\" (baseProtocol:\n''\n- ${tezos-accuser-pkgs.${baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n+ ${octez-accuser-pkgs.${baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n-E \"http://localhost:${toString node-cfg.rpcPort}\" \\\nrun \"$@\" &\n'') node-cfg.baseProtocols;\nin common.genDaemonConfig {\ninstancesCfg = cfg.instances;\nservice-name = \"accuser\";\n- service-pkgs = tezos-accuser-pkgs;\n+ service-pkgs = octez-accuser-pkgs;\nservice-start-script = accuser-start-script;\n};\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-baker.nix",
"new_path": "nix/modules/tezos-baker.nix",
"diff": "with lib;\nlet\n- tezos-baker-pkgs = {\n- \"013-PtJakart\" =\n- \"${pkgs.tezosPackages.tezos-baker-013-PtJakart}/bin/tezos-baker-013-PtJakart\";\n- \"014-PtKathma\" =\n- \"${pkgs.tezosPackages.tezos-baker-014-PtKathma}/bin/tezos-baker-014-PtKathma\";\n+ octez-baker-pkgs = {\n+ \"PtKathma\" =\n+ \"${pkgs.octezPackages.octez-baker-PtKathma}/bin/octez-baker-PtKathma\";\n};\n- tezos-client = \"${pkgs.tezosPackages.tezos-client}/bin/tezos-client\";\n- cfg = config.services.tezos-baker;\n+ octez-client = \"${pkgs.octezPackages.octez-client}/bin/octez-client\";\n+ cfg = config.services.octez-baker;\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\ninstanceOptions = types.submodule ( {...} : {\noptions = common.daemonOptions // {\n- enable = mkEnableOption \"Tezos baker service\";\n+ enable = mkEnableOption \"Octez baker service\";\nbakerSecretKey = mkOption {\ntype = types.nullOr types.str;\n@@ -33,7 +31,7 @@ let\ntype = types.str;\ndefault = \"\";\ndescription = ''\n- Alias for the tezos-baker account.\n+ Alias for the octez-baker account.\n'';\n};\n@@ -50,7 +48,7 @@ let\n});\nin {\n- options.services.tezos-baker = {\n+ options.services.octez-baker = {\ninstances = mkOption {\ntype = types.attrsOf instanceOptions;\ndescription = \"Configuration options\";\n@@ -63,17 +61,17 @@ in {\nvoting-option = \"--liquidity-baking-toggle-vote ${node-cfg.liquidityBakingToggleVote}\";\nin concatMapStringsSep \"\\n\" (baseProtocol:\n''\n- ${tezos-baker-pkgs.${baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n+ ${octez-baker-pkgs.${baseProtocol}} -d \"$STATE_DIRECTORY/client/data\" \\\n-E \"http://localhost:${toString node-cfg.rpcPort}\" \\\nrun with local node \"$STATE_DIRECTORY/node/data\" ${voting-option} ${node-cfg.bakerAccountAlias} &\n'') node-cfg.baseProtocols;\nbaker-prestart-script = node-cfg: if node-cfg.bakerSecretKey != null then ''\n- ${tezos-client} -d \"$STATE_DIRECTORY/client/data\" import secret key \"${node-cfg.bakerAccountAlias}\" ${node-cfg.bakerSecretKey} --force\n+ ${octez-client} -d \"$STATE_DIRECTORY/client/data\" import secret key \"${node-cfg.bakerAccountAlias}\" ${node-cfg.bakerSecretKey} --force\n'' else \"\";\nin common.genDaemonConfig {\ninstancesCfg = cfg.instances;\nservice-name = \"baker\";\n- service-pkgs = tezos-baker-pkgs;\n+ service-pkgs = octez-baker-pkgs;\nservice-start-script = baker-start-script;\nservice-prestart-script = baker-prestart-script;\n};\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-node.nix",
"new_path": "nix/modules/tezos-node.nix",
"diff": "with lib;\nlet\n- tezos-node-pkg = pkgs.tezosPackages.tezos-node;\n- cfg = config.services.tezos-node;\n+ octez-node-pkg = pkgs.octezPackages.octez-node;\n+ cfg = config.services.octez-node;\ngenConfigCommand = historyMode: rpcPort: netPort: network: options: ''\n--data-dir \"$node_data_dir\" \\\n--history-mode \"${historyMode}\" \\\n@@ -18,10 +18,10 @@ let\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\ninstanceOptions = types.submodule ( {...} : {\noptions = common.sharedOptions // {\n- enable = mkEnableOption \"Tezos node service\";\n+ enable = mkEnableOption \"Octez node service\";\npackage = mkOption {\n- default = tezos-node-pkg;\n+ default = octez-node-pkg;\ntype = types.package;\n};\n@@ -30,7 +30,7 @@ let\ndefault = 8732;\nexample = 8732;\ndescription = ''\n- Tezos node RPC port.\n+ Octez node RPC port.\n'';\n};\n@@ -39,13 +39,13 @@ let\ndefault = 9732;\nexample = 9732;\ndescription = ''\n- Tezos node net port.\n+ Octez node net port.\n'';\n};\nnetwork = mkOption {\ntype = types.str;\n- default = \"jakartanet\";\n+ default = \"kathmandunet\";\ndescription = ''\nNetwork which node will be running on.\nCan be either a predefined network name or a URL to the network config.\n@@ -65,7 +65,7 @@ let\ntype = types.listOf types.str;\ndefault = [];\ndescription = ''\n- Additional 'tezos-node' options that affect configuration file.\n+ Additional 'octez-node' options that affect configuration file.\n'';\n};\n@@ -75,14 +75,14 @@ let\ndescription = ''\nCustom node config.\nThis option overrides the all other options that affect\n- tezos-node config.\n+ octez-node config.\n'';\n};\n};\n});\nin {\n- options.services.tezos-node = {\n+ options.services.octez-node = {\ninstances = mkOption {\ntype = types.attrsOf instanceOptions;\ndescription = \"Configuration options\";\n@@ -92,7 +92,7 @@ in {\nconfig = mkIf (cfg.instances != {}) {\nusers = mkMerge (flip mapAttrsToList cfg.instances (node-name: node-cfg: common.genUsers node-name ));\nsystemd = mkMerge (flip mapAttrsToList cfg.instances (node-name: node-cfg: {\n- services.\"tezos-${node-name}-tezos-node\" = common.genSystemdService node-name node-cfg \"node\" // {\n+ services.\"tezos-${node-name}-octez-node\" = common.genSystemdService node-name node-cfg \"node\" // {\nafter = [ \"network.target\" ];\npreStart =\n''\n@@ -104,10 +104,10 @@ in {\n''\n# Generate or update node config file\nif [[ ! -f \"$node_data_dir/config.json\" ]]; then\n- ${node-cfg.package}/bin/tezos-node config init \\\n+ ${node-cfg.package}/bin/octez-node config init \\\n${genConfigCommand node-cfg.historyMode node-cfg.rpcPort node-cfg.netPort node-cfg.network node-cfg.additionalOptions}\nelse\n- ${node-cfg.package}/bin/tezos-node config update \\\n+ ${node-cfg.package}/bin/octez-node config update \\\n${genConfigCommand node-cfg.historyMode node-cfg.rpcPort node-cfg.netPort node-cfg.network node-cfg.additionalOptions}\nfi\n''\n@@ -117,7 +117,7 @@ in {\n''\n);\nscript = ''\n- ${node-cfg.package}/bin/tezos-node run --data-dir \"$STATE_DIRECTORY/node/data\"\n+ ${node-cfg.package}/bin/octez-node run --data-dir \"$STATE_DIRECTORY/node/data\"\n'';\n};\n}));\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-signer.nix",
"new_path": "nix/modules/tezos-signer.nix",
"diff": "with lib;\nlet\n- tezos-signer-launch = \"${pkgs.tezosPackages.tezos-signer}/bin/tezos-signer launch\";\n+ octez-signer-launch = \"${pkgs.octezPackages.octez-signer}/bin/octez-signer launch\";\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\n- cfg = config.services.tezos-signer;\n+ cfg = config.services.octez-signer;\ninstanceOptions = types.submodule ( {...} : {\noptions = common.sharedOptions // {\n- enable = mkEnableOption \"Tezos signer service\";\n+ enable = mkEnableOption \"Octez signer service\";\nnetworkProtocol = mkOption {\ntype = types.enum [ \"http\" \"https\" \"tcp\" \"unix\" ];\n@@ -28,7 +28,7 @@ let\ndefault = \"127.0.0.1\";\nexample = \"127.0.0.1\";\ndescription = ''\n- Tezos signer net address.\n+ Octez signer net address.\n'';\n};\n@@ -37,7 +37,7 @@ let\ndefault = 8080;\nexample = 8080;\ndescription = ''\n- Tezos signer net port.\n+ Octez signer net port.\n'';\n};\n@@ -45,7 +45,7 @@ let\ntype = types.str;\ndefault = null;\ndescription = ''\n- Path of the SSL certificate to use for https Tezos signer.\n+ Path of the SSL certificate to use for https Octez signer.\n'';\n};\n@@ -53,7 +53,7 @@ let\ntype = types.str;\ndefault = null;\ndescription = ''\n- Key path to use for https Tezos signer.\n+ Key path to use for https Octez signer.\n'';\n};\n@@ -61,7 +61,7 @@ let\ntype = types.str;\ndefault = null;\ndescription = ''\n- Socket to use for Tezos signer running over UNIX socket.\n+ Socket to use for Octez signer running over UNIX socket.\n'';\n};\n@@ -70,14 +70,14 @@ let\ndefault = 1;\nexample = 1;\ndescription = ''\n- Timeout for Tezos signer.\n+ Timeout for Octez signer.\n'';\n};\n};\n});\nin {\n- options.services.tezos-signer = {\n+ options.services.octez-signer = {\ninstances = mkOption {\ntype = types.attrsOf instanceOptions;\ndescription = \"Configuration options\";\n@@ -87,21 +87,21 @@ in {\nconfig = mkIf (cfg.instances != {}) {\nusers = mkMerge (flip mapAttrsToList cfg.instances (node-name: node-cfg: common.genUsers node-name ));\nsystemd = mkMerge (flip mapAttrsToList cfg.instances (node-name: node-cfg:\n- let tezos-signers = {\n+ let octez-signers = {\n\"http\" =\n- \"${tezos-signer-launch} http signer --address ${node-cfg.netAddress} --port ${toString node-cfg.netPort}\";\n+ \"${octez-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+ \"${octez-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+ \"${octez-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+ \"${octez-signer-launch} local signer --socket ${node-cfg.unixSocket}\";\n};\nin {\n- services.\"tezos-${node-name}-tezos-signer\" = common.genSystemdService node-name node-cfg \"signer\" // {\n+ services.\"tezos-${node-name}-octez-signer\" = common.genSystemdService node-name node-cfg \"signer\" // {\nafter = [ \"network.target\" ];\nscript = ''\n- ${tezos-signers.${node-cfg.networkProtocol}}\n+ ${octez-signers.${node-cfg.networkProtocol}}\n'';\n};\n}));\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/test_script.py",
"new_path": "tests/test_script.py",
"diff": "# SPDX-FileCopyrightText: 2021 Oxhead Alpha\n# SPDX-License-Identifier: LicenseRef-MIT-OA\n-# This script is used in tezos-binaries.nix and isn't supposed to be run\n-# other way than 'nix-build tezos-binaries.nix'\n-machine.succeed('export TEZOS_LOG=\"* -> warning\"')\n+# This script is used in octez-binaries.nix and isn't supposed to be run\n+# other way than 'nix-build octez-binaries.nix'\n+machine.succeed('export OCTEZ_LOG=\"* -> warning\"')\nmachine.succeed(\"mkdir client-dir\")\nmachine.succeed(\"mkdir signer-dir\")\nwith subtest(\"run binaries with --help\"):\n@@ -11,7 +11,7 @@ with subtest(\"run binaries with --help\"):\nmachine.succeed(b + \" --help\")\n-machine.succeed(f\"{tezos_client} -d client-dir gen keys baker\")\n+machine.succeed(f\"{octez_client} -d client-dir gen keys baker\")\ndef pkill_background(binary):\n@@ -21,10 +21,10 @@ def pkill_background(binary):\ndef run_node(network, use_tls):\nmachine.succeed(\"mkdir node-dir\")\ntls_args = \" --rpc-tls=\" + host_cert + \",\" + host_key + \" \" if use_tls else \" \"\n- machine.succeed(f\"{tezos_node} config init --data-dir node-dir --network {network}\")\n- machine.succeed(f\"{tezos_node} identity generate 1 --data-dir node-dir\")\n+ machine.succeed(f\"{octez_node} config init --data-dir node-dir --network {network}\")\n+ machine.succeed(f\"{octez_node} identity generate 1 --data-dir node-dir\")\nmachine.succeed(\n- f\"{tezos_node} run --data-dir node-dir --rpc-addr :8732 \"\n+ f\"{octez_node} run --data-dir node-dir --rpc-addr :8732 \"\n+ tls_args\n+ \"--no-bootstrap-peers --network \"\n+ network\n@@ -36,7 +36,7 @@ def run_node(network, use_tls):\nelse \" --endpoint http://localhost:8732/ \"\n)\nmachine.wait_until_succeeds(\n- tezos_client + tls_endpoint + \"rpc get chains/main/blocks/head/\"\n+ octez_client + tls_endpoint + \"rpc get chains/main/blocks/head/\"\n)\n@@ -48,19 +48,19 @@ def run_node_with_daemons(network, use_tls):\nelse \" --endpoint http://localhost:8732/ \"\n)\nmachine.succeed(\n- f\"{tezos_baker} -d client-dir\"\n+ f\"{octez_baker} -d client-dir\"\n+ tls_endpoint\n+ \"run with local node node-dir baker --liquidity-baking-toggle-vote on &\"\n)\n- machine.succeed(tezos_accuser + tls_endpoint + \"-d client-dir run &\")\n+ machine.succeed(octez_accuser + tls_endpoint + \"-d client-dir run &\")\ndef kill_node_with_daemons():\n- pkill_background(\"tezos-accuser\")\n- pkill_background(\"tezos-baker\")\n- pkill_background(\"tezos-node\")\n+ pkill_background(\"octez-accuser\")\n+ pkill_background(\"octez-baker\")\n+ pkill_background(\"octez-node\")\n# Waiting node process to be killed before cleaning up to avoid race-conditions\n- machine.wait_until_fails(\"pgrep tezos-node\")\n+ machine.wait_until_fails(\"pgrep octez-node\")\nmachine.succeed(\"rm -rf node-dir\")\n@@ -72,13 +72,13 @@ def test_node_with_daemons_scenario(network, use_tls=False):\n)\nrun_node_with_daemons(network, use_tls)\nmachine.succeed(\n- tezos_admin_client + tls_endpoint + \"rpc get chains/main/blocks/head/\"\n+ octez_admin_client + tls_endpoint + \"rpc get chains/main/blocks/head/\"\n)\nkill_node_with_daemons()\n-with subtest(\"run node with daemons on jakartanet\"):\n- test_node_with_daemons_scenario(\"jakartanet\")\n+with subtest(\"run node with daemons on kathmandunet\"):\n+ test_node_with_daemons_scenario(\"kathmandunet\")\nwith subtest(\"run node with daemons on mainnet\"):\ntest_node_with_daemons_scenario(\"mainnet\")\n@@ -87,17 +87,17 @@ with subtest(\"run node with daemons using tls\"):\ntest_node_with_daemons_scenario(\"mainnet\", use_tls=True)\nwith subtest(\"test remote signer\"):\n- machine.succeed(f\"{tezos_signer} -d signer-dir gen keys signer\")\n+ machine.succeed(f\"{octez_signer} -d signer-dir gen keys signer\")\nsigner_addr = machine.succeed(\n- f'{tezos_signer} -d signer-dir show address signer | tail -n +1 | head -n 1 | sed -e s/^\"Hash: \"//g'\n+ f'{octez_signer} -d signer-dir show address signer | tail -n +1 | head -n 1 | sed -e s/^\"Hash: \"//g'\n)\nmachine.succeed(\n- f\"{tezos_signer} -d signer-dir launch socket signer -a 127.0.0.1 -p 22000 &\"\n+ f\"{octez_signer} -d signer-dir launch socket signer -a 127.0.0.1 -p 22000 &\"\n)\nmachine.succeed(\n- f\"{tezos_client} -d client-dir import secret key remote-signer-tcp tcp://127.0.0.1:22000/{signer_addr}\"\n+ f\"{octez_client} -d client-dir import secret key remote-signer-tcp tcp://127.0.0.1:22000/{signer_addr}\"\n)\nwith subtest(\"test encode and decode JSON\"):\n- machine.succeed(f\"{tezos_codec} encode timespan.system from 42.42\")\n- machine.succeed(f\"{tezos_codec} decode timespan.system from 404535c28f5c28f6\")\n+ machine.succeed(f\"{octez_codec} encode timespan.system from 42.42\")\n+ machine.succeed(f\"{octez_codec} decode timespan.system from 404535c28f5c28f6\")\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-binaries.nix",
"new_path": "tests/tezos-binaries.nix",
"diff": "@@ -15,26 +15,26 @@ 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-013-PtJakart\"\n- tezos_admin_client = f\"{path_to_binaries}/tezos-admin-client\"\n- tezos_baker = f\"{path_to_binaries}/tezos-baker-013-PtJakart\"\n- tezos_client = f\"{path_to_binaries}/tezos-client\"\n- tezos_node = f\"{path_to_binaries}/tezos-node\"\n- tezos_signer = f\"{path_to_binaries}/tezos-signer\"\n- tezos_codec = f\"{path_to_binaries}/tezos-codec\"\n+ octez_accuser = f\"{path_to_binaries}/octez-accuser-PtKathma\"\n+ octez_admin_client = f\"{path_to_binaries}/octez-admin-client\"\n+ octez_baker = f\"{path_to_binaries}/octez-baker-PtKathma\"\n+ octez_client = f\"{path_to_binaries}/octez-client\"\n+ octez_node = f\"{path_to_binaries}/octez-node\"\n+ octez_signer = f\"{path_to_binaries}/octez-signer\"\n+ octez_codec = f\"{path_to_binaries}/octez-codec\"\nopenssl = \"${pkgs.openssl.bin}/bin/openssl\"\nhost_key = \"${./host.key}\"\nhost_cert = \"${./host.cert}\"\nbinaries = [\n- tezos_accuser,\n- tezos_admin_client,\n- tezos_baker,\n- tezos_client,\n- tezos_node,\n- tezos_signer,\n- tezos_codec,\n+ octez_accuser,\n+ octez_admin_client,\n+ octez_baker,\n+ octez_client,\n+ octez_node,\n+ octez_signer,\n+ octez_codec,\n]\n${builtins.readFile ./test_script.py}'';\n}) args\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-modules.nix",
"new_path": "tests/tezos-modules.nix",
"diff": "@@ -17,7 +17,7 @@ import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n../nix/modules/tezos-baker.nix\n];\n- services.tezos-node.instances.jakartanet = {\n+ services.octez-node.instances.kathmandunet = {\nenable = true;\nadditionalOptions = [\n\"--bootstrap-threshold=1\"\n@@ -25,19 +25,19 @@ import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n];\n};\n- services.tezos-signer.instances.jakartanet = {\n+ services.octez-signer.instances.kathmandunet = {\nenable = true;\nnetworkProtocol = \"http\";\n};\n- services.tezos-accuser.instances.jakartanet = {\n+ services.octez-accuser.instances.kathmandunet = {\nenable = true;\n- baseProtocols = [\"013-PtJakart\" \"014-PtKathma\"];\n+ baseProtocols = [\"PtKathma\"];\n};\n- services.tezos-baker.instances.jakartanet = {\n+ services.octez-baker.instances.kathmandunet = {\nenable = true;\n- baseProtocols = [\"013-PtJakart\" \"014-PtKathma\"];\n+ baseProtocols = [\"PtKathma\"];\nbakerAccountAlias = \"baker\";\nbakerSecretKey = \"unencrypted:edsk3KaTNj1d8Xd3kMBrZkJrfkqsz4XwwiBXatuuVgTdPye2KpE98o\";\n};\n@@ -48,16 +48,16 @@ import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\nstart_all()\nservices = [\n- \"tezos-node\",\n- \"tezos-signer\",\n- \"tezos-baker\",\n- \"tezos-accuser\",\n+ \"octez-node\",\n+ \"octez-signer\",\n+ \"octez-baker\",\n+ \"octez-accuser\",\n]\nfor s in services:\n- machine.wait_for_unit(f\"tezos-jakartanet-{s}.service\")\n+ machine.wait_for_unit(f\"tezos-kathmandunet-{s}.service\")\n- with subtest(\"check tezos-node rpc response\"):\n+ with subtest(\"check octez-node rpc response\"):\nmachine.wait_for_open_port(8732)\nmachine.wait_until_succeeds(\n\"curl --silent http://localhost:8732/chains/main/blocks/head/header | grep level\"\n@@ -65,6 +65,6 @@ import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\nwith subtest(\"service status sanity check\"):\nfor s in services:\n- machine.succeed(f\"systemctl status tezos-jakartanet-{s}.service\")\n+ machine.succeed(f\"systemctl status tezos-kathmandunet-{s}.service\")\n'';\n}) { inherit pkgs system; }\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-nix-binaries.nix",
"new_path": "tests/tezos-nix-binaries.nix",
"diff": "{ nixpkgs, pkgs, ... }:\nlet\ninherit (pkgs) system;\n- inherit (pkgs.tezosPackages) tezos-client tezos-admin-client tezos-node tezos-signer tezos-codec\n- tezos-accuser-013-PtJakart tezos-baker-013-PtJakart;\n+ inherit (pkgs.octezPackages) octez-client octez-admin-client octez-node octez-signer octez-codec\n+ octez-accuser-PtKathma octez-baker-PtKathma;\nin import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n{\nnodes.machine = { ... }: {\n@@ -19,28 +19,28 @@ in import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n};\ntestScript = ''\n- tezos_accuser = \"${tezos-accuser-013-PtJakart}/bin/tezos-accuser-013-PtJakart\"\n- tezos_admin_client = \"${tezos-admin-client}/bin/tezos-admin-client\"\n- tezos_baker = \"${tezos-baker-013-PtJakart}/bin/tezos-baker-013-PtJakart\"\n- tezos_client = (\n- \"${tezos-client}/bin/tezos-client\"\n+ octez_accuser = \"${octez-accuser-PtKathma}/bin/octez-accuser-PtKathma\"\n+ octez_admin_client = \"${octez-admin-client}/bin/octez-admin-client\"\n+ octez_baker = \"${octez-baker-PtKathma}/bin/octez-baker-PtKathma\"\n+ octez_client = (\n+ \"${octez-client}/bin/octez-client\"\n)\n- tezos_node = \"${tezos-node}/bin/tezos-node\"\n- tezos_signer = (\n- \"${tezos-signer}/bin/tezos-signer\"\n+ octez_node = \"${octez-node}/bin/octez-node\"\n+ octez_signer = (\n+ \"${octez-signer}/bin/octez-signer\"\n)\n- tezos_codec = \"${tezos-codec}/bin/tezos-codec\"\n+ octez_codec = \"${octez-codec}/bin/octez-codec\"\nopenssl = \"${pkgs.openssl.bin}/bin/openssl\"\nhost_key = \"${./host.key}\"\nhost_cert = \"${./host.cert}\"\nbinaries = [\n- tezos_accuser,\n- tezos_admin_client,\n- tezos_baker,\n- tezos_client,\n- tezos_node,\n- tezos_signer,\n- tezos_codec,\n+ octez_accuser,\n+ octez_admin_client,\n+ octez_baker,\n+ octez_client,\n+ octez_node,\n+ octez_signer,\n+ octez_codec,\n]\n${builtins.readFile ./test_script.py}'';\n}) { inherit pkgs system; }\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Update nix building
Problem: Since `v15.0-rc1`, binaries were
renamed. Thus, building process should be updated.
Solution: Update packages names. |
603,660 | 11.10.2022 20:21:09 | -10,800 | 751ccbb24376187c152fd7b758dab3d7ee0a70a6 | [Chore] Update static build
Problem: Since `v15.0-rc1`, binaries were renamed.
Solution: Update artifact names produced by static build. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -54,9 +54,9 @@ steps:\n- eval \"$SET_VERSION\"\n- cd docker\n- ./docker-static-build.sh\n- - nix shell .#upx -c upx tezos-*\n+ - nix shell .#upx -c upx octez-*\nartifact_paths:\n- - ./docker/tezos-*\n+ - ./docker/octez-*\nagents:\nqueue: \"docker\"\nonly_changes: &static_binaries_changes_regexes\n@@ -72,13 +72,13 @@ steps:\n- eval \"$SET_VERSION\"\n- cd docker\n- ./docker-static-build.sh\n- - upx tezos-*\n+ - upx octez-*\n- >\n- for f in ./tezos-*; do\n+ for f in ./octez-*; do\nmv \"\\$f\" \"\\$f-arm64\"\ndone\nartifact_paths:\n- - ./docker/tezos-*\n+ - ./docker/octez-*\nagents:\nqueue: \"arm64-build\"\nonly_changes: *static_binaries_changes_regexes\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/build-tezos.sh",
"new_path": "docker/build/build-tezos.sh",
"diff": "@@ -11,16 +11,18 @@ tezos_version=\"$1\"\ngit clone --single-branch --branch \"$tezos_version\" https://gitlab.com/tezos/tezos.git --depth 1\ncd tezos\n+source \"$HOME/.cargo/env\"\nexport OPAMYES=\"true\"\n# Disable usage of instructions from the ADX extension to avoid incompatibility\n# with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\nexport BLST_PORTABLE=\"yes\"\n-wget https://sh.rustup.rs/rustup-init.sh\n-chmod +x rustup-init.sh\n-./rustup-init.sh --profile minimal --default-toolchain 1.60.0 -y\n-source \"$HOME/.cargo/env\"\n-\nopam init --bare --disable-sandboxing\nmake build-deps\n+\n+# TODO remove on next upstream release\n+# see https://gitlab.com/tezos/tezos/-/issues/4005#note_1134995654\n+eval \"$(opam env)\"\n+opam install ledgerwallet-tezos --criteria=-changed\n+\neval \"$(opam env)\" && PROFILE=\"static\" make build\n-chmod +w tezos-*\n+chmod +w octez-*\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/docker-static-build.sh",
"new_path": "docker/docker-static-build.sh",
"diff": "set -euo pipefail\n-binaries=(\"tezos-admin-client\" \"tezos-client\" \"tezos-node\" \"tezos-signer\" \"tezos-codec\")\n+binaries=(\"octez-admin-client\" \"octez-client\" \"octez-node\" \"octez-signer\" \"octez-codec\")\nfor proto in $(jq -r \".active | .[]\" ../protocols.json); do\n- binaries+=(\"tezos-accuser-$proto\" \"tezos-baker-$proto\" \"tezos-tx-rollup-node-$proto\" \"tezos-tx-rollup-client-$proto\")\n+ binaries+=(\"octez-accuser-$proto\" \"octez-baker-$proto\" \"octez-tx-rollup-node-$proto\" \"octez-tx-rollup-client-$proto\")\ndone\nif [[ \"${USE_PODMAN-}\" == \"True\" ]]; then\n@@ -40,7 +40,7 @@ if [[ $arch == \"aarch64\" && $(uname -m) != \"x86_64\" ]]; then\necho \"Compiling for aarch64 is supported only from aarch64 and x86_64\"\nfi\n-\"$virtualisation_engine\" build -t alpine-tezos -f \"$docker_file\" --build-arg TEZOS_VERSION=\"$TEZOS_VERSION\" .\n+\"$virtualisation_engine\" build -t alpine-tezos -f \"$docker_file\" --build-arg OCTEZ_VERSION=\"$OCTEZ_VERSION\" .\ncontainer_id=\"$(\"$virtualisation_engine\" create alpine-tezos)\"\nfor b in \"${binaries[@]}\"; do\n\"$virtualisation_engine\" cp \"$container_id:/tezos/$b\" \"$b\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Update static build
Problem: Since `v15.0-rc1`, binaries were renamed.
Solution: Update artifact names produced by static build. |
603,660 | 11.10.2022 21:28:06 | -10,800 | 7372c03a88748d481500a65f8f856a44df535e2b | [Chore] Update ubuntu and fedora packaging
Problem: We decided to keep previous package names.
Solution: Create symlinks with legacy names to actual binaries. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -232,7 +232,8 @@ class TezosBinaryPackage(AbstractPackage):\n# We'll be using the pre-built binaries as source.\nif binaries_dir:\n- shutil.copy(f\"{binaries_dir}/{self.name}\", self.name)\n+ binary_name = self.name.replace(\"tezos\", \"octez\")\n+ shutil.copy(f\"{binaries_dir}/{binary_name}\", binary_name)\nos.chdir(\"../\")\nreturn\n@@ -332,29 +333,22 @@ install -m 0755 %{{name}} %{{buildroot}}/%{{_bindir}}\nf.write(file_contents)\ndef gen_buildfile(self, out, binaries_dir=None):\n+ binary_name = self.name.replace(\"tezos\", \"octez\")\nmakefile_contents = f\"\"\"\n.PHONY: install\nBINDIR=/usr/bin\n-{self.name}:\n- ./build-binary.sh {self.dune_filepath} {self.name}\n+{binary_name}:\n+{f\" ./build-binary.sh {self.dune_filepath} {binary_name}\"\n+ if not binaries_dir\n+ else \"\"}\n-install: {self.name}\n- mkdir -p $(DESTDIR)$(BINDIR)\n- cp $(CURDIR)/{self.name} $(DESTDIR)$(BINDIR)\n-\"\"\"\n- if binaries_dir:\n- makefile_contents = f\"\"\"\n-.PHONY: install\n-\n-BINDIR=/usr/bin\n-\n-{self.name}:\n-install: {self.name}\n+install: {binary_name}\nmkdir -p $(DESTDIR)$(BINDIR)\n- cp $(CURDIR)/{self.name} $(DESTDIR)$(BINDIR)\n+ cp $(CURDIR)/{binary_name} $(DESTDIR)$(BINDIR)\n+ ln -s $(BINDIR)/{binary_name} $(DESTDIR)$(BINDIR)/{self.name}\n\"\"\"\nwith open(out, \"w\") as f:\nf.write(makefile_contents)\n@@ -613,7 +607,7 @@ class TezosBakingServicesPackage(AbstractPackage):\nshutil.copy(f\"{os.path.dirname(__file__)}/tezos_voting_wizard.py\", package_dir)\ndef gen_control_file(self, deps, ubuntu_version, out):\n- run_deps_list = [\"acl\", \"tezos-client\", \"tezos-node\"]\n+ run_deps_list = [\"acl\"]\nfor proto in self.target_protos:\nrun_deps_list.append(f\"tezos-baker-{proto.lower()}\")\nrun_deps = \", \".join(run_deps_list)\n@@ -637,8 +631,7 @@ Description: {self.desc}\ndef gen_spec_file(self, build_deps, run_deps, out):\nrun_deps = \", \".join(\n- [\"acl\", \"tezos-client\", \"tezos-node\"]\n- + [f\"tezos-baker-{proto}\" for proto in self.target_protos],\n+ [\"acl\"] + [f\"tezos-baker-{proto}\" for proto in self.target_protos],\n)\n(\nsystemd_deps,\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -20,9 +20,14 @@ networks = {\n\"kathmandunet\": \"kathmandunet\",\n}\nnetworks_protos = {\n- \"mainnet\": [\"014-PtKathma\"],\n- \"ghostnet\": [\"014-PtKathma\"],\n- \"kathmandunet\": [\"014-PtKathma\"],\n+ \"mainnet\": [\"PtKathma\"],\n+ \"ghostnet\": [\"PtKathma\"],\n+ \"kathmandunet\": [\"PtKathma\"],\n+}\n+\n+protocol_numbers = {\n+ \"PtKathma\": \"014\",\n+ \"PtLimaPt\": \"015\",\n}\nsigner_units = [\n@@ -210,18 +215,19 @@ for network, network_config in networks.items():\nmk_node_unit(suffix=network, env=env, desc=f\"Tezos node {network}\")\n)\nnode_postinst_steps += f\"\"\"mkdir -p /var/lib/tezos/node-{network}\n-[ ! -f /var/lib/tezos/node-{network}/config.json ] && tezos-node config init --data-dir /var/lib/tezos/node-{network} --network {network_config}\n+[ ! -f /var/lib/tezos/node-{network}/config.json ] && octez-node config init --data-dir /var/lib/tezos/node-{network} --network {network_config}\nchown -R tezos:tezos /var/lib/tezos/node-{network}\n-cat > /usr/bin/tezos-node-{network} <<- 'EOM'\n+cat > /usr/bin/octez-node-{network} <<- 'EOM'\n#! /usr/bin/env bash\n-TEZOS_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 \"$@\"\n+TEZOS_NODE_DIR=\"$(cat $(systemctl show -p FragmentPath tezos-node-{network}.service | cut -d'=' -f2) | grep 'DATA_DIR' | cut -d '=' -f3 | cut -d '\"' -f1)\" octez-node \"$@\"\nEOM\n-chmod +x /usr/bin/tezos-node-{network}\n+chmod +x /usr/bin/octez-node-{network}\n+ln -s /usr/bin/octez-node-{network} /usr/bin/tezos-node-{network}\n\"\"\"\nnode_postrm_steps += f\"\"\"\n-rm -f /usr/bin/tezos-node-{network}\n+rm -f /usr/bin/octez-node-{network} /usr/bin/tezos-node-{network}\n\"\"\"\n# Add custom config service\n@@ -279,7 +285,7 @@ daemon_postinst_common = (\nfor proto in active_protocols:\n- proto_snake_case = proto.replace(\"-\", \"_\")\n+ proto_snake_case = protocol_numbers[proto] + \"_\" + proto\ndaemons_instances = [\nnetwork for network, protos in networks_protos.items() if proto in protos\n]\n@@ -458,7 +464,7 @@ def mk_rollup_packages():\n]\ndef mk_rollup_package(name, type, proto):\n- proto_snake_case = proto.replace(\"-\", \"_\")\n+ proto_snake_case = protocol_numbers[proto] + \"_\" + proto\nreturn TezosBinaryPackage(\nf\"tezos-{type}-rollup-{name}-{proto}\",\nf\"Tezos {type} rollup {name} using {proto}\",\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/build-binary.sh",
"new_path": "docker/package/scripts/build-binary.sh",
"diff": "@@ -21,6 +21,11 @@ while IFS= read -r -d $'\\0'; do\ndone < <(find ./vendors ./src ./tezt ./opam -name \\*.opam -print0)\nopam install \"${opams[@]}\" --deps-only --criteria=\"-notuptodate,-changed,-removed\"\neval \"$(opam env)\"\n+\n+# TODO remove on next upstream release\n+# see https://gitlab.com/tezos/tezos/-/issues/4005#note_1134995654\n+opam install ledgerwallet-tezos --criteria=-changed\n+\ndune build \"$dune_filepath\"\ncp \"./_build/default/$dune_filepath\" \"../$binary_name\"\ncd ..\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-accuser-start",
"new_path": "docker/package/scripts/tezos-accuser-start",
"diff": "set -euo pipefail\n# $PROTOCOL should be defined in the system unit environment\n-accuser=\"/usr/bin/tezos-accuser-$PROTOCOL\"\n+accuser=\"/usr/bin/octez-accuser-$PROTOCOL\"\naccuser_dir=\"$DATA_DIR\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-baker-start",
"new_path": "docker/package/scripts/tezos-baker-start",
"diff": "set -euo pipefail\n# $PROTOCOL should be defined in the system unit environment\n-baker=\"/usr/bin/tezos-baker-$PROTOCOL\"\n-tezos_client=\"/usr/bin/tezos-client\"\n+baker=\"/usr/bin/octez-baker-$PROTOCOL\"\n+tezos_client=\"/usr/bin/octez-client\"\nbaker_dir=\"$DATA_DIR\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-baking-prestart",
"new_path": "docker/package/scripts/tezos-baking-prestart",
"diff": "set -euo pipefail\n-tezos_client=\"/usr/bin/tezos-client\"\n+tezos_client=\"/usr/bin/octez-client\"\nconfig=\"$DATA_DIR/config\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-baking-start",
"new_path": "docker/package/scripts/tezos-baking-start",
"diff": "set -euo pipefail\n-tezos_client=\"/usr/bin/tezos-client\"\n+tezos_client=\"/usr/bin/octez-client\"\nkey_type=\"$(\"$tezos_client\" show address \"$BAKER_ADDRESS_ALIAS\" -S | grep \"Secret Key:\" | cut -d':' -f2-2 | xargs)\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-node-prestart",
"new_path": "docker/package/scripts/tezos-node-prestart",
"diff": "set -euo pipefail\n-node=\"/usr/bin/tezos-node\"\n+node=\"/usr/bin/octez-node\"\nif [[ ! -d \"$NODE_DATA_DIR\" ]]; then\nmkdir -p \"$NODE_DATA_DIR\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-node-start",
"new_path": "docker/package/scripts/tezos-node-start",
"diff": "set -euo pipefail\n-node=\"/usr/bin/tezos-node\"\n+node=\"/usr/bin/octez-node\"\n# default location of the config file\nconfig_file=\"$NODE_DATA_DIR/config.json\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-rollup-node-start",
"new_path": "docker/package/scripts/tezos-rollup-node-start",
"diff": "set -euo pipefail\n# $PROTOCOL should be defined in the system unit environment\n-node=\"/usr/bin/tezos-tx-rollup-node-$PROTOCOL\"\n-tezos_client=\"/usr/bin/tezos-client\"\n+node=\"/usr/bin/octez-tx-rollup-node-$PROTOCOL\"\n+tezos_client=\"/usr/bin/octez-client\"\n\"$node\" init \"$ROLLUP_MODE\" config \\\nfor \"$ROLLUP_ALIAS\" \\\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-signer-start",
"new_path": "docker/package/scripts/tezos-signer-start",
"diff": "set -euo pipefail\n# $PROTOCOL should be defined in the system unit environment\n-signer=\"/usr/bin/tezos-signer\"\n+signer=\"/usr/bin/octez-signer\"\nif [[ -n $PIDFILE ]]; then\npid_file_args=(\"--pid-file\" \"$PIDFILE\")\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_setup_wizard.py",
"new_path": "docker/package/tezos_setup_wizard.py",
"diff": "@@ -51,7 +51,7 @@ toggle_vote_modes = {\n}\n-TMP_SNAPSHOT_LOCATION = \"/tmp/tezos_node.snapshot\"\n+TMP_SNAPSHOT_LOCATION = \"/tmp/octez_node.snapshot\"\n# Wizard CLI utility\n@@ -62,9 +62,9 @@ welcome_text = \"\"\"Tezos Setup Wizard\nWelcome, this wizard will help you to set up the infrastructure to interact with the\nTezos blockchain.\n-In order to run a baking instance, you'll need the following Tezos binaries:\n+In order to run a baking instance, you'll need the following Tezos packages:\ntezos-client, tezos-node, tezos-baker-<proto>.\n-If you have installed tezos-baking, these binaries are already installed.\n+If you have installed tezos-baking, these packages are already installed.\nAll commands within the service are run under the 'tezos' user.\n@@ -86,7 +86,7 @@ def is_full_snapshot(import_mode):\nreturn True\nif import_mode == \"file\" or import_mode == \"url\":\noutput = get_proc_output(\n- \"sudo -u tezos tezos-node snapshot info \" + TMP_SNAPSHOT_LOCATION\n+ \"sudo -u tezos octez-node snapshot info \" + TMP_SNAPSHOT_LOCATION\n).stdout\nreturn re.search(b\"at level [0-9]+ in full\", output) is not None\nreturn False\n@@ -98,9 +98,9 @@ network_query = Step(\nid=\"network\",\nprompt=\"Which Tezos network would you like to use?\\nCurrently supported:\",\nhelp=\"The selected network will be used to set up all required services.\\n\"\n- \"The currently supported protocol is 013-PtJakart (used on jakartanet, ghostnet and mainnet)\\n\"\n- \"and 014-PtKathma (used on kathmandunet)\"\n- \"Keep in mind that you must select the test network (e.g. jakartanet)\\n\"\n+ \"The currently supported protocol is PtKathma (used on kathmandunet, ghostnet and mainnet)\\n\"\n+ \"and PtLimaPt (used on limanet)\"\n+ \"Keep in mind that you must select the test network (e.g. kathmandunet)\\n\"\n\"if you plan on baking with a faucet JSON file.\\n\",\noptions=networks,\nvalidator=Validator(enum_range_validator(networks)),\n@@ -111,7 +111,7 @@ service_mode_query = Step(\nprompt=\"Do you want to set up baking or to run the standalone node?\",\nhelp=\"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+ \"When this option is chosen, this wizard will help you bootstrap the Tezos node only.\",\noptions=modes,\nvalidator=Validator(enum_range_validator(modes)),\n)\n@@ -131,7 +131,7 @@ liquidity_toggle_vote_query = Step(\nhelp=\"Tezos chain offers a Liquidity Baking subsidy mechanism to incentivise exchange\\n\"\n\"between tez and tzBTC. You can ask to end this subsidy, ask to continue it, or abstain.\\n\"\n\"\\nYou can read more about this in the here:\\n\"\n- \"https://tezos.gitlab.io/jakarta/liquidity_baking.html\",\n+ \"https://tezos.gitlab.io/active/liquidity_baking.html\",\noptions=toggle_vote_modes,\nvalidator=Validator(enum_range_validator(toggle_vote_modes)),\n)\n@@ -143,15 +143,15 @@ def get_snapshot_mode_query(modes):\nprompt=\"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+ help=\"A fully-synced local Tezos node is required for running a baking instance.\\n\"\n+ \"By default, the Tezos node service 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+ \"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\",\noptions=modes,\nvalidator=Validator(enum_range_validator(modes)),\n@@ -160,7 +160,7 @@ def get_snapshot_mode_query(modes):\nsnapshot_file_query = Step(\nid=\"snapshot_file\",\n- prompt=\"Provide the path to the tezos-node snapshot file.\",\n+ prompt=\"Provide the path to the node snapshot file.\",\nhelp=\"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.\",\ndefault=None,\n@@ -169,7 +169,7 @@ snapshot_file_query = Step(\nsnapshot_url_query = Step(\nid=\"snapshot_url\",\n- prompt=\"Provide the url of the tezos-node snapshot file.\",\n+ prompt=\"Provide the url of the node snapshot file.\",\nhelp=\"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.\",\ndefault=None,\n@@ -179,9 +179,9 @@ snapshot_url_query = Step(\nhistory_mode_query = Step(\nid=\"history_mode\",\nprompt=\"Which history mode do you want your node to run in?\",\n- help=\"History modes govern how much data tezos-node stores, and, consequently, how much disk\\n\"\n+ help=\"History modes govern how much data a Tezos node stores, and, consequently, how much disk\\n\"\n\"space is required. Rolling mode is the smallest and fastest but still sufficient for baking.\\n\"\n- \"You can read more about different tezos-node history modes here:\\n\"\n+ \"You can read more about different nodes history modes here:\\n\"\n\"https://tezos.gitlab.io/user/history_modes.html\",\noptions=history_modes,\nvalidator=Validator(enum_range_validator(history_modes)),\n@@ -203,7 +203,7 @@ def get_key_mode_query(modes):\nclass Setup(Setup):\n- # Check if there is already some blockchain data in the tezos-node data directory,\n+ # Check if there is already some blockchain data in the octez-node data directory,\n# and ask the user if it can be overwritten.\ndef check_blockchain_data(self):\nnode_dir = get_data_dir(self.config[\"network\"])\n@@ -241,7 +241,7 @@ class Setup(Setup):\nself.query_step(history_mode_query)\nproc_call(\n- f\"sudo -u tezos tezos-node-{self.config['network']} config update \"\n+ f\"sudo -u tezos octez-node-{self.config['network']} config update \"\nf\"--history-mode {self.config['history_mode']}\"\n)\n@@ -316,7 +316,7 @@ class Setup(Setup):\nimport_flag = \"--reconstruct \"\nproc_call(\n- \"sudo -u tezos tezos-node-\"\n+ \"sudo -u tezos octez-node-\"\n+ self.config[\"network\"]\n+ \" snapshot import \"\n+ import_flag\n@@ -333,7 +333,7 @@ class Setup(Setup):\nelse:\nprint(\"Deleted the temporary snapshot file.\")\n- # Bootstrapping tezos-node\n+ # Bootstrapping octez-node\ndef bootstrap_node(self):\nself.import_snapshot()\n@@ -373,7 +373,7 @@ class Setup(Setup):\nprint(\"Waiting for the node to bootstrap...\")\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client \"\nf\"--endpoint {rpc_address} bootstrapped\"\n)\n@@ -399,7 +399,7 @@ class Setup(Setup):\nif self.config[\"key_import_mode\"] == \"ledger\":\ntry:\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"setup ledger to bake for {baker_alias} --main-hwm {self.get_current_head_level()}\"\n)\nbaker_set_up = True\n@@ -413,7 +413,7 @@ class Setup(Setup):\ntezos_client_options = self.get_tezos_client_options()\nbaker_alias = self.config[\"baker_alias\"]\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"register key {baker_alias} as delegate\"\n)\nprint(\n@@ -447,7 +447,7 @@ class Setup(Setup):\nprint()\nself.query_step(systemd_mode_query)\n- print(\"Trying to bootstrap tezos-node\")\n+ print(\"Trying to bootstrap octez-node\")\nself.bootstrap_node()\n# If we continue execution here, it means we need to set up baking as well.\n@@ -464,7 +464,7 @@ class Setup(Setup):\nexcept EOFError:\nraise EOFError\nexcept Exception as e:\n- print(\"Something went wrong when calling tezos-client:\")\n+ print(\"Something went wrong when calling octez-client:\")\nprint(str(e))\nprint()\nprint(\"Going back to the previous step.\")\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_voting_wizard.py",
"new_path": "docker/package/tezos_voting_wizard.py",
"diff": "@@ -72,7 +72,7 @@ def wait_for_ledger_wallet_app():\noutput = b\"\"\nwhile re.search(b\"Found a Tezos Wallet\", output) is None:\noutput = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client list connected ledgers\"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client list connected ledgers\"\n).stdout\nproc_call(\"sleep 1\")\n@@ -89,7 +89,7 @@ new_proposal_query = Step(\n# We define this step as a function since the corresponding step requires that we get the\n# proposal hashes off the chain.\n-# tezos-client supports submitting up to 20 proposal hashes at a time, but it seems like this\n+# octez-client supports submitting up to 20 proposal hashes at a time, but it seems like this\n# isn't recommended for use with Ledger, so we leave it at one hash pro query for now.\ndef get_proposal_period_hash(hashes):\n@@ -141,7 +141,7 @@ def get_node_rpc_addr_query(network, default=None):\nprompt=\"Provide the node's RPC address.\"\nif not relevant_nodes\nelse \"Choose one of the public nodes or provide the node's RPC address.\",\n- help=\"The node's RPC address will be used by tezos-client to vote. If you have baking set up\\n\"\n+ help=\"The node's RPC address will be used by octez-client to vote. If you have baking set up\\n\"\n\"through systemd services, the address is usually 'http://localhost:8732' by default.\",\ndefault=\"1\" if relevant_nodes and default is None else default,\noptions=relevant_nodes,\n@@ -160,7 +160,7 @@ def get_node_rpc_addr_query(network, default=None):\nbaker_alias_query = Step(\nid=\"baker_alias\",\nprompt=\"Provide the baker's alias.\",\n- help=\"The baker's alias will be used by tezos-client to vote. If you have baking set up\\n\"\n+ help=\"The baker's alias will be used by octez-client to vote. If you have baking set up\\n\"\n\"through systemd services, the address is usually 'baker' by default.\",\ndefault=None,\nvalidator=Validator([required_field_validator]),\n@@ -285,7 +285,7 @@ class Setup(Setup):\ndef fill_voting_period_info(self):\nvoting_proc = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client \"\nf\"{self.config['tezos_client_options']} show voting period\"\n)\nif voting_proc.returncode == 0:\n@@ -313,7 +313,7 @@ class Setup(Setup):\nhash_to_submit = self.config[\"new_proposal_hash\"]\nresult = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {self.config['tezos_client_options']} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {self.config['tezos_client_options']} \"\nf\"submit proposals for {self.config['baker_alias']} {hash_to_submit}\"\n)\n@@ -352,7 +352,7 @@ class Setup(Setup):\n# should be possible with the wizard, so we just raise an error with the whole output.\nelse:\nprint(\n- \"Something went wrong when calling tezos-client. Please consult the logs.\"\n+ \"Something went wrong when calling octez-client. Please consult the logs.\"\n)\nraise OSError(result.stderr.decode())\n@@ -367,14 +367,14 @@ class Setup(Setup):\nself.query_step(ballot_outcome_query)\nresult = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {self.config['tezos_client_options']} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {self.config['tezos_client_options']} \"\nf\"submit ballot for {self.config['baker_alias']} {self.config['proposal_hashes'][0]} \"\nf\"{self.config['ballot_outcome']}\"\n)\nif result.returncode != 0:\n# handle the 'unauthorized ballot' error\n- # Unfortunately, despite the error's description text, tezos-client seems to use this error\n+ # Unfortunately, despite the error's description text, octez-client seems to use this error\n# both when the baker has already voted and when the baker was not in the voting listings\n# in the first place, so it's difficult to distinguish between the two cases.\nif re.search(b\"Unauthorized ballot\", result.stderr) is not None:\n@@ -403,7 +403,7 @@ class Setup(Setup):\n# should be possible with the wizard, so we just raise an error with the whole output.\nelse:\nprint(\n- \"Something went wrong when calling tezos-client. Please consult the logs.\"\n+ \"Something went wrong when calling octez-client. Please consult the logs.\"\n)\nraise OSError(result.stderr.decode())\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -5,7 +5,7 @@ import os, shutil, subprocess\nfrom typing import List\nfrom .model import AbstractPackage\n-from .systemd import Service, print_service_file\n+from .systemd import print_service_file\ndef build_ubuntu_package(\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/wizard_structure.py",
"new_path": "docker/package/wizard_structure.py",
"diff": "@@ -245,8 +245,9 @@ key_import_modes = {\nnetworks = {\n\"mainnet\": \"Main Tezos network\",\n- \"ghostnet\": \"Long running test network using version 014 of Tezos protocol (Kathmandu)\",\n- \"kathmandunet\": \"Test network using version 014 of Tezos protocol (Kathmandu)\",\n+ \"ghostnet\": \"Long running test network, currently using the kathmandu Tezos protocol\",\n+ \"kathmandunet\": \"Test network using the kathmandu Tezos protocol\",\n+ \"limanet\": \"Test network using the lima Tezos protocol\",\n}\nhttp_request_headers = {\"User-Agent\": \"Mozilla/5.0\"}\n@@ -277,7 +278,7 @@ def get_data_dir(network):\ndef get_key_address(tezos_client_options, key_alias):\naddress = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"show address {key_alias} --show-secret\"\n)\nif address.returncode == 0:\n@@ -302,7 +303,7 @@ def wait_for_ledger_app(ledger_app):\ntry:\nwhile re.search(f\"Found a Tezos {ledger_app}\".encode(), output) is None:\noutput = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client list connected ledgers\"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client list connected ledgers\"\n).stdout\nproc_call(\"sleep 1\")\nexcept KeyboardInterrupt:\n@@ -327,13 +328,13 @@ def ledger_urls_info(ledgers_derivations, node_endpoint):\nfor ledger_url, derivations_paths in ledgers_derivations.items():\nfor derivation_path in derivations_paths:\noutput = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client \"\nf\"show ledger {ledger_url + derivation_path}\"\n).stdout\naddr = re.search(address_regex, output).group(0).decode()\nbalance = (\nget_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client \"\nf\"--endpoint {node_endpoint} get balance for {addr}\"\n)\n.stdout.decode()\n@@ -590,7 +591,7 @@ class Setup:\nself.query_step(query)\nself.config[\"tezos_client_options\"] = self.get_tezos_client_options()\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client \"\nf\"{self.config['tezos_client_options']} config update\"\n)\n@@ -668,7 +669,7 @@ class Setup:\nif self.config[\"key_import_mode\"] == \"secret-key\":\nself.query_step(secret_key_query)\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"import secret key {baker_alias} {self.config['secret_key']} --force\"\n)\nelif self.config[\"key_import_mode\"] == \"remote\":\n@@ -676,17 +677,17 @@ class Setup:\ntezos_client_options = self.get_tezos_client_options()\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"import secret key {baker_alias} remote:{self.config['remote_key']} --force\"\n)\nelif self.config[\"key_import_mode\"] == \"generate-fresh-key\":\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"gen keys {baker_alias} --force\"\n)\nprint(\"Newly generated baker key:\")\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"show address {baker_alias}\"\n)\nnetwork = self.config[\"network\"]\n@@ -700,7 +701,7 @@ class Setup:\n# dry-run delegate registration until it succeeds\nwhile True:\nresult = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"register key {baker_alias} as delegate --dry-run\"\n)\nif result.returncode == 0:\n@@ -714,7 +715,7 @@ class Setup:\nself.query_step(json_filepath_query)\njson_tmp_path = shutil.copy(self.config[\"json_filepath\"], \"/tmp/\")\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"activate account {baker_alias} with {json_tmp_path} --force\"\n)\ntry:\n@@ -769,14 +770,14 @@ class Setup:\nelse:\nbaker_ledger_url = self.config[\"ledger_derivation\"]\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} tezos-client {tezos_client_options} \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\nf\"import secret key {baker_alias} {baker_ledger_url} --force\"\n)\nexcept EOFError:\nraise EOFError\nexcept Exception as e:\n- print(\"Something went wrong when calling tezos-client:\")\n+ print(\"Something went wrong when calling octez-client:\")\nprint(str(e))\nprint()\nprint(\"Please check your input and try again.\")\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Update ubuntu and fedora packaging
Problem: We decided to keep previous package names.
Solution: Create symlinks with legacy names to actual binaries. |
603,660 | 12.10.2022 10:51:27 | -10,800 | 61444dbff6166494a2f26123945cbd6a6d88b1c1 | [Chore] Update `flake.nix`
Problem: Flake output `overlay` is deprecated.
Solution: Use `overlays.default`. | [
{
"change_type": "MODIFY",
"old_path": "flake.nix",
"new_path": "flake.nix",
"diff": "devShells.\"aarch64-darwin\".autorelease-macos =\nimport ./scripts/macos-shell.nix { pkgs = pkgs-darwin; };\n- overlay = final: prev: nixpkgs.lib.composeManyExtensions [\n+ overlays.default = final: prev: nixpkgs.lib.composeManyExtensions [\nocaml-overlay\n(final: prev: { inherit (inputs) serokell-nix; })\n] final prev;\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Update `flake.nix`
Problem: Flake output `overlay` is deprecated.
Solution: Use `overlays.default`. |
603,660 | 12.10.2022 13:10:25 | -10,800 | 99a510523bde4be8b278d0647cbfc6c8e2347d8f | [Chore] Support limanet
Problem: Test network `limanet` is running.
Solution: Add support for it. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -17,11 +17,13 @@ from .systemd import Service, ServiceFile, SystemdUnit, Unit, Install\nnetworks = {\n\"mainnet\": \"mainnet\",\n\"ghostnet\": \"ghostnet\",\n+ \"limanet\": \"https://teztnets.xyz/limanet\",\n\"kathmandunet\": \"kathmandunet\",\n}\nnetworks_protos = {\n\"mainnet\": [\"PtKathma\"],\n\"ghostnet\": [\"PtKathma\"],\n+ \"limanet\": [\"PtLimaPt\"],\n\"kathmandunet\": [\"PtKathma\"],\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-accuser.nix",
"new_path": "nix/modules/tezos-accuser.nix",
"diff": "@@ -9,6 +9,8 @@ let\noctez-accuser-pkgs = {\n\"PtKathma\" =\n\"${pkgs.octezPackages.octez-accuser-PtKathma}/bin/octez-accuser-PtKathma\";\n+ \"PtLimaPt\" =\n+ \"${pkgs.octezPackages.octez-accuser-PtLimaPt}/bin/octez-accuser-PtLimaPt\";\n};\ncfg = config.services.octez-accuser;\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-baker.nix",
"new_path": "nix/modules/tezos-baker.nix",
"diff": "@@ -9,6 +9,8 @@ let\noctez-baker-pkgs = {\n\"PtKathma\" =\n\"${pkgs.octezPackages.octez-baker-PtKathma}/bin/octez-baker-PtKathma\";\n+ \"PtLimaPt\" =\n+ \"${pkgs.octezPackages.octez-baker-PtLimaPt}/bin/octez-baker-PtLimaPt\";\n};\noctez-client = \"${pkgs.octezPackages.octez-client}/bin/octez-client\";\ncfg = config.services.octez-baker;\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Support limanet
Problem: Test network `limanet` is running.
Solution: Add support for it. |
603,660 | 12.10.2022 13:15:42 | -10,800 | 810387bdb23be947b0ef45c7c94a74cb869d1fa0 | [Chore] Remove obsolete formulae
Problem: Jakartanet is down, and
jakarta protocol deprecated.
Solution: Remove jakarta-related formulae. | [
{
"change_type": "MODIFY",
"old_path": ".github/workflows/build-bottles.yml",
"new_path": ".github/workflows/build-bottles.yml",
"diff": "@@ -17,7 +17,7 @@ jobs:\nmatrix:\nos: [ { id: macos-12, name: \"monterey\" } ]\n# we don't bottle meta-formulas that contain only services\n- formula: [tezos-accuser-013-PtJakart, tezos-accuser-014-PtKathma, tezos-admin-client, tezos-baker-013-PtJakart, tezos-baker-014-PtKathma, tezos-client, tezos-codec, tezos-node, tezos-signer, tezos-tx-rollup-client-013-PtJakart, tezos-tx-rollup-client-014-PtKathma, tezos-tx-rollup-node-013-PtJakart, tezos-tx-rollup-node-014-PtKathma]\n+ formula: [tezos-accuser-PtKathma, tezos-admin-client, tezos-baker-PtKathma, tezos-client, tezos-codec, tezos-node, tezos-signer, tezos-tx-rollup-client-PtKathma, tezos-tx-rollup-node-PtKathma]\nsteps:\n- name: Checkout\n"
},
{
"change_type": "DELETE",
"old_path": "Formula/tezos-accuser-013-PtJakart.rb",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n-# SPDX-License-Identifier: LicenseRef-MIT-OA\n-\n-class TezosAccuser013Ptjakart < 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 => \"v15.0-rc1\", :shallow => false\n-\n- version \"v15.0-rc1-1\"\n-\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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/#{TezosAccuser013Ptjakart.version}/\"\n- end\n-\n- def make_deps\n- ENV.deparallelize\n- ENV[\"CARGO_HOME\"]=\"./.cargo\"\n- # Disable usage of instructions from the ADX extension to avoid incompatibility\n- # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n- ENV[\"BLST_PORTABLE\"]=\"yes\"\n- # Here is the workaround to use opam 2.0 because Tezos is currently not compatible with opam 2.1.0 and newer\n- arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n- system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n- system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n- ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n- system \"rustup-init\", \"--default-toolchain\", \"1.60.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-013-PtJakart\"\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-013-PtJakart-start\", startup_contents)\n- bin.install \"tezos-accuser-013-PtJakart-start\"\n- make_deps\n- install_template \"src/proto_013_PtJakart/bin_accuser/main_accuser_013_PtJakart.exe\",\n- \"_build/default/src/proto_013_PtJakart/bin_accuser/main_accuser_013_PtJakart.exe\",\n- \"tezos-accuser-013-PtJakart\"\n- end\n-\n- plist_options manual: \"tezos-accuser-013-PtJakart 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-013-PtJakart-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-013-PtJakart.rb",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n-# SPDX-License-Identifier: LicenseRef-MIT-OA\n-\n-class TezosBaker013Ptjakart < 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 => \"v15.0-rc1\", :shallow => false\n-\n- version \"v15.0-rc1-1\"\n-\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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/#{TezosBaker013Ptjakart.version}/\"\n- end\n-\n- def make_deps\n- ENV.deparallelize\n- ENV[\"CARGO_HOME\"]=\"./.cargo\"\n- # Disable usage of instructions from the ADX extension to avoid incompatibility\n- # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n- ENV[\"BLST_PORTABLE\"]=\"yes\"\n- # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n- arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n- system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n- system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n- ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n- system \"rustup-init\", \"--default-toolchain\", \"1.60.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-013-PtJakart\"\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-013-PtJakart-start\", startup_contents)\n- bin.install \"tezos-baker-013-PtJakart-start\"\n- make_deps\n- install_template \"src/proto_013_PtJakart/bin_baker/main_baker_013_PtJakart.exe\",\n- \"_build/default/src/proto_013_PtJakart/bin_baker/main_baker_013_PtJakart.exe\",\n- \"tezos-baker-013-PtJakart\"\n- end\n- plist_options manual: \"tezos-baker-013-PtJakart 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-013-PtJakart-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-node-jakartanet.rb",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n-# SPDX-License-Identifier: LicenseRef-MIT-OA\n-\n-class TezosNodeJakartanet < Formula\n- url \"file:///dev/null\"\n- version \"v15.0-rc1-1\"\n-\n- depends_on \"tezos-node\"\n-\n- desc \"Meta formula that provides background tezos-node service that runs on jakartanet\"\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=jakartanet \\\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=jakartanet \\\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-jakartanet-start\", startup_contents)\n- bin.install \"tezos-node-jakartanet-start\"\n- print \"Installing tezos-node-jakartanet 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-jakartanet-start</string>\n- <key>EnvironmentVariables</key>\n- <dict>\n- <key>DATA_DIR</key>\n- <string>#{var}/lib/tezos/node-jakartanet</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-jakartanet\"\n- system \"tezos-node\", \"config\", \"init\", \"--data-dir\" \"#{var}/lib/tezos/node-jakartanet\", \"--network\", \"jakartanet\"\n- end\n-end\n"
},
{
"change_type": "DELETE",
"old_path": "Formula/tezos-tx-rollup-client-013-PtJakart.rb",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n-# SPDX-License-Identifier: LicenseRef-MIT-OA\n-\n-class TezosTxRollupClient013Ptjakart < 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 => \"v15.0-rc1\", :shallow => false\n-\n- version \"v15.0-rc1-1\"\n-\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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 \"Transaction rollup CLI client for 013-PtJakart\"\n-\n- bottle do\n- root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosTxRollupClient013Ptjakart.version}/\"\n- end\n-\n- def make_deps\n- ENV.deparallelize\n- ENV[\"CARGO_HOME\"]=\"./.cargo\"\n- # Disable usage of instructions from the ADX extension to avoid incompatibility\n- # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n- ENV[\"BLST_PORTABLE\"]=\"yes\"\n- # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n- arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n- system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n- system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n- ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n- system \"rustup-init\", \"--default-toolchain\", \"1.60.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- make_deps\n- install_template \"src/proto_013_PtJakart/bin_tx_rollup_client/main_tx_rollup_client_013_PtJakart.exe\",\n- \"_build/default/src/proto_013_PtJakart/bin_tx_rollup_client/main_tx_rollup_client_013_PtJakart.exe\",\n- \"tezos-tx-rollup-client-013-PtJakart\"\n- end\n-end\n"
},
{
"change_type": "DELETE",
"old_path": "Formula/tezos-tx-rollup-node-013-PtJakart.rb",
"new_path": null,
"diff": "-#!/usr/bin/env ruby\n-\n-# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n-# SPDX-License-Identifier: LicenseRef-MIT-OA\n-\n-class TezosTxRollupNode013Ptjakart < 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 => \"v15.0-rc1\", :shallow => false\n-\n- version \"v15.0-rc1-1\"\n-\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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 \"Tezos transaction rollup node for 013-PtJakart\"\n-\n- bottle do\n- root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosTxRollupNode013Ptjakart.version}/\"\n- end\n-\n- def make_deps\n- ENV.deparallelize\n- ENV[\"CARGO_HOME\"]=\"./.cargo\"\n- # Disable usage of instructions from the ADX extension to avoid incompatibility\n- # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n- ENV[\"BLST_PORTABLE\"]=\"yes\"\n- # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n- arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n- system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n- system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n- ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n- system \"rustup-init\", \"--default-toolchain\", \"1.60.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- node=\"#{bin}/tezos-tx-rollup-node-013-PtJakart\"\n-\n- \"$node\" init \"$ROLLUP_MODE\" config \\\n- for \"$ROLLUP_ALIAS\" \\\n- --data-dir \"$DATA_DIR\" \\\n- --rpc-addr \"$ROLLUP_NODE_RPC_ENDPOINT\" \\\n- --force\n-\n- \"$node\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n- run \"$ROLLUP_MODE\" for \"$ROLLUP_ALIAS\" \\\n- --data-dir \"$DATA_DIR\"\n-\n- EOS\n- File.write(\"tezos-tx-rollup-node-013-PtJakart-start\", startup_contents)\n- bin.install \"tezos-tx-rollup-node-013-PtJakart-start\"\n- make_deps\n- install_template \"src/proto_013_PtJakart/bin_tx_rollup_node/main_tx_rollup_node_013_PtJakart.exe\",\n- \"_build/default/src/proto_013_PtJakart/bin_tx_rollup_node/main_tx_rollup_node_013_PtJakart.exe\",\n- \"tezos-tx-rollup-node-013-PtJakart\"\n- end\n- plist_options manual: \"tezos-tx-rollup-node-013-PtJakart run for\"\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-tx-rollup-node-013-PtJakart-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>ROLLUP_NODE_RPC_ENDPOINT</key>\n- <string>127.0.0.1:8472</string>\n- <key>ROLLUP_MODE</key>\n- <string>observer</string>\n- <key>ROLLUP_ALIAS</key>\n- <string>rollup</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"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Remove obsolete formulae
Problem: Jakartanet is down, and
jakarta protocol deprecated.
Solution: Remove jakarta-related formulae. |
603,660 | 13.10.2022 11:10:48 | -10,800 | 81e140bd2ccae11388cbf532b48cd7de39efd512 | [Chore] Reset `tezos-baking` letter version
Problem: Letter version should be reset when
native release is bumped.
Solution: Reset it. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -511,7 +511,7 @@ class TezosBakingServicesPackage(AbstractPackage):\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+ letter_version = \"\"\nbuildfile = \"setup.py\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Reset `tezos-baking` letter version
Problem: Letter version should be reset when
native release is bumped.
Solution: Reset it. |
603,660 | 13.10.2022 13:11:27 | -10,800 | 4da0e27fe1c9752261a6b742b2ca74a30d522a2f | [Chore] Add formulae for lima protocol
Problem: New lima protocol was introduced.
Solution: Provide `lima`-specific binaries and
`limanet`-node. | [
{
"change_type": "MODIFY",
"old_path": ".github/workflows/build-bottles.yml",
"new_path": ".github/workflows/build-bottles.yml",
"diff": "@@ -17,8 +17,7 @@ jobs:\nmatrix:\nos: [ { id: macos-12, name: \"monterey\" } ]\n# we don't bottle meta-formulas that contain only services\n- formula: [tezos-accuser-PtKathma, tezos-admin-client, tezos-baker-PtKathma, tezos-client, tezos-codec, tezos-node, tezos-signer, tezos-tx-rollup-client-PtKathma, tezos-tx-rollup-node-PtKathma]\n-\n+ formula: [tezos-accuser-PtKathma, tezos-accuser-PtLimaPt, tezos-admin-client, tezos-baker-PtKathma, tezos-baker-PtLimaPt, tezos-client, tezos-codec, tezos-node, tezos-signer, tezos-tx-rollup-client-PtKathma, tezos-tx-rollup-client-PtLimaPt, tezos-tx-rollup-node-PtKathma, tezos-tx-rollup-node-PtLimaPt]\nsteps:\n- name: Checkout\nuses: actions/checkout@v2\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-accuser-PtLimaPt.rb",
"diff": "+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosAccuserPtlimapt < 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 => \"v15.0-rc1\", :shallow => false\n+\n+ version \"v15.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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/#{TezosAccuserPtlimapt.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ # Disable usage of instructions from the ADX extension to avoid incompatibility\n+ # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+ ENV[\"BLST_PORTABLE\"]=\"yes\"\n+ # Here is the workaround to use opam 2.0 because Tezos is currently not compatible with opam 2.1.0 and newer\n+ arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n+ system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.60.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+ ln_sf \"#{bin}/#{name}\", \"#{bin}/#{name.gsub(\"octez\", \"tezos\")}\"\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}/octez-accuser-PtLimaPt\"\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-PtLimaPt-start\", startup_contents)\n+ bin.install \"tezos-accuser-PtLimaPt-start\"\n+ make_deps\n+ install_template \"src/proto_015_PtLimaPt/bin_accuser/main_accuser_015_PtLimaPt.exe\",\n+ \"_build/default/src/proto_015_PtLimaPt/bin_accuser/main_accuser_015_PtLimaPt.exe\",\n+ \"octez-accuser-PtLimaPt\"\n+ end\n+\n+ plist_options manual: \"tezos-accuser-PtLimaPt 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-PtLimaPt-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-PtLimaPt.rb",
"diff": "+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosBakerPtlimapt < 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 => \"v15.0-rc1\", :shallow => false\n+\n+ version \"v15.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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/#{TezosBakerPtlimapt.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ # Disable usage of instructions from the ADX extension to avoid incompatibility\n+ # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+ ENV[\"BLST_PORTABLE\"]=\"yes\"\n+ # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n+ arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n+ system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.60.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+ ln_sf \"#{bin}/#{name}\", \"#{bin}/#{name.gsub(\"octez\", \"tezos\")}\"\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}/octez-baker-PtLimaPt\"\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-PtLimaPt-start\", startup_contents)\n+ bin.install \"tezos-baker-PtLimaPt-start\"\n+ make_deps\n+ install_template \"src/proto_015_PtLimaPt/bin_baker/main_baker_015_PtLimaPt.exe\",\n+ \"_build/default/src/proto_015_PtLimaPt/bin_baker/main_baker_015_PtLimaPt.exe\",\n+ \"octez-baker-PtLimaPt\"\n+ end\n+ plist_options manual: \"tezos-baker-PtLimaPt 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-PtLimaPt-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-node-limanet.rb",
"diff": "+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosNodeLimanet < Formula\n+ url \"file:///dev/null\"\n+ version \"v15.0-rc1-1\"\n+\n+ depends_on \"tezos-node\"\n+\n+ desc \"Meta formula that provides background tezos-node service that runs on limanet\"\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/octez-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=https://teztnets.xyz/limanet \\\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=https://teztnets.xyz/limanet \\\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-limanet-start\", startup_contents)\n+ bin.install \"tezos-node-limanet-start\"\n+ print \"Installing tezos-node-limanet 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-limanet-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>DATA_DIR</key>\n+ <string>#{var}/lib/tezos/node-limanet</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-limanet\"\n+ system \"octez-node\", \"config\", \"init\", \"--data-dir\" \"#{var}/lib/tezos/node-limanet\", \"--network\", \"https://teztnets.xyz/limanet\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-tx-rollup-client-PtLimaPt.rb",
"diff": "+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosTxRollupClientPtlimapt < 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 => \"v15.0-rc1\", :shallow => false\n+\n+ version \"v15.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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 \"Transaction rollup CLI client for PtLimaPt\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosTxRollupClientPtlimapt.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ # Disable usage of instructions from the ADX extension to avoid incompatibility\n+ # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+ ENV[\"BLST_PORTABLE\"]=\"yes\"\n+ # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n+ arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n+ system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.60.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+ ln_sf \"#{bin}/#{name}\", \"#{bin}/#{name.gsub(\"octez\", \"tezos\")}\"\n+ end\n+\n+ def install\n+ make_deps\n+ install_template \"src/proto_015_PtLimaPt/bin_tx_rollup_client/main_tx_rollup_client_015_PtLimaPt.exe\",\n+ \"_build/default/src/proto_015_PtLimaPt/bin_tx_rollup_client/main_tx_rollup_client_015_PtLimaPt.exe\",\n+ \"octez-tx-rollup-client-PtLimaPt\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-tx-rollup-node-PtLimaPt.rb",
"diff": "+#!/usr/bin/env ruby\n+\n+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosTxRollupNodePtlimapt < 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 => \"v15.0-rc1\", :shallow => false\n+\n+ version \"v15.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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 \"Tezos transaction rollup node for PtLimaPt\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosTxRollupNodePtlimapt.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ # Disable usage of instructions from the ADX extension to avoid incompatibility\n+ # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+ ENV[\"BLST_PORTABLE\"]=\"yes\"\n+ # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n+ arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n+ system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.60.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+ ln_sf \"#{bin}/#{name}\", \"#{bin}/#{name.gsub(\"octez\", \"tezos\")}\"\n+ end\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ node=\"#{bin}/octez-tx-rollup-node-PtLimaPt\"\n+\n+ \"$node\" init \"$ROLLUP_MODE\" config \\\n+ for \"$ROLLUP_ALIAS\" \\\n+ --data-dir \"$DATA_DIR\" \\\n+ --rpc-addr \"$ROLLUP_NODE_RPC_ENDPOINT\" \\\n+ --force\n+\n+ \"$node\" --endpoint \"$NODE_RPC_ENDPOINT\" \\\n+ run \"$ROLLUP_MODE\" for \"$ROLLUP_ALIAS\" \\\n+ --data-dir \"$DATA_DIR\"\n+\n+ EOS\n+ File.write(\"tezos-tx-rollup-node-PtLimaPt-start\", startup_contents)\n+ bin.install \"tezos-tx-rollup-node-PtLimaPt-start\"\n+ make_deps\n+ install_template \"src/proto_015_PtLimaPt/bin_tx_rollup_node/main_tx_rollup_node_015_PtLimaPt.exe\",\n+ \"_build/default/src/proto_015_PtLimaPt/bin_tx_rollup_node/main_tx_rollup_node_015_PtLimaPt.exe\",\n+ \"octez-tx-rollup-node-PtLimaPt\"\n+ end\n+ plist_options manual: \"tezos-tx-rollup-node-PtLimaPt run for\"\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-tx-rollup-node-PtLimaPt-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>ROLLUP_NODE_RPC_ENDPOINT</key>\n+ <string>127.0.0.1:8472</string>\n+ <key>ROLLUP_MODE</key>\n+ <string>observer</string>\n+ <key>ROLLUP_ALIAS</key>\n+ <string>rollup</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": "MODIFY",
"old_path": "scripts/build-all-bottles.sh",
"new_path": "scripts/build-all-bottles.sh",
"diff": "@@ -19,7 +19,7 @@ set -euo pipefail\nretval=\"0\"\n# we don't bottle meta-formulas that contain only services\n-formulae=(\"tezos-accuser-PtKathma\" \"tezos-admin-client\" \"tezos-baker-PtKathma\" \"tezos-client\" \"tezos-codec\" \"tezos-node\" \"tezos-sandbox\" \"tezos-signer\" \"tezos-tx-rollup-client-PtKathma\" \"tezos-tx-rollup-node-PtKathma\")\n+formulae=(\"tezos-accuser-PtKathma\" \"tezos-accuser-PtLimaPt\" \"tezos-admin-client\" \"tezos-baker-PtKathma\" \"tezos-baker-PtLimaPt\" \"tezos-client\" \"tezos-codec\" \"tezos-node\" \"tezos-sandbox\" \"tezos-signer\" \"tezos-tx-rollup-client-PtKathma\" \"tezos-tx-rollup-client-PtLimaPt\" \"tezos-tx-rollup-node-PtKathma\" \"tezos-tx-rollup-node-PtLimaPt\")\n# tezos-sapling-params is used as a dependency for some of the formulas\n# so we handle it separately.\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add formulae for lima protocol
Problem: New lima protocol was introduced.
Solution: Provide `lima`-specific binaries and
`limanet`-node. |
603,660 | 13.10.2022 13:37:11 | -10,800 | 527dd2b061c01871bc88122f187525cb362aebd7 | [Chore] Rename env variable
Problem: To be consistent, we should
rename `TEZOS_VERSION`.
Solution: Rename it and update codebase. Also remove
useless inputs to devShell. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-for-tags.yml",
"new_path": ".buildkite/pipeline-for-tags.yml",
"diff": "env:\nUSE_NEWER_NIX: 1\n- SET_VERSION: \"export TEZOS_VERSION=\\\"$(cat meta.json | jq -r '.tezos_ref' | cut -d'/' -f3)\\\"\"\n+ SET_VERSION: \"export OCTEZ_VERSION=\\\"$(cat meta.json | jq -r '.tezos_ref' | cut -d'/' -f3)\\\"\"\nsteps:\n- - label: Check for new Tezos release\n+ - label: Check for new Octez release\nif: build.source == \"schedule\" && build.branch == \"master\"\ncommands:\n- nix develop .#autorelease -c ./scripts/update-tezos.sh\n"
},
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "# SPDX-License-Identifier: LicenseRef-MIT-OA\nenv:\n- SET_VERSION: \"export TEZOS_VERSION=\\\"$(cat meta.json | jq -r '.tezos_ref' | cut -d'/' -f3)\\\"\"\n+ SET_VERSION: \"export OCTEZ_VERSION=\\\"$(cat meta.json | jq -r '.tezos_ref' | cut -d'/' -f3)\\\"\"\nUSE_NEWER_NIX: 1\nsteps:\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -15,9 +15,9 @@ Static binaries building using custom alpine image.\n[`docker-static-build.sh`](docker-static-build.sh) will build tezos binaries\nimage defined in [Dockerfile](build/Dockerfile). In order to build them you should specify\n-`TEZOS_VERSION` env variable and run the script:\n+`OCTEZ_VERSION` env variable and run the script:\n```\n-export TEZOS_VERSION=\"v7.3\"\n+export OCTEZ_VERSION=\"v14.1\"\n./docker-static-build.sh\n```\nAfter that, directory will contain built static binaries.\n@@ -74,10 +74,10 @@ version defined in [meta.json](../meta.json) and build native ubuntu packages.\n### `.deb` packages\n-In order to build binary `.deb` packages specify `TEZOS_VERSION` and\n+In order to build binary `.deb` packages specify `OCTEZ_VERSION` and\nrun the following command:\n```\n-export TEZOS_VERSION=\"v7.3\"\n+export OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary\n```\n@@ -85,7 +85,7 @@ It is also possible to build single package. In order to do that run the followi\n```\n# cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package <tezos-binary-name>\n# Example for baker\n-export TEZOS_VERSION=\"v7.3\"\n+export OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-007-PsDELPH1\n```\n@@ -103,7 +103,7 @@ sudo apt install <path to deb file>\nIn order to build source packages run the following commands:\n```\n-export TEZOS_VERSION=\"v7.3\"\n+export OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type source\n# you can also build single source package\ncd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type source --package tezos-baker-007-PsDELPH1\n@@ -117,7 +117,7 @@ There are 5 files for each package: `.orig.tar.gz`, `.debian.tar.xz`,\nYou can test source package building using [`pbuilder`](https://wiki.ubuntu.com/PbuilderHowto).\n-In order to push the packages to the Launchpad PPA `*.changes` files should should be updated with\n+<!-- Updated: 2022/10/17 11:12:29 by dlaptov ### ########.fr -->\nthe submitter info and signed.\nIn order to update `*.changes` files with the proper signer info run the following:\n@@ -183,10 +183,10 @@ will build source or binary packages depending on the passed argument (`source`\n### `.rpm` packages\n-In order to build binary `.rpm` packages specify `TEZOS_VERSION` and\n+In order to build binary `.rpm` packages specify `OCTEZ_VERSION` and\nrun the following command:\n```\n-export TEZOS_VERSION=\"v7.3\"\n+export OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary\n```\n@@ -194,7 +194,7 @@ It is also possible to build single package. In order to do that run the followi\n```\n# cd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary --package <tezos-binary-name>\n# Example for baker\n-export TEZOS_VERSION=\"v7.3\"\n+export OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-007-PsDELPH1\n```\n@@ -212,7 +212,7 @@ sudo yum localinstall <path to rpm file>\nIn order to build source packages run the following commands:\n```\n-export TEZOS_VERSION=\"v7.3\"\n+export OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.sh --os fedora --type source\n# you can also build single source package\ncd .. && ./docker/docker-tezos-packages.sh --os fedora --type source --package tezos-baker-007-PsDELPH1\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile",
"new_path": "docker/build/Dockerfile",
"diff": "@@ -8,6 +8,6 @@ RUN apk --no-cache --virtual add rsync git m4 build-base patch unzip \\\nautoconf automake libtool linux-headers cargo libffi-dev zlib-static coreutils\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\n-ARG TEZOS_VERSION\n+ARG OCTEZ_VERSION\nCOPY ./build/build-tezos.sh /build-tezos.sh\n-RUN /build-tezos.sh ${TEZOS_VERSION}\n+RUN /build-tezos.sh ${OCTEZ_VERSION}\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile.aarch64",
"new_path": "docker/build/Dockerfile.aarch64",
"diff": "@@ -14,6 +14,6 @@ RUN apk --no-cache --virtual add rsync git m4 build-base patch unzip \\\nautoconf automake libtool linux-headers cargo libffi-dev zlib-static coreutils\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\n-ARG TEZOS_VERSION\n+ARG OCTEZ_VERSION\nCOPY ./build/build-tezos.sh /build-tezos.sh\n-RUN /build-tezos.sh ${TEZOS_VERSION}\n+RUN /build-tezos.sh ${OCTEZ_VERSION}\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.sh",
"new_path": "docker/docker-tezos-packages.sh",
"diff": "@@ -56,7 +56,7 @@ done\n\"$virtualisation_engine\" build -t tezos-\"$target_os\" -f docker/package/Dockerfile-\"$target_os\" .\nset +e\n-container_id=\"$(\"$virtualisation_engine\" create \"${docker_volumes[@]}\" --env TEZOS_VERSION=\"$TEZOS_VERSION\" --env OPAMSOLVERTIMEOUT=900 -t tezos-\"$target_os\" \"${args[@]}\")\"\n+container_id=\"$(\"$virtualisation_engine\" create \"${docker_volumes[@]}\" --env OCTEZ_VERSION=\"$OCTEZ_VERSION\" --env OPAMSOLVERTIMEOUT=900 -t tezos-\"$target_os\" \"${args[@]}\")\"\n\"$virtualisation_engine\" start -a \"$container_id\"\nexit_code=\"$?\"\n\"$virtualisation_engine\" cp \"$container_id\":/tezos-packaging/docker/out .\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/meta.py",
"new_path": "docker/package/meta.py",
"diff": "@@ -17,7 +17,7 @@ class PackagesMeta:\nself.license_version = license_version\n-version = os.environ[\"TEZOS_VERSION\"][1:]\n+version = os.environ[\"OCTEZ_VERSION\"][1:]\nmeta_json_contents = json.load(\nopen(f\"{os.path.dirname(__file__)}/../../meta.json\", \"r\")\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/systemd.md",
"new_path": "docs/systemd.md",
"diff": "@@ -40,9 +40,9 @@ from scratch.\nFor this you'll need a `.service` file to define each systemd service.\nThe easiest way to get one is to generate one with `docker` by running [`gen_systemd_service_file.py`](../gen_systemd_service_file.py).\n-First you'll need to set the `TEZOS_VERSION` env variable, e.g.:\n+First you'll need to set the `OCTEZ_VERSION` env variable, e.g.:\n```sh\n-export TEZOS_VERSION=\"v7.3\"\n+export OCTEZ_VERSION=\"v14.1\"\n```\nThen you can use the script, specifying the binary name as an argument, e.g.:\n```\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/publish-native-packages.sh",
"new_path": "scripts/publish-native-packages.sh",
"diff": "@@ -38,7 +38,7 @@ incoming = ~serokell/ubuntu/tezos-rc\nlogin = anonymous\nEOL\n-if [[ $TEZOS_VERSION =~ v.*-rc[0-9]* ]]; then\n+if [[ $OCTEZ_VERSION =~ v.*-rc[0-9]* ]]; then\nlaunchpad_ppa=\"tezos-rc-serokell\"\ncopr_project=\"@Serokell/Tezos-rc\"\nelse\n"
},
{
"change_type": "MODIFY",
"old_path": "shell.nix",
"new_path": "shell.nix",
"diff": "{ pkgs, meta, ... }:\nwith pkgs; mkShell {\nbuildInputs = [\n- nix\n- nodePackages.bash-language-server\n- nodePackages.yaml-language-server\n- nodePackages.vscode-langservers-extracted\n- python3Packages.python-lsp-server\npython3Packages.black\nshellcheck\n- vagrant\n- libvirt\n- qemu\njq\nbuildkite-agent\n];\n- TEZOS_VERSION= with pkgs.lib; lists.last (strings.splitString \"/\" (meta.tezos_ref));\n+ OCTEZ_VERSION= with pkgs.lib; lists.last (strings.splitString \"/\" (meta.tezos_ref));\n}\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Rename env variable
Problem: To be consistent, we should
rename `TEZOS_VERSION`.
Solution: Rename it and update codebase. Also remove
useless inputs to devShell. |
603,660 | 14.10.2022 17:15:09 | -10,800 | 0818157b1d39584998abc041345ba1237634d1f4 | [Chore] Move rust install to another layer
Problem: Step with installing rust doesn't
seem to change with time and shared between all build.
Solution: Move it to another `RUN` call so that it would be
taken from cache. | [
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile",
"new_path": "docker/build/Dockerfile",
"diff": "@@ -8,6 +8,8 @@ RUN apk --no-cache --virtual add rsync git m4 build-base patch unzip \\\nautoconf automake libtool linux-headers cargo libffi-dev zlib-static coreutils\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\n+COPY ./build/build-rust.sh /build-rust.sh\n+RUN /build-rust.sh\nARG OCTEZ_VERSION\nCOPY ./build/build-tezos.sh /build-tezos.sh\nRUN /build-tezos.sh ${OCTEZ_VERSION}\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile.aarch64",
"new_path": "docker/build/Dockerfile.aarch64",
"diff": "@@ -14,6 +14,8 @@ RUN apk --no-cache --virtual add rsync git m4 build-base patch unzip \\\nautoconf automake libtool linux-headers cargo libffi-dev zlib-static coreutils\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\n+COPY ./build/build-rust.sh /build-rust.sh\n+RUN /build-rust.sh\nARG OCTEZ_VERSION\nCOPY ./build/build-tezos.sh /build-tezos.sh\nRUN /build-tezos.sh ${OCTEZ_VERSION}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/build/build-rust.sh",
"diff": "+#!/usr/bin/env bash\n+\n+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+set -euo pipefail\n+\n+wget https://sh.rustup.rs/rustup-init.sh\n+chmod +x rustup-init.sh\n+./rustup-init.sh --profile minimal --default-toolchain 1.60.0 -y\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Move rust install to another layer
Problem: Step with installing rust doesn't
seem to change with time and shared between all build.
Solution: Move it to another `RUN` call so that it would be
taken from cache. |
603,660 | 17.10.2022 11:54:54 | -10,800 | 790bcac938b25848ff41688b4a35820896e738ff | [Chore] Update documentation
Problem: Since `v15.0-rc1`, `jakarta` was deprecated and
binaries were renamed.
Solution: Update the docs accordingly. | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "[](https://buildkite.com/serokell/tezos-packaging)\n-This repo provides various forms of distribution for [Tezos](http://tezos.gitlab.io/) executables.\n+This repo provides various forms of distribution for [Tezos](http://tezos.gitlab.io/) executables based on the [Octez](https://gitlab.com/tezos/tezos) implementation.\nSee the [official documentation](http://tezos.gitlab.io/introduction/howtouse.html)\nfor information about the binaries, their usage, and concepts about the Tezos networks.\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -86,7 +86,7 @@ It is also possible to build single package. In order to do that run the followi\n# cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package <tezos-binary-name>\n# Example for baker\nexport OCTEZ_VERSION=\"v14.1\"\n-cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-007-PsDELPH1\n+cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-PtKathma\n```\nThe build can take some time due to the fact that we build tezos and its dependencies\n@@ -106,7 +106,7 @@ In order to build source packages run the following commands:\nexport OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type source\n# you can also build single source package\n-cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type source --package tezos-baker-007-PsDELPH1\n+cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type source --package tezos-baker-PtKathma\n```\nOnce the packages build is complete `../out` directory will contain files required\n@@ -117,7 +117,7 @@ There are 5 files for each package: `.orig.tar.gz`, `.debian.tar.xz`,\nYou can test source package building using [`pbuilder`](https://wiki.ubuntu.com/PbuilderHowto).\n-<!-- Updated: 2022/10/17 11:12:29 by dlaptov ### ########.fr -->\n+In order to push the packages to the Launchpad PPA `*.changes` files should should be updated with\nthe submitter info and signed.\nIn order to update `*.changes` files with the proper signer info run the following:\n@@ -195,7 +195,7 @@ It is also possible to build single package. In order to do that run the followi\n# cd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary --package <tezos-binary-name>\n# Example for baker\nexport OCTEZ_VERSION=\"v14.1\"\n-cd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-007-PsDELPH1\n+cd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-PtKathma\n```\nThe build can take some time due to the fact that we build tezos and its dependencies\n@@ -215,7 +215,7 @@ In order to build source packages run the following commands:\nexport OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.sh --os fedora --type source\n# you can also build single source package\n-cd .. && ./docker/docker-tezos-packages.sh --os fedora --type source --package tezos-baker-007-PsDELPH1\n+cd .. && ./docker/docker-tezos-packages.sh --os fedora --type source --package tezos-baker-PtKathma\n```\nSign source packages:\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -30,8 +30,8 @@ that you can use by following the [installation instructions](https://www.raspbe\nIn order to run a baking instance, you'll need the following Tezos binaries:\n`tezos-client`, `tezos-node`, `tezos-baker-<proto>`.\n-The currently supported protocol is `013-PtJakart` (used on `jakartanet`, `ghostnet` and `mainnet`)\n-and `014-PtKathma` (used on `kathmandunet`).\n+The currently supported protocol is `PtKathma` (used on `kathmandunet`, `ghostnet` and `mainnet`)\n+and `PtLimaPt` (used on `limanet`).\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@@ -157,7 +157,7 @@ key that will be used for baking and endorsing.\n### Setting the Liquidity Baking toggle vote option\n-Since `013-PtJakart`, the `--liquidity-baking-toggle-vote` command line option for\n+Since `PtJakart`, the `--liquidity-baking-toggle-vote` command line option for\n`tezos-baker` is now mandatory. In our systemd services, it is set to `pass` by\ndefault. You can change it as desired in the service config file at\n`/etc/defaults/tezos-baking-<network>`.\n@@ -288,7 +288,7 @@ or official testnets, you can do so:\n4. Check that all parts are indeed running:\n```bash\nsystemctl status tezos-node-custom@<chain-name>\n- systemctl status tezos-baker-013-ptjakart@custom@<chain-name>.service\n+ systemctl status tezos-baker-ptkathma@custom@<chain-name>.service\n```\nIf at any point after that you want to reset the custom baking service, you can set\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/systemd.md",
"new_path": "docs/systemd.md",
"diff": "@@ -48,7 +48,7 @@ Then you can use the script, specifying the binary name as an argument, e.g.:\n```\n./gen_systemd_service_file.py tezos-node\n# or\n-./gen_systemd_service_file.py tezos-baker-013-PtJakart\n+./gen_systemd_service_file.py tezos-baker-PtKathma\n```\nAfter that you'll have `.service` files in the current directory.\n@@ -70,8 +70,12 @@ It's possible to run multiple similar services, e.g. two `tezos-node`s that run\nnetworks.\n`tezos-node` packages provide multiple services out of the box:\n-`tezos-node-jakartanet`, and `tezos-node-mainnet` that run\n-`jakartanet` and `mainnet` networks respectively.\n+- `tezos-node-kathmandunet`\n+- `tezos-node-limanet`\n+- `tezos-node-ghostnet`\n+- `tezos-node-mainnet`\n+\n+which run on the respective networks.\nIn order to start it run:\n```\n@@ -84,7 +88,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-jakartanet`), it's possible to run `tezos-node-custom`\n+(e.g. `tezos-node-mainnet` or `tezos-node-kathmandunet`), 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": "docs/tx_rollup.md",
"new_path": "docs/tx_rollup.md",
"diff": "# Setting up transaction rollup node on Ubuntu\n-`proto` variable can hold every active protocol, currently `013-PtJakart` and `014-PtKathma`.\n+`proto` variable can hold every active protocol, currently `PtKatham` and `PtLimaPt`.\nBy default, `tezos-tx-rollup-node-$proto.service` will use:\n* `/var/lib/tezos/.tezos-client` as the `tezos-client` data directory, set in `DATA_DIR`\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/voting.md",
"new_path": "docs/voting.md",
"diff": "@@ -49,5 +49,5 @@ tezos-voting-wizard --network voting\n`tezos-voting-wizard` also supports voting on currently running testnets, for example:\n```bash\n-tezos-voting-wizard --network jakartanet\n+tezos-voting-wizard --network kathmandunet\n```\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Update documentation
Problem: Since `v15.0-rc1`, `jakarta` was deprecated and
binaries were renamed.
Solution: Update the docs accordingly. |
603,650 | 18.10.2022 22:30:09 | -7,200 | f8d0cbcd8b6c0937c755faab0ff8d77824938fe2 | [Chore] Remove jakarta baker from test build and docs
Problem: test builds in CI try to build the jakarta baker
for a quick binary package building test, but that baker no
longer exist.
Additionally, some instructions in docs mention it too.
Solution: Remove jakarta baker from binary package tests builds
and from documentation. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -117,7 +117,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-013-PtJakart\n+ - ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-PtKathma\n- rm -rf out\n# It takes much time to build binary package, so we do it only on master\nbranches: \"master\"\n@@ -141,7 +141,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-013-PtJakart\n+ - ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-PtKathma\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": "MODIFY",
"old_path": "docs/distros/fedora.md",
"new_path": "docs/distros/fedora.md",
"diff": "@@ -11,11 +11,11 @@ E.g. in order to install `tezos-client` or `tezos-baker` run the following comma\n# use dnf\nsudo dnf copr enable @Serokell/Tezos\nsudo dnf install tezos-client\n-sudo dnf install tezos-baker-013-PtJakart\n+sudo dnf install tezos-baker-PtKathma\n# or use yum\nsudo yum copr enable @Serokell/Tezos\n-sudo yum install tezos-baker-013-PtJakart\n+sudo yum install tezos-baker-PtKathma\n```\nOnce you install such packages the commands `tezos-*` will be available.\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Remove jakarta baker from test build and docs
Problem: test builds in CI try to build the jakarta baker
for a quick binary package building test, but that baker no
longer exist.
Additionally, some instructions in docs mention it too.
Solution: Remove jakarta baker from binary package tests builds
and from documentation. |
603,650 | 19.10.2022 01:07:06 | -7,200 | 73a60982e94518ccfcc88af6d5a1d4bb8d97fe8e | [Chore] Fixup fedora binary packaging
Problem: docker packaging of binary in fedora is broken
because of outdated uses of the package name instead of
the (new) binaries name.
Solution: fixup fedora binary packaging by using the
binaries name where needed in the process. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -286,6 +286,7 @@ Description: {self.desc}\nf.write(file_contents)\ndef gen_spec_file(self, build_deps, run_deps, out):\n+ binary_name = self.name.replace(\"tezos\", \"octez\")\nbuild_requires = \" \".join(build_deps)\nrequires = \" \".join(run_deps)\nstr_additional_native_deps = \", \".join(\n@@ -319,13 +320,13 @@ Maintainer: {self.meta.maintainer}\n%setup -q\n%build\n%install\n-make %{{name}}\n+make {binary_name}\nmkdir -p %{{buildroot}}/%{{_bindir}}\n-install -m 0755 %{{name}} %{{buildroot}}/%{{_bindir}}\n+install -m 0755 {binary_name} %{{buildroot}}/%{{_bindir}}\n{systemd_install}\n%files\n%license LICENSE\n-%{{_bindir}}/%{{name}}\n+%{{_bindir}}/{binary_name}\n{systemd_files}\n{systemd_macros}\n\"\"\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fixup fedora binary packaging
Problem: docker packaging of binary in fedora is broken
because of outdated uses of the package name instead of
the (new) binaries name.
Solution: fixup fedora binary packaging by using the
binaries name where needed in the process. |
603,660 | 19.10.2022 17:11:01 | -10,800 | 073215ab0842e2cc32ed4eecbb72119bd51359e4 | [Chore] Symlink new and legacy names on fedora
Problem: Fedora packages lack `tezos`-based executables.
Solution: Symlink `octez`-based binaries with `tezos` ones. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -323,10 +323,12 @@ Maintainer: {self.meta.maintainer}\nmake {binary_name}\nmkdir -p %{{buildroot}}/%{{_bindir}}\ninstall -m 0755 {binary_name} %{{buildroot}}/%{{_bindir}}\n+ln -s %{{_bindir}}/{binary_name} %{{buildroot}}/%{{_bindir}}/{self.name}\n{systemd_install}\n%files\n%license LICENSE\n%{{_bindir}}/{binary_name}\n+%{{_bindir}}/{self.name}\n{systemd_files}\n{systemd_macros}\n\"\"\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Symlink new and legacy names on fedora
Problem: Fedora packages lack `tezos`-based executables.
Solution: Symlink `octez`-based binaries with `tezos` ones. |
603,660 | 20.10.2022 10:41:56 | -10,800 | 1780bd852eba5cc833f9d281e15461d018de6cab | [Chore] Tweak symlinking during installation
Problem: Packages may fail to upgrade, since
`ln` refuses to work in presence of file in place of symlink.
Solution: Add `--force` option to `ln`. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -323,7 +323,7 @@ Maintainer: {self.meta.maintainer}\nmake {binary_name}\nmkdir -p %{{buildroot}}/%{{_bindir}}\ninstall -m 0755 {binary_name} %{{buildroot}}/%{{_bindir}}\n-ln -s %{{_bindir}}/{binary_name} %{{buildroot}}/%{{_bindir}}/{self.name}\n+ln -sf %{{_bindir}}/{binary_name} %{{buildroot}}/%{{_bindir}}/{self.name}\n{systemd_install}\n%files\n%license LICENSE\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -226,7 +226,7 @@ cat > /usr/bin/octez-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)\" octez-node \"$@\"\nEOM\nchmod +x /usr/bin/octez-node-{network}\n-ln -s /usr/bin/octez-node-{network} /usr/bin/tezos-node-{network}\n+ln -sf /usr/bin/octez-node-{network} /usr/bin/tezos-node-{network}\n\"\"\"\nnode_postrm_steps += f\"\"\"\nrm -f /usr/bin/octez-node-{network} /usr/bin/tezos-node-{network}\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Tweak symlinking during installation
Problem: Packages may fail to upgrade, since
`ln` refuses to work in presence of file in place of symlink.
Solution: Add `--force` option to `ln`. |
603,660 | 24.10.2022 12:23:55 | -10,800 | f58e6de7c0f2a150bd8d83643d12f94039e71245 | Provide tezos packages for nix
Problem: After rename, tezos-based packages are
no longer available. However, they still heavily
used in nix infrastructure, as well as legacy binary
names.
Solution: Provide tezos packages as well as octez packages and
provide symlinks with legacy names for the former one. | [
{
"change_type": "MODIFY",
"old_path": "flake.nix",
"new_path": "flake.nix",
"diff": "callPackage = pkg: input:\nimport pkg (inputs // { inherit sources protocols meta pkgs; } // input);\n- binaries = callPackage ./nix {};\n+ inherit (callPackage ./nix {}) octez-binaries tezos-binaries;\nrelease = callPackage ./release.nix {};\ninherit release;\n- packages = binaries // { default = self.packages.${system}.binaries; };\n+ packages = octez-binaries // tezos-binaries\n+ // { default = pkgs.linkFarmFromDrvs \"binaries\" (builtins.attrValues octez-binaries); };\ndevShells = {\nbuildkite = callPackage ./.buildkite/shell.nix {};\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/default.nix",
"new_path": "nix/default.nix",
"diff": "let\nsource = sources.tezos;\nrelease-binaries = import ./build/release-binaries.nix protocols;\n- binaries = builtins.listToAttrs (map (meta: {\n+in {\n+ octez-binaries = builtins.listToAttrs (map (meta: {\ninherit (meta) name;\nvalue = pkgs.octezPackages.${meta.name} // { inherit meta; };\n}) release-binaries);\n- # Bundle the contents of a package set together, leaving the original attrs intact\n- bundle = name: pkgSet:\n- pkgSet // (pkgs.buildEnv {\n- inherit name;\n- paths = builtins.attrValues pkgSet;\n- });\n-\n- artifacts = { inherit binaries; };\n- bundled = (builtins.mapAttrs bundle artifacts);\n-\n-in (d: with builtins;\n- listToAttrs (map (drv:\n- { name = drv; value = d.${drv}; }\n- ) (filter (name: substring 0 5 name == \"octez\") (attrNames d)))\n- ) bundled.binaries // { inherit (bundled) binaries; }\n+ tezos-binaries = builtins.listToAttrs (map (meta:\n+ let\n+ newMeta = meta // { name = builtins.replaceStrings [ \"octez\" ] [ \"tezos\" ] meta.name; };\n+ in {\n+ inherit (newMeta) name;\n+ value = { inherit newMeta; } // (pkgs.octezPackages.${meta.name}.overrideAttrs (pkg: {\n+ inherit (newMeta) name;\n+ postInstall = ''\n+ ln -s $out/bin/${meta.name} $out/bin/${newMeta.name}\n+ '';\n+ }));\n+ }) release-binaries);\n+}\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#544] Provide tezos packages for nix
Problem: After rename, tezos-based packages are
no longer available. However, they still heavily
used in nix infrastructure, as well as legacy binary
names.
Solution: Provide tezos packages as well as octez packages and
provide symlinks with legacy names for the former one. |
603,660 | 24.10.2022 12:25:50 | -10,800 | b1915d8a755ec505f34e82ea0c018ddc9c513e56 | [Chore] Minor fixes for nix files
Problem:
* There is better solution for providing attibutes for impure
evaluation.
* Devshell lacks `gh` utility.
Solution: Provide it. | [
{
"change_type": "MODIFY",
"old_path": "default.nix",
"new_path": "default.nix",
"diff": "@@ -11,7 +11,5 @@ let\n}\n) { src = ./.; })\ndefaultNix;\n-in defaultNix // defaultNix.devShells.${__currentSystem}\n- // { binaries-test = defaultNix.binaries-test.${__currentSystem};\n- release = defaultNix.release.${__currentSystem};\n- }\n+ pkgs = defaultNix.legacyPackages.${__currentSystem};\n+in with pkgs.lib; recursiveUpdate defaultNix (attrsets.mapAttrs (_: val: val.${__currentSystem}) defaultNix)\n"
},
{
"change_type": "MODIFY",
"old_path": "shell.nix",
"new_path": "shell.nix",
"diff": "@@ -7,6 +7,7 @@ with pkgs; mkShell {\npython3Packages.black\nshellcheck\njq\n+ gh\nbuildkite-agent\n];\nOCTEZ_VERSION= with pkgs.lib; lists.last (strings.splitString \"/\" (meta.tezos_ref));\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Minor fixes for nix files
Problem:
* There is better solution for providing attibutes for impure
evaluation.
* Devshell lacks `gh` utility.
Solution: Provide it. |
603,660 | 27.10.2022 10:28:40 | -10,800 | d471402e2b2aa5532258e7cd942f2a338a265138 | Update documentation
Problem: Fedora 34 has reached its EOL so,
per our support policy we no longer need to support it.
OTOH Fedora 36 is now a stable release so, following the same policy,
we should instead support it.
Solution: Support Fedora 36 and deprecate Fedora 34. | [
{
"change_type": "MODIFY",
"old_path": "docs/support-policy.md",
"new_path": "docs/support-policy.md",
"diff": "@@ -38,8 +38,8 @@ There are packages for `arm64` and `amd64` architectures.\nWe aim to provide packages for all [currently supported Fedora releases](https://docs.fedoraproject.org/en-US/releases/).\nCurrently, these are versions:\n-* Fedora 34\n* Fedora 35\n+* Fedora 36\nThere are packages for `x86_64` and `aarch64` architectures.\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#534] Update documentation
Problem: Fedora 34 has reached its EOL so,
per our support policy we no longer need to support it.
OTOH Fedora 36 is now a stable release so, following the same policy,
we should instead support it.
Solution: Support Fedora 36 and deprecate Fedora 34. |
603,660 | 27.10.2022 15:52:03 | -10,800 | fcf1cb80de40228c21e4e8da530a0d95831e32b8 | Add gcc compilation flag
Problem: Compilation of `bls12-381` fails
on Fedora 36 due to missing `-fPIC` flag.
Solution: Add it. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/build-binary.sh",
"new_path": "docker/package/scripts/build-binary.sh",
"diff": "@@ -19,6 +19,7 @@ opams=()\nwhile IFS= read -r -d $'\\0'; do\nopams+=(\"$REPLY\")\ndone < <(find ./vendors ./src ./tezt ./opam -name \\*.opam -print0)\n+export CFLAGS=\"-fPIC ${CFLAGS:-}\"\nopam install \"${opams[@]}\" --deps-only --criteria=\"-notuptodate,-changed,-removed\"\neval \"$(opam env)\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#534] Add gcc compilation flag
Problem: Compilation of `bls12-381` fails
on Fedora 36 due to missing `-fPIC` flag.
Solution: Add it. |
603,660 | 27.10.2022 17:34:35 | -10,800 | ee538b598faf8044537e7e8a0e6dea7849ac9ef7 | [Chore] Use relevant fedora image for build
Problem: Lowest supported fedora version is 35, however
we use 32 image.
Solution: Use 35 image and add some build deps. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-fedora",
"new_path": "docker/package/Dockerfile-fedora",
"diff": "# SPDX-FileCopyrightText: 2021 Oxhead Alpha\n# SPDX-License-Identifier: LicenseRef-MIT-OA\n-FROM fedora:32\n+FROM fedora:35\nRUN dnf update -y\nRUN dnf install -y libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel m4 perl git pkg-config \\\n- rpmdevtools python3-devel python3-setuptools wget opam rsync which cargo autoconf\n+ rpmdevtools python3-devel python3-setuptools wget opam rsync which cargo autoconf systemd systemd-rpm-macros\nENV USER dockerbuilder\nRUN useradd dockerbuilder && mkdir /tezos-packaging\nENV HOME /tezos-packaging\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Use relevant fedora image for build
Problem: Lowest supported fedora version is 35, however
we use 32 image.
Solution: Use 35 image and add some build deps. |
603,660 | 27.10.2022 18:56:00 | -10,800 | 8234a6243310a24968bd933bc66ed86c9dce23fc | [Chore] Hotfix dev shells use
Problem: It was decided to substitube current system
attribute for impure builds generically, rather than pick
specific ones. But shebangs were not updated.
Solution: To be consistent, remove shebangs and
run script in `niv develop` environment. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-for-tags.yml",
"new_path": ".buildkite/pipeline-for-tags.yml",
"diff": "@@ -31,7 +31,7 @@ steps:\ncommands:\n- eval \"$SET_VERSION\"\n- buildkite-agent artifact download \"out/*\" . --step build-source-packages\n- - ./scripts/publish-native-packages.sh out\n+ - nix develop .#autorelease -c ./scripts/publish-native-packages.sh out\n- label: Build Big Sur x86_64 bottles\nkey: build-bottles-big-sur-x86_64\n"
},
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -169,7 +169,7 @@ steps:\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 \"$BUILDKITE_MESSAGE\"\n+ - nix develop .#autorelease -c ./scripts/autorelease.sh \"$BUILDKITE_MESSAGE\"\nbranches: master\ndepends_on:\n- \"build-via-docker\"\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/autorelease.sh",
"new_path": "scripts/autorelease.sh",
"diff": "-#!/usr/bin/env nix-shell\n-#!nix-shell .. -A autorelease -i bash\n+#!/usr/bin/env bash\n# shellcheck shell=bash\n# SPDX-FileCopyrightText: 2021 Oxhead Alpha\n# SPDX-License-Identifier: LicenseRef-MIT-OA\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/publish-native-packages.sh",
"new_path": "scripts/publish-native-packages.sh",
"diff": "-#! /usr/bin/env nix-shell\n-#! nix-shell .. -A autorelease -i bash\n+#! /usr/bin/env bash\n# SPDX-FileCopyrightText: 2021 Oxhead Alpha\n# SPDX-License-Identifier: LicenseRef-MIT-OA\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/update-tezos.sh",
"new_path": "scripts/update-tezos.sh",
"diff": "-#! /usr/bin/env nix-shell\n-#! nix-shell .. -A autorelease -i bash\n+#!/usr/bin/env bash\n# SPDX-FileCopyrightText: 2021 Oxhead Alpha\n# SPDX-License-Identifier: LicenseRef-MIT-OA\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Hotfix dev shells use
Problem: It was decided to substitube current system
attribute for impure builds generically, rather than pick
specific ones. But shebangs were not updated.
Solution: To be consistent, remove shebangs and
run script in `niv develop` environment. |
603,660 | 28.10.2022 15:41:40 | -10,800 | f8cfab822a3a0df4cc7be646d97f22ed382713bf | Fix baking services names
Problem: `Requires` field in systemd services
configuration files were awaited lowercased
services names. However, on fedora, they were
installed with original casing, which
cause an error in the end of the baking setup
procedure.
Solution: Lowercase systemd services names for both fedora and ubuntu. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/fedora.py",
"new_path": "docker/package/fedora.py",
"diff": "@@ -24,10 +24,16 @@ def build_fedora_package(\npkg.gen_buildfile(\"/\".join([dir, pkg.buildfile]), binaries_dir)\npkg.gen_license(f\"{dir}/LICENSE\")\nfor systemd_unit in pkg.systemd_units:\n+ # lowercase package name for consistency between different os\n+ name_lower = pkg.name.lower()\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+ )\nif systemd_unit.suffix is None:\n- unit_name = pkg.name\n+ unit_name = name_lower\nelse:\n- unit_name = f\"{pkg.name}-{systemd_unit.suffix}\"\n+ unit_name = f\"{name_lower}-{systemd_unit.suffix}\"\nout_path = (\nf\"{dir}/{unit_name}@.service\"\nif systemd_unit.instances is not None\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -99,9 +99,9 @@ def gen_spec_systemd_part(package):\ndefault_files = \"\"\nfor systemd_unit in package.systemd_units:\nif systemd_unit.suffix is None:\n- service_name = \"%{name}\"\n+ service_name = f\"{package.name.lower()}\"\nelse:\n- service_name = f\"%{{name}}-{systemd_unit.suffix}\"\n+ service_name = f\"{package.name.lower()}-{systemd_unit.suffix}\"\nif systemd_unit.instances is not None:\nservice_name = f\"{service_name}@\"\ninstall_unit_files += (\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#550] Fix baking services names
Problem: `Requires` field in systemd services
configuration files were awaited lowercased
services names. However, on fedora, they were
installed with original casing, which
cause an error in the end of the baking setup
procedure.
Solution: Lowercase systemd services names for both fedora and ubuntu. |
603,660 | 02.11.2022 16:12:07 | -10,800 | 65ea4b146d80fb319ca536e1225a132d9e35f312 | Add `tezos-node` as dep for `tezos-baking`
Problem: `tezos-baking` does not depends on `tezos-node`,
thus does not install it, resulting in error during setup.
Solution: Add `tezos-node` as native dep for `tezos-baking`. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -557,10 +557,12 @@ class TezosBakingServicesPackage(AbstractPackage):\ntarget_networks: List[str],\nnetwork_protos: Dict[str, List[str]],\nmeta: PackagesMeta,\n+ additional_native_deps: List[str],\n):\nself.name = \"tezos-baking\"\nself.desc = \"Package that provides systemd services that orchestrate other services from Tezos packages\"\nself.meta = deepcopy(meta)\n+ self.additional_native_deps = additional_native_deps\nself.meta.version = self.meta.version + self.letter_version\nself.target_protos = set()\nself.patches = []\n@@ -610,9 +612,7 @@ class TezosBakingServicesPackage(AbstractPackage):\nshutil.copy(f\"{os.path.dirname(__file__)}/tezos_voting_wizard.py\", package_dir)\ndef gen_control_file(self, deps, ubuntu_version, out):\n- run_deps_list = [\"acl\"]\n- for proto in self.target_protos:\n- run_deps_list.append(f\"tezos-baker-{proto.lower()}\")\n+ run_deps_list = map(lambda x: x.lower(), self.additional_native_deps)\nrun_deps = \", \".join(run_deps_list)\nfile_contents = f\"\"\"\nSource: {self.name}\n@@ -633,9 +633,7 @@ Description: {self.desc}\nf.write(file_contents)\ndef gen_spec_file(self, build_deps, run_deps, out):\n- run_deps = \", \".join(\n- [\"acl\"] + [f\"tezos-baker-{proto}\" for proto in self.target_protos],\n- )\n+ run_deps = \", \".join(self.additional_native_deps)\n(\nsystemd_deps,\nsystemd_install,\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -431,6 +431,8 @@ packages.append(\ntarget_networks=networks.keys(),\nnetwork_protos=networks_protos,\nmeta=packages_meta,\n+ additional_native_deps=[f\"tezos-baker-{proto}\" for proto in active_protocols]\n+ + [\"tezos-node\", \"acl\"],\n)\n)\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#557] Add `tezos-node` as dep for `tezos-baking`
Problem: `tezos-baking` does not depends on `tezos-node`,
thus does not install it, resulting in error during setup.
Solution: Add `tezos-node` as native dep for `tezos-baking`. |
603,660 | 02.11.2022 19:52:01 | -10,800 | 75fb1239ff5e04b06319077cc709ca5f043aaac6 | Bump release version
Problem: `tezos-baking` was updated and there is
need for new release.
Solution: Increment release version and add letter version. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -514,7 +514,7 @@ class TezosBakingServicesPackage(AbstractPackage):\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 = \"\"\n+ letter_version = \"a\"\nbuildfile = \"setup.py\"\n"
},
{
"change_type": "MODIFY",
"old_path": "meta.json",
"new_path": "meta.json",
"diff": "{\n- \"release\": \"2\",\n+ \"release\": \"3\",\n\"maintainer\": \"Serokell <hi@serokell.io>\",\n\"tezos_ref\": \"v15.0-rc1\"\n}\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#557] Bump release version
Problem: `tezos-baking` was updated and there is
need for new release.
Solution: Increment release version and add letter version. |
603,650 | 28.10.2022 00:31:06 | -7,200 | dd3b93ea3b66867c806116e0e420a99fd7c9e803 | Support multiple environment files in systemd unit
Problem: in our docker python scripts we only support defining
one environment file per systemd unit, however the latter allow
for multiple definitions which would be a useful feature to have.
Solution: modify the python scripts to support multiple environment
files definitions in systemd units. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/fedora.py",
"new_path": "docker/package/fedora.py",
"diff": "@@ -26,10 +26,10 @@ def build_fedora_package(\nfor systemd_unit in pkg.systemd_units:\n# lowercase package name for consistency between different os\nname_lower = pkg.name.lower()\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.service_file.service.environment_files is not None:\n+ systemd_unit.service_file.service.environment_files = [\n+ x.lower() for x in systemd_unit.service_file.service.environment_files\n+ ]\nif systemd_unit.suffix is None:\nunit_name = name_lower\nelse:\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -96,6 +96,10 @@ def gen_spec_systemd_part(package):\ninstall_default = f\"mkdir -p %{{buildroot}}/%{{_sysconfdir}}/default\\n\"\nelse:\ninstall_default = \"\"\n+ # Note: this covers all environment files too because there are either:\n+ # 1. the default files of a systemd unit in this package\n+ # 2. the default files of a systemd unit in another package\n+ # 3. files that we don't create during installation (e.g. for instantiated services)\ndefault_files = \"\"\nfor systemd_unit in package.systemd_units:\nif systemd_unit.suffix is None:\n@@ -519,7 +523,7 @@ class TezosBakingServicesPackage(AbstractPackage):\nbuildfile = \"setup.py\"\ndef __gen_baking_systemd_unit(\n- self, requires, description, environment_file, config_file, suffix\n+ self, requires, description, environment_files, config_file, suffix\n):\nreturn SystemdUnit(\nservice_file=ServiceFile(\n@@ -532,7 +536,7 @@ class TezosBakingServicesPackage(AbstractPackage):\nexec_start=\"/usr/bin/tezos-baking-start\",\nuser=\"tezos\",\nstate_directory=\"tezos\",\n- environment_file=environment_file,\n+ environment_files=environment_files,\nexec_start_pre=[\n\"+/usr/bin/setfacl -m u:tezos:rwx /run/systemd/ask-password\",\n\"/usr/bin/tezos-baking-prestart\",\n@@ -578,7 +582,7 @@ class TezosBakingServicesPackage(AbstractPackage):\nself.__gen_baking_systemd_unit(\nrequires,\nf\"Tezos baking instance for {network}\",\n- f\"/etc/default/tezos-baking-{network}\",\n+ [f\"/etc/default/tezos-baking-{network}\"],\n\"tezos-baking.conf\",\nnetwork,\n)\n@@ -590,7 +594,7 @@ class TezosBakingServicesPackage(AbstractPackage):\ncustom_unit = self.__gen_baking_systemd_unit(\ncustom_requires,\nf\"Tezos baking instance for custom network\",\n- f\"/etc/default/tezos-baking-custom@%i\",\n+ [f\"/etc/default/tezos-baking-custom@%i\"],\n\"tezos-baking-custom.conf\",\n\"custom\",\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -40,7 +40,7 @@ signer_units = [\ndescription=\"Tezos signer daemon running over TCP socket\",\n),\nService(\n- environment_file=\"/etc/default/tezos-signer-tcp\",\n+ environment_files=[\"/etc/default/tezos-signer-tcp\"],\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@@ -60,7 +60,7 @@ signer_units = [\ndescription=\"Tezos signer daemon running over UNIX socket\",\n),\nService(\n- environment_file=\"/etc/default/tezos-signer-unix\",\n+ environment_files=[\"/etc/default/tezos-signer-unix\"],\nenvironment=[\"SOCKET=\"],\nexec_start=\"/usr/bin/tezos-signer-start launch local signer \"\n+ \"--socket ${SOCKET}\",\n@@ -80,7 +80,7 @@ signer_units = [\ndescription=\"Tezos signer daemon running over HTTP\",\n),\nService(\n- environment_file=\"/etc/default/tezos-signer-http\",\n+ environment_files=[\"/etc/default/tezos-signer-http\"],\nenvironment=[\n\"CERT_PATH=\",\n\"KEY_PATH=\",\n@@ -105,7 +105,7 @@ signer_units = [\ndescription=\"Tezos signer daemon running over HTTPs\",\n),\nService(\n- environment_file=\"/etc/default/tezos-signer-https\",\n+ environment_files=[\"/etc/default/tezos-signer-https\"],\nenvironment=[\n\"CERT_PATH=\",\n\"KEY_PATH=\",\n@@ -173,7 +173,7 @@ def mk_node_unit(\ndesc,\ninstantiated=False,\ndependencies_suffix=None,\n- environment_file=None,\n+ environment_files=None,\n):\ndependencies_suffix = suffix if dependencies_suffix is None else dependencies_suffix\nservice_file = ServiceFile(\n@@ -185,7 +185,7 @@ def mk_node_unit(\n),\nService(\nenvironment=env,\n- environment_file=environment_file,\n+ environment_files=environment_files,\nexec_start=\"/usr/bin/tezos-node-start\",\nexec_start_pre=[\"/usr/bin/tezos-node-prestart\"],\ntimeout_start_sec=\"2400s\",\n@@ -248,7 +248,7 @@ node_units.append(\nmk_node_unit(\nsuffix=\"custom\",\nenv=[\"NODE_DATA_DIR=/var/lib/tezos/node-custom@%i\"] + common_node_env,\n- environment_file=\"/etc/default/tezos-baking-custom@%i\",\n+ environment_files=[\"/etc/default/tezos-baking-custom@%i\"],\ndesc=\"Tezos node with custom config\",\ninstantiated=True,\ndependencies_suffix=\"custom@%i\",\n@@ -297,7 +297,7 @@ for proto in active_protocols:\nservice_file_baker = ServiceFile(\nUnit(after=[\"network.target\"], description=\"Tezos baker\"),\nService(\n- environment_file=f\"/etc/default/tezos-baker-{proto}\",\n+ environment_files=[f\"/etc/default/tezos-baker-{proto}\"],\nenvironment=[f\"PROTOCOL={proto}\", \"NODE_DATA_DIR=\"],\nexec_start_pre=[\n\"+/usr/bin/setfacl -m u:tezos:rwx /run/systemd/ask-password\"\n@@ -323,7 +323,7 @@ for proto in active_protocols:\ndescription=\"Instantiated tezos baker daemon service\",\n),\nService(\n- environment_file=\"/etc/default/tezos-baking-%i\",\n+ environment_files=[\"/etc/default/tezos-baking-%i\"],\nenvironment=[f\"PROTOCOL={proto}\", \"NODE_DATA_DIR=/var/lib/tezos/node-%i\"],\nexec_start=baker_startup_script,\nstate_directory=\"tezos\",\n@@ -337,7 +337,7 @@ for proto in active_protocols:\nservice_file_accuser = ServiceFile(\nUnit(after=[\"network.target\"], description=\"Tezos accuser\"),\nService(\n- environment_file=f\"/etc/default/tezos-accuser-{proto}\",\n+ environment_files=[f\"/etc/default/tezos-accuser-{proto}\"],\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=accuser_startup_script,\nstate_directory=\"tezos\",\n@@ -357,7 +357,7 @@ for proto in active_protocols:\ndescription=\"Instantiated tezos accuser daemon service\",\n),\nService(\n- environment_file=\"/etc/default/tezos-baking-%i\",\n+ environment_files=[\"/etc/default/tezos-baking-%i\"],\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start=accuser_startup_script,\nstate_directory=\"tezos\",\n@@ -443,7 +443,7 @@ def mk_rollup_packages():\nservice_file = ServiceFile(\nUnit(after=[\"network.target\"], description=f\"Tezos {type} rollup node\"),\nService(\n- environment_file=f\"/etc/default/tezos-{type}-rollup-node-{proto}\",\n+ environment_files=[f\"/etc/default/tezos-{type}-rollup-node-{proto}\"],\nenvironment=[f\"PROTOCOL={proto}\"],\nexec_start_pre=[\n\"+/usr/bin/setfacl -m u:tezos:rwx /run/systemd/ask-password\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/systemd.py",
"new_path": "docker/package/systemd.py",
"diff": "@@ -13,7 +13,7 @@ class Service:\nexec_start_post: List[str] = None\nexec_stop_post: List[str] = None\ntimeout_start_sec: str = None\n- environment_file: str = None\n+ environment_files: List[str] = None\nenvironment: List[str] = None\nremain_after_exit: bool = False\ntype_: str = None\n@@ -57,7 +57,7 @@ class SystemdUnit:\ndef print_service_file(service_file: ServiceFile, out):\n- after = requires = part_of = environment = environment_file = wanted_by = \"\"\n+ after = requires = part_of = environment = environment_files = wanted_by = \"\"\nexec_start_pres = exec_start_posts = exec_stop_posts = \"\"\nif service_file.unit.after is not None:\nafter = \"\".join(f\"After={x}\\n\" for x in service_file.unit.after)\n@@ -69,8 +69,10 @@ def print_service_file(service_file: ServiceFile, out):\nenvironment = \"\".join(\nf'Environment=\"{x}\"\\n' for x in service_file.service.environment\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.service.environment_files is not None:\n+ environment_files = \"\\n\".join(\n+ f\"EnvironmentFile={x}\" for x in service_file.service.environment_files\n+ )\nif service_file.install.wanted_by is not None:\nwanted_by = \"\".join(f\"WantedBy={x}\\n\" for x in service_file.install.wanted_by)\nif service_file.service.exec_start_pre is not None:\n@@ -91,7 +93,7 @@ def print_service_file(service_file: ServiceFile, out):\n[Unit]\n{after}{requires}{part_of}Description={service_file.unit.description}\n[Service]\n-{environment_file}\n+{environment_files}\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"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -37,10 +37,11 @@ def build_ubuntu_package(\nsubprocess.run([\"rm\", \"-r\", \"debian\"])\nsubprocess.run([\"dh_make\", \"-syf\" f\"../{dir}.tar.gz\"], check=True)\nfor 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.service_file.service.environment_files is not None:\n+ systemd_unit.service_file.service.environment_files = [\n+ x.lower()\n+ for x in systemd_unit.service_file.service.environment_files\n+ ]\nif systemd_unit.suffix is None:\nunit_name = pkg_name\nelse:\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#517] Support multiple environment files in systemd unit
Problem: in our docker python scripts we only support defining
one environment file per systemd unit, however the latter allow
for multiple definitions which would be a useful feature to have.
Solution: modify the python scripts to support multiple environment
files definitions in systemd units. |
603,650 | 04.11.2022 12:15:19 | -3,600 | b958e53045f4434847c5b988eeb518c8f027fd85 | Support config appends to default files
Problem: it would be useful to append entries to
default configuration files for systemd services, in
order to avoid repetition for small differences.
Solution: Support config append definitions to add
some entries to the file with defaults. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/fedora.py",
"new_path": "docker/package/fedora.py",
"diff": "@@ -44,10 +44,12 @@ def build_fedora_package(\ndefault_name = (\nunit_name if systemd_unit.instances is None else f\"{unit_name}@\"\n)\n- shutil.copy(\n- f\"{cwd}/defaults/{systemd_unit.config_file}\",\n- f\"{dir}/{default_name}.default\",\n- )\n+ default_path = f\"{dir}/{default_name}.default\"\n+ shutil.copy(f\"{cwd}/defaults/{systemd_unit.config_file}\", default_path)\n+ if systemd_unit.config_file_append is not None:\n+ with open(default_path, \"a\") as def_file:\n+ def_file.write(\"\\n\".join(systemd_unit.config_file_append))\n+\nfor script, script_source in [\n(systemd_unit.startup_script, systemd_unit.startup_script_source),\n(systemd_unit.prestart_script, systemd_unit.prestart_script_source),\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/systemd.py",
"new_path": "docker/package/systemd.py",
"diff": "@@ -53,6 +53,7 @@ class SystemdUnit:\npoststop_script_source: str = None\nsuffix: str = None\nconfig_file: str = None\n+ config_file_append: List[str] = None\ninstances: List[str] = None\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -56,10 +56,12 @@ def build_ubuntu_package(\ndefault_name = (\nunit_name if systemd_unit.instances is None else f\"{unit_name}@\"\n)\n- shutil.copy(\n- f\"{cwd}/defaults/{systemd_unit.config_file}\",\n- f\"debian/{default_name}.default\",\n- )\n+ default_path = f\"debian/{default_name}.default\"\n+ shutil.copy(f\"{cwd}/defaults/{systemd_unit.config_file}\", default_path)\n+ if systemd_unit.config_file_append is not None:\n+ with open(default_path, \"a\") as def_file:\n+ def_file.write(\"\\n\".join(systemd_unit.config_file_append))\n+\nfor script, script_source in [\n(systemd_unit.startup_script, systemd_unit.startup_script_source),\n(systemd_unit.prestart_script, systemd_unit.prestart_script_source),\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#517] Support config appends to default files
Problem: it would be useful to append entries to
default configuration files for systemd services, in
order to avoid repetition for small differences.
Solution: Support config append definitions to add
some entries to the file with defaults. |
603,650 | 03.11.2022 23:30:18 | -3,600 | 9f678d711950fa0d1ad621c8aa7bd11efdda03c7 | [Chore] Fix mk_full_url when path is None | [
{
"change_type": "MODIFY",
"old_path": "docker/package/wizard_structure.py",
"new_path": "docker/package/wizard_structure.py",
"diff": "@@ -276,6 +276,9 @@ def yes_or_no(prompt, default=None):\ndef mk_full_url(host_name, path):\n+ if path is None:\n+ return host_name.rstrip(\"/\")\n+ else:\nreturn \"/\".join([host_name.rstrip(\"/\"), path.lstrip(\"/\")])\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fix mk_full_url when path is None |
603,650 | 04.11.2022 15:15:42 | -3,600 | 47e0f66ca816b0c0aef24a19892d427b7ce4331e | Use node_rpc_endpoint in wizard's code
Problem: there is now some confusion in the wizard's
code about node's RPC address vs its endpoint.
This is unnecessary as we only need the endpoint (so
with the scheme in it too).
Solution: Use node_rpc_endpoint in wizard's code
and remove node_rpc_addr from its config. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_setup_wizard.py",
"new_path": "docker/package/tezos_setup_wizard.py",
"diff": "@@ -362,9 +362,9 @@ class Setup(Setup):\nprint(\"Waiting for the node service to start...\")\nwhile True:\n- rpc_address = \"http://\" + self.config[\"node_rpc_addr\"]\n+ rpc_endpoint = self.config[\"node_rpc_endpoint\"]\ntry:\n- urllib.request.urlopen(rpc_address + \"/version\")\n+ urllib.request.urlopen(rpc_endpoint + \"/version\")\nbreak\nexcept urllib.error.URLError:\nproc_call(\"sleep 1\")\n@@ -388,7 +388,7 @@ class Setup(Setup):\nproc_call(\nf\"sudo -u tezos {suppress_warning_text} octez-client \"\n- f\"--endpoint {rpc_address} bootstrapped\"\n+ f\"--endpoint {rpc_endpoint} bootstrapped\"\n)\nprint()\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_voting_wizard.py",
"new_path": "docker/package/tezos_voting_wizard.py",
"diff": "@@ -126,7 +126,7 @@ ballot_outcome_query = Step(\n)\n-def get_node_rpc_addr_query(network, default=None):\n+def get_node_rpc_endpoint_query(network, default=None):\nurl_path = \"chains/main/blocks/head/header\"\nnode_is_alive = lambda host: url_is_reachable(mk_full_url(host, url_path))\ncustom_url_validator = reachable_url_validator(url_path)\n@@ -137,7 +137,7 @@ def get_node_rpc_addr_query(network, default=None):\nif network == \"mainnet\" and node_is_alive(url)\n}\nreturn Step(\n- id=\"node_rpc_addr\",\n+ id=\"node_rpc_endpoint\",\nprompt=\"Provide the node's RPC address.\"\nif not relevant_nodes\nelse \"Choose one of the public nodes or provide the node's RPC address.\",\n@@ -200,7 +200,7 @@ class Setup(Setup):\ndef check_data_correctness(self):\nprint(\"Baker data detected is as follows:\")\nprint(f\"Data directory: {self.config['client_data_dir']}\")\n- print(f\"Node RPC address: {self.config['node_rpc_addr']}\")\n+ print(f\"Node RPC endpoint: {self.config['node_rpc_endpoint']}\")\nprint(f\"Voter key: {self.config['baker_key_value']}\")\nreturn yes_or_no(\"Does this look correct? (Y/n) \", \"yes\")\n@@ -233,10 +233,12 @@ class Setup(Setup):\nself.config[\"client_data_dir\"] = network_dir\n- self.config[\"node_rpc_addr\"] = self.search_client_config(\"endpoint\", None)\n- if self.config[\"node_rpc_addr\"] is None:\n+ self.config[\"node_rpc_endpoint\"] = self.search_client_config(\n+ \"endpoint\", None\n+ )\n+ if self.config[\"node_rpc_endpoint\"] is None:\nself.query_and_update_config(\n- get_node_rpc_addr_query(self.config[\"network\"])\n+ get_node_rpc_endpoint_query(self.config[\"network\"])\n)\nkey_import_modes.pop(\"json\", None)\n@@ -247,8 +249,8 @@ class Setup(Setup):\nwhile not collected:\nself.query_and_update_config(\n- get_node_rpc_addr_query(\n- self.config[\"network\"], self.config[\"node_rpc_addr\"]\n+ get_node_rpc_endpoint_query(\n+ self.config[\"network\"], self.config[\"node_rpc_endpoint\"]\n)\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/wizard_structure.py",
"new_path": "docker/package/wizard_structure.py",
"diff": "@@ -612,7 +612,7 @@ class Setup:\ndef get_tezos_client_options(self):\noptions = (\nf\"--base-dir {self.config['client_data_dir']} \"\n- f\"--endpoint {self.config['node_rpc_addr']}\"\n+ f\"--endpoint {self.config['node_rpc_endpoint']}\"\n)\nif \"remote_host\" in self.config:\noptions += f\" -R '{self.config['remote_host']}'\"\n@@ -634,9 +634,9 @@ class Setup:\n\"TEZOS_CLIENT_DIR\",\n\"/var/lib/tezos/.tezos-client\",\n)\n- self.config[\"node_rpc_addr\"] = baking_env.get(\n+ self.config[\"node_rpc_endpoint\"] = \"http://\" + baking_env.get(\n\"NODE_RPC_ADDR\",\n- \"http://localhost:8732\",\n+ \"localhost:8732\",\n)\nself.config[\"baker_alias\"] = baking_env.get(\"BAKER_ADDRESS_ALIAS\", \"baker\")\n@@ -650,7 +650,7 @@ class Setup:\ndef get_current_head_level(self):\nresponse = urllib.request.urlopen(\n- self.config[\"node_rpc_addr\"] + \"/chains/main/blocks/head/header\"\n+ self.config[\"node_rpc_endpoint\"] + \"/chains/main/blocks/head/header\"\n)\nreturn str(json.load(response)[\"level\"])\n@@ -752,7 +752,7 @@ class Setup:\nself.query_step(\nget_ledger_derivation_query(\nledgers_derivations,\n- self.config[\"node_rpc_addr\"],\n+ self.config[\"node_rpc_endpoint\"],\n)\n)\nif self.config[\"ledger_derivation\"] == \"Go back\":\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#517] Use node_rpc_endpoint in wizard's code
Problem: there is now some confusion in the wizard's
code about node's RPC address vs its endpoint.
This is unnecessary as we only need the endpoint (so
with the scheme in it too).
Solution: Use node_rpc_endpoint in wizard's code
and remove node_rpc_addr from its config. |
603,650 | 06.11.2022 22:03:04 | -3,600 | d3d5aaf69b7e6eeaa7a60fcdade99b536ddcc152 | [Chore] Add custom node as a dependency to custom baking
Problem: the custom baking service should have the node as
a dependency, but it doesn't.
This seems an oversight that should be corrected.
Solution: add the custom node systemd service as a dependency
to the custom baking service definition. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -591,7 +591,7 @@ class TezosBakingServicesPackage(AbstractPackage):\nnetwork,\n)\n)\n- custom_requires = []\n+ custom_requires = [\"tezos-node-custom@%i.service\"]\nfor network in target_networks:\nfor proto in network_protos[network]:\ncustom_requires.append(f\"tezos-baker-{proto.lower()}@custom@%i.service\")\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add custom node as a dependency to custom baking
Problem: the custom baking service should have the node as
a dependency, but it doesn't.
This seems an oversight that should be corrected.
Solution: add the custom node systemd service as a dependency
to the custom baking service definition. |
603,650 | 07.11.2022 01:30:20 | -3,600 | 41a6ed4cd5541409e1b61e3e91d66be8cd6e2279 | Update service options documentation
Problem: finding and changing options of our
services is now easier and more stable, but
the documentation hasn't been updated.
Solution: update existing documentation and
add a dedicated document on systemd service
options. | [
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -126,9 +126,7 @@ 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.\nThe `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+running `tezos-node` with [the service options](./service-options.md).\nIn order to import the snapshot, run the following command:\n```\n@@ -159,14 +157,8 @@ key that will be used for baking and endorsing.\nSince `PtJakart`, the `--liquidity-baking-toggle-vote` command line option for\n`tezos-baker` is now mandatory. In our systemd services, it is set to `pass` by\n-default. You can change it as desired in the service config file at\n-`/etc/defaults/tezos-baking-<network>`.\n-\n-If the baking service is running already, changing this options requires a restart.\n-You can do so manually by running:\n-```bash\n-sudo systemctl restart tezos-baking-<network>.service\n-```\n+default.\n+You can change it as desired in [the service config file](./service-options.md).\nYou can also use the [Setup Wizard](#using-the-wizard) which will handle everything for you.\n@@ -248,27 +240,9 @@ sudo systemctl stop tezos-baking-<network>.service\n## Advanced baking instance setup\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-sudo vim /etc/default/tezos-baking-<network>\n-```\n-\n-In case you want to use a different `tezos-node` data directory, you\n-should instead edit the service configuration, using:\n-```\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+These services have several options that can be modified to change their behavior.\n+See [the dedicated documentation](./service-options.md) for more information on\n+how to do that.\n### Using a custom chain\n@@ -279,8 +253,8 @@ or official testnets, you can do so:\n```bash\nsudo cp /etc/default/tezos-baking-custom@ /etc/default/tezos-baking-custom@<chain-name>\n```\n-2. In `/etc/default/tezos-baking-custom@<chain-name>`, provide the path to your custom node\n- config in `CUSTOM_NODE_CONFIG`.\n+2. [Edit the `tezos-baking-custom@<chain-name>` configuration](./service-options.md)\n+ and set the `CUSTOM_NODE_CONFIG` variable to the path to your config file.\n3. Start custom baking service:\n```bash\nsudo systemctl start tezos-baking-custom@<chain-name>\n@@ -292,7 +266,7 @@ or official testnets, you can do so:\n```\nIf at any point after that you want to reset the custom baking service, you can set\n-`RESET_ON_STOP=true` in the `/etc/default/tezos-baking-custom@<chain-name>` config file and run:\n+`RESET_ON_STOP` to `true` [in the `tezos-baking-custom@<chain-name>` configuration](./service-options.md) and run:\n```bash\nsudo systemctl stop tezos-baking-custom@voting\n@@ -339,24 +313,12 @@ multipass shell tezos\n<em>Optional</em> Allow RPC access from virtual machine's host...\n</summary>\n-Update service configuration:\n-\n-```\n-sudo systemctl edit tezos-node-$tznet\n-```\n-\n-An editor will open with service override configuration file.\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+[Update the `tezos-node-<network>` service configuration](./service-options.md)\n+and set the `NODE_RPC_ADDR` to `0.0.0.0:8732`.\n+Then restart the service:\n```\n-sudo systemctl restart tezos-node-$tznet\n+sudo systemctl restart tezos-node-<network>\n```\n</details>\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docs/service-options.md",
"diff": "+<!--\n+ - SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+ - SPDX-License-Identifier: LicenseRef-MIT-OA\n+ -->\n+# Systemd service options\n+\n+The [`systemd` services](./systemd.md) provided by the packages here utilize\n+options to to define their behavior.\n+\n+All these options are defined as environment variables and are located in files\n+in the `/etc/default` system directory.\n+\n+## Changing options\n+\n+Options can be modified by editing the configuration files.\n+\n+For example, using the commonly pre-installed `nano` editor:\n+```sh\n+sudo nano /etc/default/tezos-node-mainnet\n+```\n+can be used to modify the behavior of the `mainnet` tezos node service (and not\n+only, see below).\n+\n+Note that if a service is already running it will be necessary to restart it, e.g.\n+```sh\n+sudo systemctl restart tezos-node-mainnet.service\n+```\n+in order for the changes to take effect.\n+\n+In case you [set up baking using the `tezos-setup-wizard`](./baking.md), running:\n+```sh\n+sudo systemctl restart tezos-baking-<network>.service\n+```\n+will be sufficient, as all the services involved will be restarted.\n+Running again `tezos-setup-wizard` and following the setup process is also an option.\n+\n+## Utility node scripts\n+\n+Installing packages on Ubuntu or Fedora will also install some utility scripts\n+for tezos nodes: a `tezos-node-<network>` for every currently supported Tezos `<network>`.\n+\n+Calling these scripts has the same effect as running `tezos-node` with the env\n+variables in the `/etc/default/tezos-node-<network>` given to it.\n+\n+## Available options\n+\n+Below is a list of all the environment variables that can affect the services.\n+\n+Note that, because they are inter-connected, some changes affect multiple services.\n+For example, it's sufficient to change the node data directory option in the `node`\n+configuration file and the appropriate `baker`s and `baking` services will be\n+aware of the change as well.\n+\n+\n+| Variable | Location | Description | Potentially affected services |\n+| ------------------------------ | ------------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n+| `NODE_RPC_SCHEME` | `tezos-accuser-<proto>` | Scheme of the node RPC endpoint, e.g. `http`, `https` | `tezos-accuser-<proto>` |\n+| `NODE_RPC_ADDR` | `tezos-accuser-<proto>` | Address of the node RPC endpoint, e.g. `localhost:8732`, `node.example.org:8732` | `tezos-accuser-<proto>` |\n+| `TEZOS_CLIENT_DIR` | `tezos-accuser-<proto>` | Path to the tezos client data directory, e.g. `/var/lib/tezos/.tezos-client` | `tezos-accuser-<proto>` |\n+| `TEZOS_CLIENT_DIR` | `tezos-baker-<proto>` | Tezos client data directory, e.g. `/var/lib/tezos/.tezos-client` | `tezos-baker-<proto>` |\n+| `BAKER_ADDRESS_ALIAS` | `tezos-baker-<proto>` | Alias of the address to be used for baking, e.g. `baker` | `tezos-baker-<proto>` |\n+| `LIQUIDITY_BAKING_TOGGLE_VOTE` | `tezos-baker-<proto>` | Liquidity baking toggle vote to be cast while baking, e.g. `pass`, `on`, `off` | `tezos-baker-<proto>` |\n+| `TEZOS_NODE_DIR` | `tezos-baker-<proto>` | Path to the tezos node data directory, e.g. `/var/lib/tezos/node` | `tezos-baker-<proto>` |\n+| `NODE_RPC_SCHEME` | `tezos-baker-<proto>` | Scheme of the node RPC endpoint, e.g. `http`, `https` | `tezos-baker-<proto>` |\n+| `NODE_RPC_ADDR` | `tezos-baker-<proto>` | Address of the node RPC endpoint, e.g. `localhost:8732`, `node.example.org:8732` | `tezos-baker-<proto>` |\n+| `TEZOS_CLIENT_DIR` | `tezos-baking-custom@<network>` | Path to the tezos client data directory, e.g. `/var/lib/tezos/.tezos-client` | `tezos-baking-custom@<network>` |\n+| `NODE_RPC_SCHEME` | `tezos-baking-custom@<network>` | Scheme of the node RPC endpoint, e.g. `http`, `https` | `tezos-baking-custom@<network>` |\n+| `BAKER_ADDRESS_ALIAS` | `tezos-baking-custom@<network>` | Alias of the address to be used for baking, e.g. `baker`. | `tezos-baking-custom@<network>` |\n+| `LIQUIDITY_BAKING_TOGGLE_VOTE` | `tezos-baking-custom@<network>` | Liquidity baking toggle vote to be cast while baking, e.g. `pass`, `on`, `off` | `tezos-baking-custom@<network>` |\n+| `TEZOS_CLIENT_DIR` | `tezos-baking-<network>` | Path to the tezos client data directory, e.g. `/var/lib/tezos/.tezos-client` | `tezos-baking-<network>`, `tezos-accuser-<proto>@<network>`, `tezos-baker-<proto>@<network>` |\n+| `NODE_RPC_SCHEME` | `tezos-baking-<network>` | Scheme of the node RPC endpoint, e.g. `http`, `https` | `tezos-baking-<network>`, `tezos-accuser-<proto>@<network>`, `tezos-baker-<proto>@<network>` |\n+| `BAKER_ADDRESS_ALIAS` | `tezos-baking-<network>` | Alias of the address to be used for baking, e.g. `baker`. | `tezos-baking-<network>`, `tezos-accuser-<proto>@<network>`, `tezos-baker-<proto>@<network>` |\n+| `LIQUIDITY_BAKING_TOGGLE_VOTE` | `tezos-baking-<network>` | Liquidity baking toggle vote to be cast while baking, e.g. `pass`, `on`, `off` | `tezos-baking-<network>`, `tezos-accuser-<proto>@<network>`, `tezos-baker-<proto>@<network>` |\n+| `NODE_RPC_ADDR` | `tezos-node-<network>` | Address used by this node to serve the RPC, e.g. `127.0.0.1:8732` | `tezos-node-<network>`, `tezos-baking-<network>`, `tezos-baker-<proto>@<network>` |\n+| `CERT_PATH` | `tezos-node-<network>` | Path to the TLS certificate, e.g. `/var/lib/tezos/.tls-certificate` | `tezos-node-<network>`, `tezos-baking-<network>`, `tezos-baker-<proto>@<network>` |\n+| `KEY_PATH` | `tezos-node-<network>` | Path to the TLS key, e.g. `/var/lib/tezos/.tls-key` | `tezos-node-<network>`, `tezos-baking-<network>`, `tezos-baker-<proto>@<network>` |\n+| `TEZOS_NODE_DIR` | `tezos-node-<network>` | Path to the tezos node data directory, e.g. `/var/lib/tezos/node` | `tezos-node-<network>`, `tezos-baking-<network>`, `tezos-baker-<proto>@<network>` |\n+| `NETWORK` | `tezos-node-<network>` | Name of the network that this node will run on, e.g. `mainnet`, `ghostnet` | `tezos-node-<network>`, `tezos-baking-<network>`, `tezos-baker-<proto>@<network>` |\n+| `NODE_RPC_ADDR` | `tezos-node-custom@<network>` | Address used by this node to serve the RPC, e.g. `127.0.0.1:8732` | `tezos-baking-custom@<network>`, `tezos-node-custom@<network>` |\n+| `CERT_PATH` | `tezos-node-custom@<network>` | Path to the TLS certificate, e.g. `/var/lib/tezos/.tls-certificate` | `tezos-baking-custom@<network>`, `tezos-node-custom@<network>` |\n+| `KEY_PATH` | `tezos-node-custom@<network>` | Path to the TLS key, e.g. `/var/lib/tezos/.tls-key` | `tezos-baking-custom@<network>`, `tezos-node-custom@<network>` |\n+| `TEZOS_NODE_DIR` | `tezos-node-custom@<network>` | Path to the tezos node data directory, e.g. `/var/lib/tezos/node` | `tezos-baking-custom@<network>`, `tezos-node-custom@<network>` |\n+| `CUSTOM_NODE_CONFIG` | `tezos-node-custom@<network>` | Path to the custom configuration file used by this node, e.g. `/var/lib/tezos/node.json` | `tezos-baking-custom@<network>`, `tezos-node-custom@<network>` |\n+| `RESET_ON_STOP` | `tezos-node-custom@<network>` | Whether the node should be reset when the node service is stopped, e.g. `true` | `tezos-baking-custom@<network>`, `tezos-node-custom@<network>` |\n+| `TEZOS_CLIENT_DIR` | `tezos-signer-<mode>` | Path to the tezos client data directory, e.g. `/var/lib/tezos/.tezos-client` | `tezos-signer-<mode>` |\n+| `PIDFILE` | `tezos-signer-<mode>` | File in which to write the signer process id, e.g. `/var/lib/tezos/.signer-pid` | `tezos-signer-<mode>` |\n+| `MAGIC_BYTES` | `tezos-signer-<mode>` | Values allowed for the magic bytes. | `tezos-signer-<mode>` |\n+| `CHECK_HIGH_WATERMARK` | `tezos-signer-<mode>` | Whether to apply the high watermark restriction or not, e.g. `true` | `tezos-signer-<mode>` |\n+| `CERT_PATH` | `tezos-signer-http` | Path to the TLS certificate, e.g. `/var/lib/tezos/.tls-certificate` | `tezos-signer-http` |\n+| `KEY_PATH` | `tezos-signer-http` | Path to the TLS key, e.g. `/var/lib/tezos/.tls-key` | `tezos-signer-http` |\n+| `ADDRESS` | `tezos-signer-http` | Listening address or hostname for the signer, e.g. `localhost` | `tezos-signer-http` |\n+| `PORT` | `tezos-signer-http` | Listening HTTP port for the signer, e.g. `6732` | `tezos-signer-http` |\n+| `CERT_PATH` | `tezos-signer-https` | Path to the TLS certificate, e.g. `/var/lib/tezos/.tls-certificate` | `tezos-signer-https` |\n+| `KEY_PATH` | `tezos-signer-https` | Path to the TLS key, e.g. `/var/lib/tezos/.tls-key` | `tezos-signer-https` |\n+| `ADDRESS` | `tezos-signer-https` | Listening address or hostname for the signer, e.g. `localhost` | `tezos-signer-https` |\n+| `PORT` | `tezos-signer-https` | Listening HTTPS port for the signer, e.g. `443` | `tezos-signer-https` |\n+| `ADDRESS` | `tezos-signer-tcp` | Listening address or hostname for the signer, e.g. `localhost` | `tezos-signer-tcp` |\n+| `PORT` | `tezos-signer-tcp` | Listening TCP port for the signer, e.g. `7732` | `tezos-signer-tcp` |\n+| `TIMEOUT` | `tezos-signer-tcp` | Timeout used by the signer to close client connections (in seconds), e.g. `8` | `tezos-signer-tcp` |\n+| `SOCKET` | `tezos-signer-unix` | Path to the local socket file, e.g. `/var/lib/tezos/.tezos-signer/socket` | `tezos-signer-unix` |\n+| `TEZOS_CLIENT_DIR` | `tezos-tx-rollup-node-<proto>` | Path to the tezos client data directory, e.g. `/var/lib/tezos/.tezos-client` | `tezos-tx-rollup-node-<proto>` |\n+| `NODE_RPC_SCHEME` | `tezos-tx-rollup-node-<proto>` | Scheme of the node RPC endpoint, e.g. `http`, `https` | `tezos-tx-rollup-node-<proto>` |\n+| `NODE_RPC_ADDR` | `tezos-tx-rollup-node-<proto>` | Address of the node RPC endpoint, e.g. `localhost:8732`, `node.example.org:8732` | `tezos-tx-rollup-node-<proto>` |\n+| `ROLLUP_NODE_RPC_ENDPOINT` | `tezos-tx-rollup-node-<proto>` | Address of this rollup node RPC endpoint, e.g. `127.0.0.1:8472` | `tezos-tx-rollup-node-<proto>` |\n+| `ROLLUP_MODE` | `tezos-tx-rollup-node-<proto>` | Rollup mode used by this node, e.g. `accuser`, `observer`, `batcher` | `tezos-tx-rollup-node-<proto>` |\n+| `ROLLUP_ALIAS` | `tezos-tx-rollup-node-<proto>` | Alias of the address to be used for rollup, e.g. `rollup` | `tezos-tx-rollup-node-<proto>` |\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/systemd.md",
"new_path": "docs/systemd.md",
"diff": "@@ -21,21 +21,17 @@ To stop the service run:\nsystemctl stop <package-name>.service\n```\n-Each service has its configuration file located in `/etc/default`. Default\n-configurations can be found [here](../docker/package/defaults/).\n+Each service has its configuration file located in `/etc/default`.\n+These can be edited to modify the options and behavior of the services, see\n+[the dedicated documentation](./service-options.md) for more information.\nFiles created by the services will be located in `/var/lib/tezos/` by default.\n-`tezos-{accuser, baker}-<protocol>` services have a configurable\n-data directory.\n-\n-`tezos-accuser` has a configurable node address, so that it can be used with both\n-remote and local node.\n<a name=\"generic-linux\"></a>\n## Systemd units on other Linux systems\n-If you're not using Ubuntu or Fedora you can still construct systemd units for binaries\n-from scratch.\n+If you're not using Ubuntu or Fedora you can still construct systemd units for\n+binaries from scratch.\nFor this you'll need a `.service` file to define each systemd service.\nThe easiest way to get one is to generate one with `docker` by running [`gen_systemd_service_file.py`](../gen_systemd_service_file.py).\n@@ -52,9 +48,13 @@ Then you can use the script, specifying the binary name as an argument, e.g.:\n```\nAfter that you'll have `.service` files in the current directory.\n-Apart from these `.service` files you'll need the services' startup scripts and default\n-configuration files, they can be found in the [`scripts`](../docker/package/scripts) and\n-[`defaults`](../docker/package/defaults) folders respectively.\n+Apart from these `.service` files you'll need the services' startup scripts and\n+default configuration files, they can be found in the\n+[`scripts`](../docker/package/scripts) and [`defaults`](../docker/package/defaults)\n+folders respectively.\n+Note: some of the default values are not in those files, as they are generated\n+dinamically, you can find the remaining options needed in\n+[the dedicated document](./service-options.md).\n## Systemd units on WSL\n@@ -83,19 +83,16 @@ systemctl start tezos-node-<network>\n```\nAlso, there are `tezos-node-<network>` binary aliases that are equivalent to\n-```\n-TEZOS_NODE_DIR=\"<DATA_DIR from tezos-node-<network>.service>\" tezos-node\n-```\n+running `tezos-node` with [the service options](./service-options.md) given.\nIn addition to node services where the config is predefined to a specific network\n-(e.g. `tezos-node-mainnet` or `tezos-node-kathmandunet`), it's possible to run `tezos-node-custom`\n-service 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+(e.g. `tezos-node-mainnet` or `tezos-node-kathmandunet`), it's possible to run\n+`tezos-node-custom` service.\nAnother case for running multiple similar systemd services is when one wants to have\nmultiple daemons that target different protocols.\nSince daemons for different protocols are provided in the different packages, they will\n-have different service files. The only thing that needs to be changed is config file.\n+have different service files. The only thing that needs to be changed is [the config file](./service-options.md).\nOne should provide desired node address, data directory for daemon files and node directory\n(however, this is the case only for baker daemon).\n@@ -104,4 +101,4 @@ One should provide desired node address, data directory for daemon files and nod\n* Over UNIX socker (`tezos-signer-unix.service`).\n* Over HTTP (`tezos-signer-http.service`).\n* Over HTTPS (`tezos-signer-https.service`)\n-Each signer service has dedicated config file in e.g. `/etc/default/tezos-signer-{mode}`.\n+Each signer service has [dedicated config files](./service-options.md) as well.\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/tx_rollup.md",
"new_path": "docs/tx_rollup.md",
"diff": "# Setting up transaction rollup node on Ubuntu\n-`proto` variable can hold every active protocol, currently `PtKatham` and `PtLimaPt`.\n-\n-By default, `tezos-tx-rollup-node-$proto.service` will use:\n-* `/var/lib/tezos/.tezos-client` as the `tezos-client` data directory, set in `TEZOS_CLIENT_DIR`\n-* `http://localhost:8732` as the `tezos-node` RPC address, set in `NODE_RPC_ENDPOINT`\n-* `127.0.0.1:8472` as the `tezos-tx-rollup-node-$proto` RPC address, set in `ROLLUP_NODE_RPC_ENDPOINT`\n-* `observer` as the `tezos-tx-rollup-node-$proto` working mode, set in `ROLLUP_MODE`\n-* `rollup` as the rollup alias, set in `ROLLUP_ALIAS`\n-\nAt first you should originate rollup with the provided alias for some implicit account:\n```\nsudo -u tezos tezos-client originate tx rollup <ROLLUP_ALIAS> from <IMPLICIT_ACCOUNT_ALIAS>\n@@ -21,23 +12,14 @@ sudo -u tezos tezos-client originate tx rollup <ROLLUP_ALIAS> from <IMPLICIT_ACC\nAfter that, with the active `tezos-node` service available with the provided uri, run the following command\n```\n-systemctl start tezos-tx-rollup-node-$proto.service\n-```\n-\n-In order to change the defaults, open `/etc/default/tezos-tx-rollup-node-$proto` and modify the variables:\n-\n-```\n-TEZOS_CLIENT_DIR=\"/var/lib/tezos/.tezos-client\"\n-NODE_RPC_ENDPOINT=\"http://localhost:8732\"\n-ROLLUP_NODE_RPC_ENDPOINT=\"127.0.0.1:8472\"\n-ROLLUP_MODE=\"operator\"\n-ROLLUP_ALIAS=\"custom-rollup\"\n+systemctl start tezos-tx-rollup-node-<proto>.service\n```\n+Note: The `proto` variable can be every active protocol.\n-Save and close the editor, restart the service:\n+For futher details, see [the upstream documentation on transaction rollups](http://tezos.gitlab.io/active/transaction_rollups.html).\n-```\n-sudo systemctl restart tezos-tx-rollup-node-$proto.service\n-```\n+## Options and defaults\n-For futher details, see [the documentation](http://tezos.gitlab.io/active/transaction_rollups.html).\n+As any other `systemd` services ditributed here, rollup binaries have settable\n+options, see [the dedicated documentation](./service-options.md) to see their\n+default values and how to change these.\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#517] Update service options documentation
Problem: finding and changing options of our
services is now easier and more stable, but
the documentation hasn't been updated.
Solution: update existing documentation and
add a dedicated document on systemd service
options. |
603,660 | 03.11.2022 16:03:31 | -10,800 | d4d92c493d01bfe9b637a7cb23b3e7f4f51efb4c | [Chore] Reset letter version
Problem: New upstream release came and
letter version shoud be reset.
Solution: Reset it. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -519,7 +519,7 @@ class TezosBakingServicesPackage(AbstractPackage):\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+ letter_version = \"\"\nbuildfile = \"setup.py\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Reset letter version
Problem: New upstream release came and
letter version shoud be reset.
Solution: Reset it. |
603,660 | 03.11.2022 16:07:31 | -10,800 | 22c8b8e8edecb6b44c08fd182d7ec88b84a93deb | [Chore] Remove `ledgerwallet-tezos` installation
Problem: Regression caused abcense of `ledgerwallet-tezos`
package fixed.
Solution: Remove its separate installation. | [
{
"change_type": "MODIFY",
"old_path": "docker/build/build-tezos.sh",
"new_path": "docker/build/build-tezos.sh",
"diff": "@@ -19,10 +19,5 @@ export BLST_PORTABLE=\"yes\"\nopam init --bare --disable-sandboxing\nmake build-deps\n-# TODO remove on next upstream release\n-# see https://gitlab.com/tezos/tezos/-/issues/4005#note_1134995654\n-eval \"$(opam env)\"\n-opam install ledgerwallet-tezos --criteria=-changed\n-\neval \"$(opam env)\" && PROFILE=\"static\" make build\nchmod +w octez-*\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/build-binary.sh",
"new_path": "docker/package/scripts/build-binary.sh",
"diff": "@@ -23,10 +23,6 @@ export CFLAGS=\"-fPIC ${CFLAGS:-}\"\nopam install \"${opams[@]}\" --deps-only --criteria=\"-notuptodate,-changed,-removed\"\neval \"$(opam env)\"\n-# TODO remove on next upstream release\n-# see https://gitlab.com/tezos/tezos/-/issues/4005#note_1134995654\n-opam install ledgerwallet-tezos --criteria=-changed\n-\ndune build \"$dune_filepath\"\ncp \"./_build/default/$dune_filepath\" \"../$binary_name\"\ncd ..\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Remove `ledgerwallet-tezos` installation
Problem: Regression caused abcense of `ledgerwallet-tezos`
package fixed.
Solution: Remove its separate installation. |
603,660 | 03.11.2022 16:09:25 | -10,800 | 4efe167414af10ad6dda26c3281f41bad6ebab80 | [Chore] Replace url with `limanet` option
Problem: Since new release, `--network limanet` option
is available.
Solution: Replace url with `limanet`. | [
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node-limanet.rb",
"new_path": "Formula/tezos-node-limanet.rb",
"diff": "@@ -25,13 +25,13 @@ class TezosNodeLimanet < Formula\necho \"Configuring the node...\"\n\"$node\" config init \\\n--rpc-addr \"$NODE_RPC_ADDR\" \\\n- --network=https://teztnets.xyz/limanet \\\n+ --network=limanet \\\n\"$@\"\nelse\necho \"Updating the node configuration...\"\n\"$node\" config update \\\n--rpc-addr \"$NODE_RPC_ADDR\" \\\n- --network=https://teztnets.xyz/limanet \\\n+ --network=limanet \\\n\"$@\"\nfi\n@@ -80,6 +80,6 @@ class TezosNodeLimanet < Formula\nend\ndef post_install\nmkdir_p \"#{var}/lib/tezos/node-limanet\"\n- system \"octez-node\", \"config\", \"init\", \"--data-dir\" \"#{var}/lib/tezos/node-limanet\", \"--network\", \"https://teztnets.xyz/limanet\"\n+ system \"octez-node\", \"config\", \"init\", \"--data-dir\" \"#{var}/lib/tezos/node-limanet\", \"--network\", \"limanet\"\nend\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -17,7 +17,7 @@ from .systemd import Service, ServiceFile, SystemdUnit, Unit, Install\nnetworks = {\n\"mainnet\": \"mainnet\",\n\"ghostnet\": \"ghostnet\",\n- \"limanet\": \"https://teztnets.xyz/limanet\",\n+ \"limanet\": \"limanet\",\n\"kathmandunet\": \"kathmandunet\",\n}\nnetworks_protos = {\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Replace url with `limanet` option
Problem: Since new release, `--network limanet` option
is available.
Solution: Replace url with `limanet`. |
603,660 | 08.11.2022 19:01:09 | -10,800 | 6b7f1c56d3bb710260ba229fe9943c385a98c77a | [Chore] Add timeout for bottle build
Problem: Something bottle build takes too long
and not finishes successfully that case. Thus,
we shouldn't wait that much.
Solution: Set timeout after 2 hours. | [
{
"change_type": "MODIFY",
"old_path": ".github/workflows/build-bottles.yml",
"new_path": ".github/workflows/build-bottles.yml",
"diff": "@@ -48,6 +48,7 @@ jobs:\n- name: Build the bottle\nif: steps.check-built.outcome == 'failure'\nrun: ./scripts/build-one-bottle.sh \"${{ matrix.formula }}\"\n+ timeout-minutes: 120\n- name: Upload the bottle to Github Actions\nif: steps.check-built.outcome == 'failure'\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add timeout for bottle build
Problem: Something bottle build takes too long
and not finishes successfully that case. Thus,
we shouldn't wait that much.
Solution: Set timeout after 2 hours. |
603,660 | 26.10.2022 11:09:01 | -10,800 | 7665befecc5385050409d76b4e7e59519b8b711d | [Chore] Use dict instead of list for packages
Problem: It would be better if we could have
random access of package by package name.
Solution: Wrap packages in dict with package name
as keys. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -11,6 +11,7 @@ from .model import (\n)\nfrom .systemd import Service, ServiceFile, SystemdUnit, Unit, Install\n+from collections import ChainMap\n# Testnets are either supported by the tezos-node directly or have known URL with\n# the config\n@@ -130,21 +131,26 @@ ledger_udev_postinst = open(\n).read()\npackages = [\n- TezosBinaryPackage(\n+ {\n+ \"tezos-client\": TezosBinaryPackage(\n\"tezos-client\",\n\"CLI client for interacting with tezos blockchain\",\nmeta=packages_meta,\nadditional_native_deps=[\"tezos-sapling-params\", \"udev\"],\npostinst_steps=ledger_udev_postinst,\ndune_filepath=\"src/bin_client/main_client.exe\",\n- ),\n- TezosBinaryPackage(\n+ )\n+ },\n+ {\n+ \"tezos-admin-client\": TezosBinaryPackage(\n\"tezos-admin-client\",\n\"Administration tool for the node\",\nmeta=packages_meta,\ndune_filepath=\"src/bin_client/main_admin.exe\",\n- ),\n- TezosBinaryPackage(\n+ )\n+ },\n+ {\n+ \"tezos-signer\": TezosBinaryPackage(\n\"tezos-signer\",\n\"A client to remotely sign operations or blocks\",\nmeta=packages_meta,\n@@ -152,13 +158,16 @@ packages = [\nsystemd_units=signer_units,\npostinst_steps=ledger_udev_postinst,\ndune_filepath=\"src/bin_signer/main_signer.exe\",\n- ),\n- TezosBinaryPackage(\n+ )\n+ },\n+ {\n+ \"tezos-codec\": TezosBinaryPackage(\n\"tezos-codec\",\n\"A client to decode and encode JSON\",\nmeta=packages_meta,\ndune_filepath=\"src/bin_codec/codec.exe\",\n- ),\n+ )\n+ },\n]\npostinst_steps_common = \"\"\"\n@@ -266,16 +275,22 @@ custom_node_instantiated.poststop_script = \"tezos-node-custom-poststop\"\nnode_units.append(custom_node_instantiated)\npackages.append(\n- TezosBinaryPackage(\n+ {\n+ \"tezos-node\": TezosBinaryPackage(\n\"tezos-node\",\n\"Entry point for initializing, configuring and running a Tezos node\",\nmeta=packages_meta,\nsystemd_units=node_units,\npostinst_steps=node_postinst_steps,\npostrm_steps=node_postrm_steps,\n- additional_native_deps=[\"tezos-sapling-params\", \"curl\", {\"ubuntu\": \"netbase\"}],\n+ additional_native_deps=[\n+ \"tezos-sapling-params\",\n+ \"curl\",\n+ {\"ubuntu\": \"netbase\"},\n+ ],\ndune_filepath=\"src/bin_node/main.exe\",\n)\n+ }\n)\nprotocols_json = json.load(\n@@ -383,7 +398,8 @@ for proto in active_protocols:\nInstall(wanted_by=[\"multi-user.target\"]),\n)\npackages.append(\n- TezosBinaryPackage(\n+ {\n+ f\"tezos-baker-{proto}\": TezosBinaryPackage(\nf\"tezos-baker-{proto}\",\n\"Daemon for baking\",\nmeta=packages_meta,\n@@ -411,9 +427,11 @@ for proto in active_protocols:\n],\ndune_filepath=f\"src/proto_{proto_snake_case}/bin_baker/main_baker_{proto_snake_case}.exe\",\n)\n+ }\n)\npackages.append(\n- TezosBinaryPackage(\n+ {\n+ f\"tezos-accuser-{proto}\": TezosBinaryPackage(\nf\"tezos-accuser-{proto}\",\n\"Daemon for accusing\",\nmeta=packages_meta,\n@@ -436,6 +454,7 @@ for proto in active_protocols:\npostinst_steps=daemon_postinst_common,\ndune_filepath=f\"src/proto_{proto_snake_case}/bin_accuser/main_accuser_{proto_snake_case}.exe\",\n)\n+ }\n)\nsapling_package = TezosSaplingParamsPackage(\n@@ -443,13 +462,17 @@ sapling_package = TezosSaplingParamsPackage(\n)\npackages.append(\n- TezosBakingServicesPackage(\n+ {\n+ \"tezos-baking\": TezosBakingServicesPackage(\ntarget_networks=networks.keys(),\nnetwork_protos=networks_protos,\nmeta=packages_meta,\n- additional_native_deps=[f\"tezos-baker-{proto}\" for proto in active_protocols]\n+ additional_native_deps=[\n+ f\"tezos-baker-{proto}\" for proto in active_protocols\n+ ]\n+ [\"tezos-node\", \"acl\"],\n)\n+ }\n)\n@@ -505,7 +528,7 @@ def mk_rollup_packages():\ntypes = [\"tx\"]\npackages = [\"node\", \"client\"]\nreturn [\n- mk_rollup_package(name, type, proto)\n+ {f\"tezos-{type}-rollup-{name}-{proto}\": mk_rollup_package(name, type, proto)}\nfor name in packages\nfor type in types\nfor proto in active_protocols\n@@ -513,3 +536,5 @@ def mk_rollup_packages():\npackages.extend(mk_rollup_packages())\n+\n+packages = dict(ChainMap(*packages))\n"
},
{
"change_type": "MODIFY",
"old_path": "gen_systemd_service_file.py",
"new_path": "gen_systemd_service_file.py",
"diff": "@@ -12,7 +12,7 @@ import sys\nif len(sys.argv) > 1:\nbinary_name = sys.argv[1]\n- for package in packages:\n+ for package in packages.values():\nif binary_name == package.name:\nfor systemd_unit in package.systemd_units:\nif systemd_unit.suffix is None:\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Use dict instead of list for packages
Problem: It would be better if we could have
random access of package by package name.
Solution: Wrap packages in dict with package name
as keys. |
603,660 | 26.10.2022 11:07:39 | -10,800 | 11c66f0e09c854b93c7568a9560faaea9be510b9 | Add missing dependencies for fedora image
Problem: We use `mock` now to build against
different fedora versions.
Solution: Install `mock` during bootstrapping. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-fedora",
"new_path": "docker/package/Dockerfile-fedora",
"diff": "FROM fedora:35\nRUN dnf update -y\nRUN dnf install -y libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel m4 perl git pkg-config \\\n- rpmdevtools python3-devel python3-setuptools wget opam rsync which cargo autoconf systemd systemd-rpm-macros\n+ rpmdevtools python3-devel python3-setuptools wget opam rsync which cargo autoconf mock systemd systemd-rpm-macros\nENV USER dockerbuilder\nRUN useradd dockerbuilder && mkdir /tezos-packaging\nENV HOME /tezos-packaging\n@@ -17,4 +17,3 @@ COPY docker/package/defaults /tezos-packaging/docker/package/defaults\nCOPY docker/package/scripts /tezos-packaging/docker/package/scripts\nCOPY LICENSE /tezos-packaging/LICENSE\nENTRYPOINT [\"python3\", \"-m\", \"package.package_generator\"]\n-\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#545] Add missing dependencies for fedora image
Problem: We use `mock` now to build against
different fedora versions.
Solution: Install `mock` during bootstrapping. |
603,660 | 25.10.2022 12:12:10 | -10,800 | a4de8cd11699ec9d7802f3f39879d8d267ef5df6 | Rewrite `docker-tezos-packages` in python
Problem: Since `tezos-baking` package needs
to build against every supported version of fedora,
we have to gain finer control of the build script.
Solution:
* Use parser shared by `package_generator.py`.
* Validate and pass args to `package_generator`.
* Rename resulting `tezos-baking` package according to Fedora version. | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/docker-tezos-packages.py",
"diff": "+#!/usr/bin/env python3\n+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+import os\n+import sys\n+import shlex\n+import subprocess\n+from package.packages import packages\n+from package.package_generator import parser\n+from package.package_generator import output_dir as container_output_dir\n+\n+ubuntu_versions = [\n+ \"bionic\", # 18.04\n+ \"focal\", # 20.04\n+ \"jammy\", # 22.04\n+]\n+\n+fedora_versions = [\n+ \"35\",\n+ \"36\",\n+]\n+\n+\n+def check_call(cmd):\n+ return subprocess.check_call(shlex.split(cmd))\n+\n+\n+def call(cmd):\n+ return subprocess.call(shlex.split(cmd))\n+\n+\n+def get_proc_output(cmd):\n+ if sys.version_info.major == 3 and sys.version_info.minor < 7:\n+ return subprocess.run(shlex.split(cmd), stdout=subprocess.PIPE)\n+ else:\n+ return subprocess.run(shlex.split(cmd), capture_output=True, text=True)\n+\n+\n+def get_packages_to_build(arg):\n+ if arg:\n+ for pkg in arg:\n+ if not packages.get(pkg, None):\n+ raise Exception(\"Unknown package name.\")\n+ return {key: packages[key] for key in arg}\n+ return packages\n+\n+\n+def validate_dists(dists, versions, target_os):\n+ for dist in dists:\n+ if dist not in versions:\n+ raise Exception(f\"Distribution {dist} is not supported for {target_os}.\")\n+\n+\n+if os.getenv(\"USE_PODMAN\", None):\n+ virtualisation_engine = \"podman\"\n+else:\n+ virtualisation_engine = \"docker\"\n+\n+parser.add_argument(\n+ \"--output-dir\",\n+ help=\"provide a directory to place the built packages in\",\n+ default=f\"{os.path.join(os.getcwd(), 'out')}\",\n+ type=os.path.abspath,\n+)\n+parser.add_argument(\n+ \"--build-sapling-package\",\n+ help=\"whether to build the sapling-params package\",\n+ action=\"store_true\",\n+)\n+parser.set_defaults(build_sapling_package=False)\n+args = parser.parse_args()\n+\n+docker_volumes = \"\"\n+\n+if args.binaries_dir:\n+ binaries_dir_name = os.path.basename(args.binaries_dir)\n+ docker_volumes = (\n+ f\"-v {args.binaries_dir}:/tezos-packaging/docker/{binaries_dir_name}\"\n+ )\n+else:\n+ binaries_dir_name = None\n+\n+target_os = args.os\n+\n+if target_os == \"ubuntu\":\n+ if args.distributions:\n+ distributions = args.distributions\n+ validate_dists(distributions, ubuntu_versions, target_os)\n+ else:\n+ distributions = ubuntu_versions\n+elif target_os == \"fedora\":\n+ if args.distributions:\n+ distributions = args.distributions\n+ validate_dists(distributions, fedora_versions, target_os)\n+ else:\n+ distributions = [\"native\"]\n+else:\n+ raise Exception(\"Unsupported target os: \" + target_os)\n+\n+octez_version = os.getenv(\"OCTEZ_VERSION\", None)\n+\n+if not octez_version:\n+ raise Exception(\"Environment variable OCTEZ_VERSION is not set.\")\n+\n+# prebuild docker image before using containers\n+check_call(\n+ f\"\"\"\n+{virtualisation_engine}\n+build -t tezos-{target_os}\n+-f docker/package/Dockerfile-{target_os} .\n+\"\"\"\n+)\n+\n+\n+# enclose defined above variables to shorten argument list\n+def build_packages(pkgs, distros):\n+\n+ cmd_args = \" \".join(\n+ [\n+ f\"--os {target_os}\",\n+ f\"--binaries-dir {binaries_dir_name}\" if binaries_dir_name else \"\",\n+ f\"--sources {args.sources}\" if args.sources else \"\",\n+ f\"--type {args.type}\",\n+ f\"--distributions {' '.join(distros)}\",\n+ f\"--packages {' '.join(pkgs)}\",\n+ ]\n+ )\n+\n+ container_create_args = (\n+ \"--cap-add SYS_ADMIN\" if target_os == \"fedora\" and args.distributions else \"\"\n+ )\n+\n+ container_id = get_proc_output(\n+ f\"\"\"\n+ {virtualisation_engine}\n+ create {docker_volumes}\n+ {container_create_args}\n+ --env OCTEZ_VERSION={octez_version}\n+ --env OPAMSOLVERTIMEOUT=900\n+ -t tezos-{target_os} {cmd_args}\n+ \"\"\"\n+ ).stdout.strip()\n+\n+ exit_code = call(f\"{virtualisation_engine} start -a {container_id}\")\n+\n+ os.makedirs(args.output_dir, exist_ok=True)\n+\n+ call(\n+ f\"\"\"\n+ {virtualisation_engine} cp\n+ {container_id}:/tezos-packaging/docker/{container_output_dir} .\n+ \"\"\"\n+ )\n+\n+ call(f\"{virtualisation_engine} rm -v {container_id}\")\n+\n+ if exit_code:\n+ print(\"Unrecoverable error occured.\")\n+ sys.exit(exit_code)\n+\n+\n+packages_to_build = get_packages_to_build(args.packages)\n+\n+if not args.build_sapling_package:\n+ packages_to_build.pop(\"tezos-sapling-params\", None)\n+\n+build_packages(packages_to_build.keys(), distributions)\n"
},
{
"change_type": "DELETE",
"old_path": "docker/docker-tezos-packages.sh",
"new_path": null,
"diff": "-#! /usr/bin/env bash\n-\n-# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/>\n-#\n-# SPDX-License-Identifier: LicenseRef-MIT-TQ\n-\n-# This script builds native binary or source ubuntu or fedora packages\n-# with tezos binaries. Target OS is defined in the first passed argument.\n-# Package type can be defined in the second argument, 'source' and 'binary'\n-# types are supported.\n-set -euo pipefail\n-\n-if [[ \"${USE_PODMAN-}\" == \"True\" ]]; then\n- virtualisation_engine=\"podman\"\n-else\n- virtualisation_engine=\"docker\"\n-fi\n-\n-args=()\n-\n-docker_volumes=()\n-\n-while true;\n-do\n- arg=\"${1-}\"\n- if [[ -z \"$arg\" ]];\n- then\n- break\n- fi\n- case $arg in\n- --os )\n- args+=(\"$arg\" \"$2\")\n- target_os=\"$2\"\n- shift 2\n- ;;\n- --sources )\n- source_archive=\"$2\"\n- source_archive_name=\"$(basename \"$2\")\"\n- args+=(\"$arg\" \"$source_archive_name\")\n- docker_volumes+=(\"-v\" \"$PWD/$source_archive:/tezos-packaging/docker/$source_archive_name\")\n- shift 2\n- ;;\n- --binaries-dir )\n- binaries_dir=\"$2\"\n- binaries_dir_name=\"$(basename \"$2\")\"\n- args+=(\"$arg\" \"$binaries_dir_name\")\n- docker_volumes+=(\"-v\" \"$PWD/$binaries_dir:/tezos-packaging/docker/$binaries_dir_name\")\n- shift 2\n- ;;\n- * )\n- args+=(\"$arg\")\n- shift\n- ;;\n- esac\n-done\n-\n-\"$virtualisation_engine\" build -t tezos-\"$target_os\" -f docker/package/Dockerfile-\"$target_os\" .\n-set +e\n-container_id=\"$(\"$virtualisation_engine\" create \"${docker_volumes[@]}\" --env OCTEZ_VERSION=\"$OCTEZ_VERSION\" --env OPAMSOLVERTIMEOUT=900 -t tezos-\"$target_os\" \"${args[@]}\")\"\n-\"$virtualisation_engine\" start -a \"$container_id\"\n-exit_code=\"$?\"\n-\"$virtualisation_engine\" cp \"$container_id\":/tezos-packaging/docker/out .\n-set -e\n-\"$virtualisation_engine\" rm -v \"$container_id\"\n-exit \"$exit_code\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#545] Rewrite `docker-tezos-packages` in python
Problem: Since `tezos-baking` package needs
to build against every supported version of fedora,
we have to gain finer control of the build script.
Solution:
* Use parser shared by `package_generator.py`.
* Validate and pass args to `package_generator`.
* Rename resulting `tezos-baking` package according to Fedora version. |
603,660 | 26.10.2022 11:08:48 | -10,800 | 85201754f9679a18aa3ef02c766b06bbb50471a5 | Refactor package generation
Problem: `docker-tezos-packages.py` and `package_generator.py`
seems to have very similar functionality, but only former is
user-facing. Thus args parser should be shared.
Solution: Create shared argument parser, wrap package generation
in `main` function. Add opportunity to choose distribution to build,
refactor build functions accordingly. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/fedora.py",
"new_path": "docker/package/fedora.py",
"diff": "@@ -13,9 +13,11 @@ def build_fedora_package(\nbuild_deps: List[str],\nrun_deps: List[str],\nis_source: bool,\n+ fedora_versions: List[str],\nbinaries_dir: str = None,\n):\nversion = pkg.meta.version.replace(\"-\", \"\")\n+ release_version = pkg.meta.release\ndir = f\"{pkg.name}-{version}\"\ncwd = os.path.dirname(__file__)\nhome = os.environ[\"HOME\"]\n@@ -67,13 +69,39 @@ def build_fedora_package(\nbuild_deps + run_deps, run_deps, f\"{home}/rpmbuild/SPECS/{pkg.name}.spec\"\n)\nos.rename(f\"{dir}.tar.gz\", f\"{home}/rpmbuild/SOURCES/{dir}.tar.gz\")\n+ for dist in fedora_versions:\n+ if not is_source and dist == \"native\":\nsubprocess.run(\n[\n\"rpmbuild\",\n- \"-bs\" if is_source else \"-bb\",\n+ \"-bb\",\nf\"{home}/rpmbuild/SPECS/{pkg.name}.spec\",\n],\ncheck=True,\n)\n+ else:\n+ subprocess.run(\n+ [\"rpmbuild\", \"-bs\", f\"{home}/rpmbuild/SPECS/{pkg.name}.spec\"],\n+ check=True,\n+ )\n+ if not is_source:\n+ os.makedirs(f\"{home}/rpmbuild/RPMS/x86_64\", exist_ok=True)\n+ subprocess.run(\n+ [\n+ \"mock\",\n+ \"--resultdir\",\n+ f\"{home}/rpmbuild/RPMS/x86_64\",\n+ \"-r\",\n+ f\"/etc/mock/fedora-{dist}-x86_64.cfg\",\n+ f\"{home}/rpmbuild/SRPMS/{pkg.name}-{version}-{release_version}.src.rpm\",\n+ ],\n+ )\n+ os.rename(\n+ f\"{home}/rpmbuild/RPMS/x86_64/{pkg.name}-{version}-{release_version}.x86_64.rpm\",\n+ f\"{home}/rpmbuild/RPMS/x86_64/{pkg.name}-{version}-{release_version}.fedora-{dist}-x86_64.rpm\",\n+ )\n+ os.remove(\n+ f\"{home}/rpmbuild/RPMS/x86_64/{pkg.name}-{version}-{release_version}.src.rpm\"\n+ )\nsubprocess.run(f\"rm -rf {dir}\", shell=True, check=True)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/package_generator.py",
"new_path": "docker/package/package_generator.py",
"diff": "# SPDX-FileCopyrightText: 2021 Oxhead Alpha\n# SPDX-License-Identifier: LicenseRef-MIT-OA\n-import os, shutil, argparse\n-\n+import os\n+import shutil\n+import argparse\nfrom .fedora import build_fedora_package\n-from .packages import packages, sapling_package\nfrom .ubuntu import build_ubuntu_package\n+from .packages import packages as all_packages\n+# fixed output dir in container\n+output_dir = \"out\"\n-def get_ubuntu_run_deps(args):\n+parser = argparse.ArgumentParser()\n+parser.add_argument(\"--os\", required=True, choices=[\"ubuntu\", \"fedora\"])\n+parser.add_argument(\n+ \"-t\", \"--type\", help=\"package type\", required=True, choices=[\"source\", \"binary\"]\n+)\n+parser.add_argument(\n+ \"-p\",\n+ \"--packages\",\n+ help=\"specify binaries to package\",\n+ nargs=\"+\",\n+)\n+parser.add_argument(\n+ \"-d\",\n+ \"--distributions\",\n+ help=\"specify distributions to package for\",\n+ nargs=\"+\",\n+)\n+parser.add_argument(\n+ \"--binaries-dir\",\n+ help=\"provide a directory with exiting prebuilt binaries\",\n+ type=os.path.abspath,\n+)\n+parser.add_argument(\n+ \"--sources\",\n+ help=\"specify source archive for single ubuntu package\",\n+ type=os.path.abspath,\n+)\n+\n+\n+def get_ubuntu_run_deps(binaries_dir):\n\"\"\"\nList all the ubuntu run dependencies. Return an empty list when using prebuilt static binaries.\n\"\"\"\n- if args.binaries_dir:\n+ if binaries_dir:\nreturn []\nreturn [\n@@ -25,11 +57,11 @@ def get_ubuntu_run_deps(args):\n]\n-def get_fedora_run_deps(args):\n+def get_fedora_run_deps(binaries_dir):\n\"\"\"\nList all the fedora run dependencies. Return an empty list when using prebuilt static binaries.\n\"\"\"\n- if args.binaries_dir:\n+ if binaries_dir:\nreturn []\nreturn [\n@@ -42,11 +74,11 @@ def get_fedora_run_deps(args):\n]\n-def get_build_deps(args):\n+def get_build_deps(binaries_dir):\n\"\"\"\nList all the common build dependencies. Return an empty list when using prebuilt static binaries.\n\"\"\"\n- if args.binaries_dir:\n+ if binaries_dir:\nreturn [\"make\", \"wget\"]\nreturn [\n@@ -66,113 +98,77 @@ def get_build_deps(args):\n]\n-is_ubuntu = None\n-is_source = None\n-package_to_build = None\n-source_archive = None\n+def main():\n-parser = argparse.ArgumentParser()\n-parser.add_argument(\"--os\", required=True)\n-parser.add_argument(\"--type\", help=\"package type\", required=True)\n-parser.add_argument(\"--package\", help=\"specify binary to package\")\n-parser.add_argument(\n- \"--output-dir\",\n- help=\"provide a directory to place the built packages\",\n- default=\"out\",\n-)\n-parser.add_argument(\n- \"--binaries-dir\",\n- help=\"provide a directory with exiting prebuilt binaries\",\n- type=os.path.abspath,\n-)\n-parser.add_argument(\n- \"--build-sapling-package\",\n- help=\"whether to build the sapling-params package\",\n- action=\"store_true\",\n-)\n-parser.add_argument(\n- \"--sources\", help=\"specify source archive for single ubuntu package\"\n-)\n-parser.set_defaults(build_sapling_package=False)\nargs = parser.parse_args()\n-if args.os == \"ubuntu\":\n- is_ubuntu = True\n-elif args.os == \"fedora\":\n- is_ubuntu = False\n-else:\n- raise Exception(\n- \"Unexpected package target OS, only 'ubuntu' and 'fedora' are supported.\"\n- )\n+ target_os = args.os\n-if args.type == \"source\":\n- is_source = True\n-elif args.type == \"binary\":\n- is_source = False\n-else:\n- raise Exception(\n- \"Unexpected package format, only 'source' and 'binary' are supported.\"\n- )\n+ is_source = args.type == \"source\"\n-package_to_build = args.package\nsource_archive = args.sources\n-if is_ubuntu:\n- run_deps = get_ubuntu_run_deps(args)\n-else:\n- run_deps = get_fedora_run_deps(args)\n+ binaries_dir = args.binaries_dir\n-build_deps = get_build_deps(args)\n+ if target_os == \"ubuntu\":\n+ run_deps = get_ubuntu_run_deps(binaries_dir)\n+ elif target_os == \"fedora\":\n+ run_deps = get_fedora_run_deps(binaries_dir)\n-common_deps = run_deps + build_deps\n+ build_deps = get_build_deps(binaries_dir)\n-ubuntu_versions = [\n- \"bionic\", # 18.04\n- \"focal\", # 20.04\n- \"jammy\", # 22.04\n-]\n+ common_deps = run_deps + build_deps\n-pwd = os.getcwd()\nhome = os.environ[\"HOME\"]\n-packages_to_build = packages\n+ os.makedirs(output_dir, exist_ok=True)\n+\n+ distributions = list(args.distributions)\n+\n+ packages = []\n-if args.build_sapling_package:\n- packages.append(sapling_package)\n+ for package_name in args.packages:\n+ packages.append(all_packages[package_name])\n-for package in packages_to_build:\n- if package_to_build is None or package.name == package_to_build:\n- if is_ubuntu:\n+ if target_os == \"ubuntu\":\n+ for package in packages:\nbuild_ubuntu_package(\npackage,\n- ubuntu_versions,\n+ distributions,\ncommon_deps,\nis_source,\nsource_archive,\n- args.binaries_dir,\n- )\n- else:\n- build_fedora_package(\n- package, build_deps, run_deps, is_source, args.binaries_dir\n+ binaries_dir,\n)\n-os.makedirs(args.output_dir, exist_ok=True)\nif not is_source:\n- if is_ubuntu:\nexts = [\".deb\"]\nelse:\n- exts = [\".rpm\"]\n-else:\n- if is_ubuntu:\nexts = [\".orig.tar.gz\", \".dsc\", \".changes\", \".debian.tar.xz\", \".buildinfo\"]\n- else:\n- exts = [\".src.rpm\"]\n-if is_ubuntu:\n+\nartifacts_dir = \".\"\n-else:\n+\n+ elif target_os == \"fedora\":\n+ for package in packages:\n+ build_fedora_package(\n+ package,\n+ build_deps,\n+ run_deps,\n+ is_source,\n+ distributions,\n+ binaries_dir,\n+ )\n+\n+ exts = [\".src.rpm\"] if is_source else [\".rpm\"]\n+\nsubdir = \"SRPMS\" if is_source else \"RPMS/x86_64\"\nartifacts_dir = f\"{home}/rpmbuild/{subdir}\"\n+\nfor f in os.listdir(artifacts_dir):\nfor ext in exts:\nif f.endswith(ext):\n- shutil.copy(f\"{artifacts_dir}/{f}\", os.path.join(args.output_dir, f))\n+ shutil.copy(f\"{artifacts_dir}/{f}\", os.path.join(output_dir, f))\n+\n+\n+if __name__ == \"__main__\":\n+ main()\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#545] Refactor package generation
Problem: `docker-tezos-packages.py` and `package_generator.py`
seems to have very similar functionality, but only former is
user-facing. Thus args parser should be shared.
Solution: Create shared argument parser, wrap package generation
in `main` function. Add opportunity to choose distribution to build,
refactor build functions accordingly. |
603,660 | 29.10.2022 10:03:47 | -10,800 | a7d911f34c4bdb7ecc8a858b531f9bab582a3259 | [Chore] Update CI
Problem: CI steps still using deprecated shell script.
Solution: Use python script instead. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-for-tags.yml",
"new_path": ".buildkite/pipeline-for-tags.yml",
"diff": "@@ -19,8 +19,8 @@ steps:\nqueue: \"docker\"\ncommands:\n- eval \"$SET_VERSION\"\n- - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n- - ./docker/docker-tezos-packages.sh --os fedora --type source\n+ - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os ubuntu --type source\n+ - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os fedora --type source\nartifact_paths:\n- ./out/*\n"
},
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -100,7 +100,7 @@ steps:\n- label: test deb source packages via docker\ncommands:\n- eval \"$SET_VERSION\"\n- - ./docker/docker-tezos-packages.sh --os ubuntu --type source\n+ - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os ubuntu --type source\nartifact_paths:\n- ./out/*\nbranches: \"!master\"\n@@ -109,7 +109,7 @@ steps:\nqueue: \"docker\"\nonly_changes: &native_packaging_changes_regexes\n- docker/package/.*\n- - docker/docker-tezos-packages.sh\n+ - docker/docker-tezos-packages.py\n- meta.json\n- protocols.json\n- label: test deb binary packages via docker\n@@ -117,7 +117,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-PtKathma\n+ - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os ubuntu --type binary -p tezos-baker-PtKathma\n- rm -rf out\n# It takes much time to build binary package, so we do it only on master\nbranches: \"master\"\n@@ -128,7 +128,7 @@ steps:\n- label: test rpm source packages via docker\ncommands:\n- eval \"$SET_VERSION\"\n- - ./docker/docker-tezos-packages.sh --os fedora --type source\n+ - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os fedora --type source\nartifact_paths:\n- ./out/*\nbranches: \"!master\"\n@@ -141,7 +141,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-PtKathma\n+ - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os fedora --type binary -p tezos-baker-PtKathma\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": "ADD",
"old_path": null,
"new_path": "docker/shell.nix",
"diff": "+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+{ pkgs, ...}:\n+with pkgs;\n+mkShell {\n+ buildInputs = [\n+ python3\n+ ];\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "flake.nix",
"new_path": "flake.nix",
"diff": "devShells = {\nbuildkite = callPackage ./.buildkite/shell.nix {};\n+ docker-tezos-packages = callPackage ./docker/shell.nix {};\nautorelease = callPackage ./scripts/shell.nix {};\ndev = callPackage ./shell.nix { pkgs = unstable; };\n};\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Update CI
Problem: CI steps still using deprecated shell script.
Solution: Use python script instead. |
603,660 | 29.10.2022 10:21:54 | -10,800 | 9242c2ce0e8c7b11aed4156d6922ae59687ab9e4 | [Chore] Update documentation
Problem: We use new script for building native
packages now. Thus, documentation doc should be updated.
Solution: Update it. | [
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -51,12 +51,12 @@ to copying the binaries instead of building again from scratch.\nUsing Ubuntu/Debian and assuming all Tezos binaries are located in the `binaries` directory:\n```sh\n-cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary --binaries-dir binaries\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type binary --binaries-dir binaries\n```\nUsing Fedora and assuming all Tezos binaries are located in the `binaries` directory:\n```sh\n-cd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary --binaries-dir binaries\n+cd .. && ./docker/docker-tezos-packages.py --os fedora --type binary --binaries-dir binaries\n```\nThe resulting packages will be located in `../out` directory.\n@@ -65,28 +65,40 @@ The resulting packages will be located in `../out` directory.\nWe provide a way to build both binary and source native Ubuntu packages.\n-[`docker-tezos-packages.sh`](docker-tezos-packages.sh) script with `ubuntu` argument\n+[`docker-tezos-packages.py`](docker-tezos-packages.py) script with `ubuntu` argument\nwill build source or binary packages depending on the passed argument (`source` and `binary` respectively).\nThis script builds packages inside docker image defined in [Dockerfile-ubuntu](package/Dockerfile-ubuntu).\n-This script uses [python script](package/package_generator.py) which generates meta information for\n+This script uses [another script](package/package_generator.py), which generates meta information for\ntezos packages based on information defined in [meta.json](../meta.json) and current tezos\nversion defined in [meta.json](../meta.json) and build native ubuntu packages.\n+To see all available options, run:\n+```\n+./docker-tezos-packages.py --help\n+```\n+\n### `.deb` packages\nIn order to build binary `.deb` packages specify `OCTEZ_VERSION` and\nrun the following command:\n```\nexport OCTEZ_VERSION=\"v14.1\"\n-cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type binary\n```\n-It is also possible to build single package. In order to do that run the following:\n+It is also possible to specify packages to build with `-p` or `--packages` option. In order to do that run the following:\n```\n-# cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package <tezos-binary-name>\n+# cd .. && ./docker/docker-tezos-packages.py -os ubuntu --type binary --packages <tezos-binary-1> <tezos-binary-2>\n# Example for baker\nexport OCTEZ_VERSION=\"v14.1\"\n-cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type binary --package tezos-baker-PtKathma\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type binary -p tezos-client tezos-node\n+```\n+\n+In order to choose specific ubuntu distribution to build for (see [support policy](../docs/support-policy.md)),\n+use `-d` or `--distributions` option:\n+```\n+export OCTEZ_VERSION=\"v14.1\"\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type binary -d focal jammy -p tezos-client tezos-node\n```\nThe build can take some time due to the fact that we build tezos and its dependencies\n@@ -104,9 +116,9 @@ sudo apt install <path to deb file>\nIn order to build source packages run the following commands:\n```\nexport OCTEZ_VERSION=\"v14.1\"\n-cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type source\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type source\n# you can also build single source package\n-cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type source --package tezos-baker-PtKathma\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type source --packages tezos-client\n```\nOnce the packages build is complete `../out` directory will contain files required\n@@ -168,7 +180,7 @@ Otherwise, Launchpad will prohibit the build of the new release.\nIn order to build new proper source package using existing source archive run the following:\n```\n-cd .. && ./docker/docker-tezos-packages.sh --os ubuntu --type source --package tezos-client --sources <path to .orig.tar.gz>\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type source -p tezos-client --sources <path to .orig.tar.gz>\n```\nAfter that, the resulting source package can be signed and uploaded to the Launchpad using the commands\n@@ -178,24 +190,36 @@ described previously.\nWe provide a way to build both binary(`.rpm`) and source(`.src.rpm`) native Fedora packages.\n-[`docker-tezos-packages.sh`](docker-tezos-packages.sh) script with `fedora` argument\n+[`docker-tezos-packages.py`](docker-tezos-packages.py) script with `fedora` argument\nwill build source or binary packages depending on the passed argument (`source` and `binary` respectively).\n+To see all available options, run:\n+```\n+./docker-tezos-packages.py --help\n+```\n+\n### `.rpm` packages\nIn order to build binary `.rpm` packages specify `OCTEZ_VERSION` and\nrun the following command:\n```\nexport OCTEZ_VERSION=\"v14.1\"\n-cd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary\n+cd .. && ./docker/docker-tezos-packages.py --os fedora --type binary\n```\n-It is also possible to build single package. In order to do that run the following:\n+It is also possible to specify packages to build with `-p` or `--packages` option. In order to do that run the following:\n```\n-# cd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary --package <tezos-binary-name>\n+# cd .. && ./docker/docker-tezos-packages.py --os fedora --type binary --packages <tezos-binary-1> <tezos-binary-2>\n# Example for baker\nexport OCTEZ_VERSION=\"v14.1\"\n-cd .. && ./docker/docker-tezos-packages.sh --os fedora --type binary --package tezos-baker-PtKathma\n+cd .. && ./docker/docker-tezos-packages.py --os fedora --type binary -p tezos-client tezos-node\n+```\n+\n+In order to build packages for specific Fedora distribution (see [support policy](../docs/support-policy.md)),\n+use `-d` or `--distributions` option:\n+```\n+export OCTEZ_VERSION=\"v14.1\"\n+cd .. && ./docker/docker-tezos-packages.py --os fedora -d 36 --type binary -p tezos-baking\n```\nThe build can take some time due to the fact that we build tezos and its dependencies\n@@ -203,19 +227,22 @@ from scratch for each package individually.\nOnce the build is completed the packages will be located in `../out` directory.\n-In order to install `.rpm` package run the following command:\n+In order to install `.rpm` package run either of these commands:\n```\nsudo yum localinstall <path to rpm file>\n```\n+```\n+sudo dnf install <path to rpm file>\n+```\n### `.src.rpm` packages and publishing them on Copr\nIn order to build source packages run the following commands:\n```\nexport OCTEZ_VERSION=\"v14.1\"\n-cd .. && ./docker/docker-tezos-packages.sh --os fedora --type source\n+cd .. && ./docker/docker-tezos-packages.py --os fedora --type source\n# you can also build single source package\n-cd .. && ./docker/docker-tezos-packages.sh --os fedora --type source --package tezos-baker-PtKathma\n+cd .. && ./docker/docker-tezos-packages.py --os fedora --type source -p tezos-client\n```\nSign source packages:\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Update documentation
Problem: We use new script for building native
packages now. Thus, documentation doc should be updated.
Solution: Update it. |
603,660 | 29.10.2022 11:06:53 | -10,800 | c6e68f81500a84324a539cef4fddae4dcb063613 | [Chore] Add `tezos-sapling-params` to package dict
Problem: There is no good reason for this package
to be separate from others, since it breaks the consistency
and it's not long time to build it.
Solution: Add it to package dict. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -457,8 +457,13 @@ for proto in active_protocols:\n}\n)\n-sapling_package = TezosSaplingParamsPackage(\n- meta=packages_meta, params_revision=\"95911b0639ff01807b8fd7b9e36d508e657d80a8\"\n+packages.append(\n+ {\n+ \"tezos-sapling-params\": TezosSaplingParamsPackage(\n+ meta=packages_meta,\n+ params_revision=\"95911b0639ff01807b8fd7b9e36d508e657d80a8\",\n+ )\n+ }\n)\npackages.append(\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add `tezos-sapling-params` to package dict
Problem: There is no good reason for this package
to be separate from others, since it breaks the consistency
and it's not long time to build it.
Solution: Add it to package dict. |
603,660 | 15.11.2022 10:49:01 | -10,800 | 6f05d974c1932cfaf51da5fde1e60e2c18d27d65 | Amend validation for `generate-fresh-key`
Problem: It's impossible to dry-run delegate registration
on lima due to bug.
Solution: Remove `--dry-run` and succeed when registration
successful. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/wizard_structure.py",
"new_path": "docker/package/wizard_structure.py",
"diff": "@@ -715,13 +715,13 @@ class Setup:\nf\"Waiting for funds to arrive... (Ctrl + C to choose another option).\"\n)\ntry:\n- # dry-run delegate registration until it succeeds\nwhile True:\nresult = get_proc_output(\nf\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} \"\n- f\"register key {baker_alias} as delegate --dry-run\"\n+ f\"register key {baker_alias} as delegate\"\n)\nif result.returncode == 0:\n+ print(result.stdout.decode(\"utf8\"))\nbreak\nelse:\nproc_call(\"sleep 1\")\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#564] Amend validation for `generate-fresh-key`
Problem: It's impossible to dry-run delegate registration
on lima due to bug.
Solution: Remove `--dry-run` and succeed when registration
successful. |
603,660 | 19.11.2022 10:06:34 | -10,800 | a580b7d2bb51e041e94a8c81a00715c8367553ca | Simplify wizards' names
Problem: The names are unnecessarily long and word "wizard" at
the end is not all that useful, especially if/when these tools
get non-interactive mode implemented.
Solution: Rename to tezos-setup and tezos-vote. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -674,7 +674,7 @@ echo \"**************************************************************************\necho \"** Note: this version adds context pruning, which will prevent the disk\"\necho \"** space used by the node from growing indefinitely. If you have an\"\necho \"** existing node or baking setup running, it is recommended to import\"\n-echo \"** a fresh snapshot. You can re-run tezos-setup-wizard to do so.\"\n+echo \"** a fresh snapshot. You can re-run tezos-setup to do so.\"\necho \"\"\necho \"** You can read more about it here:\"\necho \"** http://tezos.gitlab.io/releases/version-15.html#context-pruning-requirements\"\n@@ -745,8 +745,8 @@ Maintainer: {self.meta.maintainer}\n%py3_install\n{systemd_install}\n%files\n-%{{_bindir}}/tezos-setup-wizard\n-%{{_bindir}}/tezos-voting-wizard\n+%{{_bindir}}/tezos-setup\n+%{{_bindir}}/tezos-vote\n%{{python3_sitelib}}/tezos_baking-*.egg-info/\n%{{python3_sitelib}}/tezos_baking/\n%license LICENSE\n@@ -766,8 +766,8 @@ setup(\nversion='{self.meta.version}',\nentry_points=dict(\nconsole_scripts=[\n- 'tezos-setup-wizard=tezos_baking.tezos_setup_wizard:main',\n- 'tezos-voting-wizard=tezos_baking.tezos_voting_wizard:main',\n+ 'tezos-setup=tezos_baking.tezos_setup_wizard:main',\n+ 'tezos-vote=tezos_baking.tezos_voting_wizard:main',\n]\n)\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_setup_wizard.py",
"new_path": "docker/package/tezos_setup_wizard.py",
"diff": "@@ -557,7 +557,7 @@ def main():\n+ \".service\"\n)\nprint(\"Error in Tezos Setup Wizard, exiting.\")\n- logfile = \"tezos_setup_wizard.log\"\n+ logfile = \"tezos_setup.log\"\nwith open(logfile, \"a\") as f:\nf.write(str(e) + \"\\n\")\nprint(\"The error has been logged to\", os.path.abspath(logfile))\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_voting_wizard.py",
"new_path": "docker/package/tezos_voting_wizard.py",
"diff": "@@ -192,7 +192,7 @@ class Setup(Setup):\nreturn True\nexcept:\nprint(f\"No local baking services for {net} running on this machine.\")\n- print(\"If there should be, you can run 'tezos-setup-wizard' to set it up.\")\n+ print(\"If there should be, you can run 'tezos-setup' to set it up.\")\nprint()\nreturn False\n@@ -468,7 +468,7 @@ def main():\nsys.exit(1)\nexcept Exception as e:\nprint(\"Error in Tezos Voting Wizard, exiting.\")\n- logfile = \"tezos_voting_wizard.log\"\n+ logfile = \"tezos_vote.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 | [#569] Simplify wizards' names
Problem: The names are unnecessarily long and word "wizard" at
the end is not all that useful, especially if/when these tools
get non-interactive mode implemented.
Solution: Rename to tezos-setup and tezos-vote. |
603,660 | 19.11.2022 10:14:22 | -10,800 | 475b3608ab17a6f723df68e6d6821ce495d6a012 | Update documentation
Problem: CLI utilities were renamed.
Solution: Update documentation accordingly. | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -25,8 +25,10 @@ setup wizard:\n```\nsudo add-apt-repository -yu ppa:serokell/tezos\nsudo apt-get install -y tezos-baking\n-tezos-setup-wizard\n+tezos-setup\n```\n+> :warning: Since [#570](https://github.com/serokell/tezos-packaging/pull/570), this wizard was renamed from `tezos-setup-wizard`.\n+\nRead [the dedicated article](./docs/baking.md) to find out more about the setup,\nthe binaries, and the services used.\n@@ -39,8 +41,10 @@ An interactive voting wizard is provided for Ubuntu. After setting up a baking i\non mainnet, you can vote by running:\n```bash\n-tezos-voting-wizard\n+tezos-vote\n```\n+> :warning: Since [#570](https://github.com/serokell/tezos-packaging/pull/570), this wizard was renamed from `tezos-voting-wizard`.\n+\nRead the [documentation on voting](./docs/voting.md) to find out more details about\nvoting on custom networks.\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/baking.md",
"new_path": "docs/baking.md",
"diff": "@@ -40,7 +40,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-This package also provides a `tezos-setup-wizard` CLI utility, designed to\n+This package also provides a `tezos-setup` CLI utility, designed to\nquery all necessary configuration options and use the answers to automatically set up\na baking instance.\n@@ -94,7 +94,7 @@ protocol is activated, the `tezos-baking` package is updated again to stop runni\nIf at this point you want to set up the baking instance, or just a node, using the wizard, run:\n```\n-tezos-setup-wizard\n+tezos-setup\n```\nThis wizard closely follows this guide, so for most setups it won't be necessary to follow\n@@ -306,7 +306,7 @@ multipass shell tezos\n1) Install `tezos-baking` package following [these instructions](#add-repository).\n-2) Run `tezos-setup-wizard` and follow the instructions there.\n+2) Run `tezos-setup` and follow the instructions there.\n<details>\n<summary>\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/service-options.md",
"new_path": "docs/service-options.md",
"diff": "@@ -27,12 +27,12 @@ sudo systemctl restart tezos-node-mainnet.service\n```\nin order for the changes to take effect.\n-In case you [set up baking using the `tezos-setup-wizard`](./baking.md), running:\n+In case you [set up baking using the `tezos-setup`](./baking.md), running:\n```sh\nsudo systemctl restart tezos-baking-<network>.service\n```\nwill be sufficient, as all the services involved will be restarted.\n-Running again `tezos-setup-wizard` and following the setup process is also an option.\n+Running again `tezos-setup` and following the setup process is also an option.\n## Utility node scripts\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/tests/voting.md",
"new_path": "docs/tests/voting.md",
"diff": "@@ -74,7 +74,7 @@ The script will stop at the beginning of each voting period that requires voting\nLaunch the wizard by running:\n```bash\n-tezos-voting-wizard --network voting\n+tezos-vote --network voting\n```\nUnder normal conditions, you won't have to adjust any information about your baking service.\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/voting.md",
"new_path": "docs/voting.md",
"diff": "@@ -19,7 +19,7 @@ it is Tezos Setup Wizard. See the [baking](./baking.md#prerequisites) article fo\nAfter all the services required for baking have been set up, run:\n```bash\n-tezos-voting-wizard\n+tezos-vote\n```\nThe wizard displays the voting period and offers approppriate possible actions for that period.\n@@ -28,26 +28,26 @@ The wizard displays the voting period and offers approppriate possible actions f\n## Using custom networks\n-`tezos-voting-wizard` supports voting on custom networks, in turn enabled by `tezos-packaging`'s\n+`tezos-vote` supports voting on custom networks, in turn enabled by `tezos-packaging`'s\nsupport for custom chain systemd services. The process to set up a custom baking instance is\ndocumented [here](./baking.md#using-a-custom-chain).\nAfter the custom baking instance is fully set up, you can vote or propose amendments on it by running:\n```bash\n-tezos-voting-wizard --network <custom-network-name>\n+tezos-vote --network <custom-network-name>\n```\nE.g. if you have a custom baking instance `tezos-baking-custom@voting`, you can run:\n```bash\n-tezos-voting-wizard --network voting\n+tezos-vote --network voting\n```\n## Using testnets\n-`tezos-voting-wizard` also supports voting on currently running testnets, for example:\n+`tezos-vote` also supports voting on currently running testnets, for example:\n```bash\n-tezos-voting-wizard --network kathmandunet\n+tezos-vote --network kathmandunet\n```\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#569] Update documentation
Problem: CLI utilities were renamed.
Solution: Update documentation accordingly. |
603,660 | 05.12.2022 18:45:01 | -10,800 | 1b2060c1a0ce5d54b1ea73407e6847c6c4bb7792 | [Chore] Add fallback `opam-repository`
Problem: As with v15.1 octez release, `opam-nix` failed
to resolve all required dependencies with `opam-repository`
pinned by `tezos` team.
Solution: Add fresh fallback `opam-repository` from `ocaml` repo. | [
{
"change_type": "MODIFY",
"old_path": "flake.lock",
"new_path": "flake.lock",
"diff": "\"nix-unstable\": {\n\"inputs\": {\n\"lowdown-src\": \"lowdown-src_2\",\n- \"nixpkgs\": \"nixpkgs_5\",\n+ \"nixpkgs\": \"nixpkgs_4\",\n\"nixpkgs-regression\": \"nixpkgs-regression_2\"\n},\n\"locked\": {\n}\n},\n\"nixpkgs_4\": {\n- \"locked\": {\n- \"lastModified\": 1640418986,\n- \"narHash\": \"sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=\",\n- \"owner\": \"NixOS\",\n- \"repo\": \"nixpkgs\",\n- \"rev\": \"5c37ad87222cfc1ec36d6cd1364514a9efc2f7f2\",\n- \"type\": \"github\"\n- },\n- \"original\": {\n- \"owner\": \"nixos\",\n- \"ref\": \"nixos-unstable\",\n- \"repo\": \"nixpkgs\",\n- \"type\": \"github\"\n- }\n- },\n- \"nixpkgs_5\": {\n\"locked\": {\n\"lastModified\": 1653988320,\n\"narHash\": \"sha256-ZaqFFsSDipZ6KVqriwM34T739+KLYJvNmCWzErjAg7c=\",\n\"type\": \"github\"\n}\n},\n- \"nixpkgs_6\": {\n+ \"nixpkgs_5\": {\n\"locked\": {\n\"lastModified\": 1655108282,\n\"narHash\": \"sha256-snIu1rBgc+IwoG+mjvp2Thq9C5L+RYvV/DEdfYVzp2s=\",\n\"mirage-opam-overlays\": \"mirage-opam-overlays\",\n\"nixpkgs\": \"nixpkgs_3\",\n\"opam-overlays\": \"opam-overlays\",\n- \"opam-repository\": [\n- \"opam-repository\"\n- ],\n+ \"opam-repository\": \"opam-repository\",\n\"opam2json\": \"opam2json\"\n},\n\"locked\": {\n- \"lastModified\": 1663958540,\n- \"narHash\": \"sha256-5IFRW65Bonu0KphZig1pT2EJvm4lLLUYddHGZiQTYDA=\",\n+ \"lastModified\": 1670004517,\n+ \"narHash\": \"sha256-7SffiN2S9pVfOoBCcEdY/iJe28p/eiRqVLXG7/8Jb3I=\",\n\"owner\": \"tweag\",\n\"repo\": \"opam-nix\",\n- \"rev\": \"c7430da9ade302bad75f7e4cfacd9eca12783cca\",\n+ \"rev\": \"b12b7fcd6f9ea0a8a939c05c68a95525f0d80af6\",\n\"type\": \"github\"\n},\n\"original\": {\n}\n},\n\"opam-repository\": {\n+ \"flake\": false,\n+ \"locked\": {\n+ \"lastModified\": 1661161626,\n+ \"narHash\": \"sha256-J3P+mXLwE2oEKTlMnx8sYRxwD/uNGSKM0AkAB7BNTxA=\",\n+ \"owner\": \"ocaml\",\n+ \"repo\": \"opam-repository\",\n+ \"rev\": \"54e69ff0949a3aaec0d5e3d67898bb7f279ab09f\",\n+ \"type\": \"github\"\n+ },\n+ \"original\": {\n+ \"owner\": \"ocaml\",\n+ \"repo\": \"opam-repository\",\n+ \"type\": \"github\"\n+ }\n+ },\n+ \"opam-repository_2\": {\n\"flake\": false,\n\"locked\": {\n\"lastModified\": 1666872443,\n},\n\"opam2json\": {\n\"inputs\": {\n- \"nixpkgs\": \"nixpkgs_4\"\n+ \"nixpkgs\": [\n+ \"opam-nix\",\n+ \"nixpkgs\"\n+ ]\n},\n\"locked\": {\n- \"lastModified\": 1651529032,\n- \"narHash\": \"sha256-fe8bm/V/4r2iNxgbitT2sXBqDHQ0GBSnSUSBg/1aXoI=\",\n+ \"lastModified\": 1665671715,\n+ \"narHash\": \"sha256-7f75C6fIkiLzfkwLpJxlQIKf+YORGsXGV8Dr2LDDi+A=\",\n\"owner\": \"tweag\",\n\"repo\": \"opam2json\",\n- \"rev\": \"e8e9f2fa86ef124b9f7b8db41d3d19471c1d8901\",\n+ \"rev\": \"32fa2dcd993a27f9e75ee46fb8b78a7cd5d05113\",\n\"type\": \"github\"\n},\n\"original\": {\n\"nixpkgs\": \"nixpkgs_2\",\n\"nixpkgs-unstable\": \"nixpkgs-unstable\",\n\"opam-nix\": \"opam-nix\",\n- \"opam-repository\": \"opam-repository\",\n+ \"opam-repository\": \"opam-repository_2\",\n\"serokell-nix\": \"serokell-nix\",\n\"tezos\": \"tezos\"\n}\n\"flake-utils\": \"flake-utils_3\",\n\"gitignore-nix\": \"gitignore-nix\",\n\"nix-unstable\": \"nix-unstable\",\n- \"nixpkgs\": \"nixpkgs_6\"\n+ \"nixpkgs\": \"nixpkgs_5\"\n},\n\"locked\": {\n\"lastModified\": 1629443741,\n"
},
{
"change_type": "MODIFY",
"old_path": "flake.nix",
"new_path": "flake.nix",
"diff": "nix.url = \"github:nixos/nix\";\nopam-nix.url = \"github:tweag/opam-nix\";\n- opam-nix.inputs.opam-repository.follows = \"opam-repository\";\nflake-compat.flake = false;\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/ocaml-overlay.nix",
"new_path": "nix/build/ocaml-overlay.nix",
"diff": "@@ -13,7 +13,10 @@ with opam-nix.lib.${self.system}; let\noctezSourcesResolved =\nself.runCommand \"resolve-octez-sources\" {} \"cp --no-preserve=all -Lr ${sources.tezos} $out\";\noctezScope = buildOpamProject' {\n- repos = [sources.opam-repository];\n+ repos = [\n+ sources.opam-repository\n+ opam-nix.inputs.opam-repository\n+ ];\nrecursive = true;\nresolveArgs = { };\n} octezSourcesResolved { };\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add fallback `opam-repository`
Problem: As with v15.1 octez release, `opam-nix` failed
to resolve all required dependencies with `opam-repository`
pinned by `tezos` team.
Solution: Add fresh fallback `opam-repository` from `ocaml` repo. |
603,660 | 05.12.2022 22:08:00 | -10,800 | e27416f7f5f6552e6126f008c13c9285c7cb7244 | [Chore] Exclude dev deps for native packaging
Problem: v15.1 octez release come with the dev deps opam file
which is redundant and breaks installation process.
Solution: Doesn't provide `octez-dev-deps.opam` as dependency to install. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/build-binary.sh",
"new_path": "docker/package/scripts/build-binary.sh",
"diff": "@@ -17,7 +17,10 @@ opam switch create . --repositories=local --no-install\neval \"$(opam env)\"\nopams=()\nwhile IFS= read -r -d $'\\0'; do\n+ # we exclude optional development packages\n+ if [ \"$REPLY\" != \"./opam/virtual/octez-dev-deps.opam\" ]; then\nopams+=(\"$REPLY\")\n+ fi\ndone < <(find ./vendors ./src ./tezt ./opam -name \\*.opam -print0)\nexport CFLAGS=\"-fPIC ${CFLAGS:-}\"\nopam install \"${opams[@]}\" --deps-only --criteria=\"-notuptodate,-changed,-removed\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Exclude dev deps for native packaging
Problem: v15.1 octez release come with the dev deps opam file
which is redundant and breaks installation process.
Solution: Doesn't provide `octez-dev-deps.opam` as dependency to install. |
603,660 | 05.12.2022 22:27:59 | -10,800 | eca2cd380d83a24e2b86f7aff6c4474dd5f04a60 | [Chore] Filter out redundant opam file for nix
Problem: v15.1 octez release come with the dev deps opam file
which is redundant and breaks installation process.
Solution: Filter out `octez-dev-deps.opam` from source repo. | [
{
"change_type": "MODIFY",
"old_path": "flake.nix",
"new_path": "flake.nix",
"diff": "outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, flake-utils, serokell-nix, nix, ... }:\nlet\npkgs-darwin = nixpkgs-unstable.legacyPackages.\"aarch64-darwin\";\n-\nprotocols = nixpkgs.lib.importJSON ./protocols.json;\nmeta = nixpkgs.lib.importJSON ./meta.json;\n- sources = { inherit (inputs) tezos opam-repository; };\n+\n+ tezos = builtins.path {\n+ path = inputs.tezos;\n+ name = \"tezos\";\n+ # we exclude optional development packages\n+ filter = path: _: baseNameOf path != \"octez-dev-deps.opam\";\n+ };\n+ sources = { inherit tezos; inherit (inputs) opam-repository; };\nocaml-overlay = import ./nix/build/ocaml-overlay.nix (inputs // { inherit sources protocols meta; });\nin pkgs-darwin.lib.recursiveUpdate\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/ocaml-overlay.nix",
"new_path": "nix/build/ocaml-overlay.nix",
"diff": "@@ -13,10 +13,7 @@ with opam-nix.lib.${self.system}; let\noctezSourcesResolved =\nself.runCommand \"resolve-octez-sources\" {} \"cp --no-preserve=all -Lr ${sources.tezos} $out\";\noctezScope = buildOpamProject' {\n- repos = [\n- sources.opam-repository\n- opam-nix.inputs.opam-repository\n- ];\n+ repos = [sources.opam-repository];\nrecursive = true;\nresolveArgs = { };\n} octezSourcesResolved { };\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Filter out redundant opam file for nix
Problem: v15.1 octez release come with the dev deps opam file
which is redundant and breaks installation process.
Solution: Filter out `octez-dev-deps.opam` from source repo. |
603,652 | 16.12.2022 11:40:27 | -28,800 | 9a769ae9ba95f010a47b0c445c4c49e0e15afcb5 | [Chore] Bump nixpkgs
Problem: We recently updated our nixpkgs fork. However,
this repo still uses the old revision.
Solution: Bump nixpkgs. | [
{
"change_type": "MODIFY",
"old_path": "flake.lock",
"new_path": "flake.lock",
"diff": "},\n\"nixpkgs_2\": {\n\"locked\": {\n- \"lastModified\": 1632495107,\n- \"narHash\": \"sha256-4NGE56r+FJGBaCYu3CTH4O83Ys4TrtnEPXrvdwg1TDs=\",\n+ \"lastModified\": 1667318090,\n+ \"narHash\": \"sha256-AvxgT+t1BWZs8IfdseHl8+7wvWWm9pvysupMT9wXdH0=\",\n\"owner\": \"serokell\",\n\"repo\": \"nixpkgs\",\n- \"rev\": \"be220b2dc47092c1e739bf6aaf630f29e71fe1c4\",\n+ \"rev\": \"4bce79cf151aad3c0bed46a32bdb4b165f00cb7e\",\n\"type\": \"github\"\n},\n\"original\": {\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-binaries.nix",
"new_path": "tests/tezos-binaries.nix",
"diff": "let\nin import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n{\n+ name = \"tezos-binaries-test\";\nnodes.machine = { ... }: {\nvirtualisation.memorySize = 2048;\nvirtualisation.diskSize = 1024;\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-modules.nix",
"new_path": "tests/tezos-modules.nix",
"diff": "@@ -6,6 +6,7 @@ let\nin\nimport \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n{\n+ name = \"tezos-modules-test\";\nmachine = { ... }: {\nvirtualisation.memorySize = 1024;\nvirtualisation.diskSize = 1024;\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/tezos-nix-binaries.nix",
"new_path": "tests/tezos-nix-binaries.nix",
"diff": "@@ -7,6 +7,7 @@ let\noctez-accuser-PtKathma octez-baker-PtKathma;\nin import \"${nixpkgs}/nixos/tests/make-test-python.nix\" ({ ... }:\n{\n+ name = \"tezos-nix-binaries-test\";\nnodes.machine = { ... }: {\nvirtualisation.memorySize = 1024;\nvirtualisation.diskSize = 1024;\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Bump nixpkgs
Problem: We recently updated our nixpkgs fork. However,
this repo still uses the old revision.
Solution: Bump nixpkgs. |
603,659 | 21.12.2022 14:01:05 | -10,800 | 7f18f700a117a70e1c9373428f85a589c7e3135b | [Chore] Fix ubuntu rules file for systemd
Problem: Supplied systemd service should be disabled by default.
However, for some reason, they are enabled automatically after
installation for baker, accuser and tx-node packages.
Solution: Be very explicit about systemd installation in debhelper rules. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -195,8 +195,8 @@ def mk_dh_flags(package):\ndef gen_systemd_rules_contents(package, binaries_dir=None):\n- override_dh_install_init = \"override_dh_installinit:\\n\"\npackage_name = package.name.lower()\n+ units = set()\nfor systemd_unit in package.systemd_units:\nif systemd_unit.instances is None:\nif systemd_unit.suffix is not None:\n@@ -208,20 +208,41 @@ def gen_systemd_rules_contents(package, binaries_dir=None):\nunit_name = f\"{package_name}-{systemd_unit.suffix}@\"\nelse:\nunit_name = f\"{package_name}@\"\n- override_dh_install_init += f\" dh_installinit --name={unit_name}\\n\"\n+ units.add(unit_name)\n+ override_dh_install_init = \"override_dh_installinit:\\n\" + \"\\n\".join(\n+ f\" dh_installinit --name={unit_name}\" for unit_name in units\n+ )\n+ override_dh_auto_install = (\n+ \"override_dh_auto_install:\\n\"\n+ + \" dh_auto_install\\n\"\n+ + \"\\n\".join(\n+ f\" dh_installsystemd --no-enable --no-start --name={unit_name} {unit_name}.service\"\n+ for unit_name in units\n+ )\n+ )\n+ splice_if = lambda cond: lambda string: string if cond else \"\"\n+ pybuild_splice = splice_if(package.buildfile == \"setup.py\")\nrules_contents = f\"\"\"#!/usr/bin/make -f\n-{\"export DEB_BUILD_OPTIONS=nostrip\" if binaries_dir is not None else \"\"}\n-export DEB_CFLAGS_APPEND=-fPIC\n# Disable usage of instructions from the ADX extension to avoid incompatibility\n# with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\nexport BLST_PORTABLE=yes\n-{f\"export PYBUILD_NAME={package_name}\" if package.buildfile == \"setup.py\" else \"\"}\n+{splice_if(binaries_dir)(\"export DEB_BUILD_OPTIONS=nostrip\")}\n+{pybuild_splice(f\"export PYBUILD_NAME={package_name}\")}\n+export DEB_CFLAGS_APPEND=-fPIC\n%:\ndh $@ {mk_dh_flags(package)}\n+\n+override_dh_systemd_enable:\n+ dh_systemd_enable {pybuild_splice(\"-O--buildsystem=pybuild\")} --no-enable\n+\noverride_dh_systemd_start:\n- dh_systemd_start --no-start\n-{override_dh_install_init if len(package.systemd_units) > 1 else \"\"}\"\"\"\n+ dh_systemd_start {pybuild_splice(\"-O--buildsystem=pybuild\")} --no-start\n+\n+{override_dh_auto_install if len(package.systemd_units) > 1 else \"\"}\n+\n+{override_dh_install_init if len(package.systemd_units) > 1 else \"\"}\n+\"\"\"\nreturn rules_contents\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fix ubuntu rules file for systemd
Problem: Supplied systemd service should be disabled by default.
However, for some reason, they are enabled automatically after
installation for baker, accuser and tx-node packages.
Solution: Be very explicit about systemd installation in debhelper rules. |
603,650 | 03.01.2023 17:18:24 | -3,600 | a1cafc9f38953e0ce6b92bbf5f37f3e5be4fbc48 | [Chore] Bump release number
Problem: we want release a new set of packages soon with recent
changes, so we need to increase the version number.
Solution: bump the release number and tezos-baking's letter version. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -598,7 +598,7 @@ class TezosBakingServicesPackage(AbstractPackage):\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 = \"\"\n+ letter_version = \"a\"\nbuildfile = \"setup.py\"\n"
},
{
"change_type": "MODIFY",
"old_path": "meta.json",
"new_path": "meta.json",
"diff": "{\n- \"release\": \"1\",\n+ \"release\": \"2\",\n\"maintainer\": \"Serokell <hi@serokell.io>\",\n\"tezos_ref\": \"v15.1\"\n}\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Bump release number
Problem: we want release a new set of packages soon with recent
changes, so we need to increase the version number.
Solution: bump the release number and tezos-baking's letter version. |
603,659 | 25.12.2022 13:30:28 | -10,800 | bd2ecfbf38b22ffd1f744b403e93317889c0ce0c | Set minimum python version to 3.8
Problem: Ubuntu bionic has default 3.6.5 python version,
which is too old and already created incompatility problem for us.
Solution: Make wizards use python >=3.8. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -61,7 +61,7 @@ class AbstractPackage:\nf.write(changelog_contents)\n@abstractmethod\n- def gen_rules(self, out, binaries_dir=None):\n+ def gen_rules(self, out, ubuntu_version, binaries_dir=None):\npass\ndef gen_install(self, out):\n@@ -194,7 +194,7 @@ def mk_dh_flags(package):\n)\n-def gen_systemd_rules_contents(package, binaries_dir=None):\n+def gen_systemd_rules_contents(package, ubuntu_version, binaries_dir=None):\npackage_name = package.name.lower()\nunits = set()\nfor systemd_unit in package.systemd_units:\n@@ -221,13 +221,17 @@ def gen_systemd_rules_contents(package, binaries_dir=None):\n)\n)\nsplice_if = lambda cond: lambda string: string if cond else \"\"\n- pybuild_splice = splice_if(package.buildfile == \"setup.py\")\n+ is_pybuild = package.buildfile == \"setup.py\"\n+ pybuild_splice = splice_if(is_pybuild)\nrules_contents = f\"\"\"#!/usr/bin/make -f\n# Disable usage of instructions from the ADX extension to avoid incompatibility\n# with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\nexport BLST_PORTABLE=yes\n{splice_if(binaries_dir)(\"export DEB_BUILD_OPTIONS=nostrip\")}\n-{pybuild_splice(f\"export PYBUILD_NAME={package_name}\")}\n+{pybuild_splice(f'''\n+export PYBUILD_NAME={package_name}\n+export PYBUILD_INTERPRETERS={\"python3.8\" if ubuntu_version != \"jammy\" else \"python3\"}\n+''')}\nexport DEB_CFLAGS_APPEND=-fPIC\n%:\n@@ -239,7 +243,7 @@ override_dh_systemd_enable:\noverride_dh_systemd_start:\ndh_systemd_start {pybuild_splice(\"-O--buildsystem=pybuild\")} --no-start\n-{override_dh_auto_install if len(package.systemd_units) > 1 else \"\"}\n+{override_dh_auto_install if len(package.systemd_units) > 1 and not is_pybuild else \"\"}\n{override_dh_install_init if len(package.systemd_units) > 1 else \"\"}\n\"\"\"\n@@ -440,8 +444,8 @@ install: {binary_name}\nwith open(out, \"w\") as f:\nf.write(makefile_contents)\n- def gen_rules(self, out, binaries_dir=None):\n- rules_contents = gen_systemd_rules_contents(self, binaries_dir)\n+ def gen_rules(self, out, ubuntu_version, binaries_dir=None):\n+ rules_contents = gen_systemd_rules_contents(self, ubuntu_version, binaries_dir)\nwith open(out, \"w\") as f:\nf.write(rules_contents)\n@@ -579,7 +583,7 @@ install: tezos-sapling-params\nwith open(out, \"w\") as f:\nf.write(file_contents)\n- def gen_rules(self, out, binaries_dir=None):\n+ def gen_rules(self, out, ubuntu_version, binaries_dir=None):\nrules_contents = \"\"\"#!/usr/bin/make -f\n%:\n@@ -720,14 +724,14 @@ Source: {self.name}\nSection: utils\nPriority: optional\nMaintainer: {self.meta.maintainer}\n-Build-Depends: debhelper (>=11), {\"dh-systemd (>= 1.5), \" if ubuntu_version != \"jammy\" else \"\"} autotools-dev, dh-python, python3-all, python3-setuptools\n+Build-Depends: debhelper (>=11), {\"dh-systemd (>= 1.5), python3.8\" if ubuntu_version != \"jammy\" else \"python3-all\"}, autotools-dev, dh-python, python3-setuptools\nStandards-Version: 3.9.6\nHomepage: https://gitlab.com/tezos/tezos/\n-X-Python3-Version: >= 3.6\n+X-Python3-Version: >= 3.8\nPackage: {self.name.lower()}\nArchitecture: amd64 arm64\n-Depends: ${{shlibs:Depends}}, ${{misc:Depends}}, {run_deps}, ${{python3:Depends}}\n+Depends: ${{shlibs:Depends}}, ${{misc:Depends}}, {run_deps}, ${{python3:Depends}}{\", python3.8\" if ubuntu_version != \"jammy\" else \"\"}\nDescription: {self.desc}\n\"\"\"\nwith open(out, \"w\") as f:\n@@ -790,14 +794,19 @@ setup(\n'tezos-setup=tezos_baking.tezos_setup_wizard:main',\n'tezos-vote=tezos_baking.tezos_voting_wizard:main',\n]\n+ ),\n+ options=dict(\n+ build_scripts=dict(\n+ executable=\"/usr/bin/python3.8\"\n)\n+ ),\n)\n\"\"\"\nwith open(out, \"w\") as f:\nf.write(file_contents)\n- def gen_rules(self, out, binaries_dir=None):\n- rules_contents = gen_systemd_rules_contents(self)\n+ def gen_rules(self, out, ubuntu_version, binaries_dir=None):\n+ rules_contents = gen_systemd_rules_contents(self, ubuntu_version)\nwith open(out, \"w\") as f:\nf.write(rules_contents)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -97,7 +97,7 @@ def build_ubuntu_package(\nf.write(\"10\")\npkg.gen_install(\"debian/install\")\npkg.gen_links(\"debian/links\")\n- pkg.gen_rules(\"debian/rules\", binaries_dir)\n+ pkg.gen_rules(\"debian/rules\", ubuntu_version, binaries_dir)\npkg.gen_postinst(\"debian/postinst\")\npkg.gen_postrm(\"debian/postrm\")\npkg.gen_control_file(build_deps, ubuntu_version, \"debian/control\")\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#585] Set minimum python version to 3.8
Problem: Ubuntu bionic has default 3.6.5 python version,
which is too old and already created incompatility problem for us.
Solution: Make wizards use python >=3.8. |
603,659 | 29.12.2022 15:11:49 | -10,800 | cfa7a7515d7bd974f01c55062a9cf4caacd155e9 | Change ubuntu packages build logic
Problem: Ubuntu packages seem to be very dependent on build
environment. Package built on focal doesn't promise
to install without problems on bionic.
Solution: Parametize dockerfile and build packages for specific
distribution on that exact distribution container. | [
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.py",
"new_path": "docker/docker-tezos-packages.py",
"diff": "@@ -103,19 +103,25 @@ octez_version = os.getenv(\"OCTEZ_VERSION\", None)\nif not octez_version:\nraise Exception(\"Environment variable OCTEZ_VERSION is not set.\")\n+# copr build infrastructure uses latest stable fedora and `mock` for builds\n+# so we should also keep that way\n+# for ubuntu builds, since we lack `pbuilder` for now,\n+# packages should be built in respective containers for better reproducibility\n+images = [\"37\"] if target_os == \"fedora\" else distributions\n+\n+for dist in images:\n# prebuild docker image before using containers\ncheck_call(\nf\"\"\"\n{virtualisation_engine}\n-build -t tezos-{target_os}\n--f docker/package/Dockerfile-{target_os} .\n+ build -t tezos-{target_os}-{dist}\n+ -f docker/package/Dockerfile-{target_os} --build-arg dist={dist} .\n\"\"\"\n)\n# enclose defined above variables to shorten argument list\n-def build_packages(pkgs, distros):\n-\n+def build_packages(pkgs, image, distros):\ncmd_args = \" \".join(\n[\nf\"--os {target_os}\",\n@@ -138,7 +144,7 @@ def build_packages(pkgs, distros):\n{container_create_args}\n--env OCTEZ_VERSION={octez_version}\n--env OPAMSOLVERTIMEOUT=900\n- -t tezos-{target_os} {cmd_args}\n+ -t tezos-{target_os}-{image} {cmd_args}\n\"\"\"\n).stdout.strip()\n@@ -165,4 +171,6 @@ packages_to_build = get_packages_to_build(args.packages)\nif not args.build_sapling_package:\npackages_to_build.pop(\"tezos-sapling-params\", None)\n-build_packages(packages_to_build.keys(), distributions)\n+for image in images:\n+ dists_to_build = [image] if target_os == \"ubuntu\" else distributions\n+ build_packages(packages_to_build.keys(), image, dists_to_build)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-fedora",
"new_path": "docker/package/Dockerfile-fedora",
"diff": "# SPDX-FileCopyrightText: 2021 Oxhead Alpha\n# SPDX-License-Identifier: LicenseRef-MIT-OA\n-FROM fedora:35\n+ARG dist\n+FROM fedora:${dist}\nRUN dnf update -y\nRUN dnf install -y libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel m4 perl git pkg-config \\\nrpmdevtools python3-devel python3-setuptools wget opam rsync which cargo autoconf mock systemd systemd-rpm-macros\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-ubuntu",
"new_path": "docker/package/Dockerfile-ubuntu",
"diff": "# SPDX-FileCopyrightText: 2021 Oxhead Alpha\n# SPDX-License-Identifier: LicenseRef-MIT-OA\n-FROM ubuntu:20.04\n+ARG dist\n+FROM ubuntu:${dist}\nENV DEBIAN_FRONTEND=\"noninteractive\"\nRUN apt-get update && apt-get install -y libev-dev libgmp-dev libhidapi-dev libffi-dev zlib1g-dev libpq-dev m4 perl pkg-config \\\n- debhelper dh-make dh-systemd dh-python devscripts autotools-dev python3-all python3-setuptools wget rsync\n+ debhelper dh-make dh-python devscripts autotools-dev python3-all python3-setuptools wget rsync\n+ARG dist\n+RUN [ \"$dist\" != \"jammy\" ] && apt-get install -y python3.8 dh-systemd || true\nRUN 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\n-RUN add-apt-repository ppa:avsm/ppa -y && apt-get update && apt-get -y install opam\n+RUN [ \"$dist\" != \"jammy\" ] && add-apt-repository ppa:avsm/ppa -y || true\n+RUN apt-get update && apt-get -y install opam\nENV USER dockerbuilder\nRUN useradd dockerbuilder && mkdir /tezos-packaging\nENV HOME /tezos-packaging\n@@ -21,4 +25,6 @@ COPY docker/package/scripts /tezos-packaging/docker/package/scripts\n# Uncomment once pathces are needed once again\n# COPY docker/package/patches /tezos-packaging/docker/package/patches\nCOPY LICENSE /tezos-packaging/LICENSE\n-ENTRYPOINT [\"python3\", \"-m\", \"package.package_generator\"]\n+RUN [ \"$dist\" != \"jammy\" ] && install -m 0755 /usr/bin/python3.8 /usr/bin/builder || true\n+RUN [ \"$dist\" = \"jammy\" ] && install -m 0755 /usr/bin/python3 /usr/bin/builder || true\n+ENTRYPOINT [\"builder\", \"-m\", \"package.package_generator\"]\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -48,7 +48,7 @@ class AbstractPackage:\npass\n@abstractmethod\n- def gen_buildfile(self, out, binaries_dir=None):\n+ def gen_buildfile(self, out, ubuntu_version, binaries_dir=None):\npass\ndef gen_changelog(self, ubuntu_version, maintainer, date, out):\n@@ -423,7 +423,7 @@ ln -s %{{_bindir}}/{binary_name} %{{buildroot}}/%{{_bindir}}/{self.name}\nwith open(out, \"w\") as f:\nf.write(file_contents)\n- def gen_buildfile(self, out, binaries_dir=None):\n+ def gen_buildfile(self, out, ubuntu_version, binaries_dir=None):\nbinary_name = self.name.replace(\"tezos\", \"octez\")\nmakefile_contents = f\"\"\"\n.PHONY: install\n@@ -567,7 +567,7 @@ install -m 0755 sapling-output.params %{{buildroot}}/%{{_datadir}}/zcash-params\nwith open(out, \"w\") as f:\nf.write(file_contents)\n- def gen_buildfile(self, out, binaries_dir=None):\n+ def gen_buildfile(self, out, ubuntu_version, binaries_dir=None):\nfile_contents = \"\"\"\n.PHONY: install\n@@ -781,7 +781,8 @@ Maintainer: {self.meta.maintainer}\nwith open(out, \"w\") as f:\nf.write(file_contents)\n- def gen_buildfile(self, out, binaries_dir=None):\n+ def gen_buildfile(self, out, ubuntu_version, binaries_dir=None):\n+ interpreter = \"python3.8\" if ubuntu_version != \"jammy\" else \"python3\"\nfile_contents = f\"\"\"\nfrom setuptools import setup\n@@ -797,7 +798,7 @@ setup(\n),\noptions=dict(\nbuild_scripts=dict(\n- executable=\"/usr/bin/python3.8\"\n+ executable=\"/usr/bin/{interpreter}\"\n)\n),\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -16,6 +16,7 @@ def build_ubuntu_package(\nsource_archive_path: str = None,\nbinaries_dir: str = None,\n):\n+ for ubuntu_version in ubuntu_versions:\n# ubuntu prohibits uppercase in packages names\npkg_name = pkg.name.lower()\nold_version = pkg.meta.version\n@@ -26,13 +27,15 @@ def build_ubuntu_package(\ndate = subprocess.check_output([\"date\", \"-R\"]).decode().strip()\nif source_archive_path is None:\npkg.fetch_sources(dir, binaries_dir)\n- pkg.gen_buildfile(\"/\".join([dir, pkg.buildfile]), binaries_dir)\n+ pkg.gen_buildfile(\n+ \"/\".join([dir, pkg.buildfile]), ubuntu_version, binaries_dir\n+ )\nsubprocess.run([\"tar\", \"-czf\", f\"{dir}.tar.gz\", dir], check=True)\nelse:\nshutil.copy(f\"{cwd}/../{source_archive_path}\", f\"{dir}.tar.gz\")\nsubprocess.run([\"tar\", \"-xzf\", f\"{dir}.tar.gz\"], check=True)\npkg.meta.version = fixed_version\n- for ubuntu_version in ubuntu_versions:\n+\nos.chdir(dir)\nsubprocess.run([\"rm\", \"-r\", \"debian\"])\nsubprocess.run([\"dh_make\", \"-syf\" f\"../{dir}.tar.gz\"], check=True)\n@@ -106,7 +109,7 @@ def build_ubuntu_package(\npkg.gen_license(\"debian/copyright\")\npkg.meta.version = fixed_version\nsubprocess.run(\n- \"rm debian/*.ex debian/*.EX debian/README*\", shell=True, check=True\n+ \"rm -f debian/*.ex debian/*.EX debian/README*\", shell=True, check=True\n)\npkg.gen_changelog(ubuntu_version, pkg.meta.maintainer, date, \"debian/changelog\")\nsubprocess.run(\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#585] Change ubuntu packages build logic
Problem: Ubuntu packages seem to be very dependent on build
environment. Package built on focal doesn't promise
to install without problems on bionic.
Solution: Parametize dockerfile and build packages for specific
distribution on that exact distribution container. |
603,659 | 28.12.2022 12:41:21 | -10,800 | 9d3064dbdea0d305ef0c5e04961c84fb6b2dd774 | Fix environment files regex
Problem: For some reason, systemd services
packaging on bionic results in `EnvironmentFile`
clause in unit file, while other distros has `EnvironmentFiles`.
Solution: Make 's' optional. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/wizard_structure.py",
"new_path": "docker/package/wizard_structure.py",
"diff": "@@ -196,7 +196,7 @@ def show_systemd_service(service_name):\ndef find_systemd_env_files(show_systemd_output):\n- return re.findall(b\"EnvironmentFiles=(.*) \", show_systemd_output)\n+ return re.findall(b\"EnvironmentFiles?=(.*) \", show_systemd_output)\ndef find_systemd_unit_env(show_systemd_output):\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#585] Fix environment files regex
Problem: For some reason, systemd services
packaging on bionic results in `EnvironmentFile`
clause in unit file, while other distros has `EnvironmentFiles`.
Solution: Make 's' optional. |
603,659 | 29.12.2022 14:09:33 | -10,800 | b16ff1cfaa2cf4f795dc75e1c1ab1a00ca6eece6 | Supply tezos client dir explicitly
Problem: On ubuntu bionic, `octez-client` tries to
access host user even using `sudo -u tezos`.
Solution: Provide `--base-dir` flag on every invocation. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_setup_wizard.py",
"new_path": "docker/package/tezos_setup_wizard.py",
"diff": "@@ -420,9 +420,9 @@ class Setup(Setup):\nprint(\"Waiting for the node to bootstrap...\")\n+ tezos_client_options = self.get_tezos_client_options()\nproc_call(\n- f\"sudo -u tezos {suppress_warning_text} octez-client \"\n- f\"--endpoint {rpc_endpoint} bootstrapped\"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} bootstrapped\"\n)\nprint()\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/tezos_voting_wizard.py",
"new_path": "docker/package/tezos_voting_wizard.py",
"diff": "@@ -68,11 +68,11 @@ Type in 'exit' to quit.\n# we don't need any data here, just a confirmation Tezos Wallet app is open\n-def wait_for_ledger_wallet_app():\n+def wait_for_ledger_wallet_app(client_dir):\noutput = b\"\"\nwhile re.search(b\"Found a Tezos Wallet\", output) is None:\noutput = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} octez-client list connected ledgers\"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client --base-dir {client_dir} list connected ledgers\"\n).stdout\nproc_call(\"sleep 1\")\n@@ -423,7 +423,7 @@ class Setup(Setup):\nif self.check_ledger_use():\nprint(\"Please make sure the Tezos Wallet app is open on your ledger.\")\nprint()\n- wait_for_ledger_wallet_app()\n+ wait_for_ledger_wallet_app(config[\"client_data_dir\"])\n# process 'tezos-client show voting period'\nself.fill_voting_period_info()\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/wizard_structure.py",
"new_path": "docker/package/wizard_structure.py",
"diff": "@@ -348,12 +348,12 @@ def get_key_address(tezos_client_options, key_alias):\nreturn None\n-def wait_for_ledger_app(ledger_app):\n+def wait_for_ledger_app(ledger_app, client_dir):\noutput = b\"\"\ntry:\nwhile re.search(f\"Found a Tezos {ledger_app}\".encode(), output) is None:\noutput = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} octez-client list connected ledgers\"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client --base-dir {client_dir} list connected ledgers\"\n).stdout\nproc_call(\"sleep 1\")\nexcept KeyboardInterrupt:\n@@ -370,7 +370,7 @@ def wait_for_ledger_app(ledger_app):\nreturn ledgers_derivations\n-def ledger_urls_info(ledgers_derivations, node_endpoint):\n+def ledger_urls_info(ledgers_derivations, node_endpoint, client_dir):\nledgers_info = {}\nmax_derivation_len = 0\nfor derivations_paths in ledgers_derivations.values():\n@@ -378,13 +378,13 @@ def ledger_urls_info(ledgers_derivations, node_endpoint):\nfor ledger_url, derivations_paths in ledgers_derivations.items():\nfor derivation_path in derivations_paths:\noutput = get_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} octez-client \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client --base-dir {client_dir} \"\nf\"show ledger {ledger_url + derivation_path}\"\n).stdout\naddr = re.search(address_regex, output).group(0).decode()\nbalance = (\nget_proc_output(\n- f\"sudo -u tezos {suppress_warning_text} octez-client \"\n+ f\"sudo -u tezos {suppress_warning_text} octez-client --base-dir {client_dir} \"\nf\"--endpoint {node_endpoint} get balance for {addr}\"\n)\n.stdout.decode()\n@@ -540,7 +540,7 @@ def get_ledger_url_query(ledgers):\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_derivation_query(ledgers_derivations, node_endpoint):\n+def get_ledger_derivation_query(ledgers_derivations, node_endpoint, client_dir):\nextra_options = [\"Specify derivation path\", \"Go back\"]\nfull_ledger_urls = []\nfor ledger_url, derivations_paths in ledgers_derivations.items():\n@@ -553,7 +553,8 @@ def get_ledger_derivation_query(ledgers_derivations, node_endpoint):\nhelp=\"'Specify derivation path' will ask a derivation path from you.\"\n\"'Go back' will return you back to the key type choice.\",\ndefault=None,\n- options=[ledger_urls_info(ledgers_derivations, node_endpoint)] + extra_options,\n+ options=[ledger_urls_info(ledgers_derivations, node_endpoint, client_dir)]\n+ + extra_options,\nvalidator=Validator(\n[\nrequired_field_validator,\n@@ -745,7 +746,9 @@ class Setup:\nelse:\nprint(f\"Please open the Tezos {ledger_app} app on your ledger or\")\nprint(\"press Ctrl+C to go back to the key import mode selection.\")\n- ledgers_derivations = wait_for_ledger_app(ledger_app)\n+ ledgers_derivations = wait_for_ledger_app(\n+ ledger_app, self.config[\"client_data_dir\"]\n+ )\nif ledgers_derivations is None:\nprint(\"Going back to the import mode selection.\")\ncontinue\n@@ -756,6 +759,7 @@ class Setup:\nget_ledger_derivation_query(\nledgers_derivations,\nself.config[\"node_rpc_endpoint\"],\n+ self.config[\"client_data_dir\"],\n)\n)\nif self.config[\"ledger_derivation\"] == \"Go back\":\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#585] Supply tezos client dir explicitly
Problem: On ubuntu bionic, `octez-client` tries to
access host user even using `sudo -u tezos`.
Solution: Provide `--base-dir` flag on every invocation. |
603,650 | 10.01.2023 13:19:18 | -3,600 | a21ebca5b76f729c5f8f7e98419698aa8cc6d8be | [Chore] Increase timeout for binary packages built with docker
Problem: we have two test builds on the 'master' branch for binary
packages, but after recent changes they no longer fit into the
timeout that's currently set (or 90 minutes).
Solution: increase the timeout for these builds to 3 hours. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -121,7 +121,7 @@ steps:\n- rm -rf out\n# It takes much time to build binary package, so we do it only on master\nbranches: \"master\"\n- timeout_in_minutes: 90\n+ timeout_in_minutes: 180\nagents:\nqueue: \"docker\"\nonly_changes: *native_packaging_changes_regexes\n@@ -145,7 +145,7 @@ steps:\n- rm -rf out\n# It takes much time to build binary package, so we do it only on master\nbranches: \"master\"\n- timeout_in_minutes: 90\n+ timeout_in_minutes: 180\nagents:\nqueue: \"docker\"\nonly_changes: *native_packaging_changes_regexes\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Increase timeout for binary packages built with docker
Problem: we have two test builds on the 'master' branch for binary
packages, but after recent changes they no longer fit into the
timeout that's currently set (or 90 minutes).
Solution: increase the timeout for these builds to 3 hours. |
603,659 | 12.01.2023 13:17:46 | -10,800 | c13caf81f7a72b58a3877f767f14d49d4403262a | [Chore] Add correct shebang to baking scripts
Problem: Console scripts used regular `/usr/bin/python3`
shebang which results in error on `bionic`.
Solution: Specify right shebang. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -240,6 +240,9 @@ export DEB_CFLAGS_APPEND=-fPIC\noverride_dh_systemd_enable:\ndh_systemd_enable {pybuild_splice(\"-O--buildsystem=pybuild\")} --no-enable\n+override_dh_python3:\n+ dh_python3 --shebang=/usr/bin/${{PYBUILD_INTERPRETERS}}\n+\noverride_dh_systemd_start:\ndh_systemd_start {pybuild_splice(\"-O--buildsystem=pybuild\")} --no-start\n@@ -799,6 +802,9 @@ setup(\noptions=dict(\nbuild_scripts=dict(\nexecutable=\"/usr/bin/{interpreter}\"\n+ ),\n+ console_scripts=dict(\n+ executable=\"/usr/bin/{interpreter}\"\n)\n),\n)\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add correct shebang to baking scripts
Problem: Console scripts used regular `/usr/bin/python3`
shebang which results in error on `bionic`.
Solution: Specify right shebang. |
603,659 | 12.01.2023 13:20:57 | -10,800 | 64aed49f59e40fdc38f58a7b50fb457c75ab3d74 | [Chore] Fix and reimplement `sources` option
Problem: `sources` option left unimplemented after
switching to new build script. Previous implementation
also was rather suboptimal.
Solution: Implement `sources-dir` option similarly to `binaries-dir`. | [
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -180,9 +180,9 @@ Otherwise, Launchpad will prohibit the build of the new release.\nIn order to build new proper source package using existing source archive run the following:\n```\n-cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type source -p tezos-client --sources <path to .orig.tar.gz>\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type source -p tezos-client --sources-dir <path dir with source archives>\n```\n-\n+If a directory contains with correctly named archive (e.g. `tezos-client_15.1a.orig.tar.gz`), it would be caught up by the build script.\nAfter that, the resulting source package can be signed and uploaded to the Launchpad using the commands\ndescribed previously.\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.py",
"new_path": "docker/docker-tezos-packages.py",
"diff": "@@ -81,6 +81,14 @@ if args.binaries_dir:\nelse:\nbinaries_dir_name = None\n+if args.sources_dir:\n+ sources_dir_name = os.path.basename(args.sources_dir)\n+ docker_volumes += (\n+ f\"-v {args.sources_dir}:/tezos-packaging/docker/{sources_dir_name}\"\n+ )\n+else:\n+ sources_dir_name = None\n+\ntarget_os = args.os\nif target_os == \"ubuntu\":\n@@ -126,7 +134,7 @@ def build_packages(pkgs, image, distros):\n[\nf\"--os {target_os}\",\nf\"--binaries-dir {binaries_dir_name}\" if binaries_dir_name else \"\",\n- f\"--sources {args.sources}\" if args.sources else \"\",\n+ f\"--sources-dir {sources_dir_name}\" if sources_dir_name else \"\",\nf\"--type {args.type}\",\nf\"--distributions {' '.join(distros)}\",\nf\"--packages {' '.join(pkgs)}\",\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/package_generator.py",
"new_path": "docker/package/package_generator.py",
"diff": "# SPDX-License-Identifier: LicenseRef-MIT-OA\nimport os\n+import sys\nimport shutil\nimport argparse\nfrom .fedora import build_fedora_package\n@@ -34,8 +35,8 @@ parser.add_argument(\ntype=os.path.abspath,\n)\nparser.add_argument(\n- \"--sources\",\n- help=\"specify source archive for single ubuntu package\",\n+ \"--sources-dir\",\n+ help=\"specify directory with source archive(s) for ubuntu packages\",\ntype=os.path.abspath,\n)\n@@ -106,7 +107,7 @@ def main():\nis_source = args.type == \"source\"\n- source_archive = args.sources\n+ source_archives = os.listdir(args.sources_dir) if args.sources_dir else []\nbinaries_dir = args.binaries_dir\n@@ -130,6 +131,23 @@ def main():\nfor package_name in args.packages:\npackages.append(all_packages[package_name])\n+ if is_source and source_archives:\n+ errors = []\n+ for package in packages:\n+ if getattr(package, \"letter_version\", None) is None:\n+ source_archive = f\"{package.name}_{package.meta.version}.orig.tar.gz\"\n+ if source_archive in source_archives:\n+ package.source_archive = os.path.join(\n+ args.sources_dir, source_archive\n+ )\n+ else:\n+ errors.append(\n+ f\"ERROR: supplied source dir does not contain source archive for {package.name}\"\n+ )\n+ if errors:\n+ print(\"\\n\" + \"\\n\".join(errors) + \"\\n\")\n+ sys.exit(1)\n+\nif target_os == \"ubuntu\":\nfor package in packages:\nbuild_ubuntu_package(\n@@ -137,7 +155,7 @@ def main():\ndistributions,\ncommon_deps,\nis_source,\n- source_archive,\n+ getattr(package, \"source_archive\", None),\nbinaries_dir,\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/ubuntu.py",
"new_path": "docker/package/ubuntu.py",
"diff": "@@ -32,7 +32,7 @@ def build_ubuntu_package(\n)\nsubprocess.run([\"tar\", \"-czf\", f\"{dir}.tar.gz\", dir], check=True)\nelse:\n- shutil.copy(f\"{cwd}/../{source_archive_path}\", f\"{dir}.tar.gz\")\n+ shutil.copy(source_archive_path, f\"{dir}.tar.gz\")\nsubprocess.run([\"tar\", \"-xzf\", f\"{dir}.tar.gz\"], check=True)\npkg.meta.version = fixed_version\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fix and reimplement `sources` option
Problem: `sources` option left unimplemented after
switching to new build script. Previous implementation
also was rather suboptimal.
Solution: Implement `sources-dir` option similarly to `binaries-dir`. |
603,659 | 21.12.2022 14:09:31 | -10,800 | 80d1f309b5a936afe9d70143c2a9c5f93f697367 | [Chore] Fix output dir handling
Problem: `docker-tezos-packages.py` ignores the supplied
`output-dir` option and always outputs the artifacts to the
`$(pwd)/out` dir.
Solution: Make it output the artifacts to the supplied dir. | [
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.py",
"new_path": "docker/docker-tezos-packages.py",
"diff": "@@ -163,7 +163,7 @@ def build_packages(pkgs, image, distros):\ncall(\nf\"\"\"\n{virtualisation_engine} cp\n- {container_id}:/tezos-packaging/docker/{container_output_dir} .\n+ {container_id}:/tezos-packaging/docker/{container_output_dir}/. {args.output_dir}\n\"\"\"\n)\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fix output dir handling
Problem: `docker-tezos-packages.py` ignores the supplied
`output-dir` option and always outputs the artifacts to the
`$(pwd)/out` dir.
Solution: Make it output the artifacts to the supplied dir. |
603,659 | 21.12.2022 14:22:01 | -10,800 | e34d8d2b029462b2ab4c1e52dafef11b375a0f04 | [Chore] Fix postinst step
Problem: Common postinst script created dir and user, resulting in
massive error output if they already exist.
Solution: Execute them only when necessary. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -124,6 +124,13 @@ signer_units = [\n),\n]\n+postinst_steps_common = \"\"\"\n+if [ -z $(getent passwd tezos) ]; then\n+ useradd -r -s /bin/false -m -d /var/lib/tezos tezos\n+ chmod 0755 /var/lib/tezos\n+fi\n+\"\"\"\n+\nledger_udev_postinst = open(\nf\"{os.path.dirname(__file__)}/scripts/udev-rules\", \"r\"\n).read()\n@@ -135,7 +142,7 @@ packages = [\n\"CLI client for interacting with tezos blockchain\",\nmeta=packages_meta,\nadditional_native_deps=[\"tezos-sapling-params\", \"udev\"],\n- postinst_steps=ledger_udev_postinst,\n+ postinst_steps=postinst_steps_common + ledger_udev_postinst,\ndune_filepath=\"src/bin_client/main_client.exe\",\n)\n},\n@@ -154,7 +161,7 @@ packages = [\nmeta=packages_meta,\nadditional_native_deps=[\"udev\"],\nsystemd_units=signer_units,\n- postinst_steps=ledger_udev_postinst,\n+ postinst_steps=postinst_steps_common + ledger_udev_postinst,\ndune_filepath=\"src/bin_signer/main_signer.exe\",\n)\n},\n@@ -168,11 +175,6 @@ packages = [\n},\n]\n-postinst_steps_common = \"\"\"\n-mkdir -p -m755 /var/lib/tezos || true\n-useradd --home-dir /var/lib/tezos tezos || true\n-\"\"\"\n-\ndef mk_node_unit(\nsuffix,\n@@ -303,8 +305,11 @@ daemon_decs = {\ndaemon_postinst_common = (\npostinst_steps_common\n- + \"\\nmkdir -p /var/lib/tezos/.tezos-client\\nchown -R tezos:tezos /var/lib/tezos/.tezos-client\\n\"\n-) + ledger_udev_postinst\n+ + \"\"\"\n+mkdir -p /var/lib/tezos/.tezos-client\n+chown -R tezos:tezos /var/lib/tezos/.tezos-client\n+\"\"\"\n+)\nfor proto in active_protocols:\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/udev-rules",
"new_path": "docker/package/scripts/udev-rules",
"diff": "@@ -34,6 +34,6 @@ EOF\nservice udev restart || systemctl restart udev.service\nfi\nudevadm control --reload-rules\n- groupadd plugdev || true\n- usermod -a -G plugdev tezos || true\n+ ! getent group plugdev &> /dev/null && groupadd plugdev || true\n+ usermod -aG plugdev tezos &> /dev/null || true\nfi\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fix postinst step
Problem: Common postinst script created dir and user, resulting in
massive error output if they already exist.
Solution: Execute them only when necessary. |
603,659 | 21.12.2022 14:05:59 | -10,800 | 0d03e82f392b46b07134b8290a8ef8ec34130573 | [Chore] Add option to sign packages
Problem: User have to sign packages manually after build.
Solution: Add option to sign packages by provided identity. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-for-tags.yml",
"new_path": ".buildkite/pipeline-for-tags.yml",
"diff": "@@ -19,8 +19,8 @@ steps:\nqueue: \"docker\"\ncommands:\n- eval \"$SET_VERSION\"\n- - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os ubuntu --type source\n- - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os fedora --type source\n+ - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os ubuntu --type source -s \"Serokell <tezos-packaging@serokell.io>\"\n+ - nix develop .#docker-tezos-packages -c ./docker/docker-tezos-packages.py --os fedora --type source -s \"Serokell <tezos-packaging@serokell.io>\"\nartifact_paths:\n- ./out/*\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/README.md",
"new_path": "docker/README.md",
"diff": "@@ -86,6 +86,7 @@ export OCTEZ_VERSION=\"v14.1\"\ncd .. && ./docker/docker-tezos-packages.py --os ubuntu --type binary\n```\n+\nIt is also possible to specify packages to build with `-p` or `--packages` option. In order to do that run the following:\n```\n# cd .. && ./docker/docker-tezos-packages.py -os ubuntu --type binary --packages <tezos-binary-1> <tezos-binary-2>\n@@ -132,13 +133,18 @@ You can test source package building using [`pbuilder`](https://wiki.ubuntu.com/\nIn order to push the packages to the Launchpad PPA `*.changes` files should should be updated with\nthe submitter info and signed.\n-In order to update `*.changes` files with the proper signer info run the following:\n+If you want to sign resulted source packages automatically, you can provide signer identity through `--gpg-sign` or `-s` option:\n```\n-sed -i \"s/^Changed-By: .*$/Changed-By: $signer_info/\" ../out/*.changes\n+export OCTEZ_VERSION=\"v14.1\"\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type source -d focal jammy -p tezos-client -s <signer_info>\n```\n-\nFor example, `signer_info` can be the following: `Roman Melnikov <roman.melnikov@serokell.io>`\n+If you want to do it manually, you should update `*.changes` files with the proper signer info run the following:\n+```\n+sed -i \"s/^Changed-By: .*$/Changed-By: <signer_info>/\" ../out/*.changes\n+```\n+\nOnce these files are updated, they should be signed using `debsign`.\n```\ndebsign ../out/*.changes\n@@ -180,10 +186,10 @@ Otherwise, Launchpad will prohibit the build of the new release.\nIn order to build new proper source package using existing source archive run the following:\n```\n-cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type source -p tezos-client --sources-dir <path dir with source archives>\n+cd .. && ./docker/docker-tezos-packages.py --os ubuntu --type source -p tezos-client --sources-dir <path to dir with source archives> -s <signer_info>\n```\n-If a directory contains with correctly named archive (e.g. `tezos-client_15.1a.orig.tar.gz`), it would be caught up by the build script.\n-After that, the resulting source package can be signed and uploaded to the Launchpad using the commands\n+If the directory contains the correctly named archive (e.g. `tezos-client_15.1a.orig.tar.gz`), it will be used by the build script.\n+After that, the resulting source package can be uploaded to the Launchpad using the commands\ndescribed previously.\n## Fedora packages\n@@ -245,7 +251,14 @@ cd .. && ./docker/docker-tezos-packages.py --os fedora --type source\ncd .. && ./docker/docker-tezos-packages.py --os fedora --type source -p tezos-client\n```\n-Sign source packages:\n+If you want to sign resulted source packages automatically, you can provide signer identity through `--gpg-sign` or `-s` option:\n+```\n+export OCTEZ_VERSION=\"v14.1\"\n+cd .. && ./docker/docker-tezos-packages.py --os fedora --type source -p tezos-client -s <signer_info>\n+```\n+For example, `signer_info` can be the following: `Roman Melnikov <roman.melnikov@serokell.io>`\n+\n+If you want to sign source packages manually, run:\n```\nrpm --addsign out/*.src.rpm\n```\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.py",
"new_path": "docker/docker-tezos-packages.py",
"diff": "import os\nimport sys\nimport shlex\n+import shutil\nimport subprocess\nfrom package.packages import packages\nfrom package.package_generator import parser\n@@ -68,6 +69,13 @@ parser.add_argument(\nhelp=\"whether to build the sapling-params package\",\naction=\"store_true\",\n)\n+parser.add_argument(\n+ \"--gpg-sign\",\n+ \"-s\",\n+ help=\"provide an identity to sign packages\",\n+ type=str,\n+)\n+\nparser.set_defaults(build_sapling_package=False)\nargs = parser.parse_args()\n@@ -173,6 +181,23 @@ def build_packages(pkgs, image, distros):\nprint(\"Unrecoverable error occured.\")\nsys.exit(exit_code)\n+ artifacts = (os.path.join(args.output_dir, x) for x in os.listdir(args.output_dir))\n+ if args.gpg_sign and args.type == \"source\":\n+ if target_os == \"ubuntu\":\n+ for f in artifacts:\n+ if f.endswith(\".changes\"):\n+ call(\n+ f\"sed -i 's/^Changed-By: .*$/Changed-By: {args.gpg_sign}/' {f}\"\n+ )\n+ call(f\"debsign {f}\")\n+ elif target_os == \"fedora\":\n+ gpg = shutil.which(\"gpg\")\n+ for f in artifacts:\n+ if f.endswith(\".src.rpm\"):\n+ call(\n+ f'rpmsign --define=\"%_gpg_name {args.gpg_sign}\" --define=\"%__gpg {gpg}\" --addsign {f}'\n+ )\n+\npackages_to_build = get_packages_to_build(args.packages)\n"
},
{
"change_type": "DELETE",
"old_path": "docker/shell.nix",
"new_path": null,
"diff": "-# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n-# SPDX-License-Identifier: LicenseRef-MIT-OA\n-\n-{ pkgs, ...}:\n-with pkgs;\n-mkShell {\n- buildInputs = [\n- python3\n- ];\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "flake.nix",
"new_path": "flake.nix",
"diff": "devShells = {\nbuildkite = callPackage ./.buildkite/shell.nix {};\n- docker-tezos-packages = callPackage ./docker/shell.nix {};\nautorelease = callPackage ./scripts/shell.nix {};\n- dev = callPackage ./shell.nix { pkgs = unstable; };\n+ docker-tezos-packages = callPackage ./shell.nix {};\n};\nchecks = {\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/publish-native-packages.sh",
"new_path": "scripts/publish-native-packages.sh",
"diff": "@@ -46,12 +46,9 @@ else\nfi\nfor f in \"$source_packages_path\"/*.changes; do\n- sed -i 's/^Changed-By: .*$/Changed-By: Serokell <tezos-packaging@serokell.io>/' \"$f\"\n- debsign \"$f\"\nexecute-dput -c dput.cfg \"$launchpad_ppa\" \"$f\"\ndone\nfor f in \"$source_packages_path\"/*.src.rpm; do\n- rpmsign --define=\"%_gpg_name Serokell <tezos-packaging@serokell.io>\" --define=\"%__gpg $(which gpg)\" --addsign \"$f\"\n/run/wrappers/bin/sudo -u copr-uploader /run/current-system/sw/bin/copr-cli build \"$copr_project\" --nowait \"$f\"\ndone\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/shell.nix",
"new_path": "scripts/shell.nix",
"diff": "@@ -14,6 +14,7 @@ mkShell {\ngit\nrename\ngnupg\n+ copr-cli\ndput\nrpm\ndebian-devscripts\n"
},
{
"change_type": "MODIFY",
"old_path": "shell.nix",
"new_path": "shell.nix",
"diff": "with pkgs; mkShell {\nbuildInputs = [\npython3Packages.black\n+ python3\nshellcheck\njq\n+ copr-cli\ngh\n+ dput\n+ debian-devscripts\n+ rpm\nbuildkite-agent\n];\nOCTEZ_VERSION= with pkgs.lib; lists.last (strings.splitString \"/\" (meta.tezos_ref));\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add option to sign packages
Problem: User have to sign packages manually after build.
Solution: Add option to sign packages by provided identity. |
603,659 | 18.01.2023 20:24:31 | -10,800 | 7f7526d3c1d7b88a318e3b0e6a3867fdf11966e1 | [Chore] Add missing dependency to build images
Problem: `octez` build script switched to use `shasum`
instead of `sha256sum` for better compatibility across systems.
But it's not installed by default.
Solution: Add it to the image. | [
{
"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 zlib-static coreutils\n+ autoconf automake libtool linux-headers cargo libffi-dev zlib-static coreutils perl-utils\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\nCOPY ./build/build-rust.sh /build-rust.sh\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 zlib-static coreutils\n+ autoconf automake libtool linux-headers cargo libffi-dev zlib-static coreutils perl-utils\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\nCOPY ./build/build-rust.sh /build-rust.sh\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add missing dependency to build images
Problem: `octez` build script switched to use `shasum`
instead of `sha256sum` for better compatibility across systems.
But it's not installed by default.
Solution: Add it to the image. |
603,659 | 19.01.2023 11:18:53 | -10,800 | 3e27f8aa7ad60cc8a4333cea15c7628c1e2f085a | [Chore] Support smart contract rollup binaries
Problem: Smart contract rollup binaries were introduced.
Solution: Support them in native packaging, static binaries and brew formulae. | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-smart-rollup-client-PtMumbai.rb",
"diff": "+#!/usr/bin/env ruby\n+# SPDX-FileCopyrightText: 2023 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosSmartRollupClientPtmumbai < 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 => \"v16.0-rc1\", :shallow => false\n+\n+ version \"v16.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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 \"Smart contract rollup CLI client for PtMumbai\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSmartRollupClientPtmumbai.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ # Disable usage of instructions from the ADX extension to avoid incompatibility\n+ # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+ ENV[\"BLST_PORTABLE\"]=\"yes\"\n+ # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n+ arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n+ system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.60.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+ ln_sf \"#{bin}/#{name}\", \"#{bin}/#{name.gsub(\"octez\", \"tezos\")}\"\n+ end\n+\n+ def install\n+ make_deps\n+ install_template \"src/proto_016_PtMumbai/bin_sc_rollup_client/main_sc_rollup_client_016_PtMumbai.exe\",\n+ \"_build/default/src/proto_016_PtMumbai/bin_sc_rollup_client/main_sc_rollup_client_016_PtMumbai.exe\",\n+ \"octez-smart-rollup-client-PtMumbai\"\n+ end\n+end\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-smart-rollup-node-PtMumbai.rb",
"diff": "+#!/usr/bin/env ruby\n+\n+# SPDX-FileCopyrightText: 2023 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosSmartRollupNodePtmumbai < 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 => \"v16.0-rc1\", :shallow => false\n+\n+ version \"v16.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget 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 \"Tezos smart contract rollup node for PtMumbai\"\n+\n+ bottle do\n+ root_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSmartRollupNodePtmumbai.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ # Disable usage of instructions from the ADX extension to avoid incompatibility\n+ # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+ ENV[\"BLST_PORTABLE\"]=\"yes\"\n+ # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n+ arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n+ system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.60.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+ ln_sf \"#{bin}/#{name}\", \"#{bin}/#{name.gsub(\"octez\", \"tezos\")}\"\n+ end\n+\n+ def install\n+ startup_contents =\n+ <<~EOS\n+ #!/usr/bin/env bash\n+\n+ set -euo pipefail\n+\n+ node=\"#{bin}/octez-smart-rollup-node-PtMumbai\"\n+\n+ \"$node\" init \"$ROLLUP_MODE\" config \\\n+ for \"$ROLLUP_ALIAS\" \\\n+ --rpc-addr \"$ROLLUP_NODE_RPC_ENDPOINT\" \\\n+ --force\n+\n+ \"$node\" --endpoint \"$NODE_RPC_SCHEME://$NODE_RPC_ADDR\" \\\n+ run \"$ROLLUP_MODE\" for \"$ROLLUP_ALIAS\"\n+ EOS\n+ File.write(\"tezos-smart-rollup-node-PtMumbai-start\", startup_contents)\n+ bin.install \"tezos-smart-rollup-node-PtMumbai-start\"\n+ make_deps\n+ install_template \"src/proto_016_PtMumbai/bin_sc_rollup_node/main_sc_rollup_node_016_PtMumbai.exe\",\n+ \"_build/default/src/proto_016_PtMumbai/bin_sc_rollup_node/main_sc_rollup_node_016_PtMumbai.exe\",\n+ \"octez-smart-rollup-node-PtMumbai\"\n+ end\n+ plist_options manual: \"tezos-smart-rollup-node-PtMumbai run for\"\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-smart-rollup-node-PtMumbai-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>TEZOS_CLIENT_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>NODE_RPC_ENDPOINT</key>\n+ <string>http://localhost:8732</string>\n+ <key>ROLLUP_NODE_RPC_ENDPOINT</key>\n+ <string>127.0.0.1:8472</string>\n+ <key>ROLLUP_MODE</key>\n+ <string>observer</string>\n+ <key>ROLLUP_ALIAS</key>\n+ <string>rollup</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": "MODIFY",
"old_path": "docker/docker-static-build.sh",
"new_path": "docker/docker-static-build.sh",
"diff": "@@ -14,6 +14,8 @@ for proto in $(jq -r \".active | .[]\" ../protocols.json); do\nbinaries+=(\"octez-accuser-$proto\" \"octez-baker-$proto\" \"octez-tx-rollup-node-$proto\" \"octez-tx-rollup-client-$proto\")\ndone\n+binaries+=(\"octez-smart-rollup-client-PtMumbai\" \"octez-smart-rollup-node-PtMumbai\")\n+\nif [[ \"${USE_PODMAN-}\" == \"True\" ]]; then\nvirtualisation_engine=\"podman\"\nelse\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-fedora",
"new_path": "docker/package/Dockerfile-fedora",
"diff": "@@ -5,7 +5,7 @@ ARG dist\nFROM fedora:${dist}\nRUN dnf update -y\nRUN dnf install -y libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel m4 perl git pkg-config \\\n- rpmdevtools python3-devel python3-setuptools wget opam rsync which cargo autoconf mock systemd systemd-rpm-macros\n+ rpmdevtools python3-devel python3-setuptools wget opam rsync which cargo autoconf mock systemd systemd-rpm-macros cmake\nENV USER dockerbuilder\nRUN useradd dockerbuilder && mkdir /tezos-packaging\nENV HOME /tezos-packaging\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-ubuntu",
"new_path": "docker/package/Dockerfile-ubuntu",
"diff": "@@ -5,7 +5,7 @@ ARG dist\nFROM ubuntu:${dist}\nENV DEBIAN_FRONTEND=\"noninteractive\"\nRUN apt-get update && apt-get install -y libev-dev libgmp-dev libhidapi-dev libffi-dev zlib1g-dev libpq-dev m4 perl pkg-config \\\n- debhelper dh-make dh-python devscripts autotools-dev python3-all python3-setuptools wget rsync\n+ debhelper dh-make dh-python devscripts autotools-dev python3-all python3-setuptools wget rsync cmake\nARG dist\nRUN [ \"$dist\" != \"jammy\" ] && apt-get install -y python3.8 dh-systemd || true\nRUN apt-get install -y software-properties-common\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/package_generator.py",
"new_path": "docker/package/package_generator.py",
"diff": "@@ -84,6 +84,7 @@ def get_build_deps(binaries_dir):\nreturn [\n\"make\",\n+ \"cmake\",\n\"m4\",\n\"perl\",\n\"pkg-config\",\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/packages.py",
"new_path": "docker/package/packages.py",
"diff": "@@ -29,6 +29,7 @@ networks_protos = {\nprotocol_numbers = {\n\"PtLimaPt\": \"015\",\n+ \"PtMumbai\": \"016\",\n}\nsigner_units = [\n@@ -481,14 +482,20 @@ packages.append(\n)\n-def mk_rollup_packages():\n- def mk_units(type, proto):\n- startup_script = f\"/usr/bin/tezos-tx-rollup-node-{proto}-start\"\n+def mk_rollup_packages(type, protos, full_type=None):\n+\n+ if full_type is None:\n+ full_type = type\n+\n+ def mk_units(proto):\n+ startup_script = f\"/usr/bin/tezos-{type}-rollup-node-{proto}-start\"\nservice_file = ServiceFile(\nUnit(after=[\"network.target\"], description=f\"Tezos {type} rollup node\"),\nService(\n- environment_files=[f\"/etc/default/tezos-{type}-rollup-node-{proto}\"],\n- environment=[f\"PROTOCOL={proto}\"],\n+ environment_files=[\n+ f\"/etc/default/tezos-{full_type}-rollup-node-{proto}\"\n+ ],\n+ environment=[f\"PROTOCOL={proto}\", f\"TYPE={type}\"],\nexec_start_pre=[\n\"+/usr/bin/setfacl -m u:tezos:rwx /run/systemd/ask-password\"\n],\n@@ -512,13 +519,13 @@ def mk_rollup_packages():\n),\n]\n- def mk_rollup_package(name, type, proto):\n+ def mk_rollup_package(name, proto):\nproto_snake_case = protocol_numbers[proto] + \"_\" + proto\nreturn TezosBinaryPackage(\n- f\"tezos-{type}-rollup-{name}-{proto}\",\n+ f\"tezos-{full_type}-rollup-{name}-{proto}\",\nf\"Tezos {type} rollup {name} using {proto}\",\nmeta=packages_meta,\n- systemd_units=mk_units(type, proto) if name == \"node\" else [],\n+ systemd_units=mk_units(proto) if name == \"node\" else [],\ntarget_proto=proto,\nadditional_native_deps=[\n\"tezos-client\",\n@@ -529,17 +536,15 @@ def mk_rollup_packages():\ndune_filepath=f\"src/proto_{proto_snake_case}/bin_{type}_rollup_{name}/main_{type}_rollup_{name}_{proto_snake_case}.exe\",\n)\n- # for future sc\n- types = [\"tx\"]\npackages = [\"node\", \"client\"]\nreturn [\n- {f\"tezos-{type}-rollup-{name}-{proto}\": mk_rollup_package(name, type, proto)}\n+ {f\"tezos-{full_type}-rollup-{name}-{proto}\": mk_rollup_package(name, proto)}\nfor name in packages\n- for type in types\n- for proto in active_protocols\n+ for proto in protos\n]\n-packages.extend(mk_rollup_packages())\n+packages.extend(mk_rollup_packages(\"tx\", [\"PtLimaPt\"]))\n+packages.extend(mk_rollup_packages(\"sc\", [\"PtMumbai\"], \"smart\"))\npackages = dict(ChainMap(*packages))\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/scripts/tezos-rollup-node-start",
"new_path": "docker/package/scripts/tezos-rollup-node-start",
"diff": "@@ -7,8 +7,7 @@ set -euo pipefail\n# Note: the 'TEZOS_CLIENT_DIR' env var is expected and used by the rollup node\n# $PROTOCOL should be defined in the system unit environment\n-node=\"/usr/bin/octez-tx-rollup-node-$PROTOCOL\"\n-tezos_client=\"/usr/bin/octez-client\"\n+node=\"/usr/bin/octez-$TYPE-rollup-node-$PROTOCOL\"\n\"$node\" init \"$ROLLUP_MODE\" config \\\nfor \"$ROLLUP_ALIAS\" \\\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Support smart contract rollup binaries
Problem: Smart contract rollup binaries were introduced.
Solution: Support them in native packaging, static binaries and brew formulae. |
603,659 | 19.01.2023 20:10:33 | -10,800 | c8220548ef1c8b1c0cdfd060cf190fb0f20b6038 | [Chore] Remove note raised during postinst step
Problem: Note is not relevant anymore.
Solution: Remove it. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -696,19 +696,7 @@ class TezosBakingServicesPackage(AbstractPackage):\n)\ncustom_unit.instances = []\nself.systemd_units.append(custom_unit)\n- # TODO: remove this on the next stable octez release\n- self.postinst_steps = \"\"\"echo \"\"\n-echo \"********************************************************************************\"\n-echo \"** Note: this version adds context pruning, which will prevent the disk\"\n-echo \"** space used by the node from growing indefinitely. If you have an\"\n-echo \"** existing node or baking setup running, it is recommended to import\"\n-echo \"** a fresh snapshot. You can re-run tezos-setup to do so.\"\n-echo \"\"\n-echo \"** You can read more about it here:\"\n-echo \"** http://tezos.gitlab.io/releases/version-15.html#context-pruning-requirements\"\n-echo \"********************************************************************************\"\n-echo \"\"\n-\"\"\"\n+ self.postinst_steps = \"\"\nself.postrm_steps = \"\"\ndef fetch_sources(self, out_dir, binaries_dir=None):\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Remove note raised during postinst step
Problem: Note is not relevant anymore.
Solution: Remove it. |
603,650 | 20.01.2023 19:02:05 | -3,600 | 8ef956a40f6d310bcf94d1f590e9991655434982 | [Chore] Disable building of static binaries on ARM
Problem: there are some issues with building ARM static
binaries on CI. For more info see issue
Solution: temporarily disable the related steps in CI
pipelines in order to proceed with a new release. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -64,24 +64,25 @@ steps:\n- docker/docker-static-build.sh\n- meta.json\n- protocols.json\n- # arm builer is an ubuntu machine without nix\n- - label: build-arm-via-docker\n+ # TODO #593 re-enable the following commented-out step\n+ # arm builder 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\n- commands:\n- - eval \"$SET_VERSION\"\n- - cd docker\n- - ./docker-static-build.sh\n- - upx octez-*\n- - >\n- for f in ./octez-*; do\n- mv \"\\$f\" \"\\$f-arm64\"\n- done\n- artifact_paths:\n- - ./docker/octez-*\n- agents:\n- queue: \"arm64-build\"\n- only_changes: *static_binaries_changes_regexes\n+ # key: build-arm-via-docker\n+ # commands:\n+ # - eval \"$SET_VERSION\"\n+ # - cd docker\n+ # - ./docker-static-build.sh\n+ # - upx octez-*\n+ # - >\n+ # for f in ./octez-*; do\n+ # mv \"\\$f\" \"\\$f-arm64\"\n+ # done\n+ # artifact_paths:\n+ # - ./docker/octez-*\n+ # agents:\n+ # queue: \"arm64-build\"\n+ # only_changes: *static_binaries_changes_regexes\n- label: test docker-built binaries\ncommands:\n@@ -161,19 +162,20 @@ steps:\n- gen_systemd_service_file.py\n- docker/package/.*\n+ # TODO #593 re-enable the commented-out arm parts\n- label: create auto release/pre-release\nkey: auto-release\ncommands:\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+ # - buildkite-agent artifact download \"docker/*\" arm-binaries --step \"build-arm-via-docker\"\n- ls binaries\n- nix develop .#autorelease -c ./scripts/autorelease.sh \"$BUILDKITE_MESSAGE\"\nbranches: master\ndepends_on:\n- \"build-via-docker\"\n- - \"build-arm-via-docker\"\n+ # - \"build-arm-via-docker\"\nonly_changes:\n- scripts/autorelease.sh\n- scripts/shell.nix\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Disable building of static binaries on ARM
Problem: there are some issues with building ARM static
binaries on CI. For more info see issue #593.
Solution: temporarily disable the related steps in CI
pipelines in order to proceed with a new release. |
603,650 | 23.01.2023 13:43:45 | -3,600 | ac2fceefd2c6794afc7c4b99f8687fcc0441c93b | [Chore] Add Mumbai in the list of active protocol
Problem: with the latest Octez release the Mumbai
protocol was added, but we haven't listed it as an
active one. As such, some of our building steps don't
produce all the binaries.
Solution: Add Mumbai in the list of active protocols. | [
{
"change_type": "MODIFY",
"old_path": "docker/docker-static-build.sh",
"new_path": "docker/docker-static-build.sh",
"diff": "@@ -11,9 +11,10 @@ set -euo pipefail\nbinaries=(\"octez-admin-client\" \"octez-client\" \"octez-node\" \"octez-signer\" \"octez-codec\")\nfor proto in $(jq -r \".active | .[]\" ../protocols.json); do\n- binaries+=(\"octez-accuser-$proto\" \"octez-baker-$proto\" \"octez-tx-rollup-node-$proto\" \"octez-tx-rollup-client-$proto\")\n+ binaries+=(\"octez-accuser-$proto\" \"octez-baker-$proto\")\ndone\n+binaries+=(\"octez-tx-rollup-node-PtLimaPt\" \"octez-tx-rollup-client-PtLimaPt\")\nbinaries+=(\"octez-smart-rollup-client-PtMumbai\" \"octez-smart-rollup-node-PtMumbai\")\nif [[ \"${USE_PODMAN-}\" == \"True\" ]]; then\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/build/release-binaries.nix",
"new_path": "nix/build/release-binaries.nix",
"diff": "@@ -32,6 +32,16 @@ in [\ndescription = \"A client to decode and encode JSON\";\nsupports = protocolsFormatted;\n}\n+ {\n+ name = \"octez-tx-rollup-node-PtLimaPt\";\n+ description = \"Transaction rollup node\";\n+ supports = \"PtLimaPt\";\n+ }\n+ {\n+ name = \"octez-tx-rollup-client-PtLimaPt\";\n+ description = \"Client for interacting with transaction rollup node\";\n+ supports = \"PtLimaPt\";\n+ }\n] ++ builtins.concatMap (protocol: [\n{\nname = \"octez-baker-${protocol}\";\n@@ -43,14 +53,4 @@ in [\ndescription = \"Daemon for accusing\";\nsupports = protocol;\n}\n- {\n- name = \"octez-tx-rollup-node-${protocol}\";\n- description = \"Transaction rollup node\";\n- supports = protocol;\n- }\n- {\n- name = \"octez-tx-rollup-client-${protocol}\";\n- description = \"Client for interacting with transaction rollup node\";\n- supports = protocol;\n- }\n]) protocols.active\n"
},
{
"change_type": "MODIFY",
"old_path": "protocols.json",
"new_path": "protocols.json",
"diff": "\"PtKathma\"\n],\n\"active\": [\n- \"PtLimaPt\"\n+ \"PtLimaPt\",\n+ \"PtMumbai\"\n]\n}\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add Mumbai in the list of active protocol
Problem: with the latest Octez release the Mumbai
protocol was added, but we haven't listed it as an
active one. As such, some of our building steps don't
produce all the binaries.
Solution: Add Mumbai in the list of active protocols. |
603,650 | 23.01.2023 13:48:25 | -3,600 | 713d419afe2bb106f89545e08bc2b16a1edda095 | [Chore] Add release description of smart contract rollup binaries
Problem: Smart contract rollup binaries were added, but we have
not added descriptions for them that are to be included in the
automated release steps.
Solution: Add the descriptions for the new binaries, so that they
will be included in the new releases. | [
{
"change_type": "MODIFY",
"old_path": "nix/build/release-binaries.nix",
"new_path": "nix/build/release-binaries.nix",
"diff": "@@ -42,6 +42,16 @@ in [\ndescription = \"Client for interacting with transaction rollup node\";\nsupports = \"PtLimaPt\";\n}\n+ {\n+ name = \"octez-smart-rollup-client-PtMumbai\";\n+ description = \"Smart contract rollup CLI client for PtMumbai\";\n+ supports = \"PtMumbai\";\n+ }\n+ {\n+ name = \"octez-smart-rollup-node-PtMumbai\";\n+ description = \"Tezos smart contract rollup node for PtMumbai\";\n+ supports = \"PtMumbai\";\n+ }\n] ++ builtins.concatMap (protocol: [\n{\nname = \"octez-baker-${protocol}\";\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add release description of smart contract rollup binaries
Problem: Smart contract rollup binaries were added, but we have
not added descriptions for them that are to be included in the
automated release steps.
Solution: Add the descriptions for the new binaries, so that they
will be included in the new releases. |
603,650 | 23.01.2023 14:00:51 | -3,600 | 18d8d621ebd29b922552057c2ab5cfffd8faa58c | [Chore] Fixup disabled arm binaries building step
Problem: in a previous commit arm binaries building has been
disabled (see but the steps weren't updated properly,
which causes a failure in the autoreleasing process.
Solution: add the creation of an empty directory for arm binaries
to fix the autoreleasing step. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -170,6 +170,7 @@ steps:\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+ - mkdir arm-binaries/docker\n- ls binaries\n- nix develop .#autorelease -c ./scripts/autorelease.sh \"$BUILDKITE_MESSAGE\"\nbranches: master\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fixup disabled arm binaries building step
Problem: in a previous commit arm binaries building has been
disabled (see #593), but the steps weren't updated properly,
which causes a failure in the autoreleasing process.
Solution: add the creation of an empty directory for arm binaries
to fix the autoreleasing step. |
603,652 | 24.01.2023 16:06:11 | -28,800 | 5788ed87a08b06cad23052b282854f34270f129c | [Chore] Support 'PtMumbai' in NixOS modules
Problem: 'PtMumbai' was supported everywhere except for NixOS modules.
Solution: Support 'PtMumbai' in NixOS modules as well. | [
{
"change_type": "MODIFY",
"old_path": "nix/modules/common.nix",
"new_path": "nix/modules/common.nix",
"diff": "@@ -21,7 +21,7 @@ rec {\ndaemonOptions = sharedOptions // {\nbaseProtocols = mkOption {\n- type = types.listOf (types.enum [ \"PtLimaPt\" ]);\n+ type = types.listOf (types.enum [ \"PtLimaPt\" \"PtMumbai\" ]);\ndescription = ''\nList of protocols for which daemons will be run.\n'';\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-accuser.nix",
"new_path": "nix/modules/tezos-accuser.nix",
"diff": "@@ -9,6 +9,8 @@ let\noctez-accuser-pkgs = {\n\"PtLimaPt\" =\n\"${pkgs.octezPackages.octez-accuser-PtLimaPt}/bin/octez-accuser-PtLimaPt\";\n+ \"PtMumbai\" =\n+ \"${pkgs.octezPackages.octez-accuser-PtMumbai}/bin/octez-accuser-PtMumbai\";\n};\ncfg = config.services.octez-accuser;\ncommon = import ./common.nix { inherit lib; inherit pkgs; };\n"
},
{
"change_type": "MODIFY",
"old_path": "nix/modules/tezos-baker.nix",
"new_path": "nix/modules/tezos-baker.nix",
"diff": "@@ -9,6 +9,8 @@ let\noctez-baker-pkgs = {\n\"PtLimaPt\" =\n\"${pkgs.octezPackages.octez-baker-PtLimaPt}/bin/octez-baker-PtLimaPt\";\n+ \"PtMumbai\" =\n+ \"${pkgs.octezPackages.octez-baker-PtMumbai}/bin/octez-baker-PtMumbai\";\n};\noctez-client = \"${pkgs.octezPackages.octez-client}/bin/octez-client\";\ncfg = config.services.octez-baker;\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Support 'PtMumbai' in NixOS modules
Problem: 'PtMumbai' was supported everywhere except for NixOS modules.
Solution: Support 'PtMumbai' in NixOS modules as well. |
603,652 | 25.01.2023 12:45:15 | -28,800 | 599718ddb7fe2243e02a3110122a539657d68bb8 | [Chore] Bump nixpkgs
Problem: openssl-3.0.7 build fails on macOS for currently used nixpkgs
revision.
Solution: Used nixpkgs revision that has fixes build of openssl on
macOS. | [
{
"change_type": "MODIFY",
"old_path": "flake.lock",
"new_path": "flake.lock",
"diff": "},\n\"nixpkgs_2\": {\n\"locked\": {\n- \"lastModified\": 1667318090,\n- \"narHash\": \"sha256-AvxgT+t1BWZs8IfdseHl8+7wvWWm9pvysupMT9wXdH0=\",\n+ \"lastModified\": 1674621699,\n+ \"narHash\": \"sha256-kOrPJmbrmoxuggREz1AfWYagh0MXbp1qi4pRxfTaduU=\",\n\"owner\": \"serokell\",\n\"repo\": \"nixpkgs\",\n- \"rev\": \"4bce79cf151aad3c0bed46a32bdb4b165f00cb7e\",\n+ \"rev\": \"0c9ef2694255a9db805af7c86b210d529b4d5eca\",\n\"type\": \"github\"\n},\n\"original\": {\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Bump nixpkgs
Problem: openssl-3.0.7 build fails on macOS for currently used nixpkgs
revision.
Solution: Used nixpkgs revision that has fixes build of openssl on
macOS. |
603,652 | 27.01.2023 16:08:59 | -28,800 | a5b5310cb7581018c1e6927fe818a3b23685d4f1 | [Chore] Add 'cmake' to brew build dependencies
Problem: Octez now has 'conf-cmake' opam dependency that requires
'cmake' to be present.
Solution: Add 'cmake' to list of build dependencies for brew formulae. | [
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-PtLimaPt.rb",
"new_path": "Formula/tezos-accuser-PtLimaPt.rb",
"diff": "@@ -13,7 +13,7 @@ class TezosAccuserPtlimapt < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -13,7 +13,7 @@ class TezosAdminClient < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-PtLimaPt.rb",
"new_path": "Formula/tezos-baker-PtLimaPt.rb",
"diff": "@@ -13,7 +13,7 @@ class TezosBakerPtlimapt < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -13,7 +13,7 @@ class TezosClient < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -13,7 +13,7 @@ class TezosCodec < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -13,7 +13,7 @@ class TezosNode < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -13,7 +13,7 @@ class TezosSigner < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-smart-rollup-client-PtMumbai.rb",
"new_path": "Formula/tezos-smart-rollup-client-PtMumbai.rb",
"diff": "@@ -14,7 +14,7 @@ class TezosSmartRollupClientPtmumbai < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-smart-rollup-node-PtMumbai.rb",
"new_path": "Formula/tezos-smart-rollup-node-PtMumbai.rb",
"diff": "@@ -15,7 +15,7 @@ class TezosSmartRollupNodePtmumbai < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-tx-rollup-client-PtLimaPt.rb",
"new_path": "Formula/tezos-tx-rollup-client-PtLimaPt.rb",
"diff": "@@ -13,7 +13,7 @@ class TezosTxRollupClientPtlimapt < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-tx-rollup-node-PtLimaPt.rb",
"new_path": "Formula/tezos-tx-rollup-node-PtLimaPt.rb",
"diff": "@@ -15,7 +15,7 @@ class TezosTxRollupNodePtlimapt < Formula\nversion \"v16.0-rc1-1\"\n- build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init]\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\nbuild_dependencies.each do |dependency|\ndepends_on dependency => :build\nend\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add 'cmake' to brew build dependencies
Problem: Octez now has 'conf-cmake' opam dependency that requires
'cmake' to be present.
Solution: Add 'cmake' to list of build dependencies for brew formulae. |
603,652 | 27.01.2023 16:11:08 | -28,800 | 9b20e2bbc7c94566302aface6ee7d1c9d2ad2d4c | [Chore] Bump nixpkgs
Problem: Currently our nixpkgs fork is in a bit weird state which leads
to the fact that it rarely hits public caches.
Solution: Bump nixpkgs to a new repin revision that is based on a fresh
'nixos-unstable' branch. | [
{
"change_type": "MODIFY",
"old_path": "flake.lock",
"new_path": "flake.lock",
"diff": "},\n\"nixpkgs_2\": {\n\"locked\": {\n- \"lastModified\": 1674621699,\n- \"narHash\": \"sha256-kOrPJmbrmoxuggREz1AfWYagh0MXbp1qi4pRxfTaduU=\",\n+ \"lastModified\": 1674736538,\n+ \"narHash\": \"sha256-/DszFMkAgYyB9dTWKkoZa9i0zcrA6Z4hYrOr/u/FSxY=\",\n\"owner\": \"serokell\",\n\"repo\": \"nixpkgs\",\n- \"rev\": \"0c9ef2694255a9db805af7c86b210d529b4d5eca\",\n+ \"rev\": \"1dfdbb65d77430fc0935e8592d0abc4addcce711\",\n\"type\": \"github\"\n},\n\"original\": {\n- \"id\": \"nixpkgs\",\n- \"type\": \"indirect\"\n+ \"owner\": \"serokell\",\n+ \"repo\": \"nixpkgs\",\n+ \"rev\": \"1dfdbb65d77430fc0935e8592d0abc4addcce711\",\n+ \"type\": \"github\"\n}\n},\n\"nixpkgs_3\": {\n"
},
{
"change_type": "MODIFY",
"old_path": "flake.nix",
"new_path": "flake.nix",
"diff": "inputs = {\nnixpkgs-unstable.url = \"github:nixos/nixpkgs/nixos-unstable\";\n+ # TODO: remove once https://github.com/serokell/nixpkgs/pull/61 is merged\n+ nixpkgs.url = \"github:serokell/nixpkgs?rev=1dfdbb65d77430fc0935e8592d0abc4addcce711\";\nnix.url = \"github:nixos/nix\";\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Bump nixpkgs
Problem: Currently our nixpkgs fork is in a bit weird state which leads
to the fact that it rarely hits public caches.
Solution: Bump nixpkgs to a new repin revision that is based on a fresh
'nixos-unstable' branch. |
603,659 | 19.01.2023 15:27:27 | -10,800 | dff9524c4a3ce156f1ef6b0d42c20b8a6516a36e | [Chore] Optimize native packages build
Problem: Dependencies and sources were not reused
and rebuilt every time, despite they are about the
same for all packages.
Solution: Refactor Dockerfile, split stages in different scripts and
place them in separate layers to reuse results using docker cache system. | [
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.py",
"new_path": "docker/docker-tezos-packages.py",
"diff": "@@ -131,7 +131,7 @@ for dist in images:\nf\"\"\"\n{virtualisation_engine}\nbuild -t tezos-{target_os}-{dist}\n- -f docker/package/Dockerfile-{target_os} --build-arg dist={dist} .\n+ -f docker/package/Dockerfile-{target_os} --build-arg OCTEZ_VERSION={octez_version} --build-arg dist={dist} .\n\"\"\"\n)\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/fetch_tezos_sources.py",
"diff": "+#!/usr/bin/env python3\n+# SPDX-FileCopyrightText: 2023 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+import subprocess\n+import os\n+import re\n+import shutil\n+\n+octez_version = os.getenv(\"OCTEZ_VERSION\", None)\n+\n+if not octez_version:\n+ raise Exception(\"Environment variable OCTEZ_VERSION is not set.\")\n+\n+subprocess.run(\n+ [\n+ \"git\",\n+ \"clone\",\n+ \"--branch\",\n+ octez_version,\n+ \"https://gitlab.com/tezos/tezos.git\",\n+ \"--depth\",\n+ \"1\",\n+ ]\n+)\n+\n+shutil.rmtree(os.path.join(\"tezos\", \".git\"))\n+\n+subprocess.run([\"git\", \"clone\", \"https://gitlab.com/tezos/opam-repository.git\"])\n+\n+with open(\"tezos/scripts/version.sh\", \"r\") as f:\n+ opam_repository_tag = re.search(\n+ \"^export opam_repository_tag=([0-9a-z]*)\", f.read(), flags=re.MULTILINE\n+ ).group(1)\n+ os.chdir(\"opam-repository\")\n+ subprocess.run([\"git\", \"checkout\", opam_repository_tag])\n+ subprocess.run([\"rm\", \"-rf\", \".git\"])\n+ subprocess.run([\"rm\", \"-r\", \"zcash-params\"])\n+ subprocess.run([\"opam\", \"admin\", \"cache\"])\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-fedora",
"new_path": "docker/package/Dockerfile-fedora",
"diff": "ARG dist\nFROM fedora:${dist}\n+\nRUN dnf update -y\n-RUN dnf install -y libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel m4 perl git pkg-config \\\n- rpmdevtools python3-devel python3-setuptools wget opam rsync which cargo autoconf mock systemd systemd-rpm-macros cmake\n+RUN dnf install -y libev-devel gmp-devel hidapi-devel libffi-devel \\\n+ zlib-devel libpq-devel m4 perl git pkg-config \\\n+ rpmdevtools python3-devel python3-setuptools \\\n+ wget opam rsync which cargo autoconf mock systemd \\\n+ systemd-rpm-macros cmake\n+\nENV USER dockerbuilder\n-RUN useradd dockerbuilder && mkdir /tezos-packaging\n+RUN useradd dockerbuilder\n+\nENV HOME /tezos-packaging\n+\n+WORKDIR /tezos-packaging/docker/sources\n+ARG OCTEZ_VERSION\n+COPY docker/fetch_tezos_sources.py .\n+RUN python3 fetch_tezos_sources.py\n+\n+WORKDIR /tezos-packaging/docker\nCOPY meta.json /tezos-packaging/meta.json\nCOPY protocols.json /tezos-packaging/protocols.json\n-WORKDIR /tezos-packaging/docker\n-ENV OPAMROOT \"/tezos-packaging/docker/opamroot\"\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\nCOPY LICENSE /tezos-packaging/LICENSE\n+\nENTRYPOINT [\"python3\", \"-m\", \"package.package_generator\"]\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/Dockerfile-ubuntu",
"new_path": "docker/package/Dockerfile-ubuntu",
"diff": "ARG dist\nFROM ubuntu:${dist}\n+\nENV DEBIAN_FRONTEND=\"noninteractive\"\n-RUN apt-get update && apt-get install -y libev-dev libgmp-dev libhidapi-dev libffi-dev zlib1g-dev libpq-dev m4 perl pkg-config \\\n- debhelper dh-make dh-python devscripts autotools-dev python3-all python3-setuptools wget rsync cmake\n+RUN apt-get update\n+RUN apt-get install -y libev-dev libgmp-dev libhidapi-dev libffi-dev \\\n+ zlib1g-dev libpq-dev m4 perl pkg-config \\\n+ debhelper dh-make dh-python devscripts autotools-dev \\\n+ python3-all python3-setuptools wget rsync cmake \\\n+ software-properties-common\n+\nARG dist\n-RUN [ \"$dist\" != \"jammy\" ] && apt-get install -y python3.8 dh-systemd || true\n-RUN apt-get install -y software-properties-common\n-RUN add-apt-repository ppa:ubuntu-mozilla-security/rust-next -y && apt-get update && apt-get -y install cargo\n-RUN [ \"$dist\" != \"jammy\" ] && add-apt-repository ppa:avsm/ppa -y || true\n-RUN apt-get update && apt-get -y install opam\n+RUN if [ \"$dist\" != \"jammy\" ]; then \\\n+ apt-get install -y python3.8 dh-systemd; \\\n+ add-apt-repository ppa:avsm/ppa -y; \\\n+ install -m 0755 /usr/bin/python3.8 /usr/bin/builder; \\\n+ else \\\n+ install -m 0755 /usr/bin/python3 /usr/bin/builder; \\\n+ fi\n+\n+RUN add-apt-repository ppa:ubuntu-mozilla-security/rust-next -y && apt-get update -y\n+RUN apt-get -y install cargo opam\n+\nENV USER dockerbuilder\n-RUN useradd dockerbuilder && mkdir /tezos-packaging\n+RUN useradd dockerbuilder\n+\nENV HOME /tezos-packaging\n+\n+ARG OCTEZ_VERSION\n+WORKDIR /tezos-packaging/docker/sources\n+COPY docker/fetch_tezos_sources.py .\n+RUN python3 fetch_tezos_sources.py\n+\n+WORKDIR /tezos-packaging/docker\nCOPY meta.json /tezos-packaging/meta.json\nCOPY protocols.json /tezos-packaging/protocols.json\n-WORKDIR /tezos-packaging/docker\n-ENV OPAMROOT \"/tezos-packaging/docker/opamroot\"\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-# Uncomment once pathces are needed once again\n+# Uncomment once patches are needed once again\n# COPY docker/package/patches /tezos-packaging/docker/package/patches\nCOPY LICENSE /tezos-packaging/LICENSE\n-RUN [ \"$dist\" != \"jammy\" ] && install -m 0755 /usr/bin/python3.8 /usr/bin/builder || true\n-RUN [ \"$dist\" = \"jammy\" ] && install -m 0755 /usr/bin/python3 /usr/bin/builder || true\n+\nENTRYPOINT [\"builder\", \"-m\", \"package.package_generator\"]\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -296,32 +296,12 @@ class TezosBinaryPackage(AbstractPackage):\nif binaries_dir:\nbinary_name = self.name.replace(\"tezos\", \"octez\")\nshutil.copy(f\"{binaries_dir}/{binary_name}\", binary_name)\n- os.chdir(\"../\")\n- return\n-\n+ else:\n+ shutil.copytree(f\"{cwd}/../sources/tezos\", \"tezos\")\n+ shutil.copytree(f\"{cwd}/../sources/opam-repository\", \"opam-repository\")\nshutil.copy(f\"{cwd}/scripts/build-binary.sh\", \"build-binary.sh\")\n- subprocess.run(\n- [\n- \"git\",\n- \"clone\",\n- \"--branch\",\n- f\"v{self.meta.version}\",\n- \"https://gitlab.com/tezos/tezos.git\",\n- \"--depth\",\n- \"1\",\n- ]\n- )\n- subprocess.run([\"git\", \"clone\", \"https://gitlab.com/tezos/opam-repository.git\"])\n- with open(\"tezos/scripts/version.sh\", \"r\") as f:\n- opam_repository_tag = re.search(\n- \"^export opam_repository_tag=([0-9a-z]*)\", f.read(), flags=re.MULTILINE\n- ).group(1)\n- os.chdir(\"opam-repository\")\n- subprocess.run([\"git\", \"checkout\", opam_repository_tag])\n- subprocess.run([\"rm\", \"-rf\", \".git\"])\n- subprocess.run([\"rm\", \"-r\", \"zcash-params\"])\n- subprocess.run([\"opam\", \"admin\", \"cache\"])\n- os.chdir(\"../..\")\n+\n+ os.chdir(\"..\")\ndef gen_control_file(self, deps, ubuntu_version, out):\nstr_build_deps = \", \".join(deps)\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Optimize native packages build
Problem: Dependencies and sources were not reused
and rebuilt every time, despite they are about the
same for all packages.
Solution: Refactor Dockerfile, split stages in different scripts and
place them in separate layers to reuse results using docker cache system. |
603,659 | 19.01.2023 16:06:29 | -10,800 | a46a563c96cb6ee7e37dacd3c9626b5cabe61d96 | [Chore] Use buildkit as docker backend
Problem: Seems like much more effective docker backend
is available.
Solution: Turn it on. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-for-tags.yml",
"new_path": ".buildkite/pipeline-for-tags.yml",
"diff": "env:\nUSE_NEWER_NIX: 1\n+ DOCKER_BUILDKIT: 1\nSET_VERSION: \"export OCTEZ_VERSION=\\\"$(cat meta.json | jq -r '.tezos_ref' | cut -d'/' -f3)\\\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "env:\nSET_VERSION: \"export OCTEZ_VERSION=\\\"$(cat meta.json | jq -r '.tezos_ref' | cut -d'/' -f3)\\\"\"\n+ DOCKER_BUILDKIT: 1\nUSE_NEWER_NIX: 1\nsteps:\n"
},
{
"change_type": "MODIFY",
"old_path": "shell.nix",
"new_path": "shell.nix",
"diff": "@@ -16,4 +16,5 @@ with pkgs; mkShell {\nbuildkite-agent\n];\nOCTEZ_VERSION= with pkgs.lib; lists.last (strings.splitString \"/\" (meta.tezos_ref));\n+ DOCKER_BUILDKIT = 1;\n}\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Use buildkit as docker backend
Problem: Seems like much more effective docker backend
is available.
Solution: Turn it on. |
603,659 | 20.01.2023 15:40:22 | -10,800 | 3d6182f5c0afe082aa4d757fc87dc635e422a9a5 | [Chore] Optimize static binaries build
Problem: Separate steps are contained in `build-tezos.sh`,
so if at some point script fails, everything will be started from
scratch.
Solution: Put fetching sources, building deps and building binaries
steps on different layers to cache intermediary results. | [
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile",
"new_path": "docker/build/Dockerfile",
"diff": "@@ -11,5 +11,10 @@ RUN /build-libusb-and-hidapi.sh\nCOPY ./build/build-rust.sh /build-rust.sh\nRUN /build-rust.sh\nARG OCTEZ_VERSION\n+RUN git clone --single-branch --depth 1 --branch \"$OCTEZ_VERSION\" https://gitlab.com/tezos/tezos.git\n+WORKDIR /tezos\n+ENV OPAMYES true\n+COPY ./build/build-deps.sh /build-deps.sh\n+RUN /build-deps.sh\nCOPY ./build/build-tezos.sh /build-tezos.sh\n-RUN /build-tezos.sh ${OCTEZ_VERSION}\n+RUN /build-tezos.sh\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile.aarch64",
"new_path": "docker/build/Dockerfile.aarch64",
"diff": "@@ -17,5 +17,10 @@ RUN /build-libusb-and-hidapi.sh\nCOPY ./build/build-rust.sh /build-rust.sh\nRUN /build-rust.sh\nARG OCTEZ_VERSION\n+RUN git clone --single-branch --depth 1 --branch \"$OCTEZ_VERSION\" https://gitlab.com/tezos/tezos.git\n+WORKDIR /tezos\n+ENV OPAMYES true\n+COPY ./build/build-deps.sh /build-deps.sh\n+RUN /build-deps.sh\nCOPY ./build/build-tezos.sh /build-tezos.sh\n-RUN /build-tezos.sh ${OCTEZ_VERSION}\n+RUN /build-tezos.sh\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/build/build-deps.sh",
"diff": "+#! /usr/bin/env bash\n+\n+# SPDX-FileCopyrightText: 2023 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+set -euo pipefail\n+\n+source \"$HOME/.cargo/env\"\n+# Disable usage of instructions from the ADX extension to avoid incompatibility\n+# with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+export BLST_PORTABLE=\"yes\"\n+opam init --bare --disable-sandboxing\n+make build-deps\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/build-tezos.sh",
"new_path": "docker/build/build-tezos.sh",
"diff": "# SPDX-License-Identifier: LicenseRef-MIT-OA\n# This script builds static tezos binaries. It expects patches required for static building to be\n-# in parent directory, it also accepts tezos version as an argument.\n+# in parent directory.\nset -euo pipefail\n-tezos_version=\"$1\"\n-git clone --single-branch --branch \"$tezos_version\" https://gitlab.com/tezos/tezos.git --depth 1\n-cd tezos\n-\n-source \"$HOME/.cargo/env\"\n-export OPAMYES=\"true\"\n-# Disable usage of instructions from the ADX extension to avoid incompatibility\n-# with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n-export BLST_PORTABLE=\"yes\"\n-opam init --bare --disable-sandboxing\n-make build-deps\n-\n-eval \"$(opam env)\" && make static\n+eval \"$(opam env)\"\n+make static\nchmod +w octez-*\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Optimize static binaries build
Problem: Separate steps are contained in `build-tezos.sh`,
so if at some point script fails, everything will be started from
scratch.
Solution: Put fetching sources, building deps and building binaries
steps on different layers to cache intermediary results. |
603,659 | 27.01.2023 18:21:43 | -10,800 | f937d9850f8eee156d26b3acd004ad24a90a5e8d | [Chore] Put upx stage inside container
Problem: upx stage happens after docker build,
resulting in repeating it every time step run.
Solution: Put it inside docker layer to cache results. | [
{
"change_type": "MODIFY",
"old_path": ".buildkite/pipeline-raw.yml",
"new_path": ".buildkite/pipeline-raw.yml",
"diff": "@@ -55,7 +55,6 @@ steps:\n- eval \"$SET_VERSION\"\n- cd docker\n- ./docker-static-build.sh\n- - nix shell .#upx -c upx octez-*\nartifact_paths:\n- ./docker/octez-*\nagents:\n@@ -74,7 +73,6 @@ steps:\n# - eval \"$SET_VERSION\"\n# - cd docker\n# - ./docker-static-build.sh\n- # - upx octez-*\n# - >\n# for f in ./octez-*; do\n# mv \"\\$f\" \"\\$f-arm64\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile",
"new_path": "docker/build/Dockerfile",
"diff": "FROM alpine:3.12\nRUN apk update\nRUN apk --no-cache --virtual add rsync git m4 build-base patch unzip \\\n- bubblewrap wget pkgconfig gmp-dev libev-dev hidapi-dev eudev-dev perl opam libusb-dev bash \\\n- autoconf automake libtool linux-headers cargo libffi-dev zlib-static coreutils perl-utils\n+ bubblewrap wget pkgconfig gmp-dev libev-dev \\\n+ hidapi-dev eudev-dev perl opam libusb-dev bash \\\n+ autoconf automake libtool linux-headers cargo \\\n+ libffi-dev zlib-static coreutils perl-utils cmake\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\nCOPY ./build/build-rust.sh /build-rust.sh\nRUN /build-rust.sh\n+COPY ./build/build-upx.sh /build-upx.sh\n+RUN /build-upx.sh\nARG OCTEZ_VERSION\nRUN git clone --single-branch --depth 1 --branch \"$OCTEZ_VERSION\" https://gitlab.com/tezos/tezos.git\nWORKDIR /tezos\n@@ -18,3 +22,4 @@ COPY ./build/build-deps.sh /build-deps.sh\nRUN /build-deps.sh\nCOPY ./build/build-tezos.sh /build-tezos.sh\nRUN /build-tezos.sh\n+RUN upx octez-*\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/build/Dockerfile.aarch64",
"new_path": "docker/build/Dockerfile.aarch64",
"diff": "@@ -6,16 +6,21 @@ FROM alpine:3.12 as binary-fetch\n# See https://bugs.launchpad.net/qemu/+bug/1892684.\nRUN wget https://github.com/multiarch/qemu-user-static/releases/download/v4.2.0-7/qemu-aarch64-static\nRUN chmod +x qemu-aarch64-static\n-FROM arm64v8/alpine:3.12\n+\n+FROM arm64v8/alpine:3.12 as builder\nCOPY --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 \\\n- bubblewrap wget pkgconfig gmp-dev libev-dev hidapi-dev eudev-dev perl opam libusb-dev bash \\\n- autoconf automake libtool linux-headers cargo libffi-dev zlib-static coreutils perl-utils\n+ bubblewrap wget pkgconfig gmp-dev libev-dev \\\n+ hidapi-dev eudev-dev perl opam libusb-dev bash \\\n+ autoconf automake libtool linux-headers cargo \\\n+ libffi-dev zlib-static coreutils perl-utils cmake\nCOPY ./build/build-libusb-and-hidapi.sh /build-libusb-and-hidapi.sh\nRUN /build-libusb-and-hidapi.sh\nCOPY ./build/build-rust.sh /build-rust.sh\nRUN /build-rust.sh\n+COPY ./build/build-upx.sh /build-upx.sh\n+RUN /build-upx.sh\nARG OCTEZ_VERSION\nRUN git clone --single-branch --depth 1 --branch \"$OCTEZ_VERSION\" https://gitlab.com/tezos/tezos.git\nWORKDIR /tezos\n@@ -24,3 +29,4 @@ COPY ./build/build-deps.sh /build-deps.sh\nRUN /build-deps.sh\nCOPY ./build/build-tezos.sh /build-tezos.sh\nRUN /build-tezos.sh\n+RUN upx octez-*\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker/build/build-upx.sh",
"diff": "+#!/usr/bin/env bash\n+\n+# SPDX-FileCopyrightText: 2023 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+# This script builds upx. alpine:3.12 for aarch64 doesn't provide upx,\n+# so we should build it natively for consistensy.\n+set -euo pipefail\n+\n+git clone --depth 1 --branch v4.0.1 https://github.com/upx/upx.git\n+\n+cd upx\n+git submodule update --init\n+make\n+\n+cd build/release\n+make install\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Put upx stage inside container
Problem: upx stage happens after docker build,
resulting in repeating it every time step run.
Solution: Put it inside docker layer to cache results. |
603,659 | 24.01.2023 19:50:02 | -10,800 | cb9d4386dcd7b3841fb2d819ac01af4929b22de2 | [Chore] Add missing dependencies to nix shell
Problem: Shells package building was executed in lacks some
dependencies to sign packages correctly.
Solution: Supply them. | [
{
"change_type": "MODIFY",
"old_path": "shell.nix",
"new_path": "shell.nix",
"diff": "{ pkgs, meta, ... }:\nwith pkgs; mkShell {\nbuildInputs = [\n- python3Packages.black\n- python3\n- shellcheck\n- jq\n- copr-cli\ngh\n- dput\n- debian-devscripts\n+ jq\n+ git\nrpm\n+ perl\n+ dput\n+ which\n+ gnupg\n+ rename\n+ gnused\n+ python3\n+ copr-cli\n+ coreutils\n+ util-linux\n+ shellcheck\nbuildkite-agent\n+ debian-devscripts\n+ python3Packages.black\n];\nOCTEZ_VERSION= with pkgs.lib; lists.last (strings.splitString \"/\" (meta.tezos_ref));\nDOCKER_BUILDKIT = 1;\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add missing dependencies to nix shell
Problem: Shells package building was executed in lacks some
dependencies to sign packages correctly.
Solution: Supply them. |
603,659 | 26.01.2023 10:16:53 | -10,800 | 23a3bc5845bc59cb62c027feb8b3e1ed37b7080f | [Chore] Fix sources archive presence recognition
Problem: Deb packages' names are lowercased, and so the
name of source archive reflects that. But now build script
awaits source archives to contain package name with initial casing.
Solution: Construct source archive name with package name lowercased. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/package_generator.py",
"new_path": "docker/package/package_generator.py",
"diff": "@@ -136,7 +136,9 @@ def main():\nerrors = []\nfor package in packages:\nif getattr(package, \"letter_version\", None) is None:\n- source_archive = f\"{package.name}_{package.meta.version}.orig.tar.gz\"\n+ source_archive = (\n+ f\"{package.name.lower()}_{package.meta.version}.orig.tar.gz\"\n+ )\nif source_archive in source_archives:\npackage.source_archive = os.path.join(\nargs.sources_dir, source_archive\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fix sources archive presence recognition
Problem: Deb packages' names are lowercased, and so the
name of source archive reflects that. But now build script
awaits source archives to contain package name with initial casing.
Solution: Construct source archive name with package name lowercased. |
603,659 | 26.01.2023 10:26:07 | -10,800 | 892043648f6b00e089b9fdce3ae24df2a1e7e996 | [Chore] Move package signing to the latest stage
Problem: Package signing happened inside loop on distributions,
resulting in resigning of already built packages for previous
distribution.
Solution: Sign packages when everything is already built. | [
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.py",
"new_path": "docker/docker-tezos-packages.py",
"diff": "@@ -181,14 +181,22 @@ def build_packages(pkgs, image, distros):\nprint(\"Unrecoverable error occured.\")\nsys.exit(exit_code)\n+\n+packages_to_build = get_packages_to_build(args.packages)\n+\n+if not args.build_sapling_package:\n+ packages_to_build.pop(\"tezos-sapling-params\", None)\n+\n+for image in images:\n+ dists_to_build = [image] if target_os == \"ubuntu\" else distributions\n+ build_packages(packages_to_build.keys(), image, dists_to_build)\n+\nartifacts = (os.path.join(args.output_dir, x) for x in os.listdir(args.output_dir))\nif args.gpg_sign and args.type == \"source\":\nif target_os == \"ubuntu\":\nfor f in artifacts:\nif f.endswith(\".changes\"):\n- call(\n- f\"sed -i 's/^Changed-By: .*$/Changed-By: {args.gpg_sign}/' {f}\"\n- )\n+ call(f\"sed -i 's/^Changed-By: .*$/Changed-By: {args.gpg_sign}/' {f}\")\ncall(f\"debsign {f}\")\nelif target_os == \"fedora\":\ngpg = shutil.which(\"gpg\")\n@@ -197,13 +205,3 @@ def build_packages(pkgs, image, distros):\ncall(\nf'rpmsign --define=\"%_gpg_name {args.gpg_sign}\" --define=\"%__gpg {gpg}\" --addsign {f}'\n)\n-\n-\n-packages_to_build = get_packages_to_build(args.packages)\n-\n-if not args.build_sapling_package:\n- packages_to_build.pop(\"tezos-sapling-params\", None)\n-\n-for image in images:\n- dists_to_build = [image] if target_os == \"ubuntu\" else distributions\n- build_packages(packages_to_build.keys(), image, dists_to_build)\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Move package signing to the latest stage
Problem: Package signing happened inside loop on distributions,
resulting in resigning of already built packages for previous
distribution.
Solution: Sign packages when everything is already built. |
603,659 | 26.01.2023 10:55:58 | -10,800 | 89127abf64002f45cae89f5dcca2026a3decdf3c | [Chore] Ensure using same source for ubuntu
Problem: Launchpad rejects to upload packages
with same version but different original source
archive. Since packages are built in dedicated
per-distro containers, different `gzip` version
could result in different archives in terms of
checksum.
Solution: Reuse source archives after they formed
once. | [
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.py",
"new_path": "docker/docker-tezos-packages.py",
"diff": "@@ -135,9 +135,13 @@ for dist in images:\n\"\"\"\n)\n+packages_to_build = get_packages_to_build(args.packages)\n+\n+if not args.build_sapling_package:\n+ packages_to_build.pop(\"tezos-sapling-params\", None)\n-# enclose defined above variables to shorten argument list\n-def build_packages(pkgs, image, distros):\n+for image in images:\n+ distros = [image] if target_os == \"ubuntu\" else distributions\ncmd_args = \" \".join(\n[\nf\"--os {target_os}\",\n@@ -145,7 +149,7 @@ def build_packages(pkgs, image, distros):\nf\"--sources-dir {sources_dir_name}\" if sources_dir_name else \"\",\nf\"--type {args.type}\",\nf\"--distributions {' '.join(distros)}\",\n- f\"--packages {' '.join(pkgs)}\",\n+ f\"--packages {' '.join(packages_to_build.keys())}\",\n]\n)\n@@ -181,15 +185,12 @@ def build_packages(pkgs, image, distros):\nprint(\"Unrecoverable error occured.\")\nsys.exit(exit_code)\n-\n-packages_to_build = get_packages_to_build(args.packages)\n-\n-if not args.build_sapling_package:\n- packages_to_build.pop(\"tezos-sapling-params\", None)\n-\n-for image in images:\n- dists_to_build = [image] if target_os == \"ubuntu\" else distributions\n- build_packages(packages_to_build.keys(), image, dists_to_build)\n+ # the same source archive has to be reused for an ubuntu package on different distros\n+ if sources_dir_name is None and target_os == \"ubuntu\":\n+ sources_dir_name = \"origs\"\n+ docker_volumes += (\n+ f\"-v {args.output_dir}:/tezos-packaging/docker/{sources_dir_name}/\"\n+ )\nartifacts = (os.path.join(args.output_dir, x) for x in os.listdir(args.output_dir))\nif args.gpg_sign and args.type == \"source\":\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Ensure using same source for ubuntu
Problem: Launchpad rejects to upload packages
with same version but different original source
archive. Since packages are built in dedicated
per-distro containers, different `gzip` version
could result in different archives in terms of
checksum.
Solution: Reuse source archives after they formed
once. |
603,650 | 27.01.2023 18:47:13 | -3,600 | 6f888af00620ed514b9756d9d08116008d68e137 | [Chore] Add formulae for mumbai's baker and accuser
Problem: Mumbai support was added in the latest release,
but we didn't add formulae for its baker and accuser.
Solution: Add these two new formulae. | [
{
"change_type": "MODIFY",
"old_path": ".github/workflows/build-bottles.yml",
"new_path": ".github/workflows/build-bottles.yml",
"diff": "@@ -17,7 +17,7 @@ jobs:\nmatrix:\nos: [ { id: macos-12, name: \"monterey\" } ]\n# we don't bottle meta-formulas that contain only services\n- formula: [tezos-accuser-PtLimaPt, tezos-admin-client, tezos-baker-PtLimaPt, tezos-client, tezos-codec, tezos-node, tezos-signer, tezos-smart-rollup-client-PtMumbai, tezos-smart-rollup-node-PtMumbai, tezos-tx-rollup-client-PtLimaPt, tezos-tx-rollup-node-PtLimaPt]\n+ formula: [tezos-accuser-PtLimaPt, tezos-accuser-PtMumbai, tezos-admin-client, tezos-baker-PtLimaPt, tezos-baker-PtMumbai, tezos-client, tezos-codec, tezos-node, tezos-signer, tezos-smart-rollup-client-PtMumbai, tezos-smart-rollup-node-PtMumbai, tezos-tx-rollup-client-PtLimaPt, tezos-tx-rollup-node-PtLimaPt]\nsteps:\n- name: Checkout\nuses: actions/checkout@v2\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Formula/tezos-accuser-PtMumbai.rb",
"diff": "+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosAccuserPtmumbai < 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 => \"v16.0-rc1\", :shallow => false\n+\n+ version \"v16.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\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/#{TezosAccuserPtmumbai.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ # Disable usage of instructions from the ADX extension to avoid incompatibility\n+ # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+ ENV[\"BLST_PORTABLE\"]=\"yes\"\n+ # Here is the workaround to use opam 2.0 because Tezos is currently not compatible with opam 2.1.0 and newer\n+ arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n+ system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.60.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+ ln_sf \"#{bin}/#{name}\", \"#{bin}/#{name.gsub(\"octez\", \"tezos\")}\"\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}/octez-accuser-PtMumbai\"\n+\n+ accuser_config=\"$TEZOS_CLIENT_DIR/config\"\n+ mkdir -p \"$TEZOS_CLIENT_DIR\"\n+\n+ if [ ! -f \"$accuser_config\" ]; then\n+ \"$accuser\" --endpoint \"$NODE_RPC_SCHEME://$NODE_RPC_ADDR\" \\\n+ config init --output \"$accuser_config\" >/dev/null 2>&1\n+ else\n+ \"$accuser\" --endpoint \"$NODE_RPC_SCHEME://$NODE_RPC_ADDR\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+\n+ exec \"$accuser\" --endpoint \"$NODE_RPC_SCHEME://$NODE_RPC_ADDR\" run\n+ EOS\n+ File.write(\"tezos-accuser-PtMumbai-start\", startup_contents)\n+ bin.install \"tezos-accuser-PtMumbai-start\"\n+ make_deps\n+ install_template \"src/proto_015_PtMumbai/bin_accuser/main_accuser_015_PtMumbai.exe\",\n+ \"_build/default/src/proto_015_PtMumbai/bin_accuser/main_accuser_015_PtMumbai.exe\",\n+ \"octez-accuser-PtMumbai\"\n+ end\n+\n+ plist_options manual: \"tezos-accuser-PtMumbai 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-PtMumbai-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>TEZOS_CLIENT_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>NODE_RPC_SCHEME</key>\n+ <string>http</string>\n+ <key>NODE_RPC_ADDR</key>\n+ <string>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-PtMumbai.rb",
"diff": "+# SPDX-FileCopyrightText: 2022 Oxhead Alpha\n+# SPDX-License-Identifier: LicenseRef-MIT-OA\n+\n+class TezosBakerPtmumbai < 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 => \"v16.0-rc1\", :shallow => false\n+\n+ version \"v16.0-rc1-1\"\n+\n+ build_dependencies = %w[pkg-config coreutils autoconf rsync wget rustup-init cmake]\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/#{TezosBakerPtmumbai.version}/\"\n+ end\n+\n+ def make_deps\n+ ENV.deparallelize\n+ ENV[\"CARGO_HOME\"]=\"./.cargo\"\n+ # Disable usage of instructions from the ADX extension to avoid incompatibility\n+ # with old CPUs, see https://gitlab.com/dannywillems/ocaml-bls12-381/-/merge_requests/135/\n+ ENV[\"BLST_PORTABLE\"]=\"yes\"\n+ # Here is the workaround to use opam 2.0.9 because Tezos is currently not compatible with opam 2.1.0 and newer\n+ arch = RUBY_PLATFORM.include?(\"arm64\") ? \"arm64\" : \"x86_64\"\n+ system \"curl\", \"-L\", \"https://github.com/ocaml/opam/releases/download/2.0.9/opam-2.0.9-#{arch}-macos\", \"--create-dirs\", \"-o\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ system \"chmod\", \"+x\", \"#{ENV[\"HOME\"]}/.opam-bin/opam\"\n+ ENV[\"PATH\"]=\"#{ENV[\"HOME\"]}/.opam-bin:#{ENV[\"PATH\"]}\"\n+ system \"rustup-init\", \"--default-toolchain\", \"1.60.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+ ln_sf \"#{bin}/#{name}\", \"#{bin}/#{name.gsub(\"octez\", \"tezos\")}\"\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}/octez-baker-PtMumbai\"\n+\n+ baker_config=\"$TEZOS_CLIENT_DIR/config\"\n+ mkdir -p \"$TEZOS_CLIENT_DIR\"\n+\n+ if [ ! -f \"$baker_config\" ]; then\n+ \"$baker\" --endpoint \"$NODE_RPC_SCHEME://$NODE_RPC_ADDR\" \\\n+ config init --output \"$baker_config\" >/dev/null 2>&1\n+ else\n+ \"$baker\" --endpoint \"$NODE_RPC_SCHEME://$NODE_RPC_ADDR\" \\\n+ config update >/dev/null 2>&1\n+ fi\n+\n+ launch_baker() {\n+ exec \"$baker\" \\\n+ --endpoint \"$NODE_RPC_SCHEME://$NODE_RPC_ADDR\" \\\n+ run with local node \"$TEZOS_NODE_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-PtMumbai-start\", startup_contents)\n+ bin.install \"tezos-baker-PtMumbai-start\"\n+ make_deps\n+ install_template \"src/proto_015_PtMumbai/bin_baker/main_baker_015_PtMumbai.exe\",\n+ \"_build/default/src/proto_015_PtMumbai/bin_baker/main_baker_015_PtMumbai.exe\",\n+ \"octez-baker-PtMumbai\"\n+ end\n+ plist_options manual: \"tezos-baker-PtMumbai 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-PtMumbai-start</string>\n+ <key>EnvironmentVariables</key>\n+ <dict>\n+ <key>TEZOS_CLIENT_DIR</key>\n+ <string>#{var}/lib/tezos/client</string>\n+ <key>TEZOS_NODE_DIR</key>\n+ <string></string>\n+ <key>NODE_RPC_SCHEME</key>\n+ <string>http</string>\n+ <key>NODE_RPC_ADDR</key>\n+ <string>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": "MODIFY",
"old_path": "scripts/build-all-bottles.sh",
"new_path": "scripts/build-all-bottles.sh",
"diff": "@@ -19,7 +19,7 @@ set -euo pipefail\nretval=\"0\"\n# we don't bottle meta-formulas that contain only services\n-formulae=(\"tezos-accuser-PtLimaPt\" \"tezos-admin-client\" \"tezos-baker-PtLimaPt\" \"tezos-client\" \"tezos-codec\" \"tezos-node\" \"tezos-signer\" \"tezos-smart-rollup-client-PtMumbai\" \"tezos-smart-rollup-node-PtMumbai\" \"tezos-tx-rollup-client-PtLimaPt\" \"tezos-tx-rollup-node-PtLimaPt\")\n+formulae=(\"tezos-accuser-PtLimaPt\" \"tezos-accuser-PtMumbai\" \"tezos-admin-client\" \"tezos-baker-PtLimaPt\" \"tezos-baker-PtMumbai\" \"tezos-client\" \"tezos-codec\" \"tezos-node\" \"tezos-signer\" \"tezos-smart-rollup-client-PtMumbai\" \"tezos-smart-rollup-node-PtMumbai\" \"tezos-tx-rollup-client-PtLimaPt\" \"tezos-tx-rollup-node-PtLimaPt\")\n# tezos-sapling-params is used as a dependency for some of the formulas\n# so we handle it separately.\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add formulae for mumbai's baker and accuser
Problem: Mumbai support was added in the latest release,
but we didn't add formulae for its baker and accuser.
Solution: Add these two new formulae. |
603,659 | 31.01.2023 11:27:41 | -10,800 | b2c037f038d9a96b2454d5126c2bd78b73fad215 | [Chore] Reset `letter_version`
Problem: For some reason, `letter_version` wasn't
reset on new upsteam release.
Solution: Reset it manually. | [
{
"change_type": "MODIFY",
"old_path": "docker/package/model.py",
"new_path": "docker/package/model.py",
"diff": "@@ -585,7 +585,7 @@ class TezosBakingServicesPackage(AbstractPackage):\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+ letter_version = \"\"\nbuildfile = \"setup.py\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Reset `letter_version`
Problem: For some reason, `letter_version` wasn't
reset on new upsteam release.
Solution: Reset it manually. |
603,652 | 02.02.2023 14:32:44 | -28,800 | 04f48a735da7f412ae54ffff236fe7e5545d904e | [Chore] Fix baker and accuser mumbai formulae
Problem: Wrong source paths were specified.
Solution: Specify correct ones. | [
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-PtMumbai.rb",
"new_path": "Formula/tezos-accuser-PtMumbai.rb",
"diff": "@@ -77,8 +77,8 @@ class TezosAccuserPtmumbai < Formula\nFile.write(\"tezos-accuser-PtMumbai-start\", startup_contents)\nbin.install \"tezos-accuser-PtMumbai-start\"\nmake_deps\n- install_template \"src/proto_015_PtMumbai/bin_accuser/main_accuser_015_PtMumbai.exe\",\n- \"_build/default/src/proto_015_PtMumbai/bin_accuser/main_accuser_015_PtMumbai.exe\",\n+ install_template \"src/proto_016_PtMumbai/bin_accuser/main_accuser_016_PtMumbai.exe\",\n+ \"_build/default/src/proto_016_PtMumbai/bin_accuser/main_accuser_016_PtMumbai.exe\",\n\"octez-accuser-PtMumbai\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-PtMumbai.rb",
"new_path": "Formula/tezos-baker-PtMumbai.rb",
"diff": "@@ -87,8 +87,8 @@ class TezosBakerPtmumbai < Formula\nFile.write(\"tezos-baker-PtMumbai-start\", startup_contents)\nbin.install \"tezos-baker-PtMumbai-start\"\nmake_deps\n- install_template \"src/proto_015_PtMumbai/bin_baker/main_baker_015_PtMumbai.exe\",\n- \"_build/default/src/proto_015_PtMumbai/bin_baker/main_baker_015_PtMumbai.exe\",\n+ install_template \"src/proto_016_PtMumbai/bin_baker/main_baker_016_PtMumbai.exe\",\n+ \"_build/default/src/proto_016_PtMumbai/bin_baker/main_baker_016_PtMumbai.exe\",\n\"octez-baker-PtMumbai\"\nend\nplist_options manual: \"tezos-baker-PtMumbai run with local node\"\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Fix baker and accuser mumbai formulae
Problem: Wrong source paths were specified.
Solution: Specify correct ones. |
603,650 | 02.02.2023 16:48:26 | -3,600 | 7a25f338042c566546adbcc344582bcecc73bea3 | [Chore] Add v16.0-rc1-1 hashes to brew formulae for Big Sur | [
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-PtLimaPt.rb",
"new_path": "Formula/tezos-accuser-PtLimaPt.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosAccuserPtlimapt < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuserPtlimapt.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"08bc487af3a53a382bdbc2ca1aee6bc75534379996e0b04597bd6d8f010d4a82\"\n+ sha256 cellar: :any, big_sur: \"9c8fb73f6e685f3f29396c3f2dd3597d74ee3169621c9230be4199882b5099e3\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-PtMumbai.rb",
"new_path": "Formula/tezos-accuser-PtMumbai.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosAccuserPtmumbai < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuserPtmumbai.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"0523ab4387c0e84c44910531686241b07f2bde6a5bcdc8ea41cf23143b872b5c\"\n+ sha256 cellar: :any, big_sur: \"5f97cb67ebac9e8e63bfb23be046159890517a5b2ed15ac79241cd0ae3c3de6e\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"a789f345cfe7238d7131d4ae6c60ceea343e68fcf61bf7a1f527531307577790\"\n+ sha256 cellar: :any, big_sur: \"2268f9647133c028a99fb896efb2455546e6026d105ec3c9ccdecf1bfbb6ba87\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-PtLimaPt.rb",
"new_path": "Formula/tezos-baker-PtLimaPt.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosBakerPtlimapt < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBakerPtlimapt.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"0af7bc278ae90a2eecfa1c3cb7dee6233ee168b4a72d104635323badce1751b2\"\n+ sha256 cellar: :any, big_sur: \"0ea0dc84e8b80bdbc96fb1a2c6cc96d33b4e71da14e0de3278583e50d52e60f6\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-PtMumbai.rb",
"new_path": "Formula/tezos-baker-PtMumbai.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosBakerPtmumbai < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBakerPtmumbai.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"4e8fd8a46e9b0061296de0d93a9d0318c3670f9efaed41a0be86269885e0ab8c\"\n+ sha256 cellar: :any, big_sur: \"bda83ab8badfd6a717ddb1f81f1fd1ea7a56770d37e5176758420da73274385d\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"60a544aadcabe8fe3dfd97795892cdd91a856aca97e383f3652c829fcb4bda6d\"\n+ sha256 cellar: :any, big_sur: \"9617c69dbbdd724b6e8240963cf3d31c325f2728d5a0d4e23ee22d6ec04daa2c\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"73ef805d8a7121f34418c43229afafbc9137866c5534fca7c885d057573df4a8\"\n+ sha256 cellar: :any, big_sur: \"65e423aa1abca58b6009df38b01f5ee2e49bc46776adb6c300399e572efa06ab\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"b4bfff949d677152f10f7148c88325b7d3d4c2dd06a15be341b85a491e21bb88\"\n+ sha256 cellar: :any, big_sur: \"90d88e3de4b30ecb15c678ef83d0830bef8d93db7ca2a26bb580b76e726a1717\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"0ab5bf181ab3e5e4a35b6c71267b183e02a2258d53d3bef4fb80e80c572fab9c\"\n+ sha256 cellar: :any, big_sur: \"b14a87bc91627b2c05805613e9f0b971584cd771de2b9879ad360b3dfcc9e2a3\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-smart-rollup-client-PtMumbai.rb",
"new_path": "Formula/tezos-smart-rollup-client-PtMumbai.rb",
"diff": "@@ -27,6 +27,8 @@ class TezosSmartRollupClientPtmumbai < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSmartRollupClientPtmumbai.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"a4b9a41393264e562b1829b630650521386d1457565fccb42ff7176b9fda6744\"\n+ sha256 cellar: :any, big_sur: \"e30a7eadb384b5aeb779ca188991ffe1f2d48cc93f486540559f34836b5ff829\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-smart-rollup-node-PtMumbai.rb",
"new_path": "Formula/tezos-smart-rollup-node-PtMumbai.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosSmartRollupNodePtmumbai < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSmartRollupNodePtmumbai.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"b207fdbb85b4068a6875f83f7a849d30a7d0278cdf4be9ecb06022501eeb4fc1\"\n+ sha256 cellar: :any, big_sur: \"3d4f88c53cd7eb3d97aca0a9d8c97dd991503257161bcf20c0cf93b2cecd7b69\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-tx-rollup-client-PtLimaPt.rb",
"new_path": "Formula/tezos-tx-rollup-client-PtLimaPt.rb",
"diff": "@@ -26,6 +26,8 @@ class TezosTxRollupClientPtlimapt < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosTxRollupClientPtlimapt.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"b7f1bb9d6669f2d91da4acc326aab1de45295ac00f78be1597c73c2c02ca54a4\"\n+ sha256 cellar: :any, big_sur: \"5f1d17be12448c85049067a4a358e2f5ca9ff70073c45d4b4b7e0949df5e550f\"\nend\ndef make_deps\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-tx-rollup-node-PtLimaPt.rb",
"new_path": "Formula/tezos-tx-rollup-node-PtLimaPt.rb",
"diff": "@@ -28,6 +28,8 @@ class TezosTxRollupNodePtlimapt < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosTxRollupNodePtlimapt.version}/\"\n+ sha256 cellar: :any, arm64_big_sur: \"1045738d5a383df43ee3af2427b8736c89af03f80b6ba0a6900aea774dc2b048\"\n+ sha256 cellar: :any, big_sur: \"634c987e3fc8bf10d3ec4f094b878b627bcc437b387ca11ac06b49fb91ca0301\"\nend\ndef make_deps\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add v16.0-rc1-1 hashes to brew formulae for Big Sur |
603,650 | 02.02.2023 16:48:43 | -3,600 | 7b72c7f34df588374c9aa8e3fbd06e159166864f | [Chore] Add v16.0-rc1-1 hashes to brew formulae for Monterey | [
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-PtLimaPt.rb",
"new_path": "Formula/tezos-accuser-PtLimaPt.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosAccuserPtlimapt < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuserPtlimapt.version}/\"\n+ sha256 cellar: :any, monterey: \"7458425036a94cfd637ab0531974cd899488baa7cf66ec0dea6345bf097c56ae\"\nsha256 cellar: :any, arm64_big_sur: \"08bc487af3a53a382bdbc2ca1aee6bc75534379996e0b04597bd6d8f010d4a82\"\nsha256 cellar: :any, big_sur: \"9c8fb73f6e685f3f29396c3f2dd3597d74ee3169621c9230be4199882b5099e3\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-accuser-PtMumbai.rb",
"new_path": "Formula/tezos-accuser-PtMumbai.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosAccuserPtmumbai < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAccuserPtmumbai.version}/\"\n+ sha256 cellar: :any, monterey: \"1a0ea9e89ed1edd6c2bb587e76b591a1b4f7f8df6af35bf3a6a38c824866ed64\"\nsha256 cellar: :any, arm64_big_sur: \"0523ab4387c0e84c44910531686241b07f2bde6a5bcdc8ea41cf23143b872b5c\"\nsha256 cellar: :any, big_sur: \"5f97cb67ebac9e8e63bfb23be046159890517a5b2ed15ac79241cd0ae3c3de6e\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-admin-client.rb",
"new_path": "Formula/tezos-admin-client.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosAdminClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosAdminClient.version}/\"\n+ sha256 cellar: :any, monterey: \"51b0a3893345bbae8d2097a56a3700e35c190882d2ea9d43ed6611438be800e0\"\nsha256 cellar: :any, arm64_big_sur: \"a789f345cfe7238d7131d4ae6c60ceea343e68fcf61bf7a1f527531307577790\"\nsha256 cellar: :any, big_sur: \"2268f9647133c028a99fb896efb2455546e6026d105ec3c9ccdecf1bfbb6ba87\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-PtLimaPt.rb",
"new_path": "Formula/tezos-baker-PtLimaPt.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosBakerPtlimapt < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBakerPtlimapt.version}/\"\n+ sha256 cellar: :any, monterey: \"d2d2878942eeb84983417c5e67ee8b06cabe64bc5e74b1e811baebf5fb650519\"\nsha256 cellar: :any, arm64_big_sur: \"0af7bc278ae90a2eecfa1c3cb7dee6233ee168b4a72d104635323badce1751b2\"\nsha256 cellar: :any, big_sur: \"0ea0dc84e8b80bdbc96fb1a2c6cc96d33b4e71da14e0de3278583e50d52e60f6\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-baker-PtMumbai.rb",
"new_path": "Formula/tezos-baker-PtMumbai.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosBakerPtmumbai < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosBakerPtmumbai.version}/\"\n+ sha256 cellar: :any, monterey: \"3a1546258c954d8586786096657eaa92053d6b40aaa1bbee5093571e6c3a4d57\"\nsha256 cellar: :any, arm64_big_sur: \"4e8fd8a46e9b0061296de0d93a9d0318c3670f9efaed41a0be86269885e0ab8c\"\nsha256 cellar: :any, big_sur: \"bda83ab8badfd6a717ddb1f81f1fd1ea7a56770d37e5176758420da73274385d\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-client.rb",
"new_path": "Formula/tezos-client.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosClient < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosClient.version}/\"\n+ sha256 cellar: :any, monterey: \"24e413c8d23e279f71aba6c774b5f6a57e87768a016d0fadc76c723381866ebf\"\nsha256 cellar: :any, arm64_big_sur: \"60a544aadcabe8fe3dfd97795892cdd91a856aca97e383f3652c829fcb4bda6d\"\nsha256 cellar: :any, big_sur: \"9617c69dbbdd724b6e8240963cf3d31c325f2728d5a0d4e23ee22d6ec04daa2c\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-codec.rb",
"new_path": "Formula/tezos-codec.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosCodec < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosCodec.version}/\"\n+ sha256 cellar: :any, monterey: \"4b42bc870e8e3c770ba84ccc159810946bb454ee83060cf26103585d06dd792b\"\nsha256 cellar: :any, arm64_big_sur: \"73ef805d8a7121f34418c43229afafbc9137866c5534fca7c885d057573df4a8\"\nsha256 cellar: :any, big_sur: \"65e423aa1abca58b6009df38b01f5ee2e49bc46776adb6c300399e572efa06ab\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-node.rb",
"new_path": "Formula/tezos-node.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosNode < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosNode.version}/\"\n+ sha256 cellar: :any, monterey: \"fc8368f22a093cef1bd2120e6cbb76e8d8af0319e3418d23280e997f8bdd3e6c\"\nsha256 cellar: :any, arm64_big_sur: \"b4bfff949d677152f10f7148c88325b7d3d4c2dd06a15be341b85a491e21bb88\"\nsha256 cellar: :any, big_sur: \"90d88e3de4b30ecb15c678ef83d0830bef8d93db7ca2a26bb580b76e726a1717\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-signer.rb",
"new_path": "Formula/tezos-signer.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosSigner < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSigner.version}/\"\n+ sha256 cellar: :any, monterey: \"46e2eb2487beff9c5ede79f79229612caa0054db44399b89ac1f0dc72ada8e13\"\nsha256 cellar: :any, arm64_big_sur: \"0ab5bf181ab3e5e4a35b6c71267b183e02a2258d53d3bef4fb80e80c572fab9c\"\nsha256 cellar: :any, big_sur: \"b14a87bc91627b2c05805613e9f0b971584cd771de2b9879ad360b3dfcc9e2a3\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-smart-rollup-client-PtMumbai.rb",
"new_path": "Formula/tezos-smart-rollup-client-PtMumbai.rb",
"diff": "@@ -27,6 +27,7 @@ class TezosSmartRollupClientPtmumbai < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSmartRollupClientPtmumbai.version}/\"\n+ sha256 cellar: :any, monterey: \"004851539f34ed913dd9a854cec4ffe1438c875197a5a3d7ddbc46809d8af3a9\"\nsha256 cellar: :any, arm64_big_sur: \"a4b9a41393264e562b1829b630650521386d1457565fccb42ff7176b9fda6744\"\nsha256 cellar: :any, big_sur: \"e30a7eadb384b5aeb779ca188991ffe1f2d48cc93f486540559f34836b5ff829\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-smart-rollup-node-PtMumbai.rb",
"new_path": "Formula/tezos-smart-rollup-node-PtMumbai.rb",
"diff": "@@ -28,6 +28,7 @@ class TezosSmartRollupNodePtmumbai < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosSmartRollupNodePtmumbai.version}/\"\n+ sha256 cellar: :any, monterey: \"c44ab52fab442b9f37407957aafdb874a069afc7e2d564aaf37f967947b1b77c\"\nsha256 cellar: :any, arm64_big_sur: \"b207fdbb85b4068a6875f83f7a849d30a7d0278cdf4be9ecb06022501eeb4fc1\"\nsha256 cellar: :any, big_sur: \"3d4f88c53cd7eb3d97aca0a9d8c97dd991503257161bcf20c0cf93b2cecd7b69\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-tx-rollup-client-PtLimaPt.rb",
"new_path": "Formula/tezos-tx-rollup-client-PtLimaPt.rb",
"diff": "@@ -26,6 +26,7 @@ class TezosTxRollupClientPtlimapt < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosTxRollupClientPtlimapt.version}/\"\n+ sha256 cellar: :any, monterey: \"f1d3c229af390e402c053c94443e22ebc7c52844d4c3202323d5e159ff694b24\"\nsha256 cellar: :any, arm64_big_sur: \"b7f1bb9d6669f2d91da4acc326aab1de45295ac00f78be1597c73c2c02ca54a4\"\nsha256 cellar: :any, big_sur: \"5f1d17be12448c85049067a4a358e2f5ca9ff70073c45d4b4b7e0949df5e550f\"\nend\n"
},
{
"change_type": "MODIFY",
"old_path": "Formula/tezos-tx-rollup-node-PtLimaPt.rb",
"new_path": "Formula/tezos-tx-rollup-node-PtLimaPt.rb",
"diff": "@@ -28,6 +28,7 @@ class TezosTxRollupNodePtlimapt < Formula\nbottle do\nroot_url \"https://github.com/serokell/tezos-packaging/releases/download/#{TezosTxRollupNodePtlimapt.version}/\"\n+ sha256 cellar: :any, monterey: \"651c4158b1190b5ac7fac028225394995f4e8a161a16b47f35e1e0d91b883a7f\"\nsha256 cellar: :any, arm64_big_sur: \"1045738d5a383df43ee3af2427b8736c89af03f80b6ba0a6900aea774dc2b048\"\nsha256 cellar: :any, big_sur: \"634c987e3fc8bf10d3ec4f094b878b627bcc437b387ca11ac06b49fb91ca0301\"\nend\n"
}
] | Python | MIT License | serokell/tezos-packaging | [Chore] Add v16.0-rc1-1 hashes to brew formulae for Monterey |
603,659 | 27.01.2023 16:18:58 | -10,800 | 8fd6506c4c7f22ef3322fe20e1360b3a05b061b7 | Exchange fedoras
Problem: Fedora 35 got deprecated. Meanwhile, Fedora 37
is new stable version.
Solution: Deprecate fedora 35. Support fedora 37. | [
{
"change_type": "MODIFY",
"old_path": "docker/docker-tezos-packages.py",
"new_path": "docker/docker-tezos-packages.py",
"diff": "@@ -18,8 +18,8 @@ ubuntu_versions = [\n]\nfedora_versions = [\n- \"35\",\n\"36\",\n+ \"37\",\n]\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/support-policy.md",
"new_path": "docs/support-policy.md",
"diff": "@@ -38,8 +38,8 @@ There are packages for `arm64` and `amd64` architectures.\nWe aim to provide packages for all [currently supported Fedora releases](https://docs.fedoraproject.org/en-US/releases/).\nCurrently, these are versions:\n-* Fedora 35\n* Fedora 36\n+* Fedora 37\nThere are packages for `x86_64` and `aarch64` architectures.\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#600] Exchange fedoras
Problem: Fedora 35 got deprecated. Meanwhile, Fedora 37
is new stable version.
Solution: Deprecate fedora 35. Support fedora 37. |
603,659 | 31.01.2023 13:19:16 | -10,800 | a742d63e5e815dfcc67a698fc05770abaead7307 | Reset letter_version automatically
Problem: On every new octez upsteam release we reset
`letter_version` manually.
Solution: Reset it automatically with script. | [
{
"change_type": "MODIFY",
"old_path": "scripts/update-tezos.sh",
"new_path": "scripts/update-tezos.sh",
"diff": "@@ -49,6 +49,11 @@ if [[ \"$latest_upstream_tag\" != \"$our_tezos_tag\" ]]; then\ngit commit -a -m \"[Chore] Reset release number for $latest_upstream_tag\" --gpg-sign=\"tezos-packaging@serokell.io\" || \\\necho \"release number wasn't updated\"\n+ sed -i 's/letter_version *= *\"[a-z]\"/letter_version = \"\"/' ./docker/package/model.py\n+ # Commit may fail when the letter version wasn't updated since the last release\n+ git commit -a -m \"[Chore] Reset letter_version for $latest_upstream_tag\" --gpg-sign=\"tezos-packaging@serokell.io\" || \\\n+ echo \"letter_version wasn't reset\"\n+\ngit push --set-upstream origin \"$branch_name\"\ngh pr create -B master -t \"[Chore] $latest_upstream_tag release\" -F .github/release_pull_request_template.md\n"
}
] | Python | MIT License | serokell/tezos-packaging | [#601] Reset letter_version automatically
Problem: On every new octez upsteam release we reset
`letter_version` manually.
Solution: Reset it automatically with script. |
260,335 | 17.11.2018 22:58:30 | 28,800 | 1d902436ce39b8caf1e8e5e3dc2f27990b9fda0b | change xla_data_pb2 import | [
{
"change_type": "MODIFY",
"old_path": "jax/lib/xla_bridge.py",
"new_path": "jax/lib/xla_bridge.py",
"diff": "@@ -29,7 +29,7 @@ import warnings\nfrom absl import flags\nimport numpy as onp # 'onp' rather than 'np' to distinguish from autograd.numpy\n-from tensorflow.compiler.xla import xla_data_pb2\n+from . import xla_data_pb2\nfrom . import xla_client\n"
}
] | Python | Apache License 2.0 | google/jax | change xla_data_pb2 import |
260,335 | 18.11.2018 15:28:22 | 28,800 | 0dfa736ece742445721d3e031964ffb6695b933a | make setup.py copy over .so files | [
{
"change_type": "MODIFY",
"old_path": "setup.py",
"new_path": "setup.py",
"diff": "from setuptools import setup\n+from glob import glob\nsetup(\nname='jax',\n@@ -11,4 +12,5 @@ setup(\ninstall_requires=['numpy>=1.12', 'six', 'protobuf'],\nurl='https://github.com/google/jax',\nlicense='Apache-2.0',\n+ package_data={'jax.lib': glob('jax/lib/*.so')},\n)\n"
}
] | Python | Apache License 2.0 | google/jax | make setup.py copy over .so files |
260,335 | 18.11.2018 15:43:09 | 28,800 | 9ae0f3a610c08ad1355ca92cda4906b4474b6fa3 | split BUILD file, move up license files | [
{
"change_type": "RENAME",
"old_path": "jax/LICENSE",
"new_path": "LICENSE",
"diff": ""
},
{
"change_type": "RENAME",
"old_path": "jax/LICENSE_SHORT",
"new_path": "LICENSE_SHORT",
"diff": ""
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "examples/BUILD",
"diff": "+py_binary(\n+ name = \"interactive\",\n+ srcs = [\"interactive.py\"],\n+ deps = [\"//jax:libjax\"],\n+)\n+\n+py_library(\n+ name = \"datasets\",\n+ srcs = [\"datasets.py\"],\n+)\n+\n+py_binary(\n+ name = \"mnist_classifier\",\n+ srcs = [\"mnist_classifier.py\"],\n+ deps = [\n+ \":datasets\",\n+ \"//jax:libjax\",\n+ ],\n+)\n+\n+py_binary(\n+ name = \"mnist_vae\",\n+ srcs = [\"mnist_vae.py\"],\n+ deps = [\n+ \":datasets\",\n+ \":minmax\",\n+ \":stax\",\n+ \"//jax:libjax\",\n+ ],\n+)\n"
},
{
"change_type": "MODIFY",
"old_path": "jax/BUILD",
"new_path": "jax/BUILD",
"diff": "# JAX is Autograd and XLA\n-package(default_visibility = [\"//visibility:public\"])\n-\n-licenses([\"notice\"]) # Apache 2\n-\n-exports_files([\"LICENSE\"])\n-\n-load(\":build_defs.bzl\", \"jax_test\")\n-\n-package_group(name = \"jax\")\n-\npy_library(\nname = \"libjax\",\nsrcs = glob(\n@@ -29,128 +19,20 @@ py_library(\n],\n)\n-jax_test(\n- name = \"core_test\",\n- srcs = [\"tests/core_test.py\"],\n- shard_count = {\n- \"cpu\": 5,\n- },\n-)\n-\n-jax_test(\n- name = \"lax_test\",\n- srcs = [\"tests/lax_test.py\"],\n- shard_count = {\n- \"cpu\": 40,\n- \"gpu\": 20,\n- },\n-)\n-\n-jax_test(\n- name = \"lax_numpy_test\",\n- srcs = [\"tests/lax_numpy_test.py\"],\n- shard_count = {\n- \"cpu\": 40,\n- \"gpu\": 20,\n- },\n-)\n-\n-jax_test(\n- name = \"lax_numpy_indexing_test\",\n- srcs = [\"tests/lax_numpy_indexing_test.py\"],\n- shard_count = {\n- \"cpu\": 10,\n- \"gpu\": 2,\n- },\n-)\n-\n-jax_test(\n- name = \"lax_scipy_test\",\n- srcs = [\"tests/lax_scipy_test.py\"],\n- shard_count = {\n- \"cpu\": 10,\n- \"gpu\": 2,\n- },\n-)\n-\n-jax_test(\n- name = \"random_test\",\n- srcs = [\"tests/random_test.py\"],\n-)\n-\n-jax_test(\n- name = \"api_test\",\n- srcs = [\"tests/api_test.py\"],\n-)\n-\n-jax_test(\n- name = \"batching_test\",\n- srcs = [\"tests/batching_test.py\"],\n-)\n-\n-py_binary(\n- name = \"interactive\",\n- srcs = [\"examples/interactive.py\"],\n- deps = [\":libjax\"],\n-)\n-\npy_library(\nname = \"stax\",\nsrcs = [\"experimental/stax.py\"],\ndeps = [\":libjax\"],\n)\n-jax_test(\n- name = \"stax_test\",\n- srcs = [\"tests/stax_test.py\"],\n- deps = [\":stax\"],\n-)\n-\npy_library(\nname = \"minmax\",\nsrcs = [\"experimental/minmax.py\"],\ndeps = [\":libjax\"],\n)\n-jax_test(\n- name = \"minmax_test\",\n- srcs = [\"tests/minmax_test.py\"],\n- deps = [\":minmax\"],\n-)\n-\npy_library(\nname = \"lapax\",\nsrcs = [\"experimental/lapax.py\"],\ndeps = [\":libjax\"],\n)\n-\n-jax_test(\n- name = \"lapax_test\",\n- srcs = [\"tests/lapax_test.py\"],\n- deps = [\":lapax\"],\n-)\n-\n-py_library(\n- name = \"datasets\",\n- srcs = [\"examples/datasets.py\"],\n-)\n-\n-py_binary(\n- name = \"mnist_classifier\",\n- srcs = [\"examples/mnist_classifier.py\"],\n- deps = [\n- \":datasets\",\n- \":libjax\",\n- ],\n-)\n-\n-py_binary(\n- name = \"mnist_vae\",\n- srcs = [\"examples/mnist_vae.py\"],\n- deps = [\n- \":datasets\",\n- \":libjax\",\n- \":minmax\",\n- \":stax\",\n- ],\n-)\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/BUILD",
"diff": "+load(\":build_defs.bzl\", \"jax_test\")\n+\n+jax_test(\n+ name = \"core_test\",\n+ srcs = [\"tests/core_test.py\"],\n+ shard_count = {\n+ \"cpu\": 5,\n+ },\n+)\n+\n+jax_test(\n+ name = \"lax_test\",\n+ srcs = [\"tests/lax_test.py\"],\n+ shard_count = {\n+ \"cpu\": 40,\n+ \"gpu\": 20,\n+ },\n+)\n+\n+jax_test(\n+ name = \"lax_numpy_test\",\n+ srcs = [\"tests/lax_numpy_test.py\"],\n+ shard_count = {\n+ \"cpu\": 40,\n+ \"gpu\": 20,\n+ },\n+)\n+\n+jax_test(\n+ name = \"lax_numpy_indexing_test\",\n+ srcs = [\"tests/lax_numpy_indexing_test.py\"],\n+ shard_count = {\n+ \"cpu\": 10,\n+ \"gpu\": 2,\n+ },\n+)\n+\n+jax_test(\n+ name = \"lax_scipy_test\",\n+ srcs = [\"tests/lax_scipy_test.py\"],\n+ shard_count = {\n+ \"cpu\": 10,\n+ \"gpu\": 2,\n+ },\n+)\n+\n+jax_test(\n+ name = \"random_test\",\n+ srcs = [\"tests/random_test.py\"],\n+)\n+\n+jax_test(\n+ name = \"api_test\",\n+ srcs = [\"tests/api_test.py\"],\n+)\n+\n+jax_test(\n+ name = \"batching_test\",\n+ srcs = [\"tests/batching_test.py\"],\n+)\n+\n+jax_test(\n+ name = \"stax_test\",\n+ srcs = [\"tests/stax_test.py\"],\n+ deps = [\":stax\"],\n+)\n+\n+jax_test(\n+ name = \"minmax_test\",\n+ srcs = [\"tests/minmax_test.py\"],\n+ deps = [\":minmax\"],\n+)\n+\n+jax_test(\n+ name = \"lapax_test\",\n+ srcs = [\"tests/lapax_test.py\"],\n+ deps = [\":lapax\"],\n+)\n"
},
{
"change_type": "RENAME",
"old_path": "jax/build_defs.bzl",
"new_path": "tests/build_defs.bzl",
"diff": ""
}
] | Python | Apache License 2.0 | google/jax | split BUILD file, move up license files |
260,335 | 18.11.2018 15:54:13 | 28,800 | d347d65c5c6c6a97f1a8544dcdfe905a3e40fcc2 | add dummy binary build target, move WORKSPACE up | [
{
"change_type": "RENAME",
"old_path": "build/WORKSPACE",
"new_path": "WORKSPACE",
"diff": ""
},
{
"change_type": "MODIFY",
"old_path": "build/build_jax.sh",
"new_path": "build/build_jax.sh",
"diff": "@@ -8,8 +8,6 @@ then\nexit 1\nfi\n-cp build/WORKSPACE .\n-\ntmp=/tmp/jax-build # could mktemp -d but this way we can cache results\nmkdir -p ${tmp}\n@@ -28,7 +26,10 @@ export PATH=\"${bazel_dir}/bin:$PATH\"\nhandle_temporary_bazel_0_19_1_bug=1 # TODO(mattjj): remove with bazel 0.19.2\n## get and configure tensorflow for building xla with gpu support\n+if [[ ! -d tensorflow ]]\n+then\ngit clone https://github.com/tensorflow/tensorflow.git\n+fi\npushd tensorflow\nexport PYTHON_BIN_PATH=${PYTHON_BIN_PATH:-$(which python)}\nexport PYTHON_LIB_PATH=${SP_DIR:-$(python -m site --user-site)}\n@@ -65,14 +66,14 @@ bazel_build_opt=\"-c opt --config=cuda\"\nif [ -n $handle_temporary_bazel_0_19_1_bug ]\nthen\nset +e\n- bazel ${bazel_opt} build ${bazel_build_opt} examples:interactive 2> /dev/null\n+ bazel ${bazel_opt} build ${bazel_build_opt} jax:build_jax 2> /dev/null\nsed -i 's/toolchain_identifier = \"local\"/toolchain_identifier = \"local_linux\"/' ${bazel_output_base}/external/local_config_cc/BUILD\nset -e\nfi\n-bazel ${bazel_opt} build ${bazel_build_opt} examples:interactive\n+bazel ${bazel_opt} build ${bazel_build_opt} jax:build_jax\n## extract the pieces we need\n-runfiles_prefix=\"execroot/__main__/bazel-out/k8-opt/bin/examples/interactive.runfiles/org_tensorflow/tensorflow\"\n+runfiles_prefix=\"execroot/__main__/bazel-out/k8-opt/bin/jax/build_jax.runfiles/org_tensorflow/tensorflow\"\ncp ${bazel_output_base}/${runfiles_prefix}/libtensorflow_framework.so jax/lib/\ncp ${bazel_output_base}/${runfiles_prefix}/compiler/xla/xla_data_pb2.py jax/lib/\ncp ${bazel_output_base}/${runfiles_prefix}/compiler/xla/python/{xla_client.py,pywrap_xla.py,_pywrap_xla.so} jax/lib/\n@@ -84,6 +85,5 @@ sed -i '/from tensorflow.compiler.xla.service import hlo_pb2/d' jax/lib/xla_clie\n## clean up\nrm -f bazel-* # symlinks\n-rm -f WORKSPACE\nrm -rf tensorflow\n# rm -rf ${tmp}\n"
},
{
"change_type": "MODIFY",
"old_path": "jax/BUILD",
"new_path": "jax/BUILD",
"diff": "# JAX is Autograd and XLA\n+package(default_visibility = [\"//visibility:public\"])\n+\npy_library(\nname = \"libjax\",\nsrcs = glob(\n@@ -36,3 +38,10 @@ py_library(\nsrcs = [\"experimental/lapax.py\"],\ndeps = [\":libjax\"],\n)\n+\n+# this is a dummy target for building purposes\n+py_binary(\n+ name = \"build_jax\",\n+ srcs = [\"core.py\"],\n+ deps = [\":libjax\"],\n+)\n"
}
] | Python | Apache License 2.0 | google/jax | add dummy binary build target, move WORKSPACE up |
260,335 | 19.11.2018 08:30:37 | 28,800 | 77731679954a4ae24d5c3b8250b5cf536e9bb604 | add CPU-only build option | [
{
"change_type": "MODIFY",
"old_path": "build/build_jax.sh",
"new_path": "build/build_jax.sh",
"diff": "#!/bin/bash\nset -exv\n+# For a build with CUDA, from the repo root run:\n+# bash build/build_jax.sh\n+# For building without CUDA (CPU-only), instead run:\n+# JAX_BUILD_WITH_CUDA=0 bash build/build_jax.sh\n+# To clean intermediate results, run\n+# rm -rf /tmp/jax-build/jax-bazel-output-user-root\n+# To clean everything, run\n+# rm -rf /tmp/jax-build\n+\n+JAX_BUILD_WITH_CUDA=${JAX_BUILD_WITH_CUDA:-1}\n+\ninit_commit=a30e858e59d7184b9e54dc3f3955238221d70439\nif [[ ! -d .git || $(git rev-list --parents HEAD | tail -1) != ${init_commit} ]]\nthen\n@@ -25,7 +36,7 @@ export PATH=\"${bazel_dir}/bin:$PATH\"\n# BUG: https://github.com/bazelbuild/bazel/issues/6665\nhandle_temporary_bazel_0_19_1_bug=1 # TODO(mattjj): remove with bazel 0.19.2\n-## get and configure tensorflow for building xla with gpu support\n+## get and configure tensorflow for building xla\nif [[ ! -d tensorflow ]]\nthen\ngit clone https://github.com/tensorflow/tensorflow.git\n@@ -34,12 +45,17 @@ pushd tensorflow\nexport PYTHON_BIN_PATH=${PYTHON_BIN_PATH:-$(which python)}\nexport PYTHON_LIB_PATH=${SP_DIR:-$(python -m site --user-site)}\nexport USE_DEFAULT_PYTHON_LIB_PATH=1\n+if [[ ${JAX_BUILD_WITH_CUDA} != 0 ]]\n+then\nexport CUDA_TOOLKIT_PATH=${CUDA_PATH:-/usr/local/cuda}\nexport CUDNN_INSTALL_PATH=${CUDA_TOOLKIT_PATH}\nexport TF_CUDA_VERSION=$(readlink -f ${CUDA_TOOLKIT_PATH}/lib64/libcudart.so | cut -d '.' -f4-5)\nexport TF_CUDNN_VERSION=$(readlink -f ${CUDNN_INSTALL_PATH}/lib64/libcudnn.so | cut -d '.' -f4-5)\nexport TF_CUDA_COMPUTE_CAPABILITIES=\"3.0,3.5,5.2,6.0,6.1,7.0\"\nexport TF_NEED_CUDA=1\n+else\n+ export TF_NEED_CUDA=0\n+fi\nexport GCC_HOST_COMPILER_PATH=\"/usr/bin/gcc\"\nexport TF_ENABLE_XLA=1\nexport TF_NEED_MKL=0\n@@ -62,8 +78,14 @@ mkdir -p ${PYTHON_LIB_PATH}\nbazel_output_user_root=${tmp}/jax-bazel-output-user-root\nbazel_output_base=${bazel_output_user_root}/output-base\nbazel_opt=\"--output_user_root=${bazel_output_user_root} --output_base=${bazel_output_base} --bazelrc=tensorflow/tools/bazel.rc\"\n+if [[ ${JAX_BUILD_WITH_CUDA} != 0 ]]\n+then\nbazel_build_opt=\"-c opt --config=cuda\"\n-if [ -n $handle_temporary_bazel_0_19_1_bug ]\n+else\n+ bazel_build_opt=\"-c opt\"\n+fi\n+# TODO(mattjj): remove this if/else clause with bazel 0.19.2 release\n+if [[ -n $handle_temporary_bazel_0_19_1_bug && ${JAX_BUILD_WITH_CUDA} != 0 ]]\nthen\nset +e\nbazel ${bazel_opt} build ${bazel_build_opt} jax:build_jax 2> /dev/null\n@@ -74,9 +96,9 @@ bazel ${bazel_opt} build ${bazel_build_opt} jax:build_jax\n## extract the pieces we need\nrunfiles_prefix=\"execroot/__main__/bazel-out/k8-opt/bin/jax/build_jax.runfiles/org_tensorflow/tensorflow\"\n-cp ${bazel_output_base}/${runfiles_prefix}/libtensorflow_framework.so jax/lib/\n-cp ${bazel_output_base}/${runfiles_prefix}/compiler/xla/xla_data_pb2.py jax/lib/\n-cp ${bazel_output_base}/${runfiles_prefix}/compiler/xla/python/{xla_client.py,pywrap_xla.py,_pywrap_xla.so} jax/lib/\n+cp -f ${bazel_output_base}/${runfiles_prefix}/libtensorflow_framework.so jax/lib/\n+cp -f ${bazel_output_base}/${runfiles_prefix}/compiler/xla/xla_data_pb2.py jax/lib/\n+cp -f ${bazel_output_base}/${runfiles_prefix}/compiler/xla/python/{xla_client.py,pywrap_xla.py,_pywrap_xla.so} jax/lib/\n## rewrite some imports\nsed -i 's/from tensorflow.compiler.xla.python import pywrap_xla as c_api/from . import pywrap_xla as c_api/' jax/lib/xla_client.py\n@@ -86,4 +108,5 @@ sed -i '/from tensorflow.compiler.xla.service import hlo_pb2/d' jax/lib/xla_clie\n## clean up\nrm -f bazel-* # symlinks\nrm -rf tensorflow\n-# rm -rf ${tmp}\n+rm -rf ${bazel_output_user_root} # clean build results\n+# rm -rf ${tmp} # clean everything, including the bazel binary\n"
}
] | Python | Apache License 2.0 | google/jax | add CPU-only build option |
260,335 | 19.11.2018 08:46:25 | 28,800 | af62fdc17dd49279e3bfb26ff066785954716099 | update build script: bazel-0.19.2 and darwin | [
{
"change_type": "MODIFY",
"old_path": "build/build_jax.sh",
"new_path": "build/build_jax.sh",
"diff": "@@ -27,14 +27,17 @@ bazel_dir=${tmp}/jax-bazel\nif [ ! -d ${bazel_dir}/bin ]\nthen\nmkdir -p ${bazel_dir}\n- curl -OL https://github.com/bazelbuild/bazel/releases/download/0.19.1/bazel-0.19.1-installer-linux-x86_64.sh\n- chmod +x bazel-0.19.1-installer-linux-x86_64.sh\n- ./bazel-0.19.1-installer-linux-x86_64.sh --prefix=${bazel_dir}\n- rm bazel-0.19.1-installer-linux-x86_64.sh\n+ case \"$(uname -s)\" in\n+ Linux*) installer=bazel-0.19.2-installer-linux-x86_64.sh;;\n+ Darwin*) installer=bazel-0.19.2-installer-darwin-x86_64.sh;;\n+ *) exit 1;;\n+ esac\n+ curl -OL https://github.com/bazelbuild/bazel/releases/download/0.19.2/${installer}\n+ chmod +x ${installer}\n+ bash ${installer} --prefix=${bazel_dir}\n+ rm ${installer}\nfi\nexport PATH=\"${bazel_dir}/bin:$PATH\"\n-# BUG: https://github.com/bazelbuild/bazel/issues/6665\n-handle_temporary_bazel_0_19_1_bug=1 # TODO(mattjj): remove with bazel 0.19.2\n## get and configure tensorflow for building xla\nif [[ ! -d tensorflow ]]\n@@ -84,14 +87,6 @@ then\nelse\nbazel_build_opt=\"-c opt\"\nfi\n-# TODO(mattjj): remove this if/else clause with bazel 0.19.2 release\n-if [[ -n $handle_temporary_bazel_0_19_1_bug && ${JAX_BUILD_WITH_CUDA} != 0 ]]\n-then\n- set +e\n- bazel ${bazel_opt} build ${bazel_build_opt} jax:build_jax 2> /dev/null\n- sed -i 's/toolchain_identifier = \"local\"/toolchain_identifier = \"local_linux\"/' ${bazel_output_base}/external/local_config_cc/BUILD\n- set -e\n-fi\nbazel ${bazel_opt} build ${bazel_build_opt} jax:build_jax\n## extract the pieces we need\n"
}
] | Python | Apache License 2.0 | google/jax | update build script: bazel-0.19.2 and darwin |
260,335 | 19.11.2018 20:18:15 | 28,800 | 50038c07c815b82d412af43996a122e33eecd385 | fix build file issues | [
{
"change_type": "MODIFY",
"old_path": "build/build_jax.sh",
"new_path": "build/build_jax.sh",
"diff": "@@ -55,6 +55,7 @@ then\nexport TF_CUDA_VERSION=$(readlink -f ${CUDA_TOOLKIT_PATH}/lib64/libcudart.so | cut -d '.' -f4-5)\nexport TF_CUDNN_VERSION=$(readlink -f ${CUDNN_INSTALL_PATH}/lib64/libcudnn.so | cut -d '.' -f4-5)\nexport TF_CUDA_COMPUTE_CAPABILITIES=\"3.0,3.5,5.2,6.0,6.1,7.0\"\n+ export TF_NCCL_VERSION=2\nexport TF_NEED_CUDA=1\nelse\nexport TF_NEED_CUDA=0\n@@ -72,7 +73,6 @@ export TF_DOWNLOAD_CLANG=0\nexport TF_SET_ANDROID_WORKSPACE=0\nexport TF_CUDA_CLANG=0\nexport TF_NEED_TENSORRT=0\n-export TF_NCCL_VERSION=\"2\"\n./configure\npopd\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/BUILD",
"new_path": "examples/BUILD",
"diff": "@@ -39,8 +39,8 @@ py_binary(\nsrcs = [\"mnist_vae.py\"],\ndeps = [\n\":datasets\",\n- \":minmax\",\n- \":stax\",\n\"//jax:libjax\",\n+ \"//jax:minmax\",\n+ \"//jax:stax\",\n],\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "jax/BUILD",
"new_path": "jax/BUILD",
"diff": "@@ -29,6 +29,7 @@ py_library(\n\"interpreters/*.py\",\n\"numpy/*.py\",\n\"scipy/*.py\",\n+ \"scipy/stats/*.py\",\n],\nexclude = [\n\"*_test.py\",\n"
},
{
"change_type": "MODIFY",
"old_path": "setup.py",
"new_path": "setup.py",
"diff": "@@ -23,7 +23,7 @@ setup(\nauthor_email='jax-team@google.com',\npackages=['jax', 'jax.lib', 'jax.interpreters', 'jax.numpy', 'jax.scipy',\n'jax.experimental'],\n- install_requires=['numpy>=1.12', 'six', 'protobuf'],\n+ install_requires=['numpy>=1.12', 'six', 'protobuf', 'absl-py'],\nurl='https://github.com/google/jax',\nlicense='Apache-2.0',\npackage_data={'jax.lib': glob('jax/lib/*.so')},\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/BUILD",
"new_path": "tests/BUILD",
"diff": "@@ -18,7 +18,7 @@ load(\":build_defs.bzl\", \"jax_test\")\njax_test(\nname = \"core_test\",\n- srcs = [\"tests/core_test.py\"],\n+ srcs = [\"core_test.py\"],\nshard_count = {\n\"cpu\": 5,\n},\n@@ -26,7 +26,7 @@ jax_test(\njax_test(\nname = \"lax_test\",\n- srcs = [\"tests/lax_test.py\"],\n+ srcs = [\"lax_test.py\"],\nshard_count = {\n\"cpu\": 40,\n\"gpu\": 20,\n@@ -35,7 +35,7 @@ jax_test(\njax_test(\nname = \"lax_numpy_test\",\n- srcs = [\"tests/lax_numpy_test.py\"],\n+ srcs = [\"lax_numpy_test.py\"],\nshard_count = {\n\"cpu\": 40,\n\"gpu\": 20,\n@@ -44,7 +44,7 @@ jax_test(\njax_test(\nname = \"lax_numpy_indexing_test\",\n- srcs = [\"tests/lax_numpy_indexing_test.py\"],\n+ srcs = [\"lax_numpy_indexing_test.py\"],\nshard_count = {\n\"cpu\": 10,\n\"gpu\": 2,\n@@ -53,7 +53,7 @@ jax_test(\njax_test(\nname = \"lax_scipy_test\",\n- srcs = [\"tests/lax_scipy_test.py\"],\n+ srcs = [\"lax_scipy_test.py\"],\nshard_count = {\n\"cpu\": 10,\n\"gpu\": 2,\n@@ -62,33 +62,33 @@ jax_test(\njax_test(\nname = \"random_test\",\n- srcs = [\"tests/random_test.py\"],\n+ srcs = [\"random_test.py\"],\n)\njax_test(\nname = \"api_test\",\n- srcs = [\"tests/api_test.py\"],\n+ srcs = [\"api_test.py\"],\n)\njax_test(\nname = \"batching_test\",\n- srcs = [\"tests/batching_test.py\"],\n+ srcs = [\"batching_test.py\"],\n)\njax_test(\nname = \"stax_test\",\n- srcs = [\"tests/stax_test.py\"],\n- deps = [\":stax\"],\n+ srcs = [\"stax_test.py\"],\n+ deps = [\"//jax:stax\"],\n)\njax_test(\nname = \"minmax_test\",\n- srcs = [\"tests/minmax_test.py\"],\n- deps = [\":minmax\"],\n+ srcs = [\"minmax_test.py\"],\n+ deps = [\"//jax:minmax\"],\n)\njax_test(\nname = \"lapax_test\",\n- srcs = [\"tests/lapax_test.py\"],\n- deps = [\":lapax\"],\n+ srcs = [\"lapax_test.py\"],\n+ deps = [\"//jax:lapax\"],\n)\n"
}
] | Python | Apache License 2.0 | google/jax | fix build file issues |
260,335 | 21.11.2018 12:10:31 | 28,800 | 51fc713089f8e456d95f79e4ed58687eb72edbfb | remove absl from examples, fix import statements | [
{
"change_type": "DELETE",
"old_path": "examples/interactive.py",
"new_path": null,
"diff": "-# Copyright 2018 Google LLC\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-# https://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-\n-from __future__ import absolute_import\n-from __future__ import division\n-\n-from absl import app\n-\n-import IPython\n-import numpy as onp\n-\n-import jax\n-import jax.numpy as np\n-from jax import lax\n-from jax import random\n-from jax import jit, grad, vmap, jacfwd, jacrev, hessian\n-\n-\n-def main(unused_argv):\n- IPython.embed(user_ns=dict(globals(), **locals()))\n-\n-if __name__ == \"__main__\":\n- app.run(main)\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/mnist_classifier.py",
"new_path": "examples/mnist_classifier.py",
"diff": "@@ -23,15 +23,14 @@ from __future__ import print_function\nimport time\nimport itertools\n-from absl import app\nimport numpy.random as npr\nimport jax.numpy as np\nfrom jax import jit, grad\nfrom jax.experimental import minmax\n-from jax.examples import datasets\nfrom jax.experimental import stax\nfrom jax.experimental.stax import Dense, Relu, LogSoftmax\n+import datasets\ndef loss(params, batch):\n@@ -50,7 +49,7 @@ init_random_params, predict = stax.serial(\nDense(1024), Relu,\nDense(10), LogSoftmax)\n-def main(unused_argv):\n+if __name__ == \"__main__\":\nstep_size = 0.001\nnum_epochs = 10\nbatch_size = 32\n@@ -93,7 +92,3 @@ def main(unused_argv):\nprint(\"Epoch {} in {:0.2f} sec\".format(epoch, epoch_time))\nprint(\"Training set accuracy {}\".format(train_acc))\nprint(\"Test set accuracy {}\".format(test_acc))\n-\n-\n-if __name__ == \"__main__\":\n- app.run(main)\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/mnist_classifier_fromscratch.py",
"new_path": "examples/mnist_classifier_fromscratch.py",
"diff": "@@ -23,13 +23,12 @@ from __future__ import print_function\nimport time\n-from absl import app\nimport numpy.random as npr\nfrom jax.api import jit, grad\n-from jax.examples import datasets\nfrom jax.scipy.misc import logsumexp\nimport jax.numpy as np\n+import datasets\ndef init_random_params(scale, layer_sizes, rng=npr.RandomState(0)):\n@@ -54,7 +53,7 @@ def accuracy(params, batch):\nreturn np.mean(predicted_class == target_class)\n-def main(unused_argv):\n+if __name__ == \"__main__\":\nlayer_sizes = [784, 1024, 1024, 10] # TODO(mattjj): revise to standard arch\nparam_scale = 0.1\nstep_size = 0.001\n@@ -93,7 +92,3 @@ def main(unused_argv):\nprint(\"Epoch {} in {:0.2f} sec\".format(epoch, epoch_time))\nprint(\"Training set accuracy {}\".format(train_acc))\nprint(\"Test set accuracy {}\".format(test_acc))\n-\n-\n-if __name__ == \"__main__\":\n- app.run(main)\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/mnist_vae.py",
"new_path": "examples/mnist_vae.py",
"diff": "@@ -25,15 +25,14 @@ from __future__ import print_function\nimport os\nimport time\n-from absl import app\nimport matplotlib.pyplot as plt\nimport jax.numpy as np\nfrom jax import jit, grad, lax, random\n-from jax.examples import datasets\nfrom jax.experimental import minmax\nfrom jax.experimental import stax\nfrom jax.experimental.stax import Dense, FanOut, Relu, Softplus\n+import datasets\ndef gaussian_kl(mu, sigmasq):\n@@ -84,7 +83,7 @@ decoder_init, decode = stax.serial(\n)\n-def main(unused_argv):\n+if __name__ == \"__main__\":\nstep_size = 0.001\nnum_epochs = 100\nbatch_size = 32\n@@ -138,7 +137,3 @@ def main(unused_argv):\ntest_elbo, images = evaluate(opt_state, test_images)\nprint(\"{: 3d} {} ({:.3f} sec)\".format(epoch, test_elbo, time.time() - tic))\nplt.imsave(imfile.format(epoch), images, cmap=plt.cm.gray)\n-\n-\n-if __name__ == \"__main__\":\n- app.run(main)\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/resnet50.py",
"new_path": "examples/resnet50.py",
"diff": "@@ -21,8 +21,6 @@ from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n-from absl import app\n-\nimport numpy.random as npr\nimport jax.numpy as np\n@@ -85,9 +83,7 @@ def ResNet50(num_classes):\nAvgPool((7, 7)), Flatten, Dense(num_classes), LogSoftmax)\n-def main(argv):\n- del argv # Unused.\n-\n+if __name__ == \"__main__\":\nbatch_size = 8\nnum_classes = 1001\ninput_shape = (224, 224, 3, batch_size)\n@@ -128,7 +124,3 @@ def main(argv):\nfor i in xrange(num_steps):\nopt_state = update(i, opt_state, next(batches))\ntrained_params = minmax.get_params(opt_state)\n-\n-\n-if __name__ == '__main__':\n- app.run(main)\n"
}
] | Python | Apache License 2.0 | google/jax | remove absl from examples, fix import statements |
260,335 | 26.11.2018 09:58:05 | 28,800 | c293f7c875932eb53bc4f20fd1cbaf08d50d9c78 | minor: add to threefry hash function in random.py | [
{
"change_type": "MODIFY",
"old_path": "jax/random.py",
"new_path": "jax/random.py",
"diff": "@@ -29,9 +29,6 @@ from .lib import xla_bridge\nfrom .api import jit\n-# TODO(mattjj): add api.jit decorators to the user-facing functions\n-\n-\nclass PRNGKey(object):\n\"\"\"A pseudo-random number generator (PRNG) key for use with lax.random.\"\"\"\n__slots__ = [\"keypair\"]\n@@ -92,6 +89,7 @@ def _bit_stats(bits):\n### hash function and split\n+@jit\ndef threefry_2x32(keypair, count):\n\"\"\"Apply the Threefry 2x32 hash.\n"
}
] | Python | Apache License 2.0 | google/jax | minor: add @jit to threefry hash function in random.py
PiperOrigin-RevId: 222841601 |
260,335 | 28.11.2018 17:17:52 | 28,800 | 1d2aaad6fe30fef5e7e15a2898358f9120a3686d | fix handling of symbolic zeros for a few special primitives | [
{
"change_type": "MODIFY",
"old_path": "jax/lax.py",
"new_path": "jax/lax.py",
"diff": "@@ -1678,6 +1678,11 @@ def dynamic_update_slice_jvp(primals, tangents, update_shape):\ng_operand, g_update, g_start_indices = tangents\nassert g_start_indices is ad_util.zero\nval_out = dynamic_update_slice(operand, update, start_indices)\n+ if g_operand is ad_util.zero and g_update is ad_util.zero:\n+ tangent_out = ad_util.zero\n+ else:\n+ g_operand = ad.instantiate_zeros(operand, g_operand)\n+ g_update = ad.instantiate_zeros(update, g_update)\ntangent_out = dynamic_update_slice(g_operand, g_update, start_indices)\nreturn val_out, tangent_out\n@@ -1717,7 +1722,7 @@ def index_take_translation_rule(c, src, *idxs, **kwargs):\ndef index_take_jvp(primals, tangents, axes, input_shape, jaxpr, consts):\nsrc = primals[0]\nidxs = tuple(primals[1:])\n- g =tangents[0]\n+ g = ad.instantiate_zeros(src, tangents[0])\nreturn index_take(src, idxs, axes), index_take(g, idxs, axes)\ndef index_take_transpose_rule(t, src, *idxs, **kwargs):\n@@ -1747,6 +1752,8 @@ def index_untake_jvp(primals, tangents, axes, jaxpr, consts):\nsrc, dst = primals[0], primals[1]\nidxs = tuple(primals[2:])\ng_src, g_dst = tangents[0], tangents[1]\n+ g_src = ad.instantiate_zeros(src, g_src)\n+ g_dst = ad.instantiate_zeros(dst, g_dst)\nval_out = index_untake(src, dst, idxs, axes)\ntangent_out = index_untake(g_src, g_dst, idxs, axes)\nreturn val_out, tangent_out\n@@ -2064,10 +2071,17 @@ def sort_key_val_jvp(primals, tangents, dimension):\nval_out = sort_key_val(keys, values, dimension)\n+ if keys_tangents is ad_util.zero:\n+ keys_tangents_out = ad_util.zero\n+ else:\nkeys_tangents_out = sort_jvp_rule(keys_tangents, keys, dimension)\n+\n+ if values_tangents is ad_util.zero:\n+ values_tangents_out = ad_util.zero\n+ else:\nvalues_tangents_out = sort_jvp_rule(values_tangents, keys, dimension)\n- tangents_out = keys_tangents_out, values_tangents_out\n+ tangents_out = keys_tangents_out, values_tangents_out\nreturn core.pack(val_out), core.pack(tangents_out)\ndef sort_key_val_transpose_rule(t, keys, values, dimension):\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/lax_test.py",
"new_path": "tests/lax_test.py",
"diff": "@@ -839,8 +839,8 @@ class LaxTest(jtu.JaxTestCase):\n]\nfor dtype in default_dtypes\nfor rng in [jtu.rand_default()])\n- def testDynamicUpdateSlice(self, shape, dtype, start_indices, update_shape,\n- rng):\n+ def testDynamicUpdateSliceAgainstNumpy(self, shape, dtype, start_indices,\n+ update_shape, rng):\ndef args_maker():\nreturn [rng(shape, dtype), rng(update_shape, dtype),\n@@ -1797,9 +1797,16 @@ class LaxAutodiffTest(jtu.JaxTestCase):\noperand = rng(shape, dtype)\nupdate = rng(update_shape, dtype)\nstart_indices = onp.array(start_indices)\n+\ndus = lambda x, y: lax.dynamic_update_slice(x, y, start_indices)\ncheck_grads(dus, (operand, update), 2, tol, tol, tol)\n+ dus = lambda x: lax.dynamic_update_slice(x, update, start_indices)\n+ check_grads(dus, (operand,), 2, tol, tol, tol)\n+\n+ dus = lambda y: lax.dynamic_update_slice(operand, y, start_indices)\n+ check_grads(dus, (update,), 2, tol, tol, tol)\n+\n@parameterized.named_parameters(\n{\"testcase_name\": \"_shape={}_perm={}\".format(\njtu.format_shape_dtype_string(shape, dtype), perm),\n"
}
] | Python | Apache License 2.0 | google/jax | fix handling of symbolic zeros for a few special primitives
PiperOrigin-RevId: 223264329 |
260,335 | 06.12.2018 07:03:28 | 28,800 | 90afb3a15503ccfb3655666a66f6466285fd7f2e | update tensorflow release | [
{
"change_type": "MODIFY",
"old_path": "WORKSPACE",
"new_path": "WORKSPACE",
"diff": "@@ -16,10 +16,10 @@ http_archive(\n# and update the sha256 with the result.\nhttp_archive(\nname = \"org_tensorflow\",\n- sha256 = \"1a685ee839eb52e5fd26c0c9fbb0cddbf39a49cc5edaa6506604a3ba0fecfa2e\",\n- strip_prefix=\"tensorflow-47fe933d89146a0488563bdfde2c0675a750ed16\",\n+ sha256 = \"dccd52030b173ee803191134215f712df7b18ee97a7c7d00437014002d29c26b\",\n+ strip_prefix=\"tensorflow-8ccf1ebdbf4475bc7af6d79b2fa7e1fd8221e3fd\"\nurls = [\n- \"https://github.com/tensorflow/tensorflow/archive/47fe933d89146a0488563bdfde2c0675a750ed16.tar.gz\",\n+ \"https://github.com/tensorflow/tensorflow/archive/8ccf1ebdbf4475bc7af6d79b2fa7e1fd8221e3fd.tar.gz\",\n],\n)\n"
}
] | Python | Apache License 2.0 | google/jax | update tensorflow release |
260,474 | 06.12.2018 17:00:47 | 18,000 | 29113dd606ce77c74c0af785542abee0b1e6499d | Made tests runnable with bazel | [
{
"change_type": "MODIFY",
"old_path": "WORKSPACE",
"new_path": "WORKSPACE",
"diff": "-http_archive(\n- name = \"io_bazel_rules_closure\",\n- sha256 = \"a38539c5b5c358548e75b44141b4ab637bba7c4dc02b46b1f62a96d6433f56ae\",\n- strip_prefix = \"rules_closure-dbb96841cc0a5fb2664c37822803b06dab20c7d1\",\n- urls = [\n- \"https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz\",\n- \"https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz\",\n- ],\n-)\n-\n-\n-# To update TensorFlow to a new revision,\n-# a) update URL and strip_prefix to the new git commit hash\n-# b) get the sha256 hash of the commit by running:\n-# curl -L https://github.com/tensorflow/tensorflow/archive/<git hash>.tar.gz | sha256sum\n-# and update the sha256 with the result.\n-http_archive(\n- name = \"org_tensorflow\",\n- sha256 = \"1a685ee839eb52e5fd26c0c9fbb0cddbf39a49cc5edaa6506604a3ba0fecfa2e\",\n- strip_prefix=\"tensorflow-47fe933d89146a0488563bdfde2c0675a750ed16\",\n- urls = [\n- \"https://github.com/tensorflow/tensorflow/archive/47fe933d89146a0488563bdfde2c0675a750ed16.tar.gz\",\n- ],\n-)\n-\n-# For development, one can use a local TF repository instead.\n-# local_repository(\n-# name = \"org_tensorflow\",\n-# path = \"tensorflow\",\n-# )\n-\n-\n-load(\"@org_tensorflow//tensorflow:workspace.bzl\", \"tf_workspace\")\n-\n-tf_workspace(\n- path_prefix = \"\",\n- tf_repo_name = \"org_tensorflow\",\n-)\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/BUILD",
"new_path": "tests/BUILD",
"diff": "@@ -80,17 +80,14 @@ jax_test(\njax_test(\nname = \"stax_test\",\nsrcs = [\"stax_test.py\"],\n- deps = [\"//jax:stax\"],\n)\njax_test(\nname = \"minmax_test\",\nsrcs = [\"minmax_test.py\"],\n- deps = [\"//jax:minmax\"],\n)\njax_test(\nname = \"lapax_test\",\nsrcs = [\"lapax_test.py\"],\n- deps = [\"//jax:lapax\"],\n)\n"
}
] | Python | Apache License 2.0 | google/jax | Made tests runnable with bazel |
260,474 | 06.12.2018 17:04:00 | 18,000 | c3374a9d5fdae5b8a11c4f245eb765ca0de7bc2d | Added build rule for generated_fun_test (formerly quickish_check) | [
{
"change_type": "MODIFY",
"old_path": "tests/BUILD",
"new_path": "tests/BUILD",
"diff": "@@ -91,3 +91,8 @@ jax_test(\nname = \"lapax_test\",\nsrcs = [\"lapax_test.py\"],\n)\n+\n+jax_test(\n+ name = \"generated_fun_test\",\n+ srcs = [\"generated_fun_test.py\"],\n+)\n"
},
{
"change_type": "RENAME",
"old_path": "tests/quickercheck.py",
"new_path": "tests/generated_fun_test.py",
"diff": "from collections import namedtuple\nfrom functools import partial\nimport numpy.random as npr\n+\n+from absl.testing import absltest\n+from absl.testing import parameterized\n+\nimport jax.numpy as np\nfrom jax import jit, jvp, vjp\n-import itertools as it\n-import sys\n+from jax.test_util as jtu\nnpr.seed(0)\n@@ -208,14 +211,6 @@ def partial_argnums(f, args, dyn_argnums):\ndyn_args = [args[i] for i in dyn_argnums]\nreturn f_, dyn_args\n-def jit_is_identity(fun):\n- vals = gen_vals(fun.in_vars)\n- fun = partial(eval_fun, fun)\n- ans = fun(*vals)\n- static_argnums = thin(range(len(vals)), 0.5)\n- ans_jitted = jit(fun, static_argnums=static_argnums)(*vals)\n- check_all_close(ans, ans_jitted)\n-\ndef jvp_matches_fd(fun):\nvals = gen_vals(fun.in_vars)\ntangents = gen_vals(fun.in_vars)\n@@ -245,27 +240,28 @@ def vjp_matches_fd(fun):\ninner_prod_ad = inner_prod(in_tangents, out_cotangents)\ncheck_close(inner_prod_fd, inner_prod_ad)\n-properties = [\n- jit_is_identity,\n- jvp_matches_fd,\n- vjp_matches_fd,\n-]\n-# vmap_matches_map ]\n-\n-def run_tests():\n- sizes = [3, 10]\n- num_examples = 50\n- cases = it.product(sizes, range(num_examples), properties)\n- for i, (size, _, check_prop) in enumerate(cases):\n- sys.stderr.write('\\rTested: {}'.format(i))\n+counter = it.count()\n+fresh = counter.next\n+\n+class GeneratedFunTest(jtu.JaxTestCase):\n+ \"\"\"Tests of transformations on randomly generated functions.\"\"\"\n+\n+ @parameterized.named_parameters(take(\n+ {\"testcase_name\": 'rand_fun_jit_test_{}'.format(fresh()),\n+ \"fun\" : gen_fun_and_types(size) }\n+ for _ in it.count()))\n+ def testJitIsIdentity(self, fun):\n+ vals = gen_vals(fun.in_vars)\n+ fun = partial(eval_fun, fun)\n+ ans = fun(*vals)\n+ static_argnums = thin(range(len(vals)), 0.5)\n+ ans_jitted = jit(fun, static_argnums=static_argnums)(*vals)\ntry:\n- fun = gen_fun_and_types(size)\n- check_prop(fun)\n+ check_all_close(ans, ans_jitted)\nexcept:\nprint fun\nraise\n- print \"\\nok\"\n-\nif __name__ == \"__main__\":\n- run_tests()\n+ config.config_with_absl()\n+ absltest.main()\n"
}
] | Python | Apache License 2.0 | google/jax | Added build rule for generated_fun_test (formerly quickish_check) |
260,474 | 06.12.2018 17:31:52 | 18,000 | 3dbf41f3e6f9a01b0d32b925d22e9bfabc524fad | Generated function tests working with bazel | [
{
"change_type": "MODIFY",
"old_path": "jax/test_util.py",
"new_path": "jax/test_util.py",
"diff": "@@ -18,6 +18,8 @@ from __future__ import print_function\nimport functools\nimport re\n+import itertools as it\n+import random\nfrom absl.testing import absltest\nfrom absl.testing import parameterized\n@@ -39,6 +41,10 @@ flags.DEFINE_enum(\n'Describes the device under test in case special consideration is required.'\n)\n+flags.DEFINE_integer(\n+ 'num_generated_cases',\n+ 100,\n+ help='Number of generated cases to test')\nEPS = 1e-4\nATOL = 1e-4\n@@ -304,6 +310,26 @@ def check_raises_regexp(thunk, err_type, pattern):\nassert re.match(pattern, str(e)), \"{}\\n\\n{}\\n\".format(e, pattern)\n+random.seed(0)\n+\n+\n+def take(xs):\n+ return dedup(it.islice(xs, FLAGS.num_generated_cases))\n+\n+\n+def dedup(xs):\n+ seen = set()\n+ for x in xs:\n+ name = x[\"testcase_name\"]\n+ if name not in seen:\n+ seen.add(name)\n+ yield x\n+\n+\n+def sample(xs):\n+ return [random.choice(xs)]\n+\n+\nclass JaxTestCase(parameterized.TestCase):\n\"\"\"Base class for JAX tests including numerical checks and boilerplate.\"\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/generated_fun_test.py",
"new_path": "tests/generated_fun_test.py",
"diff": "@@ -19,9 +19,11 @@ import numpy.random as npr\nfrom absl.testing import absltest\nfrom absl.testing import parameterized\n+import itertools as it\nimport jax.numpy as np\nfrom jax import jit, jvp, vjp\n-from jax.test_util as jtu\n+import jax.test_util as jtu\n+from jax.config import config\nnpr.seed(0)\n@@ -211,7 +213,33 @@ def partial_argnums(f, args, dyn_argnums):\ndyn_args = [args[i] for i in dyn_argnums]\nreturn f_, dyn_args\n-def jvp_matches_fd(fun):\n+counter = it.count()\n+fresh = counter.next\n+\n+class GeneratedFunTest(jtu.JaxTestCase):\n+ \"\"\"Tests of transformations on randomly generated functions.\"\"\"\n+\n+ @parameterized.named_parameters(jtu.take(\n+ {\"testcase_name\": str(fresh()),\n+ \"fun\" : gen_fun_and_types(10) }\n+ for _ in it.count()))\n+ def testJitIsIdentity(self, fun):\n+ vals = gen_vals(fun.in_vars)\n+ fun = partial(eval_fun, fun)\n+ ans = fun(*vals)\n+ static_argnums = thin(range(len(vals)), 0.5)\n+ ans_jitted = jit(fun, static_argnums=static_argnums)(*vals)\n+ try:\n+ check_all_close(ans, ans_jitted)\n+ except:\n+ print fun\n+ raise\n+\n+ @parameterized.named_parameters(jtu.take(\n+ {\"testcase_name\": str(fresh()),\n+ \"fun\" : gen_fun_and_types(10) }\n+ for _ in it.count()))\n+ def testJVPMatchesFD(self, fun):\nvals = gen_vals(fun.in_vars)\ntangents = gen_vals(fun.in_vars)\nfun = partial(eval_fun, fun)\n@@ -223,8 +251,11 @@ def jvp_matches_fd(fun):\ncheck_all_close(ans1, ans2)\ncheck_all_close(deriv1, deriv2)\n-\n-def vjp_matches_fd(fun):\n+ @parameterized.named_parameters(jtu.take(\n+ {\"testcase_name\": str(fresh()),\n+ \"fun\" : gen_fun_and_types(10) }\n+ for _ in it.count()))\n+ def vjp_matches_fd(self, fun):\nvals = gen_vals(fun.in_vars)\nin_tangents = gen_vals(fun.in_vars)\nin_cotangents = gen_vals(fun.out_vars)\n@@ -240,27 +271,6 @@ def vjp_matches_fd(fun):\ninner_prod_ad = inner_prod(in_tangents, out_cotangents)\ncheck_close(inner_prod_fd, inner_prod_ad)\n-counter = it.count()\n-fresh = counter.next\n-\n-class GeneratedFunTest(jtu.JaxTestCase):\n- \"\"\"Tests of transformations on randomly generated functions.\"\"\"\n-\n- @parameterized.named_parameters(take(\n- {\"testcase_name\": 'rand_fun_jit_test_{}'.format(fresh()),\n- \"fun\" : gen_fun_and_types(size) }\n- for _ in it.count()))\n- def testJitIsIdentity(self, fun):\n- vals = gen_vals(fun.in_vars)\n- fun = partial(eval_fun, fun)\n- ans = fun(*vals)\n- static_argnums = thin(range(len(vals)), 0.5)\n- ans_jitted = jit(fun, static_argnums=static_argnums)(*vals)\n- try:\n- check_all_close(ans, ans_jitted)\n- except:\n- print fun\n- raise\nif __name__ == \"__main__\":\nconfig.config_with_absl()\n"
}
] | Python | Apache License 2.0 | google/jax | Generated function tests working with bazel |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.