From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 B1CDB469719 for ; Wed, 4 Mar 2020 15:03:37 +0300 (MSK) Date: Wed, 4 Mar 2020 15:03:33 +0300 From: Alexander Turenko Message-ID: <20200304120333.7n42w7slweagit3v@tkn_work_nb> References: <60d67cf38872e012f83410591dfa39140fc679e0.1579605136.git.sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <60d67cf38872e012f83410591dfa39140fc679e0.1579605136.git.sergepetrenko@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2 2/2] build: add bundled curl and c-ares to version output List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org On Tue, Jan 21, 2020 at 02:54:32PM +0300, Serge Petrenko wrote: > Since we may use bundled lubcurl and c-ares, it can be useful to know > the exact curl and c-ares versions tarantool was built with. > > Follow-up #4591 > --- > cmake/BuildAres.cmake | 10 ++++++++++ > cmake/BuildLibCURL.cmake | 10 ++++++++++ > src/lua/init.c | 14 ++++++++++++++ > src/main.cc | 6 ++++++ > src/trivia/config.h.cmake | 4 ++++ > test/box-py/args.result | 8 ++++++++ > test/box-py/args.test.py | 5 ++++- > 7 files changed, 56 insertions(+), 1 deletion(-) > > diff --git a/cmake/BuildAres.cmake b/cmake/BuildAres.cmake > index 0f9f174ce..7be6f5b00 100644 > --- a/cmake/BuildAres.cmake > +++ b/cmake/BuildAres.cmake > @@ -4,6 +4,16 @@ macro(ares_build) > set(ARES_BINARY_DIR ${PROJECT_BINARY_DIR}/build/ares/work) > set(ARES_INSTALL_DIR ${PROJECT_BINARY_DIR}/build/ares/dest) > > + # Get bundled ares version for `tarantool -v` output. > + if (EXISTS "${ARES_SOURCE_DIR}/.git" AND GIT) > + execute_process (COMMAND ${GIT} describe HEAD > + OUTPUT_VARIABLE BUNDLED_ARES_VERSION > + OUTPUT_STRIP_TRAILING_WHITESPACE > + WORKING_DIRECTORY ${ARES_SOURCE_DIR}) > + string(REPLACE cares- "" BUNDLED_ARES_VERSION ${BUNDLED_ARES_VERSION}) > + string(REPLACE _ . BUNDLED_ARES_VERSION ${BUNDLED_ARES_VERSION}) > + endif() This way does not work when tarantool sources are fetched from a tarball (rather from git repository). It'll affect all packages, our ones and external. Our packages are built from tarballs, created by packpack before run rpmbuild / debuild. External packages (like Gentoo) also fetch tarballs, so it will not work too. Likely the same on Mac OS (brew) and FreeBSD (port / pkg). For tarantool itself it is handles using a VERSION file, which is alway shipped within a tarball. packpack stores a git version in this file when creating a tarball. CMakeLists.txt reads it if exists. How to check: $ TARBALL_COMPRESSOR=gz ~/p/t/packpack/packpack tarball It'll create a tarball in build directory. You can unpack it and build. The reason why *-full-ci does not fail is that box-py test suite is not included yet in all testing jobs (see [1]). To be honest, I don't see a way to overcome this problem. Need to think more. Maybe add some hooks to packpack to create extra VERSION files. [1]: https://github.com/tarantool/tarantool/issues/4599