Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v1] static-build: use hashes of downloaded files
Date: Thu, 28 Jan 2021 01:19:35 +0300	[thread overview]
Message-ID: <4a875274-a8a7-d269-84bc-cfccbd9a5422@tarantool.org> (raw)
In-Reply-To: <20210127182654.3lu6ag352yufsbh5@tkn_work_nb>

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 <sergeyb@tarantool.org>
>>
>> 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=<SDK_PATH> 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 <SOURCE_DIR>/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 <SOURCE_DIR>/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 <SOURCE_DIR>/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 <SOURCE_DIR>/configure
              CC=${CMAKE_C_COMPILER}
              CXX=${CMAKE_CXX_COMPILER}



  reply	other threads:[~2021-01-27 22:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 16:37 Sergey Bronnikov via Tarantool-patches
2021-01-27 18:26 ` Alexander Turenko via Tarantool-patches
2021-01-27 22:19   ` Sergey Bronnikov via Tarantool-patches [this message]
2021-01-29 14:42 ` Kirill Yukhin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a875274-a8a7-d269-84bc-cfccbd9a5422@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1] static-build: use hashes of downloaded files' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox