From 8c48c9d2ee8078470c5d04427e8f376d4796af07 Mon Sep 17 00:00:00 2001 From: Zeckmathederg Date: Wed, 17 Apr 2024 21:04:26 -0600 Subject: [PATCH] Added Steam chapter and two dependencies --- index.xml | 1 + steam/deps/dps/dummy.xml | 11 + steam/deps/net/nspr.xml | 251 +++++++++++++ steam/deps/net/nss.xml | 487 ++++++++++++++++++++++++++ steam/{intro.xml => steamchapter.xml} | 8 +- steam/steamintro.xml | 23 ++ steam/steamtrblshoot.xml | 0 7 files changed, 777 insertions(+), 4 deletions(-) create mode 100644 steam/deps/dps/dummy.xml create mode 100644 steam/deps/net/nspr.xml create mode 100644 steam/deps/net/nss.xml rename steam/{intro.xml => steamchapter.xml} (52%) create mode 100644 steam/steamintro.xml create mode 100644 steam/steamtrblshoot.xml diff --git a/index.xml b/index.xml index 8b1dd1bd3d..05f7a1e0ff 100644 --- a/index.xml +++ b/index.xml @@ -16,6 +16,7 @@ $Date$ + diff --git a/steam/deps/dps/dummy.xml b/steam/deps/dps/dummy.xml new file mode 100644 index 0000000000..25f95c6ff7 --- /dev/null +++ b/steam/deps/dps/dummy.xml @@ -0,0 +1,11 @@ + + + + + + + Packages for UEFI Boot + + + diff --git a/steam/deps/net/nspr.xml b/steam/deps/net/nspr.xml new file mode 100644 index 0000000000..03e35a4526 --- /dev/null +++ b/steam/deps/net/nspr.xml @@ -0,0 +1,251 @@ + + + %general-entities; + + + + + + + +]> + + + + + + NSPR-&nspr-version; + + + NSPR + + + + Introduction to NSPR + + + Netscape Portable Runtime (NSPR) provides a + platform-neutral API for system level and libc like functions. + + + &lfs121_checked; + + Package Information + + + + Download (HTTP): + + + + + Download (FTP): + + + + + Download MD5 sum: &nspr-md5sum; + + + + + Download size: &nspr-size; + + + + + Estimated disk space required: &nspr-buildsize; + + + + + Estimated build time: &nspr-time; + + + + + + + + Installation of NSPR + + + Install NSPR by running the following commands: + + +cd nspr && + +sed -i '/^RELEASE/s|^|#|' pr/src/misc/Makefile.in && +sed -i 's|$(LIBRARY) ||' config/rules.mk && + +./configure --prefix=/usr \ + --with-mozilla \ + --with-pthreads \ + $([ $(uname -m) = x86_64 ] && echo --enable-64bit) && +make + + + The test suite is designed for testing changes to nss or nspr and is + not particularly useful for checking a released version (e.g. it needs + to be run on a non-optimized build with both nss and nspr directories + existing alongside each other). + + + + Now, as the root user: + + +make install + + + + Command Explanations + + + sed -ri '/^RELEASE/s/^/#/' pr/src/misc/Makefile.in: + This sed disables installing two unneeded scripts. + + + + sed -i 's#$(LIBRARY) ##' config/rules.mk: This sed disables + installing the static libraries. + + + + --with-mozilla: This parameter adds Mozilla support + to the libraries (required if you want to build any other Mozilla + products and link them to these libraries). + + + + --with-pthreads: This parameter forces use of the + system pthread library. + + + + --enable-64bit: The --enable-64bit parameter is + required on an x86_64 system to prevent + configure failing with a claim that this is a system + without pthread support. The [ $(uname -m) = x86_64 ] test ensures it has + no effect on a 32 bit system. Keep the line if intending to do multilib, + and the lib32 instructions will be down below. + + + + + + 32-bit Installation of NSPR + + + Install lib32-NSPR by running the following commands: + + +cd nspr && + +CC="gcc -m32" CXX="g++ -m32" \ +PKG_CONFIG_PATH=/usr/lib32/pkgconfig \ +./configure --prefix=/usr \ + --libdir=/usr/lib32 \ + --host=i686-pc-linux-gnu \ + --with-mozilla \ + --with-pthreads \ + --disable-64bit && +make + + + Now, as the root user: + + +make DESTDIR=$PWD/DESTDIR install +cp -vr DESTDIR/usr/lib32/* /usr/lib32 +rm -rf DESTDIR +ldconfig + + + + + Contents + + + Installed Programs + Installed Libraries + Installed Directories + + + + nspr-config + + + libnspr4.so, libplc4.so, and libplds4.so + + + /usr/include/nspr + + + + + + Short Descriptions + + + + + nspr-config + + + provides compiler and linker options to other packages that use + NSPR + + + nspr-config + + + + + + libnspr4.so + + + contains functions that provide platform independence for non-GUI + operating system facilities such as threads, thread synchronization, + normal file and network I/O, interval timing and calendar time, + basic memory management and shared library linking + + + libnspr4.so + + + + + + libplc4.so + + + contains functions that implement many of the features offered by + libnspr4 + + + libplc4.so + + + + + + libplds4.so + + + contains functions that provide data structures + + + libplds4.so + + + + + + + + + diff --git a/steam/deps/net/nss.xml b/steam/deps/net/nss.xml new file mode 100644 index 0000000000..6fcdf3b9e5 --- /dev/null +++ b/steam/deps/net/nss.xml @@ -0,0 +1,487 @@ + + + %general-entities; + + + + + + + + + + + + + + + + + + + + +]> + + + + + NSS-&nss-version; + + + NSS + + + + Introduction to NSS + + + The Network Security Services (NSS) package is + a set of libraries designed to support cross-platform development of + security-enabled client and server applications. Applications built with + NSS can support SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, + S/MIME, X.509 v3 certificates, and other security standards. This is + useful for implementing SSL and S/MIME or other Internet security + standards into an application. + + + &lfs121_checked; + + Package Information + + + + Download (HTTP): + + + + + Download (FTP): + + + + + Download MD5 sum: &nss-md5sum; + + + + + Download size: &nss-size; + + + + + Estimated disk space required: &nss-buildsize; + + + + + Estimated build time: &nss-time; + + + + + Additional Downloads + + + + Required patch: + + + + + + + NSS Dependencies + + Required + + + + + Recommended + + and + (runtime) + + + + + + Installation of NSS + + + + Install NSS by running the following commands: + + +patch -Np1 -i ../nss-&nss-version;-standalone-1.patch && + +cd nss && + +make BUILD_OPT=1 \ + NSPR_INCLUDE_DIR=/usr/include/nspr \ + USE_SYSTEM_ZLIB=1 \ + ZLIB_LIBS=-lz \ + NSS_ENABLE_WERROR=0 \ + $([ $(uname -m) = x86_64 ] && echo USE_64=1) \ + $([ -f /usr/include/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1) + + + + To run the tests, execute the following commands: + + +cd tests && +HOST=localhost DOMSUF=localdomain ./all.sh +cd ../ + + + Some information about the tests: + + + + HOST=localhost and DOMSUF=localdomain are required. + Without these variables, a FQDN is + required to be specified and this generic way should work for + everyone, provided localhost.localdomain + is defined + + in /etc/hosts, as done in + + the LFS book. + + + by the myhostname + Name Service Switch module, as specified in + + the LFS book. + + + + + + The tests take a long time to run. If desired there is + information in the all.sh script about running subsets of the + total test suite. + + + + + When interrupting the tests, the test suite + fails to spin down test servers that are run. This leads to an + infinite loop in the tests where the test suite tries to kill a server + that doesn't exist anymore because it pulls the wrong PID. + + + + + Test suite results (in HTML format!) can be found at + ../../test_results/security/localhost.1/results.html + + + + + A few tests might fail on some Intel machines for unknown reasons. + + + + + + + Now, as the root user: + + +cd ../dist && + +install -v -m755 Linux*/lib/*.so /usr/lib && +install -v -m644 Linux*/lib/{*.chk,libcrmf.a} /usr/lib && + +install -v -m755 -d /usr/include/nss && +cp -v -RL {public,private}/nss/* /usr/include/nss && + +install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} /usr/bin && + +install -v -m644 Linux*/lib/pkgconfig/nss.pc /usr/lib/pkgconfig + + + + + Command Explanations + + + BUILD_OPT=1: This option is passed to + make so that the build is performed with no debugging + symbols built into the binaries and the default compiler optimizations are + used. + + + + NSPR_INCLUDE_DIR=/usr/include/nspr: This option + sets the location of the nspr headers. + + + + USE_SYSTEM_ZLIB=1: This option is passed to + make to ensure that the + libssl3.so library is linked to + the system installed zlib instead of the + in-tree version. + + + + ZLIB_LIBS=-lz: This option provides the + linker flags needed to link to the system zlib. + + + + $([ $(uname -m) = x86_64 ] && echo USE_64=1): + The USE_64=1 option is required on + x86_64, otherwise make will try (and fail) + to create 32-bit objects. The [ $(uname -m) = x86_64 ] test ensures it + has no effect on a 32 bit system. + + + + ([ -f /usr/include/sqlite3.h ] && echo + NSS_USE_SYSTEM_SQLITE=1): This tests if + sqlite is installed and if so it + echos the option NSS_USE_SYSTEM_SQLITE=1 to + make so that + libsoftokn3.so will link against + the system version of sqlite. + + + + : If you don't need to run + NSS test suite, append this option to make command, + to prevent the compilation of tests and save some build time. + + + + + + 32-bit Installation of NSS + + + Install lib32-NSS by running the following commands: + + +cd nss && + +CC="gcc -m32" CXX="g++ -m32" \ +make BUILD_OPT=1 \ + NSPR_INCLUDE_DIR=/usr/include/nspr \ + USE_SYSTEM_ZLIB=1 \ + ZLIB_LIBS=-lz \ + NSS_ENABLE_WERROR=0 \ +$([ -f /usr/lib32/libsqlite3.so ] && echo NSS_USE_SYSTEM_SQLITE=1) + + + Now, as the root user: + + +cd ../dist && + +install -v -m755 Linux*/lib/*.so /usr/lib32 && +install -v -m644 Linux*/lib/{*.chk,libcrmf.a} /usr/lib32 && +sed -i 's/lib/lib32/g' Linux*/lib/pkgconfig/nss.pc && +install -v -m644 Linux*/lib/pkgconfig/nss.pc /usr/lib32/pkgconfig + + + + + Configuring NSS + + + If is installed, the + p11-kit trust module + (/usr/lib/pkcs11/p11-kit-trust.so) can be used as a + drop-in replacement for /usr/lib/libnssckbi.so to + transparently make the system CAs available to + NSS aware applications, rather than the static + library provided by /usr/lib/libnssckbi.so. As the + root user, execute the following + command: + + +ln -sfv ./pkcs11/p11-kit-trust.so /usr/lib/libnssckbi.so + + + For lib32-NSS, execute the following + command as the root user: + +ln -sfv ./pkcs11/p11-kit-trust.so /usr/lib32/libnssckbi.so + + + Additionally, for dependent applications that do not use the internal + database (/usr/lib/libnssckbi.so), the + /usr/sbin/make-ca script included on the + page can generate a system wide NSS DB with the + -n switch, or by modifying the + /etc/make-ca/make-ca.conf file. + + + + + + Contents + + + Installed Programs + Installed Libraries + Installed Directories + + + + certutil, nss-config, and pk12util + + + libcrmf.a, libfreebl3.so, libfreeblpriv3.so, + libnss3.so, libnssckbi.so, libnssckbi-testlib.so, + libnssdbm3.so, libnsssysinit.so, libnssutil3.so, + libpkcs11testmodule.so, libsmime3.so, libsoftokn3.so, + and libssl3.so + + + /usr/include/nss + + + + + + Short Descriptions + + + + + certutil + + + is the Mozilla Certificate Database Tool. It is a command-line + utility that can create and modify the Netscape Communicator + cert8.db and key3.db database files. It can also list, generate, + modify, or delete certificates within the cert8.db file and create + or change the password, generate new public and private key pairs, + display the contents of the key database, or delete key pairs within + the key3.db file + + + certutil + + + + + + nss-config + + + is used to determine the NSS library settings of the installed NSS + libraries + + + nss-config + + + + + + pk12util + + + is a tool for importing certificates and keys from pkcs #12 files + into NSS or exporting them. It can also list certificates and keys + in such files + + + pk12util + + + + + + + + + diff --git a/steam/intro.xml b/steam/steamchapter.xml similarity index 52% rename from steam/intro.xml rename to steam/steamchapter.xml index 95e20371fb..6414b7b2b6 100644 --- a/steam/intro.xml +++ b/steam/steamchapter.xml @@ -5,11 +5,11 @@ %general-entities; ]> - - + + - Introduction + Steam - + diff --git a/steam/steamintro.xml b/steam/steamintro.xml new file mode 100644 index 0000000000..c2804f6aa4 --- /dev/null +++ b/steam/steamintro.xml @@ -0,0 +1,23 @@ + + + %general-entities; +]> + + + + + Steam + + + This chapter is dedicated to covering all the dependencies + (both 64-bit and 32-bit compilation instructions), + configuration of those dependencies, and troubleshooting + that is required to get Steam working on a LFS platform. + + + + + + diff --git a/steam/steamtrblshoot.xml b/steam/steamtrblshoot.xml new file mode 100644 index 0000000000..e69de29bb2