mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-03 06:27:16 +08:00
326 lines
10 KiB
XML
326 lines
10 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY curl-download-http "https://curl.se/download/curl-&curl-version;.tar.xz">
|
|
<!ENTITY curl-download-ftp " ">
|
|
]>
|
|
|
|
<sect1 id="curl" xreflabel="cURL-&curl-version;">
|
|
<?dbhtml filename="curl.html"?>
|
|
|
|
|
|
<title>cURL-&curl-version;</title>
|
|
|
|
<indexterm zone="curl">
|
|
<primary sortas="a-cURL">cURL</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to cURL</title>
|
|
|
|
<para>
|
|
The <application>cURL</application> package contains an utility
|
|
and a library used for transferring files with URL syntax to any of
|
|
the following protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP,
|
|
HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTSP, SMB, SMBS,
|
|
SMTP, SMPTS, TELNET, and TFTP. Its ability to both download
|
|
and upload files can be incorporated into other programs to support
|
|
functions like streaming media.
|
|
</para>
|
|
|
|
&lfs121_checked;
|
|
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&curl-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download (FTP): <ulink url="&curl-download-ftp;"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<!--
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Required patch:
|
|
<ulink url="&patch-root;/curl-&curl-version;-function_naming-1.patch"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
-->
|
|
|
|
<bridgehead renderas="sect3">cURL Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="libpsl"/>
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
While there is an option to build the package without libpsl, both
|
|
the upstream developers, the BLFS, and GLFS editors alike highly
|
|
recommend not disabling support for libpsl due to severe security
|
|
implications.
|
|
</para>
|
|
</note>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of cURL</title>
|
|
|
|
<para>
|
|
Install <application>cURL</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
|
--disable-static \
|
|
--with-openssl \
|
|
--with-ca-path=/etc/ssl/certs &&
|
|
make</userinput></screen>
|
|
|
|
<!--
|
|
For version 7.54.1 I got:
|
|
TESTDONE: 869 tests out of 869 reported OK: 100%
|
|
TESTDONE: 1092 tests were considered during 1080 seconds
|
|
|
|
<para>
|
|
Running the test suite is optional. About 2% of the tests fail. Increase
|
|
in test time by each failed test is about 10%. Tests SBU above was
|
|
obtained disabling failing tests, with:
|
|
</para>
|
|
|
|
2017-10-29 - bdubbs
|
|
For version 7.56.1 I had a lot of test failures which included long
|
|
timeouts. Could not determine the cause of the timeouts or failures,
|
|
but I was missing c-ares, MIT Kerberos, ldap, samba, and the six
|
|
external packages.
|
|
|
|
2017-12-01 - bdubbs
|
|
Still a lot of test failures. I did have c-ares, Kerberos, and ldap
|
|
installed this time. Best guess is that servers are not available.
|
|
|
|
2018-08-01 - renodr
|
|
No test failures, but I didn't have any of the optional dependencies except
|
|
for c-ares and libidn2. I might re-run this test suite before release with
|
|
all of the optional deps, but right now, it isn't a priority - rather
|
|
the security fix is.
|
|
-->
|
|
|
|
<para>
|
|
To run the test suite, issue: <command>make test</command>.
|
|
<!--One test, <filename>1477</filename>, is known to fail due to
|
|
a missing file in the curl tarball.--> Some tests are flaky,
|
|
so if some tests have failed it's possible to
|
|
run a test again with: <command>(cd tests; ./runtests.pl
|
|
<replaceable><test ID></replaceable>)</command> (the ID of
|
|
failed tests are shown in the <quote><computeroutput>These test cases
|
|
failed:</computeroutput></quote> message). If you run the tests after
|
|
the package has been installed, some tests may fail because the man
|
|
pages were deleted by the 'find' command in the installation instructions
|
|
below.
|
|
</para>
|
|
|
|
<para>
|
|
Now, as the <systemitem class="username">root</systemitem>
|
|
user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
|
|
rm -rf docs/examples/.deps &&
|
|
|
|
find docs \( -name Makefile\* -o \
|
|
-name \*.1 -o \
|
|
-name \*.3 -o \
|
|
-name CMakeLists.txt \) -delete &&
|
|
|
|
cp -v -R docs -T /usr/share/doc/curl-&curl-version;</userinput></screen>
|
|
|
|
<para>
|
|
To run some simple verification tests on the newly installed
|
|
<command>curl</command>, issue the following commands:
|
|
<command>curl --trace-ascii debugdump.txt https://www.example.com/</command>
|
|
and
|
|
<command>curl --trace-ascii d.txt --trace-time https://example.com/</command>.
|
|
Inspect the locally created trace files <filename>debugdump.txt</filename>
|
|
and <filename>d.txt</filename>, which contains version information,
|
|
downloaded files information, etc. One file has the time for each action logged.
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
href="../../xincludes/static-libraries.xml"/>
|
|
|
|
<para>
|
|
<parameter>--with-ca-path=/etc/ssl/certs</parameter>: This
|
|
switch sets the location of the BLFS Certificate Authority store.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--with-openssl</parameter>: This parameter chooses
|
|
<application>OpenSSL</application> as SSL/TLS implementation.
|
|
This option is not needed if <option>--with-gnutls</option> is
|
|
selected instead.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-gssapi</option>: This parameter adds
|
|
<application>Kerberos 5</application> support to
|
|
<filename class="libraryfile">libcurl</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-gnutls</option>: Use this switch to
|
|
build with <application>GnuTLS</application> support
|
|
instead of <application>OpenSSL</application> for SSL/TLS. This requires
|
|
<xref linkend="gnutls"/> to be installed already.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt</option>: Use
|
|
this switch instead of <parameter>--with-ca-path</parameter> if
|
|
building with <application>GnuTLS</application> support
|
|
instead of <application>OpenSSL</application> for SSL/TLS.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-libssh2</option>: This parameter adds
|
|
<application>SSH</application> support to cURL. This is disabled
|
|
by default.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--enable-ares</option>: This parameter adds support for DNS
|
|
resolution through the c-ares library.
|
|
</para>
|
|
|
|
<para>
|
|
<command>find docs ... -exec rm {} \;</command>: This command removes
|
|
<filename>Makefiles</filename> and man files from the documentation
|
|
directory that would otherwise be installed by the commands that follow.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>32-bit Installation of cURL</title>
|
|
|
|
<note><para>
|
|
Like <xref linkend="nss"/>, cleaning the project tree doesn't work with
|
|
this package as expected and will lead to the 32-bit build to fail.
|
|
Remove the extracted folder from the tarball, extract the tarball, then
|
|
go back into it and follow the instructions below as normal.
|
|
</para></note>
|
|
|
|
<para>
|
|
Install <application>lib32-cURL</application>
|
|
by running the following commands:
|
|
</para>
|
|
|
|
<screen><userinput>CC="gcc -m32" CXX="g++ -m32" \
|
|
PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
|
|
./configure --prefix=/usr \
|
|
--libdir=/usr/lib32 \
|
|
--host=i686-pc-linux-gnu \
|
|
--disable-static \
|
|
--with-openssl \
|
|
--with-ca-path=/etc/ssl/certs &&
|
|
|
|
make</userinput></screen>
|
|
|
|
<para>
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make DESTDIR=$PWD/DESTDIR install
|
|
cp -vr DESTDIR/usr/lib32/* /usr/lib32
|
|
rm -rf DESTDIR
|
|
ldconfig</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Library</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>
|
|
curl and curl-config
|
|
</seg>
|
|
<seg>
|
|
libcurl.so
|
|
</seg>
|
|
<seg>
|
|
/usr/include/curl and
|
|
/usr/share/doc/curl-&curl-version;
|
|
</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="curl-prog">
|
|
<term><command>curl</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a command line tool for transferring files with URL syntax
|
|
</para>
|
|
<indexterm zone="curl curl-prog">
|
|
<primary sortas="b-curl">curl</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="curl-config">
|
|
<term><command>curl-config</command></term>
|
|
<listitem>
|
|
<para>
|
|
prints information about the last compile, like libraries
|
|
linked to and prefix setting
|
|
</para>
|
|
<indexterm zone="curl curl-config">
|
|
<primary sortas="b-curl-config">curl-config</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libcurl">
|
|
<term><filename class="libraryfile">libcurl.so</filename></term>
|
|
<listitem>
|
|
<para>
|
|
provides the API functions required by
|
|
<command>curl</command> and other programs
|
|
</para>
|
|
<indexterm zone="curl libcurl">
|
|
<primary sortas="c-libcurl">libcurl.so</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|