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 19D206EC56; Fri, 19 Mar 2021 16:46:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 19D206EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616161591; bh=fez0lqYiUQXnRjrkvXlq2qdhEisVp27FLQhpclSfON0=; h=To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=KDJfBr+TNZAJ/misxvtpw5ZPZHgT06UZtKDm+0nAoiV3ZYDDddBneZ8H3G3su/4Js q7d5mbVtkva6a3zzsZV7dqANBmeRyouxExO+MNPNWrI0yM/9r4GebGlSV5ir5GzdeC P3FsDJ13yf7MODhbTweU9jJ3njqkPf70zxojFSk4= Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 825166EC56 for ; Fri, 19 Mar 2021 16:45:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 825166EC56 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1lNFRu-0004mg-Tw; Fri, 19 Mar 2021 16:45:59 +0300 To: tarantool-patches@dev.tarantool.org Cc: alexander.turenko@tarantool.org Date: Fri, 19 Mar 2021 16:45:54 +0300 Message-Id: <20210319134555.71396-2-roman.habibov@tarantool.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210319134555.71396-1-roman.habibov@tarantool.org> References: <20210319134555.71396-1-roman.habibov@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD95D6E7CC48CB1F5F10D3016C09B407F8B1E2E766A3410B623182A05F538085040175FB4A2E855931C9B70FC540860F12EE0B1D6DAF847F6669000C0D85469333C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BA0D57D3459E5640EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A521848D7B067A388638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C81A23F326053F827A8CBEEB03E07130A06A911FD8D55E0EFA471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7850F8B975A76562C9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C362968DCAA3E4B45B117882F4460429728AD0CFFFB425014E868A13BD56FB6657A7F4EDE966BC389F9E8FC8737B5C224999D9E8F3AA2CD044089D37D7C0E48F6CCF19DD082D7633A0E7DDDDC251EA7DABAAAE862A0553A39223F8577A6DFFEA7C9319363C4EB1179043847C11F186F3C5E7DDDDC251EA7DABCC89B49CDF41148FA8EF81845B15A4842623479134186CDE6BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C81A23F326053F827A8CBEEB03E07130A06A911FD8D55E0EF9C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFF532FBFD8162E58C699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D348B409C2D257583DF1A5D791213F7838A41DEC0588343AE373297B6F49C4E91E6D0E7B20AE39C0E201D7E09C32AA3244C6693375382F567CE71934552A17A1BFBE8FBBEFAE1C4874C729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojyKyJYJ15DtIsKCcGQLJaaQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822D23A169E4CA170ECCCEEA03A3A7D53940F96A0E8EF440D4CA021B31A5B48C7CFFB559BB5D741EB9609AE011F3211FEEF240331F90058701C67EA787935ED9F1B X-Mras: Ok Subject: [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: Roman Khabibov via Tarantool-patches Reply-To: Roman Khabibov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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-####). \ 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 +-- +-- 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) -- 2.24.3 (Apple Git-128)