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 73FBC6BD18; Mon, 12 Apr 2021 13:03:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 73FBC6BD18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618221787; bh=LEWtRyJOtSsjsmhnILLSPlu4TTdNFc2J/Lfy0Qcy264=; 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=oxcpH2J2CoiweMiTTD5PtgtzW3rPQDbVySIWyOjukzUvSxJGaibR0AsFXCIlrnkxM y+fRYCqpaGUxx0by7UAKGQJBGmuF2fJEYMIP/gxY/cmRRzvUuuu1wbNvW7Syn1AVVd 1f3tuUxoREgO56O/87TiJoSTq4JdLXyuucLecpGA= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 8795E6EC5B for ; Mon, 12 Apr 2021 13:03:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8795E6EC5B Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1lVtPN-0003NU-J8; Mon, 12 Apr 2021 13:03:06 +0300 To: Roman Khabibov , tarantool-patches@dev.tarantool.org Cc: alexander.turenko@tarantool.org References: <20210319134555.71396-1-roman.habibov@tarantool.org> <20210319134555.71396-2-roman.habibov@tarantool.org> Message-ID: Date: Mon, 12 Apr 2021 13:01:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210319134555.71396-2-roman.habibov@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480257C85EA0BB7A95D5E28B957962BB550182A05F538085040C00352B361B64A2EC6738E0B4A98C02E39A9F85F4B9968A642C7C6B3CDD61870 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76ABD3380F320B62CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B05885A782BE20C5EA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA658C71F9F793DED027F12431B827984D45AF6B57BC7E64490618DEB871D839B73339E8FC8737B5C2249957A4DEDD2346B42CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD2691661749BA6B9773596C9B5BF839F39F6D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE389DDFE3E282F3DD16136E347CC761E07C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BDC0F6C5B2EEF3D0C75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C978313542418A528816CCC527CFD643BC0A42 X-C1DE0DAB: 0D63561A33F958A5BF14311C3335AFC5345AB92F4617DC4A6C5914BFE9215AA7D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3455AC8BF8E3153BA0173A115D5446F1E1B667FA06F308D8C28EC15694D6DF885B4A4D14919B36D7DB1D7E09C32AA3244CEC46B83855A3D0936740E80A349035F63C6EB905E3A8056BFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojq8JA+pXcDunAH8hefwUi7Q== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A76932EAB61EE5114EAAC6738E0B4A98C02EC2EB5FBD3A89CC32D35D514C7DAC97282D063C67CFD4E84987597EC79699C0E6F21BD4036121A32F7402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 1/2] build: enable smtp 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: Leonid Vasiliev via Tarantool-patches Reply-To: Leonid Vasiliev Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thank you for the patch. Generally LGTM. See 2 comments below. On 3/19/21 4:45 PM, Roman Khabibov via Tarantool-patches wrote: > Enable smtp protocol in bundled libCURL. > --- > changelogs/unreleased/enable-smtp.md | 3 ++ > cmake/BuildLibCURL.cmake | 4 +-- > ...l-exports.test.lua => curl-build.test.lua} | 28 ++++++++++++++++++- > 3 files changed, 32 insertions(+), 3 deletions(-) > create mode 100755 changelogs/unreleased/enable-smtp.md > rename test/box-tap/{gh-5223-curl-exports.test.lua => curl-build.test.lua} (90%) > > diff --git a/changelogs/unreleased/enable-smtp.md b/changelogs/unreleased/enable-smtp.md > new file mode 100755 > index 000000000..da5923e0a > --- /dev/null > +++ b/changelogs/unreleased/enable-smtp.md > @@ -0,0 +1,3 @@ > +## feature/build > + > +* Enable smtp protocol in bundled libCURL (gh-####). 1) gh-####? Here and below. > \ No newline at end of file > diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake > index 39a1d62fd..59f78d9e2 100644 > --- a/cmake/BuildLibCURL.cmake > +++ b/cmake/BuildLibCURL.cmake > @@ -77,7 +77,7 @@ macro(curl_build) > > # Switch off the group of protocols with special flag HTTP_ONLY: > # ftp, file, ldap, ldaps, rtsp, dict, telnet, tftp, pop3, imap, smtp. > - list(APPEND LIBCURL_CMAKE_FLAGS "-DHTTP_ONLY=ON") > + list(APPEND LIBCURL_CMAKE_FLAGS "-DHTTP_ONLY=OFF") > > # Additionaly disable some more protocols. > list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_SMB=ON") > @@ -142,7 +142,7 @@ macro(curl_build) > list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_TFTP=ON") > list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_POP3=ON") > list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_IMAP=ON") > - list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_SMTP=ON") > + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_SMTP=OFF") > > include(ExternalProject) > ExternalProject_Add( > diff --git a/test/box-tap/gh-5223-curl-exports.test.lua b/test/box-tap/curl-build.test.lua > similarity index 90% > rename from test/box-tap/gh-5223-curl-exports.test.lua > rename to test/box-tap/curl-build.test.lua > index 300d60b07..f3041331b 100755 > --- a/test/box-tap/gh-5223-curl-exports.test.lua > +++ b/test/box-tap/curl-build.test.lua > @@ -56,7 +56,7 @@ ffi.cdef([[ > > local info = ffi.C.curl_version_info(7) > local test = tap.test('curl-features') > -test:plan(3) > +test:plan(4) > > if test:ok(info.ssl_version ~= nil, 'Curl built with SSL support') then > test:diag('ssl_version: ' .. ffi.string(info.ssl_version)) > @@ -78,6 +78,9 @@ else > RTLD_DEFAULT = ffi.cast("void *", 0LL) > end > > +-- 2) Use "---" at the beginning of the function description. Here and below. > +-- gh-5223: Check if all curl symbols are exported. > +-- > -- The following list was obtained by parsing libcurl.a static library: > -- nm libcurl.a | grep -oP 'T \K(curl_.+)$' | sort > local curl_symbols = { > @@ -174,4 +177,27 @@ test:test('curl_symbols', function(t) > end > end) > > +-- > +-- gh-####: Check if smtp protocol is enabled. > +-- > +local function has_smtp() > + local i = 0 > + -- curl_version_info_data.protocols is a null terminated array > + -- of pointers to char. > + -- See curl/lib/version.c: > + -- static const char * const protocols[] > + local protocol = info.protocols[i] > + while protocol ~= nil do > + if ffi.string(protocol) == 'smtp' then > + return true > + end > + i = i + 1 > + protocol = info.protocols[i] > + end > + > + return false > +end > + > +test:ok(has_smtp(), 'smtp protocol supported') > + > os.exit(test:check() and 0 or 1) >