From 5f74807f5e3635b3cc12c863a45b974ee70dc5d7 Mon Sep 17 00:00:00 2001 From: rvem Date: Wed, 29 Jan 2020 15:37:31 +0300 Subject: [PATCH] [#26] Bump tezos branch revisions Problem: Current revision that are built and packed are quiet old. Solution: Update them to the newest existing ones. --- default.nix | 8 +-- nix/default.nix | 39 +++++++++--- nix/fix-mainnet.patch | 139 ++++++++++++++++-------------------------- 3 files changed, 86 insertions(+), 100 deletions(-) diff --git a/default.nix b/default.nix index df322a44a..bea538134 100644 --- a/default.nix +++ b/default.nix @@ -11,14 +11,14 @@ let binarySuffix = builtins.replaceStrings [ "_" ] [ "-" ] protocolName; }; mainnet = { - rev = "94f779a7"; - sha256 = "16lxilng5q8fr2ll6h4hf7wlvac6nmw4cx10cbgzj5ks090bl97r"; + rev = "28309c81"; + sha256 = "11cv76yfal572fhnhynkbga7wrdx5x1vym11is2xwlygn4p2dx2n"; patchFile = ./nix/fix-mainnet.patch; protocol = protocol005; }; babylonnet = { - rev = "b8731913"; - sha256 = "1pakf1s6bg76fq42mb8fj1immz9g9wwimd522cpx8k28zf0hkl5i"; + rev = "12002a35"; + sha256 = "0j0xiicdid7wnygh9nlp0d2p57wgrbfglyfz56r8wx93s2q2m2c8"; patchFile = ./nix/fix-babylonnet.patch; protocol = protocol005; }; diff --git a/nix/default.nix b/nix/default.nix index 9fd67e03a..a35d41316 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -272,12 +272,33 @@ let ''; doCheck = false; }) { }; + ezjsonm = super.ezjsonm.overrideDerivation (o: rec { + version = "1.1.0"; + name = "ezjsonm"; + src = pkgs.fetchFromGitHub { + owner = "mirage"; + repo = "ezjsonm"; + rev = "v${version}"; + sha256 = "064j9pzy01p3dv947khqyn7fkjbs3jmrqsg8limb4abnlaqxxs2s"; + }; + }); + fmt = super.fmt.overrideDerivation (o: rec { + version = "0.8.8"; + name = "fmt"; + src = pkgs.fetchFromGitHub { + owner = "dbuenzli"; + repo = "fmt"; + rev = "v${version}"; + sha256 = "06700rk442hn2yss04aqv2pr3c0l88zvv6sbwq0hg0fyyacmapl7"; + }; + propagatedBuildInputs = o.propagatedBuildInputs ++ [ self.stdlib-shims self.seq ]; + }); tezos = self.callPackage ({ stdenv, fetchgit, buildDunePackage, base , bigstring, cohttp-lwt, cohttp-lwt-unix, cstruct, ezjsonm, hex, ipaddr - , js_of_ocaml, cmdliner, easy-format, tls, lwt4, lwt_log - , mtime, ocplib-endian, ptime, re, rresult, stdio, uri, uutf, zarith - , libusb1, hidapi, gmp, irmin, alcotest, dum, genspio, ocamlgraph, findlib + , js_of_ocaml, cmdliner, easy-format, tls, lwt4, lwt_log, mtime + , ocplib-endian, ptime, re, rresult, stdio, uri, uutf, zarith, libusb1 + , hidapi, gmp, irmin, alcotest, dum, genspio, ocamlgraph, findlib , digestif, ocp-ocamlres, pprint, upx }: buildDunePackage rec { pname = "tezos"; @@ -331,13 +352,11 @@ let buildPhase = '' # tezos-node build requires ocp-ocamlres binary in PATH PATH=$PATH:${ocp-ocamlres}/lib/ocaml/4.07.1/bin - dune build src/bin_client/tezos-client.install - dune build src/bin_node/tezos-node.install - dune build src/proto_${branchInfo.protocol.protocolName}/bin_baker/tezos-baker-${branchInfo.protocol.binarySuffix}.install - dune build src/proto_${branchInfo.protocol.protocolName}/bin_accuser/tezos-accuser-${branchInfo.protocol.binarySuffix}.install - dune build src/proto_${branchInfo.protocol.protocolName}/bin_endorser/tezos-endorser-${branchInfo.protocol.binarySuffix}.install - dune build src/bin_signer/tezos-signer.install - dune build src/lib_protocol_compiler/tezos-protocol-compiler.install + dune build src/bin_client/tezos-client.install src/bin_node/tezos-node.install \ + src/proto_${branchInfo.protocol.protocolName}/bin_baker/tezos-baker-${branchInfo.protocol.binarySuffix}.install \ + src/proto_${branchInfo.protocol.protocolName}/bin_accuser/tezos-accuser-${branchInfo.protocol.binarySuffix}.install \ + src/proto_${branchInfo.protocol.protocolName}/bin_endorser/tezos-endorser-${branchInfo.protocol.binarySuffix}.install \ + src/bin_signer/tezos-signer.install src/lib_protocol_compiler/tezos-protocol-compiler.install ''; installPhase = '' mkdir -p $out/bin diff --git a/nix/fix-mainnet.patch b/nix/fix-mainnet.patch index 325c093b2..b846191f7 100644 --- a/nix/fix-mainnet.patch +++ b/nix/fix-mainnet.patch @@ -2,10 +2,10 @@ # # SPDX-License-Identifier: MPL-2.0 diff --git a/src/bin_client/dune b/src/bin_client/dune -index f42b53e6..7e47c074 100644 +index fa4ace8..18caca5 100644 --- a/src/bin_client/dune +++ b/src/bin_client/dune -@@ -28,7 +28,10 @@ +@@ -31,7 +31,10 @@ -open Tezos_client_base -open Tezos_client_commands -open Tezos_client_base_unix @@ -17,29 +17,43 @@ index f42b53e6..7e47c074 100644 (install (section bin) -diff --git a/src/bin_node/dune b/src/bin_node/dune -index 54920a2..8bd54be 100644 ---- a/src/bin_node/dune -+++ b/src/bin_node/dune -@@ -28,7 +28,9 @@ - -open Tezos_validator - -open Tezos_shell_context - -open Tezos_protocol_updater -- -linkall))) -+ -linkall +diff --git a/src/bin_signer/dune b/src/bin_signer/dune +index e4c9a7c..2a5f941 100644 +--- a/src/bin_signer/dune ++++ b/src/bin_signer/dune +@@ -19,7 +19,10 @@ + -open Tezos_rpc_http_server + -open Tezos_rpc_http_client_unix + -open Tezos_stdlib_unix +- -open Tezos_stdlib))) ++ -open Tezos_stdlib + -ccopt -static ++ -cclib "-lusb-1.0 -lhidapi-libusb -ludev" + ))) - (install - (section bin) -diff --git a/src/proto_005_PsBabyM1/bin_baker/dune b/src/proto_005_PsBabyM1/bin_baker/dune -index 755e8d4..aeb8f2d 100644 ---- a/src/proto_005_PsBabyM1/bin_baker/dune -+++ b/src/proto_005_PsBabyM1/bin_baker/dune -@@ -9,7 +9,10 @@ - -open Tezos_client_005_PsBabyM1 + (alias + (name runtest_lint) +diff --git a/src/lib_protocol_compiler/dune b/src/lib_protocol_compiler/dune +index 1142419..d8086b4 100644 +--- a/src/lib_protocol_compiler/dune ++++ b/src/lib_protocol_compiler/dune +@@ -65,7 +65,7 @@ + (public_name tezos-protocol-compiler) + (modes native) + (libraries tezos_protocol_compiler_native) +- (flags (:standard -linkall)) ++ (flags (:standard -linkall -ccopt -static)) + (modules Main_native)) + + (executable +diff --git a/src/proto_005_PsBabyM1/bin_accuser/dune b/src/proto_005_PsBabyM1/bin_accuser/dune +index 2f2a6fd..fd9773b 100644 +--- a/src/proto_005_PsBabyM1/bin_accuser/dune ++++ b/src/proto_005_PsBabyM1/bin_accuser/dune +@@ -10,7 +10,10 @@ -open Tezos_client_commands -open Tezos_baking_005_PsBabyM1_commands + -open Tezos_stdlib_unix - -open Tezos_client_base_unix))) + -open Tezos_client_base_unix + -ccopt -static @@ -48,14 +62,14 @@ index 755e8d4..aeb8f2d 100644 (alias (name runtest_lint) -diff --git a/src/proto_005_PsBabyM1/bin_accuser/dune b/src/proto_005_PsBabyM1/bin_accuser/dune -index 173ab99..eae42b2 100644 ---- a/src/proto_005_PsBabyM1/bin_accuser/dune -+++ b/src/proto_005_PsBabyM1/bin_accuser/dune -@@ -9,7 +9,10 @@ - -open Tezos_client_005_PsBabyM1 +diff --git a/src/proto_005_PsBabyM1/bin_baker/dune b/src/proto_005_PsBabyM1/bin_baker/dune +index 1414a08..6044401 100644 +--- a/src/proto_005_PsBabyM1/bin_baker/dune ++++ b/src/proto_005_PsBabyM1/bin_baker/dune +@@ -10,7 +10,10 @@ -open Tezos_client_commands -open Tezos_baking_005_PsBabyM1_commands + -open Tezos_stdlib_unix - -open Tezos_client_base_unix))) + -open Tezos_client_base_unix + -ccopt -static @@ -65,13 +79,13 @@ index 173ab99..eae42b2 100644 (alias (name runtest_lint) diff --git a/src/proto_005_PsBabyM1/bin_endorser/dune b/src/proto_005_PsBabyM1/bin_endorser/dune -index 9df7abf..e8402b8 100644 +index d1b60c7..a738ef2 100644 --- a/src/proto_005_PsBabyM1/bin_endorser/dune +++ b/src/proto_005_PsBabyM1/bin_endorser/dune -@@ -9,7 +9,10 @@ - -open Tezos_client_005_PsBabyM1 +@@ -10,7 +10,10 @@ -open Tezos_client_commands -open Tezos_baking_005_PsBabyM1_commands + -open Tezos_stdlib_unix - -open Tezos_client_base_unix))) + -open Tezos_client_base_unix + -ccopt -static @@ -80,60 +94,13 @@ index 9df7abf..e8402b8 100644 (alias (name runtest_lint) -diff --git a/src/bin_signer/dune b/src/bin_signer/dune -index c06413b..a81e206 100644 ---- a/src/bin_signer/dune -+++ b/src/bin_signer/dune -@@ -18,7 +18,10 @@ - -open Tezos_rpc_http - -open Tezos_rpc_http_server - -open Tezos_rpc_http_client_unix -- -open Tezos_stdlib_unix))) -+ -open Tezos_stdlib_unix -+ -ccopt -static -+ -cclib "-lusb-1.0 -lhidapi-libusb -ludev" -+ ))) - - (alias - (name runtest_lint) -diff --git a/src/lib_protocol_compiler/dune b/src/lib_protocol_compiler/dune -index 7d70857..9fbe9cc 100644 ---- a/src/lib_protocol_compiler/dune -+++ b/src/lib_protocol_compiler/dune -@@ -64,7 +64,7 @@ - (public_name tezos-protocol-compiler) - (modes native) - (libraries tezos_protocol_compiler_native) -- (flags (:standard -linkall)) -+ (flags (:standard -linkall -ccopt -static)) - (modules Main_native)) - - (executable -diff --git a/src/lib_base/p2p_addr.ml b/src/lib_base/p2p_addr.ml -index d9139c4b..a3af815c 100644 ---- a/src/lib_base/p2p_addr.ml -+++ b/src/lib_base/p2p_addr.ml -@@ -36,8 +36,8 @@ let encoding = - end - ~binary:begin - conv -- Ipaddr.V6.to_bytes -- Ipaddr.V6.of_bytes_exn -+ Ipaddr.V6.to_octets -+ Ipaddr.V6.of_octets_exn - string - end - -diff --git a/src/lib_protocol_environment/tezos_protocol_environment.ml b/src/lib_protocol_environment/tezos_protocol_environment.ml -index 14acf631..7b0efcd8 100644 ---- a/src/lib_protocol_environment/tezos_protocol_environment.ml -+++ b/src/lib_protocol_environment/tezos_protocol_environment.ml -@@ -300,7 +300,7 @@ module MakeV1 (Param : sig val name: string end) () = struct - let to_bits ?(pad_to = 0) z = - let bits = to_bits z in - let len = Pervasives.((numbits z + 7) / 8) in -- let full_len = Compare.Int.max pad_to len in -+ let full_len = Stdlib.max pad_to len in - if full_len = 0 then - MBytes.empty - else \ No newline at end of file +diff --git a/vendors/index/src/unix/dune b/vendors/index/src/unix/dune +index 2981490..655fa7f 100644 +--- a/vendors/index/src/unix/dune ++++ b/vendors/index/src/unix/dune +@@ -2,4 +2,4 @@ + (public_name index.unix) + (name index_unix) + (c_names pread pwrite) +- (libraries index logs logs.threaded threads unix)) ++ (libraries index logs threads unix))