[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 |
|
---|
[248a536] | 7 | <!ENTITY curl-download-http "http://curl.haxx.se/download/curl-&curl-version;.tar.lzma">
|
---|
[2b8421c] | 8 | <!ENTITY curl-download-ftp " ">
|
---|
[aaa73cfd] | 9 | <!ENTITY curl-md5sum "c9a0a77f71fdc6b0f925bc3e79eb77f6">
|
---|
[0c02dcb] | 10 | <!ENTITY curl-size "2.7 MB">
|
---|
[aaa73cfd] | 11 | <!ENTITY curl-buildsize "36 MB (additional 16 MB for tests)">
|
---|
| 12 | <!ENTITY curl-time "0.3 SBU (additional 10.3 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>
|
---|
[4fcead9] | 33 | The <application>cURL</application> package contains a 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 |
|
---|
[7ec42f5] | 41 | &lfs78_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">
|
---|
| 81 | <xref linkend="cacerts"/> and
|
---|
| 82 | <xref linkend="openssl"/> or <xref linkend="gnutls"/>
|
---|
| 83 | </para>
|
---|
| 84 |
|
---|
[bf8ac01] | 85 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[355495ce] | 86 | <para role="optional">
|
---|
| 87 | <xref linkend="libidn"/>,
|
---|
| 88 | <xref linkend="mitkrb"/>,
|
---|
[fad8db2] | 89 | <xref linkend="openldap"/>,
|
---|
[4949bda0] | 90 | <xref linkend="samba"/>,
|
---|
[fad8db2] | 91 | <ulink url="http://daniel.haxx.se/projects/c-ares/">c-ares</ulink>,
|
---|
| 92 | <ulink url="https://launchpad.net/libmetalink/">libmetalink</ulink>,
|
---|
| 93 | <ulink url="http://www.libssh2.org">libssh2</ulink>, and
|
---|
[2ca3997] | 94 | <ulink url="http://spnego.sourceforge.net/">
|
---|
[355495ce] | 95 | SPNEGO</ulink>
|
---|
| 96 | </para>
|
---|
| 97 |
|
---|
| 98 | <bridgehead renderas="sect4">Optional for Running the Test Suite</bridgehead>
|
---|
| 99 | <para role="optional">
|
---|
[f346a49] | 100 | <xref linkend="stunnel"/> (for the HTTPS and FTPS tests) and
|
---|
| 101 | <xref linkend="valgrind"/>
|
---|
[355495ce] | 102 | </para>
|
---|
[c5e7d76] | 103 |
|
---|
[061ec9d] | 104 | <para condition="html" role="usernotes">User Notes:
|
---|
[355495ce] | 105 | <ulink url="&blfs-wiki;/curl"/>
|
---|
| 106 | </para>
|
---|
[bf8ac01] | 107 | </sect2>
|
---|
[dc775a26] | 108 |
|
---|
[bf8ac01] | 109 | <sect2 role="installation">
|
---|
[3e89149] | 110 | <title>Installation of cURL</title>
|
---|
[dc775a26] | 111 |
|
---|
[355495ce] | 112 | <para>
|
---|
| 113 | Install <application>cURL</application> by running the following
|
---|
| 114 | commands:
|
---|
| 115 | </para>
|
---|
[dc775a26] | 116 |
|
---|
[f25b43cb] | 117 | <screen><userinput>./configure --prefix=/usr \
|
---|
[fdd7a91] | 118 | --disable-static \
|
---|
[b9e1a58] | 119 | --enable-threaded-resolver &&
|
---|
[bf8ac01] | 120 | make</userinput></screen>
|
---|
[dc775a26] | 121 |
|
---|
[ffa8c7f] | 122 | <!-- <para>
|
---|
[2ca3997] | 123 | Running the test suite is optional. About 2% of the tests fail. Increase
|
---|
| 124 | in test time by each failed test is about 10%. Tests SBU above was
|
---|
| 125 | obtained disabling failing tests, with:
|
---|
[355495ce] | 126 | </para>
|
---|
[dc775a26] | 127 |
|
---|
[f346a49] | 128 | <screen><userinput>cat >> tests/data/DISABLED << "EOF"
|
---|
[2ca3997] | 129 | <literal>564
|
---|
| 130 | 700
|
---|
| 131 | 701
|
---|
| 132 | 703
|
---|
| 133 | 706
|
---|
| 134 | 707
|
---|
| 135 | 708
|
---|
| 136 | 709
|
---|
| 137 | 710
|
---|
| 138 | 711
|
---|
[4949bda0] | 139 | 712</literal>
|
---|
[2ca3997] | 140 | EOF</userinput></screen>
|
---|
| 141 |
|
---|
[aaa73cfd] | 142 | I had the following fail:
|
---|
| 143 | 300 301 303 304 306 309 310 311 312 325
|
---|
| 144 | 400 401 403 406 407 408 409 560 1112 2034
|
---|
| 145 | 2035 2037 2038 2041 2042
|
---|
| 146 |
|
---|
| 147 | - Bruce 20151016
|
---|
| 148 |
|
---|
| 149 | Tests may be using capabilites removed from recent ssh due to
|
---|
| 150 | security issues.
|
---|
| 151 |
|
---|
| 152 |
|
---|
[2ca3997] | 153 | <para>
|
---|
| 154 | and running <command>make test</command>.
|
---|
[ffa8c7f] | 155 | </para>-->
|
---|
| 156 |
|
---|
| 157 | <para>
|
---|
[aaa73cfd] | 158 | To run the test suite, issue: <command>make test</command>. Some
|
---|
| 159 | tests (up to 2%) may fail due to timing issues, kernel configuration,
|
---|
| 160 | or other issues.
|
---|
[2ca3997] | 161 | </para>
|
---|
[f346a49] | 162 |
|
---|
[355495ce] | 163 | <para>
|
---|
| 164 | Now, as the <systemitem class="username">root</systemitem>
|
---|
| 165 | user:
|
---|
| 166 | </para>
|
---|
[dc775a26] | 167 |
|
---|
[874fec7f] | 168 | <screen role="root"><userinput>make install &&
|
---|
[5ee1266] | 169 |
|
---|
| 170 | find docs \( -name Makefile\* \
|
---|
| 171 | -o -name \*.1 \
|
---|
| 172 | -o -name \*.3 \) \
|
---|
| 173 | -exec rm {} \; &&
|
---|
[951fac10] | 174 | install -v -d -m755 /usr/share/doc/curl-&curl-version; &&
|
---|
[ad426ac] | 175 | cp -v -R docs/* /usr/share/doc/curl-&curl-version;</userinput></screen>
|
---|
[0c02dcb] | 176 |
|
---|
| 177 | <para>
|
---|
| 178 | Simple tests to the new installed <command>curl</command>:
|
---|
| 179 | <command>curl --trace-ascii debugdump.txt http://www.example.com/</command>
|
---|
| 180 | and
|
---|
| 181 | <command>curl --trace-ascii d.txt --trace-time http://example.com/</command>.
|
---|
| 182 | Inspect the locally created trace files <filename>debugdump.txt</filename>
|
---|
| 183 | and <filename>d.txt</filename>, which contain version downloaded
|
---|
| 184 | files information, etc. One file has the time for each action logged.
|
---|
| 185 | </para>
|
---|
[bf8ac01] | 186 | </sect2>
|
---|
[dc775a26] | 187 |
|
---|
[bf8ac01] | 188 | <sect2 role="commands">
|
---|
| 189 | <title>Command Explanations</title>
|
---|
[dc775a26] | 190 |
|
---|
[c627795] | 191 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 192 | href="../../xincludes/static-libraries.xml"/>
|
---|
[5ee1266] | 193 |
|
---|
[fdd7a91] | 194 | <para>
|
---|
| 195 | <parameter>--enable-threaded-resolver</parameter>: This switch enables
|
---|
| 196 | <application>cURL</application>'s builtin threaded DNS resolver.
|
---|
| 197 | </para>
|
---|
| 198 |
|
---|
[355495ce] | 199 | <para>
|
---|
| 200 | <option>--with-gssapi</option>: This parameter adds
|
---|
| 201 | <application>Kerberos 5</application> support to
|
---|
| 202 | <filename class="libraryfile">libcurl</filename>.
|
---|
| 203 | </para>
|
---|
| 204 |
|
---|
| 205 | <para>
|
---|
| 206 | <option>--without-ssl --with-gnutls</option>: Use to
|
---|
| 207 | build with <application>GnuTLS</application> support
|
---|
| 208 | instead of <application>OpenSSL</application> for SSL/TLS.
|
---|
| 209 | </para>
|
---|
[b834dfc7] | 210 |
|
---|
[355495ce] | 211 | <para>
|
---|
[5ee1266] | 212 | <command>find docs ... -exec rm {} \;</command>: This command removes
|
---|
[355495ce] | 213 | <filename>Makefiles</filename> and man files from the documentation
|
---|
[4949bda0] | 214 | directory that would otherwise be installed by the commands that follow.
|
---|
[355495ce] | 215 | </para>
|
---|
[32a8ca3] | 216 |
|
---|
[bf8ac01] | 217 | </sect2>
|
---|
[dc775a26] | 218 |
|
---|
[bf8ac01] | 219 | <sect2 role="content">
|
---|
| 220 | <title>Contents</title>
|
---|
[dc775a26] | 221 |
|
---|
[bf8ac01] | 222 | <segmentedlist>
|
---|
| 223 | <segtitle>Installed Programs</segtitle>
|
---|
| 224 | <segtitle>Installed Library</segtitle>
|
---|
| 225 | <segtitle>Installed Directories</segtitle>
|
---|
[dc775a26] | 226 |
|
---|
[bf8ac01] | 227 | <seglistitem>
|
---|
[355495ce] | 228 | <seg>
|
---|
| 229 | curl and curl-config
|
---|
| 230 | </seg>
|
---|
| 231 | <seg>
|
---|
| 232 | libcurl.so
|
---|
| 233 | </seg>
|
---|
| 234 | <seg>
|
---|
| 235 | /usr/include/curl and
|
---|
| 236 | /usr/share/doc/curl-&curl-version;
|
---|
| 237 | </seg>
|
---|
[bf8ac01] | 238 | </seglistitem>
|
---|
| 239 | </segmentedlist>
|
---|
[dc775a26] | 240 |
|
---|
[bf8ac01] | 241 | <variablelist>
|
---|
| 242 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 243 | <?dbfo list-presentation="list"?>
|
---|
| 244 | <?dbhtml list-presentation="table"?>
|
---|
[dc775a26] | 245 |
|
---|
[bf8ac01] | 246 | <varlistentry id="curl-prog">
|
---|
| 247 | <term><command>curl</command></term>
|
---|
| 248 | <listitem>
|
---|
[355495ce] | 249 | <para>
|
---|
| 250 | is a command line tool for transferring files with URL syntax.
|
---|
[32a8ca3] | 251 | </para>
|
---|
[bf8ac01] | 252 | <indexterm zone="curl curl-prog">
|
---|
| 253 | <primary sortas="b-curl">curl</primary>
|
---|
| 254 | </indexterm>
|
---|
| 255 | </listitem>
|
---|
| 256 | </varlistentry>
|
---|
[dc775a26] | 257 |
|
---|
[bf8ac01] | 258 | <varlistentry id="curl-config">
|
---|
| 259 | <term><command>curl-config</command></term>
|
---|
| 260 | <listitem>
|
---|
[355495ce] | 261 | <para>
|
---|
| 262 | prints information about the last compile, like libraries
|
---|
| 263 | linked to and prefix setting.
|
---|
| 264 | </para>
|
---|
[bf8ac01] | 265 | <indexterm zone="curl curl-config">
|
---|
| 266 | <primary sortas="b-curl-config">curl-config</primary>
|
---|
| 267 | </indexterm>
|
---|
| 268 | </listitem>
|
---|
| 269 | </varlistentry>
|
---|
[dc775a26] | 270 |
|
---|
[bf8ac01] | 271 | <varlistentry id="libcurl">
|
---|
[874fec7f] | 272 | <term><filename class="libraryfile">libcurl.so</filename></term>
|
---|
[bf8ac01] | 273 | <listitem>
|
---|
[355495ce] | 274 | <para>
|
---|
| 275 | provides the API functions required by
|
---|
| 276 | <command>curl</command> and other programs.
|
---|
| 277 | </para>
|
---|
[bf8ac01] | 278 | <indexterm zone="curl libcurl">
|
---|
[874fec7f] | 279 | <primary sortas="c-libcurl">libcurl.so</primary>
|
---|
[bf8ac01] | 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
[355495ce] | 283 |
|
---|
[bf8ac01] | 284 | </variablelist>
|
---|
[355495ce] | 285 |
|
---|
[bf8ac01] | 286 | </sect2>
|
---|
[355495ce] | 287 |
|
---|
[f45b1953] | 288 | </sect1>
|
---|