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 891756EC60; Wed, 31 Mar 2021 02:13:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 891756EC60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617146014; bh=3Nbc8eJMwEdnMGzOV5b5RByjzE1CP4DbWAjDP+kVRzA=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Jb6J9fH3DcEu84mOed3jrTUx31ZeSq0Z6xyqeC4TvaA+GhlICiri3PeMBkXwJctJ6 RC3/jQnxPquHzRI1B9YCDnn3TvCl1WHIQlcyXAfmo8WKC+olKN2Mi+bWoTc0WVVSiL KeX69ypxXVq7RInsBs2N5tboyGTk2PoWKGb3TpWY= Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 0916E6EC60 for ; Wed, 31 Mar 2021 02:13:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0916E6EC60 Received: by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1lRNYD-0005a0-8l; Wed, 31 Mar 2021 02:13:33 +0300 Date: Wed, 31 Mar 2021 02:13:54 +0300 To: Roman Khabibov Cc: tarantool-patches@dev.tarantool.org Message-ID: <20210330231354.vm2emlswu77wpuys@tkn_work_nb> References: <20210319134555.71396-1-roman.habibov@tarantool.org> <20210319134555.71396-2-roman.habibov@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210319134555.71396-2-roman.habibov@tarantool.org> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947A0146560F8BA709498CFB6209D8582A182A05F5380850400F04EC3FF5BE64AAFA5297E12C8B8B294FB7B477C308B4D305B163D977F5BFED X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B8498AC83B273C12EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378D7045943A292EC88638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CE99938B3FD79E1DF7BA6CF04DC149419290D8AECA970471AA471835C12D1D9774AD6D5ED66289B5278DA827A17800CE79AE9BAF3542BD4619FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3ECBEDCEC3CCF9A28117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF57E738A5135DEA52BA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B6D9EEDE0C260548BB76E601842F6C81A1F004C906525384307823802FF610243DF43C7A68FF6260569E8FC8737B5C2249B372FE9A2E580EFC725E5C173C3A84C3328D50271666121835872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824AC8B6CDF511875BC4E8F7B195E1C978317354B61A791D42377532C244D99A2447 X-C1DE0DAB: 0D63561A33F958A52646463A4DF3FACB32C63896F6EE87A47F8550B257F25E7BD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D344888A9AABCDD32255E26EF97045FC164EB43B9735AB11611A5985B287B1AC40CE285F4503F7301A61D7E09C32AA3244CAF17AD45ED178538D7846D7FA5B54AF2250262A5EE9971B0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojfQIxm2xDGoZEujgnrmFX0Q== X-Mailru-Sender: FFAA8E4AEE17E37C3731A083A1A85ADED66CE888CF7F1F091BFAA34117BACF80B7EA9FE7735C3DBFC664A44C781FCEA7C77752E0C033A69EDF9F2CE1E9CF805D8CD356D4F938FF726C18EFA0BB12DBB0 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: Alexander Turenko via Tarantool-patches Reply-To: Alexander Turenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Aside of several stylistic nits, I have no objections. LGTM after changes (no need to re-review with me.) Please, update and proceed with the next reviewer. On Fri, Mar 19, 2021 at 04:45:54PM +0300, Roman Khabibov wrote: > Enable smtp protocol in bundled libCURL. Nit: Regarding 'libCURL'. The project page ([1]) name the library 'libcurl', so it would be better to follow it. [1]: https://curl.se/libcurl/ Please, leave a couple of words why the change is needed and link the relevant issue. I see that https://github.com/tarantool/tarantool/issues/4559 is quite relevant. > +## feature/build > + > +* Enable smtp protocol in bundled libCURL (gh-####). Nit: 'gh-####' have no any sense. It is better to replace it with gh-4559. > \ No newline at end of file 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") I made the following checks: 1. Compared build/curl/work/curl/CMakeCache.txt before and after the change. Only given options are changed. Okay. 2. Added the following hunk to test/box-tap/curl-build.test.lua: | local i = 0 | local protocol = info.protocols[i] | while protocol ~= nil do | print(('protocols[%d] = %s'):format(i, ffi.string(protocol))) | i = i + 1 | protocol = info.protocols[i] | end Before the patch: | protocols[0] = http | protocols[1] = https After the patch: | protocols[0] = http | protocols[1] = https | protocols[2] = smtp | protocols[3] = smtps (See, it worth to check for smtps as well.) The output looks okay. 3. Added the following hunk to test/box-tap/curl-build.test.lua: | print(('features: %d'):format(info.features)) The output before and after the patch is the same: | features: 2622093 Looks okay. So, it seems, we don't enable or disable something unintentionally. Nice. > +-- > +-- gh-####: Check if smtp protocol is enabled. > +-- Nit: Please, replace with gh-4559. > +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 It worth to check for 'smtps' as well (see above).