diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-10-08 17:20:45 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2022-10-09 19:52:19 +0800 |
commit | f6459cb1718d3f5c485a338210825c60942fdf2e (patch) | |
tree | 8f9adb4e3a9b2412116955301798e12b52c71f0e | |
parent | 0fa356f489274713dbb28b6cbc3485a8221be653 (diff) |
rust: chapter06: add openssl
-rw-r--r-- | chapter06/chapter06.xml | 1 | ||||
-rw-r--r-- | chapter06/llvm-pass2.xml | 3 | ||||
-rw-r--r-- | chapter06/openssl.xml | 94 | ||||
-rw-r--r-- | packages.ent | 2 |
4 files changed, 99 insertions, 1 deletions
diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 98cb8b4b6..27741424c 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -31,5 +31,6 @@ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="llvm-pass2.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/> </chapter> diff --git a/chapter06/llvm-pass2.xml b/chapter06/llvm-pass2.xml index e9023c132..b112fffe6 100644 --- a/chapter06/llvm-pass2.xml +++ b/chapter06/llvm-pass2.xml @@ -164,7 +164,8 @@ cp -av dest/$LFS/tools/$LFS_TGT/include/* \ <sect2 role="content"> <title/> - <para>Details on this package are located in TODO.</para> + <para>Details on this package are located in + <xref linkend="contents-openssl" role="."/></para> </sect2> </sect1> diff --git a/chapter06/openssl.xml b/chapter06/openssl.xml new file mode 100644 index 000000000..645a73259 --- /dev/null +++ b/chapter06/openssl.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!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; +]> + +<sect1 id="ch-tools-openssl" role="wrap"> + <?dbhtml filename="openssl.html"?> + + <sect1info condition="script"> + <productname>openssl</productname> + <productnumber>&openssl-version;</productnumber> + <address>&openssl-url;</address> + </sect1info> + + <title>OpenSSL-&openssl-version;</title> + + <indexterm zone="ch-tools-openssl"> + <primary sortas="a-OpenSSL">OpenSSL</primary> + <secondary>tools</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The OpenSSL package contains management tools and libraries relating + to cryptography. These are useful for providing cryptographic functions + to other packages, such as OpenSSH, email applications, and web browsers + (for accessing HTTPS sites). </para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&openssl-tmp-sbu;</seg> + <seg>&openssl-tmp-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of OpenSSL</title> + + <para>Prepare OpenSSL for compilation:</para> + +<screen><userinput remap="configure">./config --prefix=/usr \ + --openssldir=/etc/ssl \ + --libdir=lib \ + --cross-compile-prefix=$LFS_TGT- \ + shared \ + linux-$(uname -m | sed 's/i[0-9]/x/')</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--cross-compile-prefix=$LFS_TGT-</parameter></term> + <listitem> + <para>Cross compile the package with the tools of which the name + is prefixed with <envar>$LFS_TGT</envar><literal>-</literal>.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>linux-$(uname -m | sed 's/i[0-9]/x/')</parameter></term> + <listitem> + <para>Specify the cross compile target. The + <command>sed</command> command guarantees + <literal>linux-x86</literal> is selected for 32-bit x86.</para> + </listitem> + </varlistentry> + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile +make DESTDIR=$LFS MANSUFFIX=ssl install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in TODO.</para> + </sect2> + +</sect1> diff --git a/packages.ent b/packages.ent index 2dd891ae5..f62966edd 100644 --- a/packages.ent +++ b/packages.ent @@ -553,6 +553,8 @@ <!ENTITY openssl-url "https://www.openssl.org/source/openssl-&openssl-version;.tar.gz"> <!ENTITY openssl-md5 "163bb3e58c143793d1dc6a6ec7d185d5"> <!ENTITY openssl-home "https://www.openssl.org/"> +<!ENTITY openssl-tmp-du "476 MB"> +<!ENTITY openssl-tmp-sbu "5.0 SBU"> <!ENTITY openssl-fin-du "476 MB"> <!ENTITY openssl-fin-sbu "5.0 SBU"> |