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