From f6459cb1718d3f5c485a338210825c60942fdf2e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 8 Oct 2022 17:20:45 +0800 Subject: [PATCH] rust: chapter06: add openssl --- chapter06/chapter06.xml | 1 + chapter06/llvm-pass2.xml | 3 +- chapter06/openssl.xml | 94 ++++++++++++++++++++++++++++++++++++++++ packages.ent | 2 + 4 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 chapter06/openssl.xml 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 @@ + 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/* \ - <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; + + + OpenSSL + tools + + + + + + <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 + + Prepare OpenSSL for compilation: + +./config --prefix=/usr \ + --openssldir=/etc/ssl \ + --libdir=lib \ + --cross-compile-prefix=$LFS_TGT- \ + shared \ + linux-$(uname -m | sed 's/i[0-9]/x/') + + + The meaning of the configure options: + + + --cross-compile-prefix=$LFS_TGT- + + Cross compile the package with the tools of which the name + is prefixed with $LFS_TGT-. + + + + + linux-$(uname -m | sed 's/i[0-9]/x/') + + Specify the cross compile target. The + sed command guarantees + linux-x86 is selected for 32-bit x86. + + + + + Compile the package: + +make + + Install the package: + +sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile +make DESTDIR=$LFS MANSUFFIX=ssl install + + + + + + + <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">