From: Roman Khabibov via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Alexander Turenko <alexander.turenko@tarantool.org>, Leonid Vasiliev <lvasiliev@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 2/3] build: enable smtp in libCURL Date: Fri, 9 Apr 2021 22:54:36 +0300 [thread overview] Message-ID: <48779CE3-AA74-43DF-AA54-A418F8C5FDC3@tarantool.org> (raw) In-Reply-To: <20210401005240.dhw6sb3hyccsoo5t@tkn_work_nb> > On Apr 1, 2021, at 03:52, Alexander Turenko <alexander.turenko@tarantool.org> wrote: > > On Fri, Mar 19, 2021 at 05:13:07PM +0300, Roman Khabibov wrote: >> Enable smtp protocol in bundled libCURL. >> --- >> cmake/BuildLibCURL.cmake | 2 +- >> test/box-tap/curl-build.test.lua | 38 +++++++++++++++++++++++++++++++- >> 2 files changed, 38 insertions(+), 2 deletions(-) >> >> diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake >> index 5f8b15a63..313adfb97 100644 >> --- a/cmake/BuildLibCURL.cmake >> +++ b/cmake/BuildLibCURL.cmake >> @@ -124,6 +124,7 @@ macro(curl_build) >> --enable-http-auth >> --enable-mime >> --enable-dateparse >> + --enable-smtp >> >> ${DISABLED_DNS_OPT} >> --disable-ftp >> @@ -137,7 +138,6 @@ macro(curl_build) >> --disable-pop3 >> --disable-imap >> --disable-smb >> - --disable-smtp >> --disable-gopher >> --disable-manual >> --disable-sspi > > It seems, it is quite straightforward backport of [1], so it is okay > after comments from the original patch ([2]). > > Don't miss changelog entries on 1.10. > > [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2021-March/022797.html > [2]: https://lists.tarantool.org/pipermail/tarantool-patches/2021-March/023177.html > > I performed tests 2 and 3 from [2] and the result looks the same. It > seems, we don't enable or disable something unintentionally here as > well. > > WBR, Alexander Turenko. commit 41fb2d2ae39007ee47d90c49de77120c337ee267 Author: Roman Khabibov <roman.habibov@tarantool.org> Date: Mon Jan 18 21:48:35 2021 +0300 build: enable smtp in libcurl Enable smtp protocol in bundled libcurl. Part of #4559 diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake index 5f8b15a63..313adfb97 100644 --- a/cmake/BuildLibCURL.cmake +++ b/cmake/BuildLibCURL.cmake @@ -124,6 +124,7 @@ macro(curl_build) --enable-http-auth --enable-mime --enable-dateparse + --enable-smtp ${DISABLED_DNS_OPT} --disable-ftp @@ -137,7 +138,6 @@ macro(curl_build) --disable-pop3 --disable-imap --disable-smb - --disable-smtp --disable-gopher --disable-manual --disable-sspi diff --git a/test/box-tap/curl-build.test.lua b/test/box-tap/curl-build.test.lua index 300d60b07..640d5d143 100755 --- a/test/box-tap/curl-build.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(5) if test:ok(info.ssl_version ~= nil, 'Curl built with SSL support') then test:diag('ssl_version: ' .. ffi.string(info.ssl_version)) @@ -174,4 +174,29 @@ test:test('curl_symbols', function(t) end end) +local function has_protocol(protocol_str) + 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 info = ffi.C.curl_version_info(7) + local protocol = info.protocols[i] + while protocol ~= nil do + if ffi.string(protocol) == protocol_str then + return true + end + i = i + 1 + protocol = info.protocols[i] + end + + return false +end + +-- +-- gh-4559: check if smtp and smtps protocols are enabled. +-- +test:ok(has_protocol('smtp'), 'smtp protocol is supported') +test:ok(has_protocol('smtps'), 'smtps protocol is supported') + os.exit(test:check() and 0 or 1)
next prev parent reply other threads:[~2021-04-09 19:54 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-19 14:13 [Tarantool-patches] [PATCH 0/3] Export curl symbols, enable smtp and install headers Roman Khabibov via Tarantool-patches 2021-03-19 14:13 ` [Tarantool-patches] [PATCH 1/3] build: export libCURL symbols Roman Khabibov via Tarantool-patches 2021-03-31 23:56 ` Alexander Turenko via Tarantool-patches 2021-04-09 19:54 ` Roman Khabibov via Tarantool-patches 2021-04-01 0:01 ` Alexander Turenko via Tarantool-patches 2021-03-19 14:13 ` [Tarantool-patches] [PATCH 2/3] build: enable smtp in libCURL Roman Khabibov via Tarantool-patches 2021-04-01 0:52 ` Alexander Turenko via Tarantool-patches 2021-04-09 19:54 ` Roman Khabibov via Tarantool-patches [this message] 2021-03-19 14:13 ` [Tarantool-patches] [PATCH 3/3] build: install libCURL headers Roman Khabibov via Tarantool-patches 2021-04-01 0:10 ` Alexander Turenko via Tarantool-patches 2021-04-09 19:54 ` Roman Khabibov via Tarantool-patches 2021-04-13 13:14 ` [Tarantool-patches] [PATCH 0/3] Export curl symbols, enable smtp and install headers Leonid Vasiliev via Tarantool-patches 2021-04-14 17:52 ` Roman Khabibov via Tarantool-patches -- strict thread matches above, loose matches on Subject: below -- 2021-03-18 8:51 [Tarantool-patches] [PATCH 0/3] Install iibCURL headers and export libCURL symbols for 1.10 Roman Khabibov via Tarantool-patches 2021-03-18 8:51 ` [Tarantool-patches] [PATCH 2/3] build: enable smtp in libCURL Roman Khabibov 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=48779CE3-AA74-43DF-AA54-A418F8C5FDC3@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=lvasiliev@tarantool.org \ --cc=roman.habibov@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 2/3] build: enable smtp in libCURL' \ /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