[bf8ac01] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[a2d8572] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[8e2075c] | 6 |
|
---|
[92d2b83] | 7 | <!ENTITY curl-download-http "https://curl.haxx.se/download/curl-&curl-version;.tar.xz">
|
---|
[2b8421c] | 8 | <!ENTITY curl-download-ftp " ">
|
---|
[731bf37a] | 9 | <!ENTITY curl-md5sum "8d22827310223f24d8eacc866722cc10">
|
---|
[2d8ad23] | 10 | <!ENTITY curl-size "2.3 MB">
|
---|
[731bf37a] | 11 | <!ENTITY curl-buildsize "73 MB (add 13 MB for tests)">
|
---|
| 12 | <!ENTITY curl-time "0.4 SBU (add 16 SBU for tests)">
|
---|
[a2d8572] | 13 | ]>
|
---|
| 14 |
|
---|
[377584f] | 15 | <sect1 id="curl" xreflabel="cURL-&curl-version;">
|
---|
[bf8ac01] | 16 | <?dbhtml filename="curl.html"?>
|
---|
[dc775a26] | 17 |
|
---|
[bf8ac01] | 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
[55329727] | 20 | <date>$Date$</date>
|
---|
[bf8ac01] | 21 | </sect1info>
|
---|
[dc775a26] | 22 |
|
---|
[3e89149] | 23 | <title>cURL-&curl-version;</title>
|
---|
[dc775a26] | 24 |
|
---|
[bf8ac01] | 25 | <indexterm zone="curl">
|
---|
[3e89149] | 26 | <primary sortas="a-cURL">cURL</primary>
|
---|
[bf8ac01] | 27 | </indexterm>
|
---|
[dc775a26] | 28 |
|
---|
[bf8ac01] | 29 | <sect2 role="package">
|
---|
[3e89149] | 30 | <title>Introduction to cURL</title>
|
---|
[dc775a26] | 31 |
|
---|
[355495ce] | 32 | <para>
|
---|
[587dc526] | 33 | The <application>cURL</application> package contains an utility
|
---|
[ea21196] | 34 | and a library used for transferring files with URL syntax to any of
|
---|
| 35 | the following protocols: FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP,
|
---|
| 36 | TELNET, DICT, LDAP, LDAPS and FILE. Its ability to both download
|
---|
| 37 | and upload files can be incorporated into other programs to support
|
---|
| 38 | functions like streaming media.
|
---|
[355495ce] | 39 | </para>
|
---|
[dc775a26] | 40 |
|
---|
[38489aa0] | 41 | &lfs84_checked;
|
---|
[2b8421c] | 42 |
|
---|
[bf8ac01] | 43 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
[874fec7f] | 44 | <itemizedlist spacing="compact">
|
---|
[bf8ac01] | 45 | <listitem>
|
---|
[355495ce] | 46 | <para>
|
---|
| 47 | Download (HTTP): <ulink url="&curl-download-http;"/>
|
---|
| 48 | </para>
|
---|
[bf8ac01] | 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
[355495ce] | 51 | <para>
|
---|
| 52 | Download (FTP): <ulink url="&curl-download-ftp;"/>
|
---|
| 53 | </para>
|
---|
[bf8ac01] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[355495ce] | 56 | <para>
|
---|
| 57 | Download MD5 sum: &curl-md5sum;
|
---|
| 58 | </para>
|
---|
[bf8ac01] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[355495ce] | 61 | <para>
|
---|
| 62 | Download size: &curl-size;
|
---|
| 63 | </para>
|
---|
[bf8ac01] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[355495ce] | 66 | <para>
|
---|
| 67 | Estimated disk space required: &curl-buildsize;
|
---|
| 68 | </para>
|
---|
[bf8ac01] | 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
[355495ce] | 71 | <para>
|
---|
| 72 | Estimated build time: &curl-time;
|
---|
| 73 | </para>
|
---|
[bf8ac01] | 74 | </listitem>
|
---|
| 75 | </itemizedlist>
|
---|
[dc775a26] | 76 |
|
---|
[3e89149] | 77 | <bridgehead renderas="sect3">cURL Dependencies</bridgehead>
|
---|
[dc775a26] | 78 |
|
---|
[355495ce] | 79 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 80 | <para role="recommended">
|
---|
[2198a32] | 81 | <xref role="runtime" linkend="make-ca"/> (runtime)
|
---|
[355495ce] | 82 | </para>
|
---|
| 83 |
|
---|
[bf8ac01] | 84 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[355495ce] | 85 | <para role="optional">
|
---|
[4464d405] | 86 | <xref linkend="c-ares"/>,
|
---|
[2eb903f] | 87 | <xref linkend="gnutls"/>,
|
---|
[531f138] | 88 | <xref linkend="libidn2"/>,
|
---|
[1ad3510e] | 89 | <xref linkend="libpsl"/>,
|
---|
[fee79e2] | 90 | <xref linkend="libssh2"/>,
|
---|
[355495ce] | 91 | <xref linkend="mitkrb"/>,
|
---|
[0c702b61] | 92 | <xref linkend="nghttp2"/>,
|
---|
[fad8db2] | 93 | <xref linkend="openldap"/>,
|
---|
[4949bda0] | 94 | <xref linkend="samba"/>,
|
---|
[7f6d672] | 95 | <ulink url="https://github.com/google/brotli/">Brotli</ulink>,
|
---|
[fad8db2] | 96 | <ulink url="https://launchpad.net/libmetalink/">libmetalink</ulink>,
|
---|
[67cc05e] | 97 | <ulink url="http://rtmpdump.mplayerhq.hu/">librtmp</ulink>,
|
---|
[4c3c7f43] | 98 | <ulink url="https://tls.mbed.org/">mbed TLS</ulink> (formerly known as
|
---|
| 99 | PolarSSL), and
|
---|
[c18fd2e6] | 100 | <ulink url="http://spnego.sourceforge.net/">SPNEGO</ulink>
|
---|
[355495ce] | 101 | </para>
|
---|
| 102 |
|
---|
[d714f22] | 103 | <bridgehead renderas="sect4">Optional if Running the Test Suite</bridgehead>
|
---|
[355495ce] | 104 | <para role="optional">
|
---|
[d714f22] | 105 | <!-- stunnel is still listed in the docs as required, but 7.58.0
|
---|
| 106 | tests completed happily without it, although the test for unit1323
|
---|
| 107 | reported that the tool set in the test case does not exist - ken -->
|
---|
[f346a49] | 108 | <xref linkend="stunnel"/> (for the HTTPS and FTPS tests) and
|
---|
[1ad3510e] | 109 | <xref linkend="valgrind"/> (this will slow the tests down and may cause failures.)
|
---|
[355495ce] | 110 | </para>
|
---|
[c5e7d76] | 111 |
|
---|
[061ec9d] | 112 | <para condition="html" role="usernotes">User Notes:
|
---|
[355495ce] | 113 | <ulink url="&blfs-wiki;/curl"/>
|
---|
| 114 | </para>
|
---|
[bf8ac01] | 115 | </sect2>
|
---|
[dc775a26] | 116 |
|
---|
[bf8ac01] | 117 | <sect2 role="installation">
|
---|
[3e89149] | 118 | <title>Installation of cURL</title>
|
---|
[dc775a26] | 119 |
|
---|
[355495ce] | 120 | <para>
|
---|
| 121 | Install <application>cURL</application> by running the following
|
---|
| 122 | commands:
|
---|
| 123 | </para>
|
---|
[dc775a26] | 124 |
|
---|
[58d5000] | 125 | <screen><userinput>./configure --prefix=/usr \
|
---|
[30b7db74] | 126 | --disable-static \
|
---|
| 127 | --enable-threaded-resolver \
|
---|
[038b4c75] | 128 | --with-ca-path=/etc/ssl/certs &&
|
---|
[bf8ac01] | 129 | make</userinput></screen>
|
---|
[dc775a26] | 130 |
|
---|
[8ffdb08] | 131 | <!--
|
---|
[58d5000] | 132 | For version 7.54.1 I got:
|
---|
| 133 | TESTDONE: 869 tests out of 869 reported OK: 100%
|
---|
| 134 | TESTDONE: 1092 tests were considered during 1080 seconds
|
---|
[8ffdb08] | 135 |
|
---|
| 136 | <para>
|
---|
[2ca3997] | 137 | Running the test suite is optional. About 2% of the tests fail. Increase
|
---|
| 138 | in test time by each failed test is about 10%. Tests SBU above was
|
---|
| 139 | obtained disabling failing tests, with:
|
---|
[355495ce] | 140 | </para>
|
---|
[bfc3945] | 141 |
|
---|
| 142 | 2017-10-29 - bdubbs
|
---|
| 143 | For version 7.56.1 I had a lot of test failures which included long
|
---|
| 144 | timeouts. Could not determine the cause of the timeouts or failures,
|
---|
| 145 | but I was missing c-ares, MIT Kerberos, ldap, samba, and the six
|
---|
| 146 | external packages.
|
---|
[e024fe4] | 147 |
|
---|
| 148 | 2017-12-01 - bdubbs
|
---|
| 149 | Still a lot of test failures. I did have c-ares, Kerberos, and ldap
|
---|
| 150 | installed this time. Best guess is that servers are not available.
|
---|
[7549592] | 151 |
|
---|
| 152 | 2018-08-01 - renodr
|
---|
| 153 | No test failures, but I didn't have any of the optional dependencies except
|
---|
| 154 | for c-ares and libidn2. I might re-run this test suite before release with
|
---|
| 155 | all of the optional deps, but right now, it isn't a priority - rather
|
---|
| 156 | the security fix is.
|
---|
[8ffdb08] | 157 | -->
|
---|
[ffa8c7f] | 158 |
|
---|
| 159 | <para>
|
---|
[731bf37a] | 160 | To run the test suite, issue: <command>make test</command>.
|
---|
| 161 | Tests 323, 1139, and 1140 are known to fail.
|
---|
| 162 | <!-- Two (of 857) tests
|
---|
[1ad3510e] | 163 | fail for unknown reasons, and all tests fail is valgrind is installed. Moving
|
---|
[5a66d6ac] | 164 | valgrind out of $PATH is recommended if you wish to run the test suite while
|
---|
[7a05ab42] | 165 | it is installed. -->
|
---|
[1ad3510e] | 166 | <!--
|
---|
[c18fd2e6] | 167 | Added by Pierre for curl-7.59.0:
|
---|
| 168 | no stunnel, no valgrind, no options
|
---|
| 169 | Warning: smb server unexpectedly alive
|
---|
| 170 | Warning: dict server unexpectedly alive
|
---|
| 171 | TESTDONE: 950 tests out of 951 reported OK: 99%
|
---|
| 172 | TESTFAIL: These test cases failed: 1148
|
---|
| 173 | TESTDONE: 1189 tests were considered during 362 seconds.
|
---|
| 174 | __________
|
---|
| 175 |
|
---|
[d714f22] | 176 | if stunnel and valgrind are not installed, and also most options
|
---|
| 177 | (I had rtmpdump), the tests complete without problems.
|
---|
| 178 | Warning: smb server unexpectedly alive
|
---|
| 179 | Warning: dict server unexpectedly alive
|
---|
| 180 | TESTDONE: 938 tests out of 938 reported OK: 100%
|
---|
| 181 | TESTDONE: 1175 tests were considered during 355 seconds.
|
---|
| 182 | and no. I don't have smb - so commenting the rest of this:
|
---|
[5b62526] | 183 | To run the test suite, issue: <command>make test</command>. Many tests
|
---|
[e024fe4] | 184 | may fail that depend on optional dependencies that may not be installed
|
---|
| 185 | or upstream servers that may not be available, especially for tests
|
---|
| 186 | numbered 700 and above.
|
---|
[1ad3510e] | 187 | Test time may be significantly increase due to hanging tests that fail.
|
---|
[85d14e15] | 188 | __________
|
---|
| 189 | Added by Bruce for curl-7.60.0:
|
---|
| 190 | TESTDONE: 957 tests out of 959 reported OK: 99%
|
---|
| 191 | TESTFAIL: These test cases failed: 1139 1140
|
---|
| 192 | TESTDONE: 1196 tests were considered during 1184 seconds.
|
---|
| 193 | From the logs, both appear to be ipv6 releated.
|
---|
[7549592] | 194 |
|
---|
| 195 | ==========
|
---|
| 196 | Added by Douglas for curl-7.61.0:
|
---|
| 197 | TESTDONE: 961 tests out of 961 reported OK: 100%
|
---|
| 198 | TESTDONE: 1202 tests were considered during 338 seconds.
|
---|
| 199 | I only have c-ares and libidn2 installed, I will likely try before release
|
---|
| 200 | with all optional dependencies in the book installed.
|
---|
[5a66d6ac] | 201 |
|
---|
| 202 | =========
|
---|
| 203 | 7.61.1 NOTE: The test suite is extremely noisy, complaining about verification errors.
|
---|
| 204 | It's possible this is due to openssl-1.1.1, BUT 79/79 tests report as 100% OK. I had
|
---|
| 205 | c-ares, libpsl, and libidn1/2 installed. - Doug
|
---|
[7a05ab42] | 206 |
|
---|
| 207 | ========
|
---|
| 208 | 7.62.0: All tests passed. libpsl, c-ares, libssh2, libidn2 installed.
|
---|
| 209 | All 1098 tests report OK.
|
---|
[7f6d672] | 210 |
|
---|
| 211 | =======
|
---|
| 212 | Added by Douglas for curl-7.64.0:
|
---|
| 213 | TESTDONE: 1022 tests out of 1023 reported OK: 99%
|
---|
| 214 | TESTFAIL: These tests cases failed: 323
|
---|
| 215 | TESTDONE: 1235 tests were considered during 1279 seconds.
|
---|
| 216 | For dependencies, I had c-ares, gnutls, libidn2, libpsl, krb5, libssh2, nghttp2,
|
---|
| 217 | OpenLDAP, Samba, stunnel, and Valgrind installed.
|
---|
[731bf37a] | 218 | =======
|
---|
| 219 | Added by bdubbs for curl-7.64.1:
|
---|
| 220 | TESTDONE: 1022 tests out of 1025 reported OK: 99%
|
---|
| 221 | TESTFAIL: These test cases failed: 323 1139 1140
|
---|
| 222 | TESTDONE: 1242 tests were considered during 1483 seconds
|
---|
[85d14e15] | 223 | -->
|
---|
[2ca3997] | 224 | </para>
|
---|
[f346a49] | 225 |
|
---|
[355495ce] | 226 | <para>
|
---|
| 227 | Now, as the <systemitem class="username">root</systemitem>
|
---|
| 228 | user:
|
---|
| 229 | </para>
|
---|
[dc775a26] | 230 |
|
---|
[874fec7f] | 231 | <screen role="root"><userinput>make install &&
|
---|
[5ee1266] | 232 |
|
---|
[b5969599] | 233 | rm -rf docs/examples/.deps &&
|
---|
| 234 |
|
---|
[e024fe4] | 235 | find docs \( -name Makefile\* -o -name \*.1 -o -name \*.3 \) -exec rm {} \; &&
|
---|
| 236 |
|
---|
[e4ca0af7] | 237 | install -v -d -m755 /usr/share/doc/curl-&curl-version; &&
|
---|
[d832a872] | 238 | cp -v -R docs/* /usr/share/doc/curl-&curl-version;</userinput></screen>
|
---|
[0c02dcb] | 239 |
|
---|
| 240 | <para>
|
---|
| 241 | Simple tests to the new installed <command>curl</command>:
|
---|
| 242 | <command>curl --trace-ascii debugdump.txt http://www.example.com/</command>
|
---|
| 243 | and
|
---|
| 244 | <command>curl --trace-ascii d.txt --trace-time http://example.com/</command>.
|
---|
| 245 | Inspect the locally created trace files <filename>debugdump.txt</filename>
|
---|
| 246 | and <filename>d.txt</filename>, which contain version downloaded
|
---|
| 247 | files information, etc. One file has the time for each action logged.
|
---|
| 248 | </para>
|
---|
[bf8ac01] | 249 | </sect2>
|
---|
[dc775a26] | 250 |
|
---|
[bf8ac01] | 251 | <sect2 role="commands">
|
---|
| 252 | <title>Command Explanations</title>
|
---|
[dc775a26] | 253 |
|
---|
[c627795] | 254 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 255 | href="../../xincludes/static-libraries.xml"/>
|
---|
[5ee1266] | 256 |
|
---|
[fdd7a91] | 257 | <para>
|
---|
| 258 | <parameter>--enable-threaded-resolver</parameter>: This switch enables
|
---|
| 259 | <application>cURL</application>'s builtin threaded DNS resolver.
|
---|
| 260 | </para>
|
---|
| 261 |
|
---|
[30b7db74] | 262 | <para>
|
---|
[038b4c75] | 263 | <parameter>--with-ca-path=/etc/ssl/certs</parameter>: This
|
---|
[2198a32] | 264 | switch sets the location of the BLFS Certificate Authority store.
|
---|
[30b7db74] | 265 | </para>
|
---|
| 266 |
|
---|
[355495ce] | 267 | <para>
|
---|
| 268 | <option>--with-gssapi</option>: This parameter adds
|
---|
| 269 | <application>Kerberos 5</application> support to
|
---|
| 270 | <filename class="libraryfile">libcurl</filename>.
|
---|
| 271 | </para>
|
---|
| 272 |
|
---|
| 273 | <para>
|
---|
| 274 | <option>--without-ssl --with-gnutls</option>: Use to
|
---|
| 275 | build with <application>GnuTLS</application> support
|
---|
| 276 | instead of <application>OpenSSL</application> for SSL/TLS.
|
---|
| 277 | </para>
|
---|
[b834dfc7] | 278 |
|
---|
[038b4c75] | 279 | <para>
|
---|
[5c3f3856] | 280 | <option>--with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt</option>: Use
|
---|
[038b4c75] | 281 | this switch instead of <parameter>--with-ca-path</parameter> if
|
---|
| 282 | building with <application>GnuTLS</application> support
|
---|
| 283 | instead of <application>OpenSSL</application> for SSL/TLS.
|
---|
| 284 | </para>
|
---|
| 285 |
|
---|
[7f6d672] | 286 | <para>
|
---|
[35c18794] | 287 | <option>--with-libssh2</option>: This paramater adds
|
---|
[7f6d672] | 288 | <application>SSH</application> support to cURL. This is disabled
|
---|
| 289 | by default.
|
---|
| 290 | </para>
|
---|
| 291 |
|
---|
[355495ce] | 292 | <para>
|
---|
[5ee1266] | 293 | <command>find docs ... -exec rm {} \;</command>: This command removes
|
---|
[355495ce] | 294 | <filename>Makefiles</filename> and man files from the documentation
|
---|
[4949bda0] | 295 | directory that would otherwise be installed by the commands that follow.
|
---|
[355495ce] | 296 | </para>
|
---|
[32a8ca3] | 297 |
|
---|
[bf8ac01] | 298 | </sect2>
|
---|
[dc775a26] | 299 |
|
---|
[bf8ac01] | 300 | <sect2 role="content">
|
---|
| 301 | <title>Contents</title>
|
---|
[dc775a26] | 302 |
|
---|
[bf8ac01] | 303 | <segmentedlist>
|
---|
| 304 | <segtitle>Installed Programs</segtitle>
|
---|
| 305 | <segtitle>Installed Library</segtitle>
|
---|
| 306 | <segtitle>Installed Directories</segtitle>
|
---|
[dc775a26] | 307 |
|
---|
[bf8ac01] | 308 | <seglistitem>
|
---|
[355495ce] | 309 | <seg>
|
---|
[c18fd2e6] | 310 | curl and curl-config
|
---|
[355495ce] | 311 | </seg>
|
---|
| 312 | <seg>
|
---|
| 313 | libcurl.so
|
---|
| 314 | </seg>
|
---|
| 315 | <seg>
|
---|
| 316 | /usr/include/curl and
|
---|
| 317 | /usr/share/doc/curl-&curl-version;
|
---|
| 318 | </seg>
|
---|
[bf8ac01] | 319 | </seglistitem>
|
---|
| 320 | </segmentedlist>
|
---|
[dc775a26] | 321 |
|
---|
[bf8ac01] | 322 | <variablelist>
|
---|
| 323 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 324 | <?dbfo list-presentation="list"?>
|
---|
| 325 | <?dbhtml list-presentation="table"?>
|
---|
[dc775a26] | 326 |
|
---|
[bf8ac01] | 327 | <varlistentry id="curl-prog">
|
---|
| 328 | <term><command>curl</command></term>
|
---|
| 329 | <listitem>
|
---|
[355495ce] | 330 | <para>
|
---|
| 331 | is a command line tool for transferring files with URL syntax.
|
---|
[32a8ca3] | 332 | </para>
|
---|
[bf8ac01] | 333 | <indexterm zone="curl curl-prog">
|
---|
| 334 | <primary sortas="b-curl">curl</primary>
|
---|
| 335 | </indexterm>
|
---|
| 336 | </listitem>
|
---|
| 337 | </varlistentry>
|
---|
[dc775a26] | 338 |
|
---|
[bf8ac01] | 339 | <varlistentry id="curl-config">
|
---|
| 340 | <term><command>curl-config</command></term>
|
---|
| 341 | <listitem>
|
---|
[355495ce] | 342 | <para>
|
---|
| 343 | prints information about the last compile, like libraries
|
---|
| 344 | linked to and prefix setting.
|
---|
| 345 | </para>
|
---|
[bf8ac01] | 346 | <indexterm zone="curl curl-config">
|
---|
| 347 | <primary sortas="b-curl-config">curl-config</primary>
|
---|
| 348 | </indexterm>
|
---|
| 349 | </listitem>
|
---|
| 350 | </varlistentry>
|
---|
[dc775a26] | 351 |
|
---|
[bf8ac01] | 352 | <varlistentry id="libcurl">
|
---|
[874fec7f] | 353 | <term><filename class="libraryfile">libcurl.so</filename></term>
|
---|
[bf8ac01] | 354 | <listitem>
|
---|
[355495ce] | 355 | <para>
|
---|
| 356 | provides the API functions required by
|
---|
| 357 | <command>curl</command> and other programs.
|
---|
| 358 | </para>
|
---|
[bf8ac01] | 359 | <indexterm zone="curl libcurl">
|
---|
[874fec7f] | 360 | <primary sortas="c-libcurl">libcurl.so</primary>
|
---|
[bf8ac01] | 361 | </indexterm>
|
---|
| 362 | </listitem>
|
---|
| 363 | </varlistentry>
|
---|
[355495ce] | 364 |
|
---|
[bf8ac01] | 365 | </variablelist>
|
---|
[355495ce] | 366 |
|
---|
[bf8ac01] | 367 | </sect2>
|
---|
[355495ce] | 368 |
|
---|
[f45b1953] | 369 | </sect1>
|
---|