1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY curl-download-http "https://curl.haxx.se/download/curl-&curl-version;.tar.lzma">
|
---|
8 | <!ENTITY curl-download-ftp " ">
|
---|
9 | <!ENTITY curl-md5sum "1cfdda67835bede536c5934e58ba225d">
|
---|
10 | <!ENTITY curl-size "2.0 MB">
|
---|
11 | <!ENTITY curl-buildsize "39 MB (additional 11 MB for tests)">
|
---|
12 | <!ENTITY curl-time "0.4 SBU (additional 10.6 SBU for tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="curl" xreflabel="cURL-&curl-version;">
|
---|
16 | <?dbhtml filename="curl.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>cURL-&curl-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="curl">
|
---|
26 | <primary sortas="a-cURL">cURL</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to cURL</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | The <application>cURL</application> package contains an utility
|
---|
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.
|
---|
39 | </para>
|
---|
40 |
|
---|
41 | &lfs7a_checked;
|
---|
42 |
|
---|
43 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
44 | <itemizedlist spacing="compact">
|
---|
45 | <listitem>
|
---|
46 | <para>
|
---|
47 | Download (HTTP): <ulink url="&curl-download-http;"/>
|
---|
48 | </para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>
|
---|
52 | Download (FTP): <ulink url="&curl-download-ftp;"/>
|
---|
53 | </para>
|
---|
54 | </listitem>
|
---|
55 | <listitem>
|
---|
56 | <para>
|
---|
57 | Download MD5 sum: &curl-md5sum;
|
---|
58 | </para>
|
---|
59 | </listitem>
|
---|
60 | <listitem>
|
---|
61 | <para>
|
---|
62 | Download size: &curl-size;
|
---|
63 | </para>
|
---|
64 | </listitem>
|
---|
65 | <listitem>
|
---|
66 | <para>
|
---|
67 | Estimated disk space required: &curl-buildsize;
|
---|
68 | </para>
|
---|
69 | </listitem>
|
---|
70 | <listitem>
|
---|
71 | <para>
|
---|
72 | Estimated build time: &curl-time;
|
---|
73 | </para>
|
---|
74 | </listitem>
|
---|
75 | </itemizedlist>
|
---|
76 |
|
---|
77 | <bridgehead renderas="sect3">cURL Dependencies</bridgehead>
|
---|
78 |
|
---|
79 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
80 | <para role="recommended">
|
---|
81 | <xref linkend="cacerts"/> (runtime) and
|
---|
82 | <xref linkend="openssl"/> or <xref linkend="gnutls"/>
|
---|
83 | </para>
|
---|
84 |
|
---|
85 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
86 | <para role="optional">
|
---|
87 | <xref linkend="libidn"/>,
|
---|
88 | <xref linkend="mitkrb"/>,
|
---|
89 | <xref linkend="nghttp2"/>,
|
---|
90 | <xref linkend="openldap"/>,
|
---|
91 | <xref linkend="samba"/>,
|
---|
92 | <ulink url="http://daniel.haxx.se/projects/c-ares/">c-ares</ulink>,
|
---|
93 | <ulink url="https://www.gnu.org/software/libidn/#libidn2/">libidn2</ulink>,
|
---|
94 | <ulink url="https://launchpad.net/libmetalink/">libmetalink</ulink>,
|
---|
95 | <ulink url="https://github.com/rockdaboot/libpsl">libpsl</ulink>,
|
---|
96 | <ulink url="http://rtmpdump.mplayerhq.hu/">librtmp</ulink>,
|
---|
97 | <ulink url="http://www.libssh2.org">libssh2</ulink>,
|
---|
98 | <ulink url="https://tls.mbed.org/">mbed TLS (formerly known as
|
---|
99 | PolarSSL)</ulink>, and
|
---|
100 | <ulink url="http://spnego.sourceforge.net/">
|
---|
101 | SPNEGO</ulink>
|
---|
102 | </para>
|
---|
103 |
|
---|
104 | <bridgehead renderas="sect4">Optional for Running the Test Suite</bridgehead>
|
---|
105 | <para role="optional">
|
---|
106 | <xref linkend="stunnel"/> (for the HTTPS and FTPS tests) and
|
---|
107 | <xref linkend="valgrind"/>
|
---|
108 | </para>
|
---|
109 |
|
---|
110 | <para condition="html" role="usernotes">User Notes:
|
---|
111 | <ulink url="&blfs-wiki;/curl"/>
|
---|
112 | </para>
|
---|
113 | </sect2>
|
---|
114 |
|
---|
115 | <sect2 role="installation">
|
---|
116 | <title>Installation of cURL</title>
|
---|
117 |
|
---|
118 | <para>
|
---|
119 | Install <application>cURL</application> by running the following
|
---|
120 | commands:
|
---|
121 | </para>
|
---|
122 |
|
---|
123 | <screen><userinput>./configure --prefix=/usr \
|
---|
124 | --disable-static \
|
---|
125 | --enable-threaded-resolver \
|
---|
126 | --with-ca-path=/etc/ssl/certs &&
|
---|
127 | make</userinput></screen>
|
---|
128 |
|
---|
129 | <!-- <para>
|
---|
130 | Running the test suite is optional. About 2% of the tests fail. Increase
|
---|
131 | in test time by each failed test is about 10%. Tests SBU above was
|
---|
132 | obtained disabling failing tests, with:
|
---|
133 | </para>
|
---|
134 |
|
---|
135 | <screen><userinput>cat >> tests/data/DISABLED << "EOF"
|
---|
136 | <literal>564
|
---|
137 | 700
|
---|
138 | 701
|
---|
139 | 703
|
---|
140 | 706
|
---|
141 | 707
|
---|
142 | 708
|
---|
143 | 709
|
---|
144 | 710
|
---|
145 | 711
|
---|
146 | 712</literal>
|
---|
147 | EOF</userinput></screen>
|
---|
148 |
|
---|
149 | I had the following fail:
|
---|
150 | 300 301 303 304 306 309 310 311 312 325
|
---|
151 | 400 401 403 406 407 408 409 560 1112 2034
|
---|
152 | 2035 2037 2038 2041 2042
|
---|
153 |
|
---|
154 | - Bruce 20151016
|
---|
155 |
|
---|
156 | Tests may be using capabilites removed from recent ssh due to
|
---|
157 | security issues.
|
---|
158 |
|
---|
159 |
|
---|
160 | <para>
|
---|
161 | and running <command>make test</command>.
|
---|
162 | </para>-->
|
---|
163 |
|
---|
164 | <para>
|
---|
165 | To run the test suite, issue: <command>make test</command>. <!-- Two tests,
|
---|
166 | 1139 and 1140, may fail. Works fine for me. Douglas 20160720 --><!-- Some
|
---|
167 | tests (up to 2%) may fail due to timing issues, kernel configuration,
|
---|
168 | or other issues.-->
|
---|
169 | </para>
|
---|
170 |
|
---|
171 | <para>
|
---|
172 | Now, as the <systemitem class="username">root</systemitem>
|
---|
173 | user:
|
---|
174 | </para>
|
---|
175 |
|
---|
176 | <screen role="root"><userinput>make install &&
|
---|
177 |
|
---|
178 | rm -rf docs/examples/.deps &&
|
---|
179 |
|
---|
180 | find docs \( -name Makefile\* \
|
---|
181 | -o -name \*.1 \
|
---|
182 | -o -name \*.3 \) \
|
---|
183 | -exec rm {} \; &&
|
---|
184 | install -v -d -m755 /usr/share/doc/curl-&curl-version; &&
|
---|
185 | cp -v -R docs/* /usr/share/doc/curl-&curl-version;</userinput></screen>
|
---|
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>
|
---|
196 | </sect2>
|
---|
197 |
|
---|
198 | <sect2 role="commands">
|
---|
199 | <title>Command Explanations</title>
|
---|
200 |
|
---|
201 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
202 | href="../../xincludes/static-libraries.xml"/>
|
---|
203 |
|
---|
204 | <para>
|
---|
205 | <parameter>--enable-threaded-resolver</parameter>: This switch enables
|
---|
206 | <application>cURL</application>'s builtin threaded DNS resolver.
|
---|
207 | </para>
|
---|
208 |
|
---|
209 | <para>
|
---|
210 | <parameter>--with-ca-path=/etc/ssl/certs</parameter>: This
|
---|
211 | switch sets the location of the BLFS <xref linkend="cacerts"/>.
|
---|
212 | </para>
|
---|
213 |
|
---|
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>
|
---|
225 |
|
---|
226 | <para>
|
---|
227 | <option>--with-ca-bunlde=/etc/ssl/ca-bundle.crt</option>: Use
|
---|
228 | this switch instead of <parameter>--with-ca-path</parameter> if
|
---|
229 | building with <application>GnuTLS</application> support
|
---|
230 | instead of <application>OpenSSL</application> for SSL/TLS.
|
---|
231 | </para>
|
---|
232 |
|
---|
233 | <para>
|
---|
234 | <command>find docs ... -exec rm {} \;</command>: This command removes
|
---|
235 | <filename>Makefiles</filename> and man files from the documentation
|
---|
236 | directory that would otherwise be installed by the commands that follow.
|
---|
237 | </para>
|
---|
238 |
|
---|
239 | </sect2>
|
---|
240 |
|
---|
241 | <sect2 role="content">
|
---|
242 | <title>Contents</title>
|
---|
243 |
|
---|
244 | <segmentedlist>
|
---|
245 | <segtitle>Installed Programs</segtitle>
|
---|
246 | <segtitle>Installed Library</segtitle>
|
---|
247 | <segtitle>Installed Directories</segtitle>
|
---|
248 |
|
---|
249 | <seglistitem>
|
---|
250 | <seg>
|
---|
251 | curl, and curl-config
|
---|
252 | </seg>
|
---|
253 | <seg>
|
---|
254 | libcurl.so
|
---|
255 | </seg>
|
---|
256 | <seg>
|
---|
257 | /usr/include/curl and
|
---|
258 | /usr/share/doc/curl-&curl-version;
|
---|
259 | </seg>
|
---|
260 | </seglistitem>
|
---|
261 | </segmentedlist>
|
---|
262 |
|
---|
263 | <variablelist>
|
---|
264 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
265 | <?dbfo list-presentation="list"?>
|
---|
266 | <?dbhtml list-presentation="table"?>
|
---|
267 |
|
---|
268 | <varlistentry id="curl-prog">
|
---|
269 | <term><command>curl</command></term>
|
---|
270 | <listitem>
|
---|
271 | <para>
|
---|
272 | is a command line tool for transferring files with URL syntax.
|
---|
273 | </para>
|
---|
274 | <indexterm zone="curl curl-prog">
|
---|
275 | <primary sortas="b-curl">curl</primary>
|
---|
276 | </indexterm>
|
---|
277 | </listitem>
|
---|
278 | </varlistentry>
|
---|
279 |
|
---|
280 | <varlistentry id="curl-config">
|
---|
281 | <term><command>curl-config</command></term>
|
---|
282 | <listitem>
|
---|
283 | <para>
|
---|
284 | prints information about the last compile, like libraries
|
---|
285 | linked to and prefix setting.
|
---|
286 | </para>
|
---|
287 | <indexterm zone="curl curl-config">
|
---|
288 | <primary sortas="b-curl-config">curl-config</primary>
|
---|
289 | </indexterm>
|
---|
290 | </listitem>
|
---|
291 | </varlistentry>
|
---|
292 |
|
---|
293 | <varlistentry id="libcurl">
|
---|
294 | <term><filename class="libraryfile">libcurl.so</filename></term>
|
---|
295 | <listitem>
|
---|
296 | <para>
|
---|
297 | provides the API functions required by
|
---|
298 | <command>curl</command> and other programs.
|
---|
299 | </para>
|
---|
300 | <indexterm zone="curl libcurl">
|
---|
301 | <primary sortas="c-libcurl">libcurl.so</primary>
|
---|
302 | </indexterm>
|
---|
303 | </listitem>
|
---|
304 | </varlistentry>
|
---|
305 |
|
---|
306 | </variablelist>
|
---|
307 |
|
---|
308 | </sect2>
|
---|
309 |
|
---|
310 | </sect1>
|
---|