[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 |
|
---|
[b5969599] | 7 | <!ENTITY curl-download-http "https://curl.haxx.se/download/curl-&curl-version;.tar.lzma">
|
---|
[2b8421c] | 8 | <!ENTITY curl-download-ftp " ">
|
---|
[8ffdb08] | 9 | <!ENTITY curl-md5sum "3cf2de0ca4ac43e59067eb6b4f876982">
|
---|
[a08727f] | 10 | <!ENTITY curl-size "2.0 MB">
|
---|
[8ffdb08] | 11 | <!ENTITY curl-buildsize "37 MB (additional 10 MB for tests)">
|
---|
| 12 | <!ENTITY curl-time "0.4 SBU (additional 11.5 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 |
|
---|
[63e8fcf9] | 41 | &lfs80_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 |
|
---|
[cb6f557] | 77 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 78 | <itemizedlist spacing="compact">
|
---|
| 79 | <listitem>
|
---|
| 80 | <para>
|
---|
| 81 | Required patch:
|
---|
| 82 | <ulink url="&patch-root;/curl-&curl-version;-valgrind_filter-1.patch"/>
|
---|
| 83 | </para>
|
---|
| 84 | </listitem>
|
---|
| 85 | </itemizedlist>
|
---|
| 86 |
|
---|
[3e89149] | 87 | <bridgehead renderas="sect3">cURL Dependencies</bridgehead>
|
---|
[dc775a26] | 88 |
|
---|
[355495ce] | 89 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 90 | <para role="recommended">
|
---|
[b2d0e3d] | 91 | <xref linkend="cacerts"/> (runtime) and
|
---|
[2eb903f] | 92 | <xref linkend="openssl"/>
|
---|
[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"/>,
|
---|
[355495ce] | 99 | <xref linkend="mitkrb"/>,
|
---|
[0c702b61] | 100 | <xref linkend="nghttp2"/>,
|
---|
[fad8db2] | 101 | <xref linkend="openldap"/>,
|
---|
[4949bda0] | 102 | <xref linkend="samba"/>,
|
---|
[e519fef] | 103 | <ulink url="https://www.gnu.org/software/libidn/#libidn2/">libidn2</ulink>,
|
---|
[fad8db2] | 104 | <ulink url="https://launchpad.net/libmetalink/">libmetalink</ulink>,
|
---|
[67cc05e] | 105 | <ulink url="https://github.com/rockdaboot/libpsl">libpsl</ulink>,
|
---|
| 106 | <ulink url="http://rtmpdump.mplayerhq.hu/">librtmp</ulink>,
|
---|
[551baf16] | 107 | <ulink url="http://www.libssh2.org">libssh2</ulink>,
|
---|
| 108 | <ulink url="https://tls.mbed.org/">mbed TLS (formerly known as
|
---|
| 109 | PolarSSL)</ulink>, and
|
---|
[2ca3997] | 110 | <ulink url="http://spnego.sourceforge.net/">
|
---|
[355495ce] | 111 | SPNEGO</ulink>
|
---|
| 112 | </para>
|
---|
| 113 |
|
---|
| 114 | <bridgehead renderas="sect4">Optional for Running the Test Suite</bridgehead>
|
---|
| 115 | <para role="optional">
|
---|
[f346a49] | 116 | <xref linkend="stunnel"/> (for the HTTPS and FTPS tests) and
|
---|
| 117 | <xref linkend="valgrind"/>
|
---|
[355495ce] | 118 | </para>
|
---|
[c5e7d76] | 119 |
|
---|
[061ec9d] | 120 | <para condition="html" role="usernotes">User Notes:
|
---|
[355495ce] | 121 | <ulink url="&blfs-wiki;/curl"/>
|
---|
| 122 | </para>
|
---|
[bf8ac01] | 123 | </sect2>
|
---|
[dc775a26] | 124 |
|
---|
[bf8ac01] | 125 | <sect2 role="installation">
|
---|
[3e89149] | 126 | <title>Installation of cURL</title>
|
---|
[dc775a26] | 127 |
|
---|
[355495ce] | 128 | <para>
|
---|
| 129 | Install <application>cURL</application> by running the following
|
---|
| 130 | commands:
|
---|
| 131 | </para>
|
---|
[dc775a26] | 132 |
|
---|
[cb6f557] | 133 | <screen><userinput>patch -Np1 -i ../curl-&curl-version;-valgrind_filter-1.patch &&
|
---|
[8ffdb08] | 134 |
|
---|
[cb6f557] | 135 | ./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 | <!--
|
---|
| 142 | For version 7.54.0 I got:
|
---|
| 143 | TESTDONE: 893 tests out of 893 reported OK: 100%
|
---|
| 144 | TESTDONE: 1082 tests were considered during 1231 seconds.
|
---|
| 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>
|
---|
[8ffdb08] | 151 | -->
|
---|
| 152 | <note>
|
---|
| 153 | <para>
|
---|
| 154 | To run the tests for this package, valgrind requires a version of the
|
---|
| 155 | /lib/ld-2.23.so (or later) library with debugging symbols present.
|
---|
| 156 | Normally in LFS these debugging symbols are stripped at the end of
|
---|
| 157 | Chapter 6. To get this library, glibc must be rebuilt with the current
|
---|
| 158 | glibc version using the same compiler that was used to build LFS. The
|
---|
| 159 | ld-2.23.so can then be renamed to ld-2.23.so.dbg and copied to /lib. Then
|
---|
| 160 | a symlink needs to be changed:
|
---|
| 161 | </para>
|
---|
| 162 |
|
---|
| 163 | <screen role="nodump"><userinput>ln -sfv ld-2.23.so.dbg /lib/ld-linux-x86-64.so.2</userinput></screen>
|
---|
| 164 |
|
---|
| 165 | <para>
|
---|
| 166 | Adjust the above instruction as needed for a 32-bit system
|
---|
[e4ca0af7] | 167 | or for a different version of glibc.
|
---|
[8ffdb08] | 168 | </para>
|
---|
| 169 | </note>
|
---|
[ffa8c7f] | 170 |
|
---|
| 171 | <para>
|
---|
[8ffdb08] | 172 | To run the test suite, issue: <command>make test</command>.
|
---|
[2ca3997] | 173 | </para>
|
---|
[f346a49] | 174 |
|
---|
[355495ce] | 175 | <para>
|
---|
| 176 | Now, as the <systemitem class="username">root</systemitem>
|
---|
| 177 | user:
|
---|
| 178 | </para>
|
---|
[dc775a26] | 179 |
|
---|
[874fec7f] | 180 | <screen role="root"><userinput>make install &&
|
---|
[5ee1266] | 181 |
|
---|
[b5969599] | 182 | rm -rf docs/examples/.deps &&
|
---|
| 183 |
|
---|
[5ee1266] | 184 | find docs \( -name Makefile\* \
|
---|
| 185 | -o -name \*.1 \
|
---|
| 186 | -o -name \*.3 \) \
|
---|
| 187 | -exec rm {} \; &&
|
---|
[e4ca0af7] | 188 | install -v -d -m755 /usr/share/doc/curl-&curl-version; &&
|
---|
[d832a872] | 189 | cp -v -R docs/* /usr/share/doc/curl-&curl-version;</userinput></screen>
|
---|
[0c02dcb] | 190 |
|
---|
| 191 | <para>
|
---|
| 192 | Simple tests to the new installed <command>curl</command>:
|
---|
| 193 | <command>curl --trace-ascii debugdump.txt http://www.example.com/</command>
|
---|
| 194 | and
|
---|
| 195 | <command>curl --trace-ascii d.txt --trace-time http://example.com/</command>.
|
---|
| 196 | Inspect the locally created trace files <filename>debugdump.txt</filename>
|
---|
| 197 | and <filename>d.txt</filename>, which contain version downloaded
|
---|
| 198 | files information, etc. One file has the time for each action logged.
|
---|
| 199 | </para>
|
---|
[bf8ac01] | 200 | </sect2>
|
---|
[dc775a26] | 201 |
|
---|
[bf8ac01] | 202 | <sect2 role="commands">
|
---|
| 203 | <title>Command Explanations</title>
|
---|
[dc775a26] | 204 |
|
---|
[c627795] | 205 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 206 | href="../../xincludes/static-libraries.xml"/>
|
---|
[5ee1266] | 207 |
|
---|
[fdd7a91] | 208 | <para>
|
---|
| 209 | <parameter>--enable-threaded-resolver</parameter>: This switch enables
|
---|
| 210 | <application>cURL</application>'s builtin threaded DNS resolver.
|
---|
| 211 | </para>
|
---|
| 212 |
|
---|
[30b7db74] | 213 | <para>
|
---|
[038b4c75] | 214 | <parameter>--with-ca-path=/etc/ssl/certs</parameter>: This
|
---|
| 215 | switch sets the location of the BLFS <xref linkend="cacerts"/>.
|
---|
[30b7db74] | 216 | </para>
|
---|
| 217 |
|
---|
[355495ce] | 218 | <para>
|
---|
| 219 | <option>--with-gssapi</option>: This parameter adds
|
---|
| 220 | <application>Kerberos 5</application> support to
|
---|
| 221 | <filename class="libraryfile">libcurl</filename>.
|
---|
| 222 | </para>
|
---|
| 223 |
|
---|
| 224 | <para>
|
---|
| 225 | <option>--without-ssl --with-gnutls</option>: Use to
|
---|
| 226 | build with <application>GnuTLS</application> support
|
---|
| 227 | instead of <application>OpenSSL</application> for SSL/TLS.
|
---|
| 228 | </para>
|
---|
[b834dfc7] | 229 |
|
---|
[038b4c75] | 230 | <para>
|
---|
[0e29df6] | 231 | <option>--with-ca-bundle=/etc/ssl/ca-bundle.crt</option>: Use
|
---|
[038b4c75] | 232 | this switch instead of <parameter>--with-ca-path</parameter> if
|
---|
| 233 | building with <application>GnuTLS</application> support
|
---|
| 234 | instead of <application>OpenSSL</application> for SSL/TLS.
|
---|
| 235 | </para>
|
---|
| 236 |
|
---|
[355495ce] | 237 | <para>
|
---|
[5ee1266] | 238 | <command>find docs ... -exec rm {} \;</command>: This command removes
|
---|
[355495ce] | 239 | <filename>Makefiles</filename> and man files from the documentation
|
---|
[4949bda0] | 240 | directory that would otherwise be installed by the commands that follow.
|
---|
[355495ce] | 241 | </para>
|
---|
[32a8ca3] | 242 |
|
---|
[bf8ac01] | 243 | </sect2>
|
---|
[dc775a26] | 244 |
|
---|
[bf8ac01] | 245 | <sect2 role="content">
|
---|
| 246 | <title>Contents</title>
|
---|
[dc775a26] | 247 |
|
---|
[bf8ac01] | 248 | <segmentedlist>
|
---|
| 249 | <segtitle>Installed Programs</segtitle>
|
---|
| 250 | <segtitle>Installed Library</segtitle>
|
---|
| 251 | <segtitle>Installed Directories</segtitle>
|
---|
[dc775a26] | 252 |
|
---|
[bf8ac01] | 253 | <seglistitem>
|
---|
[355495ce] | 254 | <seg>
|
---|
[038b4c75] | 255 | curl, and curl-config
|
---|
[355495ce] | 256 | </seg>
|
---|
| 257 | <seg>
|
---|
| 258 | libcurl.so
|
---|
| 259 | </seg>
|
---|
| 260 | <seg>
|
---|
| 261 | /usr/include/curl and
|
---|
| 262 | /usr/share/doc/curl-&curl-version;
|
---|
| 263 | </seg>
|
---|
[bf8ac01] | 264 | </seglistitem>
|
---|
| 265 | </segmentedlist>
|
---|
[dc775a26] | 266 |
|
---|
[bf8ac01] | 267 | <variablelist>
|
---|
| 268 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 269 | <?dbfo list-presentation="list"?>
|
---|
| 270 | <?dbhtml list-presentation="table"?>
|
---|
[dc775a26] | 271 |
|
---|
[bf8ac01] | 272 | <varlistentry id="curl-prog">
|
---|
| 273 | <term><command>curl</command></term>
|
---|
| 274 | <listitem>
|
---|
[355495ce] | 275 | <para>
|
---|
| 276 | is a command line tool for transferring files with URL syntax.
|
---|
[32a8ca3] | 277 | </para>
|
---|
[bf8ac01] | 278 | <indexterm zone="curl curl-prog">
|
---|
| 279 | <primary sortas="b-curl">curl</primary>
|
---|
| 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
[dc775a26] | 283 |
|
---|
[bf8ac01] | 284 | <varlistentry id="curl-config">
|
---|
| 285 | <term><command>curl-config</command></term>
|
---|
| 286 | <listitem>
|
---|
[355495ce] | 287 | <para>
|
---|
| 288 | prints information about the last compile, like libraries
|
---|
| 289 | linked to and prefix setting.
|
---|
| 290 | </para>
|
---|
[bf8ac01] | 291 | <indexterm zone="curl curl-config">
|
---|
| 292 | <primary sortas="b-curl-config">curl-config</primary>
|
---|
| 293 | </indexterm>
|
---|
| 294 | </listitem>
|
---|
| 295 | </varlistentry>
|
---|
[dc775a26] | 296 |
|
---|
[bf8ac01] | 297 | <varlistentry id="libcurl">
|
---|
[874fec7f] | 298 | <term><filename class="libraryfile">libcurl.so</filename></term>
|
---|
[bf8ac01] | 299 | <listitem>
|
---|
[355495ce] | 300 | <para>
|
---|
| 301 | provides the API functions required by
|
---|
| 302 | <command>curl</command> and other programs.
|
---|
| 303 | </para>
|
---|
[bf8ac01] | 304 | <indexterm zone="curl libcurl">
|
---|
[874fec7f] | 305 | <primary sortas="c-libcurl">libcurl.so</primary>
|
---|
[bf8ac01] | 306 | </indexterm>
|
---|
| 307 | </listitem>
|
---|
| 308 | </varlistentry>
|
---|
[355495ce] | 309 |
|
---|
[bf8ac01] | 310 | </variablelist>
|
---|
[355495ce] | 311 |
|
---|
[bf8ac01] | 312 | </sect2>
|
---|
[355495ce] | 313 |
|
---|
[f45b1953] | 314 | </sect1>
|
---|