[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 " ">
|
---|
[85d14e15] | 9 | <!ENTITY curl-md5sum "a889cd11b4ae8794b7030472cb4df0a0">
|
---|
[5b62526] | 10 | <!ENTITY curl-size "2.2 MB">
|
---|
[85d14e15] | 11 | <!ENTITY curl-buildsize "38 MB (add 13 MB for tests)">
|
---|
| 12 | <!ENTITY curl-time "0.4 SBU (add 13 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 |
|
---|
[952c2494] | 41 | &lfs82_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 |
|
---|
[58d5000] | 77 | <!-- Tests seem to pass without any patch
|
---|
[cb6f557] | 78 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 79 | <itemizedlist spacing="compact">
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>
|
---|
| 82 | Required patch:
|
---|
| 83 | <ulink url="&patch-root;/curl-&curl-version;-valgrind_filter-1.patch"/>
|
---|
| 84 | </para>
|
---|
| 85 | </listitem>
|
---|
| 86 | </itemizedlist>
|
---|
[58d5000] | 87 | -->
|
---|
[3e89149] | 88 | <bridgehead renderas="sect3">cURL Dependencies</bridgehead>
|
---|
[dc775a26] | 89 |
|
---|
[355495ce] | 90 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 91 | <para role="recommended">
|
---|
[2198a32] | 92 | <xref role="runtime" linkend="make-ca"/> (runtime)
|
---|
[355495ce] | 93 | </para>
|
---|
| 94 |
|
---|
[bf8ac01] | 95 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[355495ce] | 96 | <para role="optional">
|
---|
[4464d405] | 97 | <xref linkend="c-ares"/>,
|
---|
[2eb903f] | 98 | <xref linkend="gnutls"/>,
|
---|
[531f138] | 99 | <xref linkend="libidn2"/>,
|
---|
[fee79e2] | 100 | <xref linkend="libssh2"/>,
|
---|
[355495ce] | 101 | <xref linkend="mitkrb"/>,
|
---|
[0c702b61] | 102 | <xref linkend="nghttp2"/>,
|
---|
[fad8db2] | 103 | <xref linkend="openldap"/>,
|
---|
[4949bda0] | 104 | <xref linkend="samba"/>,
|
---|
[fad8db2] | 105 | <ulink url="https://launchpad.net/libmetalink/">libmetalink</ulink>,
|
---|
[67cc05e] | 106 | <ulink url="https://github.com/rockdaboot/libpsl">libpsl</ulink>,
|
---|
| 107 | <ulink url="http://rtmpdump.mplayerhq.hu/">librtmp</ulink>,
|
---|
[4c3c7f43] | 108 | <ulink url="https://tls.mbed.org/">mbed TLS</ulink> (formerly known as
|
---|
| 109 | PolarSSL), and
|
---|
[c18fd2e6] | 110 | <ulink url="http://spnego.sourceforge.net/">SPNEGO</ulink>
|
---|
[355495ce] | 111 | </para>
|
---|
| 112 |
|
---|
[d714f22] | 113 | <bridgehead renderas="sect4">Optional if Running the Test Suite</bridgehead>
|
---|
[355495ce] | 114 | <para role="optional">
|
---|
[d714f22] | 115 | <!-- stunnel is still listed in the docs as required, but 7.58.0
|
---|
| 116 | tests completed happily without it, although the test for unit1323
|
---|
| 117 | reported that the tool set in the test case does not exist - ken -->
|
---|
[f346a49] | 118 | <xref linkend="stunnel"/> (for the HTTPS and FTPS tests) and
|
---|
[d714f22] | 119 | <xref linkend="valgrind"/> (this will slow the tests down)
|
---|
[355495ce] | 120 | </para>
|
---|
[c5e7d76] | 121 |
|
---|
[061ec9d] | 122 | <para condition="html" role="usernotes">User Notes:
|
---|
[355495ce] | 123 | <ulink url="&blfs-wiki;/curl"/>
|
---|
| 124 | </para>
|
---|
[bf8ac01] | 125 | </sect2>
|
---|
[dc775a26] | 126 |
|
---|
[bf8ac01] | 127 | <sect2 role="installation">
|
---|
[3e89149] | 128 | <title>Installation of cURL</title>
|
---|
[dc775a26] | 129 |
|
---|
[355495ce] | 130 | <para>
|
---|
| 131 | Install <application>cURL</application> by running the following
|
---|
| 132 | commands:
|
---|
| 133 | </para>
|
---|
[dc775a26] | 134 |
|
---|
[58d5000] | 135 | <screen><userinput>./configure --prefix=/usr \
|
---|
[30b7db74] | 136 | --disable-static \
|
---|
| 137 | --enable-threaded-resolver \
|
---|
[038b4c75] | 138 | --with-ca-path=/etc/ssl/certs &&
|
---|
[bf8ac01] | 139 | make</userinput></screen>
|
---|
[dc775a26] | 140 |
|
---|
[8ffdb08] | 141 | <!--
|
---|
[58d5000] | 142 | For version 7.54.1 I got:
|
---|
| 143 | TESTDONE: 869 tests out of 869 reported OK: 100%
|
---|
| 144 | TESTDONE: 1092 tests were considered during 1080 seconds
|
---|
[8ffdb08] | 145 |
|
---|
| 146 | <para>
|
---|
[2ca3997] | 147 | Running the test suite is optional. About 2% of the tests fail. Increase
|
---|
| 148 | in test time by each failed test is about 10%. Tests SBU above was
|
---|
| 149 | obtained disabling failing tests, with:
|
---|
[355495ce] | 150 | </para>
|
---|
[bfc3945] | 151 |
|
---|
| 152 | 2017-10-29 - bdubbs
|
---|
| 153 | For version 7.56.1 I had a lot of test failures which included long
|
---|
| 154 | timeouts. Could not determine the cause of the timeouts or failures,
|
---|
| 155 | but I was missing c-ares, MIT Kerberos, ldap, samba, and the six
|
---|
| 156 | external packages.
|
---|
[e024fe4] | 157 |
|
---|
| 158 | 2017-12-01 - bdubbs
|
---|
| 159 | Still a lot of test failures. I did have c-ares, Kerberos, and ldap
|
---|
| 160 | installed this time. Best guess is that servers are not available.
|
---|
[8ffdb08] | 161 | -->
|
---|
[ffa8c7f] | 162 |
|
---|
| 163 | <para>
|
---|
[85d14e15] | 164 | To run the test suite, issue: <command>make test</command>. Two (of 857) tests
|
---|
[6961e423] | 165 | fail for unknown reasons.<!--
|
---|
[c18fd2e6] | 166 | Added by Pierre for curl-7.59.0:
|
---|
| 167 | no stunnel, no valgrind, no options
|
---|
| 168 | Warning: smb server unexpectedly alive
|
---|
| 169 | Warning: dict server unexpectedly alive
|
---|
| 170 | TESTDONE: 950 tests out of 951 reported OK: 99%
|
---|
| 171 | TESTFAIL: These test cases failed: 1148
|
---|
| 172 | TESTDONE: 1189 tests were considered during 362 seconds.
|
---|
| 173 | __________
|
---|
| 174 |
|
---|
[d714f22] | 175 | if stunnel and valgrind are not installed, and also most options
|
---|
| 176 | (I had rtmpdump), the tests complete without problems.
|
---|
| 177 | Warning: smb server unexpectedly alive
|
---|
| 178 | Warning: dict server unexpectedly alive
|
---|
| 179 | TESTDONE: 938 tests out of 938 reported OK: 100%
|
---|
| 180 | TESTDONE: 1175 tests were considered during 355 seconds.
|
---|
| 181 | and no. I don't have smb - so commenting the rest of this:
|
---|
[5b62526] | 182 | To run the test suite, issue: <command>make test</command>. Many tests
|
---|
[e024fe4] | 183 | may fail that depend on optional dependencies that may not be installed
|
---|
| 184 | or upstream servers that may not be available, especially for tests
|
---|
| 185 | numbered 700 and above.
|
---|
[85d14e15] | 186 | Test time may be significantly increase due to hanging tests that fail. i
|
---|
| 187 | __________
|
---|
| 188 | Added by Bruce for curl-7.60.0:
|
---|
| 189 | TESTDONE: 957 tests out of 959 reported OK: 99%
|
---|
| 190 | TESTFAIL: These test cases failed: 1139 1140
|
---|
| 191 | TESTDONE: 1196 tests were considered during 1184 seconds.
|
---|
| 192 | From the logs, both appear to be ipv6 releated.
|
---|
| 193 | -->
|
---|
[2ca3997] | 194 | </para>
|
---|
[f346a49] | 195 |
|
---|
[355495ce] | 196 | <para>
|
---|
| 197 | Now, as the <systemitem class="username">root</systemitem>
|
---|
| 198 | user:
|
---|
| 199 | </para>
|
---|
[dc775a26] | 200 |
|
---|
[874fec7f] | 201 | <screen role="root"><userinput>make install &&
|
---|
[5ee1266] | 202 |
|
---|
[b5969599] | 203 | rm -rf docs/examples/.deps &&
|
---|
| 204 |
|
---|
[e024fe4] | 205 | find docs \( -name Makefile\* -o -name \*.1 -o -name \*.3 \) -exec rm {} \; &&
|
---|
| 206 |
|
---|
[e4ca0af7] | 207 | install -v -d -m755 /usr/share/doc/curl-&curl-version; &&
|
---|
[d832a872] | 208 | cp -v -R docs/* /usr/share/doc/curl-&curl-version;</userinput></screen>
|
---|
[0c02dcb] | 209 |
|
---|
| 210 | <para>
|
---|
| 211 | Simple tests to the new installed <command>curl</command>:
|
---|
| 212 | <command>curl --trace-ascii debugdump.txt http://www.example.com/</command>
|
---|
| 213 | and
|
---|
| 214 | <command>curl --trace-ascii d.txt --trace-time http://example.com/</command>.
|
---|
| 215 | Inspect the locally created trace files <filename>debugdump.txt</filename>
|
---|
| 216 | and <filename>d.txt</filename>, which contain version downloaded
|
---|
| 217 | files information, etc. One file has the time for each action logged.
|
---|
| 218 | </para>
|
---|
[bf8ac01] | 219 | </sect2>
|
---|
[dc775a26] | 220 |
|
---|
[bf8ac01] | 221 | <sect2 role="commands">
|
---|
| 222 | <title>Command Explanations</title>
|
---|
[dc775a26] | 223 |
|
---|
[c627795] | 224 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 225 | href="../../xincludes/static-libraries.xml"/>
|
---|
[5ee1266] | 226 |
|
---|
[fdd7a91] | 227 | <para>
|
---|
| 228 | <parameter>--enable-threaded-resolver</parameter>: This switch enables
|
---|
| 229 | <application>cURL</application>'s builtin threaded DNS resolver.
|
---|
| 230 | </para>
|
---|
| 231 |
|
---|
[30b7db74] | 232 | <para>
|
---|
[038b4c75] | 233 | <parameter>--with-ca-path=/etc/ssl/certs</parameter>: This
|
---|
[2198a32] | 234 | switch sets the location of the BLFS Certificate Authority store.
|
---|
[30b7db74] | 235 | </para>
|
---|
| 236 |
|
---|
[355495ce] | 237 | <para>
|
---|
| 238 | <option>--with-gssapi</option>: This parameter adds
|
---|
| 239 | <application>Kerberos 5</application> support to
|
---|
| 240 | <filename class="libraryfile">libcurl</filename>.
|
---|
| 241 | </para>
|
---|
| 242 |
|
---|
| 243 | <para>
|
---|
| 244 | <option>--without-ssl --with-gnutls</option>: Use to
|
---|
| 245 | build with <application>GnuTLS</application> support
|
---|
| 246 | instead of <application>OpenSSL</application> for SSL/TLS.
|
---|
| 247 | </para>
|
---|
[b834dfc7] | 248 |
|
---|
[038b4c75] | 249 | <para>
|
---|
[0e29df6] | 250 | <option>--with-ca-bundle=/etc/ssl/ca-bundle.crt</option>: Use
|
---|
[038b4c75] | 251 | this switch instead of <parameter>--with-ca-path</parameter> if
|
---|
| 252 | building with <application>GnuTLS</application> support
|
---|
| 253 | instead of <application>OpenSSL</application> for SSL/TLS.
|
---|
| 254 | </para>
|
---|
| 255 |
|
---|
[355495ce] | 256 | <para>
|
---|
[5ee1266] | 257 | <command>find docs ... -exec rm {} \;</command>: This command removes
|
---|
[355495ce] | 258 | <filename>Makefiles</filename> and man files from the documentation
|
---|
[4949bda0] | 259 | directory that would otherwise be installed by the commands that follow.
|
---|
[355495ce] | 260 | </para>
|
---|
[32a8ca3] | 261 |
|
---|
[bf8ac01] | 262 | </sect2>
|
---|
[dc775a26] | 263 |
|
---|
[bf8ac01] | 264 | <sect2 role="content">
|
---|
| 265 | <title>Contents</title>
|
---|
[dc775a26] | 266 |
|
---|
[bf8ac01] | 267 | <segmentedlist>
|
---|
| 268 | <segtitle>Installed Programs</segtitle>
|
---|
| 269 | <segtitle>Installed Library</segtitle>
|
---|
| 270 | <segtitle>Installed Directories</segtitle>
|
---|
[dc775a26] | 271 |
|
---|
[bf8ac01] | 272 | <seglistitem>
|
---|
[355495ce] | 273 | <seg>
|
---|
[c18fd2e6] | 274 | curl and curl-config
|
---|
[355495ce] | 275 | </seg>
|
---|
| 276 | <seg>
|
---|
| 277 | libcurl.so
|
---|
| 278 | </seg>
|
---|
| 279 | <seg>
|
---|
| 280 | /usr/include/curl and
|
---|
| 281 | /usr/share/doc/curl-&curl-version;
|
---|
| 282 | </seg>
|
---|
[bf8ac01] | 283 | </seglistitem>
|
---|
| 284 | </segmentedlist>
|
---|
[dc775a26] | 285 |
|
---|
[bf8ac01] | 286 | <variablelist>
|
---|
| 287 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 288 | <?dbfo list-presentation="list"?>
|
---|
| 289 | <?dbhtml list-presentation="table"?>
|
---|
[dc775a26] | 290 |
|
---|
[bf8ac01] | 291 | <varlistentry id="curl-prog">
|
---|
| 292 | <term><command>curl</command></term>
|
---|
| 293 | <listitem>
|
---|
[355495ce] | 294 | <para>
|
---|
| 295 | is a command line tool for transferring files with URL syntax.
|
---|
[32a8ca3] | 296 | </para>
|
---|
[bf8ac01] | 297 | <indexterm zone="curl curl-prog">
|
---|
| 298 | <primary sortas="b-curl">curl</primary>
|
---|
| 299 | </indexterm>
|
---|
| 300 | </listitem>
|
---|
| 301 | </varlistentry>
|
---|
[dc775a26] | 302 |
|
---|
[bf8ac01] | 303 | <varlistentry id="curl-config">
|
---|
| 304 | <term><command>curl-config</command></term>
|
---|
| 305 | <listitem>
|
---|
[355495ce] | 306 | <para>
|
---|
| 307 | prints information about the last compile, like libraries
|
---|
| 308 | linked to and prefix setting.
|
---|
| 309 | </para>
|
---|
[bf8ac01] | 310 | <indexterm zone="curl curl-config">
|
---|
| 311 | <primary sortas="b-curl-config">curl-config</primary>
|
---|
| 312 | </indexterm>
|
---|
| 313 | </listitem>
|
---|
| 314 | </varlistentry>
|
---|
[dc775a26] | 315 |
|
---|
[bf8ac01] | 316 | <varlistentry id="libcurl">
|
---|
[874fec7f] | 317 | <term><filename class="libraryfile">libcurl.so</filename></term>
|
---|
[bf8ac01] | 318 | <listitem>
|
---|
[355495ce] | 319 | <para>
|
---|
| 320 | provides the API functions required by
|
---|
| 321 | <command>curl</command> and other programs.
|
---|
| 322 | </para>
|
---|
[bf8ac01] | 323 | <indexterm zone="curl libcurl">
|
---|
[874fec7f] | 324 | <primary sortas="c-libcurl">libcurl.so</primary>
|
---|
[bf8ac01] | 325 | </indexterm>
|
---|
| 326 | </listitem>
|
---|
| 327 | </varlistentry>
|
---|
[355495ce] | 328 |
|
---|
[bf8ac01] | 329 | </variablelist>
|
---|
[355495ce] | 330 |
|
---|
[bf8ac01] | 331 | </sect2>
|
---|
[355495ce] | 332 |
|
---|
[f45b1953] | 333 | </sect1>
|
---|