From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 6C33A68713; Thu, 28 Jan 2021 01:19:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6C33A68713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611785977; bh=nrIbtR17CGONi16jJS3+5VC5exseNzOK894Bzg80PJo=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=DErDRVVHFtZC3ROLvFug6tRYu1bt3tUHJ9yrVZ353JEISeniixjwTvkCi1LaqRnv6 5RDL/TaG1ydT0GrkJuymggZ7viHL1Wno9Imf78eDVq2CEar42q3YoO612Fx9How9YZ dIac5grpYEMjg3f9T86a8LU8OL77Td++JdYjig9I= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 5A97D68713 for ; Thu, 28 Jan 2021 01:19:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5A97D68713 Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1l4t9z-0004Bk-IR; Thu, 28 Jan 2021 01:19:36 +0300 To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org References: <4a34a0310b2529d4d85c534eb05802b0d7076c9b.1611765145.git.sergeyb@tarantool.org> <20210127182654.3lu6ag352yufsbh5@tkn_work_nb> Message-ID: <4a875274-a8a7-d269-84bc-cfccbd9a5422@tarantool.org> Date: Thu, 28 Jan 2021 01:19:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210127182654.3lu6ag352yufsbh5@tkn_work_nb> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD92BC6D7A73B5E1EC9C95833ED1B56E115E174DC50566391AE00894C459B0CD1B948BEE734E0F468E33FEC2E6B7E150884EEFB1E59D4DBCD0950BEE2EB090F92B7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE74BE895B46187343CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637C3BF94FB392044A18638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC9A90CCBA052DA70370E0ED8EA78CBF0E416C61D136EFE7B7389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C008ED818AD11EC8E48941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6F459A8243F1D1D44CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C22496E25C4BE631E29E176E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B682BAA02D5B843923AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE7F41B2BB9C90B57CB67F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C32AC55EA90C689D2D35872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9DE2850DD75B2526BE5BFE6E7EFDEDCD789D4C264860C145E X-B7AD71C0: 6FEFE4C63DFE2D85469AD6E133326EAB664F5199923B286E81C2AD9CFA0FBF5C9C2BBA594F31363B155B1761B740323297699898A1676330D8B824618089516C093C9A16E5BC824AC8B6CDF511875BC4E8F7B195E1C97831402505570AF0F60A99F3B6BFDA6AA5C4 X-C1DE0DAB: 0D63561A33F958A5BEAB62EC1CD6946664212B0066E270F7636EB6AFF78C6A1CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F05B761BB9C2AA4472A4F26F9A9C81302D6AB8E0A0FC40017ABFC9BB45F1712317A5988BAA07DFED1D7E09C32AA3244CE707ACBDCBE4F53B4746376C4EDC2ABCA95CA90A1D8AC565729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj5ZUBkD5pAd/lP0jV838n/Q== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F25884588F6912FFC2606E754490ED306B221DC3B5A41D9460F20023282EC151BADDC1D3523A6D01B4765B2DFB59E2DDD9FE06B14FA522850F29BC30112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1] static-build: use hashes of downloaded files X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for review! On 27.01.2021 21:26, Alexander Turenko wrote: > On Wed, Jan 27, 2021 at 07:37:01PM +0300, sergeyb@tarantool.org wrote: >> From: Sergey Bronnikov >> >> Using hashes in ExternalProject_Add() [1] allows to avoid extra >> downloads on rebuilds. >> >> 1. https://cmake.org/cmake/help/latest/module/ExternalProject.html >> >> Closes #5761 > I don't know this machinery much, but it looks worthful and I don't see > any downsides. > > LGTM. > >> diff --git a/static-build/CMakeLists.txt b/static-build/CMakeLists.txt >> index 9a2f85052..39cb321d0 100644 >> --- a/static-build/CMakeLists.txt >> +++ b/static-build/CMakeLists.txt >> @@ -40,6 +40,7 @@ endif() >> # >> ExternalProject_Add(openssl >> URL https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz >> + URL_MD5 3f486f2f4435ef14b81814dbbc7b48bb > Nit: I would place certain hash values near to the versions block to > don't spread dependent information and descrease probability to forget > to update a checksum together with a version. Changing version without updating hashes is not possible. Although, I'm agree placing hashes near version would be more convenient. @@ -9,10 +9,15 @@ project(tarantool-static C CXX)  include(ExternalProject)  set(OPENSSL_VERSION 1.1.1f) +set(OPENSSL_HASH 3f486f2f4435ef14b81814dbbc7b48bb)  set(ZLIB_VERSION 1.2.11) +set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)  set(NCURSES_VERSION 6.2) +set(NCURSES_HASH e812da327b1c2214ac1aed440ea3ae8d)  set(READLINE_VERSION 8.0) +set(READLINE_HASH 7e6c1f16aee3244a69aba6e438295ca3)  set(UNWIND_VERSION 1.3-rc1) +set(UNWIND_HASH f09b670de5db6430a3de666e6aed60e3)  # Pass -isysroot= option on Mac OS to a preprocessor and a C  # compiler to find header files installed with an SDK. @@ -40,7 +45,7 @@ endif()  #  ExternalProject_Add(openssl      URL https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -    URL_MD5 3f486f2f4435ef14b81814dbbc7b48bb +    URL_MD5 ${OPENSSL_HASH}      CONFIGURE_COMMAND /config          CC=${CMAKE_C_COMPILER}          CXX=${CMAKE_CXX_COMPILER} @@ -85,7 +90,7 @@ ExternalProject_Add(icu  #  ExternalProject_Add(zlib      URL https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz -    URL_MD5 1c9f62f0778697a09d36121ead88e08e +    URL_MD5 ${ZLIB_HASH}      CONFIGURE_COMMAND env          CC=${CMAKE_C_COMPILER}          CFLAGS=${DEPENDENCY_CFLAGS} @@ -101,7 +106,7 @@ ExternalProject_Add(zlib  #  ExternalProject_Add(ncurses      URL https://ftp.gnu.org/gnu/ncurses/ncurses-${NCURSES_VERSION}.tar.gz -    URL_MD5 e812da327b1c2214ac1aed440ea3ae8d +    URL_MD5 ${NCURSES_HASH}      CONFIGURE_COMMAND /configure          CC=${CMAKE_C_COMPILER}          CXX=${CMAKE_CXX_COMPILER} @@ -135,7 +140,7 @@ ExternalProject_Add(ncurses  #  ExternalProject_Add(readline      URL https://ftp.gnu.org/gnu/readline/readline-${READLINE_VERSION}.tar.gz -    URL_MD5 7e6c1f16aee3244a69aba6e438295ca3 +    URL_MD5 ${READLINE_HASH}      CONFIGURE_COMMAND /configure          CC=${CMAKE_C_COMPILER}          CFLAGS=${DEPENDENCY_CFLAGS} @@ -245,7 +250,7 @@ if (APPLE)  else()      ExternalProject_Add(unwind          URL https://download.savannah.nongnu.org/releases/libunwind/libunwind-${UNWIND_VERSION}.tar.gz -        URL_MD5 f09b670de5db6430a3de666e6aed60e3 +        URL_MD5 ${UNWIND_HASH}          CONFIGURE_COMMAND /configure              CC=${CMAKE_C_COMPILER}              CXX=${CMAKE_CXX_COMPILER}